Hello Guest it is November 22, 2019, 03:28:05 AM

Author Topic: right click in mach screen  (Read 5640 times)

0 Members and 1 Guest are viewing this topic.

right click in mach screen
« on: September 10, 2008, 08:01:04 AM »
Another question, can I disable the mouse right click when running a flash screen in mach3.
Because this can interfere the user.

thanks

Offline zealous

*
  •  492 492
  • HI!
    • View Profile
    • Artsoft Solutions
Re: right click in mach screen
« Reply #1 on: September 10, 2008, 06:52:35 PM »
Hey,

To remove Content:

Code: [Select]
var rootMenu = new ContextMenu();
rootMenu.hideBuiltInItems();
_root.menu = rootMenu;

Another way to  Remove content:

Code: [Select]
Stage.showMenu = false;
Right click detect:

Code: [Select]
onEnterFrame = function () {
if (Key.isDown(2)) {
trace("Your right clicking")
    }
}

To add to the "Right Click" menu system(also including functions):

Code: [Select]
Right Click Menu
//////////////////
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();

///////////////////////////////////////////////////////////////////////////////////
var Load_menu:ContextMenuItem = new ContextMenuItem("LOAD GCODE", load_fun, true, true, true);
var edit_menu:ContextMenuItem = new ContextMenuItem("Edit GCODE", edit_fun, false, true, true);


myMenu.customItems.push(Load_menu,edit_menu);
_root.menu = myMenu;

/////////////////////////////////////
function load_fun() {
fscommand("Button", "216");
}

function edit_fun() {
fscommand("Button", "115");
}

Thanks,
Jason Blake