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
Incoming search terms:
- jsp customise rightclick menu (2)
- as3 empty context menu (2)
- on right click flash movie name (2)
- custom context menu add favorites (2)
- remove context menu in flash swf (1)
- mysql jquery context menu (1)
- yii vertical menu (1)
- jquery flash rightclick (1)
- jquery flash contextmenu (1)
- jcarousel jsp (1)
- java read random from file (1)
- right click 4 movies (1)
- right click context menu in as3 (1)
- yii jquery horizontal menu (1)
- wp_nav_menu lowercase (1)
- wp_nav_menu in uppercase (1)
- videojs context menu (1)
- var mymenu_cm = new context menu(); and add link some text (1)
- test right click flash script (1)
- search results in slide down box (1)
- right click menu command flash (1)
- in jsp clear browser history (1)
- how we can set contextmenu on right click in php (1)
- customize menus flash with javascript (1)
- customize context menu swf file with javascript (1)
- create dropdown in symfony2 (1)
- create contextment on video as3 (1)
- contextmenu right click in as3 (1)
- context menu script for SWF (1)
- collapse search results wordpress (1)
- can we launch a context menu with a simple click? (1)
- customize the Flash context menu javascript (1)
- dynamic drop down list in symfony2 (1)
- how to remove context menu in flash using javascript (1)
- how to remove context menu in flash using action script 1 (1)
- how to hide contextmenu items using javascript (1)
- how to get value from contex menu in as3 (1)
- how to change flash context menu javascript (1)
- how can i change swf right click about menu (1)
- flash simple right click menu (1)
You will also be interested in ,
- Drop down menu going behind flash element
- Use of crossdomain.xml in flash
- Loading swf file from another server using crossdomain.xml
- Simple Visitor Counter Using php
- Find the string and then the line number using php from text file
- Output buffering using ob_start in php
- Change background color using php for a webpage
- Get browser version and details using javascript
- How to avoid direct access to a file in php
- Change webpage title dynamically using jquery

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