Link to home
Start Free TrialLog in
Avatar of Evan Cutler
Evan CutlerFlag for United States of America

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,".src='/Content/images/products/", previewimage.fullimage, "';\""

Can I do this with embedded SWF and FLVs?
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
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.
Avatar of Ivo Stoykov
Ivo Stoykov
Flag of Bulgaria image

Hello arcee123,

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
ASKER CERTIFIED SOLUTION
Avatar of Ivo Stoykov
Ivo Stoykov
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Evan Cutler

ASKER

can I embed that function in the middle of the body?

Thanks
where ever you want.
RegisterClientScripBlock will do it or attach to onclik or onload or other suitable event.

HTH

I
Thank you.
I'll get this to work.

Evan