In Flash 5, single frame movie clips loop. That is, it checks to see if the user is clicking the Down button. If so, Flash goes off to find the Text variable. Notice how we tell Flash where that variable is. Remember, Text inhabits the main timeline, or root , of the movie, while our buttons dwell in nested movie clips on their own timelines.
Flash sets the maxscroll based on the length of the text file and the size of the text box.
We can't change it. We could have flash tells us the number of the maxscroll , but for our purposes here we don't care about the exact figure. As long as we haven't reached it, we want to keep going down. So Flash checks to make sure the current line number is less than the maxscroll , and if so, it scrolls down one more line using Text's scroll property. Let's do the Up button.