ContextMenuItem
451
Constructor summary
Method summary
Methods inherited from class Object
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;
Signature
Description
ContextMenuItem
(caption:Str
ing,
callbackFunction:Function,
[separatorBefore:Boolean],
[enabled:Boolean],
[visible:Boolean])
Creates a new ContextMenuItem object that can be added to
the
ContextMenu.customItems
array.
Modifiers
Signature
Description
copy
() :
ContextMenuItem
Creates and returns a copy of the specified
ContextMenuItem object.
addProperty (Object.addProperty method)
,
hasOwnProperty
(Object.hasOwnProperty method)
,
isPropertyEnumerable
(Object.isPropertyEnumerable method)
,
isPrototypeOf (Object.isPrototypeOf
method)
,
registerClass (Object.registerClass method)
,
toString
(Object.toString method)
,
unwatch (Object.unwatch method)
,
valueOf
(Object.valueOf method)
,
watch (Object.watch method)
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...