# Event Listener Wont Listen :)?

**URL:** <https://forum.kirupa.com/t/event-listener-wont-listen/311186>\
**Category:** flash\
**Created:** [June 29, 2010, 6:45pm UTC](https://forum.kirupa.com/t/event-listener-wont-listen/311186 "2010-06-29T18:45:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![as3ohh](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@as3ohh](https://forum.kirupa.com/u/as3ohh)\
**Post date:** [June 29, 2010, 6:45pm UTC](https://forum.kirupa.com/t/event-listener-wont-listen/311186/1 "2010-06-29T18:45:18Z")

</div>

Hey Gents, Im having the issue of functions firing too soon after each other and need to use listeners. But using what I thought was correct below is not working. The xmlData.addEventListener(Event.COMPLETE, initialize); should call the initialize function in this example, right?

```auto

function loadXML(e:Event):void
{
	var xmlPure:XML = new XML(e.target.data);
	     xmlData = parseXML(xmlPure);

	     xmlData.addEventListener(Event.COMPLETE, initialize);
}

```
