I’ve chopped and changed and moved and removed things in Kirupa’s XML Gallery (http://www.kirupa.com/developer/mx2004/thumbnails.htm).
I’ve moved the scrolling thumbnails over to the left of the image area, and tried to make the thumbs scroll vertically*.
I got this working, but the hit areas seem to be a bit off. Once you’ve rolled over either the top or bottom hit areas, then everything directly to the left of that also becomes active.
In a perfect world I’d just like the actual hit areas to be active and no where else.
Here’s the code for that part. I’ve fiddled around with this, that and the other, and hopefully a kind Kirupa’ean can see where I’ve gone wrong.
Many many thanks in advance.
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_ymouse>=thumbnail_mc._y) && (_ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_ymouse>=(hit_right._y-10)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._y -= scroll_speed;
}
else if ((_ymouse<=(hit_left._y+10)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._y += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
**** EDIT - Sorry, I had stupidly written horizontal. I need it to scroll up and down.***