ufk
ufk

Reputation: 32094

How can I pass parameters to a loaded swf application?

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

Upvotes: 1

Views: 2277

Answers (1)

Daniel R
Daniel R

Reputation: 1429

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

Upvotes: 2

Related Questions