I have no idea what is wrong here, but apparently my completeHandler is being fired instantly, and nothing is being preloaded at all.
Adding the SWFLoader to the end of each SWF is causing the next SWF to not load until that last frame of the SWF before it, needless to say there is a noticeable delay in each SWF as it loads while playing.
Also my progressHandler that is supposed to advance the preloader movie clip is not doing anything at all.
I am once again confused...
Main.swf (code on frame 1)
import com.greensock.*;
import com.greensock.events.LoaderEvent;
import com.greensock.loading.*;
import com.greensock.loading.display.*;
import flash.events.Event;
var queue:LoaderMax = new LoaderMax({name:"mainLoader", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler});
queue.append( new SWFLoader("part1.swf", {name:"part1", estimatedBytes:5542000, container:this, autoPlay:true}) );
queue.load();
function progressHandler(event:LoaderEvent):void
{
progress_mc.progressBar_mc.scaleX = event.target.progress;
progress_mc.progress_txt.text = event.target.progress;
}
function completeHandler(event:LoaderEvent):void
{
trace("Completed....");
}
function errorHandler(event:LoaderEvent):void
{
trace("Error occured with " + event.target + ": " + event.text);
}
When ever I test the Main.swf, I immediately get "Completed..." in the output window, while only 0.01... of the progress is completed. My preloader Movie Clip frame only shows for a fraction of a second then the swf begins to play, and all the subsequent SWFs after that while they load. What am I missing here?
edit: removed requiredWithRoot:this.root.