About text fields
383
About text fields
A dynamic or input text field is a TextField object (an instance of the TextField class). When
you create a text field in the authoring environment, you can assign it an instance name in the
Property inspector. You can use the instance name in ActionScript statements to set, change,
and format the text field and its content by using the TextField and TextFormat classes.
You can use the user interface to create several kinds of text fields, or you can use ActionScript
to create text fields. You can create the following kinds of text fields in Flash:
Static text
Use static text to display characters that do not need to change, to display small
amounts of text, or to display special fonts that are not available on most computers. You can
also display uncommon fonts by embedding characters for dynamic text fields.
Dynamic text
Use dynamic text fields when you need to display characters that are updated
or that change at runtime. Also, you can load text into dynamic text fields.
Input text
Use input text fields when you need to capture user input. Users can type in
these text fields.
Text components
You can use TextArea or TextInput components to display or capture
text in your applications. The TextArea component is similar to a dynamic text field with
built-in scroll bars. The TextInput component is similar to an input text field. Both
components have additional functionality over their text field equivalents; however, they add
more file size to your application.
The methods of the TextField class let you set, select, and manipulate text in a dynamic or
input text field that you create during authoring or at runtime. For more information, see
“Using the TextField class” on page 384
. For information on debugging text fields at runtime,
see
“About displaying text field properties for debugging” on page 728
.
ActionScript also provides several ways to format your text at runtime. The TextFormat class
lets you set character and paragraph formatting for TextField objects (see
“Using the
TextFormat class” on page 419
). Flash Player also supports a subset of HTML tags that you
can use to format text (see
“Using HTML-formatted text” on page 436
). Flash Player 7 and
later supports the
img
HTML tag, which lets you embed not just external images but also
external SWF files as well as movie clips that reside in the library (see
“Image tag”
on page 439
).
NO
TE
All text fields support Unicode. For information on Unicode, see
“About strings and the
String class” on page 450
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...