Dynamic variable from xml for an object

I have been racking my brain with this one.
Check it out Please!!!
Once the xml data is completely loaded it triggers loadImages(). Load images loads the first image in the xml. Once complete imageLaoded1 is trigger. If all the images are loaded than it runs addColours(). If not than it stores the a variable name of the soon to be create image object and creates an object with that name. Process is repeated until all images are loaded. The problem is that only the last image loaded is being added to the stage?!?!??!
Any Ideas

function addColour():void
{
addChild(img[black]);
img[blue].x = 30;
addChild(img[blue]);
img[red].x = 60;
addChild(img[red]);
}

function imageLoaded1(event:Event):void
{

    if (categories_xml.colours.img.length() - 1 <= i  )
    {
    addColour();
    }
    else
    {
        imgString = categories_xml.colours.img*.@attachImage.toString();
        img.push(this[imgString]) = holder;
        i += 1; 
        loadImages();
    }
    
}

var imgString:String
var img:Object = [];
var holder:Loader;
var i:Number = 0;

function loadImages():void
{
holder = new Loader();
holder.load(new URLRequest(categories_xml.colours.img*.source));
holder.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded1);

}

this is an example of how the xml looks:

<img attachImage=“black” >
<source>categories/img/colours/black.jpeg</source>
<name>Black</name>
</img>