动态设置swf对象的flashvars参数 [英] Setting flashvars parameter of swf object dynamically

查看:283
本文介绍了动态设置swf对象的flashvars参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,我想要播放基于复选框选中歌曲的要求。我的意思是我想设置SWF对象的flashvars参数单击复选框来播放各自的歌曲。我使用的标签是

 < embed type =application / x-shockwave-flash
flashvars =audioUrl = http:// www.labnol.org/assets/mp3/unofficial-yahoo-song.mp3
src =http://www.google.com/reader/ui/3523697345-audio-player.swf
width =400
height =27
quality =best/>

在我的网站中。在这里我想更改flasvars动态复选框(功能为放射按钮)检查

当swf被加载时,只传递一次 flashvar 所以改变后的HTML(例如通过jQuery)将无法正常工作。

使用 ExternalInterface 在swf中通过javascript调用一个函数,然后启动或停止播放器/改变曲目。


I have a rquirement where i want to play the song based on the checkbox checked.I mean i want to set the flashvars parameter of swf object on click of checkbox to play respective song.I am using the tag for this is

<embed type="application/x-shockwave-flash" 
    flashvars="audioUrl=http://www.labnol.org/assets/mp3/unofficial-yahoo-song.mp3"
    src="http://www.google.com/reader/ui/3523697345-audio-player.swf" 
    width="400" 
    height="27" 
    quality="best"/>

in my website.Here i want to change the flasvars dynamically on checkbox(function as radion button) checked

解决方案

A flashvar is passed only once when the swf is loaded, so changing the html after that (via jQuery for instance) won't work.

Instead, use ExternalInterface to call a function within your swf via javascript which in turn starts or stops the player/change tracks.

这篇关于动态设置swf对象的flashvars参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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