2016-10-13 00:16:48 点击量:6 标签: 收藏本文
记录一下关于ApplicationDomain类的用法
- ar loader : Loader = new Loader();
- var context : LoaderContext = new LoaderContext(true, ApplicationDomain.currentDomain);
- /* CuPlayer.com提示:加载到同域(共享库) */
- context.applicationDomain = ApplicationDomain.currentDomain;
- //context.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
- loader.load(new URLRequest("m2.swf"), context);
- loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadcom);
- function loadcom(the:Event):void
- {
- var runtimeClassRef:Class = getClass("Tm");
- var greeter:MovieClip = new runtimeClassRef();
- addChild(greeter);
- greeter.x=100;
- greeter.y=200;
- function getClass(className:String):Class
- {
- return loader.contentLoaderInfo.applicationDomain.getDefinition(className) as Class;
- }
- }
我们是一家提供综合软件外包与弱电工程服务的技术公司。
业务涵盖定制软件、管理系统、网站、小程序、APP、系统集成、网络布线、监控安防、门禁、机房建设及长期技术维护。
公司地址:湖北省宜昌市伍家岗区东站二路6号三峡(宜昌)大数据产业园海洋馆二楼A203室