Frame 5
setProperty("/sin", _visible , "0");
startDrag ("/mxy", true);
setProperty("/ball", _visible , "0");
dist = "300";
max_ball = "15";
a = 5;
b = 1.66;
num = 1;
while (Number(max_ball) >= Number(num)) {
duplicateMovieClip ("/ball", "ball_" add num, 100 - num);
Set("x_" add num, 0);
Set("y_" add num, 0);
Set("z_" add num, 0);
Set("vx" add num, 0);
Set("vy" add num, 0);
Set("vz" add num, 0);
Set("zsort" add num, num);
num = Number(num) + 1;
}
Frame 10
mx = getProperty("/mxy", _x);
my = getProperty("/mxy", _y);
if ((push eq "on") and (Number(z_0) < 100)) {
z_0 = Number(z_0) + 15;
} else if (Number(-150) < Number(z_0)) {
z_0 = z_0 - 15;
}
x_0 = ((mx - 390) * (Number(z_0) + Number(dist))) / dist;
y_0 = ((220 - my) * (Number(z_0) + Number(dist))) / dist;
i = 1;
while (Number(max_ball) >= Number(i)) {
Set("vx" add i, (eval ("vx" add i) + (((eval ("x_" add (i - 1)) - eval ("x_" add i)) * 1) / a)) / b);
Set("vy" add i, (eval ("vy" add i) + (((eval ("y_" add (i - 1)) - eval ("y_" add i)) * 1) / a)) / b);
Set("vz" add i, (eval ("vz" add i) + (((eval ("z_" add (i - 1)) - eval ("z_" add i)) * 1) / a)) / b);
Set("x_" add i, eval ("x_" add i) + eval ("vx" add i));
Set("y_" add i, eval ("y_" add i) + eval ("vy" add i));
Set("z_" add i, eval ("z_" add i) + eval ("vz" add i));
x = eval ("x_" add (i - 1));
y = eval ("y_" add (i - 1));
z = eval ("z_" add (i - 1));
Set("sx_" add i, 390 + Number((x * dist) / (Number(z) + Number(dist))));
Set("sy_" add i, 220 - ((y * dist) / (Number(z) + Number(dist))));
i = Number(i) + 1;
}
n = "2";
while (Number(n) < Number(max_ball)) {
i = max_ball;
dummy = "nada";
while (Number(i) >= Number(n)) {
if (eval ("z_" add eval ("zsort" add i)) < eval ("z_" add eval ("zsort" add (i - 1)))) {
dummy = eval ("zsort" add (i - 1));
Set("zsort" add (i - 1), eval ("zsort" add i));
Set("zsort" add i, dummy);
}
i = i - 1;
}
if (dummy eq "nada") {
n = max_ball;
}
n = Number(n) + 1;
}
num_ball = 1;
while (Number(max_ball) >= Number(num_ball)) {
setProperty("/ball_" add num_ball, _xscale , 150 - eval ("z_" add eval ("zsort" add num_ball)));
setProperty("/ball_" add num_ball, _yscale , 150 - eval ("z_" add eval ("zsort" add num_ball)));
setProperty("/ball_" add num_ball, _alpha , 100 - eval ("z_" add eval ("zsort" add num_ball)));
setProperty("/ball_" add num_ball, _x , eval ("sx_" add eval ("zsort" add num_ball)));
setProperty("/ball_" add num_ball, _y , eval ("sy_" add eval ("zsort" add num_ball)));
num_ball = Number(num_ball) + 1;
}
Frame 11
gotoAndPlay (10);
Symbol 20 Button
on (press) {
Set("/:push", "on");
}
on (release) {
Set("/:push", "off");
}
Symbol 21 MovieClip Frame 1
stop();
Symbol 23 Button
on (release) {
getURL ("http://move.to/cleoag", "_blank");
}