Hi Alex,

thanks for your answer, I read your post about the marshal plan months ago and, 
thanks to it, I knew where to start dealing with this problem.. I also read the 
up-to-date documentations about sub-applications, and tried to get a grip on 
application domains and security domains management..

If we can't use RSLs in a multi-versioned scenario, is there any approach to 
mitigate the download/memory issue? I was thinking about using SWFLoader just 
to load the remote SWC (with statically linked framework) but keep it hidden, 
then programmatically access its ApplicationDomain's class definitions, create 
instances of the classes I need and add these instances to the display list.. 
this way, we could "pack" many remote components in a single SWCs, with a 
single framework download.

I tried this approach but, obviously, I cannot directly add a "foreign" 
UIComponent in the display list of the main application (it won't be recognized 
as an UIComponent), neither I can simply wrap it into an UIComponent instance 
(related to the current ApplicationDomain), because no one will take care of 
creating the component children from their definition, at least for MXML 
object.. maybe it can work with pure ActionScript object? Any idea to support 
MXML components?




--- In [email protected], Alex Harui <aha...@...> wrote:
>
> 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
>


Reply via email to