Table of Contents

MovieClip.onKillFocus ( ) Event Handler Flash 6

handler executed when the clip loses keyboard focus
mc.onKillFocus(newFocus)

Arguments

newFocus

The TextField, MovieClip, or Button object that now has focus, or null if no object has received focus.

Description

The onKillFocus( ) event handler executes when mc loses keyboard focus. A movie clip can be keyboard-focused only under one or more of the following circumstances:

A movie clip loses focus in the same manner as a button, as described under Button.onKillFocus( ). The onKillFocus( ) handler can be used to remove a highlight state on a focused interface element. In simple cases, this can also be done with the special _up and _over frame labels. See MovieClip.focusEnabled and MovieClip._focusrect.

To capture all focus events centrally, rather than for a single instance, use Selection.onSetFocus( ).

Usage

Take note that onKillFocus( ) cannot be used in a Flash 5-style onClipEvent( ) block.

The onKillFocus( ) handler does not work with main movie timelines (e.g., _root, _level1, _level2) because main timelines cannot receive input focus.

See Also

Button.onKillFocus( ), MovieClip.focusEnabled, MovieClip.tabEnabled, MovieClip._focusrect, Selection.setFocus( ), Selection.onSetFocus( )


Table of Contents