ContextMenu class
517
ContextMenu class
Availability
Flash Player 7.
Description
The ContextMenu class provides runtime control over the items in the Flash Player context
menu, which appears when a user right-clicks (Windows) or Control-clicks (Macintosh) on Flash
Player. You can use the methods and properties of the ContextMenu class to add custom menu
items, control the display of the built-in context menu items (for example, Zoom In and Print),
or create copies of menus.
In Flex, only top-level components in the application can have context menus. For example, if a
DataGrid control is a child of a TabNavigator or VBox container, the DataGrid control cannot
have its own context menu.
To add new items to a ContextMenu object, you create a ContextMenuItem object, and then add
that object to the
ContextMenu.customItems
array. For more information about creating
context menu items, see the
ContextMenuItem class
entry.
Flash Player has three types of context menus: the standard menu (which appears when you right-
click in Flash Player), the edit menu (which appears when you right-click over a selectable or
editable text field), and an error menu (which appears when a SWF file has failed to load into
Flash Player.) Only the standard and edit menus can be modified with the ContextMenu class.
Custom menu items always appear at the top of the Flash Player context menu, above any visible
built-in menu items; a separator bar distinguishes built-in and custom menu items. You can add
no more than 15 custom items to a context menu. You cannot remove the Settings menu item
from the context menu. The Settings menu item is required in Flash so users can access the
settings that affect privacy and storage on their computers. You also cannot remove the About
menu item from the context menu, which is required so users can find out what version of Flash
Player they are using.
You must use the constructor
new ContextMenu()
to create a ContextMenu object before calling
its methods.
Method summary for the ContextMenu class
Method
Description
ContextMenu.copy()
Returns a copy of the specified ContextMenu object.
ContextMenu.hideBuiltInItems()
Hides most built-in items in the Flash Player context menu.
CHAPTER 7
ActionScript for Flash
Содержание FLEX-FLEX ACTIONSCRIPT LANGUAGE
Страница 1: ...Flex ActionScript Language Reference...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Страница 135: ...case 135 See also break default strict equality switch...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in...
Страница 808: ...808 Chapter 7 ActionScript for Flash...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Страница 822: ...822 Index...