FocusManager.setFocus()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004 and Flash MX Professional 2004.

Usage

focusManager.setFocus(object)

Parameters

object A reference to the object to receive focus.

Returns

Nothing.

Description

Method; sets focus to the specified object. If the object to which you want to set focus is not on the main timeline, use the following code:

_root.focusManager.setFocus(object);

Example

The following code sets focus to myOKButton:

focusManager.setFocus(myOKButton);

See also

FocusManager.getFocus()


Flash CS3