Copy link to clipboard
Copied
Hello, i have some web page (on webserver) that including swf file, after clicking on the swf section its redirect to another page that including different swf file. how can i pass variable from the first swf to the other one? any idea???
Copy link to clipboard
Copied
in your first swf use something like that as the link for the second swf:
http://mySwf2.html?parameter1=val1
and in your second html file use
Javascript to get parameter1 with :
val1= window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
and then use SwfObject to embed ypur swf in the html
<script language='JavaScript'>
var variables={};
variables.val1='" + val1 + "';swfobject.embedSWF('mySwf2.swf', 'swf2', '800', '300', '9.0.0', 'expressInstall.swf',variables);
</script>";
the in your myswf2.swf :
var par1:String=LoaderInfo(this.loaderInfo).parameters.parameter1;
note: it's not a working code, you have to change/edit/add as your needs.
Message was edited by: Hakan KIRIK
Copy link to clipboard
Copied
One way is to use a query string.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more