# 'Shaking' the cursor

**URL:** <https://forum.kirupa.com/t/shaking-the-cursor/323810>\
**Category:** flash\
**Created:** [July 19, 2011, 1:11pm UTC](https://forum.kirupa.com/t/shaking-the-cursor/323810 "2011-07-19T13:11:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theMonitor](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@theMonitor](https://forum.kirupa.com/u/theMonitor)\
**Post date:** [July 19, 2011, 1:11pm UTC](https://forum.kirupa.com/t/shaking-the-cursor/323810/1 "2011-07-19T13:11:43Z")

</div>

Tried to find some information on the forum, but I think the search terms might be a bit confusing…

What I want to do is be able to recognise a ‘shaking’ motion of the cursor - that is to say, call an event when the user moves the cursor rapidly back and forth along the x axis. I can get as far as determining when the cursor is moving in one direction at a certain speed, but recognising the repetitious change in direction is beyond me. It would be nice to have a class with parameters to change the max/min width and speed of the ‘shake’; failing that, any help in detecting the fact that the cusor is going back and forth would be very helpful.

[edit: Of course… ‘gestures’ is the search term I was after. Have now found all kinds of helpful stuff, but contributions to the thread still welcome…]
