# Help with contained x axis mouse avoid!

**URL:** <https://forum.kirupa.com/t/help-with-contained-x-axis-mouse-avoid/115230>\
**Category:** Uncategorized\
**Created:** [July 6, 2004, 7:48pm UTC](https://forum.kirupa.com/t/help-with-contained-x-axis-mouse-avoid/115230 "2004-07-06T19:48:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sodyPop](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@sodyPop](https://forum.kirupa.com/u/sodyPop)\
**Post date:** [July 6, 2004, 7:48pm UTC](https://forum.kirupa.com/t/help-with-contained-x-axis-mouse-avoid/115230/1 "2004-07-06T19:48:55Z")

</div>

i hope someone can help, i am stuck and i am a fairly mid level actionscripter so this is something i haven’t done before.

i have a little crab movie clip on the bottom of the ocean floor in a scene.  
i want the crab clip to avoid the mouse on the x axis only and i want it to be contained to the edges of the movie. i have found info on doing this on both and x and y axis and without being contained. i have also found info on this but without any gravity or friction to it which we need.

any help is much appreciated!

thanks,  
sodyPop
