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.

Indicates the height of the text.<br />

Example<br />

The following example creates a text field, <strong>and</strong> assigns a string of text to the field. A trace<br />

statement is used to display the text height <strong>and</strong> width in the Output panel. The trace()<br />

method is used to write the text height <strong>and</strong> width in the log file. The autoSize property is<br />

then used to resize the text field, <strong>and</strong> the new height <strong>and</strong> width will also be displayed in the<br />

Output panel.The autoSize property is then used to resize the text field, <strong>and</strong> the new height<br />

<strong>and</strong> width also write to the log file.<br />

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

my_txt.text = "Sample text";<br />

trace("textHeight: "+my_txt.textHeight+", textWidth: "+my_txt.textWidth);<br />

trace("_height: "+my_txt._height+", _width: "+my_txt._width+"\n");<br />

my_txt.autoSize = true;<br />

trace("after my_txt.autoSize = true;");<br />

trace("_height: "+my_txt._height+", _width: "+my_txt._width);<br />

Which outputs the following information:<br />

textHeight: 15, textWidth: 56<br />

_height: 300, _width: 100<br />

after my_txt.autoSize = true;<br />

_height: 19, _width: 60<br />

See also<br />

textWidth (TextField.textWidth property)<br />

textWidth (TextField.textWidth property)<br />

public textWidth : Number<br />

Indicates the width of the text.<br />

Example<br />

See the example for TextField.textHeight.<br />

See also<br />

textHeight (TextField.textHeight property)<br />

type (TextField.type property)<br />

public type : String<br />

TextField 647

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

Saved successfully!

Ooh no, something went wrong!