Jump to content


  • Posts

  • Joined

  • Last visited


1 Newbie
  1. I ended up using DataLoader and I got the ByteArray from the loader.content variable.
  2. I need this as well... Were there any updates on this issue, or perhaps ptc could share his code with me.. I want to Load the swf as bytes like the classical loader does. Thank you.
  3. WOOOOOW, I can't believe the problem was lying on the XML all along... This solved my problem, thank you so much...!!!!
  4. Hmm I changed that but still the same error. Here is a simplified version of my code : https://github.com/SudoPlz/testSoundLoadingLoadermax My plan is this: 1) I load an XML which contains 2xMP3Loaders inside (with autoload=true), 2) I want to prepend a url on Runtime before they get loaded, otherwise the mp3s are not to be found.
  5. Ok I found the recursivePrependURLs: property, and I ran my code again, xmlLoader.append(new XMLLoader(curTaleDirectory+"/"+XML_FILENAME, {name:"taleName", recursivePrependURLs:curTaleDirectory, autoDispose :true })); but now I get this error: [trace] ---- [trace] Error on MP3Loader 'aName' (assets/defaultTale/page_1/backsound.mp3): Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful. [trace] ---- [trace] ---- [trace] Error on MP3Loader 'anotherName' (assets/defaultTale/page_1/backsound.mp3): Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful. [trace] ---- Hmm weird.. Am I doing something wrong, or is this a bug?
  6. I currently have an XML with MP3Loader inside. <LoaderMax name="ft$1:page$1" autoLoad="true"> <MP3Loader name="aName" url="page_1/backsound.mp3" estimatedBytes="2050" autoPlay="false" /> <MP3Loader name="anotherName" url="page_1/backsound.mp3" estimatedBytes="2050" autoPlay="false" /> </LoaderMax> I want to have different prepended a url on each of the MP3Loaders, but using xmlLoader.prependURLs(aNewDirectoryPrepended,true); only prepends a Url in my XMLLoader and NOT on each Mp3Loader contained within the xml. I found that to be correct because of this: Please read the next post:
  7. That was the problem. I didn't know I have to activate anything.. Problem fixed, thank you
  8. I'm using this function to get the MP3Loaders from within the xml xmlLoader = new LoaderMax({name:"aName", autoDispose :true, onComplete:propsLoaded}); xmlLoader.append(new XMLLoader(loaderPath, {name:"anotherName" , autoDispose :true, estimatedBytes:841 })); xmlLoader.load(); private function propsLoaded(e:LoaderEvent):void { var curPageLoader:LoaderMax = xmlLoader.getLoader("loaderrr"); //get the pages LoaderMax stored within the xml //curPageLoader is NOT null, but it contains NO loaders inside - it should containt 2 MP3Loaders according to my xml } <?xml version="1.0" encoding="utf-8"?> <tale id="1"> <page id="1"> <taleText>Lorem ipsum bla bla bla.</taleText> <LoaderMax name="loaderrr"> <MP3Loader name="sth1" url="page_1/backsound.mp3" estimatedBytes="2050" autoPlay="false" /> <MP3Loader name="sth2" url="page_1/backsound.mp3" estimatedBytes="2050" autoPlay="false" /> </LoaderMax> </page> </tale> but the LoaderMax object that is returned to me has NO loaders inside. Its empty.. Why is that?
  9. I guess you were right, it was a problem with my xml after all.. Specifically, I had a ":" instead of a "="in this line. estimatedBytes:"2050" That caused the problem. Thank you
  10. xmlLoader = new LoaderMax({name:"aName", autoDispose :true, onComplete:propsLoaded}); xmlLoader.append(new XMLLoader(curTaleDirectory+ "/" +Constants.PROPS_XML_FILENAME, {name:"anotherName"+_taleId.toString() , autoDispose :true, estimatedBytes:841 })); xmlLoader.load(); private function propsLoaded(e:LoaderEvent):void { var objects:Array = e.currentTarget.content; var taleProps:XML = objects[0]; // This ONLY works on mobile devices..! //TODO: Why doesnt it recognise the WHOLE file? trace(taleProps); // prints this: <?xml version="1.0" encoding="utf-8"?> } <?xml version="1.0" encoding="utf-8"?> <tale id="1"> <page id="1"> <taleText> Lorem ipsum bla bla </taleText> <LoaderMax name="ft$1:page$1"> <MP3Loader name="ft$1:page$1:mc$1$always" url="page_1/backsound.mp3" estimatedBytes:"2050" autoPlay="false" /> <MP3Loader name="ft$1:page$1:mc$1$onClick" url="page_1/backsound.mp3" estimatedBytes:"2050" autoPlay="false" /> </LoaderMax> </page> <page id="2"> </page> <page id="3"> </page> <page id="4"> </page> <page id="5"> </page> <name>aName</name> <purchased>true</purchased> <pageCnt>20</pageCnt> <url></url> </tale> I'm using the code above to load the above xml file.. Instead of getting the whole file loaded, I only get the first line.. Why is that? Thank you.!
  11. I'll check this out and post back in Monday.. Thanks for helping
  12. Ok, I see. I thought the same as well, but I didn't know which value to look for. The data property of the event is null , and the text property is empty.
  13. Yes you are correct, no LoaderEvent.ERROR event dispatched for the disrupted internet connection (after the download had started - but not finished). I specifically added each and every LoaderEvent, and then disconnected my device from the Internet to see what events will be dispatched. The only events that dispatched when i disrupted the connection where, http_status, and complete. No error event.
  14. I'm using Loadermax to load a remote binary file (zip). queue.append( new BinaryDataLoader(e.url,{/*name:"test_zip" , */ format:"binary", estimatedBytes:4400000}) ); queue.addEventListener(LoaderEvent.COMPLETE, onDownloadComplete); queue.addEventListener( LoaderEvent.PROGRESS, onDownloadProgress); queue.load(); I when its complete, i got my .COMPLETE event. but what about when the internet connection goes down? I got no handler for that case.. I noticed i can use HTTP_STATUS, but it fires before complete as well during an error. How can I distinguish those 2 case senarios... Thank you.
  15. Thank you very much for your great helpful and kind response.. This was the problem.. (Strangely I've been using auto-dispose :true all this time with no problems untill now. I mistakenly thought what it did was disposing all the queues and the loaded items AFTER the handler had run. I said it before and I'll say it again.. Your forums, your replies, and your code are GOLDEN each and every time. Thank you very much.