
TextField.background Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
832
|
ActionScript Language Reference
TextField.background Property
Boolean; turns text field background on and off
Flash 6; accessible only via authoring tool in Flash 4 and Flash 5
read/write
theField.background
Description
The Boolean background property specifies whether to show a colored rectangle behind a
field’s text (
true) or to make the bounding rectangle behind the field transparent (false,
the default). The rectangle’s color is specified by the
backgroundColor property (defaults to
white). To change the size of the rectangle, use the
_width and _height properties. To add a
border to the rectangle, use the
border and borderColor properties.
To produce a more elaborate background for a text field, set
background and border to
false and manually draw a shape behind the text field.
Example
Put a white background on theField_txt:
this.createTextField("theField_txt", 1, 0, 0, 80, 20);
theField_txt.text = "hello world";
theField_txt.background = true;
Now make the white background red:
theField_txt.backgroundColor = 0xFF0000;
See Also
TextField.backgroundColor, TextField.border, TextField.borderColor, TextField._width,
TextField._height
TextField.backgroundColor Property
RGB number specifying the text field’s background color
Flash 6
read/write
theField.backgroundColor ...