User Guide
756 Chapter 7: ActionScript for Flash
htmlText: <P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="12"
COLOR="#000000"><B>Remember to always update your help panel.</B></FONT></P>
text: Remember to always update your help panel.
*/
See also
TextField.htmlText
TextField.textColor
Availability
Flash Player 6.
Usage
my_txt.textColor:Number
Description
Property; indicates the color of the text in a text field. The hexadecimal color system uses six
digits to represent color values. Each digit has sixteen possible values or characters. The characters
range from 0 to 9 and then A to F. Black is represented by (
#000000) and white, at the opposite
end of the color system, is (
#FFFFFF).
Example
The following ActionScript creates a text field and changes its color property to red.
this.createTextField("my_txt", 99, 10, 10, 100, 300);
my_txt.text = "this will be red text";
my_txt.textColor = 0xFF0000;
TextField.textHeight
Availability
Flash Player 6.
Usage
my_txt.textHeight:Number
Description
Property; indicates the height of the text.
Example
The following example creates a text field, and assigns a string of text to the field. The trace()
method is used to write the text height and width in the log file. The
autoSize property is then
used to resize the text field, and the new height and width also write to the log file.
this.createTextField("my_txt", 99, 10, 10, 100, 300);
my_txt.text = "Sample text";
trace("textHeight: "+my_txt.textHeight+", textWidth: "+my_txt.textWidth);
trace("_height: "+my_txt._height+", _width: "+my_txt._width+"\n");
my_txt.autoSize = true;