Skip to main content
AttaBoy2
Inspiring
July 17, 2009
Answered

add event listener to multiple children at once

  • July 17, 2009
  • 1 reply
  • 778 views

Suppose I have a Movieclip and in that Movieclip I have several MovieClips I'm using as buttons.  I want all the buttons to do the same thing when I MouseOver.  Is there a way I can reference all children of a display container  so that I can have a statement like MouseChildren.addEventListener(MouseEvent.RollOver, rollOverHandler);  ?

This topic has been closed for replies.
Correct answer kglad

you can attach your mouse listener to the parent of your buttons.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
July 17, 2009

you can attach your mouse listener to the parent of your buttons.

AttaBoy2
AttaBoy2Author
Inspiring
July 17, 2009

O I C    ...cool thank you so much.

kglad
Community Expert
Community Expert
July 17, 2009

you're welcome.