I have an alert that I need to customize the response buttons for. The below code launches the alert just fine but it does not change the alert's button labels. Can you guys lend a hand as to what the problem might be? A previous thread was posted here
Custom Text on Alert Component Buttons but it doenst help me out.
The label text is stored in a global vars _global.yesbutton , _global.nobutton
on (click) {
import mx.controls.Alert;
alertlistener = function (evt) {
if (evt.detail == Alert.YES) { // if user clicks YES then do below, if NO then alert closes by default
fscommand("quit", "");
}
};
var exitAlert = Alert.show(_global.exittext, _global.exittitle, Alert.YES | Alert.NO, null ,alertlistener, "question");
//set label text
exitAlert.yesLabel = _global.yesbutton;
exitAlert.noLabel = _global.nobutton;
//set styles
exitAlert.setStyle("themeColor", "haloBlue");
exitAlert.setStyle("fontFamily", "Verdana");
exitalert.setStyle("fontSize", "11");
}
Thanks! Bruce