# Sinf Pom..can you think of an easier way to do this?

**URL:** <https://forum.kirupa.com/t/sinf-pom-can-you-think-of-an-easier-way-to-do-this/2391>\
**Category:** flash\
**Created:** [April 10, 2002, 3:47am UTC](https://forum.kirupa.com/t/sinf-pom-can-you-think-of-an-easier-way-to-do-this/2391 "2002-04-10T03:47:47Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [April 10, 2002, 3:47am UTC](https://forum.kirupa.com/t/sinf-pom-can-you-think-of-an-easier-way-to-do-this/2391/1 "2002-04-10T03:47:47Z")

</div>

I have this animation. Click on the hand and then its spins around with the mouse, and then if you click again it lets go. I was wondering if there was an easier way that I missed

\<embed src=“[http://www.angelfire.com/dc/vidgame/tutorials/MoveableHands.swf](http://www.angelfire.com/dc/vidgame/tutorials/MoveableHands.swf)” height=250 width=250\>\</embed\>

here’s the code on the hand…

onClipEvent (load) {  
nStop = 0;  
}  
onClipEvent (enterFrame) {  
nXmouse = \_root.\_xmouse-\_x;  
nYmouse = \_root.\_ymouse-\_y;  
Radius = Math.sqrt((nXmouse_nXmouse)+(nYmouse_nYmouse));  
nAngle = Math.asin(nYmouse/Radius);  
if (\_root.\_xmouse\<\_x) {  
nRadian = (-nAngle_180/Math.PI);  
if (nDrag == true) {  
\_rotation = nRadian-90;  
}  
} else {  
nRadian = (nAngle_180/Math.PI);  
if (nDrag == true) {  
\_rotation = nRadian+90;  
}  
}  
}  
onClipEvent (mouseDown) {  
if (hitTest(\_root.\_xmouse, \_root.\_ymouse)) {  
nDrag = true;  
}  
}  
onClipEvent (mouseUp) {  
nStop++;  
if (nStop == 2) {  
nDrag = false;  
nStop = 0;  
}  
}

---

<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:** [April 10, 2002, 5:47am UTC](https://forum.kirupa.com/t/sinf-pom-can-you-think-of-an-easier-way-to-do-this/2391/2 "2002-04-10T05:47:35Z")

</div>

try this:  
[jeremydecker.s5.com/click\_point.swf](http://jeremydecker.s5.com/click_point.swf)  
[jeremydecker.s5.com/click\_point.fla](http://jeremydecker.s5.com/click_point.fla)

fewer lines of code means less to debug!  
🙂  
jeremy

---

<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:** [April 10, 2002, 10:44am UTC](https://forum.kirupa.com/t/sinf-pom-can-you-think-of-an-easier-way-to-do-this/2391/3 "2002-04-10T10:44:28Z")

</div>

well jesus…i guess so…thanks sinf…

---

<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:** [April 10, 2002, 10:56am UTC](https://forum.kirupa.com/t/sinf-pom-can-you-think-of-an-easier-way-to-do-this/2391/4 "2002-04-10T10:56:51Z")

</div>

edit the movieclip itself then move the bottom part of the hand to the crosshair in the middle. now when you do a \_rotation script, it’ll rotate around the bottom part of that hand. you don’t really need all the math.
