Flash Player 7.
menu_cm
.copy()
menu_cm
An instance of the ContextMenu object to copy.
newMenu_cm
Identifier for the cloned ContextMenu object.
A ContextMenu object.
Method; creates a copy of the specified ContextMenu object. The copy inherits all the properties of the original menu object.
This examples creates a copy of the ContextMenu object named menu_cm
whose built-in menu items are hidden, and a menu item with the text "Save...". It then creates a copy of menu_cm
and assigns it to the variable clone_cm
, which inherits all the properties of the original menu.
menu_cm = new ContextMenu(); menu_cm.hideBuiltInItems(); menu_cm.customItems.push(new ContextMenuItem("Save...", saveHandler); function saveHandler (obj, menuItem) {} clone_cm = menu_cm.copy();