# Converting from AS2 toAS3 help

**URL:** <https://forum.kirupa.com/t/converting-from-as2-toas3-help/241542>\
**Category:** flash\
**Created:** [October 15, 2007, 1:15pm UTC](https://forum.kirupa.com/t/converting-from-as2-toas3-help/241542 "2007-10-15T13:15:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terry\_elekes](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Terry\_elekes](https://forum.kirupa.com/u/Terry_elekes)\
**Post date:** [October 15, 2007, 1:15pm UTC](https://forum.kirupa.com/t/converting-from-as2-toas3-help/241542/1 "2007-10-15T13:15:20Z")

</div>

Can someone please help with converting this to AS3. Right now I have this code on the movieClip.  
onClipEvent (enterFrame) {  
// find x and y differences  
disx = \_root.\_xmouse-\_x;  
disy = \_root.\_ymouse-\_y;  
// calculate the angle  
Radians = Math.atan2(disy, disx);  
// convert to degrees and set rotation  
Degrees = 360_Radians/(2_Math.PI);  
\_rotation = Degrees;  
}
