MC advances past its max y position. How do I fix this?

Hej,

I have a scroller mc that I want to control by clicking underneath its y position to advance it down its y axis by a predetermined amount. The below code works to move it, but it advances past its max value of 496.5 (off the screen).

Have I made a mistake in the code below? The scroller mc and associated text block is in their own mc on the root timeline. This code is on a frame on the root timeline.

Has it got to do with the relative y positions of the stage compared with the y positions in the actual MC that I am trying to control?

Any help greatly accepted. Cheers.

principals_mc.johnTxt_mc.scrollerZone_mc.onRelease = function  () {

    var scrollerAmount:Number = 80;
    
    if (this.hitTest(principals_mc.johnTxt_mc.jfscroller_mc)) {
    
        if (_ymouse>principals_mc.johnTxt_mc.jfscroller_mc._y+principals_mc.johnTxt_mc.jfscroller_mc._height)
        {
            //Mouse is below the scroller thumbnail
            if (principals_mc.johnTxt_mc.jfscroller_mc._y<496.5)
            {
                principals_mc.johnTxt_mc.jfscroller_mc._y+=scrollerAmount;
                trace(principals_mc.johnTxt_mc.jfscroller_mc._y);
            }
            else
            {
                principals_mc.johnTxt_mc.jfscroller_mc._y=496.5;
            }
                jfScroll(); // function updates text block that scrolles according to jfscroller_mc position
    }
}