# If the mouse

**URL:** <https://forum.kirupa.com/t/if-the-mouse/283423>\
**Category:** Uncategorized\
**Created:** [March 5, 2009, 10:00pm UTC](https://forum.kirupa.com/t/if-the-mouse/283423 "2009-03-05T22:00:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michdd](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@michdd](https://forum.kirupa.com/u/michdd)\
**Post date:** [March 5, 2009, 10:00pm UTC](https://forum.kirupa.com/t/if-the-mouse/283423/1 "2009-03-05T22:00:38Z")

</div>

Is there a way that I can have a function run if a mouse is clicked, AND over something? I know that I could have a mouse over function inside of a mouse down function, but that won’t work for me. It’s hard to explain… so I’ll just give the example of what I need this for. I have a map editor. I can click on a tile to change it. But I want to be able to click on say one tile, and drag the mouse and also change the other ones. What would be a way of doing this?
