# Please Help a newbie (about loading images in to movieclip array)

**URL:** <https://forum.kirupa.com/t/please-help-a-newbie-about-loading-images-in-to-movieclip-array/294557>\
**Category:** flash\
**Created:** [August 16, 2009, 4:11pm UTC](https://forum.kirupa.com/t/please-help-a-newbie-about-loading-images-in-to-movieclip-array/294557 "2009-08-16T16:11:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bahy](https://avatars.discourse-cdn.com/v4/letter/b/b9bd4f/32.png) [@bahy](https://forum.kirupa.com/u/bahy)\
**Post date:** [August 16, 2009, 4:11pm UTC](https://forum.kirupa.com/t/please-help-a-newbie-about-loading-images-in-to-movieclip-array/294557/1 "2009-08-16T16:11:24Z")

</div>

This is a project for studying, and I am close to the end but now i am having no solution for doing this.

I read the image gallery from a xml file.

then add the thumbnail images of the gallery into a moviclips I call thumbBar. Each thumbnail image (a movieclip) has a loading state, waiting for the loader to finish loading the thumbnail image, after finish it will change the loading state into diplaying the thumbnail image.

But i really don;t know how to do this in AS3, I did try using array. My code is below but it returned with error.

```auto

 
private function BuildThumb() {

   var imagesCount:uint = xmlData.gallery[currentGallery].image.length();
   var folder:String = xmlData.gallery[currentGallery].@Folder;
    for (var i:uint = 0 ; i < imagesCount ; i++ ) {
     var thumb:ThumbLoader = new ThumbLoader();
     var thumbImageLoader:URLLoader = new URLLoader();
     var path:URLRequest = new URLRequest(folder + "\\" + xmlData.gallery[currentGallery].image*.@Thumb);
     thumbImageLoader.load(path );
     trace(path.url);
     thumbImageLoaderList.push();
     thumbImageLoader.addEventListener(Event.COMPLETE, ThumbImageLoaded);
     
     thumbBar.addChild(thumb);
     thumb.thumbImage.visible = false ;
     thumb.x = 5.3 + 45 * i;
     thumb.y = 5.3 ;
     
     //bottomMenu.thumbList.addChild(thumb);
     
     thumbCombo.push(thumb);
     
     //thumb.preloadCircle.play();
    }
   
    bottomMenu.thumbList.addChild(thumbBar);
   
  }
  
  private function ThumbImageLoaded(evt:Event) {

//I don' t know where to go from here   

     }

```

The ThumbLoader is the MovieClip having preloader and a child symbol name thumbImage to store the loaded image.

Please anyone show me the way out in doing this.
