Click to See Complete Forum and Search --> : dynamic flash access


marcusdugaw
12-28-2003, 09:39 PM
I'm trying to change the source of a Flash movie I have embedded in a page I'm working on. To embed the movie originally, Dreamweaver generates the following code:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" name="mainmov" width="600" height="450" id="mainmov">
<param name="movie" value="main.swf">
<param name="quality" value="high">
<embed src="main.swf" name="flashmov" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="600" height="450"></embed></object>

What I want to be able to do is access the 'main.swf' movie and change the source to something else on an onClick event such as:

onClick="document.mainmov.flashmov.src='othermov.swf'"

...or something along those lines. However, I can't figure out how to get at that particular attribute given the code structure Dreamweaver generated. Do I need to use getElementById somewhere in there? Any help would be appreciated.

stoodder
12-29-2003, 11:36 AM
hmm im not really sure either but maye instread of putting the name inside of the <object> tag try putting it inside the <embed> tag...