defaultButton - [Optional] - Identifies which of the available buttons should be the 'default' button (fired when the user presses the enter key), the default is BUTTON1. Valid values include: button1, button2, and button3.

prompt - The prompt to be displayed in the message box. Newline and tab characters may be used.

title - [Optional] - Text that should appear in the title bar of the message box, the default is the current application title.

forceShow - [Optional] - Forces SWF Studio to display the message box even if the window is hidden or minimized. If not specified, the default value is false. Valid values include: false and true.

Output Parameters:

result - Returns the name of the button that was pressed to dismiss the messagebox. Possible return values are an empty string (in case of an error) or one of YES,NO,OK,CANCEL,ABORT,RETRY,IGNORE. If the user dismisses the message box using the close (X) button, the default button is returned (most often this is the OK button.

A message box contains an application-defined message (prompt) and title, plus a combination of predefined icons and push buttons. The App.showMsgBox not only makes it possible to display these message boxes but to find out which button the user pressed to close the message box. This allows you to get simple answers from with your users in a way they are familiar with and with very little effort.

Examples:

The following example opens a message box with Yes and No buttons. The value of the chosen button is displayed in the SWF Studio Trace tab.