MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 343

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

my_cm = new ContextMenu();
my_cm.customItems.push(new ContextMenuItem("Start", startHandler));
my_cm.customItems.push(new ContextMenuItem("Stop", stopHandler, true));
function stopHandler(obj, item) {
trace("Stopping...");
}
function startHandler(obj, item) {
trace("Starting...");
}
_root.menu = my_cm;
ContextMenuItem.caption
Availability
Flash Player 7.
Usage
menuItem_cmi.caption
Description
Property; a string that specifies the menu item caption (text) displayed in the context menu.
Example
This example displays the caption for the selected menu item (Pause Game) in the Output panel.
my_cm = new ContextMenu();
menuItem_cmi = new ContextMenuItem("Pause Game", onPause);
my_cm.customItems.
function onPause(obj, menuItem) {
trace("You chose: " + menuItem.caption);
}
ContextMenuItem.copy()
Availability
Flash Player 7.
Usage
menuItem_cmi.copy();
Returns
A ContextMenuItem object.
Description
Method; creates and returns a copy of the specified ContextMenuItem object. The copy includes
all properties of the original object.
ContextMenuItem.copy()
343

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents