# kirupa.com - Flash Tutorial: Detecting Direction of Mouse Movement in AS3

**URL:** https://forum.kirupa.com/t/kirupa-com-flash-tutorial-detecting-direction-of-mouse-movement-in-as3/399234
**Category:** programming
**Created:** [December 2, 2014, 12:54am UTC](https://forum.kirupa.com/t/kirupa-com-flash-tutorial-detecting-direction-of-mouse-movement-in-as3/399234 "2014-12-02T00:54:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [December 2, 2014, 12:54am UTC](https://forum.kirupa.com/t/kirupa-com-flash-tutorial-detecting-direction-of-mouse-movement-in-as3/399234/1 "2014-12-02T00:54:49Z")

</div>

by kirupa | 1 October 2008

In ActionScript 2, you had the watch function that, among many things, allowed you to detect which direction your mouse cursor was moving. There is a [tutorial](http://www.kirupa.com/developer/actionscript/detecting_mouse_direction.htm) on how to do that on kirupa.com itself. In ActionScript 3, I couldn�t find the watch function nor an equivalent replacement, but creating your own function that shows you how to detect the direction of mouse movement is not very complicated.

* * *
This is a companion discussion topic for the original entry at [http://www.kirupa.com/developer/flashcs3/detecting\_direction\_mouse\_movement.htm](http://www.kirupa.com/developer/flashcs3/detecting_direction_mouse_movement.htm)
