Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.

 

senocular.com ActionScript Library

onRightMouseDown.as

Name: onRightMouseDown, onRightMouseUp [MX]
Author: senocular: www.senocular.com
Date: 1899-12-31T00:02:10.200
Documentation:
Mouse Events onRightMouseDown, onRightMouseUp:
event handlers for right mouse button clicks.  Checks
for these clicks happen every 40 milliseconds.

- In order for these to be recognized, be sure to add your movieclip/object as a listener
of the mouse object: Mouse.addListener(myObject);

Example:
var mouseListener = new Object();
Mouse.addListener(mouseListener);
mouseListener.onRightMouseUp = function(){
	trace("Right mouse released");
}

1
setInterval(function(){if(Mouse.rightMouseDown^(Mouse.rightMouseDown=Key.isDown(2))) Mouse.rightMouseDown ? Mouse.broadcastMessage("onRightMouseDown") : Mouse.broadcastMessage("onRightMouseUp");},40);