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.= 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.= 1;
}
Close collapsed procedure
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...