Frame 1
play();
if (textn == "") {
nmax = "20";
} else {
nmax = int(textn);
}
kolp = nmax;
if (textr == "") {
spd = "5";
} else {
spd = int(textr) / "10";
}
if (texts == "") {
lsc = "100";
} else {
lsc = int(texts);
}
grav = "0.8";
setProperty("fon", _visible , "0");
n = "0";
setProperty("/g", _alpha , "0");
while (n < nmax) {
n = n + "1";
gn = "g" add n;
duplicateMovieClip ("/g", gn, n);
}
Frame 2
setProperty("/g", _xscale , lsc);
setProperty("/g", _yscale , lsc);
setProperty("/g", _visible , "1");
setProperty("/g", _x , "100" + random("430"));
setProperty("/g", _y , "480" + random("50"));
setProperty("/g", _alpha , "100");
rsp = random("7") + "20";
kgr = "0";
Frame 3
setProperty("/g", _y , (getProperty("g", _y) - rsp) + kgr);
kgr = kgr + grav;
setProperty("/g", _alpha , getProperty("g", _alpha) - "2");
Frame 4
if (rsp >= kgr) {
gotoAndPlay (3);
}
Frame 5
setProperty("/g", _alpha , "100");
n = "0";
while (n < nmax) {
n = n + "1";
gn = "g" add n;
setProperty(gn, _x , getProperty("g", _x));
setProperty(gn, _y , getProperty("g", _y));
Set("rx" add n, ((-random(spd * "10")) + random(spd * "10")) / "10");
Set("ry" add n, ((-random(spd * "10")) + random(spd * "10")) / "10");
setProperty(gn, _alpha , "60" + random("40"));
}
k = spd * "2";
setProperty("/g", _visible , "0");
traz = "0";
rtraz = "60";
Frame 6
n = "0";
while (n < nmax) {
n = n + "1";
setProperty("/g" add n, _alpha , getProperty("g" add n, _alpha) - "1.5");
if (("rx" add n) >= "0") {
setProperty("/g" add n, _x , getProperty("g" add n, _x) - (eval ("rx" add n) * k));
} else {
setProperty("/g" add n, _x , getProperty("g" add n, _x) + (eval ("rx" add n) * k));
}
if (("ry" add n) >= "0") {
setProperty("/g" add n, _y , (getProperty("g" add n, _y) - (eval ("ry" add n) * k)) + grav);
} else {
setProperty("/g" add n, _y , (getProperty("g" add n, _y) + (eval ("ry" add n) * k)) + grav);
}
}
if ("0" < k) {
k = k / "1.3";
}
if ("0" >= getProperty("fon", _alpha)) {
setProperty("/fon", _visible , "0");
} else {
setProperty("/fon", _alpha , getProperty("fon", _alpha) - "2");
}
Frame 7
if (traz == "0") {
setProperty("/fon", _visible , "1");
if ("50" >= nmax) {
setProperty("/fon", _alpha , nmax * "2");
} else {
setProperty("/fon", _alpha , "100");
}
}
traz = traz + "1";
if (traz < rtraz) {
gotoAndPlay (6);
} else {
gotoAndPlay (2);
}
Symbol 17 Button
on (press) {
while ("0" < kolp) {
removeMovieClip("g" add kolp);
kolp = kolp - "1";
}
kolp = nmax;
gotoAndPlay (1);
}