User Guide
Creating scrolling text 245
2.
Create an Up button and a Down button, or select Window > Other Panels > Common
Libraries > Buttons, and drag buttons to the Stage.
You will use these buttons to scroll the text up and down.
3.
Select the Down button on the Stage and type down_btn into the Instance Name text box.
4.
Select the Up button on the Stage, and type up_btn into the Instance Name text box.
5.
Select Frame 1 on the Timeline, and, in the Actions panel (Window > Development Panels >
Actions), enter the following code to scroll the text down in the text field:
down_btn.onPress = function() {
textField_txt.scroll += 1;
};
6.
Following the ActionScript in step 5, enter the following code to scroll the text up:
up_btn.onPress = function() {
textField_txt.scroll -= 1;
};
Any text that loads into the textField_txt text field can be scrolled using the up and down
buttons.