03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

_alpha (TextField._alpha property)<br />

public _alpha : Number<br />

Sets or retrieves the alpha transparency value of the text field. Valid values are 0 (fully<br />

transparent) to 100 (fully opaque). The default value is 100. Transparency values are not<br />

supported for text fields that use device fonts. You must use embedded fonts to use the<br />

_alpha transparency property with a text field.<br />

Note: This property is not supported for Arabic, Hebrew, <strong>and</strong> Thai.<br />

Example<br />

The following code sets the _alpha property of a text field named my_txt to 20%. Create a<br />

new font symbol in the library by selecting New Font from the Library options menu. Then<br />

set the linkage of the font to my font.Set the linkage for a font symbol to my font. Add the<br />

following ActionScript to your FLA or ActionScript file:<br />

var my_fmt:TextFormat = new TextFormat();<br />

my_fmt.font = "my font";<br />

// where 'my font' is the linkage name of a font in the Library<br />

this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 100,<br />

22);<br />

my_txt.border = true;<br />

my_txt.embedFonts = true;<br />

my_txt.text = "Hello World";<br />

my_txt.setTextFormat(my_fmt);<br />

my_txt._alpha = 20;<br />

See also<br />

_alpha (Button._alpha property), _alpha (MovieClip._alpha property)<br />

autoSize (TextField.autoSize property)<br />

public autoSize : Object<br />

Controls automatic sizing <strong>and</strong> alignment of text fields. Acceptable values for autoSize are<br />

"none" (the default), "left", "right", <strong>and</strong> "center". When you set the autoSize<br />

property, true is a synonym for "left" <strong>and</strong> false is a synonym for "none".<br />

The values of autoSize <strong>and</strong> TextField.wordWrap determine whether a text field exp<strong>and</strong>s or<br />

contracts to the left side, right side, or bottom side. The default value for each of these<br />

properties is false.<br />

If autoSize is set to "none" (the default) or false, then no resizing will occur.<br />

TextField 615

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!