|[ LiB ]|
By default, right-clicking on any Flash movie will bring up a list of options for the person viewing it. They can Zoom, Print, and even control the playback of your movie. In Flash MX, the only way around this was to set a special parameter in the HTML that contained your Flash movie to disable the right-click menu.
With the release of Flash MX 2004, there is a new AS object called ContextMenu that enables you to have control over that same right-click menu. Add the following code to the first keyframe in your main Timeline, publish your movie, and right-click on it to see what happens.
var newMenu = new ContextMenu (); newMenu.hideBuiltInItems(); _root.menu = newMenu;
You'll see that all right-click options have been disabled, and the user only gets the Settings and About options when the menu appears. These two remaining options cannot be hidden because they control a user's plug-in settings and give information about the version.
|[ LiB ]|