# AS3 dispacth Event STILL

**URL:** <https://forum.kirupa.com/t/as3-dispacth-event-still/275909>\
**Category:** Uncategorized\
**Created:** [November 19, 2008, 11:00pm UTC](https://forum.kirupa.com/t/as3-dispacth-event-still/275909 "2008-11-19T23:00:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brisa](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Brisa](https://forum.kirupa.com/u/Brisa)\
**Post date:** [November 19, 2008, 11:00pm UTC](https://forum.kirupa.com/t/as3-dispacth-event-still/275909/1 "2008-11-19T23:00:09Z")

</div>

Why can’t I do this?

```auto

package classes{
    import flash.display.DisplayObject;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.events.*;

    public class MyClass extends MovieClip {

        public static const MY_BOATS:String = "MY_BOATS";

        public function MyClass() {

            myButton.addEventListener(MouseEvent.CLICK,boatClick);

        }

        private function boatClick(event:MouseEvent):void {
            dispatchEvent(new Event(MyClass.MY_BOATS, false, false));

        }
    }
}

```

Of course I’m importing MyClass later on and my eventListener looks like this:

```auto

myMC.addEventListener(MyClass.MY_BOATS, doSomething);

```

this is driving me…  
thanks for any help…
