I have two instances of the xml photogallery one has the thumbs working the other loads the thumbs but doesn’t scroll. this is my code for the second intance.
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc_2._y) && (_root._ymouse<=thumbnail_mc_2._y+thumbnail_mc_2._height)) {
if ((_root._xmouse>=(hit_right_2._x-40)) && (thumbnail_mc_2.hitTest(hit_right))) {
thumbnail_mc_2._x -= scroll_speed;
} else if ((_root._xmouse<=40) && (thumbnail_mc_2.hitTest(hit_left))) {
thumbnail_mc_2._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc_2.createEmptyMovieClip("t"+k, thumbnail_mc_2.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left_2._x+(eval("thumbnail_mc_2.t"+k)._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc_2.t"+k);
}
Do I need to make the scroller function scroller_2 or something?