
MovieClip.onLoad () Event Handler
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
683
MovieClip.onKillFocus () Event Handler
handler executed when the clip loses keyboard focus
Flash 6
mc.onKillFocus(newFocus)
Arguments
newFocus The TextField, MovieClip,orButton 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:
• It defines at least one button event handler (onPress(), onRollOver(), etc.).
• Its
tabEnabled property is true, in which case it can be focused by the Tab key.
• Its
focusEnabled property is true, in which case it can be focused by Selection.setFocus().
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