Frame 1
_quality = "MEDIUM";
N = 40;
R = 12;
C = 2.5;
A = 2;
var x = new Array();
var y = new Array();
i = 0;
while (i < N) {
x[i] = 0;
y[i] = 0;
i++;
}
i = 1;
while (i < N) {
if (i == 1) {
attachMovie("Cabeza", "Pieza" + i, (N + 1) - i);
} else if ((i == 4) || (i == 14)) {
attachMovie("Aletas", "Pieza" + i, (N + 1) - i);
} else {
attachMovie("Espina", "Pieza" + i, (N + 1) - i);
}
this["Pieza" + i]._x = 142 + x[i - 1];
this["Pieza" + i]._y = 142 + y[i - 1];
this["Pieza" + i]._xscale = 102 + (A * (1 - i));
this["Pieza" + i]._yscale = 102 + (A * (1 - i));
this["Pieza" + i]._alpha = 100 - ((100 / N) * i);
i++;
}
Frame 2
x[0] = x[0] + (((_xmouse - x[0]) - 142) / R);
y[0] = y[0] + (((_ymouse - y[0]) - 142) / R);
i = 1;
while (i < N) {
x[i] = x[i] + ((x[i - 1] - x[i]) / C);
y[i] = y[i] + ((y[i - 1] - y[i]) / C);
i++;
}
i = 1;
while (i < N) {
this["Pieza" + i]._x = 142 + ((x[i - 1] + x[i]) / 2);
this["Pieza" + i]._y = 142 + ((y[i - 1] + y[i]) / 2);
this["Pieza" + i]._rotation = 57.295778 * Math.atan2(y[i] - y[i - 1], x[i] - x[i - 1]);
i++;
}
Frame 3
gotoAndPlay (2);