I have a scrollbar that scrolls left or right when the cursor is moved either side of the central x coordinate. I've been trying to change it so the scroll only activates when the cursor is towards the far right hand side (ie x>75%) or towards the far left hand side (x<25%) of the scrollbar, leaving the central 50% of the scrollbar inactive. How could I go about this?
The .fla is here http://board.flashkit.com/board/showthread.php?t=808636Code:function scrolling() { _root.onEnterFrame = function() { container_mc._x += Math.cos(((mask_mc._xmouse)/mask_mc._width)*Math.PI)*15; 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); } }; }




Reply With Quote
