# Mouse pointer to object AS change

**URL:** https://forum.kirupa.com/t/mouse-pointer-to-object-as-change/289370
**Category:** Uncategorized
**Created:** [May 29, 2009, 2:59pm UTC](https://forum.kirupa.com/t/mouse-pointer-to-object-as-change/289370 "2009-05-29T14:59:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![monkey\_man\_tim](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@monkey\_man\_tim](https://forum.kirupa.com/u/monkey_man_tim)
#### Post date: [May 29, 2009, 2:59pm UTC](https://forum.kirupa.com/t/mouse-pointer-to-object-as-change/289370/1 "2009-05-29T14:59:33Z")

</div>

I am having real trouble with an action script and cant seem to change the \_xmouse and \_ymouse founctions into \_x and \_y spesisic to another movie clip names dot maybe its just me but can anyone help me on this ive included the AS I am using bellow

onClipEvent (enterFrame) {  
myRadians = Math.atan2 ( \_root[COLOR=red][COLOR=black].[/COLOR]\_ymouse[/COLOR]-this.\_y, \_root[COLOR=red][COLOR=black].[/COLOR]\_xmouse[/COLOR]-this.\_x );  
myDegrees = Math.round ( ( myRadians\*180/Math.PI ) );  
\_root.yChange = Math.round ( \_root[COLOR=red][COLOR=black].[/COLOR]\_ymouse[/COLOR]-this.\_y );  
\_root.xChange = Math.round ( \_root[COLOR=red][COLOR=black].[/COLOR]\_xmouse[/COLOR]-this.\_x );  
\_root.yMove = Math.round ( \_root.yChange/20 );  
\_root.xMove = Math.round ( \_root.xChange/20 );  
this.\_y += \_root.yMove;  
this.\_x += \_root.xMove;  
this.\_rotation = myDegrees+90;  
}
