How to detect mouse acceleration in javascript?
问题 I'm logging the mouse movements in a web app. I'd like to detect the mouse acceleration on a platform (e.g. Windows). Is it possible to do it from javascript, even just in an approximated way? I could ask the user to check their settings with a questionnaire, but it would be much better to detect it automatically. Cheers 回答1: Check distance the mouse has moved over a set interval of time: var mX:Number = _xmouse; var mY:Number = _ymouse; function checkDistance() { clear(); //trace('new