MovieClip.onKillFocus ( ) Event Handler | Flash 6 |
handler executed when the clip loses keyboard focus |
The TextField, MovieClip, or Button object that now has focus, or null if no object has received focus.
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( ).
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.
Button.onKillFocus( ), MovieClip.focusEnabled, MovieClip.tabEnabled, MovieClip._focusrect, Selection.setFocus( ), Selection.onSetFocus( )