This is driving me nuts... Based on my research I should be able to pass QueryString parameters directly to a swf object like so:
http://localhost:3000/SomeFlash/bin-debug/myFlash.swf?userId=827419
In the mxml oncreationcomplete method I have tried the following:
// oncreationcomplete method
var userIdTest1:String = FlexGlobals.topLevelApplication.parameters[0];
var userIdTest2:String = Application.application.parameters.userId;
var userIdTest3:String = this.parameters.userId;
// External Interface
ExternalInterface.addCallback("OnGameLoad", ClientParams);
// callback method
protected function ClientParams(userId:String):void
{
this.userId = userId;
}
source http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf626ae-7feb.html
I am using Flashbuilder 4.5 with Flex 4.5.1 compiler. I am using a mxml with an html wrapper, but I am trying to pass the parameters via url to the swf directly.