TextField
657
Example
The following example creates two text fields, called
first_txt
and
second_txt
. The white
space is removed from the second text field. Add the following ActionScript to your FLA or
ActionScript file:
var my_str:String = "Hello\tWorld\nHow are you?\t\t\tEnd";
this.createTextField("first_txt", this.getNextHighestDepth(), 10, 10, 160,
120);
first_txt.html = true;
first_txt.multiline = true;
first_txt.wordWrap = true;
first_txt.condenseWhite = false;
first_txt.border = true;
first_txt.htmlText = my_str;
this.createTextField("second_txt", this.getNextHighestDepth(), 180, 10,
160, 120);
second_txt.html = true;
second_txt.multiline = true;
second_txt.wordWrap = true;
second_txt.condenseWhite = true;
second_txt.border = true;
second_txt.htmlText = my_str;
See also
html (TextField.html property)
embedFonts (TextField.embedFonts property)
public embedFonts :
Boolean
A Boolean value that specifies whether to render the text using embedded font outlines. If the
value is
true
, Flash Lite renders the text field using embedded font outlines. If the value is
false
, Flash Lite renders the text field using device fonts.
If you set
embedFonts
to
true
for a text field, you must specify a font for that text using the
font
property of a TextFormat object applied to the text field. If the specified font does
not
exist in the library (with the corresponding linkage identifier), the text is not displayed.
Note:
This property is not supported for Arabic, Hebrew, and Thai.
Availability:
ActionScript 1.0; Flash Lite 2.0
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...