message box

how to display a message box in flash?
kdrameshAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SuperMarioCommented:
This can be done using FSCommand.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SuperMarioCommented:
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
SuperMarioCommented:
Oh, and, hehe... after you refresh the page, click the button ;)

-D
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.