Skip to main content
October 2, 2009
Question

addchild eventlisteners

  • October 2, 2009
  • 1 reply
  • 319 views

Hello, I have declared an object and used addChild to place it on the display list.

I add an event listener to it.

Now, I use removeChild to remove it from the display list.

I plan on using addChild again at a later time to add this same object back to the display list.

My question is should I remove the event listener now or just leave it in place ?

Thanks for clarifiying this.

This topic has been closed for replies.

1 reply

Inspiring
October 2, 2009

Event listeners ( if not week ) prevent object from gargabe colleting. If you not remove event listener , object can rise an event. More clearly is to remove the listener and attach it again when the object is added t stage.