# Recalling data from a pushed array

**URL:** https://forum.kirupa.com/t/recalling-data-from-a-pushed-array/227511
**Category:** flash
**Created:** [May 30, 2007, 10:50pm UTC](https://forum.kirupa.com/t/recalling-data-from-a-pushed-array/227511 "2007-05-30T22:50:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![daveyfromjersey](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@daveyfromjersey](https://forum.kirupa.com/u/daveyfromjersey)
#### Post date: [May 30, 2007, 10:50pm UTC](https://forum.kirupa.com/t/recalling-data-from-a-pushed-array/227511/1 "2007-05-30T22:50:05Z")

</div>

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);  
}  
};
