[Javascript] Mouse direction

Flávio Gomes flavio at economisa.com.br
Tue Nov 14 08:47:40 CST 2006


by saving the old event.x and event.y and then using a simple function 
compare it to the "new" x and y on the onmousemove event

read about the mousemove event here. pretty important:
 http://www.quirksmode.org/js/events_mouse.html

ps.: my keyboard is broken, i'm using a virtual one! =D

Diego Chagastelles escreveu:

> I would like to detect the movement direction of the mouse pointer.  
> If it is going up, down, right, left . How is the best way to do this 
> feature?
>
> Thanks
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>  
>

-- 
Flavio Gomes
flavio at economisa.com.br




More information about the Javascript mailing list