There are so many new features in Flash MX 2004 that I haven’t even gotten around to looking at some of them. I knew there was a way to play with the “right-click menu” in there, but just recently started digging into it. Since I haven’t seen much about it, I figured I’d write up what I found, so people will realize how easy it is to customize this element.
</b></li>
* Now you can start messing with the menu. The main thing that anyone wants to do is to hide the built in items that are usually seen on that menu. This is done like so:
**
var myMenu:ContextMenu;
myMenu = new ContextMenu();
_root.menu = myMenu;
myMenu.hideBuiltInItems();**
Note that you can't get rid of the "Settings" and "About" items. Those are there to stay… at least until someone finds a way to hack them out.</li>
* Rather than remove ALL of the built in items, you might want to just remove one or a few of them. All of the possible items that can appear on the menu are members of the "builtInItems" object which is a member of the ContextMenu object. You can just set each one to true or false to show or hide it. For instance if we wanted to hide the "Quality" menu item, we could say instead:
**
myMenu.builtInItems.quality = false;**
If you've set up the code as above, you should get a list of code hints showing the available options right after you type "myMenu.".</li>
* Next, we can set up a function that will be run whenever the right-click menu is opened. We just assign the function to the "onSelect" property of the ContextMenu object:
**
myMenu.onSelect = notify;
function notify() {
    trace("You Right-Clicked!");
}**
Of course, you'd probably want to set up something more useful, but you get the idea.</li> </ol>
Well, that should be enough to spark your interest and get you playing with it. Part II will cover how to put your own items on the list and react when the user chooses them.