# Detecting mouse movements?

**URL:** <https://forum.kirupa.com/t/detecting-mouse-movements/238269>\
**Category:** programming\
**Created:** [September 9, 2007, 7:25am UTC](https://forum.kirupa.com/t/detecting-mouse-movements/238269 "2007-09-09T07:25:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbuged](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@humbuged](https://forum.kirupa.com/u/humbuged)\
**Post date:** [September 9, 2007, 7:25am UTC](https://forum.kirupa.com/t/detecting-mouse-movements/238269/1 "2007-09-09T07:25:32Z")

</div>

Hello

I need help pls with figuring out mouse actions that involve movement.

1. Lets say I want to rub a lamp and make a genie appear. What codes do I need to detect when the mouse is clicked and dragged back and forth the lamp a few times and then the genie effect appears? (Uh, either movieclip or jump to frame??)

2. I saw the slapping game where u drag ur curser and then the character slaps her enemy. What codes would I need?

Thanks
