4

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

Jehof
  • 34,674
  • 10
  • 123
  • 155
GV3
  • 491
  • 3
  • 16
  • I'm pretty sure you can specify which ApplicationDomain to load into when loading from file or embedding. At work right now, so will check later. Look for optional arguments in Loader though. – Jono Sep 05 '13 at 13:59

1 Answers1

1

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

Andrey Popov
  • 7,362
  • 4
  • 38
  • 58