Learning ActionScript 2.0 in Adobe Flash |
|
|
|
| Working with Text and Strings > About text fields > About manipulating text fields | |||
You can manipulate text fields that you create in a FLA file in several ways. You can manipulate a text field as long as you assign an instance name in the Property inspector, or you can assign one with code if you use code to create the field. The following simple example creates a text field, assigns text to it, and changes the border property of the field:
this.createTextField("pigeon_txt", this.getNextHighestDepth(), 100, 100, 200, 20);
pigeon_txt.text = "I like seeds";
pigeon_txt.border = true;
For a complete list of properties in the TextField class, see the ActionScript 2.0 Language Reference.
For examples of how to manipulate text fields, see the following sections:
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:
|
|
|
|