
TextField._alpha Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
830
|
ActionScript Language Reference
TextField._alpha Property
opacity percentage: 0 is transparent; 100 is opaque
Flash 6
read/write
theField._alpha
Description
The floating-point _alpha property specifies the opacity (or, conversely, the transparency)
of
theField as a percentage—0 is completely transparent, whereas 100 is completely
opaque. The text, background, and border of
theField are all affected. The _alpha prop-
erty works only when
theField’s font is embedded and exported with the movie. A font can
be embedded at authoring time with the Property inspector’s Character button or at
runtime with the
embedFonts property. For important details on font embedding, see
TextField.embedFonts.
Example
Assuming its font has been exported with the movie, the following code makes theField_txt
50% transparent:
theField_txt.embedFonts = true;
theField_txt._alpha = 50;
See Also
TextField._visible, TextField.embedFonts
TextField.autoSize Property
matches the text field’s bounding rectangle size to its text
Flash 6
read/write
theField.autoSize
Description
The string autoSize property can make a text field’s bounding rectangle match the size of
the text it contains. Use
autoSize to ensure that a text field is large enough to display its
assigned text or to allow a text field to change