Right Mouse and more

I’m not sure who all cares or if everyone but me knows this but you can actually detect the state of each mouse button, including the right and middle buttons… you do this with the ASnative(), this is a back door to all of the undocumented actionscript that flash has, so if you add the following code to the timeline

 
this.onEnterFrame = function() {
if (ASnative(800, 2)(1)) { 
		trace ("You have pressed or depressed the left mouse button");
}
}

this detects the left mouse… if you substitute the argument (1) with (2) you get the right mouse button so…

 
this.onEnterFrame = function() {
if (ASnative(800, 2)(2)) { 
	 trace("You have pressed or depressed the right mouse button");
}
}

and if you put in a (4) you get the middle mouse or often the wheel button…

 this.onEnterFrame = function() { 
if (ASnative(800, 2)(4)) {
	trace("You have pressed or depressed the middle mouse or wheel button");
}
}

I have tested these methods in both Flash MX and Flash MX 2004, i’m sure that if you have more buttons on your mouse and you keep trying to substitute the argument with different numbers you will get different results… hope this helped.
-Michael