开发者

Jquery to dynamically change flashparam attribute (config={"playlist":["url"]:"http://localhost/test.flv"}) of an embed tag

I have embed tag and its configured开发者_JAVA技巧 as:

<embed flashparam="config={"playitem":[{"url":"http://localhost/test.flv","autoPlay":false}]}" 

Now i want change the "URL" dynmically. How can i change it using jquery?

THX


you can change it by doing:

$('embed').attr('flashparam', 'config={"playitem":[{"url":"http://localhost/test.flv","autoPlay":false}]}');

But as @Pekka mentioned, the change will not make it to the flash movie so there is no point to do this. Read the below article which talk about how to pass variable values between flash and your page (Read "Using JavaScript" section):

http://kb2.adobe.com/cps/142/tn_14253.html

Here is a working version:

http://www.permadi.com/tutorial/flashjscommand/

I hope this help!


This should work out fine

var e = $('#container').text();
e.replace(/\./g, "[this is period]");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜