Return to Snippet

Revision: 36777
at November 26, 2010 06:39 by tuffstudio

Initial Code
var myMenu:ContextMenu = new ContextMenu();
		var menuItem1:ContextMenuItem = new ContextMenuItem("Hello World");
		var menuItem2:ContextMenuItem = new ContextMenuItem("Go to My Page");
		menuItem2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, doSomething);
		this.contextMenu = myMenu;
		function doSomething(e:ContextMenuEvent):void 
		var url:String = "";
		var request:URLRequest = new URLRequest(url);
		navigateToURL(request, '_blank');

Initial URL

Initial Description

Initial Title
AS3 right-click menu

Initial Tags

Initial Language
ActionScript 3