R – TextField() – how to prevent mouse select

actionscript-3flex3

How can I prevent mouse selecting (and moving caret) with Editable TextField(),
this one does not seem to fully work when SELECTING text, but it prevents clicking. I want to keep cursor in place where its going.

protected function handleMouseDEvent(evt:MouseEvent):void {
if (evt.type == MouseEvent.MOUSE_DOWN) {
var max : int;
max = this.text.length;
this.setSelection(max, max) // SET CURSOR POSITION  
}
}

Best Answer

How about selectable="false"?

Related Topic