本文介绍了在javascript中检测Flash影片的结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法检测Flash电影的结束(OOTB,没有使用某种类型的Flash回调)。



另外,有没有办法知道电影的长度?



更新:



IsPlaying()看起来很有前途(定期检查它),但事实证明,没有人正在创建直接的swf。现在,内容被嵌入在主层中,而内容播放时,主要电影被停止,IsPlaying始终是假的...

  var movie = window.document.movi​​e 

if(movie.TCurrentFrame(/)== movie.TotalFrames())
警报(电影完成);

或者您可以:

<$ p $如果(!movie.IsPlaying())
alert(Movie Stopped);

但那不是真正的结果。

Is there a way to detect end of Flash movie (OOTB, without using some sort of flash callback).

Alternatively, is there a way to know the length of the movie?

Update:

IsPlaying() looked promising (periodically checking it), but as it turns out, nobody is creating straight forward swfs any more; now, the content is embedded in main layer and while the content plays, the main movie is stopped and IsPlaying is always false...

解决方案
var movie = window.document.movie

if(movie.TCurrentFrame("/") == movie.TotalFrames())
    alert("Movie Finished");

or you could have:

if (!movie.IsPlaying())
    alert("Movie Stopped");

but thats not really what you're after.

这篇关于在javascript中检测Flash影片的结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 06:38