Hi all,
For some reason I’ve hit a wall on this. Trying to make a custom scroller which works but the odd thing is that when i drag the scroller to the bottom, the content scrolls the opposite way. So when the scroller is at its start point, the content is at its end point and when i scroll it to the end point the content reverses to the start point. Here is what I’m using
var scrollLower:Number = -92;
var scrollUpper:Number = 39;
var textLower:Number = -92;
var textUpper:Number = -140;
var scrollRange:Number = scrollLower - scrollUpper;
var textRange:Number = textLower - textUpper;
function scroll()
{
var moved:Number = scroller_mc._y - scrollUpper;
var perMoved:Number = moved/scrollRange;
var textMoved:Number = perMoved*textRange;
contentMain._y = textLower - textMoved;
}
scroller_mc.onPress = function()
{
startDrag(this,false,this._x,-92,this._x,39);
this.onMouseMove = scroll;
}
scroller_mc.onRelease = scroller_mc.onReleaseOutside = function()
{
stopDrag();
this.onMouseMove = null;
}