Frame 1
stop();
Frame 2
Mouse.hide();
stop();
sfx = new Sound(this);
fallSpeed = 5;
score = 0;
level = Math.floor(score / 5);
Instance of Symbol 61 MovieClip "cmd" in Frame 2
onClipEvent (load) {
function makeSquares(sNum, row) {
while (theDepth < sNum) {
squares[theDepth] = _root.getInstanceAtDepth(theDepth);
squares[theDepth]._x = xStart + (((theDepth / row) - Math.floor(theDepth / row)) * (size * row));
squares[theDepth]._y = yStart + (size * Math.floor(theDepth / row));
theDepth = theDepth + 1;
duplicateMovieClip (_root.square, "square" + theDepth, theDepth);
}
}
function mkSqr() {
row = Math.floor(daWidth / size);
col = Math.floor(daHeight / size);
total = row * col;
xCenter = _root._xmouse;
yCenter = _root._ymouse;
_root.square._x = (xCenter - (daWidth / 2)) + ((daWidth - (row * size)) / 2);
_root.square._y = (yCenter - (daWidth / 2)) + ((daHeight - (col * size)) / 2);
xStart = _root.square._x;
yStart = _root.square._y;
makeSquares(total + bExtra, row + sExtra);
squares[0]._visible = false;
}
function randomScale() {
_root.square._xscale = (Math.random(100) * 7) + 10;
_root.square._yscale = _root.square._xscale;
size = _root.square._width;
ii = total;
while (ii > 0) {
_root.getInstanceAtDepth(ii).removeMovieClip();
ii = ii - 1;
}
theDepth = 0;
}
function reScale() {
_root.square._xscale = 15;
_root.square._yscale = _root.square._xscale;
size = _root.square._width;
ii = total;
while (ii > 0) {
_root.getInstanceAtDepth(ii).removeMovieClip();
ii = ii - 1;
}
theDepth = 0;
}
_visible = false;
gameOver = false;
daWidth = 50;
daHeight = 25;
delay = Math.floor(Math.random(100) * 8);
theDepth = 0;
dotDepth = 1000;
bExtra = 0;
sExtra = 0;
objects = Array(_root.dot, _root.skull, _root.wider);
xCenter = _root._xmouse;
yCenter = _root._ymouse;
_root.square._x = xCenter;
_root.square._y = yCenter;
xStart = _root.square._x;
yStart = _root.square._y;
total = 1;
_root.square._xscale = 15;
_root.square._yscale = _root.square._xscale;
size = _root.square._width;
_root.square.swapDepths(theDepth);
squares = Array();
}
onClipEvent (enterFrame) {
if ((_root._ymouse != yCenter) || (_root._ymouse != yCenter)) {
reScale();
mkSqr();
}
if (delay > 0) {
delay = delay - 1;
}
if (delay == 0) {
objectNum = Math.floor(Math.random(100) * (objects.length + 1));
duplicateMovieClip (objects[objectNum], "dot" + dotDepth, dotDepth);
dotDepth = dotDepth + 1;
delay = Math.floor(Math.random(100) * 8);
}
if (_root.fallSpeed != (5 + Math.floor(_root.score / 5))) {
_root.fallSpeed = 5 + Math.floor(_root.score / 5);
}
if (squares.length > (total + bExtra)) {
i = squares.length;
while (i > (total + bExtra)) {
squares[i].removeMovieClip();
i--;
}
}
if (((row + sExtra) * size) > 530) {
gameOver = true;
}
if ((total + bExtra) <= 0) {
gameOver = true;
}
if (gameOver == true) {
stopAllSounds();
_root.gotoAndStop("gameOver");
}
if (_root.level != Math.floor(_root.score / 5)) {
_root.level = Math.floor(_root.score / 5);
}
}
Instance of Symbol 40 MovieClip "dot" in Frame 2
onClipEvent (load) {
if (_name == "dot") {
_visible = false;
}
minDepth = 1500;
speed = ((Math.random() * _root.fallSpeed) + 3) + (_root.level / 3);
daWidth = 550;
daHeight = 400;
_y = -10;
_x = (Math.random(100) * daWidth);
}
onClipEvent (enterFrame) {
if (_y < daHeight) {
_y = (_y + speed);
}
if (_y >= daHeight) {
this.removeMovieClip();
_y = (_y + 50);
}
i = 0;
while (i < _root.cmd.squares.length) {
if (this.hitTest(_root.cmd.squares[i])) {
_root.cmd.bExtra = _root.cmd.bExtra + 1;
_root.score = _root.score + 2;
_root.sfx.attachSound("item1");
_root.sfx.start(0, 1);
this.removeMovieClip();
}
i++;
}
}
Instance of Symbol 50 MovieClip "skull" in Frame 2
onClipEvent (load) {
minDepth = 1500;
speed = ((Math.random() * _root.fallSpeed) + 3) + (_root.level / 3);
daWidth = 550;
daHeight = 400;
_y = -10;
_x = (Math.random(100) * daWidth);
if (_name == "skull") {
_visible = false;
_y = 450;
}
}
onClipEvent (enterFrame) {
if (_y < daHeight) {
_y = (_y + speed);
}
if (_y >= daHeight) {
this.removeMovieClip();
_y = (_y + 50);
}
i = 0;
while (i < _root.cmd.squares.length) {
if (this.hitTest(_root.cmd.squares[i]) && (_name != "skull")) {
_root.cmd.bExtra = _root.cmd.bExtra - 5;
_root.score = _root.score - 5;
_root.sfx.attachSound("horns");
_root.sfx.start(0, 1);
this.removeMovieClip();
}
i++;
}
}
Instance of Symbol 52 MovieClip "wider" in Frame 2
onClipEvent (load) {
minDepth = 1500;
speed = ((Math.random() * _root.fallSpeed) + 3) + (_root.level / 3);
daWidth = 550;
daHeight = 400;
_y = -10;
_x = (Math.random(100) * daWidth);
if (_name == "wider") {
_visible = false;
_y = 450;
}
}
onClipEvent (enterFrame) {
if (_y < daHeight) {
_y = (_y + speed);
}
if (_y >= daHeight) {
this.removeMovieClip();
_y = (_y + 50);
}
i = 0;
while (i < _root.cmd.squares.length) {
if (this.hitTest(_root.cmd.squares[i])) {
_root.cmd.sExtra = _root.cmd.sExtra + 1;
_root.score = _root.score + 3;
_root.sfx.attachSound("item2");
_root.sfx.start(0, 1);
this.removeMovieClip();
}
i++;
}
}
Frame 3
Mouse.show();
Symbol 22 MovieClip Frame 40
stop();
Symbol 34 Button
on (press) {
_root.play();
}
Symbol 35 Button
on (press) {
stopAllSounds();
play();
}
Instance of Symbol 20 MovieClip in Symbol 38 MovieClip Frame 1
onClipEvent (load) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop("play_button");
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndPlay("loaded");
}
}
Symbol 38 MovieClip Frame 130
stop();
Symbol 38 MovieClip Frame 154
_root.play();
Symbol 69 Button
on (release) {
stopAllSounds();
_root.gotoAndStop(2);
}