So I'm working on my portfolio and I got this problem. The code posted scrolls the sprite "cellContainer" based on the position of stage.mouseY. Perfect.

Problem is that I want stage.mouseY to equal the entire cellContainer height. Kind of like how a small tablet equals a huge monitor. So when stage.mouseY = 0, cellContainer.y = 0 and when stage.mouseY = stage.stageHeight, cellContainer.y = stage.stageHeight - cellContainer.height. Right now, it scrolls, but it takes a while to scroll throught the entire height of cellContainer. I want it to be proportional to stage.mouseY.

Actionscript Code:
private function scrollStart(e:Event):void
        {
            cellContainer.y += Math.cos((-stage.mouseY/stage.stageHeight)*Math.PI) * 10;

           
            if (cellContainer.y > 0)
            {
                cellContainer.y = 0;
            }
           
            if (-cellContainer.y>(cellContainer.height - stage.stageHeight))
            {
                cellContainer.y = -(cellContainer.height - stage.stageHeight);
            }
               
        }

Any help would be appreciated! Thanks!