Returns
Nothing.
Description
Method; sends a
method to programmatically send a
Example
The following code triggers the default push button
password fields when a user selects the CheckBox instance
"Automatic Login"):
name_txt.tabIndex = 1;
password_txt.tabIndex = 2;
chb.tabIndex = 3;
submit_ib.tabIndex = 4;
focusManager.defaultPushButton = submit_ib;
chbObj = new Object();
chbObj.click = function(o){
if (chb.selected == true){
name_txt.text = "Jody";
password_txt.text = "foobar";
focusManager.sendDefaultPushButtonEvent();
} else {
name_txt.text = "";
password_txt.text = "";
}
}
chb.addEventListener("click", chbObj);
submitObj = new Object();
submitObj.click = function(o){
if (password_txt.text != "foobar"){
trace("error on submit");
} else {
trace("Yeah! sendDefaultPushButtonEvent worked!");
}
}
submit_ib.addEventListener("click", submitObj);
See also
FocusManager.defaultPushButton
428
Chapter 6: Components Dictionary
event to listener objects registered to the default push button. Use this
click
click
event.
event and fills in the user name and
click
(the check box would be labeled
chb
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?