Frame 1
LOADED = Math.round(getBytesLoaded());
TOTAL = Math.round(getBytesTotal());
PERCENT = LOADED / TOTAL;
_root.bar._width = PERCENT * 113;
if (LOADED == TOTAL) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
Instance of Symbol 47 MovieClip in Frame 3
onClipEvent (load) {
this.swapDepths(10000);
}
Frame 6
function Ball(x, y, xv, yv, colour) {
this.mc = _root.attachMovie("Ball", "b" + random(10000), random(9000) + 990);
this.mc._x = x;
this.mc._y = y;
this.mc.vx = xv;
this.mc.vy = yv;
this.mc.gotoAndStop(colour);
this.mc.colour = colour;
this.mc.parent = this;
this.mc.onEnterFrame = this.Run;
this.BallsTouching = new Array();
this.BallsTouchingLength = 0;
this.ballsarray = new Array();
this.ballsarraylength;
this.onMainObj = false;
}
Ball.prototype.Run = function () {
var _local4 = 0;
_local4 = 0;
while (_local4 < 8) {
var _local3 = new Object();
_local3.x = this["cp" + (_local4 + 1)]._x;
_local3.y = this["cp" + (_local4 + 1)]._y;
this.localToGlobal(_local3);
if (_root.mainObj.hitTest(_local3.x, _local3.y, true)) {
this.parent.Collided();
}
_local4++;
}
this._x = this._x + this.vx;
this._y = this._y + this.vy;
};
Ball.prototype.Remove = function (obj) {
_root.runningSlow++;
if (_root.runningSlow > 200) {
} else {
var _local3 = this.mc.colour;
this.p = 0;
this.p = 0;
while (this.p < this.BallsTouchingLength) {
if (this.BallsTouching[this.p].mc != undefined) {
if (((this.BallsTouching[this.p].mc.colour == _local3) || (this.BallsTouching[this.p].mc.colour == 5)) || (_local3 == 5)) {
if (this.BallsTouching[this.p] != obj) {
this.BallsTouching[this.p].Remove(this);
}
}
}
this.p++;
}
}
if (this.mc._x != undefined) {
_root.bob = new Object();
_root.bob.x = this.mc._x;
_root.bob.y = this.mc._y;
_root.mainObj.localToGlobal(_root.bob);
_root.bob._x = _root.bob.x;
_root.bob._y = _root.bob.y;
_root.attachMovie("expl", "e" + random(1000), random(10000) + 11000, _root.bob);
this.mc.removeMovieClip();
_root.score++;
}
_root.checkOutliersFlag = true;
};
Ball.prototype.checkRemoveBalls = function (obj, oldobj, master) {
this.t = 0;
this.t = 0;
while (this.t < this.BallsTouchingLength) {
_root.runningSlow++;
if (_root.runningSlow > 240) {
this.Remove(obj);
return(0);
}
if ((this.BallsTouching[this.t] != obj) && (this.BallsTouching[this.t] != oldobj)) {
if (this.BallsTouching[this.t].mc.colour == this.mc.colour) {
if (this.BallsTouching[this.t].checkRemoveBalls(this, obj, false)) {
if (master == false) {
this.Remove(obj);
return(true);
}
this.Remove(obj);
}
if (master == false) {
this.Remove(obj);
return(true);
}
}
}
this.t++;
}
};
Ball.prototype.Collided = function () {
var _local5 = _root.BallArrayLength;
var _local4 = 0;
this.t = 0;
while (this.t < 8) {
var _local3 = new Object();
_local3.x = this.mc["cp" + (this.t + 1)]._x;
_local3.y = this.mc["cp" + (this.t + 1)]._y;
this.mc.localToGlobal(_local3);
this.tp = 0;
while (this.tp < _local5) {
if (_root.BallArray[this.tp].mc.hitTest(_local3.x, _local3.y, true)) {
_local4 = 1;
this.BallsTouching.push(_root.BallArray[this.tp]);
this.BallsTouchingLength++;
if (_root.BallArray[this.tp].ballsarraylength > 0) {
this.count = 0;
while (this.count < _root.BallArray[this.tp].ballsarraylength) {
this.ballsarray[this.count] = _root.BallArray[this.tp].ballsarray[this.count];
this.count++;
}
}
this.ballsarray.push(_root.BallArray[this.tp]);
this.ballsarraylength = _root.BallArray[this.tp].ballsarraylength + 1;
_root.BallArray[this.tp].BallsTouching.push(this);
_root.BallArray[this.tp].BallsTouchingLength++;
}
this.tp++;
}
this.t++;
}
if (_local4 == 0) {
this.onMainObj = true;
this.ballsarraylength = 0;
}
var _local6 = new Object();
_local6.x = this.mc._x;
_local6.y = this.mc._y;
var _local7 = this.mc.colour;
_root.mainObj.globalToLocal(_local6);
this.mc.removeMovieClip();
this.mc = _root.mainObj.attachMovie("Ball", "b" + random(10000), random(10000));
this.mc._x = _local6.x;
this.mc._y = _local6.y;
this.mc.gotoAndStop(_local7);
this.mc.colour = _local7;
this.mc.parent = this;
_root.BallArray.push(this);
_root.BallArrayLength++;
this.checkRemoveBalls(0, 0, true);
};
Ball.prototype.Run2 = function () {
if (!this.onMainObj) {
this.t = 0;
while (this.t < this.ballsarraylength) {
if (this.ballsarray[this.t].mc._x == undefined) {
this.Remove(this);
}
this.t++;
}
}
};
function shootBalls() {
var _local2 = 2 + (_root.level / 2);
if (_root.SBcounter <= 0) {
_root.SBcounter = _root.maxc - (_root.level * 5);
var _local3 = random(8);
if (_root.level > 3) {
var _local5 = random(5) + 1;
} else if (_root.level > 2) {
var _local5 = random(4) + 1;
} else if (_root.level == 1) {
var _local5 = random(3) + 1;
} else {
var _local5 = random(2) + 1;
}
if (_local5 == 4) {
var _local5 = 5;
} else if (_local5 == 5) {
var _local5 = 4;
}
if (_root.level >= 3) {
var _local4 = random(100) + 1;
if (_local4 < 10) {
_local3 = 10;
}
}
if (_local3 == 1) {
var _local8 = new _root.Ball(280, 49, 0, _local2, _local5);
}
if (_local3 == 2) {
var _local8 = new _root.Ball(392, 97, -Math.sqrt(_local2), Math.sqrt(_local2), _local5);
}
if (_local3 == 3) {
var _local8 = new _root.Ball(434, 198, -_local2, 0, _local5);
}
if (_local3 == 4) {
var _local8 = new _root.Ball(386, 306, -Math.sqrt(_local2), -Math.sqrt(_local2), _local5);
}
if (_local3 == 5) {
var _local8 = new _root.Ball(276, 351, 0, -_local2, _local5);
}
if (_local3 == 6) {
var _local8 = new _root.Ball(166, 303, Math.sqrt(_local2), -Math.sqrt(_local2), _local5);
}
if (_local3 == 7) {
var _local8 = new _root.Ball(128, 194, _local2, 0, _local5);
}
if (_local3 == 8) {
var _local8 = new _root.Ball(172, 89, Math.sqrt(_local2), Math.sqrt(_local2), _local5);
}
if (_local3 == 10) {
var _local8 = new _root.Ball(280, 49, 0, _local2, _local5);
var _local13 = new _root.Ball(392, 97, -Math.sqrt(_local2), Math.sqrt(_local2), _local5);
var _local5 = random(5) + 1;
var _local12 = new _root.Ball(434, 198, -_local2, 0, _local5);
_local5 = random(5) + 1;
var _local11 = new _root.Ball(386, 306, -Math.sqrt(_local2), -Math.sqrt(_local2), _local5);
_local5 = random(5) + 1;
var _local10 = new _root.Ball(276, 351, 0, -_local2, _local5);
_local5 = random(5) + 1;
var _local9 = new _root.Ball(166, 303, Math.sqrt(_local2), -Math.sqrt(_local2), _local5);
_local5 = random(5) + 1;
var _local7 = new _root.Ball(128, 194, _local2, 0, _local5);
_local5 = random(5) + 1;
var _local6 = new _root.Ball(172, 89, Math.sqrt(_local2), Math.sqrt(_local2), _local5);
}
}
_root.SBcounter--;
}
_root.q = new _root.Ball(200, 200, 2, 0, 2);
_root.BallArray = new Array();
_root.BallArrayLength = 0;
_root.level = 0;
_root.maxc = 80;
_root.rotspeed = 6;
_root.score = 0;
_root.checkOutliersFlag = false;
_root.dead = false;
_root.timecounter = 0;
_root.finished = "";
_root.SBcounter = maxc;
_root.onEnterFrame = function () {
if (!_root.dead) {
_root.timecounter++;
_root.time = int(_root.timecounter / 45) + "s";
_root.runningSlow = 0;
if (_root.score > (10 + (4 * _root.level))) {
_root.score = 0;
_root.level++;
}
if (Key.isDown(37)) {
_root.mainObj._rotation = _root.mainObj._rotation - rotspeed;
}
if (Key.isDown(39)) {
_root.mainObj._rotation = _root.mainObj._rotation + rotspeed;
}
shootBalls();
if (_root.checkOutliersFlag == true) {
_root.i = 0;
while (_root.i < _root.BallArrayLength) {
if (_root.BallArray[_root.i] != undefined) {
_root.BallArray[_root.i].Run2();
}
_root.i++;
}
_root.i = 0;
while (_root.i < _root.BallArrayLength) {
if (_root.BallArray[_root.i] == undefined) {
_root.BallArray[_root.i].splice(_root.i, 1);
}
_root.i++;
}
_root.checkOutliersFlag = false;
}
} else {
_root.finished = "Game Over";
}
};
stop();
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Instance of Symbol 56 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.mainObj.hitTest(this._x, this._y, true)) {
_root.dead = true;
}
}
Symbol 7 MovieClip [Ball] Frame 1
stop();
Symbol 11 MovieClip [expl] Frame 20
this.removeMovieClip();
Symbol 37 MovieClip Frame 6
stop();
Instance of Symbol 20 MovieClip in Symbol 37 MovieClip Frame 6
/* no clip actions */
Symbol 40 MovieClip Frame 7
stop();
Symbol 44 Button
on (release) {
_root.gotoAndPlay(5);
}