Clearing the TextArea texts when I press Enter key
How to clear the texts that I have typed into the TextArea when I press Enter Key?
I have now added a TextArea instance called input_txt to the stage and added an component event listener to detect when I press enter key. Then an event fires up which first reads the input to a string variable.
But next I need to automatically clear the texts in the TextArea.
How to do that?
function readInput(event:Event):void
{
input = input_txt.text;
trace(input);
// removing texts in the text input area-------- how?
}
input_txt.addEventListener(ComponentEvent.ENTER, readInput);
Please help.
Thank You