Frame 1
function count() {
timeCount++;
}
function countD() {
timeLeft--;
}
setInterval(count, 1000);
setInterval(countD, 1000);
restartSingel = false;
restartMulti = false;
Frame 2
stop();
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.restartSingel == true) {
_root.gotoAndStop("singel");
}
if (_root.restartMulti == true) {
_root.gotoAndStop("multi");
}
}
Frame 3
stop();
quit = false;
mov = true;
score = 0;
collected = 0;
powerHit = false;
powerUp = false;
gameO = false;
newDir = 0;
speed = 5;
pTime = 2;
timeCount = 0;
name = "Insert Name";
pUp = "none";
restartSingel = false;
bulletTime = false;
superFast = false;
invinsible = true;
drunken = false;
Instance of Symbol 74 MovieClip "powerUpMC" in Frame 3
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.powerUp = true;
this.play();
power = random(3) + 1;
_root.score = _root.score + 10;
}
if ((power == 1) && (_root.powerUp == true)) {
_root.time.play();
_root.pUp = "Bulletime";
power = 1;
_root.bulletTime = true;
_root.superFast == false;
_root.superFast = false;
_root.invinsible = false;
_root.invin._visible = false;
_root.drunken == false;
_root.invinv._x = 4000;
}
if ((power == 2) && (_root.powerUp == true)) {
_root.time.play();
_root.pUp = "Speedy";
power = 2;
_root.invinsible = false;
_root.superFast = true;
_root.bulletTime = false;
_root.invin._visible = false;
_root.drunken == false;
_root.invinv._x = 4000;
}
if ((power == 3) && (_root.powerUp == true)) {
_root.time.play();
_root.pUp = "Invincible";
power = 3;
_root.invinsible = true;
_root.bulletTime = false;
_root.superFast = false;
_root.drunken == false;
}
if (_root.powerUp == false) {
_root.pUp = "None";
_root.drunken == false;
_root.invinsible = false;
_root.bulletTime = false;
_root.superFast = false;
_root.invinv._x = 4000;
}
trace(power);
}
Instance of Symbol 87 MovieClip "enemy" in Frame 3
onClipEvent (load) {
ud = random(2) + 2;
hit = 20;
bounceR = false;
bounce = false;
bounceL = false;
eS = random(5) + 1;
eS2 = eS;
}
onClipEvent (enterFrame) {
xid = _x - _root.player._x;
yid = _y - _root.player._y;
distance = Math.sqrt((xid * xid) + (yid * yid));
if (((distance <= ((_width / 2) + (_root.player._width / 2))) && (hit <= 0)) && (_root.invin._visible == false)) {
_root.player.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if ((ud == 3) && (bounce == false)) {
this._x = this._x + eS;
}
if ((ud == 3) && (this.hitTest(_root.edge1))) {
bounce = true;
bounceR = true;
bounceL = false;
}
if ((ud == 3) && (bounceR == true)) {
this._x = this._x - eS;
}
if (((ud == 3) && (bounceR == true)) && (this.hitTest(_root.edge2))) {
bounceL = true;
bounceR = false;
}
if ((ud == 3) && (bounceL == true)) {
this._x = this._x + eS;
}
}
onClipEvent (load) {
bounceD = true;
bounceA = true;
bounceU = false;
}
onClipEvent (enterFrame) {
if ((ud == 2) && (bounceA == false)) {
this._y = this._y + eS;
}
if ((ud == 2) && (this.hitTest(_root.edge3))) {
bounceA = true;
bounceD = true;
bounceU = false;
}
if ((ud == 2) && (bounceD == true)) {
this._y = this._y + eS;
}
if (((ud == 2) && (bounceD == true)) && (this.hitTest(_root.upEdge))) {
bounceU = true;
bounceD = false;
}
if ((ud == 2) && (bounceU == true)) {
this._y = this._y - eS;
}
}
onClipEvent (enterFrame) {
if (_root.gameO == true) {
eS2 = 0;
eS = 0;
}
if ((_root.bulletTime == true) && (_root.powerUp == true)) {
eS = 0.3;
}
if ((_root.superFast == true) && (_root.powerUp == true)) {
es = 10;
}
if (_root.powerUp == false) {
es = eS2;
_root.superFast = false;
_root.bulletTime = false;
}
if (this.hitTest(_root.invin) && (_root.powerUp == true)) {
this.gotoAndStop(2);
es = 0;
hit = 20;
}
}
onClipEvent (enterFrame) {
if (hit <= 0) {
hit = 0;
}
if (_root.quit == true) {
this.removeMovieClip();
}
hit--;
}
Instance of Symbol 95 MovieClip in Frame 3
onClipEvent (load) {
_root.en = 0;
size = 20;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
this.play();
_root.score = _root.score + size;
_root.collected = _root.collected + 1;
this._x = random(400) + 170;
this._y = random(440) + 30;
_root.en++;
_root.enemy.duplicateMovieClip("enemy" + _root.en, _root.en);
_root["enemy" + _root.en]._x = random(400) + 170;
_root["enemy" + _root.en]._y = random(440) + 30;
}
if (_root.en >= 50) {
_quality = "MEDIUM";
}
if (_root.en >= 100) {
_quality = "LOW";
}
}
Instance of Symbol 106 MovieClip "player" in Frame 3
onClipEvent (enterFrame) {
if ((_root.mov == true) && (Key.isDown(38))) {
this._y = this._y - _root.speed;
}
if ((_root.mov == true) && (Key.isDown(40))) {
this._y = this._y + _root.speed;
}
if ((_root.mov == true) && (Key.isDown(37))) {
this._x = this._x - _root.speed;
}
if ((_root.mov == true) && (Key.isDown(39))) {
this._x = this._x + _root.speed;
}
if (this.hitTest(_root.edge1)) {
this._x = this._x - _root.speed;
}
if (this.hitTest(_root.edge2)) {
this._x = this._x + _root.speed;
}
if (this.hitTest(_root.upEdge)) {
this._y = this._y - _root.speed;
}
if (this.hitTest(_root.edge3)) {
this._y = this._y + _root.speed;
}
}
onClipEvent (enterFrame) {
if (_root.powerUp == false) {
_root.enemyS = 2;
_root.speed = 5;
}
}
Instance of Symbol 106 MovieClip "invin" in Frame 3
onClipEvent (enterFrame) {
if ((_root.powerUpMC.power == 3) && (_root.powerUp == true)) {
this._visible = true;
_x = _root.player._x;
_y = _root.player._y;
} else {
this._visible = false;
_x = 5000;
_y = 59999;
}
}
Instance of Symbol 126 MovieClip in Frame 3
onClipEvent (enterFrame) {
if ((_root.pTime <= 0) && (pHit == false)) {
_root.powerUpMC.gotoAndStop(1);
_root.powerUpMC._x = random(400) + 170;
_root.powerUpMC._y = random(400) + 30;
pHit = true;
}
if (_root.pTime == 1) {
pHit = false;
}
_root.pTime--;
}
Instance of Symbol 158 MovieClip "menu" in Frame 3
onClipEvent (enterFrame) {
this.swapDepths(10000);
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.gameO == true) {
_root.speed = 0;
this._visible = true;
}
if (_root.quit == true) {
this.removeMovieClip();
}
}
Frame 4
stop();
randSpeed = 5;
quit = false;
mov = true;
score = 0;
collected = 0;
powerHit = false;
powerUp = false;
gameO = false;
newDir = 0;
speed = 5;
pTime = 2;
timeCount = 0;
name = "insert name";
pUp = "none";
bulletTime = false;
superFast = false;
invinsible = true;
drunken = false;
Instance of Symbol 64 MovieClip "edge3" in Frame 4
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._y = _root.player._y + _root.speed;
}
}
Instance of Symbol 87 MovieClip "enemy" in Frame 4
onClipEvent (load) {
ud = random(2) + 2;
hit = 20;
bounceR = false;
bounce = false;
bounceL = false;
eS = random(_root.randSpeed) + 1;
eS2 = eS;
}
onClipEvent (enterFrame) {
xid = _x - _root.player._x;
yid = _y - _root.player._y;
distance = Math.sqrt((xid * xid) + (yid * yid));
if (((distance <= ((_width / 2) + (_root.player._width / 2))) && (hit <= 0)) && (_root.invin._visible == false)) {
this.gotoAndStop(2);
_root.menu._visible = true;
}
}
onClipEvent (enterFrame) {
if ((ud == 3) && (bounce == false)) {
this._x = this._x + eS;
}
if ((ud == 3) && (this.hitTest(_root.edge1))) {
bounce = true;
bounceR = true;
bounceL = false;
}
if ((ud == 3) && (bounceR == true)) {
this._x = this._x - eS;
}
if (((ud == 3) && (bounceR == true)) && (this.hitTest(_root.edge2))) {
bounceL = true;
bounceR = false;
}
if ((ud == 3) && (bounceL == true)) {
this._x = this._x + eS;
}
}
onClipEvent (load) {
bounceD = true;
bounceA = true;
bounceU = false;
}
onClipEvent (enterFrame) {
if ((ud == 2) && (bounceA == false)) {
this._y = this._y + eS;
}
if ((ud == 2) && (this.hitTest(_root.edge3))) {
bounceA = true;
bounceD = true;
bounceU = false;
}
if ((ud == 2) && (bounceD == true)) {
this._y = this._y + eS;
}
if (((ud == 2) && (bounceD == true)) && (this.hitTest(_root.upEdge))) {
bounceU = true;
bounceD = false;
}
if ((ud == 2) && (bounceU == true)) {
this._y = this._y - eS;
}
}
onClipEvent (enterFrame) {
if (_root.gameO == true) {
eS2 = 0;
eS = 0;
}
if ((_root.bulletTime == true) && (_root.powerUp == true)) {
eS = 0.3;
}
if ((_root.superFast == true) && (_root.powerUp == true)) {
es = 10;
}
if (_root.powerUp == false) {
es = eS2;
_root.superFast = false;
_root.bulletTime = false;
}
if (this.hitTest(_root.invin) && (_root.powerUp == true)) {
this.gotoAndStop(2);
es = 0;
hit = 20;
}
}
onClipEvent (enterFrame) {
if (hit <= 0) {
hit = 0;
}
if (_root.quit == true) {
this.removeMovieClip();
}
hit--;
}
Instance of Symbol 95 MovieClip in Frame 4
onClipEvent (load) {
_root.en = 0;
size = 20;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
this.play();
_root.score = _root.score + size;
_root.collected = _root.collected + 1;
this._x = random(400) + 170;
this._y = random(440) + 30;
_root.en++;
_root.enemy.duplicateMovieClip("enemy" + _root.en, _root.en);
_root["enemy" + _root.en]._x = random(400) + 170;
_root["enemy" + _root.en]._y = random(440) + 30;
}
if (_root.en >= 50) {
_quality = "MEDIUM";
}
if (_root.en >= 100) {
_quality = "LOW";
}
}
Instance of Symbol 106 MovieClip "player" in Frame 4
onClipEvent (enterFrame) {
if ((_root.mov == true) && (Key.isDown(38))) {
_y = (_y - _root.speed);
}
if ((_root.mov == true) && (Key.isDown(40))) {
_y = (_y + _root.speed);
}
if ((_root.mov == true) && (Key.isDown(37))) {
_x = (_x - _root.speed);
}
if ((_root.mov == true) && (Key.isDown(39))) {
_x = (_x + _root.speed);
}
trace(_x);
}
onClipEvent (enterFrame) {
if (_x <= 133) {
_x = 133;
}
if (_x >= 563.54) {
_x = 563.54;
}
if (_y >= 460.6) {
_y = 460.6;
}
if (_y <= 38.6) {
_y = 38.6;
}
}
Instance of Symbol 106 MovieClip "invin" in Frame 4
onClipEvent (enterFrame) {
if ((_root.YNbox._currentframe == 2) && (_root.powerUp == true)) {
this._visible = true;
_x = _root.player._x;
_y = _root.player._y;
} else {
this._visible = false;
_x = 5000;
_y = 59999;
}
}
Instance of Symbol 126 MovieClip in Frame 4
onClipEvent (enterFrame) {
if ((_root.pTime <= 0) && (pHit == false)) {
_root.powerUpMC.gotoAndStop(1);
_root.powerUpMC._x = random(400) + 170;
_root.powerUpMC._y = random(400) + 30;
pHit = true;
}
if (_root.pTime == 1) {
pHit = false;
}
_root.pTime--;
}
Instance of Symbol 168 MovieClip "menu" in Frame 4
onClipEvent (enterFrame) {
this.swapDepths(10000);
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.gameO == true) {
_root.speed = 0;
this._visible = true;
}
if (_root.quit == true) {
this.removeMovieClip();
}
}
Frame 5
stop();
quit = false;
mov = true;
score = 0;
collected = 0;
powerHit = false;
powerUp = false;
gameO2 = false;
newDir = 0;
speed = 5;
speed2 = 5;
score = 0;
scorePlayer2 = 0;
timeLeft = 60;
restartMulti = false;
bulletTime = false;
Instance of Symbol 126 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.score <= 0) {
_root.score = 0;
}
if (_root.scorePlayer2 <= 0) {
_root.scorePlayer2 = 0;
}
if (_root.timeLeft <= 0) {
_root.gameO2 = true;
_root.timeLeft = 0;
}
}
onClipEvent (enterFrame) {
if (_root.score >= _root.scorePlayer2) {
_root.winner = "Player 1";
_root.speed2 = 6;
_root.speed = 5;
} else if (_root.score == _root.scoreplayer2) {
_root.winner = "DRAW!";
_root.speed = 5;
_root.speed2 = 5;
} else {
_root.winner = "Player 2";
_root.speed = 6;
_root.speed2 = 5;
}
}
Instance of Symbol 87 MovieClip "enemy" in Frame 5
onClipEvent (load) {
ud = random(2) + 2;
hit = 20;
bounceR = false;
bounce = false;
bounceL = false;
eS = random(5) + 1;
eS2 = eS;
}
onClipEvent (enterFrame) {
xid = _x - _root.player._x;
yid = _y - _root.player._y;
distance = Math.sqrt((xid * xid) + (yid * yid));
if ((distance <= ((_width / 2) + (_root.player._width / 2))) && (hit <= 0)) {
_root.score = _root.score - 10;
this.gotoAndStop(2);
this._x = this._x - 10;
_root.player._alpha = 50;
} else {
_root.player._alpha = 100;
}
}
onClipEvent (enterFrame) {
xid = _x - _root.player2._x;
yid = _y - _root.player2._y;
distance = Math.sqrt((xid * xid) + (yid * yid));
if ((distance <= ((_width / 2) + (_root.player2._width / 2))) && (hit <= 0)) {
_root.scorePlayer2 = _root.scorePlayer2 - 10;
_root.player2._alpha = 50;
this._x = this._x - 10;
this.gotoAndStop(2);
} else {
_root.player2._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((ud == 3) && (bounce == false)) {
this._x = this._x + eS;
}
if ((ud == 3) && (this.hitTest(_root.edge1))) {
bounce = true;
bounceR = true;
bounceL = false;
}
if ((ud == 3) && (bounceR == true)) {
this._x = this._x - eS;
}
if (((ud == 3) && (bounceR == true)) && (this.hitTest(_root.edge2))) {
bounceL = true;
bounceR = false;
}
if ((ud == 3) && (bounceL == true)) {
this._x = this._x + eS;
}
}
onClipEvent (load) {
bounceD = true;
bounceA = true;
bounceU = false;
}
onClipEvent (enterFrame) {
if ((ud == 2) && (bounceA == false)) {
this._y = this._y + eS;
}
if ((ud == 2) && (this.hitTest(_root.edge3))) {
bounceA = true;
bounceD = true;
bounceU = false;
}
if ((ud == 2) && (bounceD == true)) {
this._y = this._y + eS;
}
if (((ud == 2) && (bounceD == true)) && (this.hitTest(_root.upEdge))) {
bounceU = true;
bounceD = false;
}
if ((ud == 2) && (bounceU == true)) {
this._y = this._y - eS;
}
}
onClipEvent (enterFrame) {
if (_root.gameO == true) {
eS2 = 0;
eS = 0;
}
if ((_root.bulletTime == true) && (_root.powerUp == true)) {
eS = 0.3;
} else {
eS = eS2;
}
}
onClipEvent (enterFrame) {
if (hit <= 0) {
hit = 0;
}
if (_root.quit == true) {
this.removeMovieClip();
}
hit--;
}
Instance of Symbol 95 MovieClip "food" in Frame 5
onClipEvent (load) {
_root.en = 0;
}
onClipEvent (enterFrame) {
if (_root.en >= 50) {
_quality = "MEDIUM";
}
if (_root.en >= 100) {
_quality = "LOW";
}
}
Instance of Symbol 106 MovieClip "player" in Frame 5
onClipEvent (enterFrame) {
if ((_root.mov == true) && (Key.isDown(38))) {
this._y = this._y - _root.speed;
}
if ((_root.mov == true) && (Key.isDown(40))) {
this._y = this._y + _root.speed;
}
if ((_root.mov == true) && (Key.isDown(37))) {
this._x = this._x - _root.speed;
}
if ((_root.mov == true) && (Key.isDown(39))) {
this._x = this._x + _root.speed;
}
if (this.hitTest(_root.edge1)) {
this._x = this._x - _root.speed;
}
if (this.hitTest(_root.edge2)) {
this._x = this._x + _root.speed;
}
if (this.hitTest(_root.upEdge)) {
this._y = this._y - _root.speed;
}
if (this.hitTest(_root.edge3)) {
this._y = this._y + _root.speed;
}
}
onClipEvent (enterFrame) {
if (_root.powerUp == false) {
_root.enemyS = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.food)) {
_root.score = _root.score + 20;
_root.collected = _root.collected + 1;
_root.food._x = random(400) + 170;
_root.food._y = random(440) + 30;
_root.en++;
_root.enemy.duplicateMovieClip("enemy" + _root.en, _root.en);
_root["enemy" + _root.en]._x = random(400) + 170;
_root["enemy" + _root.en]._y = random(440) + 30;
}
}
Instance of Symbol 106 MovieClip "player2" in Frame 5
onClipEvent (enterFrame) {
if ((_root.mov == true) && (Key.isDown(87))) {
this._y = this._y - _root.speed2;
}
if ((_root.mov == true) && (Key.isDown(83))) {
this._y = this._y + _root.speed2;
}
if ((_root.mov == true) && (Key.isDown(65))) {
this._x = this._x - _root.speed2;
}
if ((_root.mov == true) && (Key.isDown(68))) {
this._x = this._x + _root.speed2;
}
if (this.hitTest(_root.edge1)) {
this._x = this._x - _root.speed2;
}
if (this.hitTest(_root.edge2)) {
this._x = this._x + _root.speed2;
}
if (this.hitTest(_root.upEdge)) {
this._y = this._y - _root.speed2;
}
if (this.hitTest(_root.edge3)) {
this._y = this._y + _root.speed2;
}
}
onClipEvent (enterFrame) {
if (_root.powerUp == false) {
_root.enemyS = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.food)) {
_root.scorePlayer2 = _root.scorePlayer2 + 20;
_root.collected = _root.collected + 1;
_root.food._x = random(400) + 170;
_root.food._y = random(440) + 30;
_root.en++;
_root.enemy.duplicateMovieClip("enemy" + _root.en, _root.en);
_root["enemy" + _root.en]._x = random(400) + 170;
_root["enemy" + _root.en]._y = random(440) + 30;
}
}
Instance of Symbol 222 MovieClip "gameOM" in Frame 5
onClipEvent (enterFrame) {
this.swapDepths(10000);
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.gameO2 == true) {
_root.speed = 0;
this._visible = true;
}
if (_root.quit == true) {
this.removeMovieClip();
}
}
Symbol 5 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
_root.play();
}
Symbol 5 MovieClip Frame 2
gotoAndPlay (1);
Symbol 23 MovieClip Frame 8
stop();
Symbol 25 Button
on (release) {
gotoAndStop (3);
}
Symbol 31 Button
on (release) {
gotoAndStop ("toy");
}
Symbol 36 Button
on (release) {
gotoAndStop (5);
}
Symbol 55 Button
on (release) {
getURL ("http://www.nbstuff.com", "_blank");
}
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 2
stop();
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 2
_root.powerHit = true;
Symbol 74 MovieClip Frame 7
stop();
Symbol 86 MovieClip Frame 10
stop();
_parent.removeMovieClip();
Symbol 87 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 7
gotoAndStop (1);
Symbol 105 MovieClip Frame 10
stop();
_root.gameO = true;
Symbol 106 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 250
_root.powerUp = false;
_root.pTime = 500;
Symbol 140 Button
on (release) {
score = _root.score;
name = _root.name;
_root.game_id = "ballo";
_root.getURL("http://www.nbstuff.com/highscores/ball/addscore.php", "_blank", "POST");
_root.menu.sub._visible = false;
}
Symbol 146 Button
on (release) {
_root.quit = true;
_root.gotoAndStop("main");
}
Symbol 157 Button
on (release) {
_root.gotoAndStop("main");
_root.restartSingel = true;
_root.quit = true;
}
Symbol 161 Button
on (release) {
_root.gotoAndStop("main");
_root.quit2 = true;
_root.quit = true;
}
Symbol 167 Button
on (release) {
_visible = false;
}
Symbol 186 Button
on (press) {
_root.quit = true;
}
on (release) {
_root.quit = false;
}
Symbol 187 Button
on (release) {
_root.gotoAndStop("main");
_root.quit = true;
}
Symbol 189 Button
on (release) {
_root.pUp = "Speedy";
_root.powerUp = true;
power = 2;
_root.invinsible = false;
_root.superFast = true;
_root.bulletTime = false;
_root.invin._visible = false;
_root.drunken == false;
_root.invinv._x = 4000;
gotoAndStop (2);
}
Symbol 191 Button
on (release) {
_root.pUp = "Bulletime";
_root.powerUp = false;
_root.bulletTime = false;
_root.superFast == false;
_root.superFast = false;
_root.invinsible = false;
_root.invin._visible = false;
_root.drunken == false;
_root.invinv._x = 4000;
gotoAndStop (1);
}
Symbol 192 MovieClip Frame 1
stop();
Symbol 193 Button
on (release) {
_root.pUp = "Bulletime";
_root.powerUp = true;
_root.bulletTime = true;
_root.superFast == false;
_root.superFast = false;
_root.invinsible = false;
_root.invin._visible = false;
_root.drunken == false;
_root.invinv._x = 4000;
gotoAndStop (2);
}
Symbol 194 MovieClip Frame 1
stop();
Symbol 195 Button
on (release) {
_root.powerUp = true;
_root.pUp = "Invincible";
power = 3;
_root.invinsible = true;
_root.bulletTime = false;
_root.superFast = false;
_root.drunken == false;
gotoAndStop (2);
}
Symbol 196 MovieClip Frame 1
stop();
Symbol 204 Button
on (release) {
gotoAndStop (2);
_root.quit = true;
}
Symbol 221 Button
on (release) {
_root.quit = true;
_root.restartMulti = true;
_root.gotoAndStop("main");
}