# Please help, math problem with mouse interaction

**URL:** https://forum.kirupa.com/t/please-help-math-problem-with-mouse-interaction/297057
**Category:** Uncategorized
**Created:** [September 24, 2009, 10:45pm UTC](https://forum.kirupa.com/t/please-help-math-problem-with-mouse-interaction/297057 "2009-09-24T22:45:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cry4dawn](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@cry4dawn](https://forum.kirupa.com/u/cry4dawn)
#### Post date: [September 24, 2009, 10:45pm UTC](https://forum.kirupa.com/t/please-help-math-problem-with-mouse-interaction/297057/1 "2009-09-24T22:45:08Z")

</div>

Hey guys, I am trying to duplicate and effect ive seen where a larger image pans beneath a mask.

Basically I want my large image lets say 400x600 under my mask 200x200. When the users mouse is within the mask I want its position relative to the edges of the mask to bring the big clip flush with that spot and so on. So at 0:0 it should be at 0:0 but at 200:200 it should be at 400:600.

I’ve been trying different things but can’t seem to get the math right. Can someone help me out with this? I’m pulling my hair out.

Thanks
