# How do i make my scroll buttons keep scrolling when pressed?

**URL:** https://forum.kirupa.com/t/how-do-i-make-my-scroll-buttons-keep-scrolling-when-pressed/293909
**Category:** flash
**Created:** [August 5, 2009, 6:04pm UTC](https://forum.kirupa.com/t/how-do-i-make-my-scroll-buttons-keep-scrolling-when-pressed/293909 "2009-08-05T18:04:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![helious](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@helious](https://forum.kirupa.com/u/helious)
#### Post date: [August 5, 2009, 6:04pm UTC](https://forum.kirupa.com/t/how-do-i-make-my-scroll-buttons-keep-scrolling-when-pressed/293909/1 "2009-08-05T18:04:26Z")

</div>

I have created two scroll buttons for my dynamic text field, following this guide

[http://www.kirupa.com/developer/flash5/scrolltext.htm](http://www.kirupa.com/developer/flash5/scrolltext.htm)

My problem is, that you have to click the buttons many times to scroll down to the end.  
How do you make it possible to “Press and hold” the mousebutton instead?

My code is as follows:

TextField name: scrollableText

Button Up Code:

```auto
on (press, release, keyPress "<Up>") {
    currentScroll = scrollableText.scroll;
    if (Number(currentScroll)>1) {
        scrollableText.scroll = currentScroll-1;
    }
}

```

Button Down Code:

```auto
on (press, release, keyPress "<Down>") {
    currentScroll = scrollableText.scroll;
    if (Number(currentScroll)<Number(scrollableText.maxscroll)) {
        scrollableText.scroll = Number(currentScroll)+1;
    }
}

```

Thanks in advance 🙂
