2 Replies Latest reply on Nov 9, 2010 4:08 AM by Kumidan

    Problem passing 2 parameters to an swf

    Kumidan Level 1

      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'] ?>&amp;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 &amp; 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.