I've got a scrolling thumbnail bar that I want to activate only when the cursor is above the thumbnail bar. At the moment it will also scroll if the cursor's away from the thumnails.
How could I do this? I've tried using on rollOver but it's not continuous. The code at the moment is
Code:
function scrolling() {
_root.onEnterFrame = function() {
container_mc._x-= (mask_mc._xmouse-(mask_mc._width/2-(mask_mc._width/4)*(mask_mc._xmouse<mask_mc._width/2)+(mask_mc._width/4)*(mask_mc._xmouse>mask_mc._width/2)))*(Math.abs(mask_mc._xmouse-mask_mc._width/2)>mask_mc._width/4)*1/10;
if (container_mc._x>mask_mc._x) {
container_mc._x = mask_mc._x;
}
if (container_mc._x<(mask_mc._x-(container_mc._width-mask_mc._width))) {
container_mc._x = mask_mc._x-(container_mc._width-mask_mc._width);
}
};
}