Right Click Context Menu In Flash Movie Simple Method
Customize right click menu in flash in a simple way.
We will start off by creating an instance of the ContextMenu class and then hiding the default items in it on the main timeline. Our context menu instance will be called myMenu_cm.
myMenu_cm.hideBuiltInItems();
_root.menu = myMenu_cm;
2- The _cm suffix at the end of the variable name to activate ActionScript code hints for the ContextMenu class.
The code is pretty basic, we created a new variable to store our instance of the context menu, we then used the .hideBuiltInItems method to remove all the defaults items from the menu and assigned this instance to the _root (main) timeline of the Flash movie. It is essential to note that the itemsAbout and Settings cannot be removed from the menu, some additional commands for debugging cannot be removed either while testing in the Flash authoring tool. You can test the code above in an empty movie to get a context menu similar to the one below.

We used above the quick method for removing the default items from the context menu, it is possible to manually remove the items one by one in case you wish to retain some of these items for some reason or another. Here is how to do it.
myMenu_cm.builtInItems.zoom = false;
myMenu_cm.builtInItems.quality = false;
myMenu_cm.builtInItems.print = false;
myMenu_cm.builtInItems.save = false;
myMenu_cm.builtInItems.loop = false;
myMenu_cm.builtInItems.rewind = false;
myMenu_cm.builtInItems.forward_back = false;
_root.menu = myMenu_cm;
Adding Custom Menu Items
It is possible to add an unlimited number of items to do whatever action you desire. In order to do this you will have to first create an instance of theContextMenuItem and then apply a caption and a function to this element before adding this to the list of custom items. Here is an example:
myMenu_cm.hideBuiltInItems();
var newItem1_cmi = new ContextMenuItem (“Contact Us”, contactPage);
function contactPage (){
trace(“This is Mistonline.in”)
}
myMenu_cm.customItems.push(newItem1_cmi);
_root.menu = myMenu_cm;
We started off by creating the variable newItem1_cmi to hold our instance of the contextMenuItem class. We named our new item Contact Us and assigned the function contactPage to the item. This means that whenever our new item is selected the function contactPage is called. We declared our functions afterwards, in this example we made our function do a simple trace command to show up the text given above. This is merely an example and you can in practice make your function do anything you want.
Our menu item was ready by then and all we had to do is add it to our menu, each menu has an array property for custom items. We used the array method .push to add our custom item to the menu, we then applied the new menu to the root level to do the trick. You can test the movie to see the new item placed in the context menu.

Thanks a lot republicofcode.com
Related posts:
- Context Right Click Menu Using Javascript
- Simple rss reader using php
- Use of crossdomain.xml in flash
- Disabling right click menu using javascript
- Disabling right click menu using javascript Enhanced Version
- Quick method to prevent cross site scripting in php
- Simple Ajax with PHP click tracker

love your work big time and thumbz up!!!!