MovieClip.menu

Availability

Flash Player 7.

Usage

my_mc.menu = contextMenu

Parameters

contextMenu A ContextMenu object.

Description

Property; associates the specified ContextMenu object with the movie clip my_mc. The ContextMenu class lets you modify the context menu that appears when the user right-clicks (Windows) or Control-clicks (Macintosh) in Flash Player.

Example

The following example assigns the ContextMenu object menu_cm to the movie clip content_mc. The ContextMenu object contains a custom menu item labeled "Print..." that has an associated callback handler named doPrint().

var menu_cm = new ContextMenu();
menu_cm.customItems.push(new ContextMenuItem("Print...", doPrint));
function doPrint(menu, obj) {
  // "Print" code here
}
content_mc.menu = menu_cm;

See also

Button.menu, ContextMenu class, ContextMenuItem class, TextField.menu