# Rotate on axis with mouse easing

**URL:** <https://forum.kirupa.com/t/rotate-on-axis-with-mouse-easing/186351>\
**Category:** flash\
**Created:** [April 20, 2006, 6:09pm UTC](https://forum.kirupa.com/t/rotate-on-axis-with-mouse-easing/186351 "2006-04-20T18:09:23Z")\
**Posts on this page:** 2\
**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:** [April 20, 2006, 6:09pm UTC](https://forum.kirupa.com/t/rotate-on-axis-with-mouse-easing/186351/1 "2006-04-20T18:09:23Z")

</div>

I have a mc that I want to continously rotate, I want it to rotate in whatever direction the mouse is from the center of the mc. If the user pulls the mouse out I would like for it to speed up and slow down accordingly.

If this is not possible, I wouldnt cry.

Any way when the user goes over a desiginated area I would like for the motion to stop until they pull away again.

How would I go about doing this.

I’ve seen this thread but don’t understand where to attach the script, and I also need the stopping script.

> **[Rotational](https://www.kirupa.com/forum/showthread.php?t=40796&highlight=mouse+rotation)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

Case

---

<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:** [April 21, 2006, 2:57pm UTC](https://forum.kirupa.com/t/rotate-on-axis-with-mouse-easing/186351/2 "2006-04-21T14:57:54Z")

</div>

I got this going…

```auto
 function onEnterFrame() {
        star_1._rotation += (1)*(_xmouse-400)*0.01;
    }

```

Also I need some code for how to stop when someone rollsover a certain part of the mc.

It’s not easing but it looks good. Does anyone know what I should add for easing?

Case
