Solved

Flash 5: onProgress - onReadyStateChange

Posted on 2001-06-19
4
1,591 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 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…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

830 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