title: Trace Function Not Returning XmlList.length in As3
body: <p>I'm looking to populate an array with bitmapdata based on some xml I load.  The problem I'm having is I can't seem to get the length of my XMLList...</p>
  
  <pre><code>var path:String = "http://mydomain.com/";
  
  var bDataArray:Array = new Array();
  
  var xmlLoader:URLLoader = new URLLoader(new URLRequest(path + "includes/categoryOutput.php"));
  xmlLoader.addEventListener(Event.COMPLETE, addXML);
  
  function addXML(e:Event):void{
      var list:XML = new XML(e.target.data);
      var urlList:XMLList = list.image;
      trace(urlList.length); // &lt;-- should trace list length but traces nothing
      for each(var img:XML in urlList){
          var loader:Loader = new Loader();
          loader.load(new URLRequest(img));
          loader.contentLoaderInfo.addEventListener(Event.COMPLETE, addBData);
  
      }
  
  }
  function addBData(e:Event):void
  {
      bDataArray.push(e.target.content.bitmapData);
  }
  </code></pre>
  
  <p>The xml is fine, I can even trace the list <code>trace(list);</code> and come back with my data.  I just need to get that list length so that adding my bitmaps can start when my array is fully populated.</p>
  
  <p>Thanks in advance for any input.
  -Jascha</p>