ContextMenuItem
455
Parameters
obj
:Object
- A reference to the object (movie clip, Timeline, button, or selectable text field)
on which the user right or Control clicked.
menuItem
:Object
- A reference to the selected ContextMenuItem object.
Example
The following example determines over what type of object the context menu was invoked.
var my_cmi:ContextMenu = new ContextMenu();
var start_cmi:ContextMenuItem = new ContextMenuItem("Start");
start_cmi.onSelect = function(obj, item) {
trace("You chose: "+item.caption);
};
my_cmi.customItems.push(start_cmi);
my_cmi.customItems.push(new ContextMenuItem("Stop", stopHandler, true));
function stopHandler(obj, item) {
trace("Stopping...");
}
this.menu = my_cmi;
See also
onSelect (ContextMenu.onSelect handler)
separatorBefore (ContextMenuItem.separatorBefore
property)
public separatorBefore : Boolean
A Boolean value that indicates whether a separator bar should appear above the specified
menu item. By default, this property is
false
.
Availability:
ActionScript 1.0; Flash Player 7
NO
TE
A separator bar always appears between any custom menu items and the built-in menu
items.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...