views:

258

answers:

1

Hiya. When i load an swf application using SWFLoader in Flex 4, how can i paste parameters to that application ?

thanks!

+2  A: 

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);

Source

Inigoesdr
ufk