• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 157
  • Last Modified:

setting java script variable to an flash object

"gameFile" is a java script varaible.
In the following code how can I set param name="movie" to "gameFile"?
something like:
document.getElementsByTagName(????????.movie) = gameFile;

<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="640" height="480">
					<param name="movie" value="test.swf">
					<param name="quality" value="High">
					<embed src="test.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="640" height="480"></object>

<script>
          document.getElementsByTagName("embed")[0].src = gameFile;                           
</script>

Open in new window

0
yaron89
Asked:
yaron89
1 Solution
 
KhiluCommented:
try this

document.getElementsByTagName("param")[0].name= gameFile; 

Open in new window

0
 
yaron89Author Commented:
checking
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now