The main application (called Loader1) has a panel which displays information about the current application, parameters, url etc.
The main application loads a remote application SWF (called Loader2) which also has the same panel displaying information about the application, parameters, url, etc. The differences are highlighted in bold.
Here is the code for loading a remote swf - notice how parameters are passed into the url:
private function loadRemoteSWF():void { |
In the remote application you can access the parameters that were passed in from the main application through the SWFLoader by the parameters property, but you MUST be inside the remote application MXML (e.g. in this case in Loader2.mxml), otherwise if you use Application.application.parameters this will refer to the parameters from the main application and not the ones that were passed in using the SWFLoader.
Source Code:
- Loader1 (Main Application), or right click View Source
- Loader2 (Remote SWF Application)
No comments:
Post a Comment