Solved

Flash 5: onProgress - onReadyStateChange

Posted on 2001-06-19
4
1,581 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
ID: 6211163

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
ID: 6211412
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
ID: 6224190
an alternative is to load all these movies into a parent movie. This parent movie will contan the preloader.
0
 

Author Comment

by:lankford
ID: 6671193
Just closing this question out.  Thanks for the response.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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. …
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

813 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

20 Experts available now in Live!

Get 1:1 Help Now