21.10. Hiding the Context Menus

Problem

You want to hide the context menu.

Solution

Use the Stage.showMenu property.

Discussion

By default, Flash movies display a context menu when the user right-clicks/Control-clicks. The default context menu contains options to zoom, change the quality, open the Flash Player settings, print, and display the About Macromedia Flash Player Web page. (The test player has slightly different context menu items.) You cannot completely hide the context menu. However, you can hide most of the items except the Settings and About Macromedia Flash Player. You can accomplish that with one line of ActionScript code:

	Stage.showMenu = false;

If you want to completely hide the context menus, you’ll have to export the Flash content as a projector using one of the third-party projector exporting applications that enables that sort of functionality.

Tip

It’s possible to customize the context menus by adding custom items. Doing so requires some detailed ActionScript and is primarily useful only when writing sophisticated ActionScript applications. Therefore, it is not within the scope of this book.

Get Flash 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.