S > Selection.getFocus |
![]() ![]() ![]() |
Selection.getFocus
Availability
Flash Player 5. Instance names for buttons and text fields work in Flash Player 6.
Usage
Selection.getFocus()
Parameters
None.
Returns
Nothing.
Description
Method; returns the variable name of the text field that has focus. If no text field has focus, the method returns null
. If the current focus is a button, and the button is an instance of the Button object, getFocus
returns the target path as a string. If the current focus is a text field, and the text field is an instance of the TextField object, getFocus
returns the target path as a string.
If a button movie clip is the currently focused button, Selection.getFocus
returns the target path of the button movie clip. If a Text Field with an instance name is currently focused, Selection.getFocus
returns the target path of the TextField object. Otherwise, it returns the Text Field's variable name.
![]() ![]() ![]() |