Lingo Dictionary > L-N > menu |  |

menu

Syntax

    menu: menuName
    itemName | script
    itemName | script
    ...

or

    menu: menuName
    itemName | script
    itemName | script
    ...
    [more menus]

Description

Keyword; in conjunction with the `installMenu` command, specifies the actual content of custom menus. Field cast members contain menu definitions; refer to them by the cast member name or number.

The`menu` keyword is followed immediately by a colon, a space, and the name of the menu. In subsequent lines, specify the menu items for that menu. You can set a script to execute when the user chooses an item by placing the script after the vertical bar symbol`` (|). A new menu is defined by the subsequent occurrence of the `menu` keyword.

Note: Menus are not available in Shockwave.

On the Macintosh, you can use special characters to define custom menus. These special characters are case sensitive. For example, to make a menu item bold, the letter B must be uppercase.

Special symbols should follow the item name and precede the vertical bar symbol (|). You can also use more than one special character to define a menu item. Using <B<U, for example, sets the style to Bold and Underline.

Avoid special character formatting for cross-platform movies because not all Windows computers support it.

Symbol | Example | Description
--- | --- | ---
@ | menu: @ | On the Macintosh, creates the Apple symbol and enables Macintosh menu bar items when you define an Apple menu.
!Ã | !ÃEasy Select | On the Macintosh, checks the menu with a check mark (Option+v).
<B | Bold<B | On the Macintosh, sets the menu item's style to Bold.
<I | Italic<I | On the Macintosh, sets the style to Italic.
<U | Underline<U | On the Macintosh, sets the style to Underline.
<O | Outline<O | On the Macintosh, sets the style to Outline.
<S | Shadow<S | On the Macintosh, sets the style to Shadow.
| | Open/O | go to frame "Open" | Associates a script with the menu item.
/ | Quit/Q | Defines a command-key equivalent.
( | Save( | Disables the menu item.
(- | (- | Creates a disabled line in the menu.

Example

This is the text of a field cast member named CustomMenu2 which can be used to specify the content of a custom File menu. To install this menu, use "`installMenu member("CustomMenu2")`" while the movie is running. The Convert menu item runs the custom handler `convertThis`.

    menu: File
    Open/O | go to frame "Open"
    Close/W | go to frame "Close"
    Convert/C | convertThis
    	(-
    Quit/Q | go to frame "Quit"

See also

`installMenu`, `name (menu property)`, `name (menu item property)`, `number (menu items)`, `checkMark`, `enabled`, `script`