Frame 1
var countDownTime = 5;
var lastTime = getTimer();
splashButton._alpha = 0;
stop();
onEnterFrame = function () {
if ((countDownTime > 0) && (splashButton._alpha < 100)) {
splashButton._alpha = splashButton._alpha + 2;
}
if (getTimer() >= (lastTime + 1000)) {
lastTime = lastTime + 1000;
countDownTime--;
}
splashButton.onRelease = function () {
getURL ("http://www.playzi.com/default.aspx?lnkid=110342", "_blank");
};
if (countDownTime <= 0) {
splashButton._alpha = splashButton._alpha - 2;
if (splashButton._alpha < 0) {
splashButton._alpha = 0;
}
}
if ((countDownTime <= 0) && (splashButton._alpha == 0)) {
delete onEnterFrame;
gotoAndStop (2);
}
};
Frame 2
MochiAd.showPreGameAd({id:"004f4626eeb2b253", res:"750x450"});
Frame 3
gotoAndStop (4);
Frame 4
stop();
movieLoaded = this.getBytesLoaded();
movieTotal = this.getBytesTotal();
percentage = Math.floor((movieLoaded / movieTotal) * 100);
Frame.pauseScreen._visible = false;
Frame.bonusRound._visible = false;
onEnterFrame = function () {
movieLoaded = this.getBytesLoaded();
percentage = Math.floor((movieLoaded / movieTotal) * 100);
playziButton.onRelease = function () {
getURL ("http://www.playzi.com/default.aspx?lnkid=110342", "_blank");
};
if (loadScreen._currentFrame > percentage) {
loadScreen.stop();
}
if (loadScreen._currentFrame < percentage) {
loadScreen.play();
}
if ((percentage >= 100) && (loadScreen._currentFrame >= 100)) {
pauseTime = 0;
delete onEnterFrame;
gotoAndStop (7);
}
};
Frame 5
gotoAndPlay (8);
Frame 7
stop();
var bulletCount = 0;
var curBullet = 0;
var curLevel = 1;
var curSpeed = 2;
var curScore = 0;
var curtainClosed = true;
var shineTimer = 0;
var gameTimer = 0;
var clockCount = 1;
var enemyCount = 0;
var lastShot = false;
var curtainOpen = false;
var ScoreNeeded = 0;
var gameStarted = false;
var Progress = true;
var tikiHits = 0;
var spawnAmount = 1;
var finished = false;
var addedTikiScore = false;
var bonusLevel = 0;
var inBonusStage = false;
var bonusMoveSpeed = 3;
var bonusSpawnRate = 2;
var bonusSpawned = false;
var musicStop = false;
var pauseTime = 0;
var muteSounds = false;
var gameRan = false;
var gamePause = false;
var amountToContinue;
var playAgainDelay;
Frame.pauseScreen._visible = false;
Frame.bonusRound._visible = false;
levelComplete.neededAmount.text = 150;
levelComplete.neededAmount.selectable = false;
InterfaceBorder.ScoreText.selectable = false;
InterfaceBorder.LevelText.selectable = false;
InterfaceBorder.tikiCount._visible = false;
gameOver._visible = false;
InterfaceBorder.ScoreText.text = curScore;
InterfaceBorder.LevelText.text = curLevel;
gameOver.finalScoreText.text = curScore;
gameOver.finalLevelText.text = curLevel;
timer.clock.text = gameTimer;
instrucOne._visible = false;
instrucTwo._visible = false;
levelComplete._visible = false;
reloadButton._visible = false;
backgroundMusic = new Sound();
newLevel = new Sound();
gunShot = new Sound();
reload = new Sound();
lowTime = new Sound();
startGame = new Sound();
hitTarget = new Sound();
hitBullseye = new Sound();
hitAnti = new Sound();
hitLolly = new Sound();
hitTiki = new Sound();
gameOverSound = new Sound();
emptyGun = new Sound();
hitAntiGirl = new Sound();
hitFox = new Sound();
hitDuck = new Sound();
hitBass = new Sound();
hitOpossum = new Sound();
hitGoose = new Sound();
hitSquirrel = new Sound();
backgroundMusic.attachSound("Music");
startGame.attachSound("StartGame");
newLevel.attachSound("NewLevel");
hitTarget.attachSound("HitTarget");
hitBullseye.attachSound("HitBullseye");
hitAnti.attachSound("HitAnti");
hitLolly.attachSound("HitAntiGirl");
hitTiki.attachSound("HitTiki");
gameOverSound.attachSound("GameOver");
lowTime.attachSound("Warning");
reload.attachSound("Reload");
gunShot.attachSound("Gunshot");
emptyGun.attachSound("EmptyCartridge");
hitAntiGirl.attachSound("HitSpecial");
hitFox.attachSound("HitFox");
hitDuck.attachSound("HitDuck");
hitBass.attachSound("HitBass");
hitOpossum.attachSound("HitOpossum");
hitGoose.attachSound("HitGoose");
hitSquirrel.attachSound("HitSquirrel");
backgroundMusic.setVolume(50);
gunShot.setVolume(50);
backgroundMusic.start(0, 1000);
setup = function () {
startDrag ("_root.cursor", true);
Mouse.hide();
WaterFront.gotoAndPlay("Right");
cursor.swapDepths(10000);
timer.swapDepths(9998);
ammoClip.swapDepths(9996);
Frame.swapDepths(9995);
InterfaceBorder.swapDepths(9993);
reloadButton.swapDepths(9992);
levelComplete.swapDepths(9991);
main.swapDepths(9990);
gameOver.swapDepths(9989);
instrucOne.swapDepths(9988);
instrucTwo.swapDepths(9987);
RightCurtain.swapDepths(9951);
LeftCurtain.swapDepths(9950);
WaterFront.swapDepths(9900);
WaterBack.swapDepths(9000);
GrassScene.swapDepths(8000);
LeftTree.swapDepths(7000);
MiddleTree.swapDepths(6000);
RightTree.swapDepths(5000);
timer._visible = true;
ammoClip._visible = true;
_root.createEmptyMovieClip("bulletLayer", timer.getDepth() - 1);
_root.createEmptyMovieClip("tikiLayer", WaterFront.getDepth() + 1);
_root.createEmptyMovieClip("piecePathOne", WaterFront.getDepth() - 1);
_root.createEmptyMovieClip("piecePathTwo", WaterBack.getDepth() - 1);
_root.createEmptyMovieClip("piecePathThree", LeftTree.getDepth() - 1);
_root.createEmptyMovieClip("piecePathFour", MiddleTree.getDepth() - 1);
_root.createEmptyMovieClip("piecePathFive", RightTree.getDepth() - 1);
var _local2 = 0;
while (_local2 < 8) {
ReloadBullets("Bullets", _local2);
_local2++;
}
coverLayer._visible = false;
curBullet = 0;
gameTimer = 30;
clockCount = 1;
tikiHits = 0;
finished = false;
curLevel = 1;
curSpeed = 2;
curScore = 0;
amountToContinue = 150;
ScoreNeeded = 0;
spawnAmount = 1;
UpdateLevelText();
gameRan = true;
if (!muteSounds) {
startGame.start();
}
reloadButton._visible = true;
InterfaceBorder.tikiCount.counter.text = "x " + tikiHits;
InterfaceBorder.tikiCount._visible = false;
Progress = true;
addedTikiScore = false;
};
createPiece = function (type) {
var _local5 = "piece" + enemyCount;
var _local2;
var _local1 = 0;
var _local4 = 0;
if (type == "Fox") {
var _local6 = Math.floor(Math.random() * 4);
_local4 = 10;
if (_local6 == 0) {
_local2 = new Array(2, 3);
_local1 = 1;
} else if (_local6 == 1) {
_local2 = new Array(4, 5);
_local1 = 2;
} else if (_local6 == 2) {
_local2 = new Array(4, 5);
_local1 = 3;
} else if (_local6 == 3) {
_local2 = new Array(4, 5);
_local1 = 4;
}
} else if ((type == "Bass") || (type == "Duck")) {
_local2 = new Array(0, 1);
_local4 = 10;
_local1 = 0;
} else if (type == "LightningBugOne") {
_local2 = new Array(100, 101, 102, 103, 104, 105, 106, 107);
_local4 = 5;
_local1 = 0;
} else if (type == "LightningBugTwo") {
_local2 = new Array(100, 101, 102, 103, 104, 105, 106, 107);
_local4 = 5;
_local1 = 0;
} else if (type == "LightningBugThree") {
_local2 = new Array(100, 101, 102, 103, 104, 105, 106, 107);
_local4 = 5;
_local1 = 0;
} else if (type == "LightningBugFour") {
_local2 = new Array(100, 101, 102, 103, 104, 105, 106, 107);
_local4 = 5;
_local1 = 0;
} else if (type == "LightningBugFive") {
_local2 = new Array(100, 101, 102, 103, 104, 105, 106, 107);
_local4 = 5;
_local1 = 0;
} else if (type == "LightningBugSix") {
_local2 = new Array(100, 101, 102, 103, 104, 105, 106, 107);
_local4 = 5;
_local1 = 0;
} else if ((((((type == "CoinOne") || (type == "CoinTwo")) || (type == "CoinThree")) || (type == "CoinFour")) || (type == "CoinFive")) || (type == "CoinSix")) {
_local2 = new Array(200, 200);
_local4 = 5;
_local1 = 0;
} else if (type == "Koala") {
_local2 = new Array(8, 8);
_local4 = -10;
_local1 = 3;
} else if (type == "Dodo") {
var _local6 = Math.floor(Math.random() * 2);
_local4 = -10;
if (_local6 == 0) {
_local2 = new Array(14, 15);
_local1 = 4;
} else if (_local6 == 1) {
_local2 = new Array(2, 3);
_local1 = 1;
}
} else if (type == "Squirrel") {
var _local6 = Math.floor(Math.random() * 2);
_local4 = 10;
if (_local6 == 0) {
_local2 = new Array(10, 11);
_local1 = 3;
} else if (_local6 == 1) {
_local2 = new Array(9, 13);
_local1 = 4;
}
} else if (type == "Goose") {
var _local6 = Math.floor(Math.random() * 4);
_local2 = new Array(6, 7, 12);
_local4 = 10;
if (_local6 == 0) {
_local1 = 1;
} else if (_local6 == 1) {
_local1 = 2;
} else if (_local6 == 2) {
_local1 = 3;
} else if (_local6 == 3) {
_local1 = 4;
}
} else if (type == "Opossum") {
var _local6 = Math.floor(Math.random() * 2);
_local4 = 10;
if (_local6 == 0) {
_local2 = new Array(14, 15);
_local1 = 4;
} else if (_local6 == 1) {
_local2 = new Array(8, 8);
_local1 = 3;
}
} else if (type == "Tiki") {
_local1 = 4;
_local4 = 0;
_local2 = new Array(16, 16);
} else if (type == "Girl") {
var _local6 = Math.floor(Math.random() * 4);
_local4 = -20;
if (_local6 == 0) {
_local2 = new Array(2, 3);
_local1 = 1;
} else if (_local6 == 1) {
_local2 = new Array(4, 5);
_local1 = 2;
} else if (_local6 == 2) {
_local2 = new Array(4, 5);
_local1 = 3;
} else if (_local6 == 3) {
_local2 = new Array(4, 5);
_local1 = 4;
}
}
if (_local1 == 0) {
SetPiece(piecePathOne, type, _local2, _local5, _local4);
UpdateOnPress(piecePathOne[_local5]);
UpdateOnEnter(piecePathOne[_local5]);
} else if (_local1 == 1) {
SetPiece(piecePathTwo, type, _local2, _local5, _local4);
UpdateOnPress(piecePathTwo[_local5]);
UpdateOnEnter(piecePathTwo[_local5]);
} else if (_local1 == 2) {
SetPiece(piecePathThree, type, _local2, _local5, _local4);
UpdateOnPress(piecePathThree[_local5]);
UpdateOnEnter(piecePathThree[_local5]);
} else if (_local1 == 3) {
SetPiece(piecePathFour, type, _local2, _local5, _local4);
UpdateOnPress(piecePathFour[_local5]);
UpdateOnEnter(piecePathFour[_local5]);
} else if (_local1 == 4) {
SetPiece(piecePathFive, type, _local2, _local5, _local4);
UpdateOnPress(piecePathFive[_local5]);
UpdateOnEnter(piecePathFive[_local5]);
}
enemyCount++;
_local2 = null;
};
SetPiece = function (layer, type, paths, nm, pointValue) {
layer.attachMovie(type, nm, enemyCount);
layer[nm].initialize(paths, pointValue, type);
SetSpawnByType(layer[nm], type);
if ((((((type == "CoinOne") || (type == "CoinTwo")) || (type == "CoinThree")) || (type == "CoinFour")) || (type == "CoinFive")) || (type == "CoinSix")) {
layer[nm].gotoAndPlay("idle");
}
layer[nm].gotoAndStop("Still");
};
SetSpawnByType = function (layer, type) {
if (type == "Bass") {
if (layer.piecePath == 0) {
layer._x = 65;
} else {
layer._x = 688;
layer._xscale = layer._xscale * -1;
}
layer._y = 293;
} else if ((((((type == "LightningBugOne") || (type == "LightningBugTwo")) || (type == "LightningBugThree")) || (type == "LightningBugFour")) || (type == "LightningBugFive")) || (type == "LightningBugSix")) {
layer._x = Math.floor(Math.random() * 342) + 158;
layer._y = Math.floor(Math.random() * 171) + 56;
} else if ((((((type == "CoinOne") || (type == "CoinTwo")) || (type == "CoinThree")) || (type == "CoinFour")) || (type == "CoinFive")) || (type == "CoinSix")) {
layer._x = Math.floor(Math.random() * 550) + 75;
layer._y = Math.floor(Math.random() * 245) + 35;
} else if (type == "Duck") {
if (layer.piecePath == 0) {
layer._x = 53;
} else {
layer._x = 701;
layer._xscale = layer._xscale * -1;
}
layer._y = 278;
} else if (type == "Fox") {
if ((layer.piecePath % 2) == 0) {
layer._x = 24;
} else {
layer._x = 729;
layer._xscale = layer._xscale * -1;
}
if ((layer.piecePath == 2) || (layer.piecePath == 3)) {
layer._y = 251;
} else {
layer._y = 204;
}
} else if (type == "Goose") {
if (layer.piecePath == 12) {
layer._x = 219;
layer._y = -1;
} else if ((layer.piecePath % 2) == 0) {
layer._x = 13;
layer._y = 118;
} else {
layer._x = 739;
layer._y = 118;
layer._xscale = layer._xscale * -1;
}
} else if (type == "Opossum") {
if (layer.piecePath == 8) {
layer._rotation = 90;
layer._x = 166;
layer._y = 0;
} else if (layer.piecePath == 14) {
layer._x = 315;
layer._y = 262;
} else if (layer.piecePath == 15) {
layer._x = 460;
layer._y = 262;
layer._xscale = layer._xscale * -1;
}
} else if (type == "Squirrel") {
if ((layer.piecePath == 10) || (layer.piecePath == 11)) {
layer._x = 220;
layer._y = 180;
} else if (layer.piecePath == 9) {
layer._x = 605;
layer._y = 180;
} else if (layer.piecePath == 13) {
layer._x = 388;
layer._y = 248;
}
if ((layer.piecePath % 2) == 1) {
layer._xscale = layer._xscale * -1;
}
} else if (type == "Dodo") {
if (layer.piecePath == 2) {
layer._x = 54;
layer._y = 242;
} else if (layer.piecePath == 3) {
layer._x = 697;
layer._y = 242;
layer._xscale = layer._xscale * -1;
} else if (layer.piecePath == 14) {
layer._x = 325;
layer._y = 287;
} else if (layer.piecePath == 15) {
layer._x = 479;
layer._y = 287;
layer._xscale = layer._xscale * -1;
}
} else if (type == "Girl") {
if ((layer.piecePath % 2) == 0) {
layer._x = 79;
} else {
layer._x = 678;
layer._xscale = layer._xscale * -1;
}
if ((layer.piecePath == 2) || (layer.piecePath == 3)) {
layer._y = 220;
} else {
layer._y = 175;
}
} else if (type == "Koala") {
layer._x = 180;
layer._y = -2;
} else if (type == "Tiki") {
layer._x = 13.4;
layer._y = 154.3;
}
};
UpdateOnPress = function (layer) {
layer.onPress = function () {
if (gamePause) {
return(undefined);
}
if ((bulletCount > 0) || (lastShot)) {
var _local5 = this._parent.getDepth();
if (_local5 < 5000) {
if (RightTree.box1.hitTest(cursor.hitzone)) {
return(undefined);
}
}
if (_local5 < 6000) {
if (MiddleTree.box1.hitTest(cursor.hitzone)) {
return(undefined);
}
}
if (_local5 < 7000) {
if (LeftTree.box1.hitTest(cursor.hitzone)) {
return(undefined);
}
}
lastShot = false;
var _local3 = false;
var _local7 = false;
if (this.box1.hitTest(cursor.hitzone)) {
_local3 = true;
if (this.bullseye.hitTest(cursor.hitzone)) {
_local7 = true;
}
} else if (this.box2.hitTest(cursor.hitzone)) {
_local3 = true;
} else if (this.box3.hitTest(cursor.hitzone)) {
_local3 = true;
}
if (_local7) {
curScore = curScore + Math.abs(this.scoreValue * 2);
var _local4 = bulletLayer.attachMovie("points_animation", "points" + this.depth, this.depth);
_local4._x = this._x;
_local4._y = this._y + 20;
_local4.amount.text = "+" + Math.abs(this.scoreValue * 2);
this.gotoAndPlay("Hit 2");
if (this.pieceName == "Girl") {
if (!muteSounds) {
hitLolly.start();
}
} else if (this.pieceName == "Fox") {
if (!muteSounds) {
hitFox.start();
}
} else if (this.pieceName == "Duck") {
if (!muteSounds) {
hitDuck.start();
}
} else if (this.pieceName == "Bass") {
if (!muteSounds) {
hitBass.start();
}
} else if (this.pieceName == "Goose") {
if (!muteSounds) {
hitGoose.start();
}
} else if (this.pieceName == "Squirrel") {
if (!muteSounds) {
hitSquirrel.start();
}
} else if (this.pieceName == "Opossum") {
if (!muteSounds) {
hitOpossum.start();
}
} else if (!muteSounds) {
hitBullseye.start();
}
ScoreNeeded = ScoreNeeded + Math.abs(this.scoreValue * 2);
if (((this.pieceName == "Girl") || (this.pieceName == "Koala")) || (this.pieceName == "Dodo")) {
this.beenHit = false;
} else {
this.beenHit = true;
}
} else if (_local3) {
curScore = curScore + this.scoreValue;
if (!inBonusStage) {
ScoreNeeded = ScoreNeeded + this.scoreValue;
}
var _local6 = true;
if (this.pieceName == "Tiki") {
var _local2 = "Tiki0";
tikiLayer.attachMovie(this.pieceName, _local2, 0);
tikiLayer[_local2]._x = this._x;
tikiLayer[_local2]._y = this._y;
if (!muteSounds) {
hitTiki.start();
}
this.stop();
this.removeMovieClip();
this=null;//parameter overwritten
tikiLayer[_local2].gotoAndPlay("Hit 1");
UpdateOnPress(tikiLayer[_local2]);
UpdateOnEnter(tikiLayer[_local2]);
tikiHits++;
} else if ((((((this.pieceName == "LightningBugOne") || (this.pieceName == "LightningBugTwo")) || (this.pieceName == "LightningBugThree")) || (this.pieceName == "LightningBugFour")) || (this.pieceName == "LightningBugFive")) || (this.pieceName == "LightningBugSix")) {
this.gotoAndPlay("hit");
if (!muteSounds) {
hitTarget.start();
}
_local6 = false;
} else if ((((((this.pieceName == "CoinOne") || (this.pieceName == "CoinTwo")) || (this.pieceName == "CoinThree")) || (this.pieceName == "CoinFour")) || (this.pieceName == "CoinFive")) || (this.pieceName == "CoinSix")) {
this.gotoAndPlay("hit");
if (!muteSounds) {
hitTarget.start();
}
_local6 = false;
} else {
if (this._currentFrame == 48) {
this.gotoAndPlay("Hit 3");
} else {
this.gotoAndPlay("Hit 1");
}
if ((this.pieceName == "Koala") || (this.pieceName == "Dodo")) {
if (!muteSounds) {
hitAnti.start();
}
} else if (this.pieceName == "Girl") {
if (!muteSounds) {
hitAntiGirl.start();
}
} else if (!muteSounds) {
hitTarget.start();
}
}
if (((this.pieceName == "Girl") || (this.pieceName == "Koala")) || (this.pieceName == "Dodo")) {
var _local4 = piecePathOne.attachMovie("points_animation_anti", "points" + this.depth, this.depth);
_local4._x = this._x;
_local4._y = this._y + 20;
_local4.amount.text = this.scoreValue;
this.beenHit = false;
} else {
if (_local6) {
var _local4 = piecePathOne.attachMovie("points_animation", "points" + this.depth, this.depth);
_local4._x = this._x;
_local4._y = this._y + 20;
_local4.amount.text = "+" + this.scoreValue;
}
this.beenHit = true;
}
}
}
};
};
UpdateOnEnter = function (layer) {
layer.onEnterFrame = function () {
if (gamePause) {
return(undefined);
}
if (this.beenHit == false) {
if (this.piecePath == 8) {
var _local3 = 1 * (curSpeed / 2);
var _local5 = false;
if (this._y > 119) {
this._y = 119;
}
if (this._y == 119) {
this.timeOnScreen = this.timeOnScreen + 2;
_local5 = true;
}
if (this.timeOnScreen >= 30) {
_local3 = _local3 * -1;
_local5 = false;
}
if (!_local5) {
this._y = this._y + _local3;
}
if (this._y < -3) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 9) {
var _local3 = -1 * (curSpeed / 2);
var _local5 = false;
if (this._x < 552) {
this._x = 552;
}
if (this._x == 552) {
this.timeOnScreen = this.timeOnScreen + 2;
_local5 = true;
}
if (this.timeOnScreen >= 30) {
_local3 = _local3 * -1;
_local5 = false;
}
if (!holding) {
this._x = this._x + _local3;
}
if (this._x > 606) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 10) {
var _local3 = 1 * (curSpeed / 2);
var _local5 = false;
if (this._x > 268) {
this._x = 268;
}
if (this._x == 268) {
this.timeOnScreen = this.timeOnScreen + 2;
_local5 = true;
}
if (this.timeOnScreen >= 30) {
_local3 = _local3 * -1;
_local5 = false;
}
if (!_local5) {
this._x = this._x + _local3;
}
if (this._x < 220) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 11) {
var _local3 = -1 * (curSpeed / 2);
var _local5 = false;
if (this._x < 164) {
this._x = 164;
}
if (this._x == 164) {
this.timeOnScreen = this.timeOnScreen + 2;
_local5 = true;
}
if (this.timeOnScreen >= 30) {
_local3 = _local3 * -1;
_local5 = false;
}
if (!_local5) {
this._x = this._x + _local3;
}
if (this._x > 220) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 12) {
var _local3 = 1 * (curSpeed * 0.5);
this._x = this._x + (_local3 * 1.35);
if (this._x > 388) {
_local3 = _local3 * -1;
}
this._y = this._y + _local3;
if (this._y < -3) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 13) {
var _local3 = -1 * (curSpeed / 2);
var _local5 = false;
if (this._y < 185) {
this._y = 185;
}
if (this._y == 185) {
this.timeOnScreen = this.timeOnScreen + 2;
_local5 = true;
}
if (this.timeOnScreen >= 30) {
_local3 = _local3 * -1;
_local5 = false;
}
if (!_local5) {
this._y = this._y + _local3;
}
if (this._y > 248) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 14) {
var _local3 = 1 * curSpeed;
var _local4 = false;
var _local6 = false;
var _local7 = false;
if (this.pieceName == "Opossum") {
if (this._y < 219) {
this._y = 219;
}
if (this._y == 219) {
_local4 = true;
}
} else {
if (this._y < 210) {
this._y = 210;
}
if (this._y == 210) {
_local4 = true;
}
}
if (this._x > 479) {
this._x = 479;
}
if (this._x == 479) {
_local6 = true;
}
if ((this._x == 479) && (this._y < 300)) {
_local7 = true;
}
if (_local7) {
this._y = this._y + _local3;
} else if (!_local4) {
this._y = this._y - _local3;
} else if (!_local6) {
this._x = this._x + _local3;
}
if (this._y > 303) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 15) {
var _local3 = 1 * curSpeed;
var _local4 = false;
var _local6 = false;
var _local7 = false;
if (this.pieceName == "Opossum") {
if (this._y < 219) {
this._y = 219;
}
if (this._y == 219) {
_local4 = true;
}
} else {
if (this._y < 210) {
this._y = 210;
}
if (this._y == 210) {
_local4 = true;
}
}
if (this._x < 325) {
this._x = 325;
}
if (this._x == 325) {
_local6 = true;
}
if ((this._x == 325) && (this._y < 300)) {
_local7 = true;
}
if (_local7) {
this._y = this._y + _local3;
} else if (!_local4) {
this._y = this._y - _local3;
} else if (!_local6) {
this._x = this._x - _local3;
}
if (this._y > 303) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 16) {
var _local2 = 0.35;
if ((this._x > 98.3) && (this._x < 184.3)) {
_local2 = 0.25;
} else if ((this._x > 184.3) && (this._x < 302.3)) {
_local2 = -0.2;
} else if ((this._x > 302.3) && (this._x < 421.3)) {
_local2 = 0.27;
} else if ((this._x > 421.3) && (this._x < 498.3)) {
_local2 = -0.2;
} else if ((this._x > 498.3) && (this._x < 529.3)) {
_local2 = 0;
} else if ((this._x > 529.3) && (this._x < 676.3)) {
_local2 = -0.38;
}
this._y = this._y + _local2;
this._x = this._x + 1;
if (this._x > 730) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 100) {
this._y = this._y - bonusMoveSpeed;
if (this._y < -5) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 101) {
this._y = this._y - bonusMoveSpeed;
this._x = this._x + bonusMoveSpeed;
if (this._y < -5) {
this.removeMovieClip();
this=null;//parameter overwritten
} else if (this._x > 750) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 102) {
this._x = this._x + bonusMoveSpeed;
if (this._x > 750) {
this.removeMovieClip();
}
} else if (this.piecePath == 103) {
this._y = this._y + bonusMoveSpeed;
this._x = this._x + bonusMoveSpeed;
if (this._y > 475) {
this.removeMovieClip();
this=null;//parameter overwritten
} else if (this._x > 750) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 104) {
this._y = this._y + bonusMoveSpeed;
if (this._y > 475) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 105) {
this._y = this._y + bonusMoveSpeed;
this._x = this._x - bonusMoveSpeed;
if (this._y > 475) {
this.removeMovieClip();
this=null;//parameter overwritten
} else if (this._x < 0) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 106) {
this._x = this._x - bonusMoveSpeed;
if (this._x < 0) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 107) {
this._y = this._y - bonusMoveSpeed;
this._x = this._x - bonusMoveSpeed;
if (this._x < 0) {
this.removeMovieClip();
this=null;//parameter overwritten
} else if (this._y < -5) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else if (this.piecePath == 200) {
} else if ((this.piecePath % 2) == 0) {
this._x = this._x + (1 * curSpeed);
if (this._x > 750) {
this.removeMovieClip();
this=null;//parameter overwritten
}
} else {
this._x = this._x - (1 * curSpeed);
if (this._x < 0) {
this.removeMovieClip();
this=null;//parameter overwritten
}
}
}
};
};
UpdateLevelText = function () {
InterfaceBorder.LevelText.text = curLevel;
};
UpdateScoreText = function () {
InterfaceBorder.ScoreText.text = curScore;
if (ScoreNeeded >= amountToContinue) {
ScoreNeeded = 0;
curScore = curScore + (100 * gameTimer);
gameTimer = 0;
Progress = true;
levelComplete._visible = true;
var _local1;
if (amountToContinue < 500) {
_local1 = (curScore + amountToContinue) + 30;
} else {
_local1 = curScore + amountToContinue;
}
levelComplete.neededAmount.text = _local1;
lowTime.stop("Warning");
if (!muteSounds) {
newLevel.start();
}
}
};
UpdateShineTimer = function (speed) {
if ((shineTimer % speed) == 0) {
timer.gotoAndPlay("Shimmer");
shineTimer = 1;
} else {
shineTimer++;
}
};
UpdateGameClock = function () {
if (gamePause) {
return(undefined);
}
if (bonusSpawned) {
if ((bonusLevel == 0) || (bonusLevel == 1)) {
if ((clockCount % 18) == 0) {
var _local2 = Math.floor(Math.random() * 6);
if (_local2 == 0) {
createPiece("LightningBugOne");
} else if (_local2 == 1) {
createPiece("LightningBugTwo");
} else if (_local2 == 2) {
createPiece("LightningBugThree");
} else if (_local2 == 3) {
createPiece("LightningBugFour");
} else if (_local2 == 4) {
createPiece("LightningBugFive");
} else if (_local2 == 5) {
createPiece("LightningBugSix");
}
}
}
}
if (((clockCount % 40) == 0) && (gameTimer)) {
gameTimer--;
if ((gameTimer == 0) && (inBonusStage)) {
Progress = true;
levelComplete._visible = true;
if (!muteSounds) {
newLevel.start();
}
bonusSpawned = false;
inBonusStage = false;
} else if ((gameTimer == 0) && (!inbonusStage)) {
finished = true;
}
clockCount = 1;
if (gameTimer == 10) {
if (!muteSounds) {
lowTime.start();
}
}
if (!curtainClosed) {
if ((curLevel % 3) == 0) {
if (gameTimer == tikiTimer) {
createPiece("Tiki");
}
}
var _local4 = spawnAmount;
if (!inBonusStage) {
while (_local4) {
var _local3 = 5;
if (curLevel > 2) {
_local3++;
}
if (curLevel > 4) {
_local3++;
}
if (curLevel > 5) {
_local3++;
}
if (curLevel > 10) {
_local3++;
}
var _local1 = Math.floor(Math.random() * _local3);
if (_local1 == 0) {
createPiece("Bass");
} else if (_local1 == 1) {
createPiece("Duck");
} else if (_local1 == 2) {
createPiece("Fox");
} else if (_local1 == 3) {
createPiece("Squirrel");
} else if (_local1 == 4) {
createPiece("Koala");
} else if (_local1 == 5) {
createPiece("Opossum");
} else if (_local1 == 6) {
createPiece("Dodo");
} else if (_local1 == 7) {
createPiece("Goose");
} else if (_local1 == 8) {
createPiece("Girl");
}
_local4--;
}
} else {
_local4 = bonusSpawnRate;
if ((bonusLevel == 0) || (bonusLevel == 1)) {
if (!bonusSpawned) {
while (_local4) {
var _local2 = Math.floor(Math.random() * 6);
if (_local2 == 0) {
createPiece("LightningBugOne");
} else if (_local2 == 1) {
createPiece("LightningBugTwo");
} else if (_local2 == 2) {
createPiece("LightningBugThree");
} else if (_local2 == 3) {
createPiece("LightningBugFour");
} else if (_local2 == 4) {
createPiece("LightningBugFive");
} else if (_local2 == 5) {
createPiece("LightningBugSix");
}
_local4--;
}
}
}
bonusSpawned = true;
}
}
} else {
clockCount++;
}
if ((gameTimer == 0) && (!Progress)) {
CloseCurtains(10);
} else if ((gameTimer == 0) && (Progress)) {
CloseCurtains(5);
}
timer.clock.text = gameTimer;
timer.clock.selectable = false;
};
CloseCurtains = function (speed) {
LeftCurtain._x = LeftCurtain._x + speed;
RightCurtain._x = RightCurtain._x - speed;
LeftCurtain._visible = true;
RightCurtain._visible = true;
if (LeftCurtain._x >= 230.3) {
LeftCurtain._x = 231.3;
curtainClosed = true;
if (Progress) {
curtainOpen = false;
}
var _local1 = "bullet" + curBullet;
bulletLayer[_local1].gotoAndStop("Still");
}
if (RightCurtain._x <= 543.3) {
RightCurtain._x = 542.3;
curtainClosed = true;
curtainOpen = false;
var _local1 = "bullet" + curBullet;
bulletLayer[_local1].gotoAndStop("Still");
}
if ((!curtainOpen) && (Progress)) {
ResetForNextLevel();
}
};
ResetForNextLevel = function () {
var _local3 = curBullet;
while (_local3 < 8) {
var _local4 = "bullet" + _local3;
bulletLayer[_local4].gotoAndPlay("Off");
_local3++;
}
bulletCount = 0;
var _local2 = 0;
while (_local2 < 8) {
ReloadBullets("Bullets", _local2);
_local2++;
}
curBullet = 0;
if ((curLevel % 10) == 0) {
bonusLevel = Math.floor(Math.random() * 2);
inBonusStage = true;
levelComplete._visible = false;
Frame.bonusRound._visible = true;
} else {
inBonusStage = false;
}
if (!finished) {
curLevel++;
}
curSpeed = curSpeed + 0.5;
amountToContinue = amountToContinue + 30;
if (amountToContinue > 500) {
amountToContinue = 500;
}
var _local1 = 0;
while (_local1 < enemyCount) {
if (piecePathOne["piece" + _local1]) {
piecePathOne["piece" + _local1].removeMovieClip();
piecePathOne["piece" + _local1] = null;
}
if (piecePathTwo["piece" + _local1]) {
piecePathTwo["piece" + _local1].removeMovieClip();
piecePathTwo["piece" + _local1] = null;
}
if (piecePathThree["piece" + _local1]) {
piecePathThree["piece" + _local1].removeMovieClip();
piecePathThree["piece" + _local1] = null;
}
if (piecePathFour["piece" + _local1]) {
piecePathFour["piece" + _local1].removeMovieClip();
piecePathFour["piece" + _local1] = null;
}
if (piecePathFive["piece" + _local1]) {
piecePathFive["piece" + _local1].removeMovieClip();
piecePathFive["piece" + _local1] = null;
}
_local1++;
}
enemyCount = 0;
};
ReloadBullets = function (type, i) {
var _local1 = "bullet" + bulletCount;
bulletLayer.attachMovie(type, _local1, i);
if (i == 0) {
bulletLayer[_local1]._x = 609;
bulletLayer[_local1]._y = 46;
bulletLayer[_local1].gotoAndPlay("On");
} else if (i == 1) {
bulletLayer[_local1]._x = 588;
bulletLayer[_local1]._y = 59;
} else if (i == 2) {
bulletLayer[_local1]._x = 577;
bulletLayer[_local1]._y = 81;
} else if (i == 3) {
bulletLayer[_local1]._x = 584;
bulletLayer[_local1]._y = 106;
} else if (i == 4) {
bulletLayer[_local1]._x = 608;
bulletLayer[_local1]._y = 120;
} else if (i == 5) {
bulletLayer[_local1]._x = 631;
bulletLayer[_local1]._y = 108;
} else if (i == 6) {
bulletLayer[_local1]._x = 639;
bulletLayer[_local1]._y = 84;
} else {
bulletLayer[_local1]._x = 630;
bulletLayer[_local1]._y = 59;
}
bulletCount++;
};
_root.onMouseDown = function () {
if (cursor._y > 380) {
return(undefined);
}
if (gamePause) {
return(undefined);
}
if ((!curtainClosed) && (bulletCount != 0)) {
if (!muteSounds) {
gunShot.start();
}
var _local1 = "bullet" + curBullet;
curBullet++;
bulletLayer[_local1].gotoAndPlay("Off");
_local1 = "bullet" + curBullet;
bulletLayer[_local1].gotoAndPlay("On");
bulletCount--;
if (bulletCount == 0) {
lastShot = true;
}
} else if (!curtainClosed) {
if (!muteSounds) {
emptyGun.start();
}
lastShot = false;
InterfaceBorder.outOfAmmo.gotoAndPlay(2);
}
};
instrucOne.Next.onRelease = function () {
instrucTwo._visible = true;
instrucOne._visible = false;
};
gameOver.playAgain.onRelease = function () {
gameOver._visible = false;
finished = false;
addedTikiScore = false;
ScoreNeeded = 0;
curScore = 0;
curLevel = 1;
InterfaceBorder.ScoreText.text = curScore;
InterfaceBorder.LevelText.text = curLevel;
amountToContinue = 150;
curSpeed = 2;
spawnAmount = 1;
cursor._visible = true;
setup();
};
gameOver.mainMenu.onRelease = function () {
stopDrag();
cursor._visible = false;
Mouse.show();
gameOver._visible = false;
finished = false;
main._visible = true;
};
main.startButton.onRelease = function () {
main._visible = false;
instrucOne._visible = true;
};
main.moreGamesButton.onRelease = function () {
getURL ("http://www.playzi.com/default.aspx?lnkid=110342", "_blank");
};
instrucTwo.Next.onRelease = function () {
instrucTwo._visible = false;
cursor._visible = true;
setup();
_root.onEnterFrame = function () {
Key.removeListener(this);
this.onKeyUp = function () {
if (Key.getCode() == 80) {
if (gamePause) {
gamePause = false;
Frame.pauseScreen._visible = false;
timer._visible = true;
ammoClip._visible = true;
bulletLayer._visible = true;
} else {
timer._visible = false;
ammoClip._visible = false;
bulletLayer._visible = false;
gamePause = true;
Frame.pauseScreen._visible = true;
}
}
};
Key.addListener(this);
if (cursor._y > 380) {
cursor._visible = false;
Mouse.show();
} else if (gameRan) {
Mouse.hide();
cursor._visible = true;
}
if (gameOver._visible) {
if (getTimer() < (playAgainTimer + 2500)) {
gameOver.playAgain._visible = false;
gameOver.mainMenu._visible = false;
} else {
gameOver.playAgain._visible = true;
gameOver.mainMenu._visible = true;
}
}
if (gamePause) {
return(undefined);
}
if ((!curtainOpen) && (Progress)) {
LeftCurtain._visible = true;
RightCurtain._visible = true;
curtainClosed = false;
if (LeftCurtain._x < -69.8) {
LeftCurtain._x = -69.7;
RightCurtain._x = 843.3;
curtainOpen = true;
LeftCurtain._visible = false;
RightCurtain._visible = false;
levelComplete._visible = false;
Frame.bonusRound._visible = false;
Progress = false;
gameTimer = 30;
clockCount = 1;
var _local6 = Math.floor(Math.random() * 11);
tikiTimer = 30 - _local6;
if (curLevel == 5) {
spawnAmount++;
}
if ((curLevel % 8) == 0) {
spawnAmount++;
}
} else {
LeftCurtain._x = LeftCurtain._x - 5;
RightCurtain._x = RightCurtain._x + 5;
}
} else {
reloadButton.onRelease = function () {
if (gamePause) {
return(undefined);
}
emptyGun.stop("EmptyCartridge");
if (!muteSounds) {
reload.start();
}
var _local2 = curBullet;
while (_local2 < 8) {
var _local3 = "bullet" + _local2;
bulletLayer[_local3].gotoAndPlay("Off");
_local2++;
}
bulletCount = 0;
var _local1 = 0;
while (_local1 < 8) {
ReloadBullets("Bullets", _local1);
_local1++;
}
curBullet = 0;
};
if (tikiHits > 0) {
InterfaceBorder.tikiCount._visible = true;
InterfaceBorder.tikiCount.counter.text = "x " + tikiHits;
}
if (finished) {
lowTime.stop("Warning");
gameOver._visible = true;
coverLayer._visible = true;
gameRan = false;
timer._visible = false;
ammoClip._visible = false;
coverLayer.swapDepths(9994);
gameOver.swapDepths(10001);
gameOver.finalScoreText.text = curScore;
gameOver.finalLevelText.text = curLevel;
gameOver.finalScoreText.selectable = false;
gameOver.finalLevelText.selectable = false;
main.swapDepths(10002);
instrucOne.swapDepths(10003);
instrucTwo.swapDepths(10004);
if (!addedTikiScore) {
curScore = curScore + (tikiHits * 1000);
addedTikiScore = true;
tikiHits = 0;
if (!muteSounds) {
gameOverSound.start();
}
reloadButton._visible = false;
var _local4 = curBullet;
while (_local4 < 8) {
var _local5 = "bullet" + _local4;
bulletLayer[_local5].gotoAndPlay("Off");
_local4++;
}
bulletCount = 0;
curBullet = 0;
playAgainTimer = getTimer();
}
var _local2 = 0;
while (_local2 < enemyCount) {
if (piecePathOne["piece" + _local2]) {
piecePathOne["piece" + _local2].removeMovieClip();
piecePathOne["piece" + _local2] = null;
}
if (piecePathTwo["piece" + _local2]) {
piecePathTwo["piece" + _local2].removeMovieClip();
piecePathTwo["piece" + _local2] = null;
}
if (piecePathThree["piece" + _local2]) {
piecePathThree["piece" + _local2].removeMovieClip();
piecePathThree["piece" + _local2] = null;
}
if (piecePathFour["piece" + _local2]) {
piecePathFour["piece" + _local2].removeMovieClip();
piecePathFour["piece" + _local2] = null;
}
if (piecePathFive["piece" + _local2]) {
piecePathFive["piece" + _local2].removeMovieClip();
piecePathFive["piece" + _local2] = null;
}
_local2++;
}
enemyCount = 0;
stopDrag();
cursor._visible = false;
Mouse.show();
}
UpdateShineTimer(200);
UpdateScoreText();
UpdateLevelText();
if (!curtainClosed) {
UpdateGameClock();
}
}
};
};
Frame.soundButton.onRelease = function () {
if (muteSounds) {
muteSounds = false;
} else {
muteSounds = true;
}
};
Frame.musicButton.onRelease = function () {
if (!musicStop) {
backgroundMusic.stop("Music");
pauseTime = backgroundMusic.position;
musicStop = true;
} else {
musicStop = false;
backgroundMusic.start(pauseTime / 1000, 9000);
backgroundMusic.setVolume(50);
pauseTime = 0;
}
};
Frame.pauseBut.onRelease = function () {
if (!gameRan) {
return(undefined);
}
if (gamePause) {
gamePause = false;
Frame.pauseScreen._visible = false;
bulletLayer._visible = true;
timer._visible = true;
ammoClip._visible = true;
} else {
gamePause = true;
Frame.pauseScreen._visible = true;
bulletLayer._visible = false;
timer._visible = false;
ammoClip._visible = false;
}
};
Frame.mainButton.onRelease = function () {
if (!gameRan) {
return(undefined);
}
lowTime.stop("Warning");
coverLayer._visible = true;
timer._visible = false;
ammoClip._visible = false;
coverLayer.swapDepths(9994);
main.swapDepths(10002);
instrucOne.swapDepths(10003);
instrucTwo.swapDepths(10004);
instrucOne._visible = false;
instrucTwo._visible = false;
LeftCurtain._x = 231.3;
RightCurtain._x = 542.3;
LeftCurtain._visible = true;
RightCurtain._visible = true;
curtainClosed = true;
curtainOpen = false;
curScore = 0;
score = 0;
InterfaceBorder.ScoreText.text = "0";
reloadButton._visible = false;
var _local1 = curBullet;
while (_local1 < 8) {
var _local2 = "bullet" + _local1;
bulletLayer[_local2].gotoAndPlay("Off");
_local1++;
}
bulletCount = 0;
curBullet = 0;
stopDrag();
cursor._visible = false;
Mouse.show();
finished = false;
main._visible = true;
};
Frame.pauseScreen.resumeButton.onRelease = function () {
gamePause = false;
Frame.pauseScreen._visible = false;
bulletLayer._visible = true;
timer._visible = true;
ammoClip._visible = true;
};
Frame.playziButton.onRelease = function () {
getURL ("http://www.playzi.com/default.aspx?lnkid=110342", "_blank");
};
Symbol 832 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();
};
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 833 MovieClip [__Packages.com.ObjectPiece] Frame 0
class com.ObjectPiece extends MovieClip
{
var scoreValue, availablePaths, piecePath, timeOnScreen, pieceName, beenHit;
function ObjectPiece () {
super();
}
function initialize(paths, score, objName) {
scoreValue = score;
availablePaths = paths;
var _local2 = Math.floor(Math.random() * availablePaths.length);
piecePath = paths[_local2];
timeOnScreen = 0;
pieceName = objName;
beenHit = false;
}
}
Symbol 94 MovieClip Frame 1
stop();
Symbol 100 MovieClip [Tiki] Frame 1
#initclip 18
Object.registerClass("Tiki", com.ObjectPiece);
#endinitclip
Symbol 100 MovieClip [Tiki] Frame 50
stop();
this.removeMovieClip();
this = null;
Symbol 130 MovieClip [Squirrel] Frame 1
#initclip 3
Object.registerClass("Squirrel", com.ObjectPiece);
#endinitclip
Symbol 130 MovieClip [Squirrel] Frame 20
stop();
this.removeMovieClip();
this = null;
Symbol 130 MovieClip [Squirrel] Frame 64
stop();
this.removeMovieClip();
this = null;
Symbol 144 MovieClip [Opossum] Frame 1
#initclip 4
Object.registerClass("Opossum", com.ObjectPiece);
#endinitclip
Symbol 144 MovieClip [Opossum] Frame 22
stop();
this.removeMovieClip();
this = null;
Symbol 144 MovieClip [Opossum] Frame 69
stop();
this.removeMovieClip();
this = null;
Symbol 148 MovieClip [Koala] Frame 1
#initclip 5
Object.registerClass("Koala", com.ObjectPiece);
#endinitclip
stop();
Symbol 148 MovieClip [Koala] Frame 30
this.gotoAndStop("still");
Symbol 154 MovieClip [Goose] Frame 1
#initclip 6
Object.registerClass("Goose", com.ObjectPiece);
#endinitclip
Symbol 154 MovieClip [Goose] Frame 22
stop();
this.removeMovieClip();
this = null;
Symbol 154 MovieClip [Goose] Frame 44
stop();
this.removeMovieClip();
this = null;
Symbol 171 MovieClip [Girl] Frame 1
#initclip 7
Object.registerClass("Girl", com.ObjectPiece);
#endinitclip
stop();
Symbol 171 MovieClip [Girl] Frame 31
this.gotoAndStop("still");
Symbol 171 MovieClip [Girl] Frame 48
stop();
Symbol 171 MovieClip [Girl] Frame 80
this.gotoAndStop("Still 2");
Symbol 197 MovieClip [Fox] Frame 1
#initclip 8
Object.registerClass("Fox", com.ObjectPiece);
#endinitclip
Symbol 197 MovieClip [Fox] Frame 22
stop();
this.removeMovieClip();
this = null;
Symbol 197 MovieClip [Fox] Frame 85
stop();
this.removeMovieClip();
this = null;
Symbol 205 MovieClip [Duck] Frame 1
#initclip 9
Object.registerClass("Duck", com.ObjectPiece);
#endinitclip
Symbol 205 MovieClip [Duck] Frame 21
stop();
this.removeMovieClip();
this = null;
Symbol 205 MovieClip [Duck] Frame 59
stop();
this.removeMovieClip();
this = null;
Symbol 209 MovieClip [Dodo] Frame 1
#initclip 10
Object.registerClass("Dodo", com.ObjectPiece);
#endinitclip
Symbol 209 MovieClip [Dodo] Frame 35
this.gotoAndStop("still");
Symbol 227 MovieClip [Bass] Frame 1
#initclip 11
Object.registerClass("Bass", com.ObjectPiece);
#endinitclip
Symbol 227 MovieClip [Bass] Frame 22
stop();
this.removeMovieClip();
this = null;
Symbol 227 MovieClip [Bass] Frame 63
stop();
this.removeMovieClip();
this = null;
Symbol 230 MovieClip [points_animation_anti] Frame 16
this.unloadMovie();
Symbol 232 MovieClip [points_animation] Frame 16
this.unloadMovie();
Symbol 236 MovieClip [Bullets] Frame 34
this.gotoAndPlay("Still");
Symbol 236 MovieClip [Bullets] Frame 74
this.gotoAndPlay("On");
Symbol 236 MovieClip [Bullets] Frame 80
this.removeMovieClip();
Symbol 320 MovieClip [LightningBugSix] Frame 1
#initclip 12
Object.registerClass("LightningBugSix", com.ObjectPiece);
#endinitclip
stop();
Symbol 320 MovieClip [LightningBugSix] Frame 90
stop();
this.removeMovieClip();
Symbol 398 MovieClip [LightningBugFive] Frame 1
#initclip 13
Object.registerClass("LightningBugFive", com.ObjectPiece);
#endinitclip
stop();
Symbol 398 MovieClip [LightningBugFive] Frame 89
stop();
this.removeMovieClip();
Symbol 480 MovieClip [LightningBugOne] Frame 1
#initclip 14
Object.registerClass("LightningBugOne", com.ObjectPiece);
#endinitclip
stop();
Symbol 480 MovieClip [LightningBugOne] Frame 90
stop();
this.removeMovieClip();
Symbol 562 MovieClip [LightningBugFour] Frame 1
#initclip 15
Object.registerClass("LightningBugFour", com.ObjectPiece);
#endinitclip
stop();
Symbol 562 MovieClip [LightningBugFour] Frame 90
stop();
this.removeMovieClip();
Symbol 639 MovieClip [LightningBugThree] Frame 1
#initclip 16
Object.registerClass("LightningBugThree", com.ObjectPiece);
#endinitclip
stop();
Symbol 639 MovieClip [LightningBugThree] Frame 89
stop();
this.removeMovieClip();
Symbol 719 MovieClip [LightningBugTwo] Frame 1
#initclip 17
Object.registerClass("LightningBugTwo", com.ObjectPiece);
#endinitclip
stop();
Symbol 719 MovieClip [LightningBugTwo] Frame 90
stop();
this.removeMovieClip();
Symbol 737 MovieClip Frame 60
this.gotoAndPlay("Left");
Symbol 737 MovieClip Frame 120
this.gotoAndPlay("Right");
Symbol 743 MovieClip Frame 1
stop();
Symbol 772 MovieClip Frame 42
this.gotoAndStop("Still");