First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Thomas Watson | Website: http://hikercentral.net

Once again, we go to the Components panel and click-drag an instance of the Message Box over onto the stage. Recall that we set up a separate layer to accept the box.

As you see here, this places a translucent "placeholder" image on the stage, and I've plopped it right over the two buttons. And as with all of our objects on the stage, start by giving this instance a name. I called mine errBox because it will mostly display error messages to the user.













If the Properties panel is not open, click the message box to open it. Now you can enter text you want to appear in the title bar of the message box and the message to display in the box. When you click on "icon" you get a choice of five icons that you may include in the message box.







Clicking on "OK" the default button, will open a window with which you may add additional buttons to the box along with their labels.

You may also add a "Click Handler" function that will be shared by all buttons, in which case you would need to pass a parameter to that function for each button. In my implementation here, it is not necessary that we have a click handler function, but simply use the default, which changes the visibility of the message box to false making it invisible.

In fact, that's how I've implemented the message box. It's always there, just invisible until needed. While it's invisible between calls, various parameters are changed to prepare it for the next call. Remember too, that it's disabled while invisible-- although it can also be disabled while visible as well, something you'll see in our code.

So let's go to a little scripting and see how all this fits together.

» Level Intermediate

Added: 2002-05-07
Rating: 9 Votes: 81
(10 being the highest)
» Author
Tom Watson is a Flash developer currently residing in Nashville, Tennessee. He's been an independant contractor in the computer business since 1989, working on web projects since the web was introduced to the Internet in 1994.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: doc_chin7
» Description:

The flash's horizontal road drive was done in CS4 and was upgraded to CS6. The car responds to right/ left key and flash will auto-generate the movement of roads from left-right or right-left based on random number. Have fun driving in this virtual environment and avoid other cars... :) If you are creative, a road driving game can be created from it.

Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.