Thank you all for answers.
Method with array recording really works nicely :-)
BTW - while searching for this method I've found other useful listener tips too:

http://www.almogdesign.net/blog/actionscript-3-event-listeners-tips-tricks/

--- On Wed, 1/6/10, Taka Kojima <[email protected]> wrote:

> From: Taka Kojima <[email protected]>
> Subject: Re: [Flashcoders] detect and remove listeners
> To: "Flash Coders List" <[email protected]>
> Date: Wednesday, January 6, 2010, 9:02 PM
> Yeah, that is the best way... that
> way you can also properly make sure you
> handle removing all of them when you no longer need an
> object.
> 
> You can either create a helper class, with static methods
> or extend
> MovieClip or Sprite and have all of your classes extend
> from the new class.
> 
> Store everything in a multidimensional array and you're
> good to go, then you
> can create a removeAllListeners() method that saves a lot
> of time and
> headaches for garbage collection purposes.
> 
> This is how I handle event listeners for major application
> components and it
> has worked very well thus far.
> 
> - Taka
> 
> On Wed, Jan 6, 2010 at 3:35 AM, Karl DeSaulniers <[email protected]>wrote:
> 
> > Maybe create a class or function that applies and
> removes the listeners?
> >
> > Karl
> >
> >
> >
> > On Jan 6, 2010, at 5:21 AM, Henrik Andersson wrote:
> >
> >  ktt wrote:
> >>
> >>> Hello,
> >>>
> >>> What is the best method to iterate through
> MovieClip children, check if
> >>> they have listeners and if they have - remove
> them?
> >>>
> >>>  It is not possible to get a list of the
> listeners. This means that you
> >> can not remove them. You can however detect if
> there is any at all for a
> >> given event.
> >> _______________________________________________
> >> Flashcoders mailing list
> >> [email protected]
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> >
> > Karl DeSaulniers
> > Design Drumm
> > http://designdrumm.com
> >
> >
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 


      

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to