right clicking in games

Subscribe to right clicking in games 19 posts

avatar for phore_eyes phore_eyes 427 posts
Flag Post

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

 
avatar for JudeMaverick JudeMaverick 8844 posts
Flag Post

stage.showMenu=false();

 
avatar for Lysis Lysis 357 posts
Flag Post

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

 
avatar for phore_eyes phore_eyes 427 posts
Flag Post

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

 
avatar for Lysis Lysis 357 posts
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.

 
avatar for phore_eyes phore_eyes 427 posts
Flag Post

k thanks man

 
avatar for SalocinTEN SalocinTEN 2 posts
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.

 
avatar for Caimbul Caimbul 50 posts
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?

 
avatar for Kalinium Kalinium 764 posts
Flag Post

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

 
avatar for Moonkey Moonkey 1007 posts
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’.

 
avatar for Caimbul Caimbul 50 posts
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. …

 
avatar for SevereFlame SevereFlame 4243 posts
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?

 
avatar for Caimbul Caimbul 50 posts
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.

 
avatar for ch00se ch00se 98 posts
Flag Post

Caimbul, can you use the mouse wheel?

 
avatar for Kannushi_Link Kannushi_Link 522 posts
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

 
avatar for Caimbul Caimbul 50 posts
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?

 
avatar for ch00se ch00se 98 posts
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.

 
avatar for dapbot dapbot 34 posts
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.

 
avatar for Caimbul Caimbul 50 posts
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.