AS3.0能否加载多个SWF文件
varldr:Loader=newLoader();//ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROG...
var ldr:Loader = new Loader();//ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onLoaderProgress);
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderComplete);
var req:URLRequest = new URLRequest("title.swf");
//var req1:URLRequest = new URLRequest("title2.swf");
ldr.load(req);
this.addChild(ldr);
/*function onLoaderProgress(e:ProgressEvent):void { var _percentage:int = e.bytesLoaded / e.bytesTotal * 100;
trace("入百分比:"+_percentage);
}*/
function onLoaderComplete(e:Event):void {
var _contentMC:MovieClip = ldr.content as MovieClip;
_contentMC.gotoAndPlay(2);
}
我只会加载一个的,title2.swf不知道怎么加载,想两个swf文件按顺序播放,不希望一个FLA文件太大,否则不好修改,不希望通过按钮可以吗? 展开
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderComplete);
var req:URLRequest = new URLRequest("title.swf");
//var req1:URLRequest = new URLRequest("title2.swf");
ldr.load(req);
this.addChild(ldr);
/*function onLoaderProgress(e:ProgressEvent):void { var _percentage:int = e.bytesLoaded / e.bytesTotal * 100;
trace("入百分比:"+_percentage);
}*/
function onLoaderComplete(e:Event):void {
var _contentMC:MovieClip = ldr.content as MovieClip;
_contentMC.gotoAndPlay(2);
}
我只会加载一个的,title2.swf不知道怎么加载,想两个swf文件按顺序播放,不希望一个FLA文件太大,否则不好修改,不希望通过按钮可以吗? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询