TextArea component
The TextArea component wraps the native ActionScript TextField object. You can use styles to
customize the TextArea component; when an instance is disabled, its contents display in a color
represented by the disabledColor style. A TextArea component can also be formatted with
HTML, or as a password field that disguises the text. See "Applying a style sheet to a TextArea
component" in Using ActionScript in Flash.
A TextArea component can be enabled or disabled in an application. In the disabled state, it
doesn't receive mouse or keyboard input. When enabled, it follows the same focus, selection, and
navigation rules as an ActionScript TextField object. When a TextArea instance has focus, you can
use the following keys to control it:
Key
Arrow keys
Page Down
Page Up
Shift+Tab
Tab
For more information about controlling focus, see
on page 50
or
"FocusManager class" on page
A live preview of each TextArea instance reflects changes made to parameters in the Property
inspector or Component inspector during authoring. If a scroll bar is needed, it appears in the live
preview, but it does not function. Text is not selectable in the live preview, and you cannot enter
text in the component instance on the Stage.
When you add the TextArea component to an application, you can use the Accessibility panel to
make it accessible to screen readers.
Using the TextArea component
You can use a TextArea component wherever you need a multiline text field. If you need a single-
line text field, use the
as a comment field in a form. You could set up a listener that checks if the field is empty when a
user tabs out of the field. That listener could display an error message indicating that a comment
must be entered in the field.
TextArea parameters
You can set the following authoring parameters for each TextArea component instance in the
Property inspector or in the Component inspector:
text
indicates the contents of the TextArea component. You cannot enter carriage returns in the
Property inspector or Component inspector. The default value is "" (an empty string).
html
indicates whether the text is formatted with HTML (
value is
.
false
Description
Move the insertion point one line up, down, left, or right.
Moves one screen down.
Moves one screen up.
Moves focus to the previous object.
Moves focus to the next object.
TextInput
component. For example, you could use a TextArea component
Components Dictionary
"Creating custom focus navigation"
419.
) or not (
true
CHAPTER 6
). The default
false
TextArea component
725
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers