Hidebuiltinitems (Contextmenu.hidebuiltinitems Method); Onselect (Contextmenu.onselect Handler) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

hideBuiltInItems (ContextMenu.hideBuiltInItems
method)
public hideBuiltInItems() : Void
Hides all built-in menu items (except Settings) in the specified ContextMenu object. If the
Flash Debug Player is running, the Debugging menu item shows, although it is dimmed for
SWF files that don't have remote debugging enabled.
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.
This method works by setting all the Boolean members of
to
.
my_cm.builtInItems
false
You can selectively make a built-in item visible by setting its corresponding member in
to
(as demonstrated in the following example).
my_cm.builtInItems
true
Availability: ActionScript 1.0; Flash Player 7
Example
The following example creates a new ContextMenu object named
whose built-in menu
my_cm
items are hidden, except for Print. The menu object is attached to the current Timeline.
var my_cm:ContextMenu = new ContextMenu();
my_cm.hideBuiltInItems();
my_cm.builtInItems.print = true;
this.menu = my_cm;

onSelect (ContextMenu.onSelect handler)

onSelect = function(item:Object, item_menu:Object) {}
Called when a user invokes the Flash Player context menu, but before the menu is actually
displayed. This event handler allows customization of the contents of the context menu based
on the current application state.
It is also possible to specify the callback handler for a ContextMenu object when constructing
a new ContextMenu object. For more information, see the ContextMenuItem
onSelect
entry.
Availability: ActionScript 1.0; Flash Player 7
448
ActionScript classes

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF