我见到很多人都是直接就new fla里面的东西,但是我至今没有到那是怎么做到的,有网友了解,烦请留言告知。

我现在找到的方法是

在类里定义一个

private var baLoader:Loader;

private var sendB:Object; 然后在类的构造函数中加入代码 baLoader
=new Loader(); baLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); baLoader.load(new URLRequest("http://192.168.1.101:844/enterGame.swf")); 在loadComplete里处理加载完后的处理 protected function loadComplete(event:Event):void { //创建类的实例化 var v:Object=baLoader.contentLoaderInfo.applicationDomain.getDefinition("tipsUI") as Class; sendB==baLoader.contentLoaderInfo.applicationDomain.getDefinition("send") as Class;

trace(v);
//后续加载完后才能进行的界面展示等 new sendContent(this); }

 

 

相关文章:

  • 2021-08-29
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案