# Panning limits HELP!

**URL:** <https://forum.kirupa.com/t/panning-limits-help/203134>\
**Category:** Uncategorized\
**Created:** [October 8, 2006, 2:00am UTC](https://forum.kirupa.com/t/panning-limits-help/203134 "2006-10-08T02:00:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pengwind](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pengwind/32/2859_2.png) [@pengwind](https://forum.kirupa.com/u/pengwind)\
**Post date:** [October 8, 2006, 2:00am UTC](https://forum.kirupa.com/t/panning-limits-help/203134/1 "2006-10-08T02:00:50Z")

</div>

ok … I have some problems figuring how to fix limits to a panning image.  
I have this simple piece of code on a movie clip with my image inside of it :

> 

onClipEvent(enterFrame){  
\_x += (320 - \_root.\_xmouse)/40;  
\_y += (240 - \_root.\_ymouse)/40;  
}

with this, my image is panning around to stage relative to the movement of the mouse… but with this, the image continue to pan eternaly … I would like it to pan only in a “restricted” aera … this area would be the movie clip… so can anyone give me a clue on how to do it !!!

There is my .fla to give a better example:

thank in advance ^^
