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:
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:
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");
}