# Still struggling with event dispatching

**URL:** <https://forum.kirupa.com/t/still-struggling-with-event-dispatching/311375>\
**Category:** Uncategorized\
**Created:** [July 5, 2010, 6:37am UTC](https://forum.kirupa.com/t/still-struggling-with-event-dispatching/311375 "2010-07-05T06:37:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tempo](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@tempo](https://forum.kirupa.com/u/tempo)\
**Post date:** [July 5, 2010, 6:37am UTC](https://forum.kirupa.com/t/still-struggling-with-event-dispatching/311375/1 "2010-07-05T06:37:52Z")

</div>

Can anyone please explain me why the dispatched event is not captured in this code?

The idea here was to notify all instances of a class when you click on one of them.

```auto

package sample{

    import flash.events.EventDispatcher;
    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    import flash.events.Event;

    public class labels extends MovieClip {

        var dispatcher:EventDispatcher = new EventDispatcher();

        public function labels() {
            this.buttonMode = true;
            this.addEventListener(MouseEvent.CLICK, butClick);
            this.addEventListener("bla-bla", capture);
        }

        public function butClick(e:MouseEvent) {
            dispatcher.dispatchEvent(new Event("bla-bla"));
            trace("clicked: " + e.currentTarget);
        }

        function capture(e:Event) {
            trace(e.currentTarget + ": one of us have been clicked!");
        }

    }

}

```

Thanks!
