# Follow mouse tutorial question

**URL:** <https://forum.kirupa.com/t/follow-mouse-tutorial-question/36702>\
**Category:** Uncategorized\
**Created:** [November 30, 2003, 8:52pm UTC](https://forum.kirupa.com/t/follow-mouse-tutorial-question/36702 "2003-11-30T20:52:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inflicted](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@Inflicted](https://forum.kirupa.com/u/Inflicted)\
**Post date:** [November 30, 2003, 8:52pm UTC](https://forum.kirupa.com/t/follow-mouse-tutorial-question/36702/1 "2003-11-30T20:52:18Z")

</div>

I’m doing beta’s tutorial on “follow mouse with easing”, and was wondering how I could change the movement.

In his example the MC moves along with the mouse, but how could I make the MC move in the opposite direction of the mouse?

```auto
onClipEvent (load) {
    clip._x = 150;
    clip._y = 100;
    speed = 10;
}
onClipEvent (enterFrame) {
    endX = _root._xmouse;
    endY = _root._ymouse;
    _x += (endX-_x)/speed;
    _y += (endY-_y)/speed;
}

```
