延迟启动 Flash 电影并自动播放?
我想知道我的最佳选择是延迟加载/播放设置为自动播放的电影?
如果重要的话,这些视频都是外部的;一旦我希望 JavaScript 函数启动,我可以在其中触发任何类型的代码吗?那将是理想的。
I am wondering what my best option is to delay the loading/playing of a movie that is set to autoplay?
The videos are all external if that matters; is there any kind of code I can fire within a javascript function once I want it to start? That would be ideal.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
控制嵌入式 SWF 的播放和 SWF 中加载的视频是完全不同的任务。如果您想在嵌入 SWF 后延迟视频的开始,则需要在动作脚本中设置某种延迟方法。如果您想通过 JavaScript 控制视频,则需要使用ExternalInterface。有一些 EI 示例,位于 http://learnswfobject.com/advanced-topics/external-interface/
Controlling the playback of an embedded SWF and a video loaded within the SWF are completely different tasks. If you'd like to delay the start of your video AFTER the SWF has been embedded, you'll need to set up some sort of delay method in your actionscript. If you'd like to control the video via JavaScript, you'll need to use ExternalInterface. There are some EI examples at http://learnswfobject.com/advanced-topics/external-interface/