EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 154

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
154 Chapter 8: Working with Text
To use the scroll property to create scrolling text:
1 Do one of the following:
Use the Text tool to drag a text field on the Stage. Assign the text field the instance name
textField in the Property inspector.
Use ActionScript to create a text field dynamically with the
MovieClip.createTextField() method. Assign the text field the instance name
textField as a parameter of the method.
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.
4 In the Actions panel (Window > Development Panels > Actions), enter the following code to
scroll the text down in the text field:
on(press) {
textField.scroll += 1;
}
5 Select the Up button on the Stage.
6 In the Actions panel, enter the following code to scroll the text up:
on(press) {
textField.scroll += 1;
}
Close collapsed procedure

Table of Contents

Related product manuals