ContextMenu.hideBuiltInItems()

Availability

Flash Player 7.

Usage

menu_cm.hideBuiltInItems()

Parameters

menu_cm An instance of the ContextMenu object.

Returns

Nothing.

Description

Method; hides all built-in menu items in the specified ContextMenu object. This method hides only menu items that appear in the standard context menu; it does not affect items that appear in the edit or error menus. For more information about the different menu types, see the ContextMenu object entry.

This method works by setting all the Boolean members of menu_cm.builtInItems to false. You can selectively make certain built-in items visible by setting their corresponding member in menu_cm.builtInItems to true (as demonstrated in the example below). You could

Example

The following example creates a new ContextMenu object that named menu_cm whose built-in menu items are hidden, except for Print. The menu object is attached to the root Timeline.

menu_cm = new ContextMenu();
menu_cm.hideBuiltInItems();
menu_cm.builtInItems.print = true;
_root.menu = menu_cm;