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]");
精彩评论