How can I detect when a particular textbox has gain focus, (both by keyboard and by mouse click). For example, when you click on a text box I just want a Alert popup.
I’m trying to do something like
protected function textbox1_changeHandler(event:Event):void
{
if(textbox1.IsFocus){
//run some code
}
}
I know IsFocus doesn’t exsist, but is there anything that will let me do the similar?
I’m using Flash Builder 4.6 and the component is mx:TextInput
Thanks
Use the focusIn event.
Conceptually like this:
If you want to find out if a textInput has has focus, you can use the getFocus() method. Conceptually like this: