# Rotate mc by mouse movement

**URL:** <https://forum.kirupa.com/t/rotate-mc-by-mouse-movement/185300>\
**Category:** Uncategorized\
**Created:** [April 12, 2006, 10:41am UTC](https://forum.kirupa.com/t/rotate-mc-by-mouse-movement/185300 "2006-04-12T10:41:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikman](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mikman](https://forum.kirupa.com/u/mikman)\
**Post date:** [April 12, 2006, 10:41am UTC](https://forum.kirupa.com/t/rotate-mc-by-mouse-movement/185300/1 "2006-04-12T10:41:49Z")

</div>

Hi guys,

i’m trying to build a “circular” menu that rotate on rollover and mouse move but with no good results. Just something like the yugo sliding menu but with buttons placed around a circonference.

I don’t need a dinamic menu.  
I need a function that let the menu rotate up when cursor is below the half of the circle and viceversa.

Could you please help me?

I’ve done a search and found a compass example but i really can’t edit it. I’m a newbee and can’t really figure out how to rotate a movie clip around its own axes on mouse move…

Thanks in advance and sorry for my english.

---

<div class="post-metadata">

**Author:** ![virusescu](https://avatars.discourse-cdn.com/v4/letter/v/8edcca/32.png) [@virusescu](https://forum.kirupa.com/u/virusescu)\
**Post date:** [April 12, 2006, 11:05am UTC](https://forum.kirupa.com/t/rotate-mc-by-mouse-movement/185300/2 "2006-04-12T11:05:12Z")

</div>

I don’t know the example you are talking about, but here’s a simple one from me, maybe it helps you.

---

<div class="post-metadata">

**Author:** ![mikman](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mikman](https://forum.kirupa.com/u/mikman)\
**Post date:** [April 12, 2006, 1:09pm UTC](https://forum.kirupa.com/t/rotate-mc-by-mouse-movement/185300/3 "2006-04-12T13:09:51Z")

</div>

Thanks a lot virusescu!!! :party:

It’s exactly what i need!  
I’m wondering how to invert the sense of rotation and how to block the rotation after a complete loop…

Do you have any solutions? :crying:

Thanks again for your patience.

---

<div class="post-metadata">

**Author:** ![virusescu](https://avatars.discourse-cdn.com/v4/letter/v/8edcca/32.png) [@virusescu](https://forum.kirupa.com/u/virusescu)\
**Post date:** [April 12, 2006, 1:35pm UTC](https://forum.kirupa.com/t/rotate-mc-by-mouse-movement/185300/4 "2006-04-12T13:35:27Z")

</div>

Hmm… Something like this maybe.  
Not exactly optimized though :book:

---

<div class="post-metadata">

**Author:** ![mikman](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mikman](https://forum.kirupa.com/u/mikman)\
**Post date:** [April 12, 2006, 2:00pm UTC](https://forum.kirupa.com/t/rotate-mc-by-mouse-movement/185300/5 "2006-04-12T14:00:14Z")

</div>

Yes virusescu! I love you!

Turbothanks!!!

PS:  
I’m so stupid… inverting the sense of rotation is as simple as changing Math.min with Math.max. 🙂
