The code below doesn’t seem to work as expected, I’m not even seeing the trace statement, but I receive no errors. I’m extremely confused!
keyboardMC.button0MC.addEventListener(MouseEvent.CLICK, Button0);
function Button0(mouseEvent:MouseEvent):void {
trace('0');
}
I should also mention that any other code that I put into the function is not executed.
Can anyone see anything wrong with this?
Your code should be working if as Jason Sturges said it’s on top of the Display List. Basically check if something is overlayed on that movieclip, it won’t take events.
What shaumhusain meant was to do it like this:
Also check if the parent of that movieclip is mouseEnabled, otherwise it won’t work.