How can I pass parameters to a loaded swf application?
Question
When I load an swf application using SWFLoader in Flex 4, how can I pass parameters to that application?
Solution
I've never tried this, but it looks like you can append them directly to the SWFLoader's source as a query string:
<mx:SWFLoader source = "map/us.swf?data_file=map/senate.xml" id="mapLoader" width="300" height="100" />
And retrieve them in the loaded SWF with:
var your_param:String = this.loaderInfo.parameters.data_file;
trace(your_param);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow