[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

message box

Posted on 1999-12-29
3
Medium Priority
?
227 Views
Last Modified: 2010-04-07
how to display a message box in flash?
0
Comment
Question by:kdramesh
  • 3
3 Comments
 
LVL 3

Accepted Solution

by:
SuperMario earned 40 total points
ID: 2314149
This can be done using FSCommand.

I'll show you how in this upcoming comment.
0
 
LVL 3

Expert Comment

by:SuperMario
ID: 2314173
Let's say you have a button which will display the message box when clicked.

Right click the button in the scene. Bring up the Properties dialog, and click the Actions tab. Click the plus (+) icon, and drag down to the word FSCommand (it's under Get URL). Release.

It brings up a box for Commands and Arguments. In the Commands box, type

messagebox

In the Arguments box, type the message you want to show. Remember that quotation marks do NOT NEED to be preceded by a slash, as such:

Arguments: Don\'t forget to stop by later!

because Flash does that for you internally.

Click OK. Now, choose File menu -> Publish Settings... and click the HTML tab. Choose "Flash with FSCommand" from the Template drop-down box. Hit OK.

Now, choose File menu -> Publish. This creates the HTML file supporting your FSCommands in the same directory as Flash.exe.

Find the file you just created (if unnamed, it's Movie1.html) and edit the source code. This can be done by entering Notepad and opening your html file. There is an area that looks like this:

function Movie1_DoFSCommand(command, args) {

and in this block of code you see


//
// Place your code here...
//

Replace those three lines with this:

if(command == "messagebox") {
alert(args);
}

Save the movie and refresh the page.

That wasn't so bad, was it? <g>

-Dan
0
 
LVL 3

Expert Comment

by:SuperMario
ID: 2314177
Oh, and, hehe... after you refresh the page, click the button ;)

-D
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question