Hi Everyone,
I have just discovered the phases of an event.
I have an movieclip (named “up_state”) with a filter applied to it which is nested in a movieclip (named “buttonInstance_1”) which I use as a button.
On a mouse event, it sees “up_state” as the target. I want to target “buttonInstance_1”.
I have read about CAPTURING_PHASE, AT_TARGET, BUBBLING_PHASE, and stopPropagation() but I haven’t figured out how to stop it when it has found “buttonInstance_1”.
Here is a sample of the simple code I’m using, which works unless there is another movieclip nested inside:
[COLOR=Blue]addEventListener(MouseEvent.MOUSE_DOWN, mouseDown_Handler);
function mouseDown_Handler(event:MouseEvent):void{
var selectedButton = event.target.name;
switch( selectedButton ){
case "buttonInstance_1":
buttonInstance_1**.**gotoAndStop("down");
break;[/COLOR]
[COLOR=Blue] }
}[/COLOR]