Load SWF into MovieClip in AS3
Loading external swf file is essay in AS2.0 but it is not so essay in AS3.0, to load swf file need to define loader class and URL path pointing to the external swf.
var swfLoader:Loader = new Loader();
holderMC.addChild(swfLoader);
var bgURL:URLRequest = new URLRequest(“loadSWF_File.swf”);
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete);
swfLoader.load(bgURL);
function loadProdComplete(e:Event):void {
trace(“file loaded”);
}
leave a comment