How to prevent a parent movieclip event from being fired
I have an AS3 movieclip with a button. Both the movieclip and bu开发者_Python百科tton needs a click event but when I click the button it also fires the parent movieclip's event handler.
Is there a way to stop this behaviour?
Add an event listener to the child button and use stopImmediatePropagation() to prevent the event from bubbling any further up the display list.
精彩评论