FocusManager.getFocus()

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004 and Flash MX Professional 2004

Usage

focusManager.getFocus()

Parameters

None.

Returns

A reference to the object that has focus.

Description

Method; returns a reference to the object that currently has focus.

Example

The following code sets the focus to myOKButton if the currently focused object is myInputText:

if (focusManager.getFocus() == myInputText)
{
  focusManager.setFocus(myOKButton);
}

See also

FocusManager.setFocus()