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.

Example<br />

The following example creates an HTML text field called my_txt, <strong>and</strong> assigns an HTMLformatted<br />

string of text to the field. When you trace the htmlText property, the Output panel<br />

displays the HTML-formatted stringthe HTML-formatted string writes to the log file. When<br />

you trace the value of the text property, the unformatted string with HTML tags appears in<br />

the Output panel.When you trace the value of the text property, the unformatted string with<br />

HTML tags writes to the log file.<br />

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

22);<br />

my_txt.html = true;<br />

my_txt.htmlText = "Remember to always update the help panel.";<br />

trace("htmlText: "+my_txt.htmlText);<br />

trace("text: "+my_txt.text);<br />

// output:<br />

htmlText: <br />

Remember to always update your help panel.<br />

text: Remember to always update your help panel.<br />

See also<br />

htmlText (TextField.htmlText property)<br />

textColor (TextField.textColor property)<br />

public textColor : Number<br />

Indicates the color of the text in a text field. The hexadecimal color system uses six digits to<br />

represent color values. Each digit has sixteen possible values or characters. The characters<br />

range from 0 to 9 <strong>and</strong> then A to F. Black is represented by (#000000) <strong>and</strong> white, at the<br />

opposite end of the color system, is (#FFFFFF).<br />

Example<br />

The following ActionScript creates a text field <strong>and</strong> changes its color property to red.<br />

this.createTextField("my_txt", 99, 10, 10, 100, 300);<br />

my_txt.text = "this will be red text";<br />

my_txt.textColor = 0xFF0000;<br />

textHeight (TextField.textHeight property)<br />

public textHeight : Number<br />

646 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!