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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I was fooling around building a new

Status
Not open for further replies.

wangbar

Programmer
Jul 23, 2001
1,906
GB
I was fooling around building a new site and accidentally came across a way to detect the right mouse button and mouse wheel - thought it might come in handy for some of you so here it is.

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");
}
}

Unfortunately the normal right click menu still appears (or the "about Flash Player" stuff if you have the menu disabled) but the wheel click doesn't bring up anything so it might be useful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top