If the mouse

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?