Textfield.onkillfocus - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

TextField.onKillFocus

Availability
Flash Player 6.
Usage
my_txt.onKillFocus = function(newFocus:Object){
// your statements here
}
Parameters
The object that is receiving the focus.
newFocus
Returns
Nothing.
Description
Event handler; invoked when a text field loses keyboard focus. The
one parameter,
newFocus
no object receives the focus,
Example
The following example creates two text fields called
focus to a text field, information about the text field with current focus and the text field that lost
focus is displayed in the Output panel.
this.createTextField("first_txt", 1, 10, 10, 300, 20);
first_txt.border = true;
first_txt.type = "input";
this.createTextField("second_txt", 2, 10, 40, 300, 20);
second_txt.border = true;
second_txt.type = "input";
first_txt.onKillFocus = function(newFocus:Object) {
trace(this._name+" lost focus. New focus changed to: "+newFocus._name);
};
first_txt.onSetFocus = function(oldFocus:Object) {
trace(this._name+" gained focus. Old focus changed from: "+oldFocus._name);
}
See Also
TextField.onSetFocus
902
Chapter 2: ActionScript Language Reference
, which is an object representing the new object receiving the focus. If
contains the value
newFocus
onKillFocus
.
null
and
first_txt
second_txt
method receives
. When you give

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents