RSL, LoaderContext and ApplicationDomain. Can I pass an application Domain to an RSL?

195 Views Asked by At

So, I've a few libraries that I'm loading as RSL's to my project.

I do this in Flash Professional, since it's the easiest way to give your RSL's to your project with fallback.

I'm loading other swf's into my main swf via Loader and I NEED to give this swf's the same Application Domain so that everything works as it should. But this swf's use a very old version of GreenSock(embeded) and I'm now using the latest (loaded as RSL) and thus have a conflict if loading both libs into the same Application Domain.

That is why I ask you guys, is there a way for me to pass an specific ApplicationDomain or LoaderContext to my RSL's ? maybe through the cross-domain file?

Any ideas?

Thank you

1

There are 1 best solutions below

0
On

I'm not pretty sure what are you trying to do, but of course you can specify ApplicationDomain:

var appDomainA:ApplicationDomain = new ApplicationDomain(); 

var contextA:LoaderContext = new LoaderContext(false, appDomainA); 
var loaderA:Loader = new Loader(); 
loaderA.load(new URLRequest("application2.swf"), contextA);

Reference: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/ApplicationDomain.html