Working with text

The TextField object represents any dynamic or selectable (editable) text field you create using the Text tool in Flash. You can use thYou can use a text field as an object in your movie, and use ActionScript to control the text field in the same way you would control a movie clip or other object. Text field 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.

The Debug > List Variables command in test mode lists text field objects. The Output window uses the following conventions in displaying text field objects:

The Debug > List Objects command in test mode lists text field objects. If an instance name is specified for a text field, the full target path including the instance name is displayed in the Output window in the following form:

Target = "target path"

For more information on the List Variables or List Objects commands, see "Using the Output window" on page 140.

To use a text field as an object:

  1. Select a text field on the Stage.
  2. In the Property inspector (Window > Properties), enter an instance name in the Instance Name text box, directly below the Text Type pop-up menu on the left side of the inspector.
  3. The instance name must conform to identifier naming conventions. The first character must be a letter, underscore (_), or dollar sign ($). Each subsequent character must be a letter, number, underscore, or dollar sign.