# Dispatch event from class to movieclip

**URL:** https://forum.kirupa.com/t/dispatch-event-from-class-to-movieclip/224452
**Category:** flash
**Created:** [May 2, 2007, 3:14pm UTC](https://forum.kirupa.com/t/dispatch-event-from-class-to-movieclip/224452 "2007-05-02T15:14:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![deltajam](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@deltajam](https://forum.kirupa.com/u/deltajam)
#### Post date: [May 2, 2007, 3:14pm UTC](https://forum.kirupa.com/t/dispatch-event-from-class-to-movieclip/224452/1 "2007-05-02T15:14:52Z")

</div>

In frame 1 of my AS2 .swf:

```auto

import com.classes.ParseXML;
var xml:ParseXML = new ParseXML("xml/site.xml");
 
xml.addEventListener("Finished", this.init)
 
function init(){
// run init
}

```

After I run through a few functions in that class I would like to dispatch an event to the swf like I did in AS2:

```auto

//ParseXML class
 
//declaring variables and such
private static var evtDisDependancy = EventDispatcher.initialize(ParseXML.prototype);
 
//inside some function
this.dispatchEvent({type:"Finished"})

```

Now, apparently a lot has changed in AS3. Could someone please explain to me how I would dispatch this same type of event in AS3 … or if there is new logic that I need to learn?

Thank you!
