Trying to load some variables into flash I’ve done it before and it’s work fine for some reason it’s not working with this project. I get undefined values.
Here’s the embed code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="650" height="650" id="Roulette" align="middle">
<param name="movie" value="roulette.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#595758" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name="FlashVars" value="maxBet=100&dev=1" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="roulette.swf" width="650" height="650">
<param name="movie" value="roulette.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#595758" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name="FlashVars" value="maxBet=100&dev=1" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
Here’s the AS side:
var dev:Boolean = true;
var maxBet:int;
this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
function loaderComplete(e:Event):void{
dev = this.loaderInfo.parameters.dev;
bet_max = this.loaderInfo.parameters.maxBet;
}
Any ideas? I’m using CS5 not sure if that helps any.
Thanks ,
Cendent