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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If you set this value to true, you must use st<strong>and</strong>ard HTML comm<strong>and</strong>s such as <strong>and</strong> <br />

to place line breaks in the text field.<br />

If the text field's .html is false, this property is ignored.<br />

Example<br />

The following example creates two text fields, called first_txt <strong>and</strong> second_txt. The white<br />

space is removed from the second text field. Add the following ActionScript to your FLA or<br />

ActionScript file:<br />

var my_str:String = "Hello\tWorld\nHow are you?\t\t\tEnd";<br />

this.createTextField("first_txt", this.getNextHighestDepth(), 10, 10, 160,<br />

120);<br />

first_txt.html = true;<br />

first_txt.multiline = true;<br />

first_txt.wordWrap = true;<br />

first_txt.condenseWhite = false;<br />

first_txt.border = true;<br />

first_txt.htmlText = my_str;<br />

this.createTextField("second_txt", this.getNextHighestDepth(), 180, 10,<br />

160, 120);<br />

second_txt.html = true;<br />

second_txt.multiline = true;<br />

second_txt.wordWrap = true;<br />

second_txt.condenseWhite = true;<br />

second_txt.border = true;<br />

second_txt.htmlText = my_str;<br />

See also<br />

html (TextField.html property)<br />

embedFonts (TextField.embedFonts property)<br />

public embedFonts : Boolean<br />

A Boolean value that specifies whether to render the text using embedded font outlines. If the<br />

value is true, Flash Lite renders the text field using embedded font outlines. If the value is<br />

false, Flash Lite renders the text field using device fonts.<br />

If you set embedFonts to true for a text field, you must specify a font for that text using the<br />

font property of a TextFormat object applied to the text field. If the specified font does not<br />

exist in the library (with the corresponding linkage identifier), the text is not displayed.<br />

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

620 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!