Posted: Mon Mar 31, 2008 3:35 pm Post subject: Disable Right Click Menu
In this tutorial I will teach you how to disable the right click menu, and add you own menu tools.
Let's start with disabling the menu. In the first frame of your game or movie, add this line of code:
Code:
Stage.showMenu = false;
Your menu should now look like this:
To customize the menu and add you own items, use this code:
Code:
var myMenu=new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.customItems.push(new ContextMenuItem("Virtual Tutorial World", itemHandler0));
myMenu.customItems.push(new ContextMenuItem("Hpup", itemHandler1));
myMenu.customItems[1].separatorBefore = true; //this will add a separator between the two items
function itemHandler0(obj, item){
getURL("http://vtw.myfreeforum.org")
myMenu.customItems[0].enabled=false;
myMenu.customItems[1].enabled=true;
}
function itemHandler1(obj, item){
getURL("http://hpup.quotaless.com")
myMenu.customItems[0].enabled=true;
myMenu.customItems[1].enabled=false;
}
_root.menu=myMenu;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum