Frame 1
mochi.as2.MochiAd.showPreGameAd({id:"f9fe4bcf5bd867bd", res:"720x400", background:10376212, color:15108923, outline:15108923, no_bg:true});
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("e5585c63", this, 10301, true);
mochi.as2.MochiServices.connect("f9fe4bcf5bd867bd");
Frame 2
function visitSite() {
getURL ("http://www.ilovebiscuits.com.au", "_blank");
}
function ErasedaThing() {
sharedObj.data.hscores = undefined;
sharedObj.flush();
}
function displayHighScores() {
txt_highscores_names.text = "";
txt_highscores_scores.text = "";
var _local1 = 0;
while (_local1 < highScores.length) {
txt_highscores_names.text = txt_highscores_names.text + (highScores[_local1][0] + newline);
txt_highscores_scores.text = txt_highscores_scores.text + (highScores[_local1][1] + newline);
_local1++;
}
}
function saveHighScores() {
sharedObj.data.hscores = highScores;
sharedObj.flush();
}
function populateDefaultHighScores() {
var _local1 = 0;
while (_local1 < defaultHighScores.length) {
var _local2 = new Array();
_local2.push(defaultHighScores[_local1][0]);
_local2.push(defaultHighScores[_local1][1]);
highScores.push(_local2);
_local1++;
}
saveHighScores();
displayHighScores();
}
stop();
btn_skip.onPress = function () {
gotoAndPlay ("Menu");
};
var scrollSpeed = 8;
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var copyrightText = new ContextMenuItem("I LOVE BISCUITS\u00AE 2012", visitSite);
myMenu.customItems.push(copyrightText);
_root.menu = myMenu;
var sharedObj = SharedObject.getLocal("pooperHS");
var defaultHighScores = new Array(["Kyle the Tequila Bandito", 50], ["Hannah '3 whiskies' Murdoch", 45], ["Bill 'Ace in the Hole' Northcott", 40], ["Michael 'Two Guns' Brockhouse", 35], ["John Marston", 30], ["The man with no name", 25], ["Mr C. Eastwood", 20]);
highScores = sharedObj.data.hscores;
if (highScores == undefined) {
var highScores = new Array();
populateDefaultHighScores();
}
Frame 12
stop();
Frame 22
stop();
Instance of Symbol 111 MovieClip in Frame 22
onClipEvent (keyUp) {
if (Key.getCode() == 88) {
_parent.intro_bit.play();
stopAllSounds();
_parent.gotoAndStop("Game");
}
}
Frame 32
stop();
var bananaArray = new Array([12, 13, 14, 54, 55, 56, 69, 70, 71], [52, 53, 54, 12, 13, 14, 19, 20, 21], [52, 53, 54, 17, 18, 19, 20, 21], [3, 4, 5, 6, 7, 65, 66, 67, 68], [15, 16, 17, 20, 57, 58, 59], [2, 3, 11, 12, 13, 16, 32, 33, 69, 70, 71], [51, 52, 53, 10, 11, 12, 15, 17, 18, 70, 71], [30, 31, 8, 9, 10, 63, 64, 66, 67], [6, 7, 8, 66, 67, 68, 35, 36, 37], [2, 3, 4, 14, 15, 16, 66, 67, 68, 72], [7, 8, 11, 12, 38, 39, 42, 43, 44, 45, 46], [7, 8, 9, 59, 60, 61, 62, 44, 45, 16, 17], [4, 5, 6, 7, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72], [35, 36, 42, 43, 16, 17, 20, 21, 22, 47, 48], [5, 6, 7, 19, 20, 21, 22, 35, 36, 37, 41, 42]);
var rocksArray = new Array([], [23], [10], [], [21], [8], [12], [6], [], [], [14], [20], [], [18], []);
var cactusSArray = new Array([], [39], [21, 28], [40], [41], [43, 45], [], [34, 43], [36], [], [32], [28, 32], [38, 44], [6], [17]);
var cactusOArray = new Array([], [], [], [], [], [], [], [], [], [], [], [], [], [], []);
var targetBarrierArray = new Array([15, 19], [], [], [11, 17], [], [14, 20], [], [], [9, 15], [7, 14], [], [], [8, 21], [], []);
var gatesArray = new Array([11], [8], [40], [7], [12], [27], [38], [16], [21], [39], [3], [40], [11], [8], [30]);
function beginLevel() {
player_dog._visible = true;
player_monkey._visible = true;
lev_mountains.gotoAndStop("Scrolling");
lev_desert.gotoAndStop("Scrolling");
setUpLevel();
intervalId2 = setInterval(_level0, "increaseSpeed", 2000);
isPaused = false;
intro_bit._visible = false;
mc_border.swapDepths(8000);
}
function increaseSpeed() {
if (scrollSpeed <= 18) {
scrollSpeed = scrollSpeed + 0.5;
} else {
scrollSpeed++;
}
if (scrollSpeed >= 38) {
clearInterval(intervalId2);
}
if ((scrollSpeed == 19) && (topPlatform)) {
player_monkey.gotoAndStop(6);
player_monkey.arm._visible = false;
player_monkey.animate.hand._visible = true;
}
if ((scrollSpeed == 19) && (player_dog._y == dogPosY)) {
player_dog.dog.gotoAndStop(5);
}
}
function finishGame() {
removeMovieClip(chunkObjects[0]);
removeMovieClip(chunkObjects[1]);
removeMovieClip(overlayObjects[0]);
removeMovieClip(overlayObjects[1]);
removeMovieClip(foregroundObjects[0]);
removeMovieClip(foregroundObjects[1]);
player_monkey.swapDepths(initialMonkeyDepth);
player_dog.swapDepths(initialDogDepth);
clearInterval(intervalId);
clearInterval(intervalId2);
clearInterval(intervalGameOver);
intro_bit._visible = true;
intro_bit.gotoAndStop("MainPosition");
gotoAndStop ("GameOver");
}
function setUpLevel() {
scrollSpeed = 8;
initialMonkeyDepth = player_monkey.getDepth();
initialDogDepth = player_dog.getDepth();
mc_score._visible = false;
createChunk(currentChunks[0], 0);
createChunk(currentChunks[1], 1);
player_monkey._visible = false;
player_monkey.arm._visible = false;
player_dog.dog.animate.arm._visible = false;
mc_score.onAnimComplete = mx.utils.Delegate.create(_level0, afterAnim);
lev_desert.dontDo = false;
lev_mountains.dontDo = false;
lev_sky.dontDo = false;
}
function generateBananas(current, arraypos) {
var _local1 = 0;
while (_local1 < bananaArray[current].length) {
if (bananaArray[current][_local1] <= 24) {
chunkObjects[arraypos].attachMovie("banana", "b" + _local1, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].bt._x + ((bananaArray[current][_local1] - 1) * bananaIncrement), _y:chunkObjects[arraypos].bt._y});
} else if ((bananaArray[current][_local1] >= 25) && (bananaArray[current][_local1] <= 48)) {
chunkObjects[arraypos].attachMovie("banana", "b" + _local1, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].bm._x + ((bananaArray[current][_local1] - 25) * bananaIncrement), _y:chunkObjects[arraypos].bm._y});
} else if (bananaArray[current][_local1] >= 49) {
chunkObjects[arraypos].attachMovie("banana", "b" + _local1, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].bb._x + ((bananaArray[current][_local1] - 49) * bananaIncrement), _y:chunkObjects[arraypos].bb._y});
}
_local1++;
}
}
function generateRocks(current, arraypos) {
var _local1 = 0;
while (_local1 < rocksArray[current].length) {
if (rocksArray[current][_local1] <= 23) {
chunkObjects[arraypos].attachMovie("rock", "r" + _local1, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].r._x + (rocksArray[current][_local1] * bananaIncrement), _y:chunkObjects[arraypos].r._y});
chunkObjects[arraypos]["r" + _local1].gotoAndStop(random(chunkObjects[arraypos]["r" + _local1]._totalframes) + 1);
} else if (rocksArray[current][_local1] >= 24) {
chunkObjects[arraypos].attachMovie("rock", "r" + _local1, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].tg._x + ((rocksArray[current][_local1] - 23) * bananaIncrement), _y:chunkObjects[arraypos].tg._y});
chunkObjects[arraypos]["r" + _local1].gotoAndStop(random(chunkObjects[arraypos]["r" + _local1]._totalframes) + 1);
}
_local1++;
}
}
function generateCactusS(current, arraypos) {
var _local1 = 0;
while (_local1 < cactusSArray[current].length) {
if (cactusSArray[current][_local1] <= 23) {
chunkObjects[arraypos].attachMovie("cactus_small", "cs" + _local1, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].r._x + (cactusSArray[current][_local1] * bananaIncrement), _y:chunkObjects[arraypos].r._y});
chunkObjects[arraypos]["cs" + _local1].gotoAndStop(random(chunkObjects[arraypos]["cs" + _local1]._totalframes) + 1);
} else if (cactusSArray[current][_local1] >= 24) {
chunkObjects[arraypos].attachMovie("cactus_small", "cs" + _local1, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].tg._x + ((cactusSArray[current][_local1] - 23) * bananaIncrement), _y:chunkObjects[arraypos].tg._y});
chunkObjects[arraypos]["cs" + _local1].gotoAndStop(random(chunkObjects[arraypos]["cs" + _local1]._totalframes) + 1);
}
_local1++;
}
}
function generateRockOverhanging(current, arraypos) {
var _local1 = 0;
while (_local1 < cactusOArray[current].length) {
chunkObjects[arraypos].attachMovie("rock_overhang", "co" + _local1, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].r._x + (cactusOArray[current][_local1] * bananaIncrement), _y:chunkObjects[arraypos].co._y});
_local1++;
}
}
function generateTargetAndBarrier(current, arraypos) {
if (targetBarrierArray[current].length > 0) {
chunkObjects[arraypos].attachMovie("target_poo", "tp", chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].tg._x + (targetBarrierArray[current][0] * bananaIncrement), _y:chunkObjects[arraypos].tg._y});
chunkObjects[arraypos].attachMovie("barrier", "tb", chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].co._x + (targetBarrierArray[current][1] * bananaIncrement), _y:chunkObjects[arraypos].co._y});
}
}
function generateGates(current, arraypos) {
var _local2 = 0;
while (_local2 < gatesArray[current].length) {
if (gatesArray[current][_local2] <= 23) {
chunkObjects[arraypos].attachMovie("gateback", "g" + _local2, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].r._x + (gatesArray[current][_local2] * bananaIncrement), _y:chunkObjects[arraypos].r._y});
chunkObjects[arraypos].attachMovie("nogate", "ng" + _local2, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].tg._x + ((gatesArray[current][_local2] * bananaIncrement) + 90), _y:chunkObjects[arraypos].tg._y});
overlayObjects[arraypos].attachMovie("gatefront", "gf" + _local2, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].r._x + (gatesArray[current][_local2] * bananaIncrement), _y:chunkObjects[arraypos].r._y});
} else {
chunkObjects[arraypos].attachMovie("gateback", "g" + _local2, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].tg._x + ((gatesArray[current][_local2] - 23) * bananaIncrement), _y:chunkObjects[arraypos].tg._y});
chunkObjects[arraypos].attachMovie("nogate", "ng" + _local2, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].r._x + (((gatesArray[current][_local2] - 23) * bananaIncrement) + 90), _y:chunkObjects[arraypos].r._y});
overlayObjects[arraypos].attachMovie("gatefront", "gf" + _local2, chunkObjects[arraypos].getNextHighestDepth(), {_x:chunkObjects[arraypos].tg._x + ((gatesArray[current][_local2] - 23) * bananaIncrement), _y:chunkObjects[arraypos].tg._y});
}
_local2++;
}
}
function createChunk(chunkNum, i) {
chunkObjects[i] = attachMovie("chunk_" + chunkNum, "chunk" + i, this.getNextHighestDepth(), {_y:400});
overlayObjects[i] = attachMovie("top_" + chunkNum, "top" + i, this.getNextHighestDepth(), {_y:400});
foregroundObjects[i] = attachMovie("foreground", "foreground" + i, this.getNextHighestDepth(), {_y:400});
chunkObjects[0].swapDepths(900);
chunkObjects[1].swapDepths(901);
player_monkey.swapDepths(1000);
player_dog.swapDepths(1001);
overlayObjects[0].swapDepths(2000);
overlayObjects[1].swapDepths(2001);
foregroundObjects[0].swapDepths(500);
foregroundObjects[1].swapDepths(501);
generateBananas(chunkNum - 1, i);
generateRocks(chunkNum - 1, i);
generateCactusS(chunkNum - 1, i);
generateRockOverhanging(chunkNum - 1, i);
generateTargetAndBarrier(chunkNum - 1, i);
generateGates(chunkNum - 1, i);
}
function dogFalling() {
var _local1 = 1;
while (_local1 <= 12) {
if (hitbar_1.hitTest(chunkObjects[1]["p" + _local1]) || (hitbar_1.hitTest(chunkObjects[0]["p" + _local1]))) {
return(true);
}
_local1++;
}
return(false);
}
function monkeyFalling(range1, range2) {
var _local1 = range1;
while (_local1 <= range2) {
if (hitbar_2.hitTest(chunkObjects[0]["p" + _local1]) || (hitbar_2.hitTest(chunkObjects[1]["p" + _local1]))) {
return(true);
}
_local1++;
}
return(false);
}
function playerDeath(deathtype) {
gameText.gotoAndStop("Dead");
snd_lvlMusic.stop();
lev_desert.dontDo = true;
lev_mountains.dontDo = true;
intervalGameOver = setInterval(_level0, "finishGame", 3000);
gameOver = true;
jumpUpDog.stop();
jumpUpMonkey.stop();
doAnimateScore();
if (deathtype == "falling") {
player_monkey.gotoAndStop(2);
jumpUpDog = new mx.transitions.Tween(player_dog, "_y", mx.transitions.easing.Regular.easeOut, player_dog._y, 700, 0.5, true);
if (!isMounted) {
doMonkeyFall();
}
} else if (deathtype == "monkey") {
player_monkey.gotoAndStop(4);
if (dogFalling()) {
jumpUpDog = new mx.transitions.Tween(player_dog, "_y", mx.transitions.easing.Regular.easeIn, player_dog._y, theBottom, jumpSpeed, true);
} else {
jumpUpDog = new mx.transitions.Tween(player_dog, "_y", mx.transitions.easing.Regular.easeIn, player_dog._y, 700, jumpSpeed, true);
}
doMonkeyFall();
player_dog.dog.gotoAndStop(4);
} else {
jumpUpDog = new mx.transitions.Tween(player_dog, "_y", mx.transitions.easing.Regular.easeIn, player_dog._y, theBottom, jumpSpeed, true);
player_dog.dog.gotoAndStop(3);
if (!isMounted) {
player_monkey.gotoAndStop(2);
doMonkeyFall();
}
}
}
function doMonkeyFall() {
if (!monkeyFalling(13, 24)) {
if (!monkeyFalling(1, 12)) {
jumpUpMonkey = new mx.transitions.Tween(player_monkey, "_y", mx.transitions.easing.Regular.easeIn, player_monkey._y, 700, 0.5, true);
} else {
jumpUpMonkey = new mx.transitions.Tween(player_monkey, "_y", mx.transitions.easing.Regular.easeIn, player_monkey._y, theBottom - 25, 0.5, true);
}
} else {
jumpUpMonkey = new mx.transitions.Tween(player_monkey, "_y", mx.transitions.easing.Regular.easeIn, player_monkey._y, theTop, 1, false);
}
}
function pooCollideRock(current, currentobject, whatchunk) {
pooObjects[current]._visible = false;
chunkObjects[whatchunk]["r" + currentobject].rock.gotoAndPlay(2);
}
function pooCollideBarriers(current, whatchunk) {
pooObjects[current]._visible = false;
chunkObjects[whatchunk].tb.poo_gate.gotoAndPlay(2);
}
function pooCollideOverhang(current, currentobject, whatchunk) {
pooObjects[current]._visible = false;
chunkObjects[whatchunk]["co" + currentobject].rock.gotoAndPlay(2);
}
function pooCollideCactus(currentpoo, currentobject, whatchunk) {
chunkObjects[whatchunk]["cs" + currentobject].cactus.gotoAndPlay(2);
pooObjects[currentpoo]._visible = false;
}
function pooCollideTarget(currentpoo, whatchunk) {
chunkObjects[whatchunk].tp.gotoAndStop(2);
chunkObjects[whatchunk].tb.gotoAndStop(2);
pooObjects[currentpoo]._visible = false;
}
function pooCollideGates(currentpoo, currentobject, whatchunk) {
pooObjects[currentpoo]._visible = false;
chunkObjects[whatchunk]["g" + currentobject].poo_gate.gotoAndPlay(2);
}
function pooCollidePlatforms(currentpoo, currentobject, whatchunk) {
pooObjects[currentpoo]._visible = false;
}
function doGateCrash(currentobject, whatchunk) {
gameText.gotoAndStop("Cleared");
chunkObjects[whatchunk]["ng" + currentobject]._visible = false;
if ((scrollSpeed >= 8) && (scrollSpeed <= 18)) {
chunkObjects[whatchunk]["g" + currentobject].gotoAndStop(2);
overlayObjects[whatchunk]["gf" + currentobject].gotoAndStop(2);
} else if ((scrollSpeed >= 19) && (scrollSpeed <= 28)) {
chunkObjects[whatchunk]["g" + currentobject].gotoAndStop(3);
overlayObjects[whatchunk]["gf" + currentobject].gotoAndStop(3);
} else if (scrollSpeed >= 29) {
chunkObjects[whatchunk]["g" + currentobject].gotoAndStop(4);
overlayObjects[whatchunk]["gf" + currentobject].gotoAndStop(4);
}
t_gates++;
gatePoint = {x:chunkObjects[whatchunk]["g" + currentobject]._x, y:chunkObjects[whatchunk]["g" + currentobject]._y};
chunkObjects[whatchunk].localToGlobal(gatePoint);
gateScoreObjects.unshift(attachMovie("mini_gate", "gate" + currentobject, this.getNextHighestDepth(), {_x:gatePoint.x, _y:gatePoint.y - 50}));
gateXTween.unshift(new mx.transitions.Tween(this["gate" + currentobject], "_x", mx.transitions.easing.Regular.easeOut, this["gate" + currentobject]._x, s_gates._x, animSpeed, true));
gateYTween.unshift(new mx.transitions.Tween(this["gate" + currentobject], "_y", mx.transitions.easing.Regular.easeOut, this["gate" + currentobject]._y, s_gates._y + (s_gates._height / 2), animSpeed, true));
gateXTween[0].onMotionFinished = function () {
gate_icon.play();
gateXTween.pop();
gateYTween.pop();
gateATween.pop();
removeMovieClip(gateScoreObjects[gateScoreObjects.length - 1]);
gateScoreObjects.pop();
};
}
function doNoGateCrash(currentobject, whatchunk) {
doAnimateScore();
gameText.gotoAndStop("Missed");
chunkObjects[whatchunk]["ng" + currentobject]._visible = false;
}
function grabBanana(chunk, bannumber) {
snd_bananapickup.start();
t_bananas++;
bananaPoint = {x:chunkObjects[chunk]["b" + bannumber]._x, y:chunkObjects[chunk]["b" + bannumber]._y};
chunkObjects[chunk].localToGlobal(bananaPoint);
removeMovieClip(chunkObjects[chunk]["b" + bannumber]);
bananaScoreObjects.unshift(attachMovie("banana", "banana" + bannumber, this.getNextHighestDepth(), {_x:bananaPoint.x, _y:bananaPoint.y}));
bananaXTween.unshift(new mx.transitions.Tween(this["banana" + bannumber], "_x", mx.transitions.easing.Regular.easeInOut, this["banana" + bannumber]._x, s_bananas._x, animSpeed, true));
bananaYTween.unshift(new mx.transitions.Tween(this["banana" + bannumber], "_y", mx.transitions.easing.Regular.easeInOut, this["banana" + bannumber]._y, s_bananas._y + (s_bananas._height / 2), animSpeed, true));
bananaXTween[0].onMotionFinished = function () {
banana_icon.play();
bananaXTween.pop();
bananaYTween.pop();
bananaATween.pop();
removeMovieClip(bananaScoreObjects[bananaScoreObjects.length - 1]);
bananaScoreObjects.pop();
};
}
function doAnimateScore() {
if ((t_bananas > 0) && (t_gates > 0)) {
mc_score.swapDepths(6000);
gameText.swapDepths(6001);
mc_score._visible = true;
mc_score.a_bananas.text = t_bananas;
mc_score.a_gates.text = t_gates;
mc_score.a_total.text = t_bananas * t_gates;
mc_score.gotoAndPlay(2);
} else {
afterAnim();
}
}
function afterAnim() {
mc_score._visible = false;
t_score = t_score + Number(mc_score.a_total.text);
t_bananas = 0;
t_gates = 0;
mc_score.a_total.text = 0;
mc_score.swapDepths(mc_scoreDepths);
gameText.swapDepths(gameTextDepths);
}
function monkeyBackOnDog() {
if (!gameOver) {
isMounted = true;
droppingDown = false;
player_monkey._visible = false;
jumpStorageValue = player_dog.dog.animate._currentframe;
if ((player_dog.dog._currentframe == 1) || (player_dog.dog._currentframe == 5)) {
player_dog.gotoAndStop(1);
if (scrollSpeed < 19) {
player_dog.dog.gotoAndStop(1);
} else if (scrollSpeed >= 19) {
player_dog.dog.gotoAndStop(5);
}
player_dog.dog.animate.gotoAndPlay(jumpStorageValue);
} else if (player_dog.dog._currentframe == 2) {
player_dog.gotoAndStop(1);
player_dog.dog.gotoAndStop(2);
player_dog.dog.animate.gotoAndPlay(jumpStorageValue);
}
player_dog.dog.animate.arm._visible = false;
player_dog.dog.animate.arm;
}
}
function monkeyReachedTop() {
if ((player_monkey._currentframe != 2) && (!gameOver)) {
topPlatform = true;
player_monkey._visible = true;
if (scrollSpeed <= 18) {
player_monkey.gotoAndStop(1);
} else {
player_monkey.gotoAndStop(6);
}
player_monkey.arm._visible = false;
player_monkey.animate.hand._visible = true;
}
}
function readyToDrop() {
if (!gameOver) {
if ((dontFall == false) || (dogJumpLength >= maxJump)) {
dontFall = false;
player_dog.dog.animate.play();
jumpUpDog = new mx.transitions.Tween(player_dog, "_y", mx.transitions.easing.Regular.easeIn, player_dog._y, dogPosY, jumpSpeed, true);
jumpUpDog.onMotionFinished = mx.utils.Delegate.create(this, dogReachedBottom);
clearInterval(intervalId);
}
}
}
function dogReachedTop() {
intervalId = setInterval(_level0, "readyToDrop", 1);
}
function meetingDoginMiddle() {
if (!gameOver) {
if ((player_monkey._y > (player_dog._y - (player_dog._height / 2))) && (droppingDown)) {
player_monkey._y = player_dog._y - (player_dog._height / 2);
}
}
}
function dogReachedBottom() {
player_dog.dog.animate.arm._visible = false;
player_dog.dog.animate.hand._visible = true;
}
var isPaused = true;
var dogJumpLength = 0;
var pooPoint = new Object();
var pooPoint = new Object();
var bananaPoint = new Object();
var gatePoint = new Object();
var pooObjects = new Array();
var pooNumbers = 0;
var hasFired = false;
var gameOver = false;
var currentChunks = new Array();
var currentChunkOnScreen = false;
var chunkObjects = new Array();
var overlayObjects = new Array();
var foregroundObjects = new Array();
var notFallingOffBottom = false;
var notFallingOffTop = false;
var intervalId;
var intervalId2;
var intervalGameOver;
var dontFall = false;
var cantJump = false;
var topPlatform = false;
var isMounted = true;
var bananaIncrement = 90;
var droppingDown = false;
var dogPosY = player_dog._y;
var monkeyPosY = Math.ceil(player_dog._y - (player_dog._height / 2));
var hitTarget = false;
var t_bananas = 0;
var t_gates = 0;
var t_score = 0;
var jumpStorageValue = 0;
var theBottom = 390;
var theTop = 142;
var dogFalleninHole = false;
var bananaScoreObjects = new Array();
var gateScoreObjects = new Array();
var deathType = undefined;
var initialMonkeyDepth = 0;
var initialDogDepth = 0;
var animSpeed = 0.5;
var snd_bananapickup = new Sound();
snd_bananapickup.attachSound("bananaeat");
var mc_scoreDepths = mc_score.getDepth();
var gameTextDepths = gameText.getDepth();
var jumpSpeed = 0.25;
var jumpHeightDogMax = 295;
var maxJump = 20;
var pooSpeed = 0.5;
var currentChunks = [1, 2, random(15) + 1];
var keyListener = new Object();
Key.addListener(keyListener);
var jumpUpDog = (new mx.transitions.Tween());
var jumpUpMonkey = (new mx.transitions.Tween());
var pooXTween = new Array();
var pooYTween = new Array();
var scoreTween = (new mx.transitions.Tween());
var bananaXTween = new Array();
var bananaYTween = new Array();
var bananaATween = new Array();
var gateXTween = new Array();
var gateYTween = new Array();
var gateATween = new Array();
stop();
player_dog._visible = false;
player_monkey._visible = false;
mc_score._visible = false;
stopAllSounds();
var snd_lvlMusic = new Sound();
snd_lvlMusic.attachSound("lvlMusic");
snd_lvlMusic.start(0, 99);
this.onEnterFrame = function () {
if (!isPaused) {
s_gates.text = t_gates;
s_score.text = t_score;
s_bananas.text = t_bananas;
hitbar_2._y = player_monkey._y;
hitbar_3._y = player_monkey._y - 50;
hitbar_4._y = player_dog._y - 45;
if (!gameOver) {
var _local3 = 0;
while (_local3 < 72) {
if (hitbar_3.hitTest(chunkObjects[0]["b" + _local3])) {
grabBanana(0, _local3);
}
if (hitbar_3.hitTest(chunkObjects[1]["b" + _local3])) {
grabBanana(1, _local3);
}
if (hitbar_4.hitTest(chunkObjects[0]["b" + _local3])) {
grabBanana(0, _local3);
}
if (hitbar_4.hitTest(chunkObjects[1]["b" + _local3])) {
grabBanana(1, _local3);
}
_local3++;
}
_local3 = 0;
while (_local3 < 24) {
if (hitbar_4.hitTest(chunkObjects[0]["cs" + _local3].hit_obj) && (chunkObjects[0]["cs" + _local3].cactus._currentframe == 1)) {
playerDeath("");
break;
}
if (hitbar_4.hitTest(chunkObjects[1]["cs" + _local3].hit_obj) && (chunkObjects[1]["cs" + _local3].cactus._currentframe == 1)) {
playerDeath("");
break;
}
if (hitbar_3.hitTest(chunkObjects[0]["cs" + _local3].hit_obj) && (chunkObjects[0]["cs" + _local3].cactus._currentframe == 1)) {
playerDeath("monkey");
break;
}
if (hitbar_3.hitTest(chunkObjects[1]["cs" + _local3].hit_obj) && (chunkObjects[1]["cs" + _local3].cactus._currentframe == 1)) {
playerDeath("monkey");
break;
}
if (hitbar_4.hitTest(chunkObjects[0]["r" + _local3].hit_obj)) {
playerDeath("");
break;
}
if (hitbar_4.hitTest(chunkObjects[1]["r" + _local3].hit_obj)) {
playerDeath("");
break;
}
if (hitbar_3.hitTest(chunkObjects[0]["r" + _local3].hit_obj) && (chunkObjects[0]["r" + _local3].rock._currentframe == 1)) {
playerDeath("monkey");
break;
}
if (hitbar_3.hitTest(chunkObjects[1]["r" + _local3].hit_obj) && (chunkObjects[1]["r" + _local3].rock._currentframe == 1)) {
playerDeath("monkey");
break;
}
if (hitbar_4.hitTest(chunkObjects[0]["co" + _local3].hit_obj) && (chunkObjects[0]["co" + _local3]._currentframe == 1)) {
playerDeath("");
break;
}
if (hitbar_4.hitTest(chunkObjects[1]["co" + _local3].hit_obj) && (chunkObjects[1]["co" + _local3]._currentframe == 1)) {
playerDeath("");
break;
}
if ((hitbar_3.hitTest(chunkObjects[0]["g" + _local3].hit_obj) && (chunkObjects[0]["g" + _local3]._currentframe == 1)) && (chunkObjects[0]["ng" + _local3]._visible)) {
doGateCrash(_local3, 0);
break;
}
if ((hitbar_3.hitTest(chunkObjects[1]["g" + _local3].hit_obj) && (chunkObjects[1]["g" + _local3]._currentframe == 1)) && (chunkObjects[1]["ng" + _local3]._visible)) {
doGateCrash(_local3, 1);
break;
}
if ((hitbar_4.hitTest(chunkObjects[0]["g" + _local3].hit_obj) && (chunkObjects[0]["g" + _local3]._currentframe == 1)) && (chunkObjects[0]["ng" + _local3]._visible)) {
doGateCrash(_local3, 0);
break;
}
if ((hitbar_4.hitTest(chunkObjects[1]["g" + _local3].hit_obj) && (chunkObjects[1]["g" + _local3]._currentframe == 1)) && (chunkObjects[1]["ng" + _local3]._visible)) {
doGateCrash(_local3, 1);
break;
}
if (hitbar_4.hitTest(chunkObjects[0]["ng" + _local3]) && (chunkObjects[0]["ng" + _local3]._visible)) {
doNoGateCrash(_local3, 0);
break;
}
if (hitbar_4.hitTest(chunkObjects[1]["ng" + _local3]) && (chunkObjects[1]["ng" + _local3]._visible)) {
doNoGateCrash(_local3, 1);
break;
}
if (hitbar_3.hitTest([0]["ng" + _local3]) && (chunkObjects[0]["ng" + _local3]._visible == true)) {
doNoGateCrash(_local3, 0);
break;
}
if (hitbar_3.hitTest([1]["ng" + _local3]) && (chunkObjects[1]["ng" + _local3]._visible == true)) {
doNoGateCrash(_local3, 1);
break;
}
_local3++;
}
if (hitbar_4.hitTest(chunkObjects[0].tb.hit_obj) && (chunkObjects[0].tb._currentframe == 1)) {
playerDeath("");
}
if (hitbar_4.hitTest(chunkObjects[1].tb.hit_obj) && (chunkObjects[1].tb._currentframe == 1)) {
playerDeath("");
}
}
if (!gameOver) {
if ((!monkeyFalling(13, 24)) && (topPlatform == true)) {
topPlatform = false;
jumpUpMonkey = new mx.transitions.Tween(player_monkey, "_y", mx.transitions.easing.Regular.easeIn, player_monkey._y, monkeyPosY, jumpSpeed, true);
jumpUpMonkey.onMotionChanged = mx.utils.Delegate.create(_level0, meetingDoginMiddle);
jumpUpMonkey.onMotionFinished = mx.utils.Delegate.create(_level0, monkeyBackOnDog);
player_monkey.gotoAndStop(5);
player_monkey.arm._visible = false;
droppingDown = true;
cantJump = true;
}
}
if (!gameOver) {
if ((!dogFalling()) && (player_dog._y >= dogPosY)) {
playerDeath("falling");
}
}
if (!gameOver) {
if (currentChunkOnScreen == false) {
chunkObjects[0]._x = chunkObjects[0]._x - scrollSpeed;
chunkObjects[1]._x = chunkObjects[0]._x + chunkObjects[0]._width;
if ((chunkObjects[0]._x + chunkObjects[0]._width) <= 0) {
removeMovieClip(chunkObjects[0]);
removeMovieClip(overlayObjects[0]);
removeMovieClip(foregroundObjects[0]);
createChunk(random(15) + 1, Number(currentChunkOnScreen));
chunkObjects[0]._x = 8000;
currentChunkOnScreen = true;
}
} else if (currentChunkOnScreen == true) {
chunkObjects[1]._x = chunkObjects[1]._x - scrollSpeed;
chunkObjects[0]._x = chunkObjects[1]._x + chunkObjects[1]._width;
if ((chunkObjects[1]._x + chunkObjects[1]._width) <= 0) {
removeMovieClip(chunkObjects[1]);
removeMovieClip(overlayObjects[1]);
removeMovieClip(foregroundObjects[1]);
createChunk(random(15) + 1, Number(currentChunkOnScreen));
chunkObjects[1]._x = 8000;
currentChunkOnScreen = false;
}
}
overlayObjects[0]._x = chunkObjects[0]._x;
overlayObjects[1]._x = chunkObjects[1]._x;
foregroundObjects[0]._x = chunkObjects[0]._x;
foregroundObjects[1]._x = chunkObjects[1]._x;
}
if (!gameOver) {
if (Key.isDown(88)) {
if (isMounted) {
if ((player_dog.dog.animate.arm._currentframe == 1) && (hasFired == false)) {
player_dog.dog.animate.arm._visible = true;
player_dog.dog.animate.arm.gotoAndPlay(2);
player_dog.dog.animate.hand._visible = false;
hasFired = true;
}
} else if (!isMounted) {
if ((player_monkey.arm._currentframe == 1) && (hasFired == false)) {
player_monkey.arm._visible = true;
player_monkey.animate.hand._visible = false;
player_monkey.arm.gotoAndPlay(2);
hasFired = true;
}
}
} else {
hasFired = false;
}
var _local4 = {x:player_monkey.arm._x, y:player_monkey.arm._y};
var _local5 = {x:player_dog.dog.animate.arm._x, y:player_dog.dog.animate.arm._y};
if (!isMounted) {
if (player_monkey.arm._currentframe == 3) {
player_monkey.localToGlobal(_local4);
}
} else if (isMounted) {
if (player_dog.dog.animate.arm._currentframe == 3) {
player_dog.dog.animate.localToGlobal(_local5);
}
}
if ((player_monkey.arm._currentframe == 3) || (player_dog.dog.animate.arm._currentframe == 3)) {
pooNumbers++;
if (player_monkey.arm._currentframe == 3) {
pooObjects.unshift(attachMovie("poo", "poo_create" + pooNumbers, this.getNextHighestDepth(), {_x:_local4.x, _y:_local4.y}));
} else if (player_dog.dog.animate.arm._currentframe == 3) {
pooObjects.unshift(attachMovie("poo", "poo_create" + pooNumbers, this.getNextHighestDepth(), {_x:_local5.x, _y:_local5.y}));
}
pooObjects[0].gotoAndStop(random(pooObjects[pooObjects.length - 1]._totalframes) + 1);
pooXTween.unshift(new mx.transitions.Tween(this["poo_create" + pooNumbers], "_x", null, this["poo_create" + pooNumbers]._x, 800, 20, false));
pooYTween.unshift(new mx.transitions.Tween(this["poo_create" + pooNumbers], "_y", mx.transitions.easing.Regular.easeIn, this["poo_create" + pooNumbers]._y, this["poo_create" + pooNumbers]._y + 100, 20, false));
pooXTween[0].onMotionFinished = function () {
removeMovieClip(pooObjects[pooObjects.length - 1]);
pooObjects.pop();
pooXTween.pop();
pooYTween.pop();
};
}
}
var _local2 = 0;
while (_local2 < pooObjects.length) {
var _local3 = 0;
while (_local3 < 24) {
if (pooObjects[_local2].hitTest(chunkObjects[0]["r" + _local3].hit_obj) && (pooObjects[_local2]._visible)) {
pooCollideRock(_local2, _local3, 0);
break;
}
if (pooObjects[_local2].hitTest(chunkObjects[1]["r" + _local3].hit_obj) && (pooObjects[_local2]._visible)) {
pooCollideRock(_local2, _local3, 1);
break;
}
if ((pooObjects[_local2].hitTest(chunkObjects[0]["cs" + _local3].hit_obj) && (pooObjects[_local2]._visible)) && (chunkObjects[0]["cs" + _local3].cactus._currentframe == 1)) {
pooCollideCactus(_local2, _local3, 0);
break;
}
if ((pooObjects[_local2].hitTest(chunkObjects[1]["cs" + _local3].hit_obj) && (pooObjects[_local2]._visible)) && (chunkObjects[1]["cs" + _local3].cactus._currentframe == 1)) {
pooCollideCactus(_local2, _local3, 1);
break;
}
if (pooObjects[_local2].hitTest(chunkObjects[0]["co" + _local3]) && (pooObjects[_local2]._visible)) {
pooCollideOverhang(_local2, _local3, 0);
break;
}
if (pooObjects[_local2].hitTest(chunkObjects[1]["co" + _local3]) && (pooObjects[_local2]._visible)) {
pooCollideOverhang(_local2, _local3, 1);
break;
}
if ((pooObjects[_local2].hitTest(chunkObjects[0]["g" + _local3].hit_obj) && (pooObjects[_local2]._visible)) && (chunkObjects[0]["g" + _local3]._currentframe == 1)) {
pooCollideGates(_local2, _local3, 0);
break;
}
if ((pooObjects[_local2].hitTest(chunkObjects[1]["g" + _local3].hit_obj) && (pooObjects[_local2]._visible)) && (chunkObjects[1]["g" + _local3]._currentframe == 1)) {
pooCollideGates(_local2, _local3, 1);
break;
}
if (pooObjects[_local2].hit_obj.hitTest(chunkObjects[0]["p" + _local3].hit_obj) && (pooObjects[_local2]._visible)) {
pooCollidePlatforms(_local2, _local3, 0);
break;
}
if (pooObjects[_local2].hit_obj.hitTest(chunkObjects[1]["p" + _local3].hit_obj) && (pooObjects[_local2]._visible)) {
pooCollidePlatforms(_local2, _local3, 1);
break;
}
_local3++;
}
if ((pooObjects[_local2].hitTest(chunkObjects[0].tp.hit_obj) && (pooObjects[_local2]._visible)) && (chunkObjects[0].tp._currentframe == 1)) {
pooCollideTarget(_local2, 0);
break;
}
if ((pooObjects[_local2].hitTest(chunkObjects[1].tp.hit_obj) && (pooObjects[_local2]._visible)) && (chunkObjects[1].tp._currentframe == 1)) {
pooCollideTarget(_local2, 1);
break;
}
if (pooObjects[_local2].hitTest(chunkObjects[0].tb.hit_obj) && (pooObjects[_local2]._visible)) {
pooCollideBarriers(_local2, 0);
break;
}
if (pooObjects[_local2].hitTest(chunkObjects[1].tb.hit_obj) && (pooObjects[_local2]._visible)) {
pooCollideBarriers(_local2, 1);
break;
}
_local2++;
}
if (!gameOver) {
if (Key.isDown(90)) {
dontFall = true;
if (((cantJump == false) && (isMounted)) && (dogJumpLength == 0)) {
cantJump = true;
jumpUpDog = new mx.transitions.Tween(player_dog, "_y", mx.transitions.easing.Regular.easeOut, player_dog._y, jumpHeightDogMax, jumpSpeed, true);
jumpUpDog.onMotionFinished = mx.utils.Delegate.create(_level0, dogReachedTop);
player_dog.dog.gotoAndStop(2);
player_dog.dog.animate.arm._visible = false;
}
if ((((!cantJump) && (!isMounted)) && (dogJumpLength == 0)) && (!topPlatform)) {
cantJump = true;
jumpUpDog = new mx.transitions.Tween(player_dog, "_y", mx.transitions.easing.Regular.easeOut, player_dog._y, jumpHeightDogMax, jumpSpeed, true);
jumpUpDog.onMotionFinished = mx.utils.Delegate.create(_level0, dogReachedTop);
player_dog.dog.gotoAndStop(2);
}
if (((player_dog._y < dogPosY) && (dogJumpLength == 0)) && (isMounted)) {
isMounted = false;
jumpUpMonkey = new mx.transitions.Tween(player_monkey, "_y", mx.transitions.easing.Back.easeOut, player_monkey._y, 143, jumpSpeed, true);
jumpUpMonkey.onMotionFinished = mx.utils.Delegate.create(_level0, monkeyReachedTop);
jumpStorageValue = player_dog.dog.animate._currentframe;
if (jumpStorageValue == 1) {
jumpStorageValue = 10;
}
player_dog.gotoAndStop(2);
player_dog.dog.gotoAndStop(2);
player_dog.dog.animate.gotoAndPlay(jumpStorageValue);
player_monkey._visible = true;
player_monkey.gotoAndStop(3);
player_monkey.arm._visible = false;
}
if ((((dogJumpLength == 0) && (!isMounted)) && (topPlatform)) && (!cantJump)) {
jumpUpMonkey = new mx.transitions.Tween(player_monkey, "_y", mx.transitions.easing.Back.easeIn, player_monkey._y, 250, jumpSpeed, true);
jumpUpMonkey.onMotionFinished = mx.utils.Delegate.create(_level0, monkeyBackOnDog);
topPlatform = false;
droppingDown = true;
jumpUpDog = new mx.transitions.Tween(player_dog, "_y", mx.transitions.easing.Regular.easeOut, player_dog._y, jumpHeightDogMax, jumpSpeed, true);
jumpUpDog.onMotionFinished = mx.utils.Delegate.create(_level0, dogReachedTop);
cantJump = true;
player_monkey.gotoAndStop(5);
player_monkey.arm._visible = false;
player_dog.dog.gotoAndStop(2);
}
dogJumpLength++;
} else {
dontFall = false;
dogJumpLength = 0;
if ((player_dog._y >= (dogPosY - 3)) && (player_dog._y <= (dogPosY + 3))) {
cantJump = false;
if (scrollSpeed < 19) {
player_dog.dog.gotoAndStop(1);
} else if (scrollSpeed >= 19) {
player_dog.dog.gotoAndStop(5);
}
}
}
}
if (isMounted && (!gameOver)) {
player_monkey._y = player_dog._y - (player_dog._height / 2);
}
}
};
Frame 43
var o = {n:[15, 11, 11, 6, 4, 12, 13, 15, 8, 2, 15, 6, 2, 3, 4, 0], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({onClose:function () {
gotoAndStop ("Menu");
}, boardID:boardID, res:"720x400"});
Frame 53
stop();
btn_back.onPress = function () {
gotoAndStop ("Menu");
};
ilb_btn.onPress = function () {
getURL ("http://www.ilovebiscuits.com.au", "_blank");
};
bill_btn.onPress = function () {
getURL (" http://www.linkedin.com/pub/bill-northcott/13/840/158", "_blank");
};
alex_btn.onPress = function () {
getURL ("http://www.alexgrigg.com/", "_blank");
};
Frame 63
var o = {n:[15, 11, 11, 6, 4, 12, 13, 15, 8, 2, 15, 6, 2, 3, 4, 0], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({onClose:function () {
gotoAndStop ("Menu");
}, clip:boardHolder, boardID:boardID, score:t_score, res:"720x400"});
btn_back.onPress = function () {
gotoAndStop ("Menu");
};
btn_play.onPress = function () {
stopAllSounds();
intro_bit.play();
gotoAndPlay ("Game");
};
btn_scores.onPress = function () {
gotoAndStop ("Highscores");
};
Symbol 30 MovieClip Frame 1
gotoAndStop(random(this._totalframes) + 1);
Symbol 40 MovieClip Frame 1
if (this._y < -100) {
gotoAndStop(random(this._totalframes - 1) + 2);
} else {
stop();
}
Symbol 112 MovieClip [poo] Frame 1
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 158 MovieClip [rock] Frame 1
stop();
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 2
var snd_splatter = new Sound();
var whichSound = (random(4) + 1);
snd_splatter.attachSound("ps" + whichSound);
snd_splatter.start();
var snd_cactusImpact = new Sound();
snd_cactusImpact.attachSound("cactus impact");
snd_cactusImpact.start();
Symbol 189 MovieClip Frame 15
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 2
var snd_splatter = new Sound();
var whichSound = (random(4) + 1);
snd_splatter.attachSound("ps" + whichSound);
snd_splatter.start();
var snd_cactusImpact = new Sound();
snd_cactusImpact.attachSound("cactus impact");
snd_cactusImpact.start();
Symbol 203 MovieClip Frame 14
stop();
Symbol 217 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 2
var snd_splatter = new Sound();
var whichSound = (random(4) + 1);
snd_splatter.attachSound("ps" + whichSound);
snd_splatter.start();
var snd_cactusImpact = new Sound();
snd_cactusImpact.attachSound("cactus impact");
snd_cactusImpact.start();
Symbol 217 MovieClip Frame 13
stop();
Symbol 218 MovieClip [cactus_small] Frame 1
stop();
Symbol 219 MovieClip [rock_overhang] Frame 1
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 2
play();
var snd_splatter = new Sound();
var whichSound = (random(4) + 1);
snd_splatter.attachSound("ps" + whichSound);
snd_splatter.start();
Symbol 238 MovieClip Frame 12
gotoAndStop (1);
Symbol 264 MovieClip Frame 4
var snd_windUp = new Sound();
snd_windUp.attachSound("windup");
snd_windUp.start();
Symbol 264 MovieClip Frame 11
var snd_portcullis = new Sound();
snd_portcullis.attachSound("portcullis");
snd_portcullis.start();
Symbol 264 MovieClip Frame 20
stop();
Symbol 265 MovieClip [barrier] Frame 1
stop();
Symbol 267 MovieClip [nogate] Frame 1
stop();
Symbol 305 MovieClip Frame 40
stop();
Symbol 325 MovieClip Frame 23
stop();
Symbol 351 MovieClip Frame 25
stop();
Symbol 352 MovieClip [gateback] Frame 1
stop();
Symbol 352 MovieClip [gateback] Frame 4
stop();
Symbol 392 MovieClip Frame 1
var snd_gateSlow = new Sound();
snd_gateSlow.attachSound("gateSlow");
snd_gateSlow.start();
Symbol 392 MovieClip Frame 40
stop();
Symbol 416 MovieClip Frame 1
var snd_gateMedium = new Sound();
snd_gateMedium.attachSound("gateMedium");
snd_gateMedium.start();
Symbol 416 MovieClip Frame 23
stop();
Symbol 441 MovieClip Frame 1
var snd_gateFast = new Sound();
snd_gateFast.attachSound("gateFast");
snd_gateFast.start();
Symbol 441 MovieClip Frame 25
stop();
Symbol 442 MovieClip [gatefront] Frame 1
stop();
Symbol 464 MovieClip Frame 18
stop();
Symbol 465 MovieClip [target_poo] Frame 1
stop();
Symbol 1150 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local27);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local24 = 11000;
var _local19 = options.ad_timeout;
if (options.skip) {
_local19 = 0;
}
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local15 = _getRes(options);
var _local5 = _local15[0];
var _local14 = _local15[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local7._visible = false;
delete options.no_progress_bar;
} else {
_local7._x = 10;
_local7._y = _local14 - 20;
}
var _local23 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local25 = options.outline;
delete options.outline;
var _local6 = _local7.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local7.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local23);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local8 = _local7.createEmptyMovieClip("_outline", 3);
_local8.lineStyle(0, _local25, 100);
_local8.moveTo(0, 0);
_local8.lineTo(_local5 - 20, 0);
_local8.lineTo(_local5 - 20, 10);
_local8.lineTo(0, 10);
_local8.lineTo(0, 0);
chk.ad_msec = _local24;
chk.ad_timeout = _local19;
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;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local10 = this._parent._parent;
var _local3 = _local10;
while ((!_local3.getBytesTotal()) && (_local3)) {
_local3 = _local3._parent;
}
if (!_local3) {
_local3 = _root;
}
var _local13 = this._parent._mochiad_ctr;
var _local7 = getTimer() - this.started;
var _local5 = false;
var _local6 = _local3.getBytesTotal();
var _local9 = _local3.getBytesLoaded();
var _local4 = (100 * _local9) / _local6;
var _local12 = (100 * _local7) / chk.ad_msec;
var _local11 = this._mochiad_bar._inside;
var _local15 = Math.min(100, Math.min(_local4 || 0, _local12));
_local15 = Math.max(this.last_pcnt, _local15);
this.last_pcnt = _local15;
_local11._xscale = _local15;
options.ad_progress(_local15);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local4}, clip._mochiad._containerLCName);
if (_local4 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local8 = _local13.getBytesTotal();
if ((_local8 > 0) || (typeof(_local8) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local7 > chk.ad_timeout) && (_local4 == 100)) {
options.ad_failed();
_local5 = true;
}
}
if (_local7 > chk.ad_msec) {
_local5 = true;
}
if (((_local6 > 0) && (_local9 >= _local6)) && (_local5)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local10 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local10);
var clip = options.clip;
var _local9 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local3 = clip._mochiad;
_local3.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local11 = _local5[0];
var _local8 = _local5[1];
_local3._x = _local11 * 0.5;
_local3._y = _local8 * 0.5;
var chk = _local3.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local9;
chk.started = getTimer();
chk.showing = false;
_local3.lc.adLoaded = options.ad_loaded;
_local3.lc.adSkipped = options.ad_skipped;
_local3.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
_local3.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local21 = false;
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")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
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();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
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_failed();
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;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
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) {
options.ad_failed();
_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 showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(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 load(options) {
var _local12 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local12);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local6 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local6._mochiad_loaded) {
return(null);
}
var _local11 = options.depth;
delete options.depth;
var mc = _local6.createEmptyMovieClip("_mochiad", _local11);
var _local10 = _getRes(options);
options.res = (_local10[0] + "x") + _local10[1];
options.server = options.server + options.id;
delete options.id;
_local6._mochiad_loaded = true;
if (_local6._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local9 = _local4.server;
delete _local4.server;
var _local13 = _allowDomains(_local9);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = mc;
_local5.name = _local8;
_local5.hostname = _local13;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
mc.lc = _local5;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
_local4.lc = _local8;
_local4.st = getTimer();
if (!options.skip) {
_local4.loadMovie(_local9 + ".swf", "POST");
}
return(mc);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
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++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 1151 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 1152 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.9.4 as2");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
onError("NotConnected");
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError("IOError");
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError(errorCode);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "services" :
mochi.as2.MochiServices.triggerEvent(pkg.event, pkg.args);
break;
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "social" :
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError("IOError");
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError("NotConnected");
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError("NotConnected");
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://link.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static var CONNECTED = "onConnected";
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1153 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function getAchievements(properties) {
mochi.as2.MochiServices.send("events_getAchievements", properties);
}
static function unlockAchievement(properties) {
mochi.as2.MochiServices.send("events_unlockAchievement", properties);
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function showAwards(options) {
mochi.as2.MochiServices.send("events_showAwards", options, null, null);
}
static function setNotifications(style) {
mochi.as2.MochiServices.send("events_setNotifications", style, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startPlay(tag) {
if (tag == undefined) {
tag = "gameplay";
}
mochi.as2.MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null);
}
static function endPlay() {
mochi.as2.MochiServices.send("events_clearRoundID", null, null, null);
}
static function trackEvent(tag, value) {
mochi.as2.MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null);
}
static var ACHIEVEMENTS_OWNED = "AchievementOwned";
static var ACHIEVEMENT_NEW = "AchievementReceived";
static var GAME_ACHIEVEMENTS = "GameAchievements";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var IO_PENDING = "IOPending";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var FORMAT_NONE = "NoForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1154 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function requestFunding(properties) {
mochi.as2.MochiServices.send("social_requestFunding", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1155 MovieClip [__Packages.mochi.as2.MochiSocial] Frame 0
class mochi.as2.MochiSocial
{
function MochiSocial () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("social_hideLoginWidget");
}
static function requestLogin(properties) {
mochi.as2.MochiServices.send("social_requestLogin", properties);
}
static function getFriendsList(properties) {
mochi.as2.MochiServices.send("social_getFriendsList", properties);
}
static function showProfile(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showProfile", options);
}
static function postToStream(properties) {
mochi.as2.MochiServices.send("social_postToStream", properties);
}
static function inviteFriends(properties) {
mochi.as2.MochiServices.send("social_inviteFriends", properties);
}
static function requestFan(properties) {
mochi.as2.MochiServices.send("social_requestFan", properties);
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("social_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var LOGIN_SHOWN = "LoginShown";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var FRIEND_LIST = "FriendsList";
static var PROFILE_DATA = "ProfileData";
static var GAMEPLAY_DATA = "GameplayData";
static var ACTION_CANCELED = "onCancel";
static var ACTION_COMPLETE = "onComplete";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1156 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1157 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1158 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1159 MovieClip [__Packages.mx.transitions.easing.Back] Frame 0
class mx.transitions.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 1160 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 1161 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1162 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
options.clip = mochi.as2.MochiServices.clip;
if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) {
mochi.as2.MochiServices.disconnect();
trace("WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!");
trace("make sure MochiServices.connect is called as early in the application runtime as possible.");
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.as2.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.as2.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.as2.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 1163 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 473 MovieClip Frame 407
_parent.gotoAndStop("Menu");
Symbol 483 MovieClip Frame 1
stop();
Symbol 483 MovieClip Frame 15
stop();
var alternateVals = false;
this.onEnterFrame = function () {
if (!alternateVals) {
sky1._x = sky1._x - (_parent.scrollSpeed / 15);
sky2._x = sky1._x + sky1._width;
if ((sky1._x + sky1._width) <= -10) {
alternateVals = true;
}
} else if (alternateVals) {
sky2._x = sky2._x - (_parent.scrollSpeed / 15);
sky1._x = sky2._x + sky2._width;
if ((sky2._x + sky2._width) <= -10) {
alternateVals = false;
}
}
};
Symbol 487 MovieClip Frame 1
stop();
Symbol 487 MovieClip Frame 15
stop();
Symbol 487 MovieClip Frame 16
stop();
var alternateVals = false;
var dontDo = false;
this.onEnterFrame = function () {
if (!dontDo) {
if (!alternateVals) {
mountains1._x = mountains1._x - (_parent.scrollSpeed / 8);
mountains2._x = mountains1._x + mountains1._width;
if ((mountains1._x + mountains1._width) <= -10) {
alternateVals = true;
}
} else if (alternateVals) {
mountains2._x = mountains2._x - (_parent.scrollSpeed / 8);
mountains1._x = mountains2._x + mountains2._width;
if ((mountains2._x + mountains2._width) <= -10) {
alternateVals = false;
}
}
}
};
Symbol 491 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 15
stop();
Symbol 491 MovieClip Frame 16
stop();
var alternateVals = false;
var dontDo = false;
this.onEnterFrame = function () {
if (!dontDo) {
if (!alternateVals) {
desert1._x = desert1._x - (_parent.scrollSpeed / 3.5);
desert2._x = desert1._x + desert1._width;
if ((desert1._x + desert1._width) <= -10) {
alternateVals = true;
}
} else if (alternateVals) {
desert2._x = desert2._x - (_parent.scrollSpeed / 3.5);
desert1._x = desert2._x + desert2._width;
if ((desert2._x + desert2._width) <= -10) {
alternateVals = false;
}
}
}
};
Symbol 572 MovieClip Frame 2
monkey_anim.monkey_harmonica.play();
Symbol 572 MovieClip Frame 43
_parent.lev_sky.play();
_parent.lev_mountains.play();
_parent.lev_desert.play();
Symbol 572 MovieClip Frame 44
play();
Symbol 572 MovieClip Frame 79
_parent.menu_main.play();
Symbol 572 MovieClip Frame 80
stop();
Symbol 572 MovieClip Frame 81
play();
Symbol 572 MovieClip Frame 145
stop();
_parent.dog_anim_walk.play();
Symbol 591 MovieClip Frame 33
stop();
Symbol 592 MovieClip Frame 14
stop();
Symbol 595 MovieClip Frame 1
btn_game.onPress = function () {
_parent._parent.gotoAndStop("Instructions");
};
Symbol 606 MovieClip Frame 14
stop();
Symbol 610 MovieClip Frame 1
btn_scores.onPress = function () {
_parent._parent.gotoAndStop("Highscores");
};
Symbol 613 MovieClip Frame 14
stop();
Symbol 617 MovieClip Frame 1
btn_credits.onPress = function () {
_parent._parent.gotoAndStop("Credits");
};
Symbol 625 MovieClip Frame 1
stop();
Symbol 625 MovieClip Frame 29
stop();
btn_replay.onPress = function () {
stopAllSounds();
_parent.gotoAndStop("Intro");
};
like_btn.onPress = function () {
getURL ("http://www.facebook.com/ptrooper.ilovebiscuits/", "_blank");
};
Symbol 628 MovieClip Frame 30
gotoAndPlay (1);
Symbol 659 MovieClip Frame 1
stop();
Symbol 659 MovieClip Frame 2
play();
var snd_pooThrow = new Sound();
var whichSound = (random(2) + 1);
snd_pooThrow.attachSound("st" + whichSound);
snd_pooThrow.start();
Symbol 659 MovieClip Frame 6
this._visible = false;
_parent.hand._visible = true;
_parent.animate.hand._visible = true;
Symbol 761 MovieClip Frame 1
var snd_die = new Sound();
snd_die.attachSound("die");
snd_die.start();
Symbol 761 MovieClip Frame 16
var snd_argh = new Sound();
snd_argh.attachSound("argh");
snd_argh.start();
Symbol 761 MovieClip Frame 43
gotoAndPlay (24);
Symbol 796 MovieClip Frame 2
var snd_mdCollide = new Sound();
snd_mdCollide.attachSound("bang2");
snd_mdCollide.start();
Symbol 796 MovieClip Frame 20
stop();
Symbol 842 MovieClip Frame 1
stop();
Symbol 866 MovieClip Frame 11
hand._visible = true;
Symbol 950 MovieClip Frame 4
stop();
Symbol 950 MovieClip Frame 5
play();
Symbol 950 MovieClip Frame 10
_parent.gotoAndStop(1);
Symbol 966 MovieClip Frame 1
var snd_die = new Sound();
snd_die.attachSound("die");
snd_die.start();
Symbol 966 MovieClip Frame 2
var snd_mdCollide = new Sound();
snd_mdCollide.attachSound("bang2");
snd_mdCollide.start();
Symbol 966 MovieClip Frame 19
stop();
Symbol 987 MovieClip Frame 1
stop();
Symbol 987 MovieClip Frame 5
animate.arm._visible = false;
animate.hand._visible = true;
Symbol 1008 MovieClip Frame 4
stop();
Symbol 1008 MovieClip Frame 5
play();
Symbol 1008 MovieClip Frame 11
_parent.gotoAndStop(1);
Symbol 1017 MovieClip Frame 2
var snd_mdCollide = new Sound();
snd_mdCollide.attachSound("bang2");
snd_mdCollide.start();
Symbol 1017 MovieClip Frame 19
stop();
Symbol 1031 MovieClip Frame 1
var snd_die = new Sound();
snd_die.attachSound("die");
snd_die.start();
Symbol 1031 MovieClip Frame 4
var snd_yelp = new Sound();
snd_yelp.attachSound("yelp");
snd_yelp.start();
Symbol 1031 MovieClip Frame 19
gotoAndPlay (8);
Symbol 1041 MovieClip Frame 1
stop();
Symbol 1042 MovieClip Frame 1
stop();
Symbol 1058 MovieClip Frame 1
stop();
Symbol 1058 MovieClip Frame 29
this._visible = false;
_parent.beginLevel();
Symbol 1067 MovieClip Frame 1
stop();
Symbol 1067 MovieClip Frame 43
onAnimComplete();
gotoAndStop (1);
Symbol 1070 MovieClip Frame 1
stop();
Symbol 1073 MovieClip Frame 1
stop();
Symbol 1097 MovieClip Frame 30
_parent.gotoAndStop(1);
Symbol 1106 MovieClip Frame 30
_parent.gotoAndStop(1);
Symbol 1114 MovieClip Frame 30
_parent.gotoAndStop(1);
Symbol 1115 MovieClip Frame 1
stop();
Instance of Symbol 1075 MovieClip in Symbol 1115 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}