简体   繁体   中英

How to detect the end of an embed flash movie

I have been struggling with this problem for a some time.

Basically have no clue how to do this.

I have a simple website where I have embeded a flash movie from a different site. I need to detect when this movie reaches its end and then do some action ...

Is this possible via jquery/js?

Thank you. s_

Basically there is a flash class called flash.external.ExternalInterface AFAIK you can use that one to interface with JavaScript. Please have a look into the details how to use it.

To get notified when a embedded flash video reaches the end I put a one-line command into the last frame on the time line:

dispatchEvent(new Event("VideoFinished"));

and hook up to the movie with

myMovie.addEventListener("VideoFinished", myMovieFinished);

where myMovieFinished is the function to call. There you could place the call to utilise the ExternalInterface.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM