0
Removing Focus from input text field
Explorer
,
/t5/animate-discussions/removing-focus-from-input-text-field/td-p/4083341
Apr 03, 2012
Apr 03, 2012
Copy link to clipboard
Copied
How to remove focus from
1. The input field if the user clicks outside the input field.
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/animate-discussions/removing-focus-from-input-text-field/m-p/4083342#M116016
Apr 03, 2012
Apr 03, 2012
Copy link to clipboard
Copied
While it depends partly on what is outside the textfield, one way would be to add an event listener to the stage and then check what was clicked. If it happened to be the stage, set the focus onto the stage.
stage.addEventListener(MouseEvent.MOUSE_UP, focusStage);
function focusStage(evt:MouseEvent):void {
if(evt.target == stage){
stage.focus = stage;
}
}
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

