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

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.





Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net