Onkillfocus (Movieclip.onkillfocus Handler) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

The following example sets input focus:
my_mc.focusEnabled = true;
Selection.setFocus(my_mc);
See also
,
,
getAscii (Key.getAscii method)
getCode (Key.getCode method)
focusEnabled
,
,
(MovieClip.focusEnabled property)
setFocus (Selection.setFocus method)
,
onKeyDown (Key.onKeyDown event listener)
onKeyDown (MovieClip.onKeyDown
handler)

onKillFocus (MovieClip.onKillFocus handler)

onKillFocus = function(newFocus:Object) {}
Invoked when a movie clip loses input focus. The
method receives one
onKillFocus
parameter, newFocus, which is an object that represents the new object receiving the focus. If
no object receives the focus,
contains the value
.
newFocus
null
You must define a function that executes when the event handler is invoked. You can define
the function on the Timeline or in a class file that extends the MovieClip class or is linked to
a symbol in the library.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- The object that is receiving the input focus.
newFocus:Object
Example
The following example displays information about the movie clip that loses focus, and the
instance that currently has focus. Two movie clips, called
and
, are on the
my_mc
other_mc
Stage. You can add the following ActionScript to your AS or FLA document:
my_mc.onRelease = Void;
other_mc.onRelease = Void;
my_mc.onKillFocus = function(newFocus) {
trace("onKillFocus called, new focus is: "+newFocus);
};
When you press the Tab key to move between the two instances, information is displayed in
the Output panel.
See also
onSetFocus (MovieClip.onSetFocus handler)
MovieClip
499

Advertisement

Table of Contents
loading

Table of Contents