![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 7.
my_cm
.copy()
None.
A ContextMenu object.
Method; creates a copy of the specified ContextMenu object. The copy inherits all the properties of the original menu object.
This example creates a copy of the ContextMenu object named my_cm
whose built-in menu items are hidden, and adds a menu item with the text "Save...". It then creates a copy of my_cm
and assigns it to the variable clone_cm
, which inherits all the properties of the original menu.
my_cm = new ContextMenu(); my_cm.hideBuiltInItems(); my_cm.customItems.push(new ContextMenuItem("Save...", saveHandler); function saveHandler (obj, menuItem) { saveDocument(); // custom function (not shown) } clone_cm = my_cm.copy();
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |