Jump to content
Search Community

jhakooz

Members
  • Posts

    7
  • Joined

  • Last visited

jhakooz's Achievements

0

Reputation

  1. I never thanked you for your answer... Thanks! Solution In my scenario, I'm running a bunch of separate files each containing a series of tweens. Kind of like loading external swfs in the good ol days. When the user clicks the "load next animation" button, I simply call... TweenMax.killAll(); ... then load my next file via AJAX and I'm good to go!
  2. Hi, I'm using an MP3Loader, and want to keep it around after it loads to control media playback. When the time eventually comes to remove it, what is the best way? 1. _mp3Loader.unload() seems to work. 2. _mp3Loader.dispose() seems to work. Will either of these remove event listeners and unload content? Or does it take a combination of both? I just want to make sure that the MP3Loader will truly be ready for Garbage Collection... Thanks!
  3. Ok, adding a conditional before unloading the object helps. You can't unload an object that is null... duh right? For now, it seems I'm heading in the right direction. I'll post if I hit a hiccup... Thanks
  4. I'm feeling kind of dumb for asking, but... I'm building a multimedia player. For now I'm only concerned with the MP3Loader portion. Basically, I could have hundreds of MP3s which I only want to load on demand and one at a time. What is the best way to go about this? I thought about creating a single MP3Loader and simply re-use it. private var _mp3Loader:MP3Loader; public function playMP3(audiofilename:String):void{ stopPrevAudio(); _mp3Loader = new MP3Loader(audiofilename, {name:"mp3", autoPlay:true, estimatedBytes:9500, onComplete:completeHandler}); _mp3Loader.addEventListener(MP3Loader.PLAY_PROGRESS, playProgress); _mp3Loader.load(); } private function stopPrevAudio():void{ _mp3Loader.unload(); // No sound ever plays when I do this. And still needs to remove event listeners, etc... } private function completeHandler(event:LoaderEvent):void{ // } private function playProgress(event:LoaderEvent):void{ // } The "unload" seems to kill the object. And creating potentially hundreds of MP3Loader objects seems like bad practice. Can someone please point me in the right direction? I'll provide more code if needed, but wanted to keep it simple for now. Thanks in advance...!
  5. Yeah, I'm all set now. Thanks Jack... Unless you have a class that can convert AS2 programmers to AS3? Something like... var dude:AS3Dude = new AS3Dude("http://www.aol.com/couch/lazy.mofo", {timeScale:3} );
  6. Apparently the SWFs I was loading were AS2. I haven't seen one of those in a while... Works as advertised when the SWFLoader content is AS3!
  7. Hi, Honestly, I tried to figure out this seemingly easy question before posting! I would like my loaded SWF to stop once it's loaded. Basically, I need to call stop() on the SWFLoader as soon as possible. I think what I need to do is set autoPlay:false (which it is) and somehow convert SWFLoader content to a movieclip in my onComplete handler... then call stop(). From what I can tell I would need to use rawContent, but for the life of me I cannot convert SWFLoader to a MovieClip. So.... How can I reference my SWFLoader as a movieclip in onComplete, so that I can call stop()? Something like autoStop:true would kick butt, but a little too late for that suggestions, huh? Thanks! Joe
×
×
  • Create New...