Recipe 3.8. Hiding the Flash Player's Menu ItemsProblemYou want to hide the right-click menu under Windows (Control-click on the Mac). SolutionYou 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.showDefaultContextMenu property to false. DiscussionBy default, the following options appear in the Flash Player's pop-up menu when the user right-clicks in Windows (or Control-clicks on the Mac):
You can remove many of the options with the following line of ActionScript code, although the Settings and About and debug player options remain in place: stage.showDefaultContextMenu = false; Unfortunately, Flash does not provide any 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. See AlsoSee Recipe 3.11 for a way to display Flash's Settings dialog box without requiring the user to right-click (in Windows) or Control-click (on Mac). |