Re: [Flashcoders] [AS3] Timers behaving erratically
How many instances are getting recreated? If you are creating a Singleton, only one instance is getting created. That could be an issue. Either that or you are probably removing the EventListener. Correct me if I am wrong. Hope that helps. :) Nick On 2/24/07, badi malik <[EMAIL PROTECTED]> wrote: i've had this happen many times and even posted to the list about iti use the debugger that comes with the flash ide alot and only then can i see what's happening...if you look at the instances using the debugger you can see that the instances haven't cleared their values. what i've done in the past is make sure that i call removeMovieClip as well as call delete, and pray! :) hope this helps - Original Message From: Daniel Thompson <[EMAIL PROTECTED]> To: flashcoders@chattyfig.figleaf.com Sent: Friday, February 23, 2007 6:13:07 PM Subject: RE: [Flashcoders] [AS3] Timers behaving erratically > classes. The second time this class is instantiated, the > timers don't fire. Any reason why this is happening? Actually, nowhere in the application they aren't firing. Here's the code that disables the application: public static function disable(message:String):void { with (_instance) { var snapshot:Bitmap = takeSnapshot(); destroyForm(); _container.addChildAt(snapshot, 0); _container.addChildAt(drawCurtains(), 1); _container.stage.addEventListener(MouseEvent.CLICK, mouseClickHandler); showAlert(message); _container.stage.invalidate(); _enabled = false; } } private function destroyForm():void { _container.removeChild(_container.getChildByName("form")); _form = null; } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] [AS3] Timers behaving erratically
i've had this happen many times and even posted to the list about iti use the debugger that comes with the flash ide alot and only then can i see what's happening...if you look at the instances using the debugger you can see that the instances haven't cleared their values. what i've done in the past is make sure that i call removeMovieClip as well as call delete, and pray! :) hope this helps - Original Message From: Daniel Thompson <[EMAIL PROTECTED]> To: flashcoders@chattyfig.figleaf.com Sent: Friday, February 23, 2007 6:13:07 PM Subject: RE: [Flashcoders] [AS3] Timers behaving erratically > classes. The second time this class is instantiated, the > timers don't fire. Any reason why this is happening? Actually, nowhere in the application they aren't firing. Here's the code that disables the application: public static function disable(message:String):void { with (_instance) { var snapshot:Bitmap = takeSnapshot(); destroyForm(); _container.addChildAt(snapshot, 0); _container.addChildAt(drawCurtains(), 1); _container.stage.addEventListener(MouseEvent.CLICK, mouseClickHandler); showAlert(message); _container.stage.invalidate(); _enabled = false; } } private function destroyForm():void { _container.removeChild(_container.getChildByName("form")); _form = null; } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] [AS3] Timers behaving erratically
> classes. The second time this class is instantiated, the > timers don't fire. Any reason why this is happening? Actually, nowhere in the application they aren't firing. Here's the code that disables the application: public static function disable(message:String):void { with (_instance) { var snapshot:Bitmap = takeSnapshot(); destroyForm(); _container.addChildAt(snapshot, 0); _container.addChildAt(drawCurtains(), 1); _container.stage.addEventListener(MouseEvent.CLICK, mouseClickHandler); showAlert(message); _container.stage.invalidate(); _enabled = false; } } private function destroyForm():void { _container.removeChild(_container.getChildByName("form")); _form = null; } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] [AS3] Timers behaving erratically
> I recreate all classes. To be very clear, I recreate an instance... the classes are the same ;o) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com