# Quick math problem

**URL:** <https://forum.kirupa.com/t/quick-math-problem/290595>\
**Category:** Uncategorized\
**Created:** [June 16, 2009, 10:19pm UTC](https://forum.kirupa.com/t/quick-math-problem/290595 "2009-06-16T22:19:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brndn](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@brndn](https://forum.kirupa.com/u/brndn)\
**Post date:** [June 16, 2009, 10:19pm UTC](https://forum.kirupa.com/t/quick-math-problem/290595/1 "2009-06-16T22:19:12Z")

</div>

hey all  
after two near allnighters my head is litterally turning to mush.

I have am wanting to do a quick calculation based on the mouse position.  
here is what I am trying to do.  
I have an item the site on the stage

stage.width = 400;  
object.width = 900;  
object.x needs to be at its most -900 and at its least -225.

and based on the mouse position on the stage object will scroll within these bounds.

I have all the functional done but just need to know the basic equation to find these points.

_Merci mille fois_
