Go ahead and close your Movie Script window. Director will test your
syntax. If there's a problem, you'll be notified; make sure that what
you've entered looks like the foregoing. Now save your file and run it
by first rewinding the playback head and then clicking the play button.
You should see the standard Director menu replaced by whichever menu is
appropriate for your development system -- the menus you just defined.
If you select the About This Program...
menu item now, though, Director will return an error. Click CANCEL.
What's happened, of course, is that you issued the AboutBox() handler
call without actually defining precisely what AboutBox() is or does
(that's what that "| AboutBox()" stuff is doing after the About This
Program... menu item, after all).
To do this now, let's go back to your trusty
Movie Script. Below your LoadMenus() handler definition, add the
following text:
on AboutBox
ALERT "This 'Hello, World' program was written by [your name] using Macromedia Director."
END AboutBox
Note that there are only single quotation marks used around the title
"Hello, World" in the ALERT above. You can include double quotation
marks using a bit of fancy text-handling. For now, remember that
anything in an ALERT phrase which is to be seen onscreen is delimited
at the beginning and end only by double quotes; everything within those
quotes must be single-quoted.
|