Frame 2
if ((_framesloaded > 0) && (_framesloaded == _totalframes)) {
gotoAndPlay ("build");
} else {
var loadProgress = (this.getBytesLoaded() / 1024);
var loadTotal = Math.ceil(this.getBytesTotal() / 1024);
var percent = Math.ceil((loadProgress / loadTotal) * 100);
percentTxt.text = percent;
}
Frame 3
gotoAndPlay ("preload");
Frame 45
function init() {
keyMaster = new com.officemax.MD5();
secret = "I sleep in a drawer.";
attachMovie("armsMC", "wrestleMC", 15, {_x:333.1, _y:732.2});
sendMC.gotoAndPlay("build");
instructions.gotoAndPlay("build");
boost.gotoAndPlay("build");
legalBtns.gotoAndPlay("build");
speechBubble.gotoAndPlay("buildIntro");
moveDeer("up");
slider.gotoAndPlay("build");
building.audioBtn.gotoAndPlay("build");
music = new Music();
deerSound = new DeerSound();
keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 32) {
var _local1 = _level0.slider.calcPower();
if (_local1 >= 0.9) {
_level0.setGoodHits(1);
}
_level0.wrestleMC.fight(_local1);
_level0.slider.alterBar(_local1);
_level0.slider.powerTxt.text = Math.round(_local1 * 100);
_level0.toggleSpaceListener(false);
_level0.keyInt = setInterval(function () {
clearInterval(_level0.keyInt);
_level0.toggleSpaceListener(true);
}, 250);
}
};
keyListener2 = new Object();
keyListener2.onKeyDown = function () {
if (Key.getCode() == 13) {
_level0.wrestleMC.fight(boostStrength);
_level0.wrestleMC.humanArm.gotoAndPlay("buildBulge");
_level0.setGoodHits(0);
_level0.boostActive = false;
_level0.boost.gotoAndPlay("useBoost");
_level0.toggleEnterListener(false);
}
};
}
function checkDeer() {
if (currentDeer != level) {
moveDeer("down");
}
}
function setGoodHits(val) {
if (!boostActive) {
if (val) {
goodHits = goodHits + val;
_level0.boost.gotoAndPlay("level" + goodHits);
if (goodHits == requiredGoodHits) {
initBoost();
}
}
}
if (!val) {
goodHits = 0;
}
}
function initBoost() {
boostActive = true;
toggleEnterListener(true);
}
function initSpeechBubble(obj, mode) {
obj.yesBtn.onRollOver = function () {
this.gotoAndPlay("rollOver");
};
obj.yesBtn.onRollOut = (obj.yesBtn.onReleaseOutside = function () {
this.gotoAndPlay("rollOut");
});
switch (mode) {
case "intro" :
obj.yesBtn.onRelease = function () {
_level0.checkDeer();
this._parent.gotoAndPlay("leaveIntro");
};
break;
case "playerWin" :
obj.yesBtn.onRelease = function () {
_level0.setLevel();
_level0.checkDeer();
this._parent.gotoAndPlay("leavePlayerWin");
var waitInt = setInterval(function () {
clearInterval(waitInt);
_level0.deerHolder.deer.gotoAndPlay("deerStart");
_level0.speechBubble.gotoAndPlay("buildCountdown");
}, 750);
};
break;
case "beatGame" :
obj.yesBtn.onRelease = function () {
_level0.setLevel("reset");
_level0.checkDeer();
this._parent.gotoAndPlay("leave");
var waitInt = setInterval(function () {
clearInterval(waitInt);
_level0.deerHolder.deer.gotoAndPlay("deerStart");
_level0.speechBubble.gotoAndPlay("buildCountdown");
}, 750);
};
break;
case "tryAgain" :
obj.yesBtn.onRelease = function () {
_level0.setLevel("reset");
_level0.checkDeer();
this._parent.gotoAndPlay("leave");
var waitInt = setInterval(function () {
clearInterval(waitInt);
_level0.deerHolder.deer.gotoAndPlay("deerStart");
_level0.speechBubble.gotoAndPlay("buildCountdown");
}, 750);
};
}
}
function initInstructions(obj) {
obj.onRollOver = function () {
this.gotoAndPlay("rollOver");
};
obj.onRollOut = (obj.onReleaseOutside = function () {
this.gotoAndPlay("rollOut");
});
obj.onRelease = function () {
this.gotoAndPlay("buildInstructions");
delete this.onRollOver;
delete this.onRollOut;
delete this.onRelease;
delete this.onReleaseOutside;
obj.closeBtn.onRollOver = function () {
this.gotoAndPlay("rollOver");
};
obj.closeBtn.onRollOut = function () {
this.gotoAndPlay("rollOut");
};
obj.closeBtn.onRelease = function () {
this._parent.gotoAndPlay("leaveInstructions");
};
};
}
function initLegalBtns(obj) {
obj.privacyBtn.onRollOver = function () {
this.gotoAndPlay("rollOver");
};
obj.privacyBtn.onRollOut = (obj.privacyBtn.onReleaseOutside = function () {
this.gotoAndPlay("rollOut");
});
obj.privacyBtn.onRelease = function () {
getURL (PRIVACY_POLICY_URL, "_blank");
};
obj.touBtn.onRollOver = function () {
this.gotoAndPlay("rollOver");
};
obj.touBtn.onRollOut = (obj.touBtn.onReleaseOutside = function () {
this.gotoAndPlay("rollOut");
});
obj.touBtn.onRelease = function () {
getURL (TERMS_OF_USE_URL, "_blank");
};
}
function nextLevel(mode) {
var waitInt = setInterval(function () {
clearInterval(waitInt);
deerSound.toggleGrunts(true);
toggleSpaceListener(true);
slider.initSlider();
wrestleMC.initWrestle();
}, 500);
}
function toggleSpaceListener(val) {
if (val) {
Key.addListener(keyListener);
} else {
Key.removeListener(keyListener);
}
}
function toggleEnterListener(val) {
if (val) {
Key.addListener(keyListener2);
} else {
Key.removeListener(keyListener2);
}
}
function initSendMC(obj) {
obj.swapDepths(16);
obj.senderName.onSetFocus = function () {
onEnterFrame = function () {
Selection.setSelection(0, obj.senderName.text.length);
};
};
obj.senderName.onChanged = (obj.senderName.onKillFocus = function () {
delete onEnterFrame;
});
obj.receiverEmail.onSetFocus = function () {
onEnterFrame = function () {
Selection.setSelection(0, obj.receiverEmail.text.length);
};
};
obj.receiverEmail.onChanged = (obj.receiverEmail.onKillFocus = function () {
delete onEnterFrame;
});
obj.statusTxt.text = "";
obj.sendBtn.onRollOver = function () {
this.gotoAndPlay("rollOver");
};
obj.sendBtn.onRollOut = (obj.sendBtn.onReleaseOutside = function () {
this.gotoAndPlay("rollOut");
});
obj.sendBtn.onRelease = function () {
obj.gotoAndPlay("displayStatus");
obj.statusTxt.text = "Working...";
obj.closeBtn.onRollOver = function () {
this.gotoAndPlay("rollOver");
};
obj.closeBtn.onRollOut = (obj.closeBtn.onReleaseOutside = function () {
this.gotoAndPlay("rollOut");
});
obj.closeBtn.onRelease = function () {
this._parent.gotoAndPlay("leave");
};
var _local2 = new LoadVars();
_local2.action = "sendEmail";
_local2.senderName = obj.senderName.text;
_local2.receiverEmail = obj.receiverEmail.text;
_local2.unkbusterpa = (((((Math.random() * Math.PI) * Math.random()) + _level0.keyArray[Math.floor(Math.random() * 20)]) + _level0.keyArray[Math.ceil(Math.random() * 20)]) + _level0.keyArray[Math.ceil(Math.random() * 20)]) + _level0.keyArray[Math.ceil(Math.random() * 20)];
_local2.azul = _level0.keyMaster.hash(_local2.unkbusterpa + _level0.secret);
receiver = new LoadVars();
receiver.onLoad = function () {
_level0.confirmInfo(obj);
};
_local2.sendAndLoad("inc/send.php", receiver, "post");
};
}
function confirmInfo(obj) {
obj.gotoAndPlay("tabInfo");
obj.statusTxt.text = receiver.statusMsg;
var waitInt = setInterval(function () {
clearInterval(waitInt);
obj.gotoAndPlay("leave");
}, 5000);
}
function moveDeer(dir) {
var _local1 = _level0.wrestleMC;
var _local2 = _level0.deerHolder;
if (dir == "R") {
var _local4 = "_x";
var _local8 = _local1._x;
var _local9 = _local2._x;
var _local6 = 396.2;
var _local7 = 389.1;
} else if (dir == "L") {
var _local4 = "_x";
var _local8 = _local1._x;
var _local9 = _local2._x;
var _local6 = 333.1;
var _local7 = 327.6;
} else if (dir == "up") {
var _local4 = "_y";
var _local8 = _local1._y;
var _local9 = _local2._y;
var _local6 = 322;
var _local7 = 141.2;
} else if (dir == "down") {
var _local4 = "_y";
var _local8 = _local1._y;
var _local9 = _local2._y;
var _local6 = 732;
var _local7 = 585.1;
}
var _local5 = 5;
armTween = new mx.transitions.Tween(_local1, _local4, mx.transitions.easing.None.easeNone, _local8, _local6, _local5, false);
deerTween = new mx.transitions.Tween(_local2, _local4, mx.transitions.easing.None.easeNone, _local9, _local7, _local5, false);
if (dir == "down") {
deerTween.onMotionFinished = function () {
_level0.wrestleMC.removeMovieClip();
delete _level0.deerTween.onMotionFinished;
_level0.deerHolder.gotoAndPlay("deer" + level);
_level0.currentDeer = level;
var waitInt = setInterval(function () {
clearInterval(waitInt);
_level0.attachMovie("armsMC", "wrestleMC", 15, {_x:333.1, _y:732.2});
_level0.moveDeer("up");
}, 50);
};
}
}
function endLevel(playerWon) {
toggleSpaceListener(false);
toggleEnterListener(false);
_level0.moveDeer("L");
deerSound.toggleGrunts(false);
clearInterval(keyInt);
setGoodHits(0);
toggleEnterListener(false);
_level0.boost.gotoAndPlay("level0");
_level0.boostActive = false;
if (playerWon) {
if (level < 3) {
_level0.speechBubble.gotoAndPlay("buildPlayerWin");
_level0.deerHolder.deer.gotoAndPlay("playerWin");
} else {
_level0.speechBubble.gotoAndPlay("buildBeatGame");
_level0.deerHolder.deer.gotoAndPlay("playerWin");
}
} else {
_level0.speechBubble.gotoAndPlay("buildTryAgain");
_level0.deerHolder.deer.gotoAndPlay("playerLose");
}
}
function getLevel() {
return(level);
}
function setPower(val) {
_level0.slider.powerTxt.text = val;
}
function setLevel(mode) {
if (mode != "reset") {
level++;
if (level < 10) {
var _local1 = "0" + level;
} else {
var _local1 = level;
}
} else {
level = 1;
var _local1 = "01";
}
_level0.roundBanner.roundTxt.text = "Round " + _local1;
}
function randNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function output(info) {
_level0.debugTxt.text = _level0.debugTxt.text + ((">> " + info) + newline);
_level0.debugTxt.scroll++;
}
var keyMaster;
var secret;
var keyArray = ["a", "B", "c", "d", "e", "h", "j", "k", "l", "o", "p", "q", "r", "S", "t", "u", "v", "W", "X", "y", "z"];
var receiver;
var keyListener;
var armTween;
var deerTween;
var music;
var deerSound;
var instructInt;
var keyInt;
var currentDeer = 1;
var boostActive = false;
var level = 1;
var goodHits = 0;
var requiredGoodHits = 3;
var boostStrength = 1.5;
var PRIVACY_POLICY_URL = "http://www.about.officemax.com/privacy/";
var TERMS_OF_USE_URL = "terms.html";
Frame 53
_global.myHeight = Stage.height;
_global.myWidth = Stage.width;
loadMovieNum ("tab.swf", 999);
var loadInt = setInterval(function () {
actBytes = _level999.getBytesLoaded() || 0;
totBytes = _level999.getBytesTotal() || 100;
if ((totBytes - actBytes) == 0) {
trace("tab loaded");
clearInterval(loadInt);
var poop = setInterval(function () {
_level999.setNewTabQuoteColor("0xffffff");
clearInterval(poop);
}, 50);
}
}, 50);
stop();
Symbol 339 MovieClip [__Packages.Wrestle] Frame 0
class Wrestle extends MovieClip
{
var clipLength, _totalframes, midPoint, reindeerStrength, fullPowerFrames, gotoAndPlay, waitInt, stop, framesEarned, backInt, _currentframe, gotoAndStop, play;
function Wrestle () {
super();
}
function initWrestle() {
clipLength = _totalframes;
midPoint = Math.round(clipLength / 2);
switch (_level0.getLevel()) {
case 1 :
reindeerStrength = 6;
break;
case 2 :
reindeerStrength = 8.1;
break;
case 3 :
reindeerStrength = 12;
break;
default :
reindeerStrength = 5;
}
fullPowerFrames = Math.round(clipLength / reindeerStrength);
gotoAndPlay(midPoint);
}
function stopIt() {
clearInterval(waitInt);
stop();
}
function fight(power) {
framesEarned = Math.round(power * fullPowerFrames);
backInt = setInterval(this, "playBackwards", 25);
}
function playBackwards() {
if (framesEarned > 0) {
if (_currentframe >= 3) {
gotoAndStop(_currentframe - 1);
framesEarned--;
}
} else {
clearInterval(backInt);
if ((_currentframe <= (clipLength - 1)) && (_currentframe > 2)) {
play();
}
}
}
function playerWin() {
clearInterval(backInt);
gotoAndStop("playerWin");
_level0.slider.stopBar();
_level0.endLevel(true);
}
function playerLose() {
clearInterval(backInt);
gotoAndStop("playerLose");
_level0.slider.stopBar();
_level0.endLevel(false);
}
}
Symbol 340 MovieClip [__Packages.com.officemax.MD5] Frame 0
class com.officemax.MD5
{
function MD5 (b64pad, chrsz) {
if (b64pad != undefined) {
this.b64pad = b64pad;
}
if (((chrsz != undefined) && (chrsz == 8)) || (chrsz == 16)) {
this.chrsz = chrsz;
}
}
function hash(s) {
return(hex_md5(s));
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(Array(_local5, _local4, _local3, _local2));
}
function core_hmac_md5(key, data) {
var _local3 = new Array(str2binl(key));
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = new Array(16);
var _local5 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = new Array(core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz)));
return(core_md5(_local5.concat(_local6), 640));
}
function safe_add(x, y) {
var _local1 = new Number((x & 65535) + (y & 65535));
var _local2 = new Number(((x >> 16) + (y >> 16)) + (_local1 >> 16));
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = new Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = new String("");
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local3 = "0123456789abcdef";
var _local4 = new String("");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = new String("");
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
var b64pad = new String("");
var chrsz = new Number(8);
}
Symbol 341 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 342 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 343 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 344 MovieClip [__Packages.DeerSound] Frame 0
class DeerSound
{
var trashClips1, playerWinClips1, playerLoseClips1, trashClips2, playerWinClips2, playerLoseClips2, trashClips3, playerWinClips3, playerLoseClips3, randSound, randDelay;
function DeerSound () {
trashClips1 = new Array("normalTrash_armWrestle", "normalTrash_fireplace", "normalTrash_huntingHumans");
playerWinClips1 = new Array("normalLose_poorLittle", "normalLose_hunting", "normalLose_tie");
playerLoseClips1 = new Array("normalWin_buttStomped", "normalWin_comeBack", "normalWin_youStuffed");
trashClips2 = new Array("redneckTrash_carl", "redneckTrash_cmon", "redneckTrash_prancer");
playerWinClips2 = new Array("redneckLose_Dang", "redneckLose_fancy", "redneckLose_lucky");
playerLoseClips2 = new Array("redneckWin_closeRange", "redneckWin_fawn", "redneckWin_fur");
trashClips3 = new Array("nerdTrash_greetings", "nerdTrash_idont", "nerdTrash_muscle");
playerWinClips3 = new Array("nerdLose_cruelty", "nerdLose_wedgie");
playerLoseClips3 = new Array("nerdWin_12gauge", "nerdWin_bigMan", "nerdWin_pencil");
randSound = new Sound();
}
function toggleGrunts(val) {
if (val) {
var _local2 = _level0.randNum(MIN_RAND_TIME, MAX_RAND_TIME);
randDelay = setInterval(this, "playGrunt", _local2);
} else {
clearInterval(randDelay);
}
gruntsActive = val;
}
function playGrunt(whichArray) {
var _local4 = this;
clearInterval(randDelay);
switch (_level0.level) {
case 1 :
var _local3 = NUM_GRUNTS_1;
break;
case 2 :
_local3 = NUM_GRUNTS_2;
break;
case 3 :
_local3 = NUM_GRUNTS_3;
}
var _local2 = _level0.randNum(1, _local3);
_level0.deerHolder.deer.gotoAndPlay("grunt0" + _local2);
if (gruntsActive) {
toggleGrunts(true);
}
}
function playSpeech(eventType) {
var thisClass = this;
var _local4 = new String((eventType + "Clips") + _level0.level);
var _local2 = thisClass[_local4];
var _local3 = _level0.randNum(0, _local2.length - 1);
randSound.onSoundComplete = function () {
if (thisClass.speechClipsPlaying == 1) {
_level0.deerHolder.deer.stop();
}
thisClass.speechClipsPlaying--;
_level0.disp.text = thisClass.speechClipsPlaying;
};
randSound.attachSound(_local2[_local3]);
randSound.start();
speechClipsPlaying++;
_level0.disp.text = speechClipsPlaying;
}
var gruntsActive = false;
var speechClipsPlaying = 0;
var MIN_RAND_TIME = 2750;
var MAX_RAND_TIME = 3250;
var NUM_GRUNTS_1 = 4;
var NUM_GRUNTS_2 = 3;
var NUM_GRUNTS_3 = 3;
var NUM_TRASH_CLIPS_1 = 4;
var NUM_TRASH_CLIPS_2 = 3;
var NUM_TRASH_CLIPS_3 = 3;
}
Symbol 345 MovieClip [__Packages.Music] Frame 0
class Music
{
var bgSound;
function Music () {
bgSound = new Sound();
toggleMusic();
_level0.building.audioBtn.onRelease = function () {
_level0.music.toggleMusic();
};
}
function toggleMusic() {
var thisClass = this;
if (bgSoundActive) {
bgSound.stop();
bgSoundActive = false;
_level0.building.audioBtn.gotoAndPlay("audioOff");
} else {
bgSound.loadSound(BG_MUSIC, true);
bgSound.onSoundComplete = function () {
this.loadSound(thisClass.BG_MUSIC, true);
};
bgSoundActive = true;
_level0.building.audioBtn.gotoAndPlay("audioOn");
}
}
var bgSoundActive = false;
var BG_MUSIC = "inc/bg.mp3";
}
Symbol 346 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 347 MovieClip [__Packages.Slider] Frame 0
class Slider extends MovieClip
{
var waitInt, barSpeed, power, alterTween, barTween;
function Slider () {
super();
}
function initSlider(delay) {
if (!delay) {
delay = 0;
}
waitInt = setInterval(this, "startSlider", delay);
}
function startSlider() {
clearInterval(waitInt);
moveTarget();
barSpeed = 300 + (_level0.getLevel() * 50);
moveBar();
}
function moveTarget() {
var _local2 = this;
var _local4 = _local2.railBG._x + 30;
var _local3 = (_local2.railBG._width - _local2.targ._width) - 20;
_local2.targ._x = randNum(_local4, _local3);
_local2.targ.gotoAndPlay("build");
}
function calcPower() {
var _local2 = this;
var _local3 = _local2.targ;
var _local5 = getBarPos() + (_local2.bar._width / 2);
var _local4 = _local3._x + (_local3._width / 2);
var _local6 = Math.abs(_local4 - _local5);
power = Math.max(1 - (_local6 / TARGET_WIDTH), 0);
_local2.powerTxt.text = Math.round(power * 100);
_local2.targ.gotoAndPlay("leave");
moveTarget();
return(power);
}
function alterBar(targA) {
var thisClass = this;
var _local3 = thisClass.bar.barOver._alpha;
var _local2 = Math.round(targA * 100);
alterTween = new mx.transitions.Tween(thisClass.bar.barOver, "_alpha", mx.transitions.easing.Strong.easeIn, _local3, _local2, ALPHA_TIME, false);
alterTween.onMotionFinished = function () {
thisClass.bar.barOver._alpha = 0;
};
}
function moveBar() {
var thisClass = this;
var _local3 = getBarPos();
if (direction == "left") {
var _local2 = thisClass.railBG._x + 30;
} else {
var _local2 = (thisClass.railBG._width - thisClass.bar._width) - 20;
}
var _local5 = Math.abs(getBarPos() - _local2);
var _local4 = _local5 / barSpeed;
barTween = new mx.transitions.Tween(thisClass.bar, "_x", mx.transitions.easing.None.easeNone, _local3, _local2, _local4, true);
barTween.onMotionFinished = function () {
thisClass.swapDirection();
thisClass.moveBar();
};
}
function stopBar() {
barTween.stop();
}
function swapDirection(dir) {
if (dir) {
direction = dir;
} else if (direction == "left") {
direction = "right";
} else if (direction == "right") {
direction = "left";
}
}
function getBarPos() {
var _local2 = this;
return(_local2.bar._x);
}
function randNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
var direction = "left";
var ALPHA_TIME = 8;
var DELAY_TIME = 50;
var TARGET_WIDTH = 50;
}
Symbol 348 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 43
stop();
Symbol 45 MovieClip [armsMC] Frame 1
#initclip 11
Object.registerClass("armsMC", Wrestle);
#endinitclip
stop();
Symbol 45 MovieClip [armsMC] Frame 2
playerWin();
stop();
Symbol 45 MovieClip [armsMC] Frame 49
humanArm.gotoAndPlay("buildBulge");
Symbol 45 MovieClip [armsMC] Frame 120
humanArm.gotoAndPlay("buildBulge");
Symbol 45 MovieClip [armsMC] Frame 161
playerLose();
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 9
stop();
Symbol 52 MovieClip Frame 21
stop();
Symbol 52 MovieClip Frame 31
stop();
Symbol 95 MovieClip Frame 64
stop();
Symbol 162 MovieClip Frame 88
stop();
Symbol 163 MovieClip Frame 2
var introSound = new Sound();
introSound.attachSound("bumper");
introSound.start();
var waitIntG = setInterval(function () {
clearInterval(waitIntG);
_level0.deerHolder.deer.gotoAndPlay("deerStart");
}, 7500);
Symbol 163 MovieClip Frame 37
_level0.init();
stop();
Symbol 163 MovieClip Frame 50
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 7
stop();
Symbol 167 MovieClip Frame 16
stop();
Symbol 181 MovieClip [slider] Frame 1
#initclip 12
Object.registerClass("slider", Slider);
#endinitclip
stop();
Symbol 181 MovieClip [slider] Frame 10
_level0.roundBanner.gotoAndPlay("build");
stop();
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 6
stop();
Symbol 226 MovieClip Frame 4
stop();
Symbol 226 MovieClip Frame 10
_level0.output("playing deer 1 trash");
_level0.deerSound.playSpeech("trash");
Symbol 226 MovieClip Frame 16
Symbol 226 MovieClip Frame 111
stop();
Symbol 226 MovieClip Frame 116
_level0.deerSound.playSpeech("playerLose");
Symbol 226 MovieClip Frame 243
stop();
Symbol 226 MovieClip Frame 245
_level0.deerSound.playSpeech("playerWin");
Symbol 226 MovieClip Frame 399
stop();
Symbol 226 MovieClip Frame 470
stop();
Symbol 226 MovieClip Frame 496
stop();
Symbol 226 MovieClip Frame 575
stop();
Symbol 226 MovieClip Frame 680
stop();
Symbol 233 MovieClip Frame 9
stop();
Symbol 233 MovieClip Frame 10
_level0.deerSound.playSpeech("trash");
Symbol 233 MovieClip Frame 13
Symbol 233 MovieClip Frame 160
stop();
Symbol 233 MovieClip Frame 165
_level0.deerSound.playSpeech("playerWin");
Symbol 233 MovieClip Frame 290
stop();
Symbol 233 MovieClip Frame 294
_level0.deerSound.playSpeech("playerLose");
Symbol 233 MovieClip Frame 446
stop();
Symbol 233 MovieClip Frame 525
stop();
Symbol 233 MovieClip Frame 632
stop();
Symbol 233 MovieClip Frame 680
stop();
Symbol 246 MovieClip Frame 17
stop();
Symbol 246 MovieClip Frame 18
_level0.deerSound.playSpeech("trash");
Symbol 246 MovieClip Frame 21
Symbol 246 MovieClip Frame 143
stop();
Symbol 246 MovieClip Frame 146
_level0.deerSound.playSpeech("playerWin");
Symbol 246 MovieClip Frame 271
stop();
Symbol 246 MovieClip Frame 274
_level0.deerSound.playSpeech("playerLose");
Symbol 246 MovieClip Frame 414
stop();
Symbol 246 MovieClip Frame 498
stop();
Symbol 246 MovieClip Frame 551
stop();
Symbol 246 MovieClip Frame 578
stop();
Symbol 247 MovieClip Frame 2
stop();
Symbol 247 MovieClip Frame 11
stop();
Symbol 247 MovieClip Frame 30
stop();
Symbol 274 MovieClip Frame 10
stop();
Symbol 274 MovieClip Frame 20
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 9
stop();
Symbol 276 MovieClip Frame 26
stop();
Symbol 276 MovieClip Frame 39
stop();
Symbol 276 MovieClip Frame 52
stop();
Symbol 276 MovieClip Frame 58
stop();
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 12
stop();
Symbol 281 MovieClip Frame 22
stop();
Symbol 281 MovieClip Frame 31
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 12
stop();
Symbol 296 MovieClip Frame 22
stop();
Symbol 296 MovieClip Frame 31
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 13
stop();
Symbol 301 MovieClip Frame 23
stop();
Symbol 303 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 6
_level0.initSpeechBubble(this, "intro");
stop();
Symbol 303 MovieClip Frame 19
this.gotoAndPlay("buildCountdown");
Symbol 303 MovieClip Frame 23
stop();
Symbol 303 MovieClip Frame 32
stop();
Symbol 303 MovieClip Frame 42
var waitInt = setInterval(function () {
clearInterval(waitInt);
play();
}, 750);
stop();
Symbol 303 MovieClip Frame 44
var waitInt = setInterval(function () {
clearInterval(waitInt);
play();
}, 750);
stop();
Symbol 303 MovieClip Frame 46
var waitInt = setInterval(function () {
clearInterval(waitInt);
play();
}, 750);
stop();
Symbol 303 MovieClip Frame 48
_level0.moveDeer("R");
_level0.nextLevel(null, false);
Symbol 303 MovieClip Frame 51
stop();
Symbol 303 MovieClip Frame 53
stop();
Symbol 303 MovieClip Frame 62
_level0.initSpeechBubble(this, "playerWin");
stop();
Symbol 303 MovieClip Frame 81
stop();
Symbol 303 MovieClip Frame 84
stop();
Symbol 303 MovieClip Frame 92
_level0.initSpeechBubble(this, "tryAgain");
stop();
Symbol 303 MovieClip Frame 111
stop();
Symbol 303 MovieClip Frame 115
stop();
Symbol 303 MovieClip Frame 123
_level0.initSpeechBubble(this, "beatGame");
stop();
Symbol 303 MovieClip Frame 142
stop();
Symbol 303 MovieClip Frame 145
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 13
stop();
Symbol 308 MovieClip Frame 23
stop();
Symbol 313 MovieClip Frame 1
stop();
Symbol 313 MovieClip Frame 7
_level0.initInstructions(this);
stop();
Symbol 313 MovieClip Frame 19
stop();
Symbol 313 MovieClip Frame 29
stop();
Symbol 313 MovieClip Frame 46
stop();
Symbol 313 MovieClip Frame 62
gotoAndStop ("hold");
Symbol 322 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 14
stop();
Symbol 322 MovieClip Frame 24
stop();
Symbol 322 MovieClip Frame 34
stop();
Symbol 328 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 14
stop();
Symbol 328 MovieClip Frame 24
stop();
Symbol 333 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 9
_level0.initSendMC(this);
stop();
Symbol 333 MovieClip Frame 20
stop();
Symbol 333 MovieClip Frame 30
stop();
Symbol 333 MovieClip Frame 40
stop();
Symbol 335 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 10
stop();
Symbol 335 MovieClip Frame 20
stop();
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 10
stop();
Symbol 337 MovieClip Frame 20
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 5
_level0.initLegalBtns(this);
stop();
Symbol 338 MovieClip Frame 13
stop();
Symbol 338 MovieClip Frame 23
stop();