Frame 1
stop();
sound = 0;
Frame 2
stop();
_global.level = 1;
_global.speedM = 1;
lives = 5;
Frame 3
if ((_global.setTo == 5) && (sound == 0)) {
EasyS = new Sound();
EasyS.attachSound("easyS");
EasyS.start(0, 10000000);
sound = 1;
}
if ((_global.setTo == 10) && (sound == 0)) {
MedS = new Sound();
MedS.attachSound("medS");
MedS.start(0, 10000000);
sound = 1;
}
if ((_global.setTo == 15) && (sound == 0)) {
HardS = new Sound();
HardS.attachSound("hardS");
HardS.start(0, 10000000);
sound = 1;
}
stop();
time = 0;
pause2.swapDepths(100000);
if (_global.level < 5) {
square = _global.level + 1;
rotat = 0;
}
if ((_global.level > 4) && (_global.level < 9)) {
square = _global.level - 3;
rotat = (2 * (_global.level - 3)) * _global.speedM;
}
if ((_global.level > 8) && (_global.level < 12)) {
square = _global.level - 7;
rotat = (2 * (_global.level - 7)) * _global.speedM;
}
if ((_global.level > 11) && (_global.level < 15)) {
square = _global.level - 10;
rotat = 0;
}
if ((_global.level > 14) && (_global.level < 18)) {
square = _global.level - 13;
rotat = (2 * (_global.level - 13)) * _global.speedM;
}
if (_global.level < 12) {
_root.createEmptyMovieClip("main", 0);
count = 1;
main._x = 275;
main._y = 200;
i = 1;
while (i < (square + 1)) {
l = 1;
while (l < (square + 1)) {
_root.main.attachMovie("box", count, count);
_root.main[count]._x = (i * 55) - (((square + 2) * 55) / 2);
_root.main[count]._y = (l * 55) - (((square + 1) * 55) / 2);
count++;
l++;
}
i++;
}
} else {
count = 1;
i = 1;
while (i < (square + 1)) {
l = 1;
while (l < (square + 1)) {
duplicateMovieClip (box, count, count);
_root[count]._x = ((i * 55) - (((square + 1) * 55) / 2)) + 275;
_root[count]._y = ((l * 55) - (((square + 1) * 55) / 2)) + 200;
if (rotat > 0) {
_root[count]._rotation = Math.random() * 360;
}
count++;
l++;
}
i++;
}
}
count--;
togo = _global.setTo;
Mx = 1;
My = 1;
pause1 = -1;
time2 = 0;
pause2._visible = false;
onEnterFrame = function () {
if (lives == 0) {
i = 1;
while (i < (Math.pow(square, 2) + 1)) {
_root[i].removeMovieClip();
i++;
}
main.removeMovieClip();
pause2.removeMovieClip();
gotoAndStop (5);
}
if (pause1 == -1) {
pause2._visible = false;
if (time2 == 10) {
if (Key.isDown(80)) {
pause1 = pause1 * -1;
time2 = 0;
}
} else {
time2++;
}
if (_global.level < 12) {
if ((_global.level > 8) && (_global.level < 12)) {
if (main._x > (530 - (((square + 2) * 55) / 2))) {
Mx = -1;
}
if (main._x < (20 + (((square + 2) * 55) / 2))) {
Mx = 1;
}
if (main._y > (310 - (((square + 1) * 55) / 2))) {
My = -1;
}
if (main._y < (20 + (((square + 1) * 55) / 2))) {
My = 1;
}
main._x = main._x + ((Mx * (_global.level - 5)) * _global.speedM);
main._y = main._y + ((My * (_global.level - 5)) * _global.speedM);
}
toG.text = togo;
liv.text = lives;
lvl.text = "Level " + _global.level;
_root.main._rotation = _root.main._rotation + rotat;
time++;
if (time == 24) {
if (_root.main[numb]._currentframe == 2) {
lives--;
red.play();
}
i = 1;
while (i < (Math.pow(square, 2) + 1)) {
_root.main[i].gotoAndStop(1);
i++;
}
numb = Math.round(count * Math.random());
if (numb == 0) {
numb = count;
}
_root.main[numb].gotoAndStop(2);
time = 0;
}
_root.main.onMouseDown = function () {
if (_root.main[numb].hitTest(_xmouse, _ymouse, true)) {
if (_root.main[numb]._currentframe == 2) {
togo = togo - 1;
_root.main[numb].gotoAndStop(3);
}
} else if (_root.main[numb]._currentframe == 2) {
lives = lives - 1;
red.play();
_root.main[numb].gotoAndStop(3);
}
};
if (togo == 0) {
_global.level++;
nextFrame();
_root.main.removeMovieClip();
pause2.removeMovieClip();
}
} else {
toG.text = togo;
liv.text = lives;
lvl.text = "Level " + _global.level;
time++;
if (time == 24) {
if (_root[numb]._currentframe == 2) {
lives--;
red.play();
}
i = 1;
while (i < (Math.pow(square, 2) + 1)) {
_root[i].gotoAndStop(1);
_root[i].swapDepths(i);
i++;
}
numb = Math.round(count * Math.random());
if (numb == 0) {
numb = count;
}
_root[numb].gotoAndStop(2);
_root[numb].swapDepths(Math.pow(square, 2) + 2);
time = 0;
}
_root.onMouseDown = function () {
if (_root[numb].hitTest(_xmouse, _ymouse, true)) {
if (_root[numb]._currentframe == 2) {
togo = togo - 1;
_root[numb].gotoAndStop(3);
}
} else if (_root[numb]._currentframe == 2) {
lives = lives - 1;
red.play();
_root[numb].gotoAndStop(3);
}
};
if (togo == 0) {
_global.level++;
nextFrame();
i = 1;
while (i < (Math.pow(square, 2) + 1)) {
_root[i].removeMovieClip();
i++;
}
pause2.removeMovieClip();
}
}
} else {
pause2._visible = true;
if (time2 == 10) {
if (Key.isDown(80)) {
pause1 = pause1 * -1;
time2 = 0;
}
} else {
time2++;
}
}
};
Instance of Symbol 63 MovieClip "box" in Frame 3
onClipEvent (load) {
Randx = (Math.random() * (_global.level - 5)) + 3;
Randy = (Math.random() * (_global.level - 5)) + 3;
if ((Math.random() * 10) < 5) {
Mx = 1;
} else {
Mx = -1;
}
if ((Math.random() * 10) < 5) {
My = 1;
} else {
My = -1;
}
}
onClipEvent (enterFrame) {
if (!(this._name === "box")) {
if (this._x > 530) {
Mx = -1;
}
if (this._x < 20) {
Mx = 1;
}
if (this._y > 310) {
My = -1;
}
if (this._y < 20) {
My = 1;
}
this._x = this._x + ((Randx * Mx) * _global.speedM);
this._y = this._y + ((Randy * My) * _global.speedM);
this._rotation = this._rotation + _root.rotat;
}
}
Frame 4
if (_global.level == 18) {
nextFrame();
}
stop();
if (_global.level == 2) {
other.text = "That was easy but what about 3x3?";
}
if (_global.level == 3) {
other.text = "It just keeps getting bigger...";
}
if (_global.level == 4) {
other.text = "Nice, but what happens when it gets even bigger?";
}
if (_global.level == 5) {
other.text = "Not bigger, smaller, but one little difference...";
}
if (_global.level == 6) {
other.text = "Rotation speed increasing...";
}
if (_global.level == 7) {
other.text = "It just keeps rotating faster...";
}
if (_global.level == 8) {
other.text = "Watch out this is a difficult one...";
}
if (_global.level == 9) {
other.text = "Lets move it around a bit!";
}
if (_global.level == 10) {
other.text = "Bigger, Faster, Harder...";
}
if (_global.level == 11) {
other.text = "So much bouncing...";
}
if (_global.level == 12) {
other.text = "Box x 4";
}
if (_global.level == 13) {
other.text = "Lets mix them up!";
}
if (_global.level == 14) {
other.text = "Look at all those boxes";
}
if (_global.level == 15) {
other.text = "Back to rotation";
}
if (_global.level == 16) {
other.text = "Faster! Faster!";
}
if (_global.level == 17) {
other.text = "Whoa! Too many boxes! (last level)";
}
onEnterFrame = function () {
back.onRelease = function () {
prevFrame();
};
};
Frame 5
stop();
if (!(_global.level === 18)) {
lvl2.text = "You got to Level " + _global.level;
} else {
lvl2.text = "Congradulations you Won!";
}
stop();
Symbol 7 MovieClip Frame 5
stop();
Symbol 9 MovieClip Frame 5
stop();
Symbol 10 MovieClip [box] Frame 1
stop();
Symbol 10 MovieClip [box] Frame 2
stop();
Symbol 10 MovieClip [box] Frame 3
stop();
Symbol 21 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndPlay ("loaded");
}
Symbol 21 MovieClip Frame 2
gotoAndPlay (1);
Symbol 21 MovieClip Frame 40
_root.play();
Symbol 39 Button
on (release) {
_global.setTo = 5;
_global.speedM = 1;
nextFrame();
}
Symbol 41 Button
on (release) {
_global.setTo = 10;
_global.speedM = 1.1;
nextFrame();
}
Symbol 43 Button
on (release) {
_global.setTo = 15;
_global.speedM = 1.2;
nextFrame();
}
Symbol 50 Button
on (release) {
getURL ("http://www.sawfishmedia.com", "_blank");
}
Symbol 52 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 2
stop();
Symbol 63 MovieClip Frame 3
stop();
Symbol 70 Button
on (release) {
_root.EasyS.stop();
_root.MedS.stop();
_root.HardS.stop();
_global.level = 1;
_root.sound = 0;
i = 1;
while (i < (Math.pow(_root.square, 2) + 1)) {
_root[i].removeMovieClip();
i++;
}
_root.main.removeMovieClip();
_root.gotoAndStop(2);
this.removeMovieClip();
}
Symbol 73 MovieClip Frame 1
stop();
Symbol 89 Button
on (release) {
_root.EasyS.stop();
_root.MedS.stop();
_root.HardS.stop();
_global.level = 1;
_root.sound = 0;
_root.gotoAndStop(2);
}
Symbol 90 MovieClip Frame 4
stop();