# Loading Images inside MovieClip with mask

**URL:** https://forum.kirupa.com/t/loading-images-inside-movieclip-with-mask/292966
**Category:** flash
**Created:** [July 21, 2009, 1:02pm UTC](https://forum.kirupa.com/t/loading-images-inside-movieclip-with-mask/292966 "2009-07-21T13:02:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![danhodkinson](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@danhodkinson](https://forum.kirupa.com/u/danhodkinson)
#### Post date: [July 21, 2009, 1:02pm UTC](https://forum.kirupa.com/t/loading-images-inside-movieclip-with-mask/292966/1 "2009-07-21T13:02:24Z")

</div>

Hi all, dont think i’m too far away with this one, i am loading in a set of images from an XML file and i am trying to get each image to load into an image holder movie clip i have made.

this is my code thus far:

```php
function callThumbs():void
{
for(var i:Number = 0; i < total; i++)
{
   var projectNode:XML = projects*;// Get this project/row
   var images:XMLList = projectNode.IMAGE;// Get the images out of this project/row
   var imagesTotal:Number = images.length();

for (var j:Number = 0; j < imagesTotal; j++) {// Loop over these images (for just this project)
      var thumb_url = images[j].@THUMB;
      var thumb_loader = new Loader();
      thumb_loader.load(new URLRequest(thumb_url));
      thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
      thumb_loader.name = i + "_" + j;// The name will be row_column.
      thumb_loader.x =(thumbHeight+10)* i;
      thumb_loader.y =(thumbHeight+10)* j; // Position vertically by using "i" as a counter for our current row.
   }   
}    
}

function thumbLoaded(e:Event):void{
    var my_thumb:Loader = Loader(e.target.loader);
    scrollbox.content.addChild(my_thumb);
    my_thumb.contentLoaderInfo.removeEventListener(Event.COMPLETE, thumbLoaded);
}

```

i have tried a few things but can’t seem to find the correct code for it.  
my holder is an mc with a second mc inside so is laid out like holder.imageHolder

if anybody could point me in the right direction i would be very grateful.

Regards  
Dan
