Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

right click detection is it possible?

Status
Not open for further replies.

janeekg

Programmer
Jun 13, 2002
4
US
Can Flash 5 ActionScript detect right mouse clicks?
 
It does and is already in use by the Flash Player to bring up the context menu. It can be enabled or not (the Macromedia copyright still being there if it's disabled!), and to my knowledge, you cannot override it or correct it with your own add-ons. Regards,

new.gif
 
You can detect the right click and also wheel click if you have a wheel mouse but the context menu still pops up and ruins things on the right mouse click (there is a javascript workaround for this I believe but I've never tried it). Attach this to a movie clip, you might be able to use it somehow...

onClipEvent (enterFrame) {
// check for mouse clicks
if (Key.isDown(2)) {
trace ("You just pressed the right mouse button");
}
if (Key.isDown(4)) {
trace ("You have a wheel mouse");
}
} Slainte

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top