Frame 2
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);
}
MochiAd.showInterLevelAd({id:"fa944ee0f96820ba", res:"550x400", no_bg:true});
__com_mochibot__("c7f00ed3", this, 10301, true);
mochi.MochiServices.connect("fa944ee0f96820ba");
Frame 3
_root.timerMax = 300;
var saveobj = new Gamesaves();
if (saveobj.checkResume()) {
trace("Loading ..");
saveobj.gameLoad();
saveobj.postLoad();
} else {
trace("Creating ..");
_root.totalscore = 0;
_root.level = 0;
}
function music(whichMusic) {
menuMusic.stop();
gameMusic.stop();
gameOverMusic.stop();
winMusic.stop();
_root[whichMusic].start(0, 99999);
_root.currentMusic = whichMusic;
}
_root.depth = new Object();
_root.depth.music = 9050;
_root.createEmptyMovieClip("menuMusicObj", _root.depth.music + 1);
var menuMusic = new Sound(menuMusicObj);
menuMusic.attachSound("menuMusic.wav");
_root.createEmptyMovieClip("gameMusicObj", _root.depth.music + 2);
var gameMusic = new Sound(gameMusicObj);
gameMusic.attachSound("Jingle Bells 3.mp3");
_root.createEmptyMovieClip("gameOverMusicObj", _root.depth.music + 3);
win.wav;
var gameOverMusic = new Sound(gameOverMusicObj);
gameOverMusic.attachSound("Jingle Bells 4.wav");
_root.createEmptyMovieClip("mouseOverSoundObj", _root.depth.music + 4);
var mouseOverSound = new Sound(mouseOverSoundObj);
mouseOverSound.attachSound("CLICK021");
_root.createEmptyMovieClip("mouseUpSoundObj", _root.depth.music + 5);
var mouseUpSound = new Sound(mouseUpSoundObj);
mouseUpSound.attachSound("CLICK026");
_root.createEmptyMovieClip("winMusicObj", _root.depth.music + 6);
var winMusic = new Sound(winMusicObj);
winMusic.attachSound("win.wav");
_root.createEmptyMovieClip("timeSoundObj", _root.depth.music + 9);
var timeSound = new Sound(timeSoundObj);
timeSound.attachSound("treasure.wav");
_root.createEmptyMovieClip("win2SoundObj", _root.depth.music + 10);
var win2Sound = new Sound(win2SoundObj);
win2Sound.attachSound("crowdapplause.wav");
_root.createEmptyMovieClip("scoreSoundObj", _root.depth.music + 11);
var scoreSound = new Sound(scoreSoundObj);
scoreSound.attachSound("yeehaw.wav");
_root.musicOn = true;
f_musicOn = function () {
menuMusic.setVolume(100);
gameMusic.setVolume(100);
gameOverMusic.setVolume(100);
winMusic.setVolume(100);
mouseOverSound.setVolume(100);
mouseUpSound.setVolume(100);
timeSound.setVolume(100);
win2Sound.setVolume(100);
scoreSound.setVolume(100);
};
f_musicOff = function () {
menuMusic.setVolume(0);
gameMusic.setVolume(0);
gameOverMusic.setVolume(0);
winMusic.setVolume(0);
mouseOverSound.setVolume(0);
mouseUpSound.setVolume(0);
timeSound.setVolume(0);
win2Sound.setVolume(0);
scoreSound.setVolume(0);
};
option_soundControl = function () {
if (_root.musicOn == true) {
_root.b_musicOn._visible = false;
_root.b_musicOff._visible = true;
} else {
_root.b_musicOn._visible = true;
_root.b_musicOff._visible = false;
}
};
Frame 4
function gotoMySite() {
getURL ("http://www.nobstudio.com", "_blank");
}
stop();
_root.time_t = (_root.timer + "/") + _root.timerMax;
_root.newgameMC._visible = false;
_root.b_nobstudio.onRelease = function () {
mouseUpSound.start();
getURL ("http://www.nobstudio.com", "_blank");
};
_root.b_girlgames.onRelease = function () {
mouseUpSound.start();
getURL ("http://www.girlgames.com/", "_blank");
};
_root.b_startGame.onRollOver = function () {
mouseOverSound.start();
};
_root.b_moregames.onRollOver = function () {
mouseOverSound.start();
};
_root.b_moregames.onRelease = function () {
mouseUpSound.start();
getURL ("http://www.girlgames.com/", "_blank");
};
_root.b_startGame.onRelease = function () {
mouseUpSound.start();
_root.newgameMC._visible = true;
_root.newgameMC.b_yes.onRollOver = function () {
mouseOverSound.start();
};
_root.newgameMC.b_yes.onRelease = function () {
mouseUpSound.start();
_root.level = 0;
_root.totalscore = 0;
_root.gotoAndStop("game");
};
_root.newgameMC.b_no.onRollOver = function () {
mouseOverSound.start();
};
_root.newgameMC.b_no.onRelease = function () {
mouseUpSound.start();
_root.newgameMC._visible = false;
};
};
if ((_root.level <= 10) and (_root.level != 0)) {
_root.b_continue.onRollOver = function () {
mouseOverSound.start();
};
_root.b_continue.onRelease = function () {
mouseUpSound.start();
_root.level = _root.level - 1;
_root.gotoAndStop("game");
};
} else {
_root.b_continue._alpha = 50;
_root.b_continue.enabled = false;
}
_root.b_credits.onRollOver = function () {
mouseOverSound.start();
};
_root.b_credits.onRelease = function () {
mouseUpSound.start();
_root.gotoAndStop("credit");
};
music("menuMusic");
trace(_root.totalscore);
trace(_root.level);
_root.s1.s.stop();
_root.s2.s.stop();
_root.s3.s.stop();
_root.s4.s.stop();
_root.s5.s.stop();
_root.s6.s.stop();
_root.s7.s.stop();
_root.s8.s.stop();
_root.s9.s.stop();
_root.s10.s.stop();
_root.s11.s.stop();
_root.s12.s.stop();
_root.s1.maxtimer = 60;
_root.s1.onEnterFrame = function () {
_root.s1.timer = _root.s1.timer - 1;
if (_root.s1.timer <= 0) {
_root.s1.timer = _root.s1.maxtimer;
if (_root.s1.s._currentframe == _root.s1.s._totalframes) {
_root.s1.s.gotoAndStop(1);
_root.s2.s.gotoAndStop(1);
_root.s3.s.gotoAndStop(1);
_root.s4.s.gotoAndStop(1);
_root.s5.s.gotoAndStop(1);
_root.s6.s.gotoAndStop(1);
_root.s7.s.gotoAndStop(1);
_root.s8.s.gotoAndStop(1);
_root.s9.s.gotoAndStop(1);
_root.s10.s.gotoAndStop(1);
_root.s11.s.gotoAndStop(1);
_root.s12.s.gotoAndStop(1);
} else {
_root.s1.s.nextFrame();
_root.s2.s.nextFrame();
_root.s3.s.nextFrame();
_root.s4.s.nextFrame();
_root.s5.s.nextFrame();
_root.s6.s.nextFrame();
_root.s7.s.nextFrame();
_root.s8.s.nextFrame();
_root.s9.s.nextFrame();
_root.s10.s.nextFrame();
_root.s11.s.nextFrame();
_root.s12.s.nextFrame();
}
}
};
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var mySiteLink = new ContextMenuItem("Copyrighted \u00A9 2008 Nob Studio", gotoMySite);
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
Frame 5
_root.b_menu.onRollOver = function () {
mouseOverSound.start();
};
_root.b_menu.onRelease = function () {
mouseUpSound.start();
_root.gotoAndStop("menu");
};
_root.b_nobstudio.onRelease = function () {
mouseUpSound.start();
getURL ("http://www.nobstudio.com", "_blank");
};
Frame 6
music("winMusic");
_root.b_submit.onRollOver = function () {
mouseOverSound.start();
};
_root.b_submit.onRelease = function () {
function closeLeaderboard() {
trace("do nothing");
}
mouseUpSound.start();
mochi.MochiScores.showLeaderboard({boardID:"f036e66482b00ddf", score:_root.totalscore, onClose:closeLeaderboard});
trace("send score : " + _root.totalscore);
this.enabled = false;
this._visible = false;
};
_root.b_girlgames.onRelease = function () {
mouseUpSound.start();
getURL ("http://www.girlgames.com/", "_blank");
};
_root.b_menu2.onRollOver = function () {
mouseOverSound.start();
};
_root.b_menu2.onRelease = function () {
mouseUpSound.start();
_root.gotoAndStop("menu");
};
Frame 7
music("gameMusic");
_root.quitMC._visible = false;
_root.timer = _root.timerMax;
var glow = (new flash.filters.GlowFilter(16777215, 1, 10, 10, 5, 3));
var myFilters = new Array();
myFilters.push(glow);
counter = function () {
_root.timer = _root.timer - 1;
_root.timeBar._xscale = _root.timer / 3;
if (_root.timer < 0) {
_root.levelMC._visible = true;
_root.levelMC.gotoAndStop("lose");
clearInterval(_root.intervalId2);
_root.b_menu._visible = true;
_root.levelMC.onPress = function () {
mouseUpSound.start();
_root.levelMC._visible = false;
levelUp_f();
_root.b_menu._visible = false;
};
}
};
_root.b_musicOn.onRollOver = function () {
mouseOverSound.start();
};
_root.b_musicOn.onRelease = function () {
_root.musicOn = true;
option_soundControl();
f_musicOn();
mouseUpSound.start();
};
_root.b_musicOff.onRollOver = function () {
mouseOverSound.start();
};
_root.b_musicOff.onRelease = function () {
_root.musicOn = false;
option_soundControl();
f_musicOff();
mouseUpSound.start();
};
option_soundControl();
_root.b_zoomIn.onRollOver = function () {
mouseOverSound.start();
};
_root.b_zoomIn.onRelease = function () {
mouseUpSound.start();
_root.g._xscale = 60;
_root.g._yscale = 60;
checkBtm();
checkTop();
checkRight();
checkLeft();
};
_root.b_zoomOut.onRollOver = function () {
mouseOverSound.start();
};
_root.b_zoomOut.onRelease = function () {
mouseUpSound.start();
_root.g._xscale = 100;
_root.g._yscale = 100;
checkBtm();
checkTop();
checkRight();
checkLeft();
};
_root.b_menu.onRollOver = function () {
mouseOverSound.start();
};
_root.b_menu.onPress = function () {
mouseUpSound.start();
_root.quitMC._visible = true;
_root.quitMC.b_yes.onRollOver = function () {
mouseOverSound.start();
};
_root.quitMC.b_yes.onRelease = function () {
mouseUpSound.start();
_root.gotoAndStop("menu");
};
_root.quitMC.b_no.onRollOver = function () {
mouseOverSound.start();
};
_root.quitMC.b_no.onRelease = function () {
mouseUpSound.start();
_root.quitMC._visible = false;
};
};
_root.b_num.onRollOver = function () {
mouseOverSound.start();
};
_root.b_num.onPress = function () {
mouseUpSound.start();
_root.levelMC._visible = true;
clearInterval(_root.intervalId2);
_root.b_menu._visible = true;
_root.levelMC.onPress = function () {
mouseUpSound.start();
_root.levelMC._visible = false;
_root.intervalId2 = setInterval(_root, "counter", 1000);
_root.b_menu._visible = false;
};
};
_root.speed = 3;
totalBoxSetup_f = function (whichMap) {
if (whichMap == 1) {
_root.totalBox = 1;
} else if (whichMap == 2) {
_root.totalBox = 2;
} else if (whichMap == 3) {
_root.totalBox = 4;
} else if (whichMap == 4) {
_root.totalBox = 6;
} else if (whichMap == 5) {
_root.totalBox = 8;
}
var _local2 = 1;
while (_local2 <= _root.totalBox) {
_root["allChars" + _local2] = new Array();
_root["answers" + _local2] = new Array();
_local2++;
}
};
randomSanta = function (whichset, whichBox, which, middle) {
var _local7 = random(12) + 1;
if ((middle == undefined) and (_root.g[whichset]["box" + whichBox]["c" + which] != undefined)) {
_root["allChar" + whichset].push(_root.g[whichset]["box" + whichBox]["c" + which]);
_root.g[whichset]["box" + whichBox]["c" + which].gotoAndStop(_local7);
_root.g[whichset]["box" + whichBox]["c" + which].s.s.stop();
_root.g[whichset]["box" + whichBox]["c" + which].onRollOver = function () {
this.filters = myFilters;
};
_root.g[whichset]["box" + whichBox]["c" + which].onRollOut = function () {
this.filters = undefined;
};
_root.g[whichset]["box" + whichBox]["c" + which].onPress = function () {
this.filters = undefined;
if (this.answer == true) {
scoreSound.start();
this.answer = undefined;
_root.spawn = _root.spawn - 1;
_root["spawn" + this.spawn] = _root["spawn" + this.spawn] - 1;
_root.requirement_t = (_root.spawn + "/") + _root.spawnTotal;
trace(_root.spawn);
this.s.s.gotoAndStop(1);
if (_root.spawn <= 0) {
win_f();
}
} else if (this.timeExtend == true) {
timeSound.start();
_root.timer = _root.timer + 31;
this.timeExtend = undefined;
this.s.s.gotoAndStop(1);
_root.timeExtendedMC._visible = true;
_root.timeExtendedMC.gotoAndPlay(1);
if (_root.timer > _root.timerMax) {
_root.timer = _root.timerMax;
counter();
}
} else if (this.bonus == true) {
timeSound.start();
_root.score = _root.score + 500;
this.bonus = undefined;
this.s.s.gotoAndStop(1);
_root.bonusMC._visible = true;
_root.bonusMC.gotoAndPlay(1);
}
};
} else if ((middle == "f") and (_root.g[whichset]["box" + whichBox][middle]["c" + which] != undefined)) {
_root["allChar" + whichset].push(_root.g[whichset]["box" + whichBox][middle]["c" + which]);
_root.g[whichset]["box" + whichBox][middle]["c" + which].gotoAndStop(_local7);
_root.g[whichset]["box" + whichBox][middle]["c" + which].s.s.stop();
_root.g[whichset]["box" + whichBox][middle]["c" + which].onRollOver = function () {
this.filters = myFilters;
};
_root.g[whichset]["box" + whichBox][middle]["c" + which].onRollOut = function () {
this.filters = undefined;
};
_root.g[whichset]["box" + whichBox][middle]["c" + which].onPress = function () {
this.filters = undefined;
if (this.answer == true) {
scoreSound.start();
this.answer = undefined;
_root.spawn = _root.spawn - 1;
_root["spawn" + this.spawn] = _root["spawn" + this.spawn] - 1;
_root.requirement_t = (_root.spawn + "/") + _root.spawnTotal;
trace(_root.spawn);
this.s.s.gotoAndStop(1);
if (_root.spawn <= 0) {
win_f();
}
} else if (this.timeExtend == true) {
timeSound.start();
_root.timer = _root.timer + 31;
this.timeExtend = undefined;
this.s.s.gotoAndStop(1);
_root.timeExtendedMC._visible = true;
_root.timeExtendedMC.gotoAndPlay(1);
if (_root.timer > _root.timerMax) {
_root.timer = _root.timerMax;
counter();
}
} else if (this.bonus == true) {
timeSound.start();
_root.score = _root.score + 500;
this.bonus = undefined;
this.s.s.gotoAndStop(1);
_root.bonusMC._visible = true;
_root.bonusMC.gotoAndPlay(1);
}
};
}
};
box1_f = function (whichset, whichBox) {
var _local4 = 1;
while (_local4 <= 11) {
_root.g[whichset]["box" + whichBox]["c" + _local4].l = 3;
_local4++;
}
_local4 = 12;
while (_local4 <= 22) {
_root.g[whichset]["box" + whichBox]["c" + _local4].l = 2;
_local4++;
}
_local4 = 1;
while (_local4 <= 22) {
randomSanta(whichset, whichBox, _local4);
_root.g[whichset]["box" + whichBox]["c" + _local4].onEnterFrame = function () {
if (this.l == 3) {
this._x = this._x - _root.speed;
if (this._x < this._parent.ladderTop._x) {
this._x = this._parent.ladderTop._x;
this.l = 4;
}
} else if (this.l == 4) {
this._y = this._y + _root.speed;
if (this._y > this._parent.ladderBtm._y) {
this._y = this._parent.ladderBtm._y;
this.l = 2;
}
} else if (this.l == 2) {
this._x = this._x + _root.speed;
if (this._x > this._parent.jump1._x) {
this.l = 5;
this._x = this._parent.jump1._x;
}
} else if (this.l == 5) {
this._y = this._y + (_root.speed * 3);
this._x = this._x + (_root.speed / 2);
if (this._y > this._parent.jump2._y) {
this.l = 6;
this._y = this._parent.jump2._y;
this._x = this._parent.jump2._x;
this._parent.spring.gotoAndPlay(1);
}
} else if (this.l == 6) {
this._y = this._y - (_root.speed * 3);
this._x = this._x - (_root.speed / 3);
if (this._y < this._parent.jump3._y) {
this.l = 3;
this._y = this._parent.jump3._y;
}
}
};
_local4++;
}
_local4 = 23;
while (_local4 <= 31) {
randomSanta(whichset, 1, _local4);
_root.g[whichset]["box" + whichBox]["c" + _local4].stop();
_root.g[whichset]["box" + whichBox]["c" + _local4].l = 3;
_root.g[whichset]["box" + whichBox]["c" + _local4].onEnterFrame = function () {
this._x = this._x + _root.speed;
if (this._x > this._parent.d2._x) {
this._x = this._parent.d1._x;
}
};
_local4++;
}
};
box2_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 13) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 3;
_local3++;
}
_local3 = 14;
while (_local3 <= 22) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 2;
_local3++;
}
_local3 = 1;
while (_local3 <= 22) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox]["c" + _local3].onEnterFrame = function () {
if (this.l == 3) {
this._x = this._x + _root.speed;
if (this._x > this._parent.ladderTop._x) {
this._x = this._parent.ladderTop._x;
this.l = 4;
}
} else if (this.l == 4) {
this._y = this._y + _root.speed;
if (this._y > this._parent.ladderBtm._y) {
this._y = this._parent.ladderBtm._y;
this.l = 2;
}
} else if (this.l == 2) {
this._x = this._x - _root.speed;
if (this._x < this._parent.ele1._x) {
this.l = 7;
this._x = this._parent.ele1._x;
}
} else if (this.l == 7) {
this._y = this._y - _root.speed;
this._x = this._x - _root.speed;
if (this._y < this._parent.ele2._y) {
this.l = 3;
this._y = this._parent.ele2._y;
this._x = this._parent.ele2._x;
}
}
};
_local3++;
}
};
box3_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 4) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 2;
_local3++;
}
_local3 = 5;
while (_local3 <= 13) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 1;
_local3++;
}
_local3 = 1;
while (_local3 <= 13) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox]["c" + _local3].onEnterFrame = function () {
if (this.l == 2) {
this._x = this._x + _root.speed;
if ((this._x < this._parent.roll2._x) and (this._x > this._parent.roll1._x)) {
this.s.gotoAndStop(1);
this._x = this._parent.roll1._x;
this.l = 8;
this._parent.roller.gotoAndPlay(1);
}
if (this._x > this._parent.ladderTop._x) {
this._x = this._parent.ladderTop._x;
this.l = 4;
}
} else if (this.l == 8) {
this._x = this._x + (_root.speed * 2);
if (this._x > this._parent.roll2._x) {
this._x = this._parent.roll2._x;
this.l = 2;
this.s.play();
}
} else if (this.l == 4) {
this._y = this._y + _root.speed;
if (this._y > this._parent.ladderBtm._y) {
this._y = this._parent.ladderBtm._y;
this.l = 1;
}
} else if (this.l == 1) {
this._x = this._x - (_root.speed / 2);
if (this._x < this._parent.ladderBtm2._x) {
this.l = 9;
this._x = this._parent.ladderBtm2._x;
}
} else if (this.l == 9) {
this._y = this._y - _root.speed;
if (this._y < this._parent.ladderTop2._y) {
this.l = 2;
this._y = this._parent.ladderTop2._y;
}
}
};
_local3++;
}
};
box4_f = function (whichset, whichBox) {
var _local2 = 1;
while (_local2 <= 4) {
randomSanta(whichset, whichBox, _local2, "f");
_root.g[whichset]["box" + whichBox].f["c" + _local2].onEnterFrame = function () {
};
_local2++;
}
};
box5_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 3) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox].f["c" + _local3].onEnterFrame = function () {
};
_local3++;
}
_root.g[whichset]["box" + whichBox].gate.onRelease = function () {
this.play();
};
};
box6_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 3) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox].f["c" + _local3].onEnterFrame = function () {
};
_local3++;
}
_root.g[whichset]["box" + whichBox].present.onRelease = function () {
this.play();
};
};
box7_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 4) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox].f["c" + _local3].onEnterFrame = function () {
};
_local3++;
}
_root.g[whichset]["box" + whichBox].d1.onRelease = function () {
this.play();
};
_root.g[whichset]["box" + whichBox].d2.onRelease = function () {
this.play();
};
_root.g[whichset]["box" + whichBox].d3.onRelease = function () {
this.play();
};
_root.g[whichset]["box" + whichBox].d4.onRelease = function () {
this.play();
};
};
box8_f = function (whichset, whichBox) {
_root.g[whichset]["box" + whichBox].c1.l = 1;
_root.g[whichset]["box" + whichBox].c2.l = 2;
_root.g[whichset]["box" + whichBox].c3.l = 1;
var _local3 = 1;
while (_local3 <= 3) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox]["c" + _local3].onEnterFrame = function () {
if (this.l == 1) {
this._y = this._y + (_root.speed * 2);
if (this._y > this._parent.jump2._y) {
this.l = 2;
this._y = this._parent.jump2._y;
this._x = this._parent.jump2._x;
this._parent.spring.gotoAndPlay(1);
}
} else if (this.l == 2) {
this._y = this._y - (_root.speed * 2);
if (this._y < this._parent.jump1._y) {
this.l = 1;
this._y = this._parent.jump1._y;
}
}
};
_local3++;
}
};
box9_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 6) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox].f["c" + _local3].onEnterFrame = function () {
};
_local3++;
}
_root.g[whichset]["box" + whichBox].gate2.onRelease = function () {
this.play();
};
};
box10_f = function (whichset, whichBox) {
var _local5 = 1;
while (_local5 <= 8) {
_root.g[whichset]["box" + whichBox]["c" + _local5].l = 4;
_local5++;
}
_local5 = 9;
while (_local5 <= 13) {
_root.g[whichset]["box" + whichBox]["c" + _local5].l = 3;
_local5++;
}
_local5 = 14;
while (_local5 <= 18) {
_root.g[whichset]["box" + whichBox]["c" + _local5].l = 2;
_local5++;
}
_local5 = 19;
while (_local5 <= 22) {
_root.g[whichset]["box" + whichBox]["c" + _local5].l = 1;
_local5++;
}
_local5 = 23;
while (_local5 <= 25) {
randomSanta(whichset, whichBox, _local5);
_local5++;
}
_local5 = 1;
while (_local5 <= 22) {
randomSanta(whichset, whichBox, _local5);
_root.g[whichset]["box" + whichBox]["c" + _local5].onEnterFrame = function () {
if (this.l == 4) {
this._x = this._x + _root.speed;
if (this._x > this._parent.d1._x) {
this._x = this._parent.d2._x;
this._y = this._parent.d2._y;
this.l = 1;
}
} else if (this.l == 1) {
this._x = this._x - _root.speed;
if (this._x < this._parent.ele6._x) {
this.l = 5;
this._x = this._parent.ele6._x;
}
} else if (this.l == 5) {
this._y = this._y - _root.speed;
this._x = this._x - _root.speed;
if (this._y < this._parent.ele5._y) {
this.l = 2;
this._y = this._parent.ele5._y;
this._x = this._parent.ele5._x;
}
} else if (this.l == 2) {
this._x = this._x + _root.speed;
if (this._x > this._parent.ele4._x) {
this.l = 6;
this._x = this._parent.ele4._x;
}
} else if (this.l == 6) {
this._y = this._y - _root.speed;
this._x = this._x + _root.speed;
if (this._y < this._parent.ele3._y) {
this.l = 3;
this._y = this._parent.ele3._y;
this._x = this._parent.ele3._x;
}
} else if (this.l == 3) {
this._x = this._x - _root.speed;
if (this._x < this._parent.ele1._x) {
this.l = 7;
this._x = this._parent.ele1._x;
}
} else if (this.l == 7) {
this._y = this._y - _root.speed;
this._x = this._x - _root.speed;
if (this._y < this._parent.ele2._y) {
this.l = 4;
this._y = this._parent.ele2._y;
this._x = this._parent.ele2._x;
}
}
};
_local5++;
}
};
box11_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 11) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox]["c" + _local3].stop();
_root.g[whichset]["box" + whichBox]["c" + _local3].s.s.stop();
_root.g[whichset]["box" + whichBox]["c" + _local3].onEnterFrame = function () {
this._x = this._x - _root.speed;
if (this._x < this._parent.d1._x) {
this._x = this._parent.d2._x;
}
};
_local3++;
}
};
box12_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 2) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox].f["c" + _local3].onEnterFrame = function () {
};
_local3++;
}
_root.g[whichset]["box" + whichBox].gate3.onRelease = function () {
this.play();
};
};
box13_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 6) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox].f["c" + _local3].onEnterFrame = function () {
};
_local3++;
}
_root.g[whichset]["box" + whichBox].gate4.onRelease = function () {
this.play();
};
};
box14_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 1) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox].f["c" + _local3].onEnterFrame = function () {
};
_local3++;
}
_root.g[whichset]["box" + whichBox].d1.onRelease = function () {
this.play();
};
};
box15_f = function (whichset, whichBox) {
var _local3 = 1;
while (_local3 <= 4) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 1;
_local3++;
}
_local3 = 5;
while (_local3 <= 8) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 2;
_local3++;
}
_local3 = 1;
while (_local3 <= 8) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox]["c" + _local3].onEnterFrame = function () {
if (this.l == 1) {
this._x = this._x - _root.speed;
if (this._x < this._parent.r2._x) {
this._x = this._parent.r4._x;
this._y = this._parent.r4._y;
this._rotation = 180;
this.l = 2;
}
} else if (this.l == 2) {
this._x = this._x + _root.speed;
if (this._x > this._parent.r3._x) {
this._x = this._parent.r1._x;
this._y = this._parent.r1._y;
this._rotation = 0;
this.l = 1;
}
}
};
_local3++;
}
};
box16_f = function (whichset, whichBox) {
var _local5 = 1;
while (_local5 <= 3) {
_root.g[whichset]["box" + whichBox]["c" + _local5].l = 4;
_local5++;
}
_local5 = 4;
while (_local5 <= 5) {
_root.g[whichset]["box" + whichBox]["c" + _local5].l = 5;
_local5++;
}
_local5 = 6;
while (_local5 <= 8) {
_root.g[whichset]["box" + whichBox]["c" + _local5].l = 1;
_local5++;
}
_local5 = 9;
while (_local5 <= 10) {
_root.g[whichset]["box" + whichBox]["c" + _local5].l = 6;
_local5++;
}
_local5 = 11;
while (_local5 <= 12) {
randomSanta(whichset, whichBox, _local5);
_root.g[whichset]["box" + whichBox]["c" + _local5].onEnterFrame = function () {
};
_local5++;
}
_local5 = 1;
while (_local5 <= 10) {
randomSanta(whichset, whichBox, _local5);
_root.g[whichset]["box" + whichBox]["c" + _local5].onEnterFrame = function () {
if (this.l == 4) {
this._x = this._x + _root.speed;
if (this._x > this._parent.ladderTop1._x) {
this._x = this._parent.ladderTop1._x;
this.l = 5;
}
} else if (this.l == 5) {
this._y = this._y + _root.speed;
if (this._y > this._parent.ladderBtm1._y) {
this._y = this._parent.ladderBtm1._y;
this.l = 1;
}
} else if (this.l == 1) {
this._x = this._x - _root.speed;
if (this._x < this._parent.ladderBtm._x) {
this._x = this._parent.ladderBtm._x;
this.l = 6;
}
} else if (this.l == 6) {
this._y = this._y - _root.speed;
if (this._y < this._parent.ladderTop._y) {
this._y = this._parent.ladderTop._y;
this.l = 4;
}
}
};
_local5++;
}
};
box17_f = function (whichset, whichBox) {
_root.g[whichset]["box" + whichBox].liftCount = 1;
var _local3 = 1;
while (_local3 <= 17) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 2;
_local3++;
}
_local3 = 18;
while (_local3 <= 37) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 1;
_local3++;
}
_local3 = 38;
while (_local3 <= 45) {
_root.g[whichset]["box" + whichBox]["c" + _local3].l = 4;
_local3++;
}
_local3 = 1;
while (_local3 <= 45) {
randomSanta(whichset, whichBox, _local3);
_root.g[whichset]["box" + whichBox]["c" + _local3].onEnterFrame = function () {
if (this.l == 2) {
this._x = this._x + _root.speed;
if (this._x > this._parent.e1._x) {
this._x = this._parent.e2._x;
this.liftCount = this._parent.liftCount;
this._parent.liftCount = this._parent.liftCount + 1;
if (this._parent.liftCount >= 5) {
this._parent.liftCount = 1;
}
this.l = 3;
}
} else if (this.l == 3) {
this._y = this._y + (_root.speed * 4);
this._parent["lift" + this.liftCount]._y = this._y;
if (this._y > this._parent.e3._y) {
this._y = this._parent.e4._y;
this._x = this._parent.e4._x;
this.l = 1;
}
} else if (this.l == 1) {
this._x = this._x - _root.speed;
if (this._x < this._parent.ladderBtm._x) {
this._x = this._parent.ladderBtm._x;
this.l = 4;
}
} else if (this.l == 4) {
this._y = this._y - _root.speed;
if (this._y < this._parent.ladderTop._y) {
this._y = this._parent.ladderTop._y;
this.l = 2;
}
}
};
_local3++;
}
};
setupBoxes = function () {
box12_f("s1", 12);
box14_f("s1", 14);
box14_f("s1", 114);
box14_f("s1", 214);
box11_f("s1", 11);
box13_f("s1", 13);
box10_f("s1", 10);
box10_f("s1", 110);
box17_f("s1", 17);
box3_f("s2", 3);
box4_f("s2", 4);
box5_f("s2", 5);
box6_f("s2", 6);
box7_f("s2", 7);
box9_f("s2", 9);
box11_f("s2", 11);
box13_f("s2", 13);
box14_f("s2", 14);
box15_f("s2", 15);
box16_f("s2", 16);
box17_f("s2", 17);
box2_f("s4", 2);
box3_f("s4", 3);
box5_f("s4", 5);
box6_f("s4", 6);
box7_f("s4", 7);
box9_f("s4", 9);
box11_f("s4", 11);
box12_f("s4", 12);
box14_f("s4", 14);
box15_f("s4", 15);
box17_f("s4", 17);
box3_f("s6", 3);
box4_f("s6", 4);
box7_f("s6", 7);
box8_f("s6", 8);
box11_f("s6", 11);
box12_f("s6", 12);
box12_f("s6", 112);
box15_f("s6", 15);
box15_f("s6", 115);
box16_f("s6", 16);
box17_f("s6", 17);
box1_f("s8", 1);
box2_f("s8", 2);
box4_f("s8", 4);
box6_f("s8", 6);
box8_f("s8", 8);
box9_f("s8", 9);
box17_f("s8", 17);
box1_f("s3", 1);
box5_f("s3", 5);
box5_f("s3", 105);
box7_f("s3", 7);
box8_f("s3", 8);
box9_f("s3", 9);
box11_f("s3", 11);
box13_f("s3", 13);
box15_f("s3", 15);
box17_f("s3", 17);
box4_f("s5", 4);
box6_f("s5", 6);
box6_f("s5", 106);
box5_f("s5", 5);
box5_f("s5", 105);
box8_f("s5", 8);
box8_f("s5", 108);
box10_f("s5", 10);
box12_f("s5", 12);
box13_f("s5", 13);
box14_f("s5", 14);
box16_f("s5", 16);
box17_f("s5", 17);
box1_f("s7", 1);
box3_f("s7", 3);
box6_f("s7", 6);
box8_f("s7", 8);
box9_f("s7", 9);
box14_f("s7", 14);
box14_f("s7", 114);
box16_f("s7", 16);
box17_f("s7", 17);
};
spawnSpotty = function (howMany, tempType) {
_root.allanswers = new Array();
var _local7 = howMany;
while (_local7 > 0) {
var _local2 = random(_root.totalBox) + 1;
var _local3 = random(_root["allChars" + _local2].length);
var _local4 = false;
while (_local4 == false) {
_local4 = true;
_local3 = random(_root["allChars" + _local2].length);
for (var _local6 in _root["answers" + _local2]) {
if (_root["answers" + _local2][_local6] == _root["allChars" + _local2][_local3]) {
_local4 = false;
}
}
}
_root["answers" + _local2].push(_root["allChars" + _local2][_local3]);
_root["allChars" + _local2][_local3].s.s.gotoAndStop(tempType);
if (tempType == 7) {
_root["allChars" + _local2][_local3].timeExtend = true;
} else if (tempType == 8) {
_root["allChars" + _local2][_local3].bonus = true;
} else {
_root["allChars" + _local2][_local3].answer = true;
}
_root["allChars" + _local2][_local3].spawn = tempType;
_local7 = _local7 - 1;
_root.allanswers.push(_root["allChars" + _local2][_local3]);
}
trace(_root.allanswers);
};
setupLevelMC = function () {
_root.levelMC._visible = true;
_root.levelMC.gotoAndStop(1);
_root.b_menu._visible = false;
_root.levelMC.onPress = function () {
mouseUpSound.start();
if ((this._currentframe == 1) and (_root.level == 7)) {
this.gotoAndStop("time");
_root.levelMC.s1.stop();
_root.levelMC.s2.gotoAndStop(7);
_root.levelMC.s3.stop();
} else if ((this._currentframe == 1) and (_root.level == 8)) {
this.gotoAndStop("bonus");
_root.levelMC.s1.stop();
_root.levelMC.s2.gotoAndStop(8);
_root.levelMC.s3.stop();
} else {
if (_root.level >= 6) {
this.gotoAndStop(3);
_root.levelMC.s1.gotoAndStop(2);
_root.levelMC.s2.gotoAndStop(3);
_root.levelMC.s3.gotoAndStop(4);
_root.levelMC.s4.gotoAndStop(5);
_root.levelMC.s5.gotoAndStop(6);
} else {
this.nextFrame();
_root.levelMC.s1.stop();
_root.levelMC.s2.gotoAndStop(_root.santaType1);
_root.levelMC.s3.stop();
}
_root.b_menu._visible = true;
_root.levelMC.onPress = function () {
mouseUpSound.start();
_root.intervalId2 = setInterval(_root, "counter", 1000);
_root.b_menu._visible = false;
_root.levelMC._visible = false;
_root.levelMC.onPress = function () {
};
};
}
};
};
setRequirement = function (tempType, tempReq) {
if (tempType == 2) {
_root["requirement" + tempReq] = "wearing Green Cloth.";
} else if (tempType == 3) {
_root["requirement" + tempReq] = "who are Thiefs!";
} else if (tempType == 4) {
_root["requirement" + tempReq] = "with back facing you.";
} else if (tempType == 5) {
_root["requirement" + tempReq] = "wearing Green Hats.";
} else if (tempType == 6) {
_root["requirement" + tempReq] = "not wearing Hats.";
}
};
win_f = function () {
clearInterval(_root.intervalId2);
_root.score = _root.score + (((_root.timer * _root.level) * _root.totalBox) + (_root.level * 100));
_root.totalscore = _root.totalscore + _root.score;
win2Sound.start();
_root.levelMC._visible = true;
_root.levelMC.gotoAndStop("win");
_root.levelMC.onPress = function () {
mouseUpSound.start();
this.gotoAndStop(1);
levelUp_f(true);
};
};
levelUp_f = function (trueFalse) {
_root.score = 0;
_root.timer = _root.timerMax;
_root.g.gotoAndStop(6);
_root.timeExtendedMC._visible = false;
_root.bonusMC._visible = false;
trace("levelup");
if (trueFalse == true) {
_root.level = _root.level + 1;
saveobj.preSave();
saveobj.gameSave();
if (_root.level > 10) {
_root.gotoAndStop("Submit");
}
}
_root.levelMC._visible = true;
_root.levelMC.gotoAndStop(1);
setupLevelMC();
if (_root.level == 1) {
_root.g.gotoAndStop(1);
_root.spawnTotal = 2;
_root.spawn = 2;
_root.santaType1 = 2;
totalBoxSetup_f(1);
setupBoxes();
_root.levelMC.biggerMap._visible = false;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn, _root.santaType1);
} else if (_root.level == 2) {
_root.g.gotoAndStop(1);
_root.spawnTotal = 2;
_root.spawn = 2;
_root.santaType1 = 3;
totalBoxSetup_f(1);
setupBoxes();
_root.levelMC.biggerMap._visible = false;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn, _root.santaType1);
} else if (_root.level == 3) {
_root.g.gotoAndStop(2);
_root.spawnTotal = 4;
_root.spawn = 4;
_root.santaType1 = 4;
totalBoxSetup_f(2);
setupBoxes();
_root.levelMC.biggerMap._visible = true;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn, _root.santaType1);
} else if (_root.level == 4) {
_root.g.gotoAndStop(2);
_root.spawnTotal = 4;
_root.spawn = 4;
_root.santaType1 = 5;
totalBoxSetup_f(2);
setupBoxes();
_root.levelMC.biggerMap._visible = false;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn, _root.santaType1);
} else if (_root.level == 5) {
_root.g.gotoAndStop(3);
_root.spawnTotal = 6;
_root.spawn = 6;
_root.santaType1 = 6;
totalBoxSetup_f(3);
setupBoxes();
_root.levelMC.biggerMap._visible = true;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn, _root.santaType1);
} else if (_root.level == 6) {
_root.g.gotoAndStop(3);
_root.spawnTotal = 6;
_root.spawn2 = 2;
_root.spawn3 = 1;
_root.spawn4 = 1;
_root.spawn5 = 1;
_root.spawn6 = 1;
_root.santaType1 = 2;
_root.santaType2 = 3;
_root.santaType3 = 4;
_root.santaType4 = 5;
_root.santaType5 = 6;
totalBoxSetup_f(3);
setupBoxes();
_root.levelMC.biggerMap._visible = false;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn2, _root.santaType1);
setRequirement(_root.santaType2, 2);
spawnSpotty(_root.spawn3, _root.santaType2);
setRequirement(_root.santaType3, 3);
spawnSpotty(_root.spawn4, _root.santaType3);
setRequirement(_root.santaType4, 4);
spawnSpotty(_root.spawn5, _root.santaType4);
setRequirement(_root.santaType5, 5);
spawnSpotty(_root.spawn6, _root.santaType5);
_root.spawn = _root.spawnTotal;
} else if (_root.level == 7) {
_root.g.gotoAndStop(4);
_root.spawnTotal = 10;
_root.spawn2 = 3;
_root.spawn3 = 2;
_root.spawn4 = 2;
_root.spawn5 = 2;
_root.spawn6 = 1;
_root.santaType1 = 2;
_root.santaType2 = 3;
_root.santaType3 = 4;
_root.santaType4 = 5;
_root.santaType5 = 6;
totalBoxSetup_f(4);
setupBoxes();
_root.levelMC.biggerMap._visible = false;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn2, _root.santaType1);
setRequirement(_root.santaType2, 2);
spawnSpotty(_root.spawn3, _root.santaType2);
setRequirement(_root.santaType3, 3);
spawnSpotty(_root.spawn4, _root.santaType3);
setRequirement(_root.santaType4, 4);
spawnSpotty(_root.spawn5, _root.santaType4);
setRequirement(_root.santaType5, 5);
spawnSpotty(_root.spawn6, _root.santaType5);
spawnSpotty(6, 7);
_root.spawn = _root.spawnTotal;
} else if (_root.level == 8) {
_root.g.gotoAndStop(4);
_root.spawnTotal = 15;
_root.spawn2 = 5;
_root.spawn3 = 4;
_root.spawn4 = 3;
_root.spawn5 = 2;
_root.spawn6 = 1;
_root.santaType1 = 2;
_root.santaType2 = 3;
_root.santaType3 = 4;
_root.santaType4 = 5;
_root.santaType5 = 6;
totalBoxSetup_f(4);
setupBoxes();
_root.levelMC.biggerMap._visible = false;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn2, _root.santaType1);
setRequirement(_root.santaType2, 2);
spawnSpotty(_root.spawn3, _root.santaType2);
setRequirement(_root.santaType3, 3);
spawnSpotty(_root.spawn4, _root.santaType3);
setRequirement(_root.santaType4, 4);
spawnSpotty(_root.spawn5, _root.santaType4);
setRequirement(_root.santaType5, 5);
spawnSpotty(_root.spawn6, _root.santaType5);
spawnSpotty(6, 7);
spawnSpotty(4, 8);
_root.spawn = _root.spawnTotal;
} else if (_root.level == 9) {
_root.g.gotoAndStop(5);
_root.spawnTotal = 20;
_root.spawn2 = 5;
_root.spawn3 = 5;
_root.spawn4 = 4;
_root.spawn5 = 3;
_root.spawn6 = 3;
_root.santaType1 = 2;
_root.santaType2 = 3;
_root.santaType3 = 4;
_root.santaType4 = 5;
_root.santaType5 = 6;
totalBoxSetup_f(5);
setupBoxes();
_root.levelMC.biggerMap._visible = true;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn2, _root.santaType1);
setRequirement(_root.santaType2, 2);
spawnSpotty(_root.spawn3, _root.santaType2);
setRequirement(_root.santaType3, 3);
spawnSpotty(_root.spawn4, _root.santaType3);
setRequirement(_root.santaType4, 4);
spawnSpotty(_root.spawn5, _root.santaType4);
setRequirement(_root.santaType5, 5);
spawnSpotty(_root.spawn6, _root.santaType5);
spawnSpotty(7, 7);
spawnSpotty(5, 8);
_root.spawn = _root.spawnTotal;
} else if (_root.level == 10) {
_root.g.gotoAndStop(5);
_root.spawnTotal = 25;
_root.spawn2 = 5;
_root.spawn3 = 5;
_root.spawn4 = 5;
_root.spawn5 = 5;
_root.spawn6 = 5;
_root.santaType1 = 2;
_root.santaType2 = 3;
_root.santaType3 = 4;
_root.santaType4 = 5;
_root.santaType5 = 6;
totalBoxSetup_f(5);
setupBoxes();
_root.levelMC.biggerMap._visible = false;
setRequirement(_root.santaType1, 1);
spawnSpotty(_root.spawn2, _root.santaType1);
setRequirement(_root.santaType2, 2);
spawnSpotty(_root.spawn3, _root.santaType2);
setRequirement(_root.santaType3, 3);
spawnSpotty(_root.spawn4, _root.santaType3);
setRequirement(_root.santaType4, 4);
spawnSpotty(_root.spawn5, _root.santaType4);
setRequirement(_root.santaType5, 5);
spawnSpotty(_root.spawn6, _root.santaType5);
spawnSpotty(8, 7);
spawnSpotty(6, 8);
_root.spawn = _root.spawnTotal;
}
_root.requirement_t = (_root.spawn + "/") + _root.spawnTotal;
};
levelUp_f(true);
checkBtm = function () {
_root.g._y = _root.g._y + 10;
if (_root.g._y > 80) {
_root.g._y = 80;
}
};
checkTop = function () {
_root.g._y = _root.g._y - 10;
if ((_root.g._y + _root.g._height) < 380) {
_root.g._y = 380 - _root.g._height;
}
};
checkRight = function () {
_root.g._x = _root.g._x + 10;
if (_root.g._x > 30) {
_root.g._x = 30;
}
};
checkLeft = function () {
_root.g._x = _root.g._x - 10;
if ((_root.g._x + _root.g._width) < 520) {
_root.g._x = 520 - _root.g._width;
}
};
onEnterFrame = function () {
if (_root.moveBox == 1) {
checkBtm();
} else if (_root.moveBox == 2) {
checkTop();
} else if (_root.moveBox == 3) {
checkRight();
} else if (_root.moveBox == 4) {
checkLeft();
}
};
_root.top.onRollOver = function () {
_root.moveBox = 1;
this._alpha = 70;
};
_root.top.onRollOut = function () {
_root.moveBox = 0;
this._alpha = 1;
};
_root.btm.onRollOver = function () {
_root.moveBox = 2;
this._alpha = 70;
};
_root.btm.onRollOut = function () {
_root.moveBox = 0;
this._alpha = 1;
};
_root.left.onRollOver = function () {
_root.moveBox = 3;
this._alpha = 70;
};
_root.left.onRollOut = function () {
_root.moveBox = 0;
this._alpha = 1;
};
_root.right.onRollOver = function () {
_root.moveBox = 4;
this._alpha = 70;
};
_root.right.onRollOut = function () {
_root.moveBox = 0;
this._alpha = 1;
};
stop();
_root.cheat.onRelease = function () {
win_f();
};
Symbol 12 MovieClip Frame 1
stop();
Symbol 12 MovieClip Frame 6
stop();
Symbol 12 MovieClip Frame 11
stop();
Symbol 12 MovieClip Frame 16
stop();
Symbol 12 MovieClip Frame 21
stop();
Symbol 30 Button
on (release) {
getURL ("http://www.girlgames.com", "blank");
}
Symbol 68 MovieClip Frame 1
placement._visible = false;
_parent.stop();
onEnterFrame = function () {
loadprogress = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
loader.loadbar._xscale = loadprogress;
trace(loadprogress);
if (loadprogress >= 100) {
this.play();
delete this.onEnterFrame;
}
};
Symbol 68 MovieClip Frame 61
var i = 1;
while (i <= 10) {
starBackground["star" + i].star.play();
i++;
}
Symbol 68 MovieClip Frame 105
var i = 1;
while (i <= 10) {
starBackground["star" + i].star.play();
i++;
}
Symbol 68 MovieClip Frame 149
var i = 1;
while (i <= 10) {
starBackground["star" + i].star.play();
i++;
}
Symbol 68 MovieClip Frame 203
var i = 1;
while (i <= 10) {
starBackground["star" + i].star.play();
i++;
}
Symbol 68 MovieClip Frame 237
stop();
if (loadprogress == 100) {
play();
}
Symbol 68 MovieClip Frame 254
var i = 1;
while (i <= 10) {
starBackground["star" + i].star.play();
i++;
}
Symbol 68 MovieClip Frame 270
stop();
playBtn.onRelease = function () {
play();
};
Symbol 68 MovieClip Frame 301
_parent.play();
Symbol 433 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _loader, _loaderListener, _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("1.43");
}
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 ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
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 _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
listen();
return(_clip);
}
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.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.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.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.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
trace("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.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["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)) {
onError.apply(null, ["NotConnected"]);
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 = {};
if (_root.mochiad_options) {
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 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://x.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.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.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 434 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {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, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = 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 _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
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) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {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, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
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 _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
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;
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) {
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 _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
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);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
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);
}
}
Symbol 435 MovieClip [__Packages.Gamesaves] Frame 0
class Gamesaves
{
var profileObj;
function Gamesaves () {
profileObj = SharedObject.getLocal("findingsanta");
if (profileObj.data.resume) {
trace("Resume From Saves");
} else {
trace("No Saves, First Time Playing");
var _local3 = Array();
profileObj.data.userData = _local3;
var _local2 = 1;
while (_local2 <= 3) {
profileObj.data.userData = new Object();
_local2++;
}
profileObj.flush();
}
}
function checkResume() {
return(profileObj.data.resume);
}
function copy(to, from) {
for (var _local4 in from) {
if ((typeof(from[_local4]) == "object") || (typeof(from[_local4]) == "array")) {
if (typeof(from[_local4]) == "object") {
if (from[_local4] instanceof Array) {
to[_local4] = new Array();
} else {
to[_local4] = new Object();
}
}
copy(to[_local4], from[_local4]);
} else {
to[_local4] = from[_local4];
}
}
}
function preSave() {
trace("preSave() - all _root -> _root.allVars");
_root.allVars = new Object();
_root.allVars.level = _root.level;
_root.allVars.totalscore = _root.totalscore;
}
function postLoad() {
trace("postLoad() - _root.allVars -> all _root");
_root.level = _root.allVars.level;
_root.totalscore = _root.allVars.totalscore;
}
function gameLoad() {
trace("load game ");
_root.allVars = new Object();
copy(_root.allVars, profileObj.data.userData);
for (var _local3 in profileObj.data.userData) {
trace((("debug | " + _local3) + " : ") + profileObj.data.userData[_local3]);
}
}
function gameSave() {
trace("save game ");
profileObj.data.resume = true;
copy(profileObj.data.userData, _root.allVars);
for (var _local3 in _root.allVars) {
trace((("debug | " + _local3) + " : ") + profileObj.data.userData[_local3]);
}
profileObj.flush();
}
function clearAll() {
profileObj.clear();
}
}
Symbol 436 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if ((options.clip == null) || (options.clip == undefined)) {
options.clip = mochi.MochiServices.clip;
}
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.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.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.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.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.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.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.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.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 437 MovieClip [__Packages.mochi.MochiDigits] Frame 0
class mochi.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.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 276 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 30
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 305 MovieClip Frame 1
stop();
Symbol 305 MovieClip Frame 30
stop();
Symbol 313 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 30
stop();
Symbol 336 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 4
trace("Send score : " + _root.totalscore);
Symbol 429 MovieClip Frame 1
stop();
this._visible = false;
Symbol 432 MovieClip Frame 1
stop();
this._visible = false;