Flash Lite 2.x and 3.0 ActionScript Language Reference

selectable (TextField.selectable property)

public selectable : Boolean

A Boolean value that indicates whether the text field is selectable. If the value is true, the text is selectable. The selectable property controls whether a text field is selectable, not whether a text field is editable. A dynamic text field can be selectable even if it is not editable. If a dynamic text field is not selectable, you cannot select its text.

If selectable is set to false, the text in the text field does not respond to selection commands from the mouse or keyboard, and the text cannot be copied using the Copy command. If selectable is set to true, the text in the text field can be selected using the mouse or keyboard. You can select text this way even if the text field is a dynamic text field instead of an input text field. You can also copy the text using the Copy command.

Note: This property is not supported for Arabic, Hebrew, and Thai.

Example

The following example creates a selectable text field that constantly updates with the current date and time.

this.createTextField("date_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
date_txt.autoSize = true;
date_txt.selectable = true;

( var date_interval:Number = setInterval(updateTime, 500, date_txt);
function updateTime(my_txt:TextField) {
    my_txt.text = new Date().toString();
}