18.4.3. Typical Text-Scrolling Code
In combination, the scroll and
maxscroll properties can be used to scroll a text
field. This code scrolls text down one line for each click of a
button:
on (press) {
if (textField.scroll < textField.maxscroll) {
textField.scroll++;
}
}
And here's how we scroll text up one line with each click:
on (press) {
if (textField.scroll > 1) {
textField.scroll--;
}
}
For an example of simple scroll buttons used in a movie, download the
sample scrollers posted at the online Code Depot.