1. 程式人生 > >as3.0加載swf並控制

as3.0加載swf並控制

ota url request lis adf req clas dde swf

var myload:Loader=new Loader();
var url:URLRequest=new URLRequest("1.swf");
myload.load(url);
emptyMc.addChild(myload);

myload.contentLoaderInfo.addEventListener(Event.COMPLETE,loadfun);
function loadfun(event:Event) {
	myload.contentLoaderInfo.removeEventListener(Event.COMPLETE,loadfun);
	var loadmc=myload.content;
	loadmc.gotoAndStop(2);
	trace(loadmc.totalFrames);
}

  

as3.0加載swf並控制