View Full Version : Using variable as URL

04-28-2007, 12:01 PM
I'm using a flash embeding, and usually for the source i put:
but I want the source to depend on a javascript variable, so if i have

var example="flash2.swf";
then how can I use that example variable as the source for the flash file?

04-29-2007, 09:29 AM
do it the hard way using the DOM api createElement and appendChild

or... do it the easy way and use document.write