I'm having a hard time getting loading progress to interate together.
In my LOADER swf, I have a SWFLoader that is loading my main movie.
Inside my main movie, I have a LoaderMax instance which loads a single XMLLoader (which subsequently creates a bunch of ImageLoaders).
Anyways...I've got it so that my main movie doesn't actually start until all loading is complete (which is good). But my LOADER swf first loads the main movie (and show's it's progress) then it starts the progress over back at 0 and shows the subloading of the LoaderMax/XMLLoader inside.
I want it all to work together as one big load...what am I missing?
Here is the code in my Loader file:
import com.greensock.loading.LoaderMax;
import com.greensock.loading.SWFLoader;
import com.greensock.events.LoaderEvent;
var loader:SWFLoader = new SWFLoader("MyMovie.swf",{name:"MyMovie",container:this,x:0,y:0,onComplete:onCompleteHandler,onProgress:onProgressHander,onError:onErrorHandler});
loader.load();
function onProgressHander(Event:LoaderEvent):void {
loading_txt.text = "Loading " + String(Math.ceil(Event.target.progress * 100)) + "%";
}
function onCompleteHandler(Event:LoaderEvent):void {
//addChild(loader.getContent("MyMovie"));
}
function onErrorHandler(Event:LoaderEvent):void {
loading_txt.text = "Error Loading Data.";
}
And here is the loading code in my main movie:
LoaderMax.activate([imageLoader]);
var xmlLoader:XMLLoader = new XMLLoader("xml/images.xml",name:"xmlLoader",onProgress:progressHandler,onComplete:completeHandler,onError:errorHandler});
var q:LoaderMax = new LoaderMax({name:"mainLoader",autoLoad:true,requireWithRoot:this.root});
q.append(xmlLoader);