menu: @
About This Program.../A | AboutBox()
menu: File
Quit/Q | QUIT
Note both the single-spaced lines and the presence of a few odd
characters. First there's the "@" symbol, which is always used in a
menu-creation context to refer to the Apple menu, virtually omnipresent
in the upper-lefthand corners of all Mac monitors. What you have
essentially said is the following:
An Apple menu will exist, with the item "About This Program..." immediately beneath it.
Note too that there's a "/A" following the regular About This
Program... text. The forward-slash character is used, in defining
menus, to specify the single key which can be pressed in combination
with the COMMAND (Macintosh) or CONTROL (Windows) keys in order to
execute the function in the menu. That is, in the menu above, the user
could either select About This Program... from your Apple menu or press
Command-A, according to the menu you've defined. If you choose not to
allow command keypressing, just leave out the characters with
forward-slashes.
Next is the vertical bar character, | . This is
used to tell Director — and your projector, when you compile it — that
what follows is a one-line command to be executed when that menu item
is selected (or its command key equivalent is pressed).
Under Director for Mac you can also enter ≈,
which is the OPTION+X key combination and gives you a wavy equals sign.
However, this is not a recognizable key combination under Windows, so
what you'd end up with after the port is garbage onscreen wherever the
≈ character was under Mac.
Since the vertical bar works for both Mac and
Windows, it makes sense to just use | in place of ≈, regardless of what
platform you're working in. (And it's esier to remember and type, being
simply the shifted backslash character and in plain sight on all
keyboards.)
Now we move on to the File menu, which is simply
defined by a new line and the menu: keyword. That menu contains only
one item, Quit, which can be selected using the mouse or by pressing
Command-Q. This has the same effect as clicking your QUIT button
onscreen, as you have probably inferred by now.
|
|