使用jQuery更新flashvars并重新加载flash [英] Update flashvars and reload flash with jQuery

查看:175
本文介绍了使用jQuery更新flashvars并重新加载flash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



 < param name ='flashvars'value ='movieId = 1002'/> 

我发现可以通过更新参数来使其在Firefox中工作整个Flash内容。

  $(param [name = flashvars])。attr(value,movieId = 33\" ); 
$(embed)。attr(flashvars,movieId = 33);
$(。root)。append($(#video));

但是这在IE8中不起作用,因为浏览器不会刷新Flash内容。任何想法如何重新加载的Flash内容没有像swfobject.js外部依赖??解决方案

您可以使用flashvars ExternalInterface AS3类将新值发送给Flash。



ExternalInterface允许在AS3& Javascript


I would like to update the flashvars value argument to view another video:

<param name='flashvars' value='movieId=1002' />

I found out that I can make it work in Firefox by updating the parameter with the extra step of readding the whole flash contents.

$("param[name=flashvars]").attr("value", "movieId=33");
$("embed").attr("flashvars", "movieId=33");
$(".root").append($("#video"));

But this does not work in IE8 as the browser won't refresh the flash contents. Any ideas on how to reload the flash contents without external dependencies like swfobject.js?

解决方案

Instead of using flashvars, you could use the ExternalInterface AS3 class to send the new value to Flash.

ExternalInterface allows for a two way communication between AS3 & Javascript

这篇关于使用jQuery更新flashvars并重新加载flash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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