You want to refer to a text field via ActionScript.
Refer to author-time text fields by their instance names.
Many of the recipes in this chapter require you to access a text field’s methods or properties. Sometimes text fields are created at runtime via ActionScript, but often you’ll want to adapt a recipe to work with your author-time content.
ActionScript refers to author-time text fields using the text field instance name, which must be set, as follows:
Select the text field instance on the Stage.
Open the Property inspector.
Change the text field’s type from “Static Text” to “Dynamic Text” (change it to “Input Text” if you want to allow user input at runtime).
Specify an instance name in the Property inspector (the instance name field appears once you complete Step 3).