DekGenius.com
[ Team LiB ] Previous Section Next Section

Recipe 2.9 Hiding the Flash Player's Menu Items

2.9.1 Problem

You want to hide the right-click menu under Windows (Ctrl-click on the Macintosh).

2.9.2 Solution

You can't disable the Flash Player's pop-up menu entirely, but you can minimize the options shown in the menu by setting the Stage.showMenu property to false.

2.9.3 Discussion

By default, the following options appear in the Flash Player's pop-up menu when the user right-clicks in Windows (or Ctrl-clicks on the Macintosh):

Zoom In
Zoom Out
100%
Show All
Quality (Low, Medium, or High)
Settings
Print
About Flash Player 6

You can remove most of the menu options with the following line of ActionScript code, although the Settings and About options remain in place:

Stage.showMenu = false;

Unfortunately, Flash does not provide a way to disable the menu entirely. Furthermore, Windows users are accustomed to using right-click to display a pop-up browser menu that allows them to open a link in a new window, for example. Such options are not available due to the Flash pop-up menu's presence. It is possible to use a third-party utility such as SWFKit or SWF Studio to completely disable the menu for enhanced Standalone Projectors (Windows versions only), as shown in Recipe 2.10.

2.9.4 See Also

See Recipe 2.8 for a way to display Flash's Settings dialog box without requiring the user to right-click (in Windows) or Ctrl-click (on Macintosh).

    [ Team LiB ] Previous Section Next Section