User Guide
224 Chapter 9: Using Flash, Flash Components, and Other Interactive Media Types
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 “TextInput component” on page 225. For example, you could use a
TextArea component as a comment field in a form. You could set up a listener that checks if 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 component parameters
The following are authoring parameters that you can set for each TextArea component instance in
the Property inspector or in the Component Inspector panel:
text indicates the contents of the TextArea. You cannot enter carriage returns in the Property
inspector or Component Inspector panel. The default value is "" (empty string).
html indicates whether the text is formatted with HTML (true) or not (false). The default value
is false.
editable indicates whether the TextArea component is editable (true) or not (false). The default
value is true.
wordWrap indicates whether the text wraps (true) or not (false). The default value is true.
You can write code to control these and additional options for TextArea components using its
properties, methods, and events.
Using styles with the TextArea component
The TextArea component supports one set of component styles for all text in the field. However,
you can also display HTML compatible with Flash Player HTML rendering. To display HTML
text, set
TextArea.html to true.
If the name of a style property ends in “Color”, it is a color style property and behaves differently
than non-color style properties. For more information, see “Using styles to customize component
color and text” in the Flash documentation.
A TextArea component supports the following styles:
Style Description
color
The default color for text.
embedFonts
The fonts to embed in the document.
fontFamily
The font name for text.
fontSize
The point size for the font.
fontStyle
The font style, either "normal",or "italic".
fontWeight
The font weight, either "normal" or "bold".
textAlign
The text alignment: either "left", "right", or "center".
textDecoration
The text decoration, either "none" or "underline".