Snippets (AS3): MouseEvent targets nested child objects

Annoying. If you have objects with child objects and put addEventListener(MouseEvent.CLICK, mouseClickEvent); on it,

function mouseClickEvent(e:MouseEvent):void

will trace the child objects instead of the parent. I’m not exactly sure why that happens, but putting MovieClip.mouseEnabled = false; on every child object helps (which was OK in my case).

Found here: