# Function that return mouse direction as cardinal point

**URL:** <https://forum.kirupa.com/t/function-that-return-mouse-direction-as-cardinal-point/209079>\
**Category:** flash\
**Created:** [December 5, 2006, 7:42pm UTC](https://forum.kirupa.com/t/function-that-return-mouse-direction-as-cardinal-point/209079 "2006-12-05T19:42:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![axew3](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@axew3](https://forum.kirupa.com/u/axew3)\
**Post date:** [December 5, 2006, 7:42pm UTC](https://forum.kirupa.com/t/function-that-return-mouse-direction-as-cardinal-point/209079/1 "2006-12-05T19:42:57Z")

</div>

Hi all, i’m searching for a function that return the\*\* mouse movement as Cardinal Point\*\*.  
In other words i would like to have as returned value, if mouse is going from down to top, _North_, if mouse move from left to right, should return \*East \*… and so on …  
i think is not easy to code, anyway i can’t with my capabilities. Can anyone help in this or give some input to solve?
