# How to dispatch an Event while still Extending a Sprite?

**URL:** https://forum.kirupa.com/t/how-to-dispatch-an-event-while-still-extending-a-sprite/234031
**Category:** flash
**Created:** [July 29, 2007, 10:33pm UTC](https://forum.kirupa.com/t/how-to-dispatch-an-event-while-still-extending-a-sprite/234031 "2007-07-29T22:33:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![joshchernoff](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshchernoff/32/1852_2.png) [@joshchernoff](https://forum.kirupa.com/u/joshchernoff)
#### Post date: [July 29, 2007, 10:33pm UTC](https://forum.kirupa.com/t/how-to-dispatch-an-event-while-still-extending-a-sprite/234031/1 "2007-07-29T22:33:10Z")

</div>

I have a class that as of now extends EventDispatch so that I can add a few event listeners to an instance of that class. Any how here’s a link to that class. [kirupaForum](http://www.kirupa.com/forum/showthread.php?t=268979)  
The class is my full screen background jpg class.

I would like to extend Sprite so that I don’t have to pass it a reference to the stage and also so that I can treat an instance of that class like a sprite but,  
then I would need a way still to and a addListener to the instance of that class as well. So how is this done?

::edit::  
From what I can tell now I need to implement IEventDispatcher which is an interface. But I don’t know much about the use of an interface nor do I have experience implementing an interface

> [@"AS3 doc's says"](#):
>
> In general, the easiest way for a user-defined class to gain event dispatching capabilities is to extend EventDispatcher. If this is impossible (that is, if the class is already extending another class), you can instead implement the IEventDispatcher interface, create an EventDispatcher member, and write simple hooks to route calls into the aggregated EventDispatcher.

what is an EventDispatcher member and how do I write simple hooks to route calls into the aggregated EventDispatcher.???
