# Can anyone help please?

**URL:** https://forum.kirupa.com/t/can-anyone-help-please/200947
**Category:** flash
**Created:** [September 16, 2006, 10:53pm UTC](https://forum.kirupa.com/t/can-anyone-help-please/200947 "2006-09-16T22:53:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sora72](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@sora72](https://forum.kirupa.com/u/sora72)
#### Post date: [September 16, 2006, 10:53pm UTC](https://forum.kirupa.com/t/can-anyone-help-please/200947/1 "2006-09-16T22:53:37Z")

</div>

Hey, im trying to make a game like Heli attack 2 and I was wondering how to make the gun point in the direction of the mouse. Im using the code:  
onClipEvent(enterFrame) {  
rx = \_root.\_xmouse;  
ry = \_root.\_ymouse;  
cx = this.\_x;  
cy = this.\_y;  
angle = Math.atan2(ry-cy, rx-cx)/(Math.PI/180)  
\_rotation = angle  
}

This works in a regular instance, but im trying to use it in an instance inside a movie clip. Ive tried so many things, but when I use this code in the instance inside the movie clip, it screws up badly. Could anyone help?

\*\*[SIZE=2][COLOR=#0000ff][http://www.miniclip.com/games/heli-attack-2/en/](http://www.miniclip.com/games/heli-attack-2/en/) - heli attack 2  
\*\*[/COLOR][/SIZE]
