# Converting between AS1 and AS2 is a \*\*\*\*\*!

**URL:** <https://forum.kirupa.com/t/converting-between-as1-and-as2-is-a/192262>\
**Category:** flash\
**Created:** [June 27, 2006, 10:37am UTC](https://forum.kirupa.com/t/converting-between-as1-and-as2-is-a/192262 "2006-06-27T10:37:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xtrude](https://avatars.discourse-cdn.com/v4/letter/x/7ea924/32.png) [@xtrude](https://forum.kirupa.com/u/xtrude)\
**Post date:** [June 27, 2006, 10:37am UTC](https://forum.kirupa.com/t/converting-between-as1-and-as2-is-a/192262/1 "2006-06-27T10:37:33Z")

</div>

Hi guys,

i need an AS guru to help me out. i found a script on the net, but it only works in flash 5 because it uses prototypes.(i guess) i need to convert it to flash 8. been cracking my head but it just won’t work.

here’s what i have:

in the library: a MC with linkage id - circle;  
on the stage: an empty movie clip with an instance name: mc\_Circles

actions on mc\_Circles (still flash 5 format):

onClipEvent (load) {  
teile = new Array(0,1,2,3,4,5,6);  
faktor = 500;  
tilt = -15;  
signal = true;  
}  
onClipEvent (enterFrame) {  
updateMove();  
}

first frame of the main timeline:

Movieclip.prototype.render3d = function (winkelX, winkelY) {  
winX = (winkelX_Math.PI)/180;  
winY = (winkelY_Math.PI)/180;  
tempZ = (z_Math.cos(winY))-(x_Math.sin(winY));  
Xpos = (z_Math.sin(winY))+(x_Math.cos(winY));  
Zpos = (y_Math.sin(winX))+(tempZ_Math.cos(winX));  
Ypos = (y_Math.cos(winX))-(tempZ_Math.sin(winX));  
\_x = 2_Xpos;  
\_y = 2_Ypos;  
\_xscale = \_yscale= Zpos+100;  
farb.rb = (farb.gb=(farb.bb=zPos));  
aktfarb.setTransform(farb);  
swapDepths(Zpos_50);  
}  
Movieclip.prototype.updateMove = function () {  
if (tester && signal) {  
i = 0;  
while (anzahl\>=i) {  
posMaus();  
this[“teil”+i].render3d(tilt, \_root.winY);  
i++;  
}  
}  
}  
Movieclip.prototype.ort = function (radius, gesamt) {  
x = new Array(0,0);  
y = new Array(0,0);  
z = new Array(0,0);  
aktWinkel = (radians=((360/gesamt)Math.PI)/180);  
i = 1;  
while (gesamt\>=i) {  
x = Math.round(radius_Math.cos(aktWinkel));  
z\* = Math.round(radius_Math.sin(aktWinkel));  
y_ = 0;  
aktWinkel = aktWinkel-radians;  
i++;  
}  
}  
Movieclip.prototype.initAbschnitt = function () {  
anzahl = teile.length-1;  
ort(90, anzahl);  
i = 0;  
while (anzahl\>=i) {  
if (i != 0) {  
attachMovie(“circle”, “teil”+i, i);  
}  
this[“teil”+i].x = x\*;  
this[“teil”+i].y = y\*;  
this[“teil”+i].z = z\*;  
//this[“teil”+i].aktfarb = new Color(this[“teil”+i]);  
//this[“teil”+i].farb = this[“teil”+i].aktfarb.getTransform();  
this[“teil”+i].render3d(-10, \_root.winY);  
i++;  
}  
tester = 1;  
}  
Movieclip.prototype.posMaus = function () {  
\_root.winY = \_root.winY-(this.\_xmouse/faktor);  
}

If someone thinks he can crack it i’d be more than greatful.

Cheers,  
Phil.
