View Single Post
  #3 (permalink)  
Old 08-14-2007, 12:16 AM
seesamjagan seesamjagan is offline
D-Web Programmer
 
Join Date: Aug 2007
Location: Chennai
Posts: 66
seesamjagan is on a distinguished road
Send a message via AIM to seesamjagan Send a message via Yahoo to seesamjagan
Post Re: Can anyone know about the RightClick option for menu in Flash

Hi try this logic it will be very usefull and simple
function menuCallback(obj, menuObj) {
menuObj.customItems = [];
if ((obj instanceof MovieClip) && (obj != _level0)) {
menuObj.customItems.push(cutItem);
menuObj.customItems.push(copyItem);
menuObj.customItems.push(pasteItem);
}
}
function mnuCut_click() {
trace("cut");
}
function mnuCopy_click() {
trace("copy");
}
function mnuPaste_click() {
trace("paste");
}
var myMenu = new ContextMenu(menuCallback);
var cutItem = new ContextMenuItem("Cut object", mnuCut_click);
var copyItem = new ContextMenuItem("Copy object", mnuCopy_click);
var pasteItem = new ContextMenuItem("Paste object", mnuPaste_click);
MovieClip.prototype.menu = myMenu;
__________________
SeeSamJagan
- Sky is not the "LIMIT", Death is not the END, There is still something beyond....
Reply With Quote