1

When I load an swf application using SWFLoader in Flex 4, how can I pass parameters to that application?

blahdiblah
  • 33,069
  • 21
  • 98
  • 152
ufk
  • 30,912
  • 70
  • 235
  • 386

1 Answers1

2

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

Daniel R
  • 1,439
  • 11
  • 8
  • 1
    it works.. if i want to have more then one parameter i need to seperate each parameter with & instead of & – ufk Jul 26 '10 at 13:44