# Basic Scrolling AS Question

**URL:** <https://forum.kirupa.com/t/basic-scrolling-as-question/76683>\
**Category:** flash\
**Created:** [January 20, 2005, 3:59pm UTC](https://forum.kirupa.com/t/basic-scrolling-as-question/76683 "2005-01-20T15:59:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wyclef](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@wyclef](https://forum.kirupa.com/u/wyclef)\
**Post date:** [January 20, 2005, 3:59pm UTC](https://forum.kirupa.com/t/basic-scrolling-as-question/76683/1 "2005-01-20T15:59:57Z")

</div>

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…

```auto

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

```

```auto

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

```
