Evan Cutler
asked on
changing source of embedded flash video using javascript
Greetings EE Gods.
Using ASP.net, I can employ this line:
<img id="product_fullimage" alt="" runat="server" />
From other images, I can change the source of the img tag on the fly using javscript:
onclick=\"",fullimage,".sr c='/Conten t/images/p roducts/", previewimage.fullimage, "';\""
Can I do this with embedded SWF and FLVs?
<OBJECT CLASSID="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000"
WIDTH="400" HEIGHT="300"
CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="MOVIE" VALUE="sample.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="QUALITY" VALUE="best">
<PARAM NAME="LOOP" VALUE="true">
<EMBED SRC="sample.swf" WIDTH="400" HEIGHT="300" PLAY="true" LOOP="true" QUALITY="best"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
Thanks.
Using ASP.net, I can employ this line:
<img id="product_fullimage" alt="" runat="server" />
From other images, I can change the source of the img tag on the fly using javscript:
onclick=\"",fullimage,".sr
Can I do this with embedded SWF and FLVs?
<OBJECT CLASSID="clsid:D27CDB6E-AE
WIDTH="400" HEIGHT="300"
CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="MOVIE" VALUE="sample.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="QUALITY" VALUE="best">
<PARAM NAME="LOOP" VALUE="true">
<EMBED SRC="sample.swf" WIDTH="400" HEIGHT="300" PLAY="true" LOOP="true" QUALITY="best"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
can I embed that function in the middle of the body?
Thanks
Thanks
where ever you want.
RegisterClientScripBlock will do it or attach to onclik or onload or other suitable event.
HTH
I
RegisterClientScripBlock will do it or attach to onclik or onload or other suitable event.
HTH
I
ASKER
Thank you.
I'll get this to work.
Evan
I'll get this to work.
Evan
AFAIK changing Object param attribute dynamically using javascript is not allowed. You have to first delete the object and create a new object with new param
HTH
I