O'Reilly logo

Actionscript Cookbook by Joey Lott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.9. Hiding the Flash Player’s Menu Items

Problem

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

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.

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.

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).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required