# Loading different images

**URL:** <https://forum.kirupa.com/t/loading-different-images/308967>\
**Category:** Uncategorized\
**Created:** [May 4, 2010, 10:07am UTC](https://forum.kirupa.com/t/loading-different-images/308967 "2010-05-04T10:07:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LS05](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@LS05](https://forum.kirupa.com/u/LS05)\
**Post date:** [May 4, 2010, 10:07am UTC](https://forum.kirupa.com/t/loading-different-images/308967/1 "2010-05-04T10:07:01Z")

</div>

Hi guys i’m trying to loading three different images from xml in three differents movieclips that i have on the stage.

```auto

function handleComplete(e:Event){
    var myXML:XML = new XML(e.target.data);
    var mySfondo = myXML.sfondo;
    for(var i:uint = 0; i < 3; i++)
    {
        URLArray* = mySfondo*.@url;
        loaderBG.load(new URLRequest(URLArray*));
        loaderBG.contentLoaderInfo.addEventListener(Event.COMPLETE, sfondoCompleto);
    }
}

function sfondoCompleto(e:Event){
    var my_thumb:Loader = Loader(e.target.loader);
    my_thumb.x = my_thumb.y = 0;
    (my_thumb.content as Bitmap).smoothing = true;    
    mainSfondo.sfondo1.addChild(my_thumb);
}

```

This is my code for loading the three different images but in the addChild it adds only the last image…how can i do?  
Please help me.
