Simple as2 load into an as3 movie

I'm loading an as2 game into a as3 movie. No communication other than to play the game in the movie. I'm using a loader class.

function startLoad() { var mRequest:URLRequest = new URLRequest(correctURL.toString()); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(">http://www.boomerang-tv.ro/sites/www.boomerang-tv.ro/files/flash/data/Scooby_Doo_-_Downhill_Dash/scoobydownhill-BM.swf"); }

function onCompleteHandler(loadEvent:Event) { addChild(loadEvent.currentTarget.content); }

When it finishes loading I get this error.

ArgumentError: Error #2180: It is illegal to move AVM1 content (AS1 or AS2) to a different part of the displayList when it has been loaded into AVM2 (AS3) content. at flash.display::DisplayObjectContainer/addChild() at main_fla::MainTimeline/onCompleteHandler()

Any ideas. I'm sure its simple it's just late :(

Thanks


尝试添加加载器而不是加载器内容。

function onCompleteHandler(loadEvent:Event) 
{ 
   addChild(loadEvent.currentTarget.loader); 
}
链接地址: http://www.djcxy.com/p/17768.html

上一篇: Flash CS4,JSFL:更改exportPNG的设置

下一篇: 简单的as2加载到as3电影中