Constructor summary
Signature
ContextMenuItem(caption:Str
ing,
callbackFunction:Function,
[separatorBefore:Boolean],
[enabled:Boolean],
[visible:Boolean])
Method summary
Modifiers
Signature
copy() :
ContextMenuItem
Methods inherited from class Object
addProperty (Object.addProperty
(Object.hasOwnProperty
(Object.isPropertyEnumerable
method),
registerClass (Object.registerClass
(Object.toString
(Object.valueOf
method),
caption (ContextMenuItem.caption property)
public caption : String
A string that specifies the menu item caption (text) displayed in the context menu.
Availability: ActionScript 1.0; Flash Player 7
Example
The following example displays the caption for the selected menu item (Pause Game) in the
Output panel:
var my_cm:ContextMenu = new ContextMenu();
var menuItem_cmi:ContextMenuItem = new ContextMenuItem("Pause Game",
onPause);
my_cm.customItems.push(menuItem_cmi);
function onPause(obj, menuItem) {
trace("You chose: " + menuItem.caption);
}
this.menu = my_cm;
Description
Creates a new ContextMenuItem object that can be added to
the ContextMenu.customItems array.
Description
Creates and returns a copy of the specified
ContextMenuItem object.
method),
method),
isPropertyEnumerable
method),
method),
unwatch (Object.unwatch
watch (Object.watch method)
hasOwnProperty
isPrototypeOf (Object.isPrototypeOf
method),
toString
method),
valueOf
ContextMenuItem
451
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?