停止Flash电影,而不是暂停它 [英] Stop Flash movie instead pausing it

查看:194
本文介绍了停止Flash电影,而不是暂停它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Flash电影,并停止播放按钮。当用户点击停止时,应该停止。我使用下面的JavaScript代码:

  document.getElementById(FLVPlayer)。StopPlay(); 

这会停止播放电影,但是当我点击播放时,它会继续播放电影,开始...
任何人都可以帮忙吗?

解决方案

StopPlay 是flash对象公开的方法 - 它不是视频播放器的一部分 - 所以逻辑是由flash插件定义的。最好的方法来实现你想要的是暴露ActionScript的方法,以通过 ExternalInterface 来使用javascript。

我wouldn使用flash-object命令 StopPlay 来控制视频。即使它有点奏效。


I have a Flash movie and stop and play button for it. When the user click on stop, it should stop. I'm using the following JavaScript code for it:

document.getElementById("FLVPlayer").StopPlay();

This stops the movie but when I click back on Play it resumes the movie instead if playing it from the start... Can any one help?

解决方案

StopPlay is a method exposed by the flash object - it is not a part of the video player - so the logic is defined by the flash plugin. Best way to achieve what you want is to expose methods from ActionScript for javascript to use via ExternalInterface.

I wouldn't use the flash-object command StopPlay for controlling the video. Even if it kinda works.

这篇关于停止Flash电影,而不是暂停它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆