# Can someone please help me with this multiple MovieClipLoader code?

**URL:** <https://forum.kirupa.com/t/can-someone-please-help-me-with-this-multiple-moviecliploader-code/171055>\
**Category:** flash\
**Created:** [December 1, 2005, 3:54pm UTC](https://forum.kirupa.com/t/can-someone-please-help-me-with-this-multiple-moviecliploader-code/171055 "2005-12-01T15:54:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![victord\_21](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/victord_21/32/1960_2.png) [@victord\_21](https://forum.kirupa.com/u/victord_21)\
**Post date:** [December 1, 2005, 3:54pm UTC](https://forum.kirupa.com/t/can-someone-please-help-me-with-this-multiple-moviecliploader-code/171055/1 "2005-12-01T15:54:13Z")

</div>

I came up with the following thumbnail generator code and I tried to attach a MovieClipLoader to each one but it sems to only work for the last generated thumnail…I’m kindda’ new to this so can someone please help me?

This is the part of the code that generates the thumbnails:

```auto
 
function thumbnails_fn2(k){
movie=this.attachMovie("Mthumb", "Mthumb"+k, k);
if(k>0){
movie._x+=thisX+71
movie._y=thisY;
}else{
movie._x=2;
movie._y=thisY;
}
thisX=movie._x;
MCTLoader.loadClip(thumbs[k], movie.thumbHolder);
 
movie.onRelease = function() {
if(thumbImage!=images[k]){
MAINImage.getNextHighestDepth());
MCLoader.loadClip(images[k],"MAINImage.PhotoHolder");
thumbImage=images[k];
}
}
movie.onRollOut = movie.onReleaseOutside = function() {
this._alpha = 100;
}
movie.onRollOver = function() {
this._alpha = 70;
}
}

```

And this is the function for attaching the Loaders:

```auto

var MCTLoader = new MovieClipLoader();
MCTLoader.onLoadStart = function (targetMCT)
{
var loadProgressT = MCTLoader.getProgress(targetMCT);
loadedT=loadProgressT.bytesLoaded;
filesizeT=loadProgressT.bytesTotal;
movie.loader_text_visible=true;
movie.loader_text.loadT.text=Math.round(100*loadedT/filesizeT);
movie.thumb_loader._visible=true;
movie.thumb_loader.thumbLbar._xscale = 100*loadedT/filesizeT;
 
}
MCTLoader.onLoadProgress = function (targetMCT, loadedT, filesizeT) {
 
movie.loader_text.loadT.text=Math.round(100*loadedT/filesizeT);
movie.thumb_loader._visible=true;
movie.thumb_loader.thumbLbar._xscale = 100*loadedT/filesizeT;
}
MCTLoader.onLoadComplete = function (targetMCT){
var loadProgressT = MCTLoader.getProgress(targetMCT);
loadedT=loadProgressT.bytesLoaded;
filesizeT=loadProgressT.bytesTotal;
trace (targetMCT + " has finished loading.");
movie.loader_text._visible=false;
movie.thumb_loader._visible=false;
 
}
MCTLoader.onLoadInit = function (targetMCT){
trace ("Movie clip:" + targetMCT + " is now initialized");
}
MCTLoader.onLoadError = function (targetMCT, errorCode2)
{
trace ("ERRORCODE:" + errorCode2);
trace (targetMCT + "Failed to load its content");
}

```
