# Migration to AS2

**URL:** <https://forum.kirupa.com/t/migration-to-as2/177693>\
**Category:** flash\
**Created:** [February 4, 2006, 4:23am UTC](https://forum.kirupa.com/t/migration-to-as2/177693 "2006-02-04T04:23:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flashy\_Flush](https://avatars.discourse-cdn.com/v4/letter/f/e495f1/32.png) [@Flashy\_Flush](https://forum.kirupa.com/u/Flashy_Flush)\
**Post date:** [February 4, 2006, 4:23am UTC](https://forum.kirupa.com/t/migration-to-as2/177693/1 "2006-02-04T04:23:23Z")

</div>

Hi everybody, I am going crazy trying to conver this little script into AS2. I have been using it at Flash 5 without any problem by I just upgraded to Flash 8 and still want to use it. Any help would be appreciated. Thank you very much:hugegrin:.

///////////////////////////////////////////////////////////////////////////////////

onClipEvent (load){  
function speed(num)  
{  
speedX = -(\_root.\_xmouse - hx) / num;  
return(speedX);  
}  
function trans(){  
p = p + speed(60);  
range = (p + 308) \* 3.141593 / 180;  
re1 = Math.sin(range) \* r;  
re2 = Math.cos(range) \* a;  
}  
function property(){  
trans();  
\_x = hx + re1;  
\_alpha = re2 + 70;  
\_yscale = re2 + 70;  
\_xscale = re2 + 70;  
this.swapDepths(\_alpha);  
}  
hx = 650;  
hy = 200;  
r = 100;  
a = 30;  
}  
onClipEvent (enterFrame)  
{  
property();  
}

////////////////////////////////////////////////////////////////////////////////
