Solved

Flash 5: onProgress - onReadyStateChange

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

624 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