Jump to content


  • Posts

  • Joined

  • Last visited

jpeacock's Achievements


Newbie (1/14)



  1. So, I switched them to dispose() and it seems to work as expected. It also got rid of the Type error. Turns out I had a little too much going on to begin with and had another area that was dependent on the loading of each loaders assets, so when cancel failed it took down another area. I updated and between that and dispose() it works great now. Thanks for the reply on it btw!
  2. Hi, Just wondering what I may be doing incorrectly here. Lets say I start a loader and it has maxConnections set to 1, so it basically just works as a sequential loader (of images). What if, halfway through the loading, I want to basically stop that loader, clear it's contents and reinitialize it with new content? I thought I was doing it correctly by calling: myLoader.cancel() then to re-init, I just create it again: myLoader = new LoaderMax({all my params for this loader}) After I cancel, I also remove the images from the displayobject like so: while (_largeImageContainer.numChildren) _largeImageContainer.removeChildAt(0) If the loaders aren't complete, it doesn't kill the loaders in progress and I get a bunch of errors like so: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Function/() at Function/() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.greensock.loading.core::LoaderCore/_passThroughEvent() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.greensock.loading.core::LoaderCore/_completeHandler() Plus, when I start the new loader, some of the old images get pushed into the new displayobject. Perhaps I'm not using cancel() in the proper way? Should I be using empty() or remove() instead? And if so, how?
  3. Thanks for the info Jack. You'd almost think Adobe would have a reset functionality built-in perhaps. If you code on the timeline, you can just gotoAndPlay from frame 1 and effectively do the same thing if your code is on the timeline. Instead, if it's in a document class, guess there's no easy way. Anyway, thanks for the help and thanks for making some awesomely useful classes for us all!
  4. I can't seem to find an easy way to do this and just wondering if I missed something... I have a main swf that I'm loading multiple child swf's into, then depending on the section of the project you're in, I just addChild/removeChild with Loadermax's getContent. Before removing any of the child swf's, I'm manually calling a transitionOut() -> destroy() method in the one that's currently on stage to clean up the listeners, remove dynamically generated objects, etc. There are a bunch of clips on the timeline's of these child swf's that I'll need to reset to their original positions/alpha's/etc and I was wondering if there was a way to just reinstantiate the swf instead of having to keep track of all the properties that changed with these stage movieclips? The closest thing I can think of is to just preload all the swf's with loadermax, then separately just load them again when I need them, giving me the ability to unloadAndStop on the child swf before unloading, but it kinda defeats the purpose of loading them all up front, right? Ideally, the reason to load up front is to make for seamless transitions between swf's...