Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Working with Text and Strings > About text fields > Using the TextField class | |||
The TextField class represents any dynamic or input (editable) text field you create using the Text tool in Flash. You use the methods and properties of this class to control text fields at runtime. TextField objects support the same properties as MovieClip objects, with the exception of the _currentframe, _droptarget, _framesloaded, and _totalframes properties. You can get and set properties and invoke methods for text fields dynamically.
To use ActionScript to control a dynamic or input text field, you must assign the text field an instance name in the Property inspector. You can then reference the text field with the instance name, and use the methods and properties of the TextField class to control the contents or basic appearance of the text field.
You can also create TextField objects at runtime, and assign them instance names, using the MovieClip.createTextField() method. For more information, see Creating text fields at runtime.
For more information on using the TextField class, see the following topics:
For samples that demonstrate how to work with text fields using ActionScript, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. Download the Samples zip file and navigate to the ActionScript 2.0/TextFields folder to access these samples:
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00000879.html