I want to load multiple swf/s into an fla file using AS3 and then publish that file to .exeand have the swf’s play in succession. I am using the following code to load one swf, but wasn’t sure how to load multiples where they play one after another. Here is what I have so far.
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
function startLoad()
{ var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("SlideShow_P1.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);
}
function onCompleteHandler(loadEvent:Event)
{
addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; trace(percent);
}
startLoad();