SWFLoader is for loading SWF, ModuleLoader is for loading Modules. Both must be added to the display list before loading.
I'd double check your settings. I don't see how the sub-app would try to load the apps RSLs. See the Marshall Plan presentation on my blog. I would expect you can get RSLs to work, but then you can't mix versions: all remote SWFs will need to be on the same version. Otherwise, they should just statically link everything they need. It is going to be a trade-off. Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected] [mailto:[email protected]] On Behalf Of cosmacol Sent: Friday, December 04, 2009 8:01 AM To: [email protected] Subject: [flexcoders] Loading sub-applications from AIR and RSL issues Hi, I'm experimenting with the sub-application features of Flex to create an AIR application able to dynamically load, at run-time, remote SWCs and use them (a sort of portal). I had some degree of success, and found the following limitations: - must use SWFLoader instead of Loader to support Flex sub-applications - strange issues (RTEs) happens if SWFLoader tries to load the remote SWC before adding itself to the stage - loaded SWCs cannot be Flex Modules (even if non-optimized) - loaded SWCs must statically link their dependencies (including Flex framework, no RSLs support) However, I'd like to use the RSL feature of Flex to minimize the size of the single applications - think about many little "applets" applications: there must be a way to avoid merging the Flex framework in each of them... In my example, I used the SDK 3.3.0 and set the framework linkage to RSL for the sub-application, while using the SDK 3.4.1 for the main AIR application. On load, the sub-application fail with the error "Error #2032: Stream Error. URL: app:/framework_3.4.1.10084.swf". The strange thing is that is trying to get the 3.4.1 framework, even if from the wrong position, instead of the correct one (3.3.0). Using "merged into code" framework linkages, the sub-application is loaded and works fine. Maybe I could load manually load the framework SWF and add it in the same application domain of the loaded sub-application? Any other ideas? Thanks in advance Cosma

