Onkillfocus (Textfield.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

A reference to the text field instance is passed as a parameter to the
handler. You
onChanged
can capture this data by putting a parameter in the event handler method. For example, the
following code uses
as the parameter that is passed to the
event
textfield_txt
onChanged
handler. The parameter is then used in a
statement to send the instance name of the
trace()
text field to the Output panel:
this.createTextField("myInputText_txt", 99, 10, 10, 300, 20);
myInputText_txt.border = true;
myInputText_txt.type = "input";
myInputText_txt.onChanged = function(textfield_txt:TextField) {
trace("the value of "+textfield_txt._name+" was changed. New value is:
"+textfield_txt.text);
};
The
handler is called only when the change results from user interaction; for
onChanged
example, when the user is typing something on the keyboard, changing something in the text
field using the mouse, or selecting a menu item. Programmatic changes to the text field do not
trigger the
event because the code recognizes changes that are made to the text
onChanged
field.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- The field triggering the event.
changedField:TextField
See also
,
TextFormat
setNewTextFormat (TextField.setNewTextFormat method)

onKillFocus (TextField.onKillFocus handler)

onKillFocus = function(newFocus:Object) {}
Invoked when a text field loses keyboard focus. The
method receives one
onKillFocus
parameter,
, which is an object representing the new object receiving the focus. If no
newFocus
object receives the focus,
contains the value
.
newFocus
null
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- The object that is receiving the focus.
newFocus:Object
TextField
667

Advertisement

Table of Contents
loading

Table of Contents