• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Keyboard Access and Modifyin... > The Two “Text” Objects: TextField an...

The Two “Text” Objects: TextField and TextFormat

As I just explained, there are two similarly named text-related objects, although they have totally different purposes. The TextField object enables you to manipulate properties for any individual text instance. (Only Dynamic and Input text can be affected; Static text has no option to be given an instance name.) The TextFormat object is stored in a variable, and that variable has named properties that you can change (just like how you change a clip’s properties). After the variable’s properties’ values are set the way you want, you can finally apply it to a particular text instance onscreen. You could actually have several variables, each containing a TextFormat object with slightly different values. Then, you could decide to apply only one particular format to the onscreen text. You’ll see some examples of this in the section “Using the TextField and TextFormat Objects” later in this chapter.

TextField Object

Basically, the TextField object is a way to control a text instance the way the Properties panel does—except by using script. (You can actually do additional things, such as change the background color.) You can give any field on the Stage (Dynamic Text or Input Text) an instance name by using the Properties panel (see Figure 10.1).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint