Basic Scrolling AS Question

Hi, i’ve got a text field “scrollable_text” and two buttons with the following code on them to “scroll” the text. Just wondering if there is a way to stop it when it reaches the end of the text (top and bottom). currently u can scroll up or down as long as u want…


on( press, release, keyPress "")
{
        scrollable_text._y -= 30;
}


on( press, release, keyPress "")
{
        scrollable_text._y += 30;
}