# Drag and rotate clock hands

**URL:** <https://forum.kirupa.com/t/drag-and-rotate-clock-hands/6291>\
**Category:** Uncategorized\
**Created:** [October 3, 2002, 2:55pm UTC](https://forum.kirupa.com/t/drag-and-rotate-clock-hands/6291 "2002-10-03T14:55:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jill](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@Jill](https://forum.kirupa.com/u/Jill)\
**Post date:** [October 3, 2002, 2:55pm UTC](https://forum.kirupa.com/t/drag-and-rotate-clock-hands/6291/1 "2002-10-03T14:55:46Z")

</div>

I am stuck at the mo trying to create an interactive clock. I have got it to do everything, but theres a bit i need help with.  
I would like the user to be able to drag and rotate the clocks hands clockwise 360 degrees… ive got the hands to rotate by themselves what do i need to do?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 3, 2002, 4:04pm UTC](https://forum.kirupa.com/t/drag-and-rotate-clock-hands/6291/2 "2002-10-03T16:04:06Z")

</div>

Check this: [http://www.actionscript.org/tutorials/advanced/Mouse\_Angle\_Detection\_II/index.shtml](http://www.actionscript.org/tutorials/advanced/Mouse_Angle_Detection_II/index.shtml)

pom :asian:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 4, 2002, 9:27am UTC](https://forum.kirupa.com/t/drag-and-rotate-clock-hands/6291/3 "2002-10-04T09:27:59Z")

</div>

thanks that’s great!  
any ideas on how i could stop the arrow rotating for example when the user clicks the mouse. As the idea is to make the arrow into clock hands

cheers

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 5, 2002, 4:05am UTC](https://forum.kirupa.com/t/drag-and-rotate-clock-hands/6291/4 "2002-10-05T04:05:14Z")

</div>

can you make it so its on(mouseDown) instead of on(mouseMove) so that way it will only move when you have the mouse button down?

i havent actually tried it… but its an idea… also another thought… if you want more than one hand… make the arrows buttons… and do on(press) and put the code… so you can move each one

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 5, 2002, 8:45am UTC](https://forum.kirupa.com/t/drag-and-rotate-clock-hands/6291/5 "2002-10-05T08:45:04Z")

</div>

Yep, that’s the idea. Are you working with MX or Flash 5?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 7, 2002, 8:45am UTC](https://forum.kirupa.com/t/drag-and-rotate-clock-hands/6291/6 "2002-10-07T08:45:21Z")

</div>

im working with flash 5. ive changed the arrow to a button within a movieclip and added the actionscript to it but it doesn’t rotate as easily as before. Can anyone help?
