点击重新加载/重置嵌入式swf [英] reload/ reset embedded swf on click

查看:150
本文介绍了点击重新加载/重置嵌入式swf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网页上有不同的Flash电影。有没有什么办法点击一个按钮(HTML)我可以重新启动/重新加载嵌入式Flash电影?



使用:

 < object data =flash / cvdb_video_cvdb_access.swftype =application / x-shockwave-flashid =flash_99674493width =680height = 316\" > 
< param name =movievalue =flash / cvdb_video_cvdb_access.swf>
< param name =wmodevalue =opaque>
< / object>

谢谢!

解决方案

你可以使用jQuery从前面的< object .. 元素中取得所有的HTML,然后把html注入到它里面,没有办法重新加载一个单独的元素。你重新加载位置,整个dom,但你不想要的。你只是想重新加载你的瑞士法郎。

  var obj = $(object#flash_99674493); 
var orig = obj.html();

var restart = function(){
obj.html(orig);
alert(reloaded);

请参阅(这个jsfiddle


I have various flash movies in tags on my page. Is there any way on click of a button (html) I can restart/ reload the embedded flash movie?

Im using:

<object data="flash/cvdb_video_cvdb_access.swf" type="application/x-shockwave-flash" id="flash_99674493" width="680" height="316">
<param name="movie" value="flash/cvdb_video_cvdb_access.swf">
<param name="wmode" value="opaque">
</object>

Thanks!

解决方案

You can use jQuery to take all the HTML from the previous <object.. element, and just inject the html back into it, as there is no way to "reload" an individual element. you reload locations, and the entire dom, but you don't want that. you just want to reload your swf.

var obj = $("object#flash_99674493");
var orig = obj.html();

var restart = function() {
    obj.html(orig);
    alert("reloaded");
}

see (this jsfiddle)

这篇关于点击重新加载/重置嵌入式swf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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