MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 340

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

Advertisement

This method hides only menu items that appear in the standard context menu; it does not affect
items that appear in the edit or error menus. For more information about the different menu
types, see the
ContextMenu class
This method works by setting all the Boolean members of
can selectively make a built-in item visible by setting its corresponding member in
my_cm.builtInItems
Example
The following example creates a new ContextMenu object named
items are hidden, except for Print. The menu object is attached to the root Timeline.
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
my_cm.builtInItems.print = true;
_root.menu = my_cm;
ContextMenu.onSelect
Availability
Flash Player 7.
Usage
my_cm.onSelect = function (item:Object, item_menu:ContextMenu) {
// your code here
}
Parameters
A reference to the object (movie clip, button, or selectable text field) that was under the
item
mouse pointer when the Flash Player context menu was invoked and whose
to a valid ContextMenu object.
A reference to the ContextMenu object assigned to the
item_menu
Returns
Nothing.
Description
Event handler; called when a user invokes the Flash Player context menu, but before the menu is
actually displayed. This lets you customize the contents of the context menu based on the current
application state.
You can also specify the callback handler for a ContextMenu object when you construct a new
ContextMenu object. For more information, see the
340
Chapter 12: ActionScript Dictionary
entry.
to
(as demonstrated in the following example).
true
my_cm.builtInItems
whose built-in menu
my_cm
menu
ContextMenu class
entry.
to
. You
false
property is set
menu
property of
.
object

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?

Questions and answers

Table of Contents