开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜