Frame 1
stop();
fscommand ("allowscale", false);
stop();
Instance of Symbol 34 MovieClip in Frame 2
onClipEvent (load) {
t = 150;
_root.stop;
}
onClipEvent (enterFrame) {
t--;
_root.timer = int(t / 50);
if (0 >= t) {
_root.nextFrame();
}
}
Instance of Symbol 38 MovieClip "mc" in Frame 3
onClipEvent (load) {
_root.level = _root.livello_iniziale;
max_elementi = 3;
_root.velocity = 250 - (_root.level * 15);
_root.score = 0;
min_x = 0;
max_x = 270;
min_y = 0;
max_y = 270;
x = this._x - 10;
oldtt = getTimer();
right = true;
i = max_elementi;
while (0 < i) {
_root.attachMovie("coda", "coda" + i, i);
myCoda = _root["coda" + i];
myCoda._x = x;
myCoda._y = this._y;
x = x - 10;
i--;
}
}
onClipEvent (keyDown) {
if (Key.isDown(Key.UP) && (!down)) {
up = true;
down = false;
right = false;
left = false;
}
if (Key.isDown(Key.RIGHT) && (!left)) {
up = false;
down = false;
right = true;
left = false;
}
if (Key.isDown(Key.DOWN) && (!up)) {
up = false;
down = true;
right = false;
left = false;
}
if (Key.isDown(Key.LEFT) && (!right)) {
up = false;
down = false;
right = false;
left = true;
}
}
onClipEvent (enterFrame) {
x = this._x;
y = this._y;
tt = getTimer();
if (_root.velocity < (tt - oldtt)) {
if (up) {
this._x = this._x;
this._y = this._y - 10;
}
if (right) {
this._x = this._x + 10;
this._y = this._y;
}
if (down) {
this._x = this._x;
this._y = this._y + 10;
}
if (left) {
this._x = this._x - 10;
this._y = this._y;
}
if (max_elementi < i) {
i = 0;
}
_root.attachMovie("coda", "coda" + i, i);
myCoda = _root["coda" + i];
myCoda._x = x;
myCoda._y = y;
i++;
oldtt = tt;
if ((((_y < min_y) || (max_y < _y)) || (_x < min_x)) || (max_x < _x)) {
_root.gotoAndStop("morto");
}
}
for (c in _root) {
if (_root[c]._name.substr(0, 4) eq "coda") {
if (this.hitTest(_root[c])) {
_root.gotoAndStop("morto");
}
}
}
}
Instance of Symbol 41 MovieClip "controller" in Frame 3
onClipEvent (load) {
function blockObj(x, y) {
_root.attachMovie("block", "block" + i, i);
myBlock = _root["block" + i];
myBlock._x = x;
myBlock._y = y;
for (a in _root) {
if (_root[a]._name.substr(0, 4) eq "coda") {
if (_root[a].hitTest(myBlock)) {
myBlock._x = myx[random(tot_ar)];
myBlock._y = myx[random(tot_ar)];
}
}
}
}
i = 1000;
myx = new Array(5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 225, 235, 245, 255, 265);
tot_ar = myx.length;
newblock = new blockObj(myx[random(tot_ar)], myx[random(tot_ar)]);
}
onClipEvent (enterFrame) {
if (_root.mc.hitTest(myBlock)) {
removeMovieClip(myBlock);
newBlock = new blockObj(myx[random(tot_ar)], myx[random(tot_ar)]);
_root.mc.max_elementi++;
_root.score = _root.score + (50 + (_root.level * 2));
if ((300 * _root.level) < _root.score) {
_root.level++;
_root.velocity = _root.velocity - 15;
if (_root.velocity < 15) {
_root.velocity = 15;
}
}
}
_root.myscore = "Score: " + _root.score;
_root.mylevel = "Level: " + _root.level;
}
Frame 26
stop();
pausa = 1000;
timer = "your score: " + score;
for (a in _root) {
if (typeOf(a) == movieclip) {
removeMovieClip(_root.a);
}
}
Instance of Symbol 45 MovieClip "died" in Frame 26
onClipEvent (load) {
Submit = true;
Carica = false;
nome = _root.name;
score = _root.score;
}
Symbol 20 Button
on (release) {
if (1 < _root.level) {
_root.level--;
}
}
Symbol 21 Button
on (release) {
if (_root.level < 10) {
_root.level++;
}
}
Symbol 31 Button
on (release) {
if (_root.name eq "") {
_root.name = "Player 1";
}
_root.livello_iniziale = _root.level;
_root.nextFrame();
}
Symbol 45 MovieClip Frame 100
stop();
Submit = false;
Carica = true;
i = 1;
y = -100;
Instance of Symbol 44 MovieClip "dummy" in Symbol 45 MovieClip Frame 100
onClipEvent (data) {
nomi = new Array();
punti = new Array();
_parent.i = 1;
while (10 >= _parent.i) {
myname = eval ("nome" + _parent.i);
nomi.push(myname);
punti.push(eval ("score" + _parent.i));
_parent.i++;
}
i = 0;
while (i < nomi.length) {
_parent.attachMovie("punti", "punti" + i, i);
myPoint = _parent["punti" + i];
myPoint.nome = ((i + 1) + ". ") + nomi[i];
myPoint.score = "pts. " + punti[i];
myPoint._y = _parent.y;
_parent.y = _parent.y + 14;
i++;
}
}
Symbol 51 Button
on (release) {
_root.gotoAndStop(2);
_root.score = 0;
}