I need to dynamically pass 2 parameter to an swf movie to make it work properly, they are a number and a boolean.
To do this I've changed the html page which contains the movie to php, I pass to the page the parameters' values through GET.
The values are correctly passed to the page, I've tried to print them.
I build the call to the swf in this way
collpreloader.swf?connid=<?php echo $_GET['connid'] ?>&animazione=<?php echo $_GET['animazione'] ?>
collpreloader.swf correctly reads the connid parameter, but animazione results always true.
On the swf I read the parameters in this way
var connid:Number = this.loaderInfo.parameters.connid;
var animazione:Boolean = this.loaderInfo.parameters.animazione;
and to see their value on the movie I've put a dynamic text field where I write
test_txt.text = "connid: "+connid+" animazione: "+animazione;
To open the page with collpreloader.swf I click on a button and the page is loaded inside a frame on the browser, at the first click animazione is "true", if I click again on that button the page is reloaded, but this time animazione is "false" (connid is always the same).
The value's change works because I've put an echo on the php file and I can see that it correctly pass from true to false.
What's the problem, is there something wrong in the link construction? I've tried to change & to a simple &, and also to pass only animazione, but nothing changed.
Could it be a cache problem? I don't think that because the link changes when the parameter passes from true to false and the browser should read it as a new link.
You need (AS3) to work with Class flash.external
See help files for a complete example.
I've been able to make it work passing another numeric value in place of a boolean.
I pass animazione=1 and animazione=0 to simulate true and false.
I think there was a problem with the bollean parameter reading.