Public feed #377867

Someone

public text v1 · immutable
Raw Edit
·published 2007-03-02 02:11 UTC
rendered paste body
theTrack.theSlider.onPress = function() {
    this.startDrag(false,0,0,0,this._parent._height-this._height);
    this.onMouseMove = function() {
	_root.targetValue =  -(_root.bigCont.thumbCont._height - _root.theMask._height) * this._y / (this._parent._height - this._height);
      // _root.targetValue = -(_root.bigCont.thumbCont._height - _root.theMask._height) * this._y / (this._parent._height - this._height);
    }
}

theTrack.theSlider.onEnterFrame = function() {
	//trace("ENTERFRAME");
    _root.bigCont.thumbCont._y +=  Math.max(Math.min((_root.targetValue-_root.bigCont.thumbCont._y)*decay,maxMovement),-maxMovement);
	//trace("STAY:"+_root. _root.bigCont.thumbCont._y);
	//trace(Math.min((targetValue-_root. _root.bigCont.thumbCont._y)*decay,maxMovement))
	//trace(targetValue- _root.bigCont.thumbCont._y);
	//trace("DECAY:"+(targetValue- _root.bigCont.thumbCont._y)*decay);

}

theTrack.theSlider.onRelease = theTrack.theSlider.onReleaseOutside = function() {
	this.stopDrag();
	delete this.onMouseMove;
}


bUp.onPress = function() {
	this.onEnterFrame = function() {
		 if(_root.theTrack.theSlider._y > _root.theMin) {
		 _root.theTrack.theSlider._y-=5;
		 _root.targetValue = -(_root.bigCont.thumbCont._height - _root.theMask._height) * this._y / (this._parent._height - this._height);
	}
	}
}


bUp.onRelease = bUp.onReleaseOutside = bDown.onRelease = bDown.onReleaseOutside = function() {
	delete this.onEnterFrame;
}

bDown.onPress = function() {
	this.onEnterFrame = function() {
		
			if(_root.theTrack.theSlider._y >= _root.theMin && _root.theTrack.theSlider._y < (_root.theTrack._height-_root.theTrack.theSlider._height))  {
			
		_root.theTrack.theSlider._y+= 5;
		//trace(_root.targetValue);
		_root.targetValue =-(_root.bigCont.thumbCont._height - _root.theMask._height) * (this._parent._height - this._height);
	  }
	 }
			
	}