Solved

setting java script variable to an flash object

Posted on 2013-01-23
2
140 Views
Last Modified: 2013-01-28
"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
Comment
Question by:yaron89
2 Comments
 
LVL 3

Accepted Solution

by:
Khilu earned 500 total points
Comment Utility
try this

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

Open in new window

0
 

Author Comment

by:yaron89
Comment Utility
checking
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now