TextField.onChanged
Availability
Flash Player 6.
Usage
my_txt.onChanged = function(){
// your statements here
}
myListenerObj.onChanged = function(){
// your statements here
}
Parameters
None.
Returns
The instance name of the text field.
Description
Event handler/listener; invoked when the content of a text field changes. By default, it is
undefined; you can define it in a script.
A reference to the text field instance is passed as a parameter to the
capture this data by putting a parameter in the event handler method. For example, the following
code uses
textfield_txt
parameter is then used in a
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
onChanged
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 field.
onChanged
as the parameter that is passed to the
statement to send the instance name of the text field to the
trace()
handler is fired only when the change results from user interaction; for example,
handler. You can
onChanged
event handler. The
onChanged
TextField.onChanged
901
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?