# Xml loader class instance

**URL:** <https://forum.kirupa.com/t/xml-loader-class-instance/325274>\
**Category:** Uncategorized\
**Created:** [October 6, 2011, 12:02pm UTC](https://forum.kirupa.com/t/xml-loader-class-instance/325274 "2011-10-06T12:02:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyriads](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tyriads](https://forum.kirupa.com/u/tyriads)\
**Post date:** [October 6, 2011, 12:02pm UTC](https://forum.kirupa.com/t/xml-loader-class-instance/325274/1 "2011-10-06T12:02:00Z")

</div>

Hello,  
I have a small issue with instantiation of an xml loader class.  
I’m using a standard way of loading external data and assigning it to “myXML” variable.  
My class uses event.COMPLETE for loader to make sure that data is fully loaded.

Everything works fine until I make an instance of this variable in to my Main() class.  
The trace of “myXML” gives me null.  
It’s like it didn’t assign data on time.  
Since the onComplete event handler should take care of any delays  
it is hard for me to figure this out.
