# Can This Work? (Image Loader Loop)

**URL:** <https://forum.kirupa.com/t/can-this-work-image-loader-loop/319430>\
**Category:** flash\
**Created:** [February 20, 2011, 2:50pm UTC](https://forum.kirupa.com/t/can-this-work-image-loader-loop/319430 "2011-02-20T14:50:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![megshea](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@megshea](https://forum.kirupa.com/u/megshea)\
**Post date:** [February 20, 2011, 2:50pm UTC](https://forum.kirupa.com/t/can-this-work-image-loader-loop/319430/1 "2011-02-20T14:50:52Z")

</div>

I’m a more desperate search for answers and need to load multiple images at the same time. I’m trying to use the same loader but don’t know if this is best practice (and it isn’t working).

Ami I close? Any help our guidance is much appreciated.

```auto

function loadThumbnails()
{            

    for (var i:Number=1; i<=4; i++)
    {    
        var urlRequest:URLRequest = new URLRequest(xmlData[showNumber]["s" + i + "_thumb"]);
        imgLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressStatus);
        imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function onMouseOver(e:Event) { onCompleteStatus(e, new Array(i))});
        imgLoader.load(urlRequest);
    }
}

function onProgressStatus(e:ProgressEvent)
{
    trace("...PROGRESS STATUS...");
}

function onCompleteStatus(e:Event, arg:Array)
{
    Object(this)["tmbBox" + arg[0] + "_mc"]["tmbHolder" + arg[0] + "_mc"].addChild(imgLoader);
}

```
