# Mc following mouse but within limits and smoothly

**URL:** <https://forum.kirupa.com/t/mc-following-mouse-but-within-limits-and-smoothly/300901>\
**Category:** Uncategorized\
**Created:** [November 30, 2009, 7:20am UTC](https://forum.kirupa.com/t/mc-following-mouse-but-within-limits-and-smoothly/300901 "2009-11-30T07:20:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thevibe](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@thevibe](https://forum.kirupa.com/u/thevibe)\
**Post date:** [November 30, 2009, 7:20am UTC](https://forum.kirupa.com/t/mc-following-mouse-but-within-limits-and-smoothly/300901/1 "2009-11-30T07:20:53Z")

</div>

Hi guys,

I am doing an animation with a movie clip that needs to follow the mouse on the Y axis only smoothly and needs to stay inside a fixed dimension. (e.g. the mc could moves 200px left or 200px right maximum) And I want it to stop smoothly too when it reach the limits. Any help would be appreciate, even if you don’t know how to do it all, any code that can help reach the solution would be really appreciated.

Thanks guys
