SWF Maestro: versatile SWF-to-EXE, SWF-to-SCR compiler with a lot of features. Creates applications, games, screensavers from SWF files.

Working with the context menu

Use these commands to control the context menu that is opened with a right click.

Command Availability Arguments Purpose
menu.enabled EXE true or false Specifying true enables the context menu. Specifying false disables the context menu.
menu.setitems EXE labels and functions of the items separated with a vertical bar. Configures items in the context menu.

menu.enabled

Synonym for showmenu.

menu.setitems

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”);