Jump to content
Search Community

Urda

Members
  • Posts

    5
  • Joined

  • Last visited

Urda's Achievements

0

Reputation

  1. Yes, thank you. Now everything makes perfect sense. I know, saves some performance i guess. But since i dont know how many children a particular module will have in advance (runtime, most have more than one loader anyway), i always use a queue for uniformity/better Interface.
  2. I dont know -exactly- why, but calling an additional empty(false,false) before dispose seems to do the trick. Again, dispose true or false doesnt matter. ... in handleQueue2... LoaderMax(LoaderMax.getLoader("queue1")).empty(false, false); LoaderMax(LoaderMax.getLoader("queue1")).dispose(false); // or true? I checked FlashDevelops debug-stack and everything is as it should be: queue1 is dead, queue2 alive, only one loader1 left. Still alittle confused why it doesnt matter if i pass true or false... Anyway thanks a lot for LoaderMax.
  3. UPDATE, see post 2 Hello again, [ Praise LoaderMax here ] I have a question concerning Loadermax.dispose(false). Same LoaderItem in 2 queues. When i call queue1.dispose it doesnt matter if i pass true or false. The LoaderItem/content is deleted anyway. Why is this ? Code: // just some normal XML, nothing nested in XML, no LoaderMax-nodes inside. var loader1:XMLLoader = new XMLLoader("assets/xml/appConfig.xml", { name:"loader1" } ); var queue1:LoaderMax = new LoaderMax( { name:"queue1", onComplete:handleQueue1} ); var queue2:LoaderMax = new LoaderMax( { name:"queue2", onComplete:handleQueue2} ); queue1.append(loader1); // same Loader queue2.append(loader1); // same Loader queue1.load(); queue2.load(); private function handleQueue2(e:LoaderEvent):void { trace("There IS content before: " + LoaderMax(LoaderMax.getLoader("queue2")).content ); trace("calling queue1.dispose(false) now"); LoaderMax(LoaderMax.getLoader("queue1")).dispose(false); //null trace("NO content in Q2 after q1.dispose: " + LoaderMax(LoaderMax.getLoader("queue2")).content ); //error, loader1 rip trace("Same as: " + XMLLoader(LoaderMax.getLoader("loader1")).content ); } In other words: How do i destroy a queue, but still keep the children if they are referenced by another queue ? Im thinking about using LoaderMax as a kind of "RemoteResource-Manager" because it already offers so much of the functionality i need. The same Resource might be used in different Modules/Classes each having its own queue with exclusive and commonly used Resources. When i destroy a module, i also want its queue destroyed (but not the LoaderItems/Content). Is this possible ?
  4. Yes, thats perfect. Thanks. SkipFailed/skipPaused are nice features, so easy. Bulkloader had a clunky fork version ("complete with errors") for that IIRC Just out of interest (i dont really need to know): Is there any scenario when LaoderEvent.ERROR is fired and its not immediately followed by a LaoderEvent.FAIL ?
  5. Hi Jack, Best ever Loader around, good docs and classes are almost self-explanatory. Thanks a lot, works like a charm. Yet i have 2 questions: 1) If something goes wrong when loading a LoaderItem (not nested in a LoaderMax-queue): Which of the 2 Events is ALWAYS (last) fired ? LoderEvent.FAIL or LoaderEvent.ERROR ? I guess its FAIL, just want confirmation. 2) Is it safe to assume a Queue (LoaderMax) with at least one (or more) LoaderItems will ALWAYS fire a LoaderEvent.COMPLETE, no matter what, even if ALL its children fail to load anything? The idea is to browse through myQueue.getChildrenByStatus(LoaderStatus.SOMESTATUS) once the queue is completed and not to worry about fixing individual children-contents before that. Thx again.
×
×
  • Create New...