Want custom cursor to act opposite user interaction

Hi guys

Here’s something for U math champions.

Is it possible to get the custom cursor MC to act opposite the users actions?

I want it to be opposite the center of the stage, lets say the real mouse cursor is 200px to the RIGHT of the center of the stage, but the custom mouse cursor is 200px to the LEFT… get it? And the same goes for the y coordinates…

I gave it a try, but can’t seem to get it right, math never was my strong side :slight_smile:

You can multiply your mouse’s x and y co-ordinates by -1 to reverse the numbers.

or you could even make the value a string temporarily to modify it then change it back into a number:

onEnterFrame(){
   var mousestring:String = _xmouse;
   var mousestringminus:String = "-"+mousestring;
   var mousenumberminus:Number = Number(mousestringminus);
}

That’s probably one of the dirtiest hacks i’v come up wih in a while:)

Got it…

[AS]
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
hor = _xmouse;
ver = _ymouse;

xDist = Stage.width-hor;
yDist = Stage.height-ver;
	
mouse_mc._x = xDist;
mouse_mc._y = yDist;

};
Mouse.addListener(mouseListener);
[/AS]