# Flash MX/Mouse follow

**URL:** https://forum.kirupa.com/t/flash-mx-mouse-follow/101300
**Category:** Uncategorized
**Created:** [February 8, 2004, 2:26pm UTC](https://forum.kirupa.com/t/flash-mx-mouse-follow/101300 "2004-02-08T14:26:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Nemonin](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@Nemonin](https://forum.kirupa.com/u/Nemonin)
#### Post date: [February 8, 2004, 2:26pm UTC](https://forum.kirupa.com/t/flash-mx-mouse-follow/101300/1 "2004-02-08T14:26:37Z")

</div>

## i made my guy so that he stops running when te mouse goes over him but once u put the mouse over him he keeps sliding untill the it reaches the root. and its a reaaaaally slow slide becuz of the ease. how can i make it so that it stops the sliding as soon as it hits the mc. here’s my script.

onClipEvent (load) {  
\_x = 0;  
speed = 25;  
}  
onClipEvent (enterFrame) {  
endX = \_root.\_xmouse;  
\_x += (endX-\_x)/speed;  
}  
on (rollOver) {  
gotoAndStop(21);  
}  
on (rollOut) {  
gotoAndPlay(1);  
}
