# Dynamic text scrolling

**URL:** <https://forum.kirupa.com/t/dynamic-text-scrolling/19904>\
**Category:** flash\
**Created:** [May 2, 2003, 5:07pm UTC](https://forum.kirupa.com/t/dynamic-text-scrolling/19904 "2003-05-02T17:07:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tee28](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@tee28](https://forum.kirupa.com/u/tee28)\
**Post date:** [May 2, 2003, 5:07pm UTC](https://forum.kirupa.com/t/dynamic-text-scrolling/19904/1 "2003-05-02T17:07:48Z")

</div>

hey guys,  
i need a little help. i’m sure it’s easy to do but i can’t wrap my head around it. i have my site that loads an external txt file. i also have the up/down scroll buttons. but i can only get the button scroll down everytime you click on it. how do i get it so when onRollover it keeps scrolling till it can’t scroll anymore. here’s what i have on the buttons:

upButton: on (press, rollOver) {  
if (textField.scroll\>1) {  
textField.scroll–;  
}  
}

downButton: on (press, rollOver) {  
if (textField.scroll\<textField.maxscroll) {  
textField.scroll++;  
}  
}

how can i have it continously scroll on over?

thanks,  
tee

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 2, 2003, 6:43pm UTC](https://forum.kirupa.com/t/dynamic-text-scrolling/19904/2 "2003-05-02T18:43:48Z")

</div>

you could try something like this:

```auto
this.createEmptyMovieClip("scrollController", -1);
scrollController.onEnterFrame = function() {
if (upButton.hitTest(_root._xmouse, _root._ymouse, true)) myTextField.scroll--;
if (downButton.hitTest(_root._xmouse, _root._ymouse, true)) myTextField.scroll++;
};

```

just paste it in a frame of the movie and change the instance names (upButton, downButton and myTextField) if needed. =)
