Use these commands to control the context menu that is opened with a right click.
| Command | Arguments | Purpose |
| menu.enabled | true or false | Specifying true enables the context menu. Specifying false disables the context menu. |
| menu.setitems | labels and functions of the items separated with a vertical bar. | Configures items in the context menu. |
Synonym for showmenu.
This command cancels all current options of the context
menu and specifies new options. Use it when you need different context
menus in different situations. Alternate the label of the item and the
callback function executed once it is selected in the arguments. They
should be separated with a vertical pipe character '|'.
Note. To insert a separator bar in the context menu, specify an option
with a hyphen '-' in its label.
To register an ActionScript method as a callback function you should use the ExternalInterface.addCallback method.
For example, the following script specifies a context menu with two options (Play and Stop) and a horizontal bar between them. The first option calls the mnuPlay callback function and the second one calls the mnuStop callback function.
fscommand(“menu.setitems”, “Play|mnuPlay|-|-|Stop|mnuStop”);
All rights reserved © 2007 ChameleonFlash.com