copy (ContextMenuItem.copy method)
public copy() : ContextMenuItem
Creates and returns a copy of the specified ContextMenuItem object. The copy includes all
properties of the original object.
Availability: ActionScript 1.0; Flash Player 7
Returns
- A ContextMenuItem object.
ContextMenuItem
Example
This example creates a new ContextMenuItem object named
with the caption
original_cmi
Pause and a callback handler set to the function
. The example then creates a copy of
onPause
the ContextMenuItem object and assigns it to the variable
.
copy_cmi
var original_cmi:ContextMenuItem = new ContextMenuItem("Pause", onPause);
function onPause(obj:Object, menu:ContextMenu) {
trace("pause me");
}
var copy_cmi:ContextMenuItem = original_cmi.copy();
var my_cm:ContextMenu = new ContextMenu();
my_cm.customItems.push(original_cmi);
my_cm.customItems.push(copy_cmi);
my_mc.menu = my_cm;
enabled (ContextMenuItem.enabled property)
public enabled : Boolean
A Boolean value that indicates whether the specified menu item is enabled or disabled. By
default, this property is
.
true
Availability: ActionScript 1.0; Flash Player 7
ContextMenuItem
453
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?