# Dispatching event on behalf of non display objects

**URL:** <https://forum.kirupa.com/t/dispatching-event-on-behalf-of-non-display-objects/296280>\
**Category:** Uncategorized\
**Created:** [September 12, 2009, 7:11am UTC](https://forum.kirupa.com/t/dispatching-event-on-behalf-of-non-display-objects/296280 "2009-09-12T07:11:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwopitz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jwopitz/32/1556_2.png) [@jwopitz](https://forum.kirupa.com/u/jwopitz)\
**Post date:** [September 12, 2009, 7:11am UTC](https://forum.kirupa.com/t/dispatching-event-on-behalf-of-non-display-objects/296280/1 "2009-09-12T07:11:44Z")

</div>

This happens to be a really difficult question to ask. And maybe the answer is terribly simple and I have simply overlooked it. Happens all the time. Anyway…

Say you have a non-visual class (one that does not reside on the display list). This custom class, thru composition, will have a property that is a visual class that DOES reside on the display list. This custom class will also implement IEventDispatcher. So how do I do this:

```auto

public class MyNonVizClass implements IEventDispatcher
{
private var vizProperty:IEventDispatcher;

public function MyNonVizClass ()
{
   //instead of this
   vizProperty = new EventDispatcher(this);
   //I want to do this
   vizProperty = new Sprite(this);
}
}

```

Basically I want to be able to dispatch the event from the custom class and have the event.target still reference the class rather than the IEventDispatcher property contained within.

I know this is possible somehow because I think Papervision3D implements something like this. Sadly I havne’t been able to find the code in their codebase. I have a work around called an EventDispatcherProxy but it lacks finesse.
