CarMan1390
03-31-2008, 06:57 PM
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:
Stage.showMenu = false;
Your menu should now look like this:
http://hpup.quotaless.com/files/menu.jpg
To customize the menu and add you own items, use this 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;
The new menu should look like this:
http://hpup.quotaless.com/files/menu2.jpg
Of course you can customize it to your needs.:)
Let's start with disabling the menu. In the first frame of your game or movie, add this line of code:
Stage.showMenu = false;
Your menu should now look like this:
http://hpup.quotaless.com/files/menu.jpg
To customize the menu and add you own items, use this 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;
The new menu should look like this:
http://hpup.quotaless.com/files/menu2.jpg
Of course you can customize it to your needs.:)