Frame 1
_root.saved = 0;
_root.esaved = 0;
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar.gotoAndStop(percentLoaded);
play();
Frame 2
if (_root.percentLoaded == 100) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 3
stopAllSounds();
stop();
_root.onEnterFrame = function () {
_root.txt_percent = Math.round((getBytesLoaded() / getBytesTotal()) * 100) + "%";
if (getBytesLoaded() == getBytesTotal()) {
var _local3 = new LocalConnection();
var _local2 = _local3.domain().toString();
if (_local2.indexOf("master-fuy.com") == -1) {
_root.gotoAndPlay("splash");
}
_root.onEnterFrame = undefined;
}
};
Frame 10
stop();
_root.onEnterFrame = function () {
if (_root.mc_splash._currentframe == _root.mc_splash._totalframes) {
gotoAndStop ("game");
_root.onEnterFrame = undefined;
}
};
stop();
Frame 30
function function_startGame() {
glbvar_gameScore = 0;
glbvar_gameSeeds = 25;
glbvar_gameRound = 0;
_root.attachMovie("mc_ninja", "mc_ninja", lvl_ninja);
_root.mc_ninja._x = glbvar_ninjaX;
_root.mc_ninja._y = glbvar_ninjaY;
var _local2 = 0;
while (_local2 < glbvar_birdTotal) {
array_birdSlots[_local2] = false;
_local2++;
}
_local2 = 0;
while (_local2 < 19) {
var _local3 = "mc_radish" + _local2;
_root.mc_background[_local3].gotoAndStop("rest");
_local2++;
}
_root.createEmptyMovieClip("mc_birdContainer", lvl_birdContainer);
_root.mc_birdContainer.onEnterFrame = function () {
function_startNewRound();
};
}
function function_startNewRound() {
if (glbvar_gameRound < glbvar_gameMaxRounds) {
glbvar_gameRound++;
glbvar_throwingSpadeSpeed = 18;
glbvar_powerupCheck = true;
glbvar_powerupSpeed = false;
glbvar_powerupStopwatch = false;
_root.mc_ninja.onMouseUp = undefined;
_root.attachMovie("mc_gopher", "mc_gopher", lvl_gopher);
_root.mc_gopher._x = 63;
_root.mc_gopher._y = 375;
if (glbvar_gameSound) {
sfx_gopherUp.start();
}
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.maxCount = 90;
_root.mc_birdContainer.onEnterFrame = function () {
function_delayNewRound();
};
} else {
_root.mc_ninja.onMouseUp = undefined;
_root.mc_throwingSpade.removeMovieClip();
glbvar_seedBonus = glbvar_gameSeeds * glbvar_seedBonusPoints;
glbvar_seedsText = glbvar_gameSeeds + " Babys stuff Remaining";
glbvar_bonusText = ("x " + glbvar_seedBonusPoints) + " Bonus";
glbvar_totalText = glbvar_seedBonus + "Bonus!";
_root.attachMovie("mc_gameWon", "mc_gameWon", lvl_gameOver);
_root.mc_gameWon._x = glbvar_stageWidth / 2;
_root.mc_gameWon._y = glbvar_stageHeight / 2;
_root.mc_gameWon.array_labels = new Array("congrats", "seeds", "bonus", "total");
if (glbvar_gameSound) {
sfx_gamePoints.start();
}
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.maxCount = 30;
_root.mc_birdContainer.onEnterFrame = function () {
function_gameWon();
};
}
}
function function_delayNewRound() {
_root.mc_birdContainer.count++;
if (_root.mc_birdContainer.count >= _root.mc_birdContainer.maxCount) {
_root.mc_birdContainer.onEnterFrame = undefined;
_root.attachMovie("mc_throwingSpade", "mc_throwingSpade", lvl_throwingSpade);
_root.mc_throwingSpade._x = _root.mc_ninja._x - 29;
_root.mc_throwingSpade._y = _root.mc_ninja._y + 5;
_root.mc_throwingSpade.speedX = -1 * glbvar_throwingSpadeSpeed;
_root.mc_throwingSpade.count = 0;
_root.mc_throwingSpade.maxCount = 12;
_root.mc_throwingSpade._alpha = 0;
_root.mc_ninja._xscale = (_root.mc_throwingSpade._xscale = -100);
_root.mc_ninja.gotoAndPlay("throw");
_root.mc_throwingSpade.onEnterFrame = function () {
this.count++;
if (this.count > this.maxCount) {
this._alpha = 100;
if (glbvar_gameSound) {
sfx_spadeThrow.start();
}
this.onEnterFrame = function () {
this._x = this._x + this.speedX;
if (this._x < _root.mc_gopher._x) {
if (glbvar_gameSound) {
sfx_gopherDown.start();
}
_root.mc_gopher.gotoAndStop("exit");
_root.mc_birdContainer.onEnterFrame = function () {
if (_root.mc_gopher._currentframe < _root.mc_gopher._totalframes) {
_root.mc_gopher.nextFrame();
} else {
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.maxCount = 10;
_root.mc_birdContainer.birds = 0;
_root.mc_birdContainer.maxBirds = glbvar_maxBirdsBase * array_waveMax[glbvar_gameRound - 1];
_root.mc_birdContainer.wave = 0;
_root.mc_birdContainer.maxWave = array_waveMax[glbvar_gameRound - 1];
_root.mc_birdContainer.onEnterFrame = function () {
function_releaseBird();
};
_root.mc_gopher.removeMovieClip();
}
};
_root.mc_ninja.gotoAndPlay("grab");
if (glbvar_gameSound) {
sfx_spadeGrab.start();
}
_root.mc_ninja.onMouseUp = function () {
function_ninjaMouseUp();
};
_root.attachMovie("mc_sign", "mc_sign", lvl_sign);
_root.mc_sign._x = _root.mc_gopher._x;
_root.mc_sign._y = _root.mc_gopher._y;
if (glbvar_gameSound) {
sfx_signRip.start();
}
_root.mc_sign.onEnterFrame = function () {
if (this._currentframe >= this._totalframes) {
this.removeMovieClip();
}
};
this.removeMovieClip();
}
};
}
};
}
}
function function_delayBird() {
_root.mc_birdContainer.count++;
if (_root.mc_birdContainer.count > _root.mc_birdContainer.maxCount) {
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.maxCount = 10;
_root.mc_birdContainer.onEnterFrame = function () {
function_releaseBird();
};
}
}
function function_releaseBird() {
_root.mc_birdContainer.count++;
if (_root.mc_birdContainer.count > _root.mc_birdContainer.maxCount) {
if (_root.mc_birdContainer.birds < _root.mc_birdContainer.maxBirds) {
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.birds++;
_root.mc_birdContainer.wave++;
function_addBird();
if (_root.mc_birdContainer.birds == _root.mc_birdContainer.maxBirds) {
_root.mc_birdContainer.onEnterFrame = function () {
function_delayEndRound();
};
} else if (_root.mc_birdContainer.wave == _root.mc_birdContainer.maxWave) {
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.maxCount = array_releaseCount[glbvar_gameRound - 1];
_root.mc_birdContainer.wave = 0;
_root.mc_birdContainer.onEnterFrame = function () {
function_delayBird();
};
}
}
}
}
function function_delayEndRound() {
var _local2 = 0;
var _local4 = 0;
while (_local2 < glbvar_birdTotal) {
var _local3 = "mc_bird" + _local2;
if (_root.mc_birdContainer[_local3] != undefined) {
_local4++;
}
_local2++;
}
if (_local4 == 0) {
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.maxCount = glbvar_gameFramerate * 1.5;
_root.mc_birdContainer.onEnterFrame = function () {
function_endRound();
};
}
}
function function_endRound() {
_root.mc_birdContainer.count++;
if (_root.mc_birdContainer.count >= _root.mc_birdContainer.maxCount) {
function_removePowerup();
_root.mc_birdContainer.onEnterFrame = function () {
function_startNewRound();
};
}
}
function function_gameOver() {
_root.mc_ninja.onMouseUp = undefined;
_root.mc_throwingSpade.removeMovieClip();
_root.mc_birdContainer.onEnterFrame = undefined;
_root.attachMovie("mc_gameOver", "mc_gameOver", lvl_gameOver);
_root.mc_gameOver._x = glbvar_stageWidth / 2;
_root.mc_gameOver._y = glbvar_stageHeight / 2;
_root.mc_gameOver.btn_submit.onRollOver = function () {
function_buttonRollover();
};
_root.mc_gameOver.btn_submit.onRelease = function () {
button_submitScore();
};
_root.mc_gameOver.btn_mainmenu.onRollOver = function () {
function_buttonRollover();
};
_root.mc_gameOver.btn_mainmenu.onRelease = (_root.mc_scorebar.btn_menu.onRelease = function () {
button_mainmenu();
});
if (glbvar_gameScore == 0) {
_root.mc_gameOver.btn_submit._visible = false;
}
}
function function_gameWon() {
_root.mc_birdContainer.count++;
if (_root.mc_birdContainer.count >= _root.mc_birdContainer.maxCount) {
if (_root.mc_gameWon.array_labels[0] == "congrats") {
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.maxCount = 15;
_root.mc_gameWon.gotoAndPlay(_root.mc_gameWon.array_labels[1]);
_root.mc_gameWon.array_labels.shift();
if (glbvar_gameSound) {
sfx_gamePoints.start();
}
} else if (_root.mc_gameWon.array_labels[0] == "seeds") {
_root.mc_birdContainer.count = 0;
_root.mc_gameWon.gotoAndPlay(_root.mc_gameWon.array_labels[1]);
_root.mc_gameWon.array_labels.shift();
if (glbvar_gameSound) {
sfx_gamePoints.start();
}
} else if (_root.mc_gameWon.array_labels[0] == "bonus") {
_root.mc_birdContainer.count = 0;
_root.mc_gameWon.gotoAndPlay(_root.mc_gameWon.array_labels[1]);
_root.mc_gameWon.array_labels.shift();
glbvar_gameScore = glbvar_gameScore + glbvar_seedBonus;
if (glbvar_gameSound) {
sfx_gameBonus.start();
}
} else {
_root.mc_birdContainer.count = 0;
_root.mc_birdContainer.maxCount = 0;
_root.mc_birdContainer.radishCount = 0;
_root.mc_birdContainer.maxRadishCount = 3;
_root.mc_birdContainer.onEnterFrame = function () {
_root.mc_birdContainer.count++;
if (_root.mc_birdContainer.count > _root.mc_birdContainer.maxCount) {
_root.mc_birdContainer.count = 0;
if (_root.mc_birdContainer.radishCount < _root.mc_birdContainer.maxRadishCount) {
_root.mc_birdContainer.radishCount++;
if (_root.mc_birdContainer.radishCount < _root.mc_birdContainer.maxRadishCount) {
_root.mc_birdContainer.maxCount = 30;
} else {
_root.mc_birdContainer.maxCount = 120;
}
if (glbvar_gameSound) {
sfx_radishUp.start();
}
var _local2 = 0;
while (_local2 < 7) {
var _local3 = "mc_radish" + (_local2 + ((_root.mc_birdContainer.radishCount - 1) * 6));
_root.mc_background[_local3].gotoAndPlay("popup");
function_createParticleEffect(_root, glbvar_gameFramerate, true, true, "mc_dirt" + _local2, lvl_birdFeathers + (_local2 + ((_root.mc_birdContainer.radishCount - 1) * 6)), 1, 500, 10, 270, 60, "mc_particleDirt", _root.mc_background[_local3]._x, _root.mc_background[_local3]._y, false, 100, 75, 6, 3, 5, 10, 1, 90);
_local2++;
}
} else {
_root.mc_gameWon.removeMovieClip();
function_gameOver();
}
}
};
}
}
}
function function_ninjaMouseUp() {
if (_root._ymouse > 20) {
if (_root.mc_throwingSpade == undefined) {
_root.attachMovie("mc_throwingSpade", "mc_throwingSpade", lvl_throwingSpade);
var _local2 = 1;
if ((_root._xmouse - _root.mc_ninja._x) < 0) {
_local2 = -1;
}
_root.mc_throwingSpade._x = _root.mc_ninja._x + (29 * _local2);
_root.mc_throwingSpade._y = _root.mc_ninja._y + 5;
var _local3 = Math.atan2(_root._ymouse - _root.mc_throwingSpade._y, _root._xmouse - _root.mc_throwingSpade._x);
_root.mc_throwingSpade.speedX = glbvar_throwingSpadeSpeed * Math.cos(_local3);
_root.mc_throwingSpade.speedY = glbvar_throwingSpadeSpeed * Math.sin(_local3);
_root.mc_throwingSpade.count = 0;
_root.mc_throwingSpade.maxCount = 12;
_root.mc_throwingSpade._alpha = 0;
_root.mc_ninja._xscale = (_root.mc_throwingSpade._xscale = 100 * _local2);
_root.mc_ninja.gotoAndPlay("throw");
_root.mc_throwingSpade.onEnterFrame = function () {
function_delaySpade();
};
_root.mc_throwingSpade.onUnload = function () {
_root.mc_ninja.gotoAndPlay("grab");
if (glbvar_gameSound) {
sfx_spadeGrab.start();
}
};
}
}
}
function function_delaySpade() {
_root.mc_throwingSpade.count++;
if (_root.mc_throwingSpade.count >= _root.mc_throwingSpade.maxCount) {
_root.mc_throwingSpade._alpha = 100;
if (glbvar_powerupSpeed) {
if (glbvar_gameSound) {
sfx_powerupSpeed.start();
}
_root.createEmptyMovieClip("mc_throwingSpadeTrailContainer", lvl_powerupEffect - 1);
_root.mc_throwingSpadeTrailContainer._x = _root.mc_throwingSpade._x;
_root.mc_throwingSpadeTrailContainer._y = _root.mc_throwingSpade._y;
_root.mc_throwingSpadeTrailContainer.onEnterFrame = function () {
if (_root.mc_throwingSpade != undefined) {
this._x = _root.mc_throwingSpade._x;
this._y = _root.mc_throwingSpade._y;
}
if (_root.mc_throwingSpadeTrail == undefined) {
_root.mc_throwingSpadeTrailContainer.removeMovieClip();
}
};
function_createParticleEffect(_root, glbvar_gameFramerate, true, false, "mc_throwingSpadeTrail", lvl_powerupEffect, 0, 300, 4, 0, 360, "mc_particleSmoke1", _root.mc_throwingSpadeTrailContainer, _root.mc_throwingSpadeTrailContainer, false, 65, 0, 30, 60, 1, 2, 0, 0);
} else if (glbvar_gameSound) {
sfx_spadeThrow.start();
}
_root.mc_throwingSpade.onEnterFrame = function () {
function_throwSpade();
};
}
}
function function_throwSpade() {
if (_root.mc_throwingSpade.hitTest(_root.mc_background)) {
_root.mc_throwingSpade._x = _root.mc_throwingSpade._x + _root.mc_throwingSpade.speedX;
_root.mc_throwingSpade._y = _root.mc_throwingSpade._y + _root.mc_throwingSpade.speedY;
if (_root.mc_throwingSpade.mc_hitBox.hitTest(_root.mc_birdContainer)) {
var _local2 = 0;
while (_local2 < glbvar_birdTotal) {
var _local4 = "mc_bird" + _local2;
if (_root.mc_throwingSpade.mc_hitBox.hitTest(_root.mc_birdContainer[_local4].mc_hitBox)) {
function_killBird(_local4, _local2, false);
_root.mc_throwingSpade.removeMovieClip();
break;
}
if (_root.mc_throwingSpade.mc_hitBox.hitTest(_root.mc_birdContainer.mc_powerup.mc_hitBox)) {
switch (_root.mc_birdContainer.mc_powerup.powerupName) {
case "mc_powerupBonus" :
function_powerupBonus();
var _local3 = "mc_particleSmoke2";
break;
case "mc_powerupExplosivo" :
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
function_powerupExplosivo();
};
_local3 = "mc_particleSmoke3";
break;
case "mc_powerupSpeed" :
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
function_powerupSpeed();
};
_local3 = "mc_particleSmoke1";
break;
case "mc_powerupStopwatch" :
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
function_powerupStopwatch();
};
_local3 = "mc_particleSmoke0";
}
if (glbvar_gameSound) {
sfx_birdHit.start();
}
function_createParticleEffect(_root, glbvar_gameFramerate, true, false, "mc_powerupSmoke" + _local2, lvl_powerup + 1, 1, 300, 1, 270, 360, _local3, _root.mc_birdContainer.mc_powerup._x, _root.mc_birdContainer.mc_powerup._y, false, 50, 0, 30, 60, 1, 2, 0.3, 270);
array_birdSlots[_root.mc_birdContainer.mc_powerup.birdNumber] = false;
_root.mc_birdContainer.mc_powerup._x = -60;
_root.mc_birdContainer.mc_powerup._y = -60;
_root.mc_throwingSpade.removeMovieClip();
}
_local2++;
}
}
} else {
_root.mc_throwingSpade.removeMovieClip();
}
}
function function_addBird() {
var _local4 = 0;
while (_local4 < glbvar_birdTotal) {
var var_birdPositionPick = Math.floor(glbvar_birdTotal * Math.random());
if (array_birdSlots[var_birdPositionPick] == false) {
if (glbvar_powerupCheck && (Math.random() < glbvar_powerupChance)) {
glbvar_powerupCheck = false;
var _local3 = 4;
} else {
var _local3 = Math.floor(Math.random() * ((array_birdPickRangeMax[glbvar_gameRound - 1] - array_birdPickRangeMin[glbvar_gameRound - 1]) + 1)) + array_birdPickRangeMin[glbvar_gameRound - 1];
}
var _local5 = array_bird[_local3];
var var_birdMC = ("mc_bird" + var_birdPositionPick);
array_birdSlots[var_birdPositionPick] = true;
_root.mc_birdContainer.attachMovie(_local5, var_birdMC, lvl_bird + var_birdPositionPick);
if (Math.random() > 0.5) {
var _local2 = 1;
} else {
var _local2 = -1;
}
_root.mc_birdContainer[var_birdMC]._x = array_birdPositionsX[var_birdPositionPick] + (_local2 * (glbvar_birdWidth + glbvar_birdSpace));
_root.mc_birdContainer[var_birdMC]._y = (-glbvar_birdHeight) / 2;
_root.mc_birdContainer[var_birdMC].perchX = array_birdPositionsX[var_birdPositionPick];
_root.mc_birdContainer[var_birdMC].perchY = glbvar_birdPerchY;
_root.mc_birdContainer[var_birdMC].diveX = array_birdDiveX[var_birdPositionPick];
_root.mc_birdContainer[var_birdMC].diveY = glbvar_birdDiveY;
_root.mc_birdContainer[var_birdMC].exitY = glbvar_birdExitY;
var _local2 = _local2 * -1;
_root.mc_birdContainer[var_birdMC].speedX = (glbvar_birdSpeed * _local2) * Math.cos(Math.atan(Math.abs(_root.mc_birdContainer[var_birdMC].perchY - _root.mc_birdContainer[var_birdMC]._y) / Math.abs(_root.mc_birdContainer[var_birdMC].perchX - _root.mc_birdContainer[var_birdMC]._x)));
_root.mc_birdContainer[var_birdMC].speedY = glbvar_birdSpeed * Math.sin(Math.atan(Math.abs(_root.mc_birdContainer[var_birdMC].perchY - _root.mc_birdContainer[var_birdMC]._y) / Math.abs(_root.mc_birdContainer[var_birdMC].perchX - _root.mc_birdContainer[var_birdMC]._x)));
_root.mc_birdContainer[var_birdMC].timer = array_birdTimer[_local3];
_root.mc_birdContainer[var_birdMC].count = 0;
_root.mc_birdContainer[var_birdMC].points = array_birdPoints[_local3];
_root.mc_birdContainer[var_birdMC].particleName = "mc_particleFeather" + _local3;
_root.mc_birdContainer[var_birdMC].pointsDouble = true;
_root.mc_birdContainer[var_birdMC].gotoAndPlay("fly");
_root.mc_birdContainer[var_birdMC].onEnterFrame = function () {
function_enterBird(_root.mc_birdContainer[var_birdMC], var_birdPositionPick);
};
break;
}
_local4++;
}
}
function function_enterBird(var_birdMC, var_birdPositionPick) {
if ((var_birdMC._y < var_birdMC.perchY) && ((var_birdMC.perchY - var_birdMC._y) > var_birdMC.speedY)) {
var_birdMC._x = var_birdMC._x + var_birdMC.speedX;
var_birdMC._y = var_birdMC._y + var_birdMC.speedY;
if (var_birdMC._currentframe >= glbvar_birdLoopFrame) {
var_birdMC.gotoAndPlay("fly");
}
if (glbvar_gameSound) {
if ((var_birdMC._currentframe == glbvar_birdFlapFrame) || (var_birdMC._currentframe == glbvar_birdFlapFrameSide)) {
sfx_birdFly.start();
}
}
} else {
var_birdMC._x = var_birdMC.perchX;
var_birdMC._y = var_birdMC.perchY;
var_birdMC.pointsDouble = false;
var_birdMC.gotoAndPlay("rest");
var_birdMC.onEnterFrame = function () {
function_perchBird(var_birdMC, var_birdPositionPick);
};
}
}
function function_perchBird(var_birdMC, var_birdPositionPick) {
var_birdMC.count++;
if (var_birdMC.count > var_birdMC.timer) {
var_birdMC.speedX = glbvar_birdSpeed * Math.cos(Math.atan(Math.abs(var_birdMC.diveY - var_birdMC._y) / Math.abs(var_birdMC.diveX - var_birdMC._x)));
var_birdMC.speedY = glbvar_birdSpeed * Math.sin(Math.atan(Math.abs(var_birdMC.diveY - var_birdMC._y) / Math.abs(var_birdMC.diveX - var_birdMC._x)));
if ((var_birdMC.diveX - var_birdMC._x) < 0) {
var_birdMC.speedX = var_birdMC.speedX * -1;
}
var_birdMC.pointsDouble = true;
var_birdMC.gotoAndPlay("fly");
var_birdMC.onEnterFrame = function () {
function_diveBird(var_birdMC, var_birdPositionPick);
};
}
}
function function_diveBird(var_birdMC, var_birdPositionPick) {
if ((var_birdMC._y < var_birdMC.diveY) && ((var_birdMC.diveY - var_birdMC._y) > var_birdMC.speedY)) {
var_birdMC._x = var_birdMC._x + var_birdMC.speedX;
var_birdMC._y = var_birdMC._y + var_birdMC.speedY;
if (var_birdMC._currentframe >= glbvar_birdLoopFrame) {
var_birdMC.gotoAndPlay("fly");
}
if (glbvar_gameSound) {
if ((var_birdMC._currentframe == glbvar_birdFlapFrame) || (var_birdMC._currentframe == glbvar_birdFlapFrameSide)) {
sfx_birdFly.start();
}
}
} else {
var_birdMC.gotoAndPlay("flySide");
if (var_birdMC._x > (glbvar_stageWidth / 2)) {
var_birdMC.exitX = glbvar_stageWidth;
var_birdMC.speedX = glbvar_birdSpeed * Math.cos(Math.atan(Math.abs(var_birdMC.exitY - var_birdMC._y) / Math.abs(var_birdMC.exitX - var_birdMC._x)));
} else {
var_birdMC.exitX = 0;
var_birdMC.speedX = (glbvar_birdSpeed * -1) * Math.cos(Math.atan(Math.abs(var_birdMC.exitY - var_birdMC._y) / Math.abs(var_birdMC.exitX - var_birdMC._x)));
var_birdMC._xscale = -100;
}
var_birdMC.speedY = (glbvar_birdSpeed * -1) * Math.sin(Math.atan(Math.abs(var_birdMC.exitY - var_birdMC._y) / Math.abs(var_birdMC.exitX - var_birdMC._x)));
function_subtractSeed();
if (glbvar_gameSound) {
sfx_gameSeed.start();
}
var _local3 = "mc_pointsSeed" + var_birdPositionPick;
_root.attachMovie("mc_pointsSeed", _local3, lvl_pointsSeed + var_birdPositionPick);
_root[_local3]._x = Math.round(var_birdMC._x);
_root[_local3]._y = Math.round(var_birdMC._y);
_root[_local3].count = 0;
_root[_local3].onEnterFrame = function () {
this.count++;
this._y++;
if (this.count > 30) {
this.removeMovieClip();
}
};
var_birdMC.pointsDouble = false;
var_birdMC.onEnterFrame = function () {
function_exitBird(var_birdMC, var_birdPositionPick);
};
}
}
function function_exitBird(var_birdMC, var_birdPositionPick) {
if ((var_birdMC._x > (-glbvar_birdWidth)) && (var_birdMC._x < (glbvar_stageWidth + glbvar_birdWidth))) {
var_birdMC._x = var_birdMC._x + var_birdMC.speedX;
var_birdMC._y = var_birdMC._y + var_birdMC.speedY;
if (var_birdMC._currentframe >= glbvar_birdLoopFrameSide) {
var_birdMC.gotoAndPlay("flySide");
}
if (glbvar_gameSound) {
if ((var_birdMC._currentframe == glbvar_birdFlapFrame) || (var_birdMC._currentframe == glbvar_birdFlapFrameSide)) {
sfx_birdFly.start();
}
}
} else {
if (var_birdMC.particleName == "mc_particleFeather4") {
glbvar_powerupCheck = true;
}
array_birdSlots[var_birdPositionPick] = false;
var_birdMC.removeMovieClip();
}
}
function function_killBird(var_birdMC, var_birdNumber, var_powerupExplosivo) {
if (_root.mc_birdContainer[var_birdMC]._currentframe < 30) {
_root.mc_birdContainer[var_birdMC].gotoAndStop("bugged");
} else {
_root.mc_birdContainer[var_birdMC].gotoAndStop("buggedSide");
}
if (glbvar_gameSound) {
sfx_birdChirp.start();
}
_root.mc_birdContainer[var_birdMC].count = 0;
_root.mc_birdContainer[var_birdMC].maxCount = 4;
if (glbvar_powerupStopwatch) {
var _local6 = "mc_icecube" + var_birdNumber;
function_killIcecube(_local6, var_birdNumber);
if (glbvar_gameSound) {
sfx_powerupIcecubeBreak.start();
}
}
_root.mc_birdContainer[var_birdMC].onEnterFrame = function () {
_root.mc_birdContainer[var_birdMC].count++;
if (_root.mc_birdContainer[var_birdMC].count > _root.mc_birdContainer[var_birdMC].maxCount) {
if (glbvar_gameSound) {
sfx_birdHit.start();
}
if (_root.mc_birdContainer[var_birdMC].pointsDouble) {
var _local4 = 2;
} else {
var _local4 = 1;
}
var _local3 = "mc_points" + var_birdNumber;
if (_local4 > 1) {
_root.attachMovie("mc_pointsLarge", _local3, lvl_points + var_birdNumber);
if (glbvar_gameSound) {
sfx_gameBonus.start();
}
} else {
_root.attachMovie("mc_pointsSmall", _local3, lvl_points + var_birdNumber);
if (glbvar_gameSound) {
sfx_gamePoints.start();
}
}
_root[_local3]._x = Math.round(_root.mc_birdContainer[var_birdMC]._x);
_root[_local3]._y = Math.round(_root.mc_birdContainer[var_birdMC]._y);
_root[_local3].count = 0;
_root[_local3].pointsText = "+" + (_local4 * _root.mc_birdContainer[var_birdMC].points);
_root.glbvar_gameScore = _root.glbvar_gameScore + (_local4 * _root.mc_birdContainer[var_birdMC].points);
_root[_local3].onEnterFrame = function () {
this.count++;
this._y--;
if (this.count > 30) {
this.removeMovieClip();
}
};
function_createParticleEffect(_root, glbvar_gameFramerate, true, true, "mc_feathers" + var_birdNumber, lvl_birdFeathers + var_birdNumber, 1, 500, 30, 270, 360, _root.mc_birdContainer[var_birdMC].particleName, _root.mc_birdContainer[var_birdMC]._x, _root.mc_birdContainer[var_birdMC]._y, false, 100, 50, 11, 11, 1, 2, 0.2, 90);
if (var_powerupExplosivo) {
function_createParticleEffect(_root, glbvar_gameFramerate, true, false, ("mc_smoke" + glbvar_birdTotal) + var_birdNumber, (lvl_powerup + glbvar_birdTotal) + var_birdNumber, 1, 300, 1, 270, 360, "mc_particleSmoke3", _root.mc_birdContainer[var_birdMC]._x, _root.mc_birdContainer[var_birdMC]._y, false, 50, 0, 40, 80, 1, 2, 0.3, 270);
}
if (_root.mc_birdContainer[var_birdMC].particleName == "mc_particleFeather4") {
var _local6 = Math.floor(glbvar_powerupArrayLength * Math.random());
var _local5 = array_powerup[_local6];
_root.mc_birdContainer.attachMovie(_local5, "mc_powerup", lvl_powerup);
_root.mc_birdContainer.mc_powerup._x = _root.mc_birdContainer[var_birdMC]._x;
_root.mc_birdContainer.mc_powerup._y = _root.mc_birdContainer[var_birdMC]._y;
_root.mc_birdContainer.mc_powerup.count = 0;
_root.mc_birdContainer.mc_powerup.maxCount = glbvar_powerupDelayCount - (glbvar_gameFramerate * 1);
_root.mc_birdContainer.mc_powerup.powerupName = _local5;
_root.mc_birdContainer.mc_powerup.birdNumber = var_birdNumber;
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
this.count++;
if (this.count >= this.maxCount) {
this.count = 0;
this.maxCount = glbvar_gameFramerate * 1;
this.blinkCount = 0;
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
this.count++;
if (Math.floor(this.count / 2) == this.blinkCount) {
this.blinkCount++;
if (this._alpha == 100) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
if (this.count >= this.maxCount) {
array_birdSlots[this.birdNumber] = false;
this.removeMovieClip();
}
};
}
};
_root.mc_birdContainer.mc_powerup.onUnload = function () {
glbvar_powerupCheck = true;
};
} else {
array_birdSlots[var_birdNumber] = false;
}
_root.mc_birdContainer[var_birdMC].removeMovieClip();
}
};
}
function function_subtractSeed() {
if (glbvar_gameSeeds > 1) {
glbvar_gameSeeds--;
} else if (glbvar_gameSeeds == 1) {
glbvar_gameSeeds--;
function_gameOver();
}
}
function function_powerupBonus() {
_root.attachMovie("mc_pointsLarge", "mc_points10", lvl_points + 10);
_root.mc_points10._x = _root.mc_birdContainer.mc_powerup._x;
_root.mc_points10._y = _root.mc_birdContainer.mc_powerup._y;
_root.mc_points10.count = 0;
_root.mc_points10.pointsText = "+" + glbvar_powerupBonusPoints;
_root.glbvar_gameScore = _root.glbvar_gameScore + glbvar_powerupBonusPoints;
_root.mc_points10.onEnterFrame = function () {
this.count++;
this._y--;
if (this.count > 30) {
this.removeMovieClip();
}
};
if (glbvar_gameSound) {
sfx_gameBonus.start();
}
if (glbvar_gameSound) {
sfx_powerupIcecubeBreak.start();
}
function_createParticleEffect(_root, glbvar_gameFramerate, true, false, "mc_ninjaSmoke", lvl_ninja - 1, 1, 500, 1, 270, 360, "mc_particleSmoke2", _root.mc_ninja._x, _root.mc_ninja._y, false, 100, 0, 80, 160, 1, 2, 0.3, 270);
_root.mc_birdContainer.mc_powerup.removeMovieClip();
}
function function_powerupExplosivo() {
array_powerupExplosivoBird = new Array();
array_powerupExplosivoBirdNumber = new Array();
var _local2 = 0;
while (_local2 < glbvar_birdTotal) {
var _local3 = "mc_bird" + _local2;
if (_root.mc_birdContainer[_local3] != undefined) {
array_powerupExplosivoBird.push(_local3);
array_powerupExplosivoBirdNumber.push(_local2);
}
_local2++;
}
_root.mc_birdContainer.mc_powerup.count = 0;
_root.mc_birdContainer.mc_powerup.maxCount = 2;
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
_root.mc_birdContainer.mc_powerup.count++;
if (_root.mc_birdContainer.mc_powerup.count == _root.mc_birdContainer.mc_powerup.maxCount) {
_root.mc_birdContainer.mc_powerup.count = 0;
var _local2 = Math.floor(Math.random() * array_powerupExplosivoBird.length);
var _local4 = array_powerupExplosivoBird.splice(_local2, 1);
var _local3 = parseInt(array_powerupExplosivoBirdNumber.splice(_local2, 1));
function_killBird(_local4, _local3, true);
}
if (array_powerupExplosivoBird.length == 0) {
_root.mc_birdContainer.mc_powerup.removeMovieClip();
}
};
}
function function_powerupSpeed() {
_root.mc_birdContainer.mc_powerup.count = 0;
_root.mc_birdContainer.mc_powerup.maxCount = glbvar_gameFramerate * 10;
glbvar_powerupSpeed = true;
glbvar_throwingSpadeSpeed = glbvar_throwingSpadeSpeed * 1.5;
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
_root.mc_birdContainer.mc_powerup.count++;
if (_root.mc_birdContainer.mc_powerup.count > _root.mc_birdContainer.mc_powerup.maxCount) {
function_endPowerupSpeed();
}
};
}
function function_endPowerupSpeed() {
glbvar_powerupSpeed = false;
glbvar_throwingSpadeSpeed = glbvar_throwingSpadeSpeed / 1.5;
_root.mc_birdContainer.mc_powerup.removeMovieClip();
}
function function_powerupStopwatch() {
_root.mc_birdContainer.mc_powerup.count = 0;
_root.mc_birdContainer.mc_powerup.maxCount = glbvar_gameFramerate * 5;
_root.mc_birdContainer.mc_powerup.stopwatchCount = 0;
glbvar_powerupStopwatch = true;
var_powerupStopwatchBirdContainerFunction = _root.mc_birdContainer.onEnterFrame;
_root.mc_birdContainer.onEnterFrame = undefined;
music_gameMusic.setVolume(0);
var _local5 = 0;
array_powerupStopwatchBirdFunctions = new Array();
var _local2 = 0;
while (_local2 < glbvar_birdTotal) {
var _local3 = "mc_bird" + _local2;
if (_root.mc_birdContainer[_local3] != undefined) {
array_powerupStopwatchBirdFunctions[_local2] = _root.mc_birdContainer[_local3].onEnterFrame;
_root.mc_birdContainer[_local3].onEnterFrame = undefined;
_root.mc_birdContainer[_local3].stop();
var _local4 = "mc_icecube" + _local2;
_root.mc_birdContainer.attachMovie("mc_icecube", _local4, lvl_powerupEffect + _local2);
_root.mc_birdContainer[_local4]._x = _root.mc_birdContainer[_local3]._x;
_root.mc_birdContainer[_local4]._y = _root.mc_birdContainer[_local3]._y;
function_createParticleEffect(_root, glbvar_gameFramerate, true, false, "mc_icecubeParticleEffect" + _local2, lvl_powerup + _local2, 1, 300, 1, 270, 360, "mc_particleSmokeIce", _root.mc_birdContainer[_local4]._x, _root.mc_birdContainer[_local4]._y, false, 100, 0, 30, 60, 2, 4, 0.3, 270);
if (_local5 < 1) {
_local5++;
if (glbvar_gameSound) {
sfx_powerupIcecube.start();
}
}
}
_local2++;
}
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
_root.mc_birdContainer.mc_powerup.count++;
if (Math.floor(_root.mc_birdContainer.mc_powerup.count / glbvar_gameFramerate) == _root.mc_birdContainer.mc_powerup.stopwatchCount) {
_root.mc_birdContainer.mc_powerup.stopwatchCount++;
if (glbvar_gameSound) {
sfx_powerupStopwatch.start();
}
}
if (_root.mc_birdContainer.mc_powerup.count > _root.mc_birdContainer.mc_powerup.maxCount) {
function_endPowerupStopwatch();
}
};
}
function function_endPowerupStopwatch() {
_root.mc_birdContainer.onEnterFrame = var_powerupStopwatchBirdContainerFunction;
var _local5 = 0;
var _local2 = 0;
while (_local2 < glbvar_birdTotal) {
var _local3 = "mc_bird" + _local2;
if (_root.mc_birdContainer[_local3] != undefined) {
if ((_root.mc_birdContainer[_local3]._currentframe >= 10) && (_root.mc_birdContainer[_local3]._currentframe < glbvar_birdBuggedFrame)) {
_root.mc_birdContainer[_local3].play();
}
if (_root.mc_birdContainer[_local3]._currentframe < glbvar_birdBuggedFrame) {
_root.mc_birdContainer[_local3].onEnterFrame = array_powerupStopwatchBirdFunctions[_local2];
}
var _local4 = "mc_icecube" + _local2;
function_killIcecube(_local4, _local2);
if (_local5 < 1) {
_local5++;
if (glbvar_gameSound) {
sfx_powerupIcecubeBreak.start();
}
}
}
_local2++;
}
music_gameMusic.setVolume(100);
glbvar_powerupStopwatch = false;
_root.mc_birdContainer.mc_powerup.removeMovieClip();
}
function function_killIcecube(var_icecubeMC, var_icecubeNumber) {
function_createParticleEffect(_root, glbvar_gameFramerate, true, false, "mc_icecubeParticleEffect" + var_icecubeNumber, lvl_powerup + var_icecubeNumber, 1, 300, 1, 270, 360, "mc_particleSmokeIce", _root.mc_birdContainer[var_icecubeMC]._x, _root.mc_birdContainer[var_icecubeMC]._y, false, 100, 0, 30, 60, 2, 4, 0.3, 270);
_root.mc_birdContainer[var_icecubeMC].removeMovieClip();
}
function function_removePowerup() {
if (_root.mc_birdContainer.mc_powerup != undefined) {
switch (_root.mc_birdContainer.mc_powerup.powerupName) {
case "mc_powerupSpeed" :
function_endPowerupSpeed();
break;
case "mc_powerupStopwatch" :
function_endPowerupStopwatch();
}
_root.mc_birdContainer.mc_powerup.removeMovieClip();
}
}
function function_callMenu(thisMenu, previousMenu) {
_root.mc_menu.gotoAndStop(thisMenu);
switch (thisMenu) {
case "title" :
glbvar_gameRunning = false;
glbvar_gameScore = 0;
_root.mc_menu.btn_play.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_play.onRelease = function () {
function_buttonRelease();
button_instructions(thisMenu);
};
_root.mc_menu.btn_options.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_options.onRelease = function () {
function_buttonRelease();
button_options(thisMenu);
};
_root.mc_menu.btn_hiscores.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_hiscores.onRelease = function () {
function_buttonRelease();
button_hiscores(thisMenu);
};
break;
case "instructions" :
_root.mc_menu.btn_next.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_next.onRelease = function () {
function_buttonRelease();
button_next(thisMenu);
};
break;
case "instructions2" :
_root.mc_menu.btn_start.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_start.onRelease = function () {
function_buttonRelease();
button_start(previousMenu, thisMenu);
};
break;
case "options" :
if (glbvar_gameMusic) {
_root.mc_menu.mc_musictoggle.gotoAndStop("on");
} else {
_root.mc_menu.mc_musictoggle.gotoAndStop("off");
}
if (glbvar_gameSound) {
_root.mc_menu.mc_soundtoggle.gotoAndStop("on");
} else {
_root.mc_menu.mc_soundtoggle.gotoAndStop("off");
}
_root.mc_menu.mc_musictoggle.btn_music.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.mc_musictoggle.btn_music.onRelease = function () {
function_buttonRelease();
button_music();
};
_root.mc_menu.mc_soundtoggle.btn_sound.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.mc_soundtoggle.btn_sound.onRelease = function () {
function_buttonRelease();
button_sound();
};
_root.mc_menu.btn_back.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_back.onRelease = function () {
function_buttonRelease();
button_back(previousMenu, thisMenu);
};
break;
case "name" :
_root.mc_menu.btn_submit.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_submit.onRelease = function () {
function_buttonRelease();
button_submitName();
};
break;
case "hiscores" :
function_listHiScores("VIEW");
_root.mc_menu.btn_back.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_back.onRelease = function () {
function_buttonRelease();
button_back(previousMenu, thisMenu);
};
break;
case "game" :
_root.mc_scorebar.btn_menu.onRollOver = function () {
function_buttonRollover();
};
_root.mc_scorebar.btn_menu.onRelease = function () {
function_buttonRelease();
button_menu(thisMenu);
};
break;
case "gamemenu" :
_root.mc_menu.btn_resume.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_resume.onRelease = function () {
function_buttonRelease();
button_resume(thisMenu);
};
_root.mc_menu.btn_instructions.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_instructions.onRelease = function () {
function_buttonRelease();
button_instructions(thisMenu);
};
_root.mc_menu.btn_options.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_options.onRelease = function () {
function_buttonRelease();
button_options(thisMenu);
};
_root.mc_menu.btn_quit.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_quit.onRelease = function () {
function_buttonRelease();
button_quit(thisMenu);
};
}
}
function function_buttonRollover() {
if (glbvar_gameSound) {
sfx_buttonRollover.start();
}
}
function function_buttonRelease() {
if (glbvar_gameSound) {
sfx_buttonRelease.start();
}
}
function button_instructions(thisMenu) {
function_callMenu("instructions", thisMenu);
}
function button_options(thisMenu) {
function_callMenu("options", thisMenu);
}
function button_hiscores(thisMenu) {
function_callMenu("hiscores", thisMenu);
}
function button_next(thisMenu) {
function_callMenu("instructions2", thisMenu);
}
function button_start(thisMenu) {
if (glbvar_gameRunning) {
function_callMenu("gamemenu", thisMenu);
} else {
_root.mc_menu.removeMovieClip();
_root.attachMovie("mc_scorebar", "mc_scorebar", lvl_scorebar);
function_callMenu("game", thisMenu);
glbvar_gameRunning = true;
function_startGame();
}
}
function button_music() {
if (glbvar_gameMusic) {
_root.glbvar_gameMusic = false;
_root.mc_menu.mc_musictoggle.gotoAndStop("off");
_root.music_gameMusic.stop("music_gameMusic.wav");
} else {
_root.glbvar_gameMusic = true;
_root.mc_menu.mc_musictoggle.gotoAndStop("on");
_root.music_gameMusic.start(0, 99999);
}
_root.mc_menu.mc_musictoggle.btn_music.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.mc_musictoggle.btn_music.onRelease = function () {
function_buttonRelease();
button_music();
};
}
function button_sound() {
if (glbvar_gameSound) {
_root.glbvar_gameSound = false;
_root.mc_menu.mc_soundtoggle.gotoAndStop("off");
} else {
_root.glbvar_gameSound = true;
_root.mc_menu.mc_soundtoggle.gotoAndStop("on");
}
_root.mc_menu.mc_soundtoggle.btn_sound.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.mc_soundtoggle.btn_sound.onRelease = function () {
function_buttonRelease();
button_sound();
};
}
function button_resume() {
function_unpauseGame();
_root.mc_menu.removeMovieClip();
_root.attachMovie("mc_scorebar", "mc_scorebar", lvl_scorebar);
function_callMenu("game", thisMenu);
}
function button_quit(thisMenu) {
_root.mc_birdContainer.removeMovieClip();
function_callMenu("title", thisMenu);
}
function button_menu(thisMenu) {
function_pauseGame();
_root.mc_scorebar.removeMovieClip();
_root.attachMovie("mc_menu", "mc_menu", lvl_menu);
function_callMenu("gamemenu", thisMenu);
}
function button_back(callMenu, thisMenu) {
if (_root.mc_menu.mc_hiScores != undefined) {
_root.mc_menu.mc_hiScores.removeMovieClip();
}
function_callMenu(callMenu, thisMenu);
}
function button_mainmenu() {
function_pauseGame();
_root.attachMovie("mc_menu", "mc_menu", lvl_menu);
function_callMenu("title", "title");
_root.mc_gameOver.removeMovieClip();
}
function function_pauseGame() {
var_throwingSpadeFunction = _root.mc_throwingSpade.onEnterFrame;
_root.mc_throwingSpade.onEnterFrame = undefined;
var_ninjaFunction = _root.mc_ninja.onMouseUp;
_root.mc_ninja.onMouseUp = undefined;
var_powerupFunction = _root.mc_birdContainer.mc_powerup.onEnterFrame;
_root.mc_birdContainer.mc_powerup.onEnterFrame = undefined;
var_birdContainerFunction = _root.mc_birdContainer.onEnterFrame;
_root.mc_birdContainer.onEnterFrame = undefined;
array_birdFunction = new Array();
var _local2 = 0;
while (_local2 < glbvar_birdTotal) {
var _local3 = "mc_bird" + _local2;
_root.mc_birdContainer[_local3].stop();
array_birdFunction[_local2] = _root.mc_birdContainer[_local3].onEnterFrame;
_root.mc_birdContainer[_local3].onEnterFrame = undefined;
_local2++;
}
}
function function_unpauseGame() {
_root.mc_throwingSpade.onEnterFrame = var_throwingSpadeFunction;
_root.mc_ninja.onMouseUp = var_ninjaFunction;
_root.mc_birdContainer.mc_powerup.onEnterFrame = var_powerupFunction;
_root.mc_birdContainer.onEnterFrame = var_birdContainerFunction;
var _local2 = 0;
while (_local2 < glbvar_birdTotal) {
var _local3 = "mc_bird" + _local2;
if (((_root.mc_birdContainer[_local3]._currentframe >= 10) && (_root.mc_birdContainer[_local3]._currentframe < glbvar_birdBuggedFrame)) && (glbvar_powerupStopwatch == false)) {
_root.mc_birdContainer[_local3].play();
}
_root.mc_birdContainer[_local3].onEnterFrame = array_birdFunction[_local2];
_local2++;
}
}
function playAgain() {
unloadMovieNum (2);
unloadMovieNum (1);
_root.attachMovie("mc_menu", "mc_menu", lvl_menu);
function_callMenu("title", "title");
}
function button_hiscores(thisMenu) {
_root.attachMovie("mc_menubackground", "mc_menu", lvl_menu);
swHighScoreObject.player1Score = glbvar_gameScore;
swHighScoreObject.showTab = "view";
loadMovieNum (_root.HSHubURL, 2);
}
function button_submitScore() {
function_pauseGame();
_root.mc_gameOver.removeMovieClip();
swHighScoreObject.player1Score = glbvar_gameScore;
swHighScoreObject.showTab = "submit";
loadMovieNum (_root.HSHubURL, 2);
}
stop();
glbvar_gameMusic = true;
glbvar_gameSound = true;
lvl_music = 2000;
lvl_hiScores = 1900;
lvl_menu = 1800;
lvl_gameOver = 1700;
lvl_scorebar = 1600;
lvl_points = 1500;
lvl_pointsSeed = 1400;
lvl_birdContainer = 1300;
lvl_bird = 1200;
lvl_birdFeathers = 1100;
lvl_throwingSpade = 1000;
lvl_powerupEffect = 900;
lvl_powerup = 800;
lvl_bird = 700;
lvl_birdFeathers = 600;
lvl_birdContainer = 500;
lvl_powerupParticleEffect = 400;
lvl_sign = 300;
lvl_gopher = 200;
lvl_ninja = 100;
var glbvar_stageWidth = 640;
var glbvar_stageHeight = 400;
var glbvar_gameFramerate = 30;
var glbvar_gameMaxRounds = 10;
var glbvar_gameScore;
var glbvar_gameSeeds;
var glbvar_gameRound;
var glbvar_gameRunning;
var glbvar_throwingSpadeSpeed;
var glbvar_powerupCheck;
var glbvar_powerupSpeed;
var glbvar_powerupStopwatch;
var glbvar_seedBonusPoints = 1000;
var glbvar_maxBirdsBase = 10;
var glbvar_ninjaWidth = 70;
var glbvar_ninjaHeight = 82;
var glbvar_ninjaX = 320;
var glbvar_ninjaY = 319;
var glbvar_birdWidth = 36;
var glbvar_birdHeight = 34;
var glbvar_birdSpace = 10;
var glbvar_birdSpeed = 5;
var glbvar_birdPerchX = (85 + (glbvar_birdWidth / 2));
var glbvar_birdPerchY = (118 - (glbvar_birdHeight / 2));
var glbvar_birdDiveY = (365 - (glbvar_birdHeight / 2));
var glbvar_birdExitY = (230 - (glbvar_birdHeight / 2));
var glbvar_birdTotal = 10;
var glbvar_birdLoopFrame = 29;
var glbvar_birdLoopFrameSide = 49;
var glbvar_birdFlapFrame = 24;
var glbvar_birdFlapFrameSide = 44;
var glbvar_birdBuggedFrame = 50;
var glbvar_powerupDelayCount = (glbvar_gameFramerate * 7);
var glbvar_powerupDurationCount = (glbvar_gameFramerate * 5);
var glbvar_powerupChance = 0.15;
var glbvar_powerupBonusPoints = 1000;
var array_bird = new Array("mc_birdBlue", "mc_birdGreen", "mc_birdYellow", "mc_birdRed", "mc_birdPurple");
var array_birdTimer = new Array(120, 90, 60, 30, 120);
var array_birdPoints = new Array(50, 100, 250, 500, 50);
var array_birdPickRangeMin = new Array(0, 0, 0, 0, 0, 0, 0, 1, 2, 3);
var array_birdPickRangeMax = new Array(0, 1, 1, 2, 2, 3, 3, 3, 3, 3);
var array_waveMax = new Array(3, 3, 4, 4, 5, 5, 5, 5, 5, 5);
var array_releaseCount = new Array(70, 70, 90, 90, 120, 120, 120, 120, 120, 120);
var array_birdDiveX = new Array(130, 196, 196, 254, 254, 388, 388, 450, 450, 510);
var array_powerup = new Array("mc_powerupBonus", "mc_powerupExplosivo", "mc_powerupSpeed", "mc_powerupStopwatch");
var array_birdSlots = new Array();
var array_birdPositionsX = new Array();
var var_loopCount = 0;
while (var_loopCount < glbvar_birdTotal) {
array_birdPositionsX[var_loopCount] = glbvar_birdPerchX + (var_loopCount * (glbvar_birdWidth + glbvar_birdSpace));
var_loopCount++;
}
var glbvar_powerupArrayLength = array_powerup.length;
sfx_birdChirp = new Sound();
sfx_birdChirp.attachSound("sfx_birdChirp.wav");
sfx_birdHit = new Sound();
sfx_birdHit.attachSound("sfx_birdHit.wav");
sfx_birdFly = new Sound();
sfx_birdFly.attachSound("sfx_birdFly.wav");
sfx_gopherUp = new Sound();
sfx_gopherUp.attachSound("sfx_gopherUp.wav");
sfx_gopherDown = new Sound();
sfx_gopherDown.attachSound("sfx_gopherDown.wav");
sfx_radishUp = new Sound();
sfx_radishUp.attachSound("sfx_radishUp.wav");
sfx_signRip = new Sound();
sfx_signRip.attachSound("sfx_signRip.wav");
sfx_spadeGrab = new Sound();
sfx_spadeGrab.attachSound("sfx_spadeGrab.wav");
sfx_spadeThrow = new Sound();
sfx_spadeThrow.attachSound("sfx_spadeThrow.wav");
sfx_powerupIcecube = new Sound();
sfx_powerupIcecube.attachSound("sfx_powerupIcecube.wav");
sfx_powerupIcecubeBreak = new Sound();
sfx_powerupIcecubeBreak.attachSound("sfx_powerupIcecubeBreak.wav");
sfx_powerupSpeed = new Sound();
sfx_powerupSpeed.attachSound("sfx_powerupSpeed.wav");
sfx_powerupStopwatch = new Sound();
sfx_powerupStopwatch.attachSound("sfx_powerupStopwatch.wav");
sfx_gamePoints = new Sound();
sfx_gamePoints.attachSound("sfx_gamePoints.wav");
sfx_gameBonus = new Sound();
sfx_gameBonus.attachSound("sfx_gameBonus.wav");
sfx_gameSeed = new Sound();
sfx_gameSeed.attachSound("sfx_gameSeed.wav");
sfx_buttonRollover = new Sound();
sfx_buttonRollover.attachSound("sfx_buttonRollover.wav");
sfx_buttonRelease = new Sound();
sfx_buttonRelease.attachSound("sfx_buttonRelease.wav");
createEmptyMovieClip("mc_music", lvl_music);
music_gameMusic = new Sound("mc_music");
music_gameMusic.attachSound("music_gameMusic.wav");
System.security.allowDomain("newgrounds.com", "master-fury.com", "www.armorgames.com", "ugoplayer.com");
function_createParticleEffect = function (movieClip, framerate, selfDestruct, burst, emitterName, emitterLevel, emitterFrequency, decay, numberParticles, emitterDirection, emitterAngle, particleMC, particleX, particleY, lockXY, startAlpha, endAlpha, startSize, endSize, minVelocity, maxVelocity, acceleration, accelerationDirection) {
movieClip.createEmptyMovieClip(emitterName, emitterLevel);
movieClip[emitterName]._x = movieClip._x;
movieClip[emitterName]._y = movieClip._y;
movieClip[emitterName].countParticles = 0;
movieClip[emitterName].emitterDirection = emitterDirection;
movieClip[emitterName].emitCount = 0;
var lifetime = Math.floor((decay / 1000) * framerate);
var frameFrequency = Math.floor(1000 / framerate);
var stepVelocity = (maxVelocity - minVelocity);
var stepAlpha = ((endAlpha - startAlpha) / lifetime);
var stepSize = ((endSize - startSize) / lifetime);
var totalParticles = Math.floor(numberParticles * lifetime);
if (selfDestruct && (burst)) {
var totalParticles = numberParticles;
}
movieClip[emitterName].onEnterFrame = function () {
this.emitCount = this.emitCount + frameFrequency;
if (this.emitCount >= emitterFrequency) {
this.emitCount = 0;
this.particleCycle = 0;
do {
this.particleVelocity = (Math.random() * stepVelocity) + minVelocity;
this.particleDirection = (Math.random() * emitterAngle) + (this.emitterDirection - (emitterAngle / 2));
if (this.countParticles > totalParticles) {
this.countParticles = 0;
}
this.countParticles++;
var _local2 = "particle" + this.countParticles;
this.attachMovie(particleMC, _local2, this.countParticles);
this[_local2].particleDirectionX = this.particleVelocity * Math.cos(0.01745329 * this.particleDirection);
this[_local2].particleDirectionY = this.particleVelocity * Math.sin(0.01745329 * this.particleDirection);
this[_local2].particleAccelerationX = acceleration * Math.cos(0.01745329 * accelerationDirection);
this[_local2].particleAccelerationY = acceleration * Math.sin(0.01745329 * accelerationDirection);
this[_local2].particleLife = 0;
if (typeof(particleX) == "number") {
this[_local2].particleX = (this[_local2]._x = particleX);
} else {
this[_local2].particleX = (this[_local2]._x = particleX._x);
}
if (typeof(particleY) == "number") {
this[_local2].particleY = (this[_local2]._y = particleY);
} else {
this[_local2].particleY = (this[_local2]._y = particleY._y);
}
this[_local2].particleAlpha = (this[_local2]._alpha = startAlpha);
this[_local2].particleSize = (this[_local2]._width = (this[_local2]._height = startSize));
this[_local2].onEnterFrame = function () {
if (lockXY) {
this._x = particleX._x;
this._y = particleY._y;
} else {
this.particleX = this.particleX + (this.particleDirectionX + (this.particleAccelerationX * this.particleLife));
this.particleY = this.particleY + (this.particleDirectionY + (this.particleAccelerationY * this.particleLife));
this._x = this.particleX;
this._y = this.particleY;
}
this.particleLife++;
this.particleAlpha = this.particleAlpha + stepAlpha;
this.particleSize = this.particleSize + stepSize;
this._alpha = this.particleAlpha;
this._width = (this._height = this.particleSize);
if (this.particleLife > lifetime) {
if (this.emitterDestruct) {
movieClip[emitterName].removeMovieClip();
}
this.removeMovieClip();
}
};
if (selfDestruct) {
if (this.countParticles == totalParticles) {
this[_local2].emitterDestruct = true;
delete movieClip[emitterName].onEnterFrame;
}
}
this.particleCycle++;
} while (this.particleCycle < numberParticles);
}
};
};
if (glbvar_gameMusic) {
_root.music_gameMusic.start(0, 99999);
}
_root.attachMovie("mc_menu", "mc_menu", lvl_menu);
function_callMenu("title", "none");
Symbol 43 MovieClip Frame 22
stop();
Symbol 45 MovieClip [colk] Frame 3
stop();
Symbol 55 MovieClip Frame 160
stop();
Symbol 66 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 70 MovieClip Frame 26
_parent.gotoAndStop(1);
Symbol 71 MovieClip Frame 93
_root.play();
Symbol 86 MovieClip Frame 25
stop();
Symbol 97 Button
on (release) {
getURL ("http://www.armorbot.com/mytable/?id=706", "_blank");
}
Symbol 102 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 110 MovieClip Frame 20
stop();
Symbol 168 MovieClip [mc_menu] Frame 1
stop();
Symbol 168 MovieClip [mc_menu] Frame 10
stop();
Symbol 168 MovieClip [mc_menu] Frame 20
stop();
Symbol 168 MovieClip [mc_menu] Frame 30
stop();
Symbol 168 MovieClip [mc_menu] Frame 40
stop();
Symbol 168 MovieClip [mc_menu] Frame 50
stop();
Symbol 168 MovieClip [mc_menu] Frame 60
stop();
Symbol 168 MovieClip [mc_menu] Frame 70
stop();
Symbol 169 Button
on (release) {
ab20_09 = new LoadVars();
ab20_09.z = _root.myname;
ab20_09.x = _root.glbvar_gameScore;
ab20_09.c = 706;
ab20_09.v = "MPDCZP";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=706", "_blank");
_root.gotoAndPlay(1);
}
Symbol 178 MovieClip [mc_gameOver] Frame 9
stop();
Symbol 203 MovieClip [mc_birdYellow] Frame 9
stop();
Symbol 203 MovieClip [mc_birdYellow] Frame 59
stop();
Symbol 203 MovieClip [mc_birdYellow] Frame 60
_root.glbvar_gameSeeds = _root.glbvar_gameSeeds + 1;
Symbol 203 MovieClip [mc_birdYellow] Frame 70
stop();
Symbol 214 MovieClip [mc_birdBlue] Frame 9
stop();
Symbol 214 MovieClip [mc_birdBlue] Frame 59
stop();
Symbol 214 MovieClip [mc_birdBlue] Frame 60
_root.glbvar_gameSeeds = _root.glbvar_gameSeeds + 1;
Symbol 214 MovieClip [mc_birdBlue] Frame 70
stop();
Symbol 217 MovieClip [mc_birdRed] Frame 9
stop();
Symbol 217 MovieClip [mc_birdRed] Frame 59
stop();
Symbol 217 MovieClip [mc_birdRed] Frame 60
_root.glbvar_gameSeeds = _root.glbvar_gameSeeds + 1;
Symbol 217 MovieClip [mc_birdRed] Frame 70
stop();
Symbol 224 MovieClip [mc_gopher] Frame 19
stop();
Symbol 224 MovieClip [mc_gopher] Frame 27
stop();
Symbol 231 MovieClip Frame 1
mm = Math.random() * 10;
if ((mm >= 0) && (mm < 2)) {
gotoAndStop (2);
}
if ((mm >= 2) && (mm < 4)) {
gotoAndStop (3);
}
if ((mm >= 4) && (mm < 6)) {
gotoAndStop (4);
}
if ((mm >= 6) && (mm < 8)) {
gotoAndStop (5);
}
if ((mm >= 8) && (mm <= 10)) {
gotoAndStop (6);
}
Symbol 231 MovieClip Frame 2
stop();
Symbol 231 MovieClip Frame 3
stop();
Symbol 231 MovieClip Frame 4
stop();
Symbol 231 MovieClip Frame 5
stop();
Symbol 231 MovieClip Frame 6
stop();
Symbol 246 MovieClip [mc_ninja] Frame 9
stop();
Symbol 246 MovieClip [mc_ninja] Frame 30
stop();
Symbol 246 MovieClip [mc_ninja] Frame 39
gotoAndPlay ("stop");
Symbol 249 MovieClip [mc_birdGreen] Frame 9
stop();
Symbol 249 MovieClip [mc_birdGreen] Frame 59
stop();
Symbol 249 MovieClip [mc_birdGreen] Frame 60
_root.glbvar_gameSeeds = _root.glbvar_gameSeeds + 1;
Symbol 249 MovieClip [mc_birdGreen] Frame 70
stop();
Symbol 250 MovieClip [mc_throwingSpade] Frame 10
gotoAndPlay (1);
Symbol 256 MovieClip [mc_gameWon] Frame 9
stop();
Symbol 256 MovieClip [mc_gameWon] Frame 19
stop();
Symbol 256 MovieClip [mc_gameWon] Frame 29
stop();
Symbol 256 MovieClip [mc_gameWon] Frame 39
stop();
Symbol 257 MovieClip [mc_birdPurple] Frame 9
stop();
Symbol 257 MovieClip [mc_birdPurple] Frame 59
stop();
Symbol 257 MovieClip [mc_birdPurple] Frame 60
_root.glbvar_gameSeeds = _root.glbvar_gameSeeds + 1;
Symbol 257 MovieClip [mc_birdPurple] Frame 70
stop();