right clicking in games

19 posts

Flag Post

how do you make it so that you cannot right click and goto the forward thingy???

 
Flag Post

stage.showMenu=false();

 
Flag Post

I think there are keypresses which change frame as well. Can these be prevented also?

 
Flag Post

is it possible to change what the things in the menu do???

 
Flag Post

Yes you can.
Here’s how I did it in Maxwell:

//remove stuff we don't want from context-sensitive menu
var newMenu:ContextMenu = new ContextMenu();
newMenu.builtInItems.play=false;
newMenu.builtInItems.loop=false;
newMenu.builtInItems.rewind=false;
newMenu.builtInItems.forward_back=false;
newMenu.customItems.push(new ContextMenuItem("Quit to menu", quitHandler));
this.menu = newMenu;

function quitHandler(obj, item) {
if (_root._framesloaded>2){gotoandstop(2)}else{fin=true}; 
}

But you can’t have any items the same as built-in menu options, or identical items, or use the words Macromedia, Flash Player, or Settings. Or various other restrictions on length &c.

 
Flag Post

k thanks man

 
Flag Post

What about…

fscommand(“showmenu”, false);

I have always been using it to do Lysis exact things too, except for the custom menu item.

 
Flag Post

In a game I hope to write (I have a different one I’m going to try to do first) I planned on using the Right click button. I am hoping that I’ll be able to use the mouse listener to detect a right key press (or more accurately release) without dealing with the flash right click menu.

Am I on crack, or can I just turn off the menu and use the right button?

 
Flag Post

I don’t think you can use the right mouse button, unless you added a menu button of “Action” or whatever.

 
Flag Post

Am I on crack, or can I just turn off the menu and use the right button?

You’re on crack :/

You can’t turn it off entirely. There will always be at least ‘settings’ and ‘about flash player’.

 
Flag Post

You’re on crack :/

You can’t turn it off entirely. There will always be at least ‘settings’ and ‘about flash player’.

Damn.. I guess I’ll have to redesign the UI then. …

 
Flag Post

http://www.metamorphozis.com/tutorials/flash_customized_right_click_menu_in_flash_mx_2004_tutorial.shtml

Why don’t you just use that?

 
Flag Post

Thanks Severe, but that is code like previously posted to modify the right click menu.

What I was looking for was a way to disable the right click menu so I can use the button. (I was going to use the mouse buttons to rotate an object left or right) It made sense in my UI design. So now I will have to use keys along with the keys I’m already using, (which adds more complexity to the user controls) or simplify my game design.

 
Flag Post

Caimbul, can you use the mouse wheel?

 
Flag Post

>fscommand(“showmenu”, false);

It doesn’t work on the browsers.


And if you want to totally remove the right-click menu,you have to exprot your game in a EXE file and use some tools to remove it. :S

 
Flag Post

Choose: Actually that was what I was originally thinking about using the wheel. But there are still a few cavemen who actually don’t have wheel mice. I did want to design it so that everyone can play.

hhmm.. Maybe I could design it so that you could use the wheel or keys. I assume the code to control wheel spin (up/down) is much like the a button press?

 
Flag Post

Caimbul, I think that is a good compromise, you can check out Torque (a horrible game) which does this. Also, off the top of my head AR3 (a much better game) does this as well.

 
Flag Post

Caimbul, you could also create an ‘artificial’ rightclick by telling players to hold shift while clicking. You can then store the click position and make a pop up menu. You’d would have to design and code that menu, though; might be a bit of a pain.

 
Flag Post

Caimbul, you could also create an ‘artificial’ rightclick by telling players to hold shift while clicking. You can then store the click position and make a pop up menu. You’d would have to design and code that menu, though; might be a bit of a pain.

Thanks Dapbot. But like I said I don’t want a special right click menu. I want to use the right button to rotate an object right. (and the left button rotates left) But it seems that I’ll have to figure out the wheel controls instead, and just say you need a wheel mouse to play.