Why are counter created new XML objects not working?

I’m sure this is simple and stupid of me. Why does this work…

textForContent = [“1.xml”,“2.xml”,“3.xml”,“4.xml”,“5.xml”,“6.xml”,“7.xml”]

counter = textForContent.length-1;

while (counter>=0){
xmlData = new XML();
xmlToLoad = textForContent[counter];
xmlData.load(xmlToLoad);

xmlData.onLoad = function(success)
{
    if(success)
    {    
        trace(xmlData)
    }
}
counter--;

}
stop();

**And this does not work? All I’ve done is try to create 7 new XML objects using the counter…

**textForContent = [“1.xml”,“2.xml”,“3.xml”,“4.xml”,“5.xml”,“6.xml”,“7.xml”]

counter = textForContent.length-1;

while (counter>=0){
xmlData[counter] = new XML();
xmlToLoad = textForContent[counter];
xmlData[counter].load(xmlToLoad);
xmlData[counter].onLoad = function(success)
{
if(success)
{
trace(xmlData[counter])
}
}
counter–;
}
stop();

Thanks