Textarea Class - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

You can make the background of TextArea components transparent by setting the
style globally to a value of
backgroundColor
style to a color individually for all TextArea components that you do not
backgroundColor
want to be transparent.
// Give all TextArea components transparent backgrounds.
_global.styles.TextArea.backgroundColor = undefined;
//Make this specific component instance have a white background.
myTextArea2.setStyle( "backgroundColor", "white" );
The TextArea component supports one set of component styles for all text in the field.
However, you can also display HTML that is compatible with Flash Player HTML rendering.
To display HTML text, set
If you do set the TextArea to display HTML text, the text style is set using the
TextField.StyleSheet class (see details for this class in the ActionScript 2.0 Language Reference).
For example:
1.
Drag a TextArea component to the Stage, and give it the instance name
2.
Enter this code in Actions panel for Frame 1 of the timeline:
var my_styles = new TextField.StyleSheet();
my_styles.setStyle("p", {fontFamily:'Arial,Helvetica,sans-serif',
fontSize:'12px', color:'#CC6699'});
my_ta.styleSheet = my_styles;
my_ta.html = true;
my_ta.text = "<p>This is some text</p>";
Using skins with the TextArea component
The TextArea component uses an instance of RectBorder for its border and scroll bars for
scrolling images. For more information about skinning these visual elements, see
class" on page 1063
and

TextArea class

Inheritance
MovieClip >
TextArea
ActionScript Class Name
The properties of the TextArea class let you set the text content, formatting, and horizontal
and vertical position at runtime. You can also indicate whether the field is editable, and
whether it is a "password" field. You can also restrict the characters that a user can enter.
1182
TextArea component
to
TextArea.html
"Using skins with the UIScrollBar component" on page
UIObject class
>
UIComponent class
mx.controls.TextArea
. You then need to set the
undefined
.
true
> View > ScrollView >
.
my_ta
"RectBorder
1394.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents