[HELP] Action Script for Mouse
Hey everyone, just have a quick question. I am part of a small team making an Rpg in flash (theres a thread about it in the Games Forum)
Anyways, I was just working on a customizable right click menu which we're going to need, so I found a tutorial that did just that in MX 2004
But it didnt work ;) *Shows Code*
function doSomething(){}
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This movie is copyrighted by Your Company Name", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
The code is pretty simple, just put it in the default layer. But ... well it doesnt work. It doesnt give an error or anything, it just doesnt work ;)
And yes, I have MX 2004 which the tutorial required ...
Anyways, your help will be greatly appreaciated :D
Weird - it worked for me...
Code:
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This movie is copyrighted by Your Company Name", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
function doSomething(menuObj, objObj){
trace("stuff");
}