Здрасти господа.
Вопрос в следующем, эта штука была написана много много времени назад, еще под 5-й плеер и AS1.0.
От меня хотят чтобы этот же код заработал под 8-ку. Помогите оптимизировать, пожалуйста:

Код:
Movieclip.prototype.rotacion = function(dist, rad, tm, cx, cy) {
init = 1;
if (init != 1) {
x = 150;
y = rad;
z = 0;
}
dir = (_root._ymouse>cy) ? -1 : 1;
vel = Math.abs(_root._ymouse-cy)*0.02;
axis = (_root._xmouse-cx+600)*0.0005;
theta = theta+(dir*vel);
y = Math.cos(theta*(Math.PI/-180))*rad;
x = Math.sin(theta*(Math.PI/-180))*rad*axis;
z = Math.sin(theta*(Math.PI/-180))*2.3*rad;
per = dist/(dist+z);
xp = x*per;
yp = y*per;
tmp = tm*per*2;
this._x = cx-xp;
this._y = cy-yp;
this._xscale = this._yscale=tmp*2;
this._alpha = this._xscale-260;
this.swapDepths(this._xscale*10);
};
for (i=1; i<=12; i++) {
nube.duplicateMovieClip("nube"+i, i);
_root["nube"+i].theta = 360/12*i;
}
s = .80;
d = 0.9;
desplazamiento_x = 20;
desplazamiento_y = 20;
_root.nube._visible = 0;
stop();
Внешние параметры:

Код:
onClipEvent (enterFrame) {
for (j=1; j<=6; j++) {
_root["nube"+j].rotacion(1000, 90, 100, 150, 150);
//дистанция, радиус, размер фотки, поз.икс, поз.игрек
}
}