EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Copy (Contextmenuitem.copy Method); Enabled (Contextmenuitem.enabled Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ContextMenuItem 453
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
ContextMenuItem - A ContextMenuItem object.
Example
This example creates a new ContextMenuItem object named
original_cmi with the caption
Pause and a callback handler set to the function
onPause. The example then creates a copy of
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

Table of Contents

Related product manuals