Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > MovieClip > onKillFocus (MovieClip.onKillFocus handler) | |||
onKillFocus = function(newFocus:Object) {}
Invoked when a movie clip loses keyboard focus. The onKillFocus method receives one parameter, newFocus, which is an object that represents the new object receiving the focus. If no object receives the focus, newFocus contains the value 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 Player 6
newFocus:Object - The object that is receiving the keyboard focus.
The following example reports information about the movie clip that loses focus, and the instance that currently has focus. Two movie clips, called my_mc and other_mc, are on the Stage. 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);
};
Tab between the two instances, and information displays in the Output panel.
onSetFocus (MovieClip.onSetFocus handler)
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00001948.html