Hello. I used the tut on here to make my own photogallery with scrollable thumbnails and have run into a snag. My thumbnails share the same height but vary in width and, for some reason, are overlapping and/or appearing in the incorrect order. Here’s a picture.
As you can see the first 4 thumbs and the 6th thumb are okay (they share the same width) whereas the 5th is missing (actually it is about 10 thumbs down, overlapped with another). Here’s the code (taken from the “Adding Thumbnails” tutorial on this website.)
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip(“tscroller”, 1);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((this._ymouse>=thumbnail_mc._y) && (this._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((this._xmouse>=(hit_right._x-30)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((this._xmouse<=100) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip(“t”+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
[COLOR=red]target_mc._x = hit_left._x+(eval(“thumbnail_mc.t”+k)._width+5)*k;[/COLOR]
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc._alpha = 50;
target_mc.onRollOver = function() {
this._alpha = 100;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 50;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], “thumbnail_mc.t”+k);
}
I think the problem lies within the red text…I’ve tried my best with no such luck. Help?