Recalling data from a pushed array

I must be missing something small, but it sure makes a difference. My array contains five states each with an abbreviation (abr, such as “NJ”, “NY”) and either enabled or disabled (hot, either “true” or “false”). When I do a trace within the function itself, it brings back an accurate array.length. But, after this function, I can’t recall the data at all! Its as if it only exists during the load function. Any ideas? Much thanks!!


StateArray = new Array();
XMLRetrieve = new XML();
XMLRetrieve.ignoreWhite = true;
XMLRetrieve.load(“states.xml”);
XMLRetrieve.onLoad = function() {
trace("child nodes: " + this.firstChild.childNodes.length);
for (var j = 0; j<this.firstChild.childNodes.length; j++) {
StateArray.push({abr:this.firstChild.childNodes[j].attributes.abr, hot:this.firstChild.childNodes[j].attributes.hot});
trace(StateArray.length);
}
};