Return to Snippet

Revision: 49522
at July 23, 2011 09:23 by codyo


Initial Code
import flash.events.ContextMenuEvent;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;

private var versionInfo:String = "SMS Poll App v1.i18n";

//right click menu customization
			//create my context menu object
			var myContextMenu:ContextMenu = new ContextMenu();
			//create new custom items
			var about:ContextMenuItem = new ContextMenuItem(versionInfo);
			about.separatorBefore = true;
			//add new items to my context menu object
			myContextMenu.customItems.push(about);
			//associate my context menu to main clip
			this.contextMenu = myContextMenu;

Initial URL

                                

Initial Description
http://sierakowski.eu/list-of-tips/51-changing-the-right-click-menu-content-in-flash-with-contextmenu-object.html

Initial Title
right click customization

Initial Tags

                                

Initial Language
ActionScript 3