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:
- symfony2 popup (6)
- yii vertical menu (2)
- document expired yii form (2)
- custom context menu add favorites (2)
- on right click flash movie name (2)
- menu jquery horizon (2)
- as3 empty context menu (2)
- jsp customise rightclick menu (2)
- yii vertical left to right (2)
- mysql jquery context menu (1)
- symfony2 dropdown menu (1)
- symfony2 create left menu (1)
- search results in slide down box (1)
- right click menu command flash (1)
- right click context menu in as3 (1)
- right click 4 movies (1)
- remove context menu in flash swf (1)
- popup symfony2 (1)
- onchange of dropdown call a javascript function in yii (1)
- symfony2 pop up menu drop down (1)
- symfony2 left menu (1)
- symfony2 return popup (1)
- yii vertical (1)
- yii jquery horizontal menu (1)
- yii horizontal menu (1)
- yii context menu (1)
- yii cmenu horizontal (1)
- wp_nav_menu lowercase (1)
- wp_nav_menu in uppercase (1)
- videojs context menu (1)
- vertical menu yii (1)
- var mymenu_cm = new context menu(); and add link some text (1)
- test right click flash script (1)
- symfony2return popup javascript (1)
- jquery subcombo (1)
- jquery flash rightclick (1)
- jquery context menu on flash (1)
- firefox document expired yii (1)
- dynamic drop down list in symfony2 (1)
- Drop Down Menu horizons with jQuery (1)
You will also be interested in ,
- Use of crossdomain.xml in flash
- Loading swf file from another server using crossdomain.xml
- Drop down menu going behind flash element
- How to split a word or sentence delimited with slashes, commas or hyphens
- Include files in php using include, include_once, require or require_once
- Detect the user Operating System flavour using php
- File System Reference In PHP
- How To Set And Get Cookies Using PHP
- Commenting Multi Lines In Perl Script
- Enter only numbers inside a input field of a form using javascript


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