![MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference Download Page 748](http://html1.mh-extra.com/html/macromedia/flex-flex-actionscript-language/flex-flex-actionscript-language_reference_3387192748.webp)
748
Chapter 7: ActionScript for Flash
TextField.selectable
Availability
Flash Player 6.
Usage
my_txt
.selectable
:Boolean
Description
Property; a Boolean value that indicates whether the text field is selectable. The value
true
indicates that the text is selectable. The
selectable
property controls whether a text field is
selectable, and not whether a text field is editable. A dynamic text field can be selectable even if
it's not editable. If a dynamic text field is not selectable, that means 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.
The text can be copied using the Copy command.
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();
}
TextField.setNewTextFormat()
Availability
Flash Player 6.
Usage
my_txt
.setNewTextFormat(
textFormat:TextFormat
)
: Void
Parameters
textFormat
A
TextFormat
object.
Returns
Nothing.
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...