Custom XML Parser Class

Ok. So everything works inside the class. I can trace my final data thats been sorted into objects and arrays. But again … this is inside the class. My problem is accessing this array ‘outside’ the class.

so my .fla file:


import as.classes.ParseXML;
var xml:ParseXML = new ParseXML("xml/earthday.xml");
 
trace(xml.datax);

and a piece of my class file:


 private function onXMLLoaded(contentXML:XML):Void {
  // Parse through the XML.
  xmlArray = new Array();
  var node:Object = contentXML.firstChild.firstChild;
  while (node != null) {
   var newReturn:Array = xmlNodesToArray(node);
   xmlArray.push(newReturn);
   node = node.nextSibling;
  }
 
  trace(datax);
 
 }
 
 public function get datax() {
  return xmlArray;
 }

any ideas? I know this has to be simple … :frowning: