|
|
Set Focus TextField, Button or TextArea To set the focus of a widget you use the stage. (Most other languages the focus is requested by the widget itself, hence the confusion for some). stage.focus = textfield_1; It's that simple! The focus attribute expects an 'InteractiveObject'. Usually that's a button, textfield, textarea, etc... But in this case any type of Sprite or MovieClip would also be an 'InteractiveObject' Object ^ EventDispatcher ^ DisplayObject ^ InteractiveObject ^ DisplayObjectContainer ^ Sprite ^ MovieClip |
||
| |||||||||||||||||||||