简体   繁体   English

RSL,LoaderContext和ApplicationDomain。 我可以将应用程序域传递给RSL吗?

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

So, I've a few libraries that I'm loading as RSL's to my project. 所以,我有一些库,我正在加载为我的项目的RSL。

I do this in Flash Professional, since it's the easiest way to give your RSL's to your project with fallback. 我在Flash Professional中执行此操作,因为这是通过回退将RSL提供给项目的最简单方法。

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. 我正在通过Loader将其他swf加载到我的主swf中,我需要给这个swf提供相同的应用程序域,以便一切正常。 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. 但是这个swf使用的是一个非常旧版本的GreenSock(嵌入式),我现在正在使用最新版本(加载为RSL),因此如果将两个库加载到同一个应用程序域中会产生冲突。

That is why I ask you guys, is there a way for me to pass an specific ApplicationDomain or LoaderContext to my RSL's ? 这就是为什么我问你们,有没有办法让我将特定的ApplicationDomain或LoaderContext传递给我的RSL? maybe through the cross-domain file? 也许通过跨域文件?

Any ideas? 有任何想法吗?

Thank you 谢谢

I'm not pretty sure what are you trying to do, but of course you can specify ApplicationDomain: 我不太确定你想做什么,但当然你可以指定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 参考: http//help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/ApplicationDomain.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM