Forum Moderators: open
I want to pass a variable from an url into my flashmovie so it gives the right content.
My situation:
I have the url www.mysite.com/?tld=com
in the FLA movie I have embedded:
on (release) {
if (_root.tld == com) {
getURL("javascript:play('game.php?fid=halo&tld=com')");
}
if (_root.tld == xx or _root.tld == "") {
getURL("javascript:play('game.php?fid=new&tld=xx')");
}
}
But this does not work. Am I missing something, should I add some more code or is it totally wrong?
Thanks!
Steve
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0"
ID=yourswf WIDTH=468 HEIGHT=300>
<PARAM NAME=movie VALUE="[red]http://yourdomian/yourswf.swf?tld=tld[/red]">
...
...
</OBJECT>
Flash needs to be passed that variable directly when your browser calls for the movie to be loaded. It cannot grab something from the header string without it being called explicitly.
Hope this helps you out.
And welcome to Webmaster World!