# Mouse follow easing with snapback question

**URL:** <https://forum.kirupa.com/t/mouse-follow-easing-with-snapback-question/125382>\
**Category:** Uncategorized\
**Created:** [October 13, 2004, 3:19am UTC](https://forum.kirupa.com/t/mouse-follow-easing-with-snapback-question/125382 "2004-10-13T03:19:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casenote](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@Casenote](https://forum.kirupa.com/u/Casenote)\
**Post date:** [October 13, 2004, 3:19am UTC](https://forum.kirupa.com/t/mouse-follow-easing-with-snapback-question/125382/1 "2004-10-13T03:19:52Z")

</div>

Ok I have a menu with 7 items…

I have a MC that follows the mouse over the menu with this AS

```auto

onClipEvent (load) {
	speed = 3;
}
onClipEvent (enterFrame) {
	getlimits = _root.menuBounds.getBounds(_root);
	//get the limits of the menu length 
	if (_root._xmouse>=getlimits.xMin && _root._xmouse<=getlimits.xMax && _root._ymouse>=getlimits.yMin && _root._ymouse<=getlimits.yMax) {
		endX = _root._xmouse;
		_x += (endX-_x)/speed;
	}
}

```

What I now need to figure out is how to get the MC to return back to whichever section they are currently in if they mouse off the menu.

Anyone have any ideas?

Casey
