Can anyone help please?

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/ - heli attack 2
**
[/COLOR][/SIZE]