Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Text fields can receive a variety of forms of user input, including text entry, text selection, hypertext-link activation, keyboard focus, scrolling, and mouse interaction. In this section, we'll study text entry, text selection, and hypertext links. For information on keyboard focus, scrolling, and mouse interaction, see Chapter 22.
Each text field's ability to receive user input is governed by the value of its type variable. By default, for text fields created with ActionScript, the instance variable type is set to TextFieldType.DYNAMIC, meaning that text can be modified through ActionScript but not by the user. To allow a text field to receive user input, we must set type to TextFieldType.INPUT, as shown in the following code: