So I have read the tutorial: http://www.kirupa.com/developer/mx2004/thumbnails.htm, and I based my flash file off the code given there.
I would like to, instead of letting the thumbnail_mc’s scroll when you rollover them, have buttons on either side that scroll (slow when mouseover and fast when pressed) the mc’s instead. Here is what I have, which doesn’t seem to work:
previous_btn.onRollOver = function(){
thumbNailScroller(30);
};
next_btn.onRollOver = function(){
thumbNailScroller(30);
};
previous_btn.onPress = function(){
thumbNailScroller(50);
};
next_btn.onPress = function(){
thumbNailScroller(50);
};
function thumbNailScroller(scroll_speed) {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
it would be very helpful for you to read the (at least part of) the tutorial if you are going to try to help me.
Well, thanks…
-c…