Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-10-2004, 03:16 PM   #1
Brucecris
I love you.
 
Join Date: Sep 2004
Posts: 1
Send a message via AIM to Brucecris
Default ALERT COMONENT: Custom YES,NO button labels

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
Brucecris is offline   Reply With Quote
Old 09-10-2004, 04:05 PM   #2
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

hi and welcome

PHP Code:
.....
..
Alert.yesLabel "What ever you vant";
var 
exitAlert Alert.show(_global.exittext_global.exittitleAlert.YES Alert.NOnull ,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");

Xeef is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:53 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.