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 = (winkelXMath.PI)/180;
winY = (winkelYMath.PI)/180;
tempZ = (zMath.cos(winY))-(xMath.sin(winY));
Xpos = (zMath.sin(winY))+(xMath.cos(winY));
Zpos = (yMath.sin(winX))+(tempZMath.cos(winX));
Ypos = (yMath.cos(winX))-(tempZMath.sin(winX));
_x = 2Xpos;
_y = 2Ypos;
_xscale = _yscale= Zpos+100;
farb.rb = (farb.gb=(farb.bb=zPos));
aktfarb.setTransform(farb);
swapDepths(Zpos50);
}
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(radiusMath.cos(aktWinkel));
z* = Math.round(radiusMath.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.