标签:
var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); var request:URLRequest=new URLRequest("~规格.swf"); loader.load(request); addChild(loader); function initHandler(event:Event):void { //var loader:Loader=Loader(event.target.loader); var info:LoaderInfo=LoaderInfo(loader.contentLoaderInfo); trace("initHandler: loaderURL=" + info.loaderURL + " url=" + info.url) trace(info.height,info.width); } function completeHandler(event:Event):void{ event.target.content.width=1600 trace(loader.contentLoaderInfo.width,event.target.content.width) //trace("宽",info.width,"高",info.height) } function ioErrorHandler(event:IOErrorEvent):void { trace("ioErrorHandler: " + event); }
[ActionScript 3.0] as3.0加载as2.0的swf时获取as2.0的实际舞台尺寸
标签:
原文地址:http://www.cnblogs.com/frost-yen/p/4872911.html