I am passing parameters to flex application as below but it shows empty always .
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="metaplayer">
<param name="movie" value="multicastplayer.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="group" value="8155" />
<param name="password" value="8155" />
<param name="type" value="2" />
<param name="streamname" value="8155" />
</object>
Accessing it from flex shows empty either of this ways. WriteText is just my function that shows variables in a textbox.
writeText(mx.core.Application.application.parameters.group);
for (var i:String in FlexGlobals.topLevelApplication.parameters) {
writeText( i + ":" + FlexGlobals.topLevelApplication.parameters[i] + "\n");
}
For me it works fine with this syntax (passing the arguments through the flasVars” param name):
And then in my flex:
You can find the official documentation about that on the official web site: http://helpx.adobe.com/flash/kb/pass-variables-swfs-flashvars.html
BTW, you can/should use swfObject to generate this piece of HTML code. It handles properly passing the parameters to the SWF.
HIH