Hi,
I have a vertical slider that works great, I did try to convert it to a horizontal slider changing all values of height to width and y x to y but it does not work.
Please can someone help me??
Here is the original code:
targY=0;
dragger._x = 370;
line._x = 370;
dragger.onPress=function(){
startDrag(this,false,this._x,0,this._x,theMask._height-this._height);
}
dragger.onRelease=dragger.onReleaseOutside=function(){
stopDrag();
}
theText.setMask(theMask);
theText.onEnterFrame=function(){
scrollAmount=(this._height-(theMask._height/1.3))/(theMask._height-dragger._height);
targY=-dragger._y*scrollAmount;
this._y-=(this._y-targY)/5;
}
Here is my modified code that does not work for horizontal
targX=0;
dragger._y = 370;
line._y = 370;
dragger.onPress=function(){
startDrag(this,false,this._y,0,this._y,theMask._width-this._width);
}
dragger.onRelease=dragger.onReleaseOutside=function(){
stopDrag();
}
theText.setMask(theMask);
theText.onEnterFrame=function(){
scrollAmount=(this._width-(theMask._width/1.3))/(theMask._width-dragger._width);
targX=-dragger._x*scrollAmount;
this._x-=(this._x-targX)/5;
}