Jump to content
Search Community

imoverhere

Members
  • Posts

    11
  • Joined

  • Last visited

imoverhere's Achievements

0

Reputation

  1. Hello, First, let me thank you for your product! It has been great to use. I need to change the way I am loading files. Going forward there will be an undetermined number of files to load. Currently, I have one XML and three Text files which are titled Configuration.csv. Here’s my code which loads all the files correctly. But going forward I will have an unknown number of Configuration files. It could be from 1 to a few hundred. But most likely, 1-15 or so. I thinking of creating a loop which would iterate through the variations of the potential “ConfigurationX” names until I got a failure. Then my error handler would somehow get me out of the loop. But, the more I thought of it, the more confused I got. How would you structure the loader? Is my scenario accounted for in your code? Thanks in advance for your help! Kevin private function completeHandlerDevelopment(event:LoaderEvent):void { var xml:XML = LoaderMax.getContent("myXML"); var text:String = LoaderMax.getContent("myText"); var text1:String = LoaderMax.getContent("myText1"); var text2:String = LoaderMax.getContent("myText2"); var text3:String = LoaderMax.getContent("myText3"); configsArray.push(text, text1, text2, text3); postHandlerInit (xml, configsArray); } private function completeHandlerDevelopment(event:LoaderEvent):void { var xml:XML = LoaderMax.getContent("myXML"); var text:String = LoaderMax.getContent("myText"); var text1:String = LoaderMax.getContent("myText1"); var text2:String = LoaderMax.getContent("myText2"); var text3:String = LoaderMax.getContent("myText3"); configsArray.push(text, text1, text2, text3); postHandlerInit (xml, configsArray); } private function errorHandler(event:LoaderEvent):void { //nothing here }
  2. 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
  3. 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 }
  4. The 2032 error was my fault. In all my testing, I removed the Configuration.csv file from the folder. I replaced the file and the 2032 error stopped. But I'm still failing to get both files in my queue to download. I'll start a new thread with deatils. Let's end this thread.
  5. Two follow ups. 1. If the two files I need to load are in the same directory, can i just use the file name like in my example above for "Configuration.csv" and 9508i8152.xml? I did that in my example above. Will that work? 2. I'm getting Error 2032 when set a text field to the error. This code "NEW At Error " + event.target + ": " + event.text; produces this error in my swf: NEW At Error DataLoader 'myText' (Configuration.csv): DataLoader 'myText' (Configuration.csv) > Error #2032 Any thougts on the cause? I searched the forum here for Error 2032. I did add new XML tags to my xml file. But this file in the error is .csv. I'd really appreciate your insight. 20 hour day. Off to bed.
  6. This fla file gets values from a text field on the web page. Using the loadermax structure, what should i do when get that? private function addCallbacks (): void { if(ExternalInterface.available) { //registers the js function called sendToFlash so when it's invoked ExternalInterface.addCallback("sendToFlash", sendToFlashHandler); ExternalInterface.addCallback("getExt", getExtHandler); } } private function sendToFlashHandler(value:String) : void { // this is when we get the ext on windlow load. content.personSpecs.ext = value; urlConfigLoader.reloadConfig();
  7. Hello, I just went live with this loadermax and the client was expecting it today. When I load the swf on my site, the swf crashes. I can't get any feedback on where the crash is since it's on the server. In development this works fine. I have two files which need to be loaded and which are in the the same directory as the swf. There are two files: 9508i8152.xml and Configuration.csv (around 500K large). This worked with my web site before the addition of GreenSock. So i know the html and callback code is correct. Here's my code. Please help private function initForDevelopment ():void { contentURL = "9508i8152.xml" loadExternalFilesDevelopment (contentURL); } private function initForProduction ():void { addCallbacks(); contentURL = "9508i8152.xml" loadExternalFilesProduction (contentURL); } private function loadExternalFilesDevelopment (contentURL):void { //create a DataLoader for loading text (the default format) //create a LoaderMax named "mainQueue" and set up onProgress, onComplete and onError listeners var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandlerDevelopment, 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 loadExternalFilesProduction (contentURL):void { //create a DataLoader for loading text (the default format) //create a LoaderMax named "mainQueue" and set up onProgress, onComplete and onError listeners 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"); // trace("complete. myText: " + text); var xml:XML = LoaderMax.getContent("myXML"); content = new Content (grid, text, xml); 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"); content = new Content (grid, text, xml); content.parseConfig (text); }
  8. Hello and thanks again for your product here! I have a swf in a folder on my server for ever client. I'd like each of those swfs to load a file in a common folder one level up. For exmple: fakeRootName\Client100\this.swf fakeRootName\Client101\this.swf fakeRootName\CommonXML\targetXML.xml How can i direct Loadermax to reach targetXML.xml?
  9. Thanks! I was thinking the same thing of a small test first and see how we go. I appreaciate your help.
  10. Thanks for the quick response. I have one large swf which is around 50MB. In includes many around 50 movie clips and special classes. Not all of the content is needed by each user. I'm thinking a loader would be helpful because it would allow the loading of only the relevant movie clips based on some action scrip code. If i break this into a loader process then I'll end up with 8 swfs plus the 15 or so for individual content. Right now, each are in one swf so I can use all my code across all the classes. If I break this into a loader, I see i can use loader.getClass to get the classes. But I'm trying to imagine how i can get each class in every swf. Would the main loader be where all the code is managed? When the user clicks on something new one classes loads the content and plays the movie. The movie would dependant on all the other classes that provide the emulation of the device. The more I think about the more confused I am and afraid to try this your insght would be appreaciated. Have you seen such a compliated project done with your product? Can I have access to all the code across all loaded swfs?
  11. Hello! I'm impressed with what I read about LoaderMax. I'll need to purchase your business account to do what I'm planning. Can I create multiple swfs and load them via and xml file and test all this in FlashBuilder since I still have developlent to finish in the content? I will have around 40ish projects each with around 50 unique movie clips.
×
×
  • Create New...