# Event Phase problem

**URL:** <https://forum.kirupa.com/t/event-phase-problem/280557>\
**Category:** flash\
**Created:** [January 28, 2009, 9:17pm UTC](https://forum.kirupa.com/t/event-phase-problem/280557 "2009-01-28T21:17:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bencam](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@bencam](https://forum.kirupa.com/u/bencam)\
**Post date:** [January 28, 2009, 9:17pm UTC](https://forum.kirupa.com/t/event-phase-problem/280557/1 "2009-01-28T21:17:53Z")

</div>

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]
