?
Solved

Flash 5: onProgress - onReadyStateChange

Posted on 2001-06-19
4
Medium Priority
?
1,625 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
mousefist earned 600 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
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.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

719 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