Solved

Flash 5: onProgress - onReadyStateChange

Posted on 2001-06-19
4
1,566 Views
Last Modified: 2008-02-01
The following quote comes from Macromedia's documentation regarding Flash:

'''''''''''''''Begin Quote''''''''''''
Events
 OnProgress(percent)
 Generated as the Flash movie is downloading.
 
 OnReadyStateChange(state)
 Generated when the ready state of the control changes. The possible states are: 0=Loading, 1=Uninitialized, 2=Loaded, 3=Interactive, 4=Complete.
 
 FSCommand(command, args)
 Generated when an FSCommand action is performed in the movie with a URL and the URL starts with FSCommand:. Use this to create a response to a frame or button action in the Flash movie.
'''''''''''''''End Quote''''''''''''

I am successfully using the FSCommand stuff.  I've got a flash movie that will raise FSCommands and I can process then in my web page using VBScript.

How can I use the OnReadyStateChange and OnProgress events?  I can't find an example anywhere!  Does anyone have an example of where they use these events to pass those parameters back to the HTML page hosting the flash file?

Thanks in advance,

lankford
0
Comment
Question by:lankford
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
mousefist earned 200 total points
Comment Utility

you were on the right track.  this quote comes from:

http://www.macromedia.com/support/flash/publishexport/scriptingwithflash/

these events are javascript events of the movie object - not to be confused with actionscript events (even though fscommand appears in both places).  the above article details the possible events and methods of the movie object embedded in your html page.  this article:

http://www.moock.org/webdesign/flash/fscommand/index.html

is basically the same, but it's a bit more detailed and friendly.  also, the moock version takes browser compatibility into account, among other things.  

so the answer to your question is that you don't need to pass these events to the html page, because that's where you'll be catching them.  

i think the reason you don't really see too many tutorials on OnReadyStateChange and OnProgress is that these events aren't terribly useful.  for example, OnProgress is similar in nature to checking the _framesloaded property within actionscript.  _framesloaded is great for making a progress bar while loading the movie.  perhaps you could make a dhtml progress bar using OnProgress ... but why would you when it's so easy to do it all with flash?  you know what i mean?  

so now your only problem is communication between asp and javascript!

m.$
0
 

Author Comment

by:lankford
Comment Utility
mousefist,

Thanks for the response.  You're right, I do want to create a DHTML progress bar.  The reason for this is that I already have created thousands of flash files that I don't want to edit.

I appreciate your response, but I would love it if you could provide an example showing the successful use of either OnReadyStateChange or OnProgress.  I literally cannot find an example of either of these events being used anywhere on the Internet.  I either can't research well, or hardly anyone is using this stuff.

Thanks,

Lankford
0
 
LVL 5

Expert Comment

by:stef4s
Comment Utility
an alternative is to load all these movies into a parent movie. This parent movie will contan the preloader.
0
 

Author Comment

by:lankford
Comment Utility
Just closing this question out.  Thanks for the response.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now