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=",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="" type="application/x-shockwave-flash" name="obj1" width="640" height="480"></object>

          document.getElementsByTagName("embed")[0].src = gameFile;                           

Open in new window

Who is Participating?
try this

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

Open in new window

yaron89Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.