The direction my mouse is moving in?

hmm…

AS2

i’m tackling the job of making a wheel of symbols, which rotate in a different direction depending on which direction your mouse is moving in (and where your mouse is).

crazy job!

anyway, i was wondering : would anyone happen to have an idea of how you could have flash know what direction the mouse is coming from when it hits an object?

i tried using three setInterval commands like this :

 
var checkA:Number = setInterval(checkXA, 2);
var checkBStart:Number = setInterval(checkXBStart, 1);
var checkB:Number;
function checkXA():Void
{
 trace("checkXA worked");
 xAMouse = _xmouse;
}
function checkXBStart():Void
{
 checkBStart = setInterval(checkXB, 2);
}
 function checkXB():Void
{
 trace("checkXB worked");
 clearInterval(checkBStart);
 xBMouse = _xmouse;
}

the goal of that was to have two variables (a = before, and b = after) so that there’s before and after x variables contantly being redefined… and then later i can say if the x property after is more than the x property before… then rotate clockwise : and vice versa.

WELL that didn’t work. i don’t really quite understand it and i certainly think i could be taking the wrong approach altogether.

if anyone could help me it would be most appreciated!

thanks

silverbirch