Share Posted February 26, 2015 I'm trying to load two files. On my devlopment machine, both load fine using this code. Going to production, only one loads at a time. Each loads fine when there is only one in the queue. What am i missing? private function initForDevelopment ():void { //====== DEVELOPMENT contentURL = "9508i8152.xml" loadExternalFilesDevelopment (contentURL); } private function initForPRODUCTION ():void { //====== PRODUCTION addCallbacks(); contentURL = "9508i8152.xml" loadExternalFilesPRODUCTION (contentURL); } private function loadExternalFilesDevelopment (contentURL):void { var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandlerDevelopment, onError:errorHandler}); queue.append( new XMLLoader(contentURL, {name:"myXML"}) ); queue.append( new DataLoader("Configuration.csv", {name:"myText", requireWithRoot:this.root, estimatedBytes:900})); queue.load(); } private function loadExternalFilesPRODUCTION (contentURL):void { var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandlerPRODUCTION, onError:errorHandler}); //append several loaders queue.append( new XMLLoader(contentURL, {name:"myXML"}) ); queue.append( new DataLoader("Configuration.csv", {name:"myText", requireWithRoot:this.root, estimatedBytes:900})); //start loading queue.load(); } private function completeHandlerDevelopment(event:LoaderEvent):void { var text:String = LoaderMax.getContent("myText"); var xml:XML = LoaderMax.getContent("myXML"); content = new Content (grid, text, xml); content.personSpecs.ext = 136; content.parseConfig (text); } private function completeHandlerPRODUCTION(event:LoaderEvent):void { var text:String = LoaderMax.getContent("myText"); // trace("complete. myText: " + text); var xml:XML = LoaderMax.getContent("myXML"); pScreen.error.text = pScreen.error.text + "CompHandler: myText "+text+" myXML = "+xm } Link to comment Share on other sites More sharing options...
Author Share Posted February 26, 2015 I'm embarrased and tired. I was tracing the files to a text field on the screen. But the files were longer than the field. I text.substr out the files and see that both are there. So the loader is working fine. It's just me again Link to comment Share on other sites More sharing options...
Share Posted February 26, 2015 No worries. It happens to all of us. Glad you got it figured out. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now