0 Replies Latest reply on Dec 27, 2007 9:06 AM by Dave Blake

    Scroll bar

    Dave Blake
      I borrowed some code to make a functioning scrollbar for a gallery thumbnail section. I want to tweak its function so that the content that is being moved by dragging the scrollbar slows to a stop rather than abruptly stops once the scrollbar dragging stops.

      Here is the code that is the functioning of the scrollbar (scrollface is the instance name of the actual bar that is dragged and the "this, false, left, top, right, bottom" variables are the constraints that the bar can move within)

      scrollFace.onPress = function() {

      var currPos:Number = this._y;
      startDrag(this, false, left, top, right, bottom);
      this.onMouseMove = function() {

      dy = Math.abs(initPosition-this._x);
      contentMain._x = Math.round(dy*-1*moveVal+initContentPos);
      scrollFace.onMouseUp = function() {
      delete this.onMouseMove;

      What do I need to add/modify to add that functionality?