Contextmenuitem Class - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

ContextMenuItem class

Availability
Flash Player 7.
Description
You use the ContextMenuItem class to create custom menu items to display in the Flash Player
context menu. Each ContextMenuItem object has a caption (text) that is displayed in the context
menu, and a callback handler (a function) that is invoked when the menu item is selected. To add
a new context menu item to a context menu, you add it to the
ContextMenu object.
You can enable or disable specific menu items, make items visible or invisible, or change the
caption or callback handler associated with a menu item.
Custom menu items appear at the top of the context menu, above any built-in items. A separator
bar always divides custom menu items from built-in items. You can add no more than 15 custom
items to a context menu. Each item must contain at least one visible character— control
characters, newlines, and other white space characters are ignored. No item can be more than 100
characters long. Items that are identical to any built-in menu item, or to another custom item, are
ignored, whether the matching item is visible or not. Menu items are compared without regard to
case, punctuation, or white space.
None of the following words can appear in a custom item: Macromedia, Flash Player, or Settings.
Method summary for the ContextMenuItem class
Method
ContextMenuItem.copy()
Property summary for the ContextMenuItem class
Property
ContextMenuItem.caption
ContextMenuItem.enabled
ContextMenuItem.separatorBefore
ContextMenuItem.visible
Event handler summary for the ContextMenuItem class
Event handler
ContextMenuItem.onSelect
ActionScript Language Reference
Description
Returns a copy of the specified ContextMenuItem object.
Description
Specifies the text displayed in the menu item.
Specifies whether the menu item is enabled or disabled.
Specifies whether a separator bar should appear above the
menu item.
Specifies whether the menu item is visible.
Description
Invoked when the menu item is selected.
CHAPTER 2
array of a
customItems
ContextMenuItem class
221

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents