AS3加载AS2的swf文件报错
今天做一个demo,要用as加载一个swf,报错“如果AVM1?内容(AS1?或?AS2)已加载到?AVM2?(AS3)?内容中,则不可将其移动到?displayList 的其他部分” 以下是在网上找到的解决方案 问题描述:我们都知道flash player有两个虚拟机AVM1和AVM2。前者是flash player9以下的版本运行时所需要的,它用来解析as1和as2。后者是专门为as3开发的,用来解析as3。 package { ?import?flash.display.*; ?import?flash.display.Sprite; ?import?flash.events.Event; ?import?flash.net.URLRequest; ?public?class?Test?extends?Sprite ?{ ??var?pictLdr:Loader; ??var?pictURL:String?=?"test.swf" ??var?pictURLReq:URLRequest; ?? ??public?function?Test() ?? ??{ ???pictLdr?=?new?Loader(); ???pictURLReq??=?new?URLRequest(pictURL) ???pictLdr.load(pictURLReq); ???pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE,?imgLoaded);? ??} ?? ??function?imgLoaded(event:Event):void ??{ ???this.addChild(pictLdr);? ??} ?} } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- ruby-on-rails – ENOTFOUND:getaddrinfo ENOTFOUND api.h
- ruby-on-rails-3 – 如何在routes.rb中传递查询字符串上的重
- 详解vue添加删除元素的方法
- c# – 通过应用程序设置设置MachineKey
- React Native:使用ScrollView时的垂直居中
- iphone – 使用Titanium和XCode推动Notifcation困境
- c# – 无法删除集合:[NHibernate.Exceptions.GenericADOEx
- c# – 更改Xamarin Forms XAML按钮的isVisible属性
- swift – 为什么Realm使用RealmOptional而不是Int?可选属性
- Oracle字符集的查看查询和Oracle字符集的设置修改