mSystem.messageBox()

Availability

Windows: Flash 8 or 9 AS2.0 SWF + mProjector 3.0; Windows 98/ME/NT Support: Flash 7 SWF + mProjector 2.0 build 'cw';

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 2.0;

Usage

mSystem.messageBox(message:String, title:String, type:String) : String

Parameters

message - The message-dialog message.

title - The message-dialog title.

type - Specifies the buttons of the dialog box. type = 0: The message box contains one push button: OK. This is the default. type = 1: The message box contains two push buttons: OK and Cancel. type = 2: The message box contains three push buttons: Abort, Retry, and Ignore. type = 3: The message box contains three push buttons: Yes, No, and Cancel. type = 4: The message box contains two push buttons: Yes and No.

Returns

A string.; ; Possbile return values: "ABORT" "CANCEL" "CONTINUE" "IGNORE" "YES" "NO" "OK" "RETRY" "TRYAGAIN"

Description

Method; Launches OS standard modal message dialog window. Returns button pressed by user.

Example

This ia an example of a three button modal dialog box.

var MB_OK = 0;
var MB_OKCANCEL = 1;
var MB_ABORTRETRYIGNORE = 2;
var MB_YESNOCANCEL = 3;
var MB_YESNO = 4;
var MB_RETRYCANCEL = 5;

var title:String = "Question";
var message:String = "Are you feeling lucky?";
var answer:String = mSystem.messageBox(title, message, MB_YESNO);
switch (answer) {
    case "YES":
       gotoAndPlay("Yes_Answer");
       break;		
    case "NO":
       gotoAndPlay("No_Answer");
       break;
}

Code Examples

Message Box