import mx.controls.Alert; private function selectText():void { myInput.selectionBeginIndex = 0; myInput.selectionEndIndex = myInput.text.length; myInput.setFocus(); }