Variable representing childnode length

Okay I’m trying to make a variable inside of an xml onLoad function. I want the variable to be a number representing the length of firstchild.childnodes. This doesn’t seem to be working. Check out my code.


//Start xml onLoad function
inXML.onLoad = function() {
	
  var len:Number = inXML.firstChild.childNodes.length;

  for (i=0;i<this.firstChild.childNodes.length;i++) {
	  
	//Populate arrays with xml data
	src.push("images/"+ this.firstChild.childNodes*.firstChild.firstChild);
    //titles.push(this.firstChild.childNodes*.firstChild.nextSibling.firstChild);
    //desc.push(this.firstChild.childNodes*.firstChild.nextSibling.nextSibling.firstChild);
	//link.push(this.firstChild.childNodes*.firstChild.nextSibling.nextSibling.nextSibling.firstChild);
	
    //Attach picture holders from library
    attachMovie("picx","p"+i, i);
	
	//Set attributes for each image
    with(eval("p"+i)){
	  holder.loadMovie("images/"+ this.firstChild.childNodes*.firstChild.firstChild);
      _x = (i/3)*450-150;
	}
	
  }
  
  eval("p"+(picnum-1))._alpha = 60;
  eval("p"+(picnum+1))._alpha = 60;

}


<?xml version='1.0' encoding='iso-8859-1'?>

<pics>

  <pic>
    <src>1.gif</src>
    <titles>Cold Coffee America</titles>
    <desc>Flash contact form for Cold Coffee America.</desc>
    <link>http://www.coldcoffeeamerica.com</link>
    <tech>
      <t>Flash 8</t>
    </tech>
  </pic>

  <pic>
    <src>2.gif</src>
    <titles>National Freelance Directory</titles>
    <desc>PHP/MySQL backend for National Freelance Directory.</desc>
    <link>http://www.worldslargestforum.com/freelance</link>
    <tech>
      <t>PHP</t>
      <t>MySQL</t>
      <t>CSS</t>
    </tech>
  </pic>
  
  <pic>
    <src>3.gif</src>
    <titles>National Freelance Directory</titles>
    <desc>PHP/MySQL backend for National Freelance Directory.</desc>
    <link>http://www.worldslargestforum.com/freelance</link>
    <tech>
      <t>PHP</t>
      <t>MySQL</t>
      <t>CSS</t>
    </tech>
  </pic>
  
  <pic>
    <src>4.gif</src>
    <titles>National Freelance Directory</titles>
    <desc>PHP/MySQL backend for National Freelance Directory.</desc>
    <link>http://www.worldslargestforum.com/freelance</link>
    <tech>
      <t>PHP</t>
      <t>MySQL</t>
      <t>CSS</t>
    </tech>
  </pic>
  
  <pic>
    <src>5.gif</src>
    <titles>National Freelance Directory</titles>
    <desc>PHP/MySQL backend for National Freelance Directory.</desc>
    <link>http://www.worldslargestforum.com/freelance</link>
    <tech>
      <t>PHP</t>
      <t>MySQL</t>
      <t>CSS</t>
    </tech>
  </pic>