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

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

问题描述

我想更新 flashvars 值参数以查看另一个视频:

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

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

我发现我可以通过使用读取整个 Flash 内容的额外步骤更新参数来使其在 Firefox 中工作.

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"));

但这在 IE8 中不起作用,因为浏览器不会刷新 Flash 内容.关于如何在没有外部依赖项(如 swfobject.js)的情况下重新加载 Flash 内容的任何想法?

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?

推荐答案

您可以使用 ExternalInterface AS3 类将新值发送到 Flash,而不是使用 flashvars.

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

ExternalInterface 允许 AS3 & 之间的双向通信.Javascript

ExternalInterface allows for a two way communication between AS3 & Javascript

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

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