# \[Flash cs4\] EventDispatcher class

**URL:** <https://forum.kirupa.com/t/flash-cs4-eventdispatcher-class/290853>\
**Category:** flash\
**Created:** [June 21, 2009, 3:00am UTC](https://forum.kirupa.com/t/flash-cs4-eventdispatcher-class/290853 "2009-06-21T03:00:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saeros3](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Saeros3](https://forum.kirupa.com/u/Saeros3)\
**Post date:** [June 21, 2009, 3:00am UTC](https://forum.kirupa.com/t/flash-cs4-eventdispatcher-class/290853/1 "2009-06-21T03:00:51Z")

</div>

ok, so i have a class called “RandomErrorClass” that extends Error:

```auto
public class RandomErrorClass extends Error {
     public function RandomErrorClass() {
          super("random error...");
     }
}

```

which i thow as an exception in a method inside another class:

```auto
public function randMethod(msg:String):void {
    if (msg.indexOf(" ") == 0) {
         throw new RandomErrorClass();
    }
}

```

my understanding is that the second class, the one that throws the error, will have to extend the EventDispatcher class. is that right? but it already has to extend the MovieClip class. my questions: Does the movieClip class already inherit from the EventDispatcher class? if so, i won’t have to implement the IEventDispatcher interface, will I?  
:pac::crying: :stare:
