TextField._alpha Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
TextField._alpha Property Flash 6

opacity percentage: 0 is transparent; 100 is opaque 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 property 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



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net