Frame 1
function box(x, y, width, height, number) {
var bX = x;
var by = y;
var bWidth = width;
var bHeight = height;
var newName = ("box" add number);
trace(newName);
duplicateMovieClip ("box", newName, (2000 + ((3 * x) + (5 * y))) + (3 * number));
eval (newName)._x = bX;
eval (newName)._y = bY;
eval (newName)._width = bWidth;
eval (newName)._height = bHeight;
eval (newName)._alpha = 50;
eval (newName).numSegs = (bHeight / 5) * 2;
eval (newName).numSegs = eval (newName).numSegs + ((bWidth / 5) * 2);
eval (newName).scoring = eval (newName).numSegs;
eval (newName).boxNum = number;
numBoxes++;
remaining++;
}
function hLine(x, y, len, number) {
var newName = ("HLine" add number);
trace(newName);
duplicateMovieClip ("hLine", newName, 500 + number);
eval (newName)._x = x;
eval (newName)._y = y;
eval (newName)._width = len;
eval (newName)._height = 0.1;
numHLines++;
}
function vLine(x, y, len, number) {
var newName = ("vLine" add number);
duplicateMovieClip ("vLine", newName, 550 + number);
eval (newName)._height = len;
eval (newName)._width = 1;
eval (newName)._x = x;
eval (newName)._y = y;
numVLines++;
}
function prepareLevel() {
setLayout(level);
var counter = 1010;
var i = 0;
while (i < numHLines) {
startX = eval ("hLine" add i)._x;
startY = eval ("hLine" add i)._y;
endX = eval ("hLine" add i)._x + eval ("hLine" add i)._width;
endY = startY;
lineLength = endX - startX;
var j = 0;
while (j < lineLength) {
counter++;
var newName = (("h" add (startX + j)) add startY);
duplicateMovieClip ("h", newName, counter);
eval (newName)._x = startX + j;
eval (newName)._y = startY;
j = j + step;
}
i++;
}
var i = 0;
while (i < numVLines) {
startX = eval ("vLine" add i)._x;
startY = eval ("vLine" add i)._y;
endX = startX;
endY = eval ("vLine" add i)._y + eval ("vLine" add i)._height;
lineLength = endY - startY;
var j = 0;
while (j < lineLength) {
counter++;
var newName = (("v" add startX) add (startY + j));
duplicateMovieClip ("v", newName, counter);
eval (newName)._x = startX;
eval (newName)._y = startY + j;
j = j + step;
}
i++;
}
var i = 0;
while (i < remaining) {
trace("CREATING remain " add i);
duplicateMovieClip ("remaining_block", "remain" add i, 15 + i);
eval ("remain" add i)._width = (15 + (3 * i)) + (i * 2);
eval ("remain" add i)._x = 390;
eval ("remain" add i)._y = (375 - (5 * remaining)) + (5 * i);
i++;
}
}
function createSquare(num) {
trace(num);
var number = num;
var i = 0;
while (i < number) {
var newName = ("square" add numSquares);
trace("Creating enemy " add newName);
duplicateMovieClip ("enemy1", newName, 10000 + numEnemies);
eval (newName).gotoAndPlay(1);
numSquares++;
numEnemies++;
i++;
}
}
function createTri(num) {
trace(num);
var number = num;
var i = 0;
while (i < number) {
var newName = ("tri" add numTris);
trace("Creating enemy " add newName);
duplicateMovieClip ("enemy2", newName, 10000 + numEnemies);
eval (newName).gotoAndPlay(1);
numTris++;
numEnemies++;
i++;
}
}
function createRect(num) {
trace(num);
var number = num;
var i = 0;
while (i < number) {
var newName = ("rect" add numRects);
duplicateMovieClip ("enemy3", newName, 10000 + numEnemies);
trace("Creating enemy " add newName);
eval (newName).gotoAndPlay(1);
numRects++;
numEnemies++;
i++;
}
}
function createSpark(num) {
trace("SPARK" add num);
var number = num;
var i = 0;
while (i < number) {
var newName = ("spark" add numSparks);
duplicateMovieClip ("enemy4", newName, 10000 + numEnemies);
trace("Creating enemy " add newName);
eval (newName).gotoAndPlay(1);
numSparks++;
numEnemies++;
i++;
}
}
function setLayout(level) {
trace("LEVEL = " add level);
if (level == 1) {
HL = hLine(210, 10, 180, 0);
HL = hLine(10, 50, 200, 1);
HL = hLine(110, 100, 100, 2);
HL = hLine(10, 200, 380, 3);
HL = hLine(10, 300, 200, 4);
HL = hLine(10, 390, 280, 5);
VL = vLine(210, 10, 380, 0);
VL = vLine(10, 50, 340, 1);
VL = vLine(110, 50, 250, 2);
VL = vLine(290, 200, 190, 3);
VL = vLine(390, 10, 190, 4);
bBox = new box(210, 10, 180, 190, 1);
bBox = new box(110, 50, 100, 50, 2);
bBox = new box(10, 50, 100, 150, 3);
bBox = new box(110, 100, 100, 100, 4);
bBox = new box(10, 200, 100, 100, 5);
bBox = new box(110, 200, 100, 100, 6);
bBox = new box(10, 300, 200, 90, 7);
bBox = new box(210, 200, 80, 190, 8);
circle._x = 210;
circle._y = 200;
topMost = 10;
bottomMost = 390;
leftMost = 10;
rightMost = 380;
createSquare(2);
createTri(1);
} else if (level == 2) {
HL = hLine(300, 50, 50, 0);
HL = hLine(150, 100, 200, 1);
HL = hLine(100, 150, 200, 2);
HL = hLine(50, 250, 200, 3);
HL = hLine(250, 290, 50, 4);
HL = hLine(50, 340, 50, 5);
HL = hLine(50, 340, 50, 6);
HL = hLine(150, 340, 100, 7);
VL = vLine(50, 250, 90, 0);
VL = vLine(100, 150, 190, 1);
VL = vLine(150, 100, 240, 2);
VL = vLine(200, 100, 50, 3);
VL = vLine(250, 150, 190, 4);
VL = vLine(300, 50, 240, 5);
VL = vLine(350, 50, 50, 6);
bBox = new box(300, 50, 50, 50, 1);
bBox = new box(150, 100, 50, 50, 2);
bBox = new box(200, 100, 100, 50, 3);
bBox = new box(100, 150, 50, 100, 4);
bBox = new box(150, 150, 100, 100, 5);
bBox = new box(250, 150, 50, 140, 6);
bBox = new box(50, 250, 50, 90, 7);
bBox = new box(150, 250, 100, 90, 8);
circle._x = 250;
circle._y = 200;
topMost = 50;
bottomMost = 390;
leftMost = 50;
rightMost = 350;
createSquare(3);
createTri(1);
createRect(1);
createSpark(1);
} else if (level == 3) {
HL = hLine(150, 100, 50, 0);
HL = hLine(25, 100, 75, 1);
HL = hLine(250, 100, 75, 2);
HL = hLine(25, 150, 50, 3);
HL = hLine(100, 150, 50, 4);
HL = hLine(200, 150, 50, 5);
HL = hLine(275, 150, 50, 6);
HL = hLine(25, 200, 125, 7);
HL = hLine(200, 200, 125, 8);
HL = hLine(25, 300, 50, 9);
HL = hLine(100, 300, 50, 10);
HL = hLine(200, 300, 50, 11);
HL = hLine(275, 300, 50, 12);
HL = hLine(25, 350, 125, 13);
HL = hLine(200, 350, 125, 14);
HL = hLine(100, 75, 50, 15);
HL = hLine(200, 75, 50, 16);
HL = hLine(100, 125, 50, 17);
HL = hLine(200, 125, 50, 18);
VL = vLine(25, 100, 250, 0);
VL = vLine(75, 100, 50, 1);
VL = vLine(75, 300, 50, 2);
VL = vLine(100, 75, 50, 3);
VL = vLine(100, 150, 50, 4);
VL = vLine(100, 300, 50, 5);
VL = vLine(150, 75, 50, 6);
VL = vLine(150, 150, 50, 7);
VL = vLine(150, 300, 50, 8);
VL = vLine(200, 75, 50, 9);
VL = vLine(200, 150, 50, 10);
VL = vLine(200, 300, 50, 11);
VL = vLine(250, 75, 50, 12);
VL = vLine(250, 150, 50, 13);
VL = vLine(250, 300, 50, 14);
VL = vLine(275, 100, 50, 15);
VL = vLine(275, 300, 50, 16);
VL = vLine(325, 100, 250, 17);
bBox = new box(100, 75, 50, 50, 1);
bBox = new box(200, 75, 50, 50, 2);
bBox = new box(25, 100, 50, 50, 3);
bBox = new box(275, 100, 50, 50, 4);
bBox = new box(100, 150, 50, 50, 5);
bBox = new box(200, 150, 50, 50, 6);
bBox = new box(25, 300, 50, 50, 7);
bBox = new box(100, 300, 50, 50, 8);
bBox = new box(200, 300, 50, 50, 9);
bBox = new box(275, 300, 50, 50, 10);
circle._x = 200;
circle._y = 75;
topMost = 75;
bottomMost = 350;
leftMost = 25;
rightMost = 250;
createSquare(2);
createTri(1);
createRect(1);
} else if (level == 4) {
HL = hLine(250, 50, 50, 0);
HL = hLine(10, 100, 380, 1);
HL = hLine(10, 150, 50, 2);
HL = hLine(250, 150, 50, 3);
HL = hLine(10, 200, 50, 4);
HL = hLine(250, 200, 50, 5);
HL = hLine(10, 250, 380, 6);
HL = hLine(10, 350, 170, 7);
HL = hLine(250, 350, 50, 8);
HL = hLine(10, 390, 170, 9);
HL = hLine(250, 390, 50, 10);
VL = vLine(10, 100, 290, 0);
VL = vLine(60, 100, 150, 1);
VL = vLine(110, 250, 140, 2);
VL = vLine(250, 50, 340, 3);
VL = vLine(300, 50, 340, 4);
VL = vLine(390, 100, 150, 5);
VL = vLine(180, 350, 40, 5);
VL = vLine(390, 100, 150, 6);
bBox = new box(250, 50, 50, 50, 1);
bBox = new box(10, 100, 50, 50, 2);
bBox = new box(10, 150, 50, 50, 3);
bBox = new box(10, 200, 50, 50, 4);
bBox = new box(60, 100, 190, 150, 5);
bBox = new box(250, 100, 50, 50, 6);
bBox = new box(250, 150, 50, 50, 7);
bBox = new box(250, 200, 50, 50, 8);
bBox = new box(250, 200, 50, 50, 9);
bBox = new box(10, 250, 100, 100, 10);
bBox = new box(250, 250, 50, 100, 11);
bBox = new box(10, 350, 100, 40, 12);
bBox = new box(250, 350, 50, 40, 13);
bBox = new box(110, 350, 70, 40, 14);
bBox = new box(300, 100, 90, 150, 15);
circle._x = 250;
circle._y = 200;
topMost = 100;
rightMost = 300;
createTri(2);
createRect(1);
createSpark(1);
} else if (level == 5) {
HL = hLine(210, 10, 180, 0);
HL = hLine(210, 110, 130, 1);
HL = hLine(10, 160, 380, 2);
HL = hLine(10, 210, 380, 3);
HL = hLine(10, 260, 380, 4);
HL = hLine(10, 310, 260, 5);
HL = hLine(10, 390, 200, 6);
VL = vLine(210, 10, 380, 0);
VL = vLine(340, 10, 250, 1);
VL = vLine(390, 10, 250, 2);
VL = vLine(10, 160, 230, 3);
VL = vLine(60, 160, 230, 4);
VL = vLine(270, 210, 100, 5);
bBox = new box(210, 10, 130, 100, 1);
bBox = new box(340, 10, 50, 150, 2);
bBox = new box(210, 110, 130, 50, 3);
bBox = new box(10, 160, 50, 50, 4);
bBox = new box(60, 160, 150, 50, 5);
bBox = new box(210, 160, 130, 50, 6);
bBox = new box(340, 160, 50, 50, 7);
bBox = new box(10, 210, 50, 50, 8);
bBox = new box(60, 210, 150, 50, 9);
bBox = new box(210, 210, 60, 50, 10);
bBox = new box(270, 210, 70, 50, 11);
bBox = new box(340, 210, 50, 50, 12);
bBox = new box(10, 260, 50, 50, 13);
bBox = new box(60, 260, 150, 50, 14);
bBox = new box(210, 260, 60, 50, 15);
bBox = new box(10, 310, 50, 80, 16);
bBox = new box(60, 310, 150, 80, 17);
circle._x = 210;
circle._y = 210;
topMost = 10;
rightMost = 340;
createTri(2);
createRect(2);
createSpark(1);
} else if (level == 6) {
HL = hLine(50, 95, 50, 0);
HL = hLine(50, 145, 50, 1);
HL = hLine(50, 195, 50, 2);
HL = hLine(50, 245, 50, 3);
HL = hLine(50, 295, 50, 4);
HL = hLine(50, 345, 50, 5);
HL = hLine(100, 70, 200, 6);
HL = hLine(100, 170, 200, 7);
HL = hLine(100, 270, 200, 8);
HL = hLine(100, 370, 200, 9);
HL = hLine(100, 120, 50, 10);
HL = hLine(100, 320, 50, 11);
HL = hLine(250, 120, 50, 12);
HL = hLine(250, 320, 50, 13);
HL = hLine(300, 95, 50, 14);
HL = hLine(300, 145, 50, 15);
HL = hLine(300, 195, 50, 16);
HL = hLine(300, 245, 50, 17);
HL = hLine(300, 295, 50, 18);
HL = hLine(300, 345, 50, 19);
VL = vLine(50, 95, 100, 0);
VL = vLine(50, 245, 100, 1);
VL = vLine(100, 70, 125, 2);
VL = vLine(100, 245, 125, 3);
VL = vLine(150, 70, 300, 4);
VL = vLine(250, 70, 300, 5);
VL = vLine(300, 70, 125, 6);
VL = vLine(300, 245, 125, 7);
VL = vLine(350, 95, 100, 8);
VL = vLine(350, 245, 100, 9);
bBox = new box(50, 95, 50, 50, 1);
bBox = new box(50, 145, 50, 50, 2);
bBox = new box(50, 245, 50, 50, 3);
bBox = new box(50, 295, 50, 50, 4);
bBox = new box(100, 70, 50, 50, 5);
bBox = new box(100, 120, 50, 50, 6);
bBox = new box(100, 270, 50, 50, 7);
bBox = new box(100, 320, 50, 50, 8);
bBox = new box(150, 70, 100, 100, 9);
bBox = new box(150, 170, 100, 100, 10);
bBox = new box(150, 270, 100, 100, 11);
bBox = new box(250, 70, 50, 50, 12);
bBox = new box(250, 120, 50, 50, 13);
bBox = new box(250, 270, 50, 50, 14);
bBox = new box(250, 320, 50, 50, 15);
bBox = new box(300, 95, 50, 50, 16);
bBox = new box(300, 145, 50, 50, 17);
bBox = new box(300, 245, 50, 50, 18);
bBox = new box(300, 295, 50, 50, 19);
circle._x = 250;
circle._y = 250;
topMost = 10;
rightMost = 340;
createTri(2);
createRect(2);
} else if (level == 7) {
HL = hLine(50, 70, 300, 0);
HL = hLine(100, 120, 200, 1);
HL = hLine(100, 170, 200, 2);
HL = hLine(50, 220, 300, 3);
HL = hLine(50, 270, 200, 4);
HL = hLine(100, 320, 50, 5);
HL = hLine(50, 370, 50, 6);
VL = vLine(50, 70, 300, 0);
VL = vLine(100, 70, 150, 1);
VL = vLine(100, 270, 100, 2);
VL = vLine(150, 120, 50, 3);
VL = vLine(150, 270, 50, 4);
VL = vLine(200, 120, 50, 5);
VL = vLine(200, 220, 50, 6);
VL = vLine(250, 120, 50, 7);
VL = vLine(250, 220, 50, 8);
VL = vLine(300, 70, 150, 9);
VL = vLine(350, 70, 150, 10);
bBox = new box(50, 70, 50, 150, 1);
bBox = new box(100, 70, 200, 50, 2);
bBox = new box(300, 70, 50, 150, 3);
bBox = new box(100, 120, 50, 50, 4);
bBox = new box(150, 120, 50, 50, 5);
bBox = new box(200, 120, 50, 50, 6);
bBox = new box(250, 120, 50, 50, 7);
bBox = new box(100, 170, 200, 50, 8);
bBox = new box(50, 220, 150, 50, 9);
bBox = new box(200, 220, 50, 50, 10);
bBox = new box(50, 270, 50, 100, 11);
bBox = new box(100, 270, 50, 50, 12);
circle._x = 50;
circle._y = 70;
topMost = 10;
rightMost = 340;
createTri(2);
createRect(2);
}
}
if (_parent.getBounds()) {
stop();
}
trace("SQUARED: starting up...");
level = 0;
pwds = new Array(10);
pwds[0] = "zero";
pwds[1] = "one";
pwds[2] = "two";
pwds[3] = "three";
pwds[4] = "four";
pwds[5] = "five";
pwds[6] = "six";
pwds[7] = "seven";
pwds[8] = "eight";
pwds[9] = "nine";
introSound = new Sound(this);
introSound.attachSound("intro");
introSound.setVolume(0);
introSound.setPan(0);
introSound.start(0, 9999);
Frame 3
introSound.setVolume(introSound.getVolume() + 5);
Frame 4
if (introSound.getVolume() < 100) {
gotoAndPlay(_currentframe - 1);
}
Frame 5
enemy1.play();
enemy1._visible = true;
enemy2.play();
enemy2._visible = true;
enemy3.play();
enemy3._visible = true;
enemy4.play();
enemy4._visible = true;
Frame 7
gotoAndPlay(_currentframe - 1);
Instance of Symbol 82 MovieClip in Frame 8
onClipEvent (keyDown) {
if (Key.isDown(13)) {
var password = pwd;
var i = 0;
while (i < 10) {
if (password eq _parent.pwds[i]) {
_parent.level = i;
_parent.gotoAndPlay("start");
}
i++;
}
_parent.level = 0;
_parent.gotoAndPlay("iNoSound");
}
}
Frame 11
gotoAndPlay(_currentframe - 1);
Frame 13
introSound.stop();
var score = 0;
var lifes = 4;
if (0 >= level) {
var level = 1;
}
var numLevel = 6;
var remaining = 0;
enemy1.stop();
enemy1._visible = false;
enemy2.stop();
enemy2._visible = false;
enemy3.stop();
enemy3._visible = false;
enemy4.stop();
enemy4._visible = false;
themeSound = new Sound(this);
themeSound.attachSound("theme");
Instance of Symbol 83 MovieClip "circle" in Frame 13
onClipEvent (load) {
}
onClipEvent (enterFrame) {
mayMoveUp = false;
mayMoveDown = false;
mayMoveLeft = false;
mayMoveRight = false;
maxLines = _parent.numVLines;
if (_parent.numVLines < _parent.numHLines) {
maxLines = _parent.numHLines;
}
i = 0;
while (maxLines >= i) {
if (_x == eval (("_parent.VLine" add i) add "._x")) {
var line = ("_parent.VLine" add i);
if (((_y - step) >= eval (line add "._y")) and ((eval (line add "._y") + eval (line add "._height")) >= (_y - step))) {
mayMoveUp = true;
}
if (((_y + step) >= eval (line add "._y")) and ((eval (line add "._y") + eval (line add "._height")) >= (_y + step))) {
mayMoveDown = true;
}
}
if (_y == eval (("_parent.HLine" add i) add "._y")) {
var line = ("_parent.HLine" add i);
if (((_x + step) >= eval (line add "._x")) and ((eval (line add "._x") + eval (line add "._width")) >= (_x + step))) {
mayMoveRight = true;
}
if (((_x - step) >= eval (line add "._x")) and ((eval (line add "._x") + eval (line add "._width")) >= (_x - step))) {
mayMoveLeft = true;
}
}
i++;
}
if (movingLeft and mayMoveLeft) {
_x = (_x - _parent.step);
mayMoveUp = false;
mayMoveDown = false;
mayMoveRight = false;
}
if (movingUp and mayMoveUp) {
_y = (_y - _parent.step);
mayMoveRight = false;
mayMoveDown = false;
}
if (movingRight and mayMoveRight) {
_x = (_x + _parent.step);
mayMoveDown = false;
}
if (movingDown and mayMoveDown) {
_y = (_y + _parent.step);
}
var paintLine = (("_parent.v" add _x) add _y);
eval (paintLine).gotoAndPlay("disable");
var paintLine = (("_parent.h" add _x) add _y);
eval (paintLine).gotoAndPlay("disable");
var paintLine = (("_parent.h" add (_x - _parent.step)) add _y);
eval (paintLine).gotoAndPlay("disable");
var paintLine = (("_parent.v" add _x) add (_y - _parent.step));
eval (paintLine).gotoAndPlay("disable");
}
onClipEvent (keyDown) {
step = _parent.step;
if (Key.isDown(38)) {
mayMoveUp = false;
movingUp = true;
}
if (Key.isDown(40)) {
mayMoveDown = false;
movingDown = true;
}
if (Key.isDown(39)) {
mayMoveRight = false;
movingRight = true;
}
if (Key.isDown(37)) {
mayMoveLeft = false;
movingLeft = true;
}
}
onClipEvent (keyUp) {
if (!Key.isDown(37)) {
movingLeft = false;
}
if (!Key.isDown(38)) {
movingUp = false;
}
if (!Key.isDown(39)) {
movingRight = false;
}
if (!Key.isDown(40)) {
movingDown = false;
}
}
Frame 14
var numHLines = 0;
var numVLines = 0;
var numSquares = 0;
var numTris = 0;
var numRects = 0;
var numSparks = 0;
var numEnemies = 0;
var numBoxes = 0;
var mayMoveLeft = true;
var mayMoveRight = true;
var mayMoveUp = true;
var mayMoveDown = true;
var step = 5;
boom._visible = false;
themeSound.setVolume(100);
themeSound.setPan(0);
themeSound.start(0, 9999);
var multi = 0;
lastLevelScore = score;
prepareLevel();
Frame 16
if (multi == 2) {
score = score + prevScoring;
multiplier.play();
}
if (0 >= lifes) {
gotoAndPlay (51);
}
if (remaining < 1) {
if (level < numLevel) {
gotoAndPlay (27);
} else {
gotoAndPlay (22);
}
} else {
multi = 0;
gotoAndPlay(_currentframe - 1);
}
Frame 22
duplicateMovieClip ("winner", "win", 10000);
circle._visible = false;
levelUp._visible = true;
Frame 23
themeSound.setVolume(themeSound.getVolume() - 1);
if (themeSound.getVolume() < 0) {
gotoAndPlay (56);
}
Frame 24
gotoAndPlay(_currentframe - 1);
Frame 27
trace("NumSquares = " add numSquares);
trace("NumTris = " add numTris);
trace("NumRects = " add numRects);
var i = 0;
while (numSquares >= i) {
removeMovieClip("square" add i);
i++;
}
var i = 0;
while (numTris >= i) {
removeMovieClip("tri" add i);
i++;
}
var i = 0;
while (numRects >= i) {
removeMovieClip("rect" add i);
i++;
}
var i = 0;
while (numBoxes >= i) {
removeMovieClip("box" add i);
i++;
}
i = 0;
while (i < numHLines) {
removeMovieClip("HLine" add i);
i++;
}
i = 0;
while (i < numVLines) {
removeMovieClip("VLine" add i);
i++;
}
i = 0;
while (i < numBoxes) {
removeMovieClip("remaining" add i);
i++;
}
remaining = 0;
levelUp._visible = true;
showPwd = pwds[level + 1];
Frame 28
themeSound.setVolume(themeSound.getVolume() - 5);
if (themeSound.getVolume() < 0) {
gotoAndPlay (33);
}
Frame 29
gotoAndPlay(_currentframe - 1);
Frame 35
counter = 0;
var finalScore = (score + ((score - lastLevelScore) * (lifes - 1)));
Frame 36
if (score >= finalScore) {
gotoAndPlay (38);
}
Frame 37
if (1000 < (finalScore - score)) {
score = score + 1000;
} else if ((1000 >= (finalScore - score)) and (100 < (finalScore - score))) {
score = score + 100;
} else if ((100 >= (finalScore - score)) and (10 < (finalScore - score))) {
score = score + 10;
} else if ((10 >= (finalScore - score)) and (0 < (finalScore - score))) {
score++;
}
gotoAndPlay(_currentframe - 1);
Frame 38
counter++;
if (100 < counter) {
gotoAndPlay (42);
}
Frame 39
gotoAndPlay(_currentframe - 1);
Frame 42
_parent.mask._visible = false;
_parent.levelUp._visible = false;
Frame 43
level++;
gotoAndPlay (14);
Frame 51
duplicateMovieClip ("looser", "loose", 10000);
Frame 52
themeSound.setVolume(themeSound.getVolume() - 5);
if (themeSound.getVolume() < 0) {
gotoAndPlay (56);
}
Frame 53
gotoAndPlay(_currentframe - 1);
Frame 56
var i = 0;
while (i < numHLines) {
startX = eval ("hLine" add i)._x;
startY = eval ("hLine" add i)._y;
endX = eval ("hLine" add i)._x + eval ("hLine" add i)._width;
endY = startY;
lineLength = endX - startX;
var j = 0;
while (j < lineLength) {
var newName = (("h" add (startX + j)) add startY);
removeMovieClip(newName);
j = j + step;
}
i++;
}
var i = 0;
while (i < numVLines) {
startX = eval ("vLine" add i)._x;
startY = eval ("vLine" add i)._y;
endX = startX;
endY = eval ("vLine" add i)._y + eval ("vLine" add i)._height;
lineLength = endY - startY;
var j = 0;
while (j < lineLength) {
var newName = (("v" add startX) add (startY + j));
removeMovieClip(newName);
j = j + step;
}
i++;
}
var i = 0;
while (i < numBoxes) {
var newName = ("remain" add i);
removeMovieClip(newName);
i++;
}
Frame 57
themeSound.stop();
var i = 0;
while (numSquares >= i) {
var newName = ("square" add i);
removeMovieClip(newName);
i++;
}
var i = 0;
while (numTris >= i) {
var newName = ("tri" add i);
removeMovieClip(newName);
i++;
}
var i = 0;
while (numRecs >= i) {
var newName = ("rec" add i);
removeMovieClip(newName);
i++;
}
var i = 0;
while (numBoxes >= i) {
removeMovieClip(eval ("box" add i));
i++;
}
var i = 0;
while (numBoxes >= i) {
removeMovieClip(eval ("remaining" add i));
i++;
}
i = 0;
while (i < numHLines) {
removeMovieClip(eval ("HLine" add i));
i++;
}
i = 0;
while (i < numVLines) {
removeMovieClip(eval ("VLine" add i));
i++;
}
remaining = 0;
blende._visible = true;
Frame 58
removeMovieClip("win");
removeMovieClip("loose");
Frame 59
gotoAndPlay (1);
Frame 62
trace("SQUARED: stopping ev'rythin'!");
stopAllSounds();
themeSound.stop();
introSound.stop();
enemy1.stop();
enemy1._visible = false;
enemy2.stop();
enemy2._visible = false;
enemy3.stop();
enemy3._visible = false;
enemy4.stop();
enemy4._visible = false;
var i = 0;
while (10 >= i) {
var newName = ("square" add i);
removeMovieClip(newName);
i++;
}
var i = 0;
while (10 >= i) {
var newName = ("tri" add i);
removeMovieClip(newName);
i++;
}
var i = 0;
while (10 >= i) {
var newName = ("rec" add i);
removeMovieClip(newName);
i++;
}
var i = 0;
while (10 >= i) {
var newName = ("spark" add i);
removeMovieClip(newName);
i++;
}
var i = 0;
while (numBoxes >= i) {
removeMovieClip(eval ("box" add i));
i++;
}
var i = 0;
while (numBoxes >= i) {
removeMovieClip(eval ("remaining" add i));
i++;
}
i = 0;
while (i < numHLines) {
removeMovieClip(eval ("HLine" add i));
i++;
}
i = 0;
while (i < numVLines) {
removeMovieClip(eval ("VLine" add i));
i++;
}
stop();
Frame 63
stop();
Symbol 8 Button
on (release) {
_parent.gotoAndPlay("start");
}
Symbol 13 Button
on (release) {
_parent.btn_start._visible = false;
_parent.btn_instructions._visible = false;
_parent.instructions._visible = true;
}
Symbol 18 Button
on (release) {
_parent.gotoAndPlay("password");
}
Symbol 21 MovieClip Frame 1
speed = (Math.random() * 10) + 5;
_y = (-((Math.random() * 200) - 150));
_x = 0;
_alpha = 100;
Symbol 21 MovieClip Frame 3
_y = (_y + speed);
_alpha = (_alpha + 2);
if (400 < _y) {
gotoAndPlay (1);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 24 MovieClip Frame 1
speed = (Math.random() * 10) + 5;
_x = (-((Math.random() * 200) - 250));
_y = 0;
_alpha = 100;
Symbol 24 MovieClip Frame 3
_x = (_x + speed);
if (600 < _x) {
gotoAndPlay (1);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 42 MovieClip Frame 55
stop();
Symbol 50 Button
on (release) {
_parent._visible = false;
_parent._parent.btn_start._visible = true;
_parent._parent.btn_instructions._visible = true;
}
Symbol 51 MovieClip Frame 3
gotoAndPlay(_currentframe - 1);
Symbol 53 MovieClip Frame 55
stop();
Symbol 54 MovieClip Frame 1
_visible = false;
Symbol 61 MovieClip Frame 1
_xscale = 100;
_yscale = 100;
_alpha = 100;
_rotation = 0;
_visible = false;
stop();
Symbol 61 MovieClip Frame 3
_x = _parent.circle._x;
_y = _parent.circle._y;
_rotation = (_rotation + 15);
_alpha = (_alpha - 5);
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (0 < _alpha) {
gotoAndPlay(_currentframe - 1);
} else {
gotoAndStop (1);
}
Symbol 63 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 10
var i = 1;
while (_parent.numBoxes >= i) {
boxName = "_parent.box" add i;
if ((eval (boxName)._y == _y) or ((eval (boxName)._y + eval (boxName)._height) == _y)) {
if ((eval (boxName)._x < _x) and (_x < (eval (boxName)._x + eval (boxName)._width))) {
eval (boxName).numSegs--;
}
}
i++;
}
_visible = false;
removeMovieClip(this);
Symbol 65 MovieClip Frame 3
stop();
Symbol 65 MovieClip Frame 10
var i = 1;
while (_parent.numBoxes >= i) {
boxName = "_parent.box" add i;
if ((eval (boxName)._x == _x) or ((eval (boxName)._x + eval (boxName)._width) == _x)) {
if ((eval (boxName)._y < _y) and (_y < (eval (boxName)._y + eval (boxName)._height))) {
eval (boxName).numSegs--;
eval (boxName)._alpha = eval (boxName)._alpha + 0.5;
}
}
i++;
}
_visible = false;
removeMovieClip(this);
Symbol 67 MovieClip Frame 1
_visible = false;
Symbol 67 MovieClip Frame 3
if (5 >= numSegs) {
_visible = true;
if (0 < _parent.remaining) {
_parent.remaining--;
}
eval ("_parent.remain" add ((_parent.numBoxes - _parent.remaining) - 1)).play();
_parent.multi++;
_parent.prevScoring = _parent.lastScoring;
_parent.lastScoring = scoring;
trace("_parent.multi = " add _parent.multi);
_parent.score = _parent.score + (scoring * _parent.multi);
stop();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 69 MovieClip Frame 1
var lifeTime = (100 + (Math.random() * 100));
var protect = 25;
_x = ((Math.random() * 360) + 20);
_y = ((Math.random() * 360) + 20);
_alpha = 100;
_rotation = 0;
_xscale = 100;
_yscale = 100;
xSpeed = 2;
ySpeed = 2;
var crashed = false;
bounceSound = new Sound(this);
bounceSound.attachSound("bounce");
crashSound = new Sound(this);
crashSound.attachSound("crash");
Symbol 69 MovieClip Frame 2
if ((this.hitTest(_parent.circle) and (!crashed)) and (0 >= protect)) {
crashSound.setPan(0);
crashSound.start();
crashed = true;
_parent.boom._x = _parent.circle._x;
_parent.boom._y = _parent.circle._y;
_parent.boom._visible = true;
_parent.boom.gotoAndPlay(2);
_parent.lifes--;
eval ("_parent.lifes" add _parent.lifes)._visible = false;
gotoAndPlay (5);
}
Symbol 69 MovieClip Frame 3
_x = (_x + xSpeed);
_y = (_y + ySpeed);
_rotation = (_rotation + 5);
lifeTime--;
protect--;
if (_x >= 390) {
bounceSound.setPan(100);
bounceSound.start();
xSpeed = -xSpeed;
}
if (10 >= _x) {
bounceSound.setPan(-100);
bounceSound.start();
xSpeed = -xSpeed;
}
if ((_y >= 390) or (10 >= _y)) {
bounceSound.setPan((_x - 200) / 2);
bounceSound.start();
ySpeed = -ySpeed;
}
if (0 >= lifeTime) {
gotoAndPlay (5);
}
gotoAndPlay(_currentframe - 1);
Symbol 69 MovieClip Frame 5
if ((28 < (Math.random() * 30)) and (2 + (_parent.numEnemies < (_parent.level * 2)))) {
_parent.createSquare(1);
}
Symbol 69 MovieClip Frame 6
_xscale = (_xscale + 15);
_yscale = (_yscale + 15);
_rotation = (_rotation - 20);
_alpha = (_alpha - 5);
Symbol 69 MovieClip Frame 7
if (0 < _alpha) {
gotoAndPlay(_currentframe - 1);
}
Symbol 69 MovieClip Frame 8
Symbol 71 MovieClip Frame 1
var lifeTime = (100 + (Math.random() * 100));
var protect = 25;
_x = ((Math.random() * 360) + 20);
_y = ((Math.random() * 360) + 20);
_alpha = 100;
_rotation = 0;
_xscale = 100;
_yscale = 100;
xSpeed = 4;
ySpeed = 4;
var crashed = false;
bounceSound = new Sound(this);
bounceSound.attachSound("bounce");
crashSound = new Sound(this);
crashSound.attachSound("crash");
Symbol 71 MovieClip Frame 2
if ((this.hitTest(_parent.circle) and (!crashed)) and (0 >= protect)) {
crashSound.setPan(0);
crashSound.start();
crashed = true;
_parent.boom._x = _parent.circle._x;
_parent.boom._y = _parent.circle._y;
_parent.boom._visible = true;
_parent.boom.gotoAndPlay(2);
_parent.lifes--;
eval ("_parent.lifes" add _parent.lifes)._visible = false;
gotoAndPlay (5);
}
Symbol 71 MovieClip Frame 3
_x = (_x + xSpeed);
_y = (_y + ySpeed);
_rotation = (_rotation + 5);
lifeTime--;
protect--;
if (_x >= 390) {
bounceSound.setPan(100);
bounceSound.start();
xSpeed = -xSpeed;
}
if (10 >= _x) {
bounceSound.setPan(-100);
bounceSound.start();
xSpeed = -xSpeed;
}
if ((_y >= 390) or (10 >= _y)) {
bounceSound.setPan((_x - 200) / 2);
bounceSound.start();
ySpeed = -ySpeed;
}
if (0 >= lifeTime) {
gotoAndPlay (5);
}
gotoAndPlay(_currentframe - 1);
Symbol 71 MovieClip Frame 5
if ((58 < (Math.random() * 50)) and (2 + (_parent.numEnemies < (_parent.level * 2)))) {
_parent.createTri(1);
}
Symbol 71 MovieClip Frame 6
_xscale = (_xscale + 15);
_yscale = (_yscale + 15);
_rotation = (_rotation - 20);
_alpha = (_alpha - 5);
Symbol 71 MovieClip Frame 7
if (0 < _alpha) {
gotoAndPlay(_currentframe - 1);
}
Symbol 71 MovieClip Frame 8
Symbol 73 MovieClip Frame 1
var lifeTime = (100 + (Math.random() * 100));
var protect = 25;
_x = ((Math.random() * 360) + 20);
_y = ((Math.random() * 360) + 20);
_alpha = 100;
_rotation = 0;
_xscale = 100;
_yscale = 100;
xScSpeed = -7;
xSpeed = 1;
ySpeed = 4;
var crashed = false;
bounceSound = new Sound(this);
bounceSound.attachSound("bounce");
crashSound = new Sound(this);
crashSound.attachSound("crash");
Symbol 73 MovieClip Frame 2
if ((this.hitTest(_parent.circle) and (!crashed)) and (0 >= protect)) {
crashSound.setPan(0);
crashSound.start();
crashed = true;
_parent.boom._x = _parent.circle._x;
_parent.boom._y = _parent.circle._y;
_parent.boom._visible = true;
_parent.boom.gotoAndPlay(2);
_parent.lifes--;
eval ("_parent.lifes" add _parent.lifes)._visible = false;
gotoAndPlay (5);
}
Symbol 73 MovieClip Frame 3
_x = (_x + xSpeed);
_y = (_y + ySpeed);
_xscale = (_xscale + xScSpeed);
if ((100 < _xscale) or (_xscale < 0)) {
xScSpeed = -xScSpeed;
}
lifeTime--;
protect--;
if (_x >= 390) {
bounceSound.setPan(100);
bounceSound.start();
xSpeed = -xSpeed;
}
if (10 >= _x) {
bounceSound.setPan(-100);
bounceSound.start();
xSpeed = -xSpeed;
}
if ((_y >= 390) or (10 >= _y)) {
bounceSound.setPan((_x - 200) / 2);
bounceSound.start();
ySpeed = -ySpeed;
}
if (0 >= lifeTime) {
gotoAndPlay (5);
}
gotoAndPlay(_currentframe - 1);
Symbol 73 MovieClip Frame 5
if ((68 < (Math.random() * 70)) and (1 + (_parent.numEnemies < (_parent.level * 2)))) {
_parent.createRect(1);
}
Symbol 73 MovieClip Frame 6
_xscale = (_xscale + 15);
_yscale = (_yscale + 15);
_rotation = (_rotation - 20);
_alpha = (_alpha - 5);
Symbol 73 MovieClip Frame 7
if (0 < _alpha) {
gotoAndPlay(_currentframe - 1);
}
Symbol 73 MovieClip Frame 8
Symbol 75 MovieClip Frame 1
_alpha = 100;
_visible = true;
_xscale = 100;
_yscale = 100;
var lifeTime = (100 + (Math.random() * 100));
var protect = 25;
var crashed = false;
rotationSpeed = 20;
resize = 2;
step = 5;
_x = _parent.rightMost;
_y = _parent.topMost;
movingLeft = true;
mayMoveUp = false;
mayMoveDown = false;
mayMoveLeft = false;
mayMoveRight = false;
Symbol 75 MovieClip Frame 2
if ((this.hitTest(_parent.circle) and (!crashed)) and (0 >= protect)) {
crashSound.setPan(0);
crashSound.start();
crashed = true;
_parent.boom._x = _parent.circle._x;
_parent.boom._y = _parent.circle._y;
_parent.boom._visible = true;
_parent.boom.gotoAndPlay(2);
_parent.lifes--;
eval ("_parent.lifes" add _parent.lifes)._visible = false;
gotoAndPlay (5);
}
if (lifeTime < 0) {
gotoAndPlay (5);
}
Symbol 75 MovieClip Frame 3
_rotation = (_rotation - rotationSpeed);
lifeTime--;
protect--;
_xscale = (_xscale - resize);
_yscale = (_yscale - resize);
if (((_xscale + _yscale) < 50) or (200 < (_xscale + _yscale))) {
resize = -resize;
}
maxLines = _parent.numVLines;
if (_parent.numVLines < _parent.numHLines) {
maxLines = _parent.numHLines;
}
var numDirections = 0;
mayMoveLeft = false;
mayMoveRight = false;
mayMoveUp = false;
mayMoveDown = false;
i = 0;
while (maxLines >= i) {
if (_x == eval (("_parent.VLine" add i) add "._x")) {
var line = ("_parent.VLine" add i);
if (((_y - step) >= eval (line add "._y")) and ((eval (line add "._y") + eval (line add "._height")) >= (_y - step))) {
mayMoveUp = true;
numDirections++;
}
if (((_y + step) >= eval (line add "._y")) and ((eval (line add "._y") + eval (line add "._height")) >= (_y + step))) {
mayMoveDown = true;
numDirections++;
}
}
if (_y == eval (("_parent.HLine" add i) add "._y")) {
var line = ("_parent.HLine" add i);
if (((_x + step) >= eval (line add "._x")) and ((eval (line add "._x") + eval (line add "._width")) >= (_x + step))) {
mayMoveRight = true;
numDirections++;
}
var line = "_parent.HLine";
if (((_x - step) >= eval (line add "._x")) and ((eval (line add "._x") + eval (line add "._width")) >= (_x - step))) {
mayMoveLeft = true;
numDirections++;
}
}
i++;
}
if ((((!(movingLeft and mayMoveLeft)) or (!(movingRight and mayMoveRight))) or (!(movingUp and mayMoveUp))) or (!(movingDown or (!mayMoveDown)))) {
var whichWay = ((Math.random() * 60) + 1);
prob = (60 / numDirections) / 4;
probCount = 1;
if (mayMoveLeft and (prob >= whichWay)) {
movingLeft = true;
movingRight = false;
movingUp = false;
movingDown = false;
}
if (mayMoveRight and (((prob * 2) >= whichWay) and (prob < whichWay))) {
movingLeft = false;
movingRight = true;
movingUp = false;
movingDown = false;
}
if (mayMoveUp and (((prob * 3) >= whichWay) and ((prob * 2) < whichWay))) {
movingLeft = false;
movingRight = false;
movingUp = true;
movingDown = false;
}
if (mayMoveDown and (((prob * 4) >= whichWay) and ((prob * 3) < whichWay))) {
movingLeft = false;
movingRight = false;
movingUp = false;
movingDown = true;
}
}
if (mayMoveDown and movingDown) {
_y = (_y + step);
}
if (mayMoveLeft and movingLeft) {
_x = (_x - step);
}
if (mayMoveUp and movingUp) {
_y = (_y - _parent.step);
}
if (mayMoveRight and movingRight) {
_x = (_x + _parent.step);
}
gotoAndPlay (2);
Symbol 75 MovieClip Frame 5
if ((75 < (Math.random() * 100)) and (1 + (_parent.numEnemies < (_parent.level * 2)))) {
_parent.createSpark(1);
}
Symbol 75 MovieClip Frame 6
_xscale = (_xscale + 15);
_yscale = (_yscale + 15);
_rotation = (_rotation - 20);
_alpha = (_alpha - 5);
Symbol 75 MovieClip Frame 7
if (0 < _alpha) {
gotoAndPlay(_currentframe - 1);
}
Symbol 75 MovieClip Frame 8
removeMovieClip(this);
Symbol 83 MovieClip Frame 3
gotoAndPlay(_currentframe - 1);
Symbol 87 MovieClip Frame 1
_height = 1;
Symbol 90 MovieClip Frame 1
_width = 1;
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 2
stop();
Symbol 115 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 2
stop();
Symbol 131 MovieClip Frame 10
stop();