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.

A Boolean value that indicates whether the text field is selectable. If the value is true, the text<br />

is selectable. The selectable property controls whether a text field is selectable, not whether<br />

a text field is editable. A dynamic text field can be selectable even if it is not editable. If a<br />

dynamic text field is not selectable, you cannot select its text.<br />

If selectable is set to false, the text in the text field does not respond to selection<br />

comm<strong>and</strong>s from the mouse or keyboard, <strong>and</strong> the text cannot be copied using the Copy<br />

comm<strong>and</strong>. If selectable is set to true, the text in the text field can be selected using the mouse<br />

or keyboard. You can select text this way even if the text field is a dynamic text field instead of<br />

an input text field. You can also copy the text using the Copy comm<strong>and</strong>.<br />

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

Example<br />

The following example creates a selectable text field that constantly updates with the current<br />

date <strong>and</strong> time.<br />

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

22);<br />

date_txt.autoSize = true;<br />

date_txt.selectable = true;<br />

( var date_interval:Number = setInterval(updateTime, 500, date_txt);<br />

function updateTime(my_txt:TextField) {<br />

my_txt.text = new Date().toString();<br />

}<br />

setNewTextFormat (TextField.setNewTextFormat<br />

method)<br />

public setNewTextFormat(tf:TextFormat) : Void<br />

Sets the default new text format of a text field. The default new text format is the new text<br />

format used for newly inserted text such as text entered by a user. When text is inserted, the<br />

newly inserted text is assigned the default new text format.<br />

The new default text format is specified by textFormat, which is a TextFormat object.<br />

Parameters<br />

tf:TextFormat - A TextFormat object.<br />

Example<br />

In the following example, a new text field (called my_txt) is created at runtime <strong>and</strong> several<br />

properties are set. The format of the newly inserted text is applied.<br />

640 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!