[英]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. 我有一个简单的网站,其中嵌入了其他网站的Flash电影。 I need to detect when this movie reaches its end and then do some action ...
我需要检测这部电影何时结束,然后采取一些措施...
Is this possible via jquery/js? 是否可以通过jquery / js?
Thank you. 谢谢。 s_
s_
Basically there is a flash class called flash.external.ExternalInterface AFAIK you can use that one to interface with JavaScript. 基本上有一个名为flash.external.ExternalInterface AFAIK的Flash类,您可以使用该类与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: 为了在嵌入式Flash视频到达末尾时得到通知,我在时间线的最后一帧中输入了一行命令:
dispatchEvent(new Event("VideoFinished"));
and hook up to the movie with 并与电影挂钩
myMovie.addEventListener("VideoFinished", myMovieFinished);
where myMovieFinished is the function to call. 其中myMovieFinished是要调用的函数。 There you could place the call to utilise the ExternalInterface.
您可以在此处发出调用以使用ExternalInterface。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.