Hi,
Below is all of the code I have in a file for a scrollable menu. I am having problems with
-adjusting the scroll button to the size of the image that it moves
-making the scroll button stop scrolling when you release the click (now you have to clip it a second time to get it to stop following your mouse)
-stop bouncing, i’d rather have a plain scroll rather than the imag bouncing to a stop at the end.
Can you help?
[COLOR=RoyalBlue]movieclip.prototype.move = function () { dest = positiongeneral-_root.drag.ratio*_root.drag.dxdrag;pos = this._x;this._x += (dest-pos)/7;};
movieclip.prototype.move2 = function () { dest = positiongeneral-_root.drag.ratio*_root.drag.dxdrag;pos = this._x;vel = (dest-pos)/7+vel*0.7;this._x += vel;this._x += vel;};
onClipEvent (load) {
_y = _root.pos._y ;
_x = _root.pos._x -_root.pos._width/2+_width/2 ;
positiongeneral = _x ;
}
onClipEvent (enterFrame) {
move2 () ;
}
onClipEvent (load) {
_x = _root.box._x-_root.box._width/2+_width/2 ;
_y = _root.box._y ;
ratio = _root.general._width/_root.box._width ;
xold = _x;
}
onClipEvent (enterFrame) {
if (dragging) {
if((_root._xmouse>_root.box._x-_root.box._width/2) and (_root._xmouse<_root.box._x+_root.box._width/2)) {
_x = _root._xmouse ;
dxdrag = _x - xold ;
}
}
}
[/COLOR]