# Communication from class

**URL:** <https://forum.kirupa.com/t/communication-from-class/318977>\
**Category:** flash\
**Created:** [February 5, 2011, 3:35am UTC](https://forum.kirupa.com/t/communication-from-class/318977 "2011-02-05T03:35:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajtyler](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ajtyler](https://forum.kirupa.com/u/ajtyler)\
**Post date:** [February 5, 2011, 3:35am UTC](https://forum.kirupa.com/t/communication-from-class/318977/1 "2011-02-05T03:35:27Z")

</div>

How do I communicate from a class to the root?

I’ve got a class that does some different things including communicating with a webserver. When it does its thing, I want it to communicate that back to the main part of the program.

I’m thinking that an eventdispatcher could do it, but I haven’t been able to get it working right.

When all is said and done in my class, I tried including:  
dispatchEvent(new Event(“done”));

and then in the root of the program, I’ve got an event listener that I invoked like so:

```
        callClass.addEventListener("done", ________ );

```

However, it seems that it never gets the event dispatched.

What am I missing?
