
TextField.onKillFocus() Event Handler
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
853
Bugs
When text is entered rapidly into a text field (for example, when many keys are pressed
simultaneously), the new value of
theField.text may not yet be set when the onChanged()
handler executes. When rapid typing is expected, use setInterval() to wait until the new
text is available.
See Also
TextField.addListener(), TextField.removeListener(), TextField.type; Chapter 10.
TextField.onKillFocus() Event Handler
callback invoked when the field loses focus
Flash 6
theField.onKillFocus(newFocus)
Arguments
newFocus The TextField, MovieClip,orButton object that now has focus, or null if no
object received focus.
Description
The onKillFocus() event is triggered when theField loses focus. A text field is said to have
focus when it contains the text insertion point or when characters within it are selected. A
field gains focus when:
• The user clicks it with the mouse or navigates to it with the Tab key.
• Selection.setFocus() assigns focus programmatically.
A field loses focus (and onKillFocus() is executed) when:
• The user clicks somewhere outside the field or navigates away from it via the Tab key,
at which point focus may be transferred to whatever was tabbed to (a text field, movie
clip, or button). Clicking a button or ...