Has anyone found a reliable way to load multiple external SWFs? I’ve been banging away at the method below. When I use it to load an array with HTML files it works fine. When I use it for external SWF files they don’t end up in the right order in the array…
function startLoad():void {
for(var i:int=0; i <= 25; i++){
caseName = "case_" + _caseCounter + ".swf";
trace(caseName);
var mLoader:Loader = new Loader();
mLoader.load(new URLRequest("casefolder/" + caseName));
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler,
false, 0, true);
mLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
ioErrorHandler, false, 0, true);
_caseCounter++;
}
}
function onCompleteHandler(evt:Event):void {
casePanel[panelPusher] = evt.target.content;
panelPusher++;
}