Frame 1
function fnc_checkDomain() {
var _local3 = new LocalConnection();
var _local2 = _local3.domain().toString();
if ((_local2.indexOf("ungrounded.net") == -1) && (_local2.indexOf("localhost") == -1)) {
_root.gotoAndPlay("splash");
} else {
_root.gotoAndPlay("splash");
}
}
stop();
MochiAd.showPreloaderAd({id:"b476bfaede6d680f", res:"640x400"});
Frame 10
stop();
_root.onEnterFrame = function () {
if (_root.mc_splash._currentframe == _root.mc_splash._totalframes) {
gotoAndStop ("game");
_root.onEnterFrame = undefined;
}
};
Frame 30
function function_startGame() {
glbvar_gameScore = 0;
glbvar_gameSeeds = 20;
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 + " Seeds Remaining";
glbvar_bonusText = ("x " + glbvar_seedBonusPoints) + " Bonus";
glbvar_totalText = glbvar_seedBonus + " Seed 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 _local3 = "mc_bird" + _local2;
if (_root.mc_throwingSpade.mc_hitBox.hitTest(_root.mc_birdContainer[_local3].mc_hitBox)) {
function_killBird(_local3, _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 _local4 = "mc_particleSmoke2";
break;
case "mc_powerupExplosivo" :
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
function_powerupExplosivo();
};
_local4 = "mc_particleSmoke3";
break;
case "mc_powerupSpeed" :
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
function_powerupSpeed();
};
_local4 = "mc_particleSmoke1";
break;
case "mc_powerupStopwatch" :
_root.mc_birdContainer.mc_powerup.onEnterFrame = function () {
function_powerupStopwatch();
};
_local4 = "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, _local4, _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 _local5 = 0;
while (_local5 < 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 _local2 = 4;
} else {
var _local2 = Math.floor(Math.random() * ((array_birdPickRangeMax[glbvar_gameRound - 1] - array_birdPickRangeMin[glbvar_gameRound - 1]) + 1)) + array_birdPickRangeMin[glbvar_gameRound - 1];
}
var _local4 = array_bird[_local2];
var var_birdMC = ("mc_bird" + var_birdPositionPick);
array_birdSlots[var_birdPositionPick] = true;
_root.mc_birdContainer.attachMovie(_local4, var_birdMC, lvl_bird + var_birdPositionPick);
if (Math.random() > 0.5) {
var _local3 = 1;
} else {
var _local3 = -1;
}
_root.mc_birdContainer[var_birdMC]._x = array_birdPositionsX[var_birdPositionPick] + (_local3 * (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 _local3 = _local3 * -1;
_root.mc_birdContainer[var_birdMC].speedX = (glbvar_birdSpeed * _local3) * 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[_local2];
_root.mc_birdContainer[var_birdMC].count = 0;
_root.mc_birdContainer[var_birdMC].points = array_birdPoints[_local2];
_root.mc_birdContainer[var_birdMC].particleName = "mc_particleFeather" + _local2;
_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;
}
_local5++;
}
}
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 _local7 = "mc_icecube" + var_birdNumber;
function_killIcecube(_local7, 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 _local4 = "mc_bird" + _local2;
if (_root.mc_birdContainer[_local4] != undefined) {
array_powerupExplosivoBird.push(_local4);
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 _local3 = array_powerupExplosivoBird.splice(_local2, 1);
var _local4 = parseInt(array_powerupExplosivoBirdNumber.splice(_local2, 1));
function_killBird(_local3, _local4, 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 _local3 = 0;
while (_local3 < glbvar_birdTotal) {
var _local2 = "mc_bird" + _local3;
if (_root.mc_birdContainer[_local2] != undefined) {
if ((_root.mc_birdContainer[_local2]._currentframe >= 10) && (_root.mc_birdContainer[_local2]._currentframe < glbvar_birdBuggedFrame)) {
_root.mc_birdContainer[_local2].play();
}
if (_root.mc_birdContainer[_local2]._currentframe < glbvar_birdBuggedFrame) {
_root.mc_birdContainer[_local2].onEnterFrame = array_powerupStopwatchBirdFunctions[_local3];
}
var _local4 = "mc_icecube" + _local3;
function_killIcecube(_local4, _local3);
if (_local5 < 1) {
_local5++;
if (glbvar_gameSound) {
sfx_powerupIcecubeBreak.start();
}
}
}
_local3++;
}
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(false);
_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();
}
if (_root.mc_menu.mc_preloader != undefined) {
_root.mc_menu.mc_preloader.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 _local3 = 0;
while (_local3 < glbvar_birdTotal) {
var _local2 = "mc_bird" + _local3;
_root.mc_birdContainer[_local2].stop();
array_birdFunction[_local3] = _root.mc_birdContainer[_local2].onEnterFrame;
_root.mc_birdContainer[_local2].onEnterFrame = undefined;
_local3++;
}
}
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 _local3 = 0;
while (_local3 < glbvar_birdTotal) {
var _local2 = "mc_bird" + _local3;
if (((_root.mc_birdContainer[_local2]._currentframe >= 10) && (_root.mc_birdContainer[_local2]._currentframe < glbvar_birdBuggedFrame)) && (glbvar_powerupStopwatch == false)) {
_root.mc_birdContainer[_local2].play();
}
_root.mc_birdContainer[_local2].onEnterFrame = array_birdFunction[_local3];
_local3++;
}
}
function button_submitScore() {
function_pauseGame();
_root.mc_gameOver.removeMovieClip();
_root.attachMovie("mc_menu", "mc_menu", lvl_menu);
function_callMenu("name", "title");
_root.mc_menu.txt_error.text = "";
_root.mc_menu.txt_name.text = "Type Here!";
_root.mc_menu.txt_name.restrict = "A-Z a-z";
_root.mc_menu.txt_name.onSetFocus = function () {
_root.mc_menu.txt_name.text = "";
};
}
function button_submitName() {
var _local4 = true;
var _local3 = new Array("shit", "damn", "fuck", "cunt", "bastard", "penis", "cock", "vagina", "breast", "boob", "masturbat", "wank");
if ((_root.mc_menu.txt_name.text == "") || (_root.mc_menu.txt_name.text == "Type Here!")) {
_root.mc_menu.txt_error.text = "Please type your name in the box below!";
_local4 = false;
}
var _local2 = 0;
while (_local2 < _local3.length) {
if (_root.mc_menu.txt_name.text.toLowerCase().indexOf(_local3[_local2]) != -1) {
_root.mc_menu.txt_error.text = "Please use a name that doesn't contain profanity!";
_local4 = false;
break;
}
_local2++;
}
if (_local4) {
_root.glbvar_playerName = _root.mc_menu.txt_name.text;
_root.mc_menu.gotoAndStop("hiscores");
function_listHiScores(true);
_root.mc_menu.btn_back.onRollOver = function () {
function_buttonRollover();
};
_root.mc_menu.btn_back.onRelease = function () {
function_buttonRelease();
button_back("title", "hiscores");
};
}
}
function function_commafy(n) {
var _local1 = parseInt(n, 10) + "";
var _local2 = [];
while (_local1.length > 3) {
_local2.unshift(_local1.slice(_local1.length - 3, _local1.length));
_local1 = _local1.slice(0, _local1.length - 3);
}
_local2.unshift(_local1);
return(_local2.join(","));
}
function function_convertDate(msec) {
var _local2 = new Date(msec);
var _local1 = _local2.getYear() - 100;
if (_local1 < 10) {
_local1 = "0" + _local1;
}
return([1 + _local2.getMonth(), _local2.getDate(), _local1].join("."));
}
function function_listHiScores(submit) {
glbvar_hiScoresFrame = _root.mc_menu._currentframe;
_root.mc_menu.attachMovie("mc_preloader", "mc_preloader", lvl_hiScore);
_root.mc_menu.mc_preloader._x = (glbvar_stageWidth / 2) - (_root.mc_menu.mc_preloader._width / 2);
_root.mc_menu.mc_preloader._y = (glbvar_stageHeight / 2) - (_root.mc_menu.mc_preloader._height / 2);
var _local2 = new function_hiScoresObject();
var _local3 = "b476bfaede6d680f";
if (submit) {
var _local5 = _root.glbvar_playerName;
var _local4 = _root.glbvar_gameScore;
MochiAd.sendHighScore({id:_local3, name:_local5, score:_local4}, _local2, "listHiScores");
} else {
MochiAd.fetchHighScores({id:_local3}, _local2, "listHiScores");
}
}
function function_fps() {
var _local1 = new TextFormat();
_local1.color = 16711680 /* 0xFF0000 */;
_local1.size = 18;
var _local2 = createEmptyMovieClip("mc_fps", 99999);
var txt = _local2.createTextField("txt_fps", 1, 10, 10, 60, 20);
txt.setTextFormat(_local1);
txt.backgroundColor = 16711935 /* 0xFF00FF */;
txt.background = true;
txt.selectable = false;
var frames = 0;
var prevTime = getTimer();
_local2.onEnterFrame = function () {
frames++;
var _local1 = Math.round(frames / ((getTimer() - prevTime) / 10000)) / 10;
txt.text = "FPS: " + _local1;
};
}
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");
var glbvar_hiScoreFrame;
var function_hiScoresObject = function () {
};
function_hiScoresObject.prototype.listHiScores = function (scores) {
if (_root.mc_menu._currentframe == glbvar_hiScoresFrame) {
_root.mc_menu.mc_preloader.removeMovieClip();
_root.mc_menu.createEmptyMovieClip("mc_hiScores", lvl_hiScores);
var _local22 = 90;
var _local27 = 22;
var _local18 = 2;
var _local24 = -122;
var _local25 = 132;
var _local26 = 232;
var _local23 = 303;
var _local8 = 240;
var _local7 = 21;
var _local19 = new TextFormat();
_local19.align = "right";
_local19.color = 5537792 /* 0x548000 */;
_local19.font = "HelveticaNeueLT Std Med";
_local19.size = 12;
_local19.bold = true;
var _local20 = new TextFormat();
_local20.align = "left";
_local20.color = 12554240 /* 0xBF9000 */;
_local20.font = "HelveticaNeueLT Std Med";
_local20.size = 14;
_local20.bold = true;
var _local21 = new TextFormat();
_local21.align = "right";
_local21.color = 5537792 /* 0x548000 */;
_local21.font = "HelveticaNeueLT Std Med";
_local21.size = 14;
_local21.bold = true;
var _local17 = new TextFormat();
_local17.align = "right";
_local17.color = 12554240 /* 0xBF9000 */;
_local17.font = "HelveticaNeueLT Std Med";
_local17.size = 12;
_local17.bold = true;
_local17.italic = true;
i = 0;
while (i < 10) {
var _local2 = "textRank" + i;
var _local4 = "textPlayer" + i;
var _local3 = "textScore" + i;
var _local5 = "textDate" + i;
var _local10 = i;
var _local13 = i + 10;
var _local11 = i + 20;
var _local12 = i + 30;
var _local6 = _local22 + (_local27 * i);
var _local16 = scores[i][0];
var _local9 = scores[i][1];
var _local14 = function_convertDate(scores[i][2]);
_root.mc_menu.mc_hiScores.createTextField(_local2, _local10, _local24, _local6 + _local18, _local8, _local7);
_root.mc_menu.mc_hiScores[_local2].text = (i + 1) + ".";
_root.mc_menu.mc_hiScores[_local2].setTextFormat(_local19);
_root.mc_menu.mc_hiScores[_local2].embedFonts = true;
_root.mc_menu.mc_hiScores[_local2].selectable = false;
_root.mc_menu.mc_hiScores.createTextField(_local4, _local13, _local25, _local6, _local8, _local7);
_root.mc_menu.mc_hiScores[_local4].text = _local16;
_root.mc_menu.mc_hiScores[_local4].setTextFormat(_local20);
_root.mc_menu.mc_hiScores[_local4].embedFonts = true;
_root.mc_menu.mc_hiScores[_local4].selectable = false;
_root.mc_menu.mc_hiScores.createTextField(_local3, _local11, _local26, _local6, _local8, _local7);
_root.mc_menu.mc_hiScores[_local3].text = _local9;
_root.mc_menu.mc_hiScores[_local3].setTextFormat(_local21);
_root.mc_menu.mc_hiScores[_local3].embedFonts = true;
_root.mc_menu.mc_hiScores[_local3].selectable = false;
_root.mc_menu.mc_hiScores.createTextField(_local5, _local12, _local23, _local6 + _local18, _local8, _local7);
_root.mc_menu.mc_hiScores[_local5].text = _local14;
_root.mc_menu.mc_hiScores[_local5].setTextFormat(_local17);
_root.mc_menu.mc_hiScores[_local5].embedFonts = true;
_root.mc_menu.mc_hiScores[_local5].selectable = false;
i++;
}
}
};
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((Math.PI/180) * this.particleDirection);
this[_local2].particleDirectionY = this.particleVelocity * Math.sin((Math.PI/180) * this.particleDirection);
this[_local2].particleAccelerationX = acceleration * Math.cos((Math.PI/180) * accelerationDirection);
this[_local2].particleAccelerationY = acceleration * Math.sin((Math.PI/180) * 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");
Frame 40
stop();
Frame 49
gotoAndStop ("violation");
Symbol 771 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
_root.fnc_checkDomain();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 80 MovieClip Frame 90
stop();
Symbol 192 MovieClip [mc_ninja] Frame 9
stop();
Symbol 192 MovieClip [mc_ninja] Frame 30
stop();
Symbol 192 MovieClip [mc_ninja] Frame 39
gotoAndPlay ("stop");
Symbol 197 MovieClip [mc_throwingSpade] Frame 10
gotoAndPlay (1);
Symbol 198 MovieClip Frame 51
mc_ninja.gotoAndStop("rest");
Symbol 198 MovieClip Frame 60
mc_ninja.gotoAndPlay("throw");
Symbol 198 MovieClip Frame 82
mc_ninja.gotoAndPlay("grab");
Symbol 228 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 10
stop();
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 10
stop();
Symbol 268 MovieClip [mc_menu] Frame 1
stop();
Symbol 268 MovieClip [mc_menu] Frame 10
stop();
Symbol 268 MovieClip [mc_menu] Frame 20
stop();
Symbol 268 MovieClip [mc_menu] Frame 30
stop();
Symbol 268 MovieClip [mc_menu] Frame 40
stop();
Symbol 268 MovieClip [mc_menu] Frame 50
stop();
Symbol 268 MovieClip [mc_menu] Frame 60
stop();
Symbol 268 MovieClip [mc_menu] Frame 70
stop();
Symbol 277 MovieClip [mc_gameOver] Frame 9
stop();
Symbol 369 MovieClip [mc_birdYellow] Frame 9
stop();
Symbol 369 MovieClip [mc_birdYellow] Frame 59
stop();
Symbol 369 MovieClip [mc_birdYellow] Frame 70
stop();
Symbol 452 MovieClip [mc_birdBlue] Frame 9
stop();
Symbol 452 MovieClip [mc_birdBlue] Frame 59
stop();
Symbol 452 MovieClip [mc_birdBlue] Frame 70
stop();
Symbol 531 MovieClip [mc_birdRed] Frame 9
stop();
Symbol 531 MovieClip [mc_birdRed] Frame 59
stop();
Symbol 531 MovieClip [mc_birdRed] Frame 70
stop();
Symbol 579 MovieClip [mc_gopher] Frame 19
stop();
Symbol 579 MovieClip [mc_gopher] Frame 27
stop();
Symbol 662 MovieClip [mc_birdGreen] Frame 9
stop();
Symbol 662 MovieClip [mc_birdGreen] Frame 59
stop();
Symbol 662 MovieClip [mc_birdGreen] Frame 70
stop();
Symbol 667 MovieClip [mc_sign] Frame 5
stop();
Symbol 674 MovieClip [mc_gameWon] Frame 9
stop();
Symbol 674 MovieClip [mc_gameWon] Frame 19
stop();
Symbol 674 MovieClip [mc_gameWon] Frame 29
stop();
Symbol 674 MovieClip [mc_gameWon] Frame 39
stop();
Symbol 757 MovieClip [mc_birdPurple] Frame 9
stop();
Symbol 757 MovieClip [mc_birdPurple] Frame 59
stop();
Symbol 757 MovieClip [mc_birdPurple] Frame 70
stop();
Symbol 769 MovieClip Frame 9
stop();
Symbol 769 MovieClip Frame 15
stop();