Frame 1
_global.loadedIn = false;
Frame 2
function attachLoader() {
if (_global.loadedIn == false) {
_global.loadedIn = true;
_root.attachMovie("loadscreen", "loadscreen", _root.getNextHighestDepth());
loadscreen._x = 0;
loadscreen._y = 0;
}
}
function initializeGame() {
_global.nomPosX = new Array(null, 57, 122, 186, 249, 314);
_global.nomPosY = new Array(null, 87, 87, 87, 87, 87);
_global.pickedPosX = new Array(null, 83, 152, 220, 288);
_global.pickedPosY = new Array(null, 222, 222, 222, 222);
_global.levelset = new Array();
_global.gameSpeed = 0.6;
_global.pointConstant = 1000;
_global.yourScore = 0;
_global.soundVolume = 100;
_global.musicVolume = 100;
_global.levelset[1] = new Array(3, 1, 2, 3, 6, "add", "1+2+3=6");
_global.levelset[2] = new Array(3, 1, 2, 3, 1, "multiply, subtract", "1x3=3,3-2=1");
_global.levelset[3] = new Array(3, 1, 2, 3, 5, "multiply, subtract", "2x3=6,6-1=5");
_global.levelset[4] = new Array(3, 2, 3, 4, 14, "multiply, add", "4x3=12,12+2=14");
_global.levelset[5] = new Array(3, 2, 3, 4, 6, "subtract, multiply", "4-2=2,2x3=6");
_global.levelset[6] = new Array(3, 2, 3, 4, 18, "add, multiply", "4+2=6,6x3=18");
_global.levelset[7] = new Array(3, 3, 5, 9, 15, "divide, multiply", "9/3=3,3x5=15");
_global.levelset[8] = new Array(3, 3, 5, 9, 44, "combine, add", "3|5=35,35+9=44");
_global.levelset[9] = new Array(3, 3, 5, 9, 32, "multiply, add", "9x3=27,27+5=32");
_global.levelset[10] = new Array(3, 3, 4, 8, 43, "subtract, combine", "8-4=4,4|3=43");
_global.levelset[11] = new Array(3, 3, 4, 8, 6, "divide, multiply", "8/4=2,2x3=6");
_global.levelset[12] = new Array(3, 3, 4, 8, 20, "subtract, multiply", "8-3=5,5x4=20");
_global.levelset[13] = new Array(3, 2, 9, 9, 79, "multiply, subtract", "9x9=81,81-2=79");
_global.levelset[14] = new Array(3, 2, 9, 9, 97, "combine, subtract", "9|9=99,99-2=97");
_global.levelset[15] = new Array(3, 2, 9, 9, 63, "subtract, multiply", "9-2=7,7x9=63");
_global.levelset[16] = new Array(3, 3, 7, 9, 90, "add, multiply", "3+7=10,10x9=90");
_global.levelset[17] = new Array(3, 3, 7, 9, 23, "subtract, combine", "9-7=2,2|3=23");
_global.levelset[18] = new Array(3, 3, 7, 9, 30, "multiply, add", "3x7=21,21+9=30");
_global.levelset[19] = new Array(3, 1, 2, 7, 9, "add, multiply", "7+2=9,9x1=9");
_global.levelset[20] = new Array(3, 1, 2, 7, 72, "multiply, combine", "2x1=2,7|2=72");
_global.levelset[21] = new Array(3, 1, 2, 7, 3, "subtract, divide", "7-1=6,6/2=3");
_global.levelset[22] = new Array(3, 7, 8, 9, 65, "multiply, subtract", "9x8=72,72-7=65");
_global.levelset[23] = new Array(3, 7, 8, 9, 89, "combine, subtract", "9|7=97,97-8=89");
_global.levelset[24] = new Array(3, 7, 8, 9, 87, "combine, add", "7|8=78,78+9=87");
_global.levelset[25] = new Array(3, 3, 6, 9, 18, "divide, multiply", "6/3=2,2x9=18");
_global.levelset[26] = new Array(3, 3, 6, 9, 2, "multiply, divide", "6x3=18,18/9=2");
_global.levelset[27] = new Array(3, 3, 6, 9, 21, "multiply, subtract", "3x9=27,27-6=21");
_global.levelset[28] = new Array(3, 2, 4, 8, 42, "combine, divide", "8|4=84,84/2=42");
_global.levelset[29] = new Array(3, 2, 4, 8, 88, "multiply, combine", "4x2=8,8|8=88");
_global.levelset[30] = new Array(3, 2, 4, 8, 44, "divide, combine", "8/2=4,4|4=44");
_global.levelset[31] = new Array(3, 3, 3, 9, 1, "multiply, divide", "3x3=9,9/9=1");
_global.levelset[32] = new Array(3, 3, 3, 9, 18, "subtract, multiply", "9-3=6,6x3=18");
_global.levelset[33] = new Array(3, 3, 3, 9, 31, "combine, divide", "9|3=93,93/3=31");
_global.levelset[34] = new Array(4, 3, 4, 8, 9, 96, "multiply, divide, multiply", "8x4=32,9/3=3,32x3=96");
_global.levelset[35] = new Array(4, 3, 4, 8, 9, 9, "combine, combine, subtract", "9|3=93,8|4=84,93-84=9");
_global.levelset[36] = new Array(4, 3, 4, 8, 9, 6, "multiply, divide, divide", "8x9=72,72/4=18,18/3=6");
_global.levelset[37] = new Array(4, 2, 3, 5, 7, 20, "multiply, add, add", "5x2=10,7+3=10,10+10=20");
_global.levelset[38] = new Array(4, 2, 3, 5, 7, 52, "multiply, add, multiply", "7x3=21,21+5=26,26x2=52");
_global.levelset[39] = new Array(4, 2, 3, 5, 7, 3, "multiply, combine, subtract", "5x7=35,3|2=32,35-32=3");
_global.levelset[40] = new Array(4, 1, 2, 3, 9, 1, "divide, subtract, divide", "9/3=3,3-2=1,1/1=1");
_global.levelset[41] = new Array(4, 1, 2, 3, 9, 54, "add, add, multiply", "1+2+3=6,6x9=54");
_global.levelset[42] = new Array(4, 1, 2, 3, 9, 53, "multiply, multiply, subtract", "9x3=27,27x2=54,54-1=53");
_global.levelset[43] = new Array(4, 3, 5, 5, 5, 4, "multiply, add, divide", "3x5=15,15+5=20,20/5=4");
_global.levelset[44] = new Array(4, 3, 5, 5, 5, 80, "multiply, multiply, add", "5x5=25,25x3=75,75+5=80");
_global.levelset[45] = new Array(4, 3, 5, 5, 5, 21, "subtract, divide, combine", "5-3=2,5/5=1,2|1=21");
_global.levelset[46] = new Array(4, 3, 6, 8, 9, 91, "combine, subtract, add", "9|3=93,93-8=85,85+6=91");
_global.levelset[47] = new Array(4, 3, 6, 8, 9, 36, "multiply, divide, multiply", "8x3=24,24/6=4,4x9=36");
_global.levelset[48] = new Array(4, 3, 6, 8, 9, 21, "multiply, add, subtract", "8x3=24,24+6=30,30-9=21");
_global.levelset[49] = new Array(4, 2, 4, 6, 8, 47, "combine, divide, add", "8|6=86,86/2=43,43+4=47");
_global.levelset[50] = new Array(4, 2, 4, 6, 8, 7, "combine, divide, divide", "8|4=84,84/6=14,14/2=7");
_global.levelset[51] = new Array(4, 2, 4, 6, 8, 26, "combine, combine, subtract", "6|8=68,4|2=42,68-42=26");
_global.levelset[52] = new Array(4, 1, 3, 5, 7, 32, "combine, subtract, divide", "3|7=37,37-5=32,32/1=32");
_global.levelset[53] = new Array(4, 1, 3, 5, 7, 58, "combine, multiply, subtract", "1|3=13,13x5=65,65-7=58");
_global.levelset[54] = new Array(4, 1, 3, 5, 7, 6, "multiply, combine, subtract", "7x3=21,1|5=15,21-15=6");
_global.levelset[55] = new Array(4, 1, 1, 3, 3, 22, "subtract, subtract, combine", "3-1=2,3-1=2,2|2=22");
_global.levelset[56] = new Array(4, 1, 1, 3, 3, 8, "add, subtract, multiply", "3+1=4,3-1=2,4x2=8");
_global.levelset[57] = new Array(4, 1, 1, 3, 3, 28, "combine, divide, subtract", "3|1=31,31/1=31,31-3=28");
_global.levelset[58] = new Array(4, 2, 3, 6, 8, 80, "combine, multiply, subtract", "8|6=86,3x2=6,86-6=80");
_global.levelset[59] = new Array(4, 2, 3, 6, 8, 10, "combine, divide, subtract", "3|6=36,36/2=18,18-8=10");
_global.levelset[60] = new Array(4, 2, 3, 6, 8, 70, "combine, multiply, subtract", "2|6=26,26x3=78,78-8=70");
_global.levelset[61] = new Array(4, 2, 2, 3, 9, 52, "multiply, multiply, subtract", "9x3=27,27x2=54,54-2=52");
_global.levelset[62] = new Array(4, 2, 2, 3, 9, 49, "combine, divide, add", "9|2=92,92/2=46,46+3=49");
_global.levelset[63] = new Array(4, 2, 2, 3, 9, 17, "combine, combine, subtract", "3|9=39,2|2=22,39-22=17");
_global.levelset[64] = new Array(4, 1, 4, 5, 9, 37, "combine, add, subtract", "4|5=45,45+1=46,46-9=37");
_global.levelset[65] = new Array(4, 1, 4, 5, 9, 24, "combine, add, divide", "9|1=91,91+5=96,96/4=24");
_global.levelset[66] = new Array(4, 1, 4, 5, 9, 15, "combine, add, divide", "5|9=59,59+1=60,60/4=15");
_global.levelset[67] = new Array(5, 1, 3, 5, 7, 9, 90, "combine, add, subtract, subtract", "9|7=97,5+3=8,8-1=7,97-7=90");
_global.levelset[68] = new Array(5, 1, 3, 5, 7, 9, 4, "multiply, divide, subtract, divide", "7x9=63,63/3=21,21-1=20,20/5=4");
_global.levelset[69] = new Array(5, 1, 3, 5, 7, 9, 35, "combine, multiply, divide, multiply", "1|5=15,15x3=45,45/9=5,5x7=35");
_global.levelset[70] = new Array(5, 1, 1, 1, 8, 9, 31, "subtract, add, add, combine", "9-8=1,1+1=2,2+1=3,3|1=31");
_global.levelset[71] = new Array(5, 1, 1, 1, 8, 9, 35, "add, add, multiply, add", "8+9=17,1+1=2,17x2=34,34+1=35");
_global.levelset[72] = new Array(5, 1, 1, 1, 8, 9, 66, "subtract, multiply, add, add", "9-1=8,8x8=64,64+1=65,65+1=66");
_global.levelset[73] = new Array(5, 2, 3, 4, 7, 8, 7, "multiply, combine, add, subtract", "4x8=32,3|2=32,32+7=39,39-32=7");
_global.levelset[74] = new Array(5, 2, 3, 4, 7, 8, 4, "multiply, combine, divide, add", "7x4=28,2|8=28,28/28=1,1+3=4");
_global.levelset[75] = new Array(5, 2, 3, 4, 7, 8, 17, "combine, add, divide, add", "3|2=32,32+8=40,40/4=10,10+7=17");
_global.levelset[76] = new Array(5, 3, 4, 6, 6, 8, 15, "multiply, multiply, divide, add", "6x3=18,18x4=72,72/8=9,9+6=15");
_global.levelset[77] = new Array(5, 3, 4, 6, 6, 8, 5, "combine, divide, subtract, subtract", "8|4=84,86/6=14,14-3=11,11-6=5");
_global.levelset[78] = new Array(5, 3, 4, 6, 6, 8, 43, "multiply, combine, subtract, subtract", "6x6=36,8|3=83,83-36=47,47-4=43");
_global.levelset[79] = new Array(5, 1, 5, 8, 9, 9, 6, "multiply, combine, divide, add", "9x9=81,8|1=81,81/81=1,1+5=6");
_global.levelset[80] = new Array(5, 1, 5, 8, 9, 9, 16, "combine, subtract, divide, divide", "8|9=89,89-9=80,80/5=16,16/1=16");
_global.levelset[81] = new Array(5, 1, 5, 8, 9, 9, 94, "combine, multiply, subtract, add", "1|9=19,19x5=95,95-9=86,86+8=94");
_global.levelset[82] = new Array(5, 2, 3, 5, 6, 7, 91, "combine, divide, multiply, add", "5|6=56,56/2=28,28x3=84,84+7=91");
_global.levelset[83] = new Array(5, 2, 3, 5, 6, 7, 87, "combine, divide, combine, add", "7|5=75,75/3=25,6|2=62,25+62=87");
_global.levelset[84] = new Array(5, 2, 3, 5, 6, 7, 92, "combine, combine, add, subtract", "7|5=75,2|3=23,75+23=98,98-6=92");
_global.levelset[85] = new Array(5, 1, 2, 3, 3, 4, 94, "add, combine, combine, add", "4+3=7,7|1=71,2|3=23,71+23=94");
_global.levelset[86] = new Array(5, 1, 2, 3, 3, 4, 31, "combine, divide, multiply, add", "2|1=21,21/3=7,7x4=28,28+3=31");
_global.levelset[87] = new Array(5, 1, 2, 3, 3, 4, 22, "multiply, multiply, multiply, add", "1x2=2,2x3=6,6x3=18,18+4=22");
_global.levelset[88] = new Array(5, 1, 2, 5, 7, 9, 41, "combine, add, divide, subtract", "9|1=91,91+5=96,96/2=48,48-7=41");
_global.levelset[89] = new Array(5, 1, 2, 5, 7, 9, 20, "combine, multiply, subtract, subtract", "1|7=17,17x2=34,34-5=29,29-9=20");
_global.levelset[90] = new Array(5, 1, 2, 5, 7, 9, 90, "combine, divide, subtract, subtract", "9|7=97,97/1=97,97-2=95,95-5=90");
_global.levelset[91] = new Array(5, 3, 3, 3, 3, 3, 78, "multiply, multiply, multiply, subtract", "3x3=9,9x3=27,27x3=81,81-3=79");
_global.levelset[92] = new Array(5, 3, 3, 3, 3, 3, 32, "combine, multiply, subtract, divide", "3|3=33,33x3=99,99-3=96,96/3=32");
_global.levelset[93] = new Array(5, 3, 3, 3, 3, 3, 90, "divide, combine, multiply, subtract", "3/3=1,3|1=31,31x3=93,93-3=90");
_global.levelset[94] = new Array(5, 2, 3, 5, 8, 9, 10, "subtract, subtract, combine, subtract", "9-8=1,5-3=2,1|2=12,12-2=10");
_global.levelset[95] = new Array(5, 2, 3, 5, 8, 9, 23, "combine, multiply, combine, subtract", "2|5=25,25x3=75,9|8=98,98-75=23");
_global.levelset[96] = new Array(5, 2, 3, 5, 8, 9, 19, "combine, multiply, combine, subtract", "3|5=35,35x2=70,8|9=89,89-70=19");
_global.levelset[97] = new Array(5, 2, 2, 5, 5, 8, 7, "combine, combine, divide, subtract", "2|5=25,2|5=25,25/25=1,8-1=7");
_global.levelset[98] = new Array(5, 2, 2, 5, 5, 8, 59, "divide, combine, combine, subtract", "5/5=1,8|1=81,2|2=22,81-22=59");
_global.levelset[99] = new Array(5, 2, 2, 5, 5, 8, 8, "multiply, multiply, multiply, divide", "5x2=10,5x8=40,40x2=80,80/10=8");
_global.levelset[100] = new Array(5, 1, 9, 9, 9, 9, 17, "subtract, multiply, divide, add", "9-1=8,8x9=72,72/9=8,8+9=17");
_global.nomThoughts = new Array();
_global.nomThoughts[0] = "I OPEN,\nADD NOMS.";
_global.nomThoughts[1] = "I\nHUNGRY!";
_global.nomThoughts[2] = "WHY YOU\nNO FEED?!";
_global.nomThoughts[3] = "ME+NOMS\n=WIN";
_global.nomThoughts[4] = "FILL MAH\nBELLEH.";
_global.nomThoughts[5] = "I NEED\nTO NOM.";
_global.nomThoughts[6] = "NOMS BE\nYUMMY.";
_global.nomThoughts[7] = "I CHEW\nTHE NOMS.";
_global.nomThoughts[8] = "WHERE BE\nTHE NOMS?";
_global.nomThoughts[9] = "YOU FEED.\nI EAT.";
_global.nomThoughts[10] = "NOM, NOM,\nNOW.";
_global.nomThoughts[11] = "NOMS?\nNOMS.";
_global.nomThoughts[12] = "DID I\nSAY STOP?";
_global.nomThoughts[13] = "NOMS\nREQUIRED.";
_global.nomThoughts[14] = "I NOT\nFULL YET.";
_global.nomThoughts[15] = "KEEP NOMS\nCOMING.";
_global.nomThoughts[16] = "BELLY NOT\nFULL.";
_global.nomThoughts[17] = "KEEP\nFEEDING.";
_global.nomThoughts[18] = "HAVING\nTROUBLE?";
_global.nomThoughts[19] = "YOU TOO\nSLOW.";
_global.nomThoughts[20] = "DON'T\nSTOP NOW.";
_global.nomThoughts[21] = "OM NOM\nNOMBERS.";
_root.gotoAndPlay(10);
}
onEnterFrame = function () {
percentIn = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (percentIn == 100) {
delete onEnterFrame;
initializeGame();
} else {
loadscreen.loadspin.loadtotal.loadtotal.text = percentIn + "%";
loadscreen.loadspin.spinner._rotation = loadscreen.loadspin.spinner._rotation + 8;
_root.gotoAndPlay(2);
loadscreen.copytext.onPress = function () {
getURL ("http://www.fictionalhead.com/", "_blank");
};
}
};
attachLoader();
stop();
Frame 5
function attachMe(which, whichname) {
if (whichname) {
_root.attachMovie(which, whichname, _root.getNextHighestDepth());
} else {
_root.attachMovie(which, which, _root.getNextHighestDepth());
}
}
function randMe(x, y) {
var _local1 = Math.round(Math.random() * (y - x)) + x;
return(_local1);
}
function lighten(which, amount) {
var _local1 = new Color(which);
var _local2 = {ra:"100", rb:amount, ga:"100", gb:amount, ba:"100", bb:amount};
_local1.setTransform(_local2);
}
function setRolls() {
if (_global.soundVolume > 0) {
_global.soundVolume = 100;
_global.musicVolume = 100;
myMusic.setVolume(_global.musicVolume);
game.btn_sound.waves._alpha = 100;
} else {
_global.soundVolume = 0;
_global.musicVolume = 0;
myMusic.setVolume(_global.musicVolume);
game.btn_sound.waves._alpha = 0;
}
game.kitchen.menubar.tab.onPress = function () {
if (_global.animating == false) {
moveMenu("open");
}
};
game.kitchen.menubar.closemenu.onPress = function () {
if (_global.animating == false) {
moveMenu("close");
}
};
game.kitchen.menubar.restart.onRollOver = function () {
if (_global.animating == false) {
enlargeMe(this);
game.kitchen.menubar.btn_text.text = "RESTART LEVEL";
}
};
game.kitchen.menubar.hint.onRollOver = function () {
if (_global.animating == false) {
enlargeMe(this);
game.kitchen.menubar.btn_text.text = "VIEW HINT";
}
};
game.kitchen.menubar.answer.onRollOver = function () {
if (_global.animating == false) {
enlargeMe(this);
game.kitchen.menubar.btn_text.text = "VIEW ANSWER";
}
};
game.kitchen.menubar.closemenu.onRollOver = function () {
if (_global.animating == false) {
enlargeMe(this);
game.kitchen.menubar.btn_text.text = "CLOSE MENU";
}
};
game.kitchen.menubar.backing.onRollOver = function () {
if (_global.animating == false) {
this.useHandCursor = false;
game.kitchen.menubar.btn_text.text = "";
}
};
game.btn_sound.onRollOver = (game.btn_instructions.onRollOver = (game.btn_scores.onRollOver = function () {
if (_global.animating == false) {
enlargeMe(this);
}
}));
game.btn_sound.onPress = function () {
if (_global.soundVolume > 0) {
_global.soundVolume = 0;
_global.musicVolume = 0;
myMusic.setVolume(_global.musicVolume);
game.btn_sound.waves._alpha = 0;
} else {
_global.soundVolume = 100;
_global.musicVolume = 100;
myMusic.setVolume(_global.musicVolume);
game.btn_sound.waves._alpha = 100;
}
};
game.btn_instructions.onPress = function () {
enlargeMe(this, "shrink");
showInstructions();
};
game.btn_scores.onPress = function () {
enlargeMe(this, "shrink");
showScores();
};
game.kitchen.menubar.restart.onRollOut = (game.kitchen.menubar.hint.onRollOut = (game.kitchen.menubar.answer.onRollOut = (game.kitchen.menubar.closemenu.onRollOut = (game.btn_sound.onRollOut = (game.btn_instructions.onRollOut = (game.btn_scores.onRollOut = function () {
if (_global.animating == false) {
enlargeMe(this, "shrink");
}
}))))));
game.kitchen.menubar.restart.myFunc = "restart";
game.kitchen.menubar.hint.myFunc = "hint";
game.kitchen.menubar.answer.myFunc = "answer";
game.kitchen.menubar.restart.onPress = (game.kitchen.menubar.hint.onPress = (game.kitchen.menubar.answer.onPress = function () {
if (_global.animating == false) {
menuAction(this.myFunc);
}
}));
i = 1;
while (i <= 5) {
setNomRoll(game["nom" + i]);
i++;
}
game.combar.com_add.myFunc = "add";
game.combar.com_subtract.myFunc = "subtract";
game.combar.com_multiply.myFunc = "multiply";
game.combar.com_divide.myFunc = "divide";
game.combar.com_feed.myFunc = "feed";
game.combar.com_combine.myFunc = "combine";
game.combar.com_add.onRollOver = (game.combar.com_subtract.onRollOver = (game.combar.com_multiply.onRollOver = (game.combar.com_divide.onRollOver = (game.combar.com_feed.onRollOver = (game.combar.com_combine.onRollOver = function () {
if (_global.animating == false) {
if (this.canUse == true) {
updateCounts(this.myFunc);
caurina.transitions.Tweener.addTween(this, {_xscale:106, _yscale:106, time:0.2, transition:"easeOutSine"});
this.shadow._alpha = 0;
}
}
})))));
game.combar.com_add.onRollOut = (game.combar.com_subtract.onRollOut = (game.combar.com_multiply.onRollOut = (game.combar.com_divide.onRollOut = (game.combar.com_feed.onRollOut = (game.combar.com_combine.onRollOut = function () {
if (_global.animating == false) {
if (this.canUse == true) {
updateCounts("general");
caurina.transitions.Tweener.addTween(this, {_xscale:100, _yscale:100, time:0.1, transition:"easeOutSine"});
this.shadow._alpha = 100;
}
}
})))));
game.combar.com_add.onPress = (game.combar.com_subtract.onPress = (game.combar.com_multiply.onPress = (game.combar.com_divide.onPress = (game.combar.com_feed.onPress = (game.combar.com_combine.onPress = function () {
if (_global.animating == false) {
if (this.canUse == true) {
this._xscale = 96;
this._yscale = 96;
this.shadow._alpha = 0;
mergeNombers(this.myFunc);
}
}
})))));
game.combar.com_add.onRelease = (game.combar.com_subtract.onRelease = (game.combar.com_multiply.onRelease = (game.combar.com_divide.onRelease = (game.combar.com_feed.onRelease = (game.combar.com_combine.onRelease = function () {
if (_global.animating == false) {
if (this.canUse == true) {
this._xscale = 100;
this._yscale = 100;
this.shadow._alpha = 100;
}
}
})))));
}
function showInstructions() {
if (instructions) {
instructions.removeMovieClip();
}
attachMe("instructions_all", "instructions");
instructions._x = 0;
instructions._y = -490;
caurina.transitions.Tweener.addTween(instructions.simple, {_y:490, time:0.7, transition:"easeOutBounce"});
instructions.simple.hitclose.onPress = function () {
caurina.transitions.Tweener.addTween(instructions.simple, {_y:0, time:0.5, transition:"easeOutSine", onComplete:function () {
instructions.removeMovieClip();
}});
};
instructions.detailed.onPress = function () {
caurina.transitions.Tweener.addTween(instructions.detailed, {_y:0, time:0.5, transition:"easeOutSine"});
};
instructions.simple.btn_details.onPress = function () {
enlargeMe(instructions.simple.btn_details, "shrink");
instructions.detailed.swapDepths(_root.getNextHighestDepth());
caurina.transitions.Tweener.addTween(instructions.detailed, {_y:490, time:0.7, transition:"easeOutBounce"});
};
instructions.simple.btn_details.onRollOver = function () {
enlargeMe(this);
};
instructions.simple.btn_details.onRollOut = function () {
enlargeMe(this, "shrink");
};
}
function showScores(which) {
if (leaderboard) {
leaderboard.removeMovieClip();
}
attachMe("leaderboard");
getScores();
if (!which) {
leaderboard.completetext._visible = false;
leaderboard.btn_playagain._visible = false;
clearedtext._visible = true;
leaderboard.hitclose.onPress = function () {
caurina.transitions.Tweener.addTween(leaderboard, {_y:-490, time:0.5, transition:"easeOutSine", onComplete:function () {
leaderboard.removeMovieClip();
}});
};
} else {
leaderboard.clearedtext._visible = false;
leaderboard.completetext._visible = true;
leaderboard.btn_playagain._visible = true;
leaderboard.btn_playagain.onRollOver = function () {
enlargeMe(this);
};
leaderboard.btn_playagain.onRollOut = function () {
enlargeMe(this, "shrink");
};
leaderboard.btn_playagain.onPress = function () {
leaderboard.removeMovieClip();
game.removeMovieClip();
_root.gotoAndPlay(10);
};
leaderboard.hitclose.onPress = (leaderboard.hitclose.onRollOver = (leaderboard.hitclose.onRollOut = function () {
this.useHandCursor = false;
}));
}
leaderboard._x = 0;
leaderboard._y = -490;
caurina.transitions.Tweener.addTween(leaderboard, {_y:0, time:0.7, transition:"easeOutBounce"});
}
function nullRolls() {
nullObject(game.combar.com_add);
nullObject(game.combar.com_subtract);
nullObject(game.combar.com_multiply);
nullObject(game.combar.com_divide);
nullObject(game.combar.com_feed);
nullObject(game.combar.com_combine);
nullObject(game.kitchen.menubar.tab);
nullObject(game.btn_sound);
nullObject(game.btn_scores);
nullObject(game.btn_instructions);
i = 1;
while (i <= 5) {
nullObject(game["nom" + i]);
i++;
}
}
function nullObject(which) {
which.onRollOver = (which.onRollOut = (which.onPress = (which.onRelease = function () {
})));
}
function enlargeMe(which, size) {
if (size) {
caurina.transitions.Tweener.addTween(which, {_xscale:100, _yscale:100, time:0.2, transition:"easeOutSine"});
} else {
caurina.transitions.Tweener.addTween(which, {_xscale:120, _yscale:120, time:0.2, transition:"easeOutSine"});
}
}
function moveMenu(which, which2) {
if (which == "open") {
caurina.transitions.Tweener.addTween(game.kitchen.menubar, {_x:-170, time:0.4, transition:"easeOutSine"});
}
if (which == "close") {
caurina.transitions.Tweener.addTween(game.kitchen.menubar, {_x:141, time:0.4, transition:"easeOutSine", onComplete:function () {
closeExtraBar();
}});
}
if (which == "sub") {
if (which2 == "hint") {
game.kitchen.menubar.extra.hinttxt.text = _global.lvlHint;
}
if (which2 == "answer") {
game.kitchen.menubar.extra.hinttxt.text = _global.lvlAnswer;
}
caurina.transitions.Tweener.addTween(game.kitchen.menubar.extra, {_x:14.3, time:0.4, transition:"easeOutSine"});
}
}
function closeExtraBar() {
caurina.transitions.Tweener.addTween(game.kitchen.menubar.extra, {_x:326.9, time:0.4, transition:"easeOutSine"});
}
function eatNombers(nomAmount) {
game.cave.attachMovie("nomber", "omnom1", i);
game.cave.omnom1._y = -randMe(130, 160);
game.cave.omnom1._x = 0;
game.cave.attachMovie("denominator_eat_mask", "eat_mask1", _root.getNextHighestDepth());
game.cave.eat_mask1._y = -100;
game.cave.eat_mask1._x = 0;
game.cave.omnom1.setMask(game.cave.eat_mask1);
var _local2 = randMe(50, 360);
game.cave.omnom1.myamount.text = nomAmount;
caurina.transitions.Tweener.addTween(game.cave.omnom1, {_y:80, _rotation:_local2, time:0.6, delay:0.5, transition:"easeOutSine", onComplete:function () {
game.cave.eat_mask1.removeMovieClip();
game.cave.omnom1.removeMovieClip();
chewUp();
}});
}
function chewUp(which) {
caurina.transitions.Tweener.removeTweens(game.kitchen);
if (randMe(1, 4) == 1) {
var _local2 = randMe(120, 160);
var _local3 = randMe(0.2, 0.7);
var _local5 = randMe(0.1, 0.4);
caurina.transitions.Tweener.addTween(game.cave.denominator.eye_left, {_yscale:_local2, _xscale:_local2, time:_local3, delay:_local5, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.cave.denominator.eye_left, {_yscale:100, _xscale:100, time:0.2, delay:_local3 + _local5, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.cave.denominator.eye_right, {_yscale:_local2, _xscale:_local2, time:_local3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.cave.denominator.eye_right, {_yscale:100, _xscale:100, time:0.2, delay:_local3, transition:"easeOutSine"});
}
if (randMe(1, 2) == 1) {
var _local9 = randMe(80, 100);
var _local6 = randMe(0.5, 0.8);
caurina.transitions.Tweener.addTween(game.cave.denominator.mouth, {_yscale:_local9, _xscale:_local9, time:_local6, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.cave.denominator.mouth, {_yscale:100, _xscale:100, time:0.3, delay:_local6, transition:"easeOutSine"});
}
if (randMe(1, 2) == 1) {
var _local7 = randMe(103, 105);
var _local8 = randMe(0.5, 0.8);
caurina.transitions.Tweener.addTween(game.cave.denominator.body, {_yscale:_local7, _xscale:_local7, time:_local8, transition:"easeOutBounce"});
caurina.transitions.Tweener.addTween(game.cave.denominator.body, {_yscale:100, _xscale:100, time:0.3, delay:_local8, transition:"easeOutSine"});
}
if (randMe(1, 2) == 1) {
var _local11 = randMe(68, 78);
caurina.transitions.Tweener.addTween(game.cave.denominator, {_y:_local11, time:0.2, transition:"easeOutSine", onComplete:function () {
playSounds("thump");
}});
caurina.transitions.Tweener.addTween(game.cave.denominator, {_y:87, time:0.3, delay:0.2, transition:"easeOutBounce"});
caurina.transitions.Tweener.addTween(game.cave.shadow, {_yscale:70, _xscale:70, time:0.2, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.cave.shadow, {_yscale:100, _xscale:100, time:0.3, delay:0.2, transition:"easeOutBounce"});
var _local4 = randMe(1, 2);
var _local1 = randMe(4, 8);
var _local10 = randMe(1, 2);
if (_local10 == 1) {
_local4 = -_local4;
} else {
_local1 = -_local1;
}
caurina.transitions.Tweener.addTween(game.cave, {_rotation:_local4, time:0.2, delay:0.3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.cave, {_rotation:0, time:0.2, delay:0.5, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.cave.lightbulb, {_rotation:_local1, time:0.3, delay:0.3, transition:"easeInQuad"});
caurina.transitions.Tweener.addTween(game.cave.lightbulb, {_rotation:0, time:0.3, delay:0.6, transition:"easeOutQuad"});
caurina.transitions.Tweener.addTween(game.cave.chain, {_rotation:_local1, time:0.3, delay:0.3, transition:"easeInQuad"});
caurina.transitions.Tweener.addTween(game.cave.chain, {_rotation:0, time:0.3, delay:0.6, transition:"easeOutQuad"});
}
if (randMe(1, 3) == 1) {
caurina.transitions.Tweener.addTween(game.cave.denominator.brow, {_y:-randMe(150, 154), _rotation:randMe(1, 3), time:0.4, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.cave.denominator.brow, {_y:-149, _rotation:0, time:0.3, delay:0.4, transition:"easeOutSine"});
}
if (!which) {
playSounds("eating");
game.cave.denominator.mouth.play();
} else {
idleAnimation();
}
}
function getScores() {
myData = new LoadVars();
System.security.allowDomain("*.meyermartinteam.com", "*.meyermarquee.com", "*.deviantart.com", "*.newgrounds.com", "*.ungrounded.com", "*.deviantart.net", "*.newgrounds.net", "*.ungrounded.net");
myData.load("http://www.fictionalhead.com/assets/scripts/omnom-getscores.php");
myData.onLoad = function (success) {
if (success) {
leaderboard.yourname.text = _global.yourName;
leaderboard.yourscore.text = _global.yourScore.commaFormat();
i = 1;
while (i <= 10) {
_global["topName" + i] = myData["user" + i];
_global["topScore" + i] = myData["score" + i];
_global["converted" + i] = int(_global["topScore" + i]);
if (i < 10) {
_global["topName" + i] = (("0" + i) + " - ") + _global["topName" + i];
} else {
_global["topName" + i] = (i + " - ") + _global["topName" + i];
}
leaderboard["userName" + i].text = _global["topName" + i];
leaderboard["userScore" + i].text = _global["converted" + i].commaFormat();
i++;
}
}
};
}
function reviseScore() {
var _local2 = new LoadVars();
_local2.name = _global.yourName;
_local2.score = _global.yourScore;
_local2.idUsed = _global.lastIdUsed;
System.security.allowDomain("*.meyermartinteam.com", "*.meyermarquee.com", "*.deviantart.com", "*.newgrounds.com", "*.ungrounded.com", "*.deviantart.net", "*.newgrounds.net", "*.ungrounded.net");
_local2.sendAndLoad("http://www.fictionalhead.com/assets/scripts/omnom-revise.php", _local2, "POST");
}
Number.prototype.commaFormat = function () {
n = this.toString();
insPTR = 1;
if (n.indexOf(".") == -1) {
t = "";
n = n.split("");
} else {
t = n.substr(n.indexOf("."), n.length);
n = n.substr(0, n.indexOf(".")).split("");
}
for (ptr in n) {
t = n[ptr] + t;
if ((insPTR++) == 3) {
insPTR = 1;
t = (((isNaN(n[0]) && (ptr > 1)) || ((!isNaN(n[0])) && (ptr >= 1))) ? ("," + t) : (t));
}
}
return(t);
};
function initializeScreen(lvl) {
attachMe("game");
setRolls();
loadLevel(lvl);
}
function loadLevel(which, restarting) {
caurina.transitions.Tweener.removeTweens(game.kitchen);
idleAnimation();
idleThoughts();
if (!restarting) {
_global.lvlPoints = _global.levelset[which][0] * _global.pointConstant;
}
_global.animating = false;
_global.currentLevel = which;
game.lvlName.text = _global.yourName;
setUsableButtons(0);
_global.lvlTiles = _global.levelset[which][0];
_global.lvlNeeded = _global.levelset[which][_global.lvlTiles + 1];
_global.lvlHint = _global.levelset[which][_global.lvlTiles + 2];
_global.lvlAnswer = _global.levelset[which][_global.lvlTiles + 3];
_global.lvlHave = 0;
var _local3 = which % 3;
if (_local3 == 1) {
var _local4 = ((which / 3) - 0.333333333333333) + 1;
}
if (_local3 == 2) {
var _local4 = ((which / 3) - 0.666666666666667) + 1;
}
if (_local3 == 0) {
var _local4 = which / 3;
}
var _local5 = which - (3 * (_local4 - 1));
game.lvltext.text = (("LEVEL " + _local4) + "-") + _local5;
if (_global.currentLevel == 100) {
game.lvltext.text = "FINAL LEVEL";
}
updateCounts("general");
i = 1;
while (i <= 5) {
if (game["nom" + i]) {
game["nom" + i].removeMovieClip();
}
i++;
}
i = 1;
while (i <= _global.lvlTiles) {
_global["tile" + i] = _global.levelset[which][i];
_global["mainSlot" + i] = "filled";
game.attachMovie("nomber", "nom" + i, i);
game["nom" + i]._x = _global.nomPosX[i];
game["nom" + i]._y = _global.nomPosY[i];
game["nom" + i].myVal = _global.levelset[which][i];
game["nom" + i].myamount.text = _global.levelset[which][i];
game["nom" + i].currentPos = i;
setNomRoll(game["nom" + i]);
i++;
}
checkMainSlotStatus();
}
function setNomRoll(which, i) {
which.onRollOver = function () {
if (_global.animating == false) {
lighten(this, 20);
}
};
which.onRollOut = function () {
if (_global.animating == false) {
lighten(this, 0);
}
};
which.onPress = function () {
if (_global.animating == false) {
this.startDrag();
this.swapDepths(1000);
checkDottedLines();
}
};
which.onRelease = function () {
if (_global.animating == false) {
this.stopDrag();
checkSlots(this._droptarget, this);
}
};
which.doubleClickEnabled = false;
which.onReleaseOutside = function () {
if (_global.animating == false) {
this.stopDrag();
checkSlots(this._droptarget, this);
}
};
}
function checkSlots(which, whichNom) {
if ((which == "/game/mainslot1") && (_global.mainSlot1 != "filled")) {
_global.mainSlot1 = "filled";
whichNom.currentPos = 1;
whichNom.inUse = false;
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[1], _y:_global.nomPosY[1], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((which == "/game/mainslot2") && (_global.mainSlot2 != "filled")) {
_global.mainSlot2 = "filled";
whichNom.currentPos = 2;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[2], _y:_global.nomPosY[2], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((which == "/game/mainslot3") && (_global.mainSlot3 != "filled")) {
_global.mainSlot3 = "filled";
whichNom.currentPos = 3;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[3], _y:_global.nomPosY[3], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((which == "/game/mainslot4") && (_global.mainSlot4 != "filled")) {
_global.mainSlot4 = "filled";
whichNom.currentPos = 4;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[4], _y:_global.nomPosY[4], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((which == "/game/mainslot5") && (_global.mainSlot5 != "filled")) {
_global.mainSlot5 = "filled";
whichNom.currentPos = 5;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[5], _y:_global.nomPosY[5], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((which == "/game/border1") && (_global.slot1 != "filled")) {
_global.slot1 = "filled";
_global.slot1Value = whichNom.myVal;
whichNom.currentPos = 6;
whichNom.inUse = true;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.pickedPosX[1], _y:_global.pickedPosY[1], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
dropNom(whichNom);
}});
} else if ((which == "/game/border2") && (_global.slot2 != "filled")) {
_global.slot2 = "filled";
_global.slot2Value = whichNom.myVal;
whichNom.currentPos = 7;
whichNom.inUse = true;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.pickedPosX[2], _y:_global.pickedPosY[2], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
dropNom(whichNom);
}});
} else if ((which == "/game/border3") && (_global.slot3 != "filled")) {
_global.slot3 = "filled";
_global.slot3Value = whichNom.myVal;
whichNom.currentPos = 8;
whichNom.inUse = true;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.pickedPosX[3], _y:_global.pickedPosY[3], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
dropNom(whichNom);
}});
} else if ((which == "/game/border4") && (_global.slot4 != "filled")) {
_global.slot4 = "filled";
_global.slot4Value = whichNom.myVal;
whichNom.currentPos = 9;
whichNom.inUse = true;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.pickedPosX[4], _y:_global.pickedPosY[4], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
dropNom(whichNom);
}});
} else if ((_global.mainSlot1 != "filled") || (whichNom.currentPos == 1)) {
whichNom.currentPos = 1;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[1], _y:_global.nomPosY[1], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((_global.mainSlot2 != "filled") || (whichNom.currentPos == 2)) {
whichNom.currentPos = 2;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[2], _y:_global.nomPosY[2], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((_global.mainSlot3 != "filled") || (whichNom.currentPos == 3)) {
whichNom.currentPos = 3;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[3], _y:_global.nomPosY[3], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((_global.mainSlot5 != "filled") || (whichNom.currentPos == 4)) {
whichNom.currentPos = 4;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[4], _y:_global.nomPosY[4], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
} else if ((_global.mainSlot5 != "filled") || (whichNom.currentPos == 5)) {
whichNom.currentPos = 5;
whichNom.inUse = false;
checkMainSlotStatus(whichNom);
caurina.transitions.Tweener.addTween(whichNom, {_x:_global.nomPosX[5], _y:_global.nomPosY[5], time:0.4 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
checkMainSlotStatus(whichNom);
}});
}
checkDottedLines("hide");
}
function updateCounts(which) {
game.counter_needed.myamount.text = _global.lvlNeeded;
game.lvlpoints.text = _global.lvlPoints.commaFormat();
game.lvlScore.text = _global.yourScore.commaFormat();
if ((which == "general") || (which == "feed")) {
if (_global.slotsFilledTotal > 1) {
_global.lvlHave = "?";
} else {
_global.lvlHave = 0;
i = 1;
while (i <= 4) {
if (_global[("slot" + i) + "Value"]) {
_global.lvlHave = _global.lvlHave + _global[("slot" + i) + "Value"];
}
i++;
}
}
} else {
_global.lvlHave = nomberValues(which);
}
game.counter_kitchen.myamount.text = _global.lvlHave;
}
function nomberValues(which) {
if (which == "add") {
var _local3 = ((_global.slot1Value + _global.slot2Value) + _global.slot3Value) + _global.slot4Value;
}
if (which == "subtract") {
if (_global.slot1Value) {
var _local3 = _global.slot1Value - ((_global.slot2Value + _global.slot3Value) + _global.slot4Value);
} else if (_global.slot2Value) {
var _local3 = _global.slot2Value - (_global.slot3Value + _global.slot4Value);
} else if (_global.slot3Value) {
var _local3 = _global.slot3Value - _global.slot4Value;
}
}
if (which == "multiply") {
if (_global.slot1Value != 0) {
thisVal = _global.slot1Value;
} else {
var thisVal = 0;
}
if (_global.slot2Value != 0) {
if (thisVal == 0) {
thisVal = _global.slot2Value;
} else {
thisVal = thisVal * _global.slot2Value;
}
}
if (_global.slot3Value != 0) {
if (thisVal == 0) {
thisVal = _global.slot3Value;
} else {
thisVal = thisVal * _global.slot3Value;
}
}
if (_global.slot4Value != 0) {
if (thisVal == 0) {
thisVal = _global.slot4Value;
} else {
thisVal = thisVal * _global.slot4Value;
}
}
var _local3 = thisVal;
}
if (which == "divide") {
var _local3 = checkDivision();
}
if (which == "combine") {
if ((_global.slot1Value != 0) && (_global.slot2Value != 0)) {
var _local7 = _global.slot1Value.toString();
var _local6 = _global.slot2Value.toString();
}
if ((_global.slot1Value != 0) && (_global.slot3Value != 0)) {
var _local7 = _global.slot1Value.toString();
var _local6 = _global.slot3Value.toString();
}
if ((_global.slot1Value != 0) && (_global.slot4Value != 0)) {
var _local7 = _global.slot1Value.toString();
var _local6 = _global.slot4Value.toString();
}
if ((_global.slot2Value != 0) && (_global.slot3Value != 0)) {
var _local7 = _global.slot2Value.toString();
var _local6 = _global.slot3Value.toString();
}
if ((_global.slot2Value != 0) && (_global.slot4Value != 0)) {
var _local7 = _global.slot2Value.toString();
var _local6 = _global.slot4Value.toString();
}
if ((_global.slot3Value != 0) && (_global.slot4Value != 0)) {
var _local7 = _global.slot3Value.toString();
var _local6 = _global.slot4Value.toString();
}
var _local5 = _local7 + _local6;
var _local4 = int(_local5);
var _local3 = _local4;
}
return(_local3);
}
function checkDivision() {
if ((_global.slot1Value != 0) && (_global.slot2Value != 0)) {
valDiv1 = _global.slot1Value;
valDiv2 = _global.slot2Value;
}
if ((_global.slot1Value != 0) && (_global.slot3Value != 0)) {
valDiv1 = _global.slot1Value;
valDiv2 = _global.slot3Value;
}
if ((_global.slot1Value != 0) && (_global.slot4Value != 0)) {
valDiv1 = _global.slot1Value;
valDiv2 = _global.slot4Value;
}
if ((_global.slot2Value != 0) && (_global.slot3Value != 0)) {
valDiv1 = _global.slot2Value;
valDiv2 = _global.slot3Value;
}
if ((_global.slot2Value != 0) && (_global.slot4Value != 0)) {
valDiv1 = _global.slot2Value;
valDiv2 = _global.slot4Value;
}
if ((_global.slot3Value != 0) && (_global.slot4Value != 0)) {
valDiv1 = _global.slot3Value;
valDiv2 = _global.slot4Value;
}
tempTotal = valDiv1 / valDiv2;
var _local2 = tempTotal % 1;
if (_local2) {
var _local3 = "?";
} else {
var _local3 = valDiv1 / valDiv2;
}
return(_local3);
}
function dropNom(which) {
caurina.transitions.Tweener.addTween(which, {_y:235, time:0.3, transition:"easeOutBounce"});
playSounds("drop");
}
function checkMainSlotStatus(which) {
checkKitchenSlotStatus(which);
i = 1;
while (i <= 5) {
if (_root.game["mainslot" + i].hitTest(_root.game.nom1)) {
_global["mainSlot" + i] = "filled";
} else if (_root.game["mainslot" + i].hitTest(_root.game.nom2)) {
_global["mainSlot" + i] = "filled";
} else if (_root.game["mainslot" + i].hitTest(_root.game.nom3)) {
_global["mainSlot" + i] = "filled";
} else if (_root.game["mainslot" + i].hitTest(_root.game.nom4)) {
_global["mainSlot" + i] = "filled";
} else if (_root.game["mainslot" + i].hitTest(_root.game.nom5)) {
_global["mainSlot" + i] = "filled";
} else {
_global["mainSlot" + i] = null;
}
i++;
}
}
function checkKitchenSlotStatus(which) {
_global.slotsFilledTotal = 0;
i = 1;
while (i <= 4) {
if (_root.game["border" + i].hitTest(_root.game.nom1)) {
_global["slot" + i] = "filled";
} else if (_root.game["border" + i].hitTest(_root.game.nom2)) {
_global["slot" + i] = "filled";
} else if (_root.game["border" + i].hitTest(_root.game.nom3)) {
_global["slot" + i] = "filled";
} else if (_root.game["border" + i].hitTest(_root.game.nom4)) {
_global["slot" + i] = "filled";
} else if (_root.game["border" + i].hitTest(_root.game.nom5)) {
_global["slot" + i] = "filled";
} else {
_global["slot" + i] = null;
_global[("slot" + i) + "Value"] = 0;
}
i++;
}
if (_global.slot1 == "filled") {
_global.slotsFilledTotal = _global.slotsFilledTotal + 1;
}
if (_global.slot2 == "filled") {
_global.slotsFilledTotal = _global.slotsFilledTotal + 1;
}
if (_global.slot3 == "filled") {
_global.slotsFilledTotal = _global.slotsFilledTotal + 1;
}
if (_global.slot4 == "filled") {
_global.slotsFilledTotal = _global.slotsFilledTotal + 1;
}
setUsableButtons(_global.slotsFilledTotal);
}
function setUsableButtons(which) {
var _local2 = 70;
if (which == 0) {
game.combar.com_add.disabled._alpha = _local2;
game.combar.com_add.canUse = false;
game.combar.com_subtract.disabled._alpha = _local2;
game.combar.com_subtract.canUse = false;
game.combar.com_multiply.disabled._alpha = _local2;
game.combar.com_multiply.canUse = false;
game.combar.com_divide.disabled._alpha = _local2;
game.combar.com_divide.canUse = false;
game.combar.com_combine.disabled._alpha = _local2;
game.combar.com_combine.canUse = false;
game.combar.com_feed.disabled._alpha = _local2;
game.combar.com_feed.canUse = false;
} else if (which == 1) {
game.combar.com_add.disabled._alpha = _local2;
game.combar.com_add.canUse = false;
game.combar.com_subtract.disabled._alpha = _local2;
game.combar.com_subtract.canUse = false;
game.combar.com_multiply.disabled._alpha = _local2;
game.combar.com_multiply.canUse = false;
game.combar.com_divide.disabled._alpha = _local2;
game.combar.com_divide.canUse = false;
game.combar.com_combine.disabled._alpha = _local2;
game.combar.com_combine.canUse = false;
game.combar.com_feed.disabled._alpha = 0;
game.combar.com_feed.canUse = true;
} else if (which == 2) {
game.combar.com_add.disabled._alpha = 0;
game.combar.com_add.canUse = true;
game.combar.com_subtract.disabled._alpha = 0;
game.combar.com_subtract.canUse = true;
game.combar.com_multiply.disabled._alpha = 0;
game.combar.com_multiply.canUse = true;
game.combar.com_divide.disabled._alpha = 0;
game.combar.com_divide.canUse = true;
game.combar.com_combine.disabled._alpha = 0;
game.combar.com_combine.canUse = true;
game.combar.com_feed.disabled._alpha = _local2;
game.combar.com_feed.canUse = false;
} else if (which == 3) {
game.combar.com_add.disabled._alpha = 0;
game.combar.com_add.canUse = true;
game.combar.com_subtract.disabled._alpha = _local2;
game.combar.com_subtract.canUse = false;
game.combar.com_multiply.disabled._alpha = 0;
game.combar.com_multiply.canUse = true;
game.combar.com_divide.disabled._alpha = _local2;
game.combar.com_divide.canUse = false;
game.combar.com_combine.disabled._alpha = _local2;
game.combar.com_combine.canUse = false;
game.combar.com_feed.disabled._alpha = _local2;
game.combar.com_feed.canUse = false;
} else if (which == 4) {
game.combar.com_add.disabled._alpha = 0;
game.combar.com_add.canUse = true;
game.combar.com_subtract.disabled._alpha = _local2;
game.combar.com_subtract.canUse = false;
game.combar.com_multiply.disabled._alpha = 0;
game.combar.com_multiply.canUse = true;
game.combar.com_divide.disabled._alpha = _local2;
game.combar.com_divide.canUse = false;
game.combar.com_combine.disabled._alpha = _local2;
game.combar.com_combine.canUse = false;
game.combar.com_feed.disabled._alpha = _local2;
game.combar.com_feed.canUse = false;
}
if (nomberValues("add") > 99) {
game.combar.com_add.disabled._alpha = _local2;
game.combar.com_add.canUse = false;
}
if (nomberValues("subtract") < 1) {
game.combar.com_subtract.disabled._alpha = _local2;
game.combar.com_subtract.canUse = false;
}
if (nomberValues("multiply") > 99) {
game.combar.com_multiply.disabled._alpha = _local2;
game.combar.com_multiply.canUse = false;
}
if ((((_global.slot1Value > 9) || (_global.slot2Value > 9)) || (_global.slot3Value > 9)) || (_global.slot4Value > 9)) {
game.combar.com_combine.disabled._alpha = _local2;
game.combar.com_combine.canUse = false;
}
if (checkDivision() == "?") {
game.combar.com_divide.disabled._alpha = _local2;
game.combar.com_divide.canUse = false;
}
if (_global.lvlHave > _global.lvlNeeded) {
game.combar.com_feed.disabled._alpha = _local2;
game.combar.com_feed.canUse = false;
}
setRolls("game");
updateCounts("general");
}
function checkDottedLines(which) {
if (_global.slot1 == "filled") {
caurina.transitions.Tweener.addTween(game.border1, {_alpha:0, time:0.2, transition:"easeOutSine"});
} else {
caurina.transitions.Tweener.addTween(game.border1, {_alpha:100, time:0.2, transition:"easeOutSine"});
}
if (_global.slot2 == "filled") {
caurina.transitions.Tweener.addTween(game.border2, {_alpha:0, time:0.2, transition:"easeOutSine"});
} else {
caurina.transitions.Tweener.addTween(game.border2, {_alpha:100, time:0.2, transition:"easeOutSine"});
}
if (_global.slot3 == "filled") {
caurina.transitions.Tweener.addTween(game.border3, {_alpha:0, time:0.2, transition:"easeOutSine"});
} else {
caurina.transitions.Tweener.addTween(game.border3, {_alpha:100, time:0.2, transition:"easeOutSine"});
}
if (_global.slot4 == "filled") {
caurina.transitions.Tweener.addTween(game.border4, {_alpha:0, time:0.2, transition:"easeOutSine"});
} else {
caurina.transitions.Tweener.addTween(game.border4, {_alpha:100, time:0.2, transition:"easeOutSine"});
}
if (which == "hide") {
caurina.transitions.Tweener.addTween(game.border1, {_alpha:0, time:0.2, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.border2, {_alpha:0, time:0.2, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.border3, {_alpha:0, time:0.2, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.border4, {_alpha:0, time:0.2, transition:"easeOutSine"});
}
}
function mergeNombers(which) {
if (which == "feed") {
i = 1;
while (i <= 4) {
if (_global["slot" + i] == "filled") {
whichNom = i;
}
var _local2 = whichNom + 5;
i++;
}
i = 1;
while (i <= 5) {
if (game["nom" + i].currentPos == _local2) {
var moveNomber = game["nom" + i];
}
i++;
}
var useAmount = moveNomber.myVal;
game.kitchen.mask.duplicateMovieClip("maskNomber");
moveNomber.setMask(game.kitchen.maskNomber);
moveNomber.swapDepths(40);
game.pipe.swapDepths(41);
_global.animating = true;
playSounds("pipe");
caurina.transitions.Tweener.addTween(game.pipe, {_y:130, time:0.8 * _global.gameSpeed, transition:"easeOutBounce"});
caurina.transitions.Tweener.addTween(moveNomber, {_x:300, time:0.7 * _global.gameSpeed, delay:0.8 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
playSounds("suction");
}});
caurina.transitions.Tweener.addTween(moveNomber, {_y:90, time:1 * _global.gameSpeed, delay:1.5 * _global.gameSpeed, transition:"easeInExpo", onComplete:function () {
eatNombers(useAmount);
moveNomber.swapDepths(1);
moveNomber.removeMovieClip();
game.kitchen.maskNomber.swapDepths(1);
game.kitchen.maskNomber.removeMovieClip();
}});
caurina.transitions.Tweener.addTween(game.pipe, {_y:94, time:0.8 * _global.gameSpeed, delay:2.5 * _global.gameSpeed, transition:"easeInExpo", onComplete:function () {
eatAndCheck(useAmount);
}});
} else {
_global.ranReduce = false;
if (_global.lvlHave != "?") {
var newCombinedVal = _global.lvlHave;
i = 1;
while (i <= 5) {
if (game["nom" + i].inUse == true) {
_global.animating = true;
playSounds("whip");
caurina.transitions.Tweener.addTween(game["nom" + i], {_y:_global.pickedPosY[1], time:0.7 * _global.gameSpeed, transition:"easeOutElastic", onComplete:function () {
playSounds("whip");
}});
caurina.transitions.Tweener.addTween(game["nom" + i], {_x:_global.pickedPosX[1], time:0.3 * _global.gameSpeed, delay:0.7 * _global.gameSpeed, transition:"easeOutSine", onComplete:function () {
reduceNoms(newCombinedVal);
}});
}
i++;
}
}
}
}
function reduceNoms(which) {
if (_global.ranReduce == false) {
_global.animating = false;
if (removeList) {
delete removeList;
}
var removeList = new Array();
i = 1;
while (i <= 5) {
if (game["nom" + i].inUse == true) {
removeList.push(game["nom" + i]);
}
i++;
}
i = 1;
while (i <= 5) {
removeList[1].swapDepths(1);
removeList[i].removeMovieClip();
i++;
}
removeList[0].currentPos = 6;
removeList[0].inUse = true;
removeList[0].myVal = which;
removeList[0].myamount.text = which;
dropNom(removeList[0]);
_global.slot1Value = which;
_global.slot2Value = 0;
_global.slot3Value = 0;
_global.slot4Value = 0;
_global.slot1 = "filled";
_global.slot2 = null;
_global.slot3 = null;
_global.slot4 = null;
_global.slotsFilledTotal = 1;
setUsableButtons(1);
updateCounts("general");
setRolls("game");
_global.ranReduce = true;
}
}
function eatAndCheck(which) {
_global.lvlNeeded = _global.lvlNeeded - which;
checkMainSlotStatus();
updateCounts("general");
setUsableButtons(0);
setRolls("game");
_global.animating = false;
checkEndLevel(_global.lvlHave, _global.lvlNeeded);
}
function checkEndLevel(have, needed) {
var _local2 = 0;
i = 1;
while (i <= 5) {
if (game["nom" + i]) {
_local2 = _local2 + 1;
}
i++;
}
if (((have == 0) && (needed == 0)) && (_local2 == 0)) {
if (_global.currentLevel == 100) {
systemMessage("GAME COMPLETE!");
} else {
systemMessage("LEVEL COMPLETE!");
}
}
}
function systemMessage(which) {
nullRolls();
moveMenu("close");
caurina.transitions.Tweener.removeTweens(game.kitchen);
if ((((game.thoughts.sub3._alpha > 0) || (game.thoughts.sub2._alpha > 0)) || (game.thoughts.sub1._alpha > 0)) || (game.thoughts.main._alpha > 0)) {
caurina.transitions.Tweener.addTween(game.thoughts.main, {_alpha:0, time:0.3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.sub1, {_alpha:0, time:0.3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.sub2, {_alpha:0, time:0.3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.sub3, {_alpha:0, time:0.3, transition:"easeOutSine"});
}
if (sys_msg) {
sys_msg.removeMovieClip();
}
attachMe("sys_msg");
sys_msg._alpha = 0;
sys_msg._x = Stage.width / 2;
sys_msg._y = -500;
if (_global.lvlPoints == 0) {
_global.messageExtra = " (Viewed Answer)";
} else if (((_global.lvlPoints == 1500) || (_global.lvlPoints == 2000)) || (_global.lvlPoints == 2500)) {
_global.messageExtra = " (Viewed Hint)";
} else {
_global.messageExtra = "";
}
which = which + (("\n+" + _global.lvlPoints.commaFormat()) + _global.messageExtra);
sys_msg.msg_text.text = which;
sys_msg._alpha = 100;
caurina.transitions.Tweener.addTween(sys_msg, {_y:Stage.height / 2, time:0.7, delay:1, transition:"easeOutBack", onComplete:function () {
playSounds("bell");
}});
_global.yourScore = _global.yourScore + _global.lvlPoints;
game.lvlScore.text = _global.yourScore.commaFormat();
reviseScore();
sys_msg.btn_next.onRollOver = function () {
enlargeMe(this);
};
sys_msg.btn_next.onRollOut = function () {
enlargeMe(this, "shrink");
};
sys_msg.btn_next.onPress = function () {
if (_global.currentLevel < 100) {
_global.currentLevel = _global.currentLevel + 1;
caurina.transitions.Tweener.addTween(sys_msg, {_y:-500, time:0.7, transition:"easeInBack", onComplete:function () {
loadLevel(_global.currentLevel);
sys_msg.removeMovieClip();
}});
} else {
showScores("done");
}
};
}
function menuAction(which) {
if (which == "restart") {
loadLevel(_global.currentLevel, "restart");
}
if (which == "hint") {
moveMenu("sub", "hint");
if (_global.lvlPoints != 0) {
_global.lvlPoints = _global.levelset[_global.currentLevel][0] * (_global.pointConstant / 2);
}
updateCounts("general");
}
if (which == "answer") {
moveMenu("sub", "answer");
_global.lvlPoints = 0;
updateCounts("general");
}
}
function playSounds(which) {
if (myEffect) {
delete myEffect;
}
if (which == "drop") {
var _local4 = Math.round(Math.random() * 5) + 1;
myEffect = new Sound(this);
myEffect.attachSound("putdown" + _local4);
}
if (which == "whip") {
var _local4 = Math.round(Math.random() * 4) + 1;
myEffect = new Sound(this);
myEffect.attachSound("whip" + _local4);
}
if (which == "pipe") {
myEffect = new Sound(this);
myEffect.attachSound("pipedrop");
}
if (which == "suction") {
myEffect = new Sound(this);
myEffect.attachSound("suction");
}
if (which == "eating") {
myEffect = new Sound(this);
myEffect.attachSound("eating");
}
if (which == "thump") {
var _local4 = Math.round(Math.random() * 2) + 1;
myEffect = new Sound(this);
myEffect.attachSound("bang" + _local4);
}
if (which == "bell") {
myEffect = new Sound(this);
myEffect.attachSound("bell");
}
myEffect.setVolume(_global.soundVolume);
myEffect.start();
}
function idleAnimation() {
var _local1 = randMe(30, 10);
caurina.transitions.Tweener.addTween(game.kitchen, {time:0, delay:_local1, onComplete:function () {
chewUp("noChew");
}});
}
function idleThoughts() {
var _local1 = randMe(30, 20);
caurina.transitions.Tweener.addTween(game.kitchen, {time:0, delay:_local1, onComplete:function () {
randomThought();
}});
}
function randomThought() {
game.thoughts.main._alpha = 0;
game.thoughts.sub1._alpha = 0;
game.thoughts.sub2._alpha = 0;
game.thoughts.sub3._alpha = 0;
game.thoughts._x = 484;
var _local2 = Math.round(Math.random() * ((_global.nomThoughts.length - 1) - 1)) + 1;
game.thoughts.main.thoughttxt.text = _global.nomThoughts[_local2];
caurina.transitions.Tweener.addTween(game.thoughts.sub3, {_rotation:360, time:6, transition:"linear"});
caurina.transitions.Tweener.addTween(game.thoughts.sub2, {_rotation:360, time:5.8, transition:"linear"});
caurina.transitions.Tweener.addTween(game.thoughts.sub1, {_rotation:360, time:6.2, transition:"linear"});
caurina.transitions.Tweener.addTween(game.thoughts.sub3, {_alpha:100, time:0.3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.sub2, {_alpha:100, time:0.3, delay:0.3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.sub1, {_alpha:100, time:0.3, delay:0.6, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.main, {_alpha:100, time:0.3, delay:0.9, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.main, {_alpha:0, time:0.3, delay:3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.sub1, {_alpha:0, time:0.3, delay:3.3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.sub2, {_alpha:0, time:0.3, delay:3.6, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(game.thoughts.sub3, {_alpha:0, time:0.3, delay:3.9, transition:"easeOutSine", onComplete:function () {
game.thoughts._x = 784;
idleThoughts();
}});
}
if (!_global.startLevel) {
_global.startLevel = 1;
}
initializeScreen(_global.startLevel);
stop();
Frame 10
function attachMe(which, whichname) {
if (whichname) {
_root.attachMovie(which, whichname, _root.getNextHighestDepth());
} else {
_root.attachMovie(which, which, _root.getNextHighestDepth());
}
}
function randMe(x, y) {
var _local1 = Math.round(Math.random() * (y - x)) + x;
return(_local1);
}
function setRolls(which) {
home.btn_sound.onPress = function () {
if (_global.soundVolume > 0) {
_global.soundVolume = 0;
_global.musicVolume = 0;
myMusic.setVolume(_global.musicVolume);
home.btn_sound.waves._alpha = 0;
} else {
_global.soundVolume = 100;
_global.musicVolume = 100;
myMusic.setVolume(_global.musicVolume);
home.btn_sound.waves._alpha = 100;
}
};
home.yourname.btn_ready._visible = (home.yourlevel._visible = (home.yourname._visible = false));
home.yourname.btn_ready._alpha = (home.yourlevel._alpha = (home.yourname._alpha = 0));
home.btn_play.onRollOver = (home.btn_instructions.onRollOver = (home.copytext.onRollOver = (home.yourname.btn_ready.onRollOver = (home.btn_sound.onRollOver = function () {
enlargeMe(this);
}))));
home.btn_play.onRollOut = (home.btn_instructions.onRollOut = (home.copytext.onRollOut = (home.yourname.btn_ready.onRollOut = (home.btn_sound.onRollOut = function () {
enlargeMe(this, "shrink");
}))));
home.copytext.onPress = function () {
getURL ("http://www.fictionalhead.com/", "_blank");
};
home.btn_instructions.onPress = function () {
showInstructions();
};
home.btn_play.onPress = function () {
if ((home.yourname.yourname.text == "") || (home.yourname.yourname.text == "ENTER YOUR NAME")) {
caurina.transitions.Tweener.addTween(home.btn_instructions, {_y:380, time:0.2, transition:"easeOutSine"});
home.yourname._visible = true;
home.yourlevel._visible = true;
caurina.transitions.Tweener.addTween(home.yourname, {_alpha:100, time:0.2, delay:0.2, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.yourlevel, {_alpha:100, time:0.2, delay:0.2, transition:"easeOutSine"});
} else {
_global.yourName = home.yourname.yourname.text;
createNameInDB();
home.removeMovieClip();
_root.gotoAndStop(5);
}
};
home.yourname.yourname.onSetFocus = (home.yourlevel.lvlchoice.onSetFocus = function () {
if (((this.text == "") || (this.text == "ENTER YOUR NAME")) || (this.text == "1")) {
this.text = "";
}
});
home.yourlevel.lvlchoice.onChanged = function () {
if ((int(this.text) > 0) && (int(this.text) <= 100)) {
_global.startLevel = int(this.text);
} else {
_global.startLevel = 1;
}
};
home.yourname.yourname.onChanged = function () {
if ((this.text != "") || (this.text != "ENTER YOUR NAME")) {
home.yourname.btn_ready._visible = true;
Key.addListener(someListener);
caurina.transitions.Tweener.addTween(home.yourname.btn_ready, {_alpha:100, time:0.2, transition:"easeOutSine"});
home.yourname.btn_ready.onPress = function () {
_global.yourName = home.yourname.yourname.text;
createNameInDB();
home.removeMovieClip();
_root.gotoAndStop(5);
};
}
};
home.yourlevel.lvlchoice.onKillFocus = function () {
if ((this.text == "") || (this.text == "1")) {
this.text = "1";
}
};
home.yourname.yourname.onKillFocus = function () {
if ((this.text == "") || (this.text == "ENTER YOUR NAME")) {
this.text = "ENTER YOUR NAME";
home.yourname.btn_ready._visible = false;
home.yourname.btn_ready._alpha = 0;
}
};
}
function createNameInDB() {
var varsToSend = new LoadVars();
varsToSend.name = _global.yourName;
varsToSend.score = _global.yourScore;
System.security.allowDomain("*.meyermartinteam.com", "*.meyermarquee.com", "*.deviantart.com", "*.newgrounds.com", "*.ungrounded.com", "*.deviantart.net", "*.newgrounds.net", "*.ungrounded.net");
varsToSend.sendAndLoad("http://www.fictionalhead.com/assets/scripts/omnom-scores.php", varsToSend, "POST");
varsToSend.onLoad = function (success) {
if (success) {
_global.lastIdUsed = varsToSend.lastId;
}
};
}
function showInstructions() {
if (instructions) {
instructions.removeMovieClip();
}
attachMe("instructions_all", "instructions");
instructions._x = 0;
instructions._y = -490;
caurina.transitions.Tweener.addTween(instructions.simple, {_y:490, time:0.7, transition:"easeOutBounce"});
instructions.simple.hitclose.onPress = function () {
caurina.transitions.Tweener.addTween(instructions.simple, {_y:0, time:0.5, transition:"easeOutSine", onComplete:function () {
instructions.removeMovieClip();
}});
};
instructions.detailed.onPress = function () {
caurina.transitions.Tweener.addTween(instructions.detailed, {_y:0, time:0.5, transition:"easeOutSine"});
};
instructions.simple.btn_details.onPress = function () {
enlargeMe(instructions.simple.btn_details, "shrink");
instructions.detailed.swapDepths(_root.getNextHighestDepth());
caurina.transitions.Tweener.addTween(instructions.detailed, {_y:490, time:0.7, transition:"easeOutBounce"});
};
instructions.simple.btn_details.onRollOver = function () {
enlargeMe(this);
};
instructions.simple.btn_details.onRollOut = function () {
enlargeMe(this, "shrink");
};
}
function enlargeMe(which, size) {
if (size) {
caurina.transitions.Tweener.addTween(which, {_xscale:100, _yscale:100, time:0.2, transition:"easeOutSine"});
} else {
caurina.transitions.Tweener.addTween(which, {_xscale:120, _yscale:120, time:0.2, transition:"easeOutSine"});
}
}
function freakOut(which) {
if (randMe(1, 2) == 1) {
var _local1 = randMe(120, 160);
var _local2 = randMe(0.2, 0.7);
var _local3 = randMe(0.1, 0.4);
caurina.transitions.Tweener.addTween(home.denominator.eye_left, {_yscale:_local1, _xscale:_local1, time:_local2, delay:_local3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.denominator.eye_left, {_yscale:100, _xscale:100, time:0.2, delay:_local2 + _local3, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.denominator.eye_right, {_yscale:_local1, _xscale:_local1, time:_local2, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.denominator.eye_right, {_yscale:100, _xscale:100, time:0.2, delay:_local2, transition:"easeOutSine"});
}
if (randMe(1, 2) == 1) {
var _local7 = randMe(80, 100);
var _local4 = randMe(0.5, 0.8);
caurina.transitions.Tweener.addTween(home.denominator.mouth, {_yscale:_local7, _xscale:_local7, time:_local4, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.denominator.mouth, {_yscale:100, _xscale:100, time:0.3, delay:_local4, transition:"easeOutSine"});
}
if (randMe(1, 2) == 1) {
var _local5 = randMe(103, 105);
var _local6 = randMe(0.5, 0.8);
caurina.transitions.Tweener.addTween(home.denominator.body, {_yscale:_local5, _xscale:_local5, time:_local6, transition:"easeOutBounce"});
caurina.transitions.Tweener.addTween(home.denominator.body, {_yscale:100, _xscale:100, time:0.3, delay:_local6, transition:"easeOutSine"});
}
if (which) {
var _local8 = randMe(330, 310);
caurina.transitions.Tweener.addTween(home.denominator, {_y:_local8, time:0.2, transition:"easeOutSine", onComplete:function () {
playSounds("thump");
shakeLogo();
}});
caurina.transitions.Tweener.addTween(home.denominator, {_y:370, time:0.3, delay:0.2, transition:"easeOutBounce"});
caurina.transitions.Tweener.addTween(home.shadow, {_yscale:70, _xscale:70, time:0.2, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.shadow, {_yscale:100, _xscale:100, time:0.3, delay:0.2, transition:"easeOutBounce"});
} else if (randMe(1, 2) == 1) {
var _local8 = randMe(330, 310);
caurina.transitions.Tweener.addTween(home.denominator, {_y:_local8, time:0.2, transition:"easeOutSine", onComplete:function () {
playSounds("thump");
shakeLogo();
}});
caurina.transitions.Tweener.addTween(home.denominator, {_y:370, time:0.3, delay:0.2, transition:"easeOutBounce"});
caurina.transitions.Tweener.addTween(home.shadow, {_yscale:70, _xscale:70, time:0.2, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.shadow, {_yscale:100, _xscale:100, time:0.3, delay:0.2, transition:"easeOutBounce"});
}
if (randMe(1, 3) == 1) {
caurina.transitions.Tweener.addTween(home.denominator.brow, {_y:-randMe(150, 154), _rotation:randMe(1, 3), time:0.4, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.denominator.brow, {_y:-149, _rotation:0, time:0.3, delay:0.4, transition:"easeOutSine"});
}
if (randMe(1, 5) == 1) {
home.denominator.mouth.play();
}
}
function shakeLogo() {
caurina.transitions.Tweener.addTween(home.logo, {_y:87, time:0.1, delay:0.1, transition:"easeOutSine"});
caurina.transitions.Tweener.addTween(home.logo, {_y:97, time:0.3, delay:0.2, transition:"easeOutBounce"});
}
someListener = new Object();
someListener.onKeyDown = function () {
if (Key.isDown(13)) {
_global.yourName = home.yourname.yourname.text;
createNameInDB();
home.removeMovieClip();
_root.gotoAndStop(5);
Key.removeListener(someListener);
delete someListener;
}
};
function initializeScreen() {
attachMe("home");
setRolls();
homeFreak("first");
playSounds("theme");
}
function playSounds(which) {
if (myEffect) {
delete myEffect;
}
if (which == "thump") {
var _local3 = Math.round(Math.random() * 2) + 1;
myEffect = new Sound(this);
myEffect.attachSound("bang" + _local3);
}
if (which == "theme") {
if (!myMusic) {
myMusic = new Sound(this);
myMusic.attachSound("theme_wav");
myMusic.setVolume(_global.musicVolume);
myMusic.start(0, 9999);
}
}
myEffect.setVolume(_global.soundVolume);
myEffect.start();
}
function homeFreak(which) {
if (which) {
freakOut("first");
var _local1 = randMe(6, 1);
caurina.transitions.Tweener.addTween(home, {time:0, delay:0, onComplete:function () {
freakOut();
homeFreak();
}});
} else {
var _local1 = randMe(6, 1);
caurina.transitions.Tweener.addTween(home, {time:0, delay:_local1, onComplete:function () {
freakOut();
homeFreak();
}});
}
}
initializeScreen();
stop();
Symbol 37 MovieClip [denominator_mouth] Frame 1
stop();
Instance of Symbol 74 MovieClip [chain] "chain" in Symbol 77 MovieClip [cave] Frame 1
onClipEvent (load) {
this.setMask(_root.game.cave.mask);
}
Instance of Symbol 141 MovieClip [restart] "restart" in Symbol 149 MovieClip [menubar] Frame 1
/* no clip actions */
Instance of Symbol 149 MovieClip [menubar] "menubar" in Symbol 152 MovieClip [kitchen] Frame 1
onClipEvent (load) {
this.setMask(_root.game.kitchen.mask2);
}
Instance of Symbol 159 MovieClip [border] "border1" in Symbol 191 MovieClip [game] Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 159 MovieClip [border] "border2" in Symbol 191 MovieClip [game] Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 159 MovieClip [border] "border3" in Symbol 191 MovieClip [game] Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 159 MovieClip [border] "border4" in Symbol 191 MovieClip [game] Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 164 MovieClip [kitchen_pipe] "pipe" in Symbol 191 MovieClip [game] Frame 1
onClipEvent (load) {
this.setMask(_root.game.kitchen.mask);
}
Instance of Symbol 255 MovieClip [denom] "denom" in Symbol 268 MovieClip [leaderboard] Frame 1
onClipEvent (load) {
this.setMask(_root.leaderboard.denom_mask);
_root.leaderboard.denom_mask._yscale = (_global.currentLevel / 100) * 100;
_root.leaderboard.outline._alpha = 100 - _root.leaderboard.denom_mask._yscale;
_root.leaderboard.clearedtext.text = (_global.currentLevel - 1) + "/100\nCLEARED";
}
Symbol 288 MovieClip [__Packages.caurina.transitions.Tweener] Frame 0
class caurina.transitions.Tweener
{
static var _specialPropertySplitterList, _specialPropertyModifierList, _specialPropertyList, _transitionList, _currentTimeFrame, _currentTime, _tweenList;
function Tweener () {
trace("Tweener is an static class and should not be instantiated.");
}
static function addTween(p_scopes, p_parameters) {
if (p_scopes == undefined) {
return(false);
}
var _local3;
var _local7;
var _local2;
var _local11;
if (p_scopes instanceof Array) {
_local11 = p_scopes.concat();
} else {
_local11 = [p_scopes];
}
var _local5 = caurina.transitions.TweenListObj.makePropertiesChain(p_parameters);
if (!_inited) {
init();
}
if ((!_engineExists) || (_root[getControllerName()] == undefined)) {
startEngine();
}
var _local19 = (isNaN(_local5.time) ? 0 : (_local5.time));
var _local12 = (isNaN(_local5.delay) ? 0 : (_local5.delay));
var _local4 = new Object();
var _local24 = {overwrite:true, time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true};
var _local13 = new Object();
for (_local2 in _local5) {
if (!_local24[_local2]) {
if (_specialPropertySplitterList[_local2] != undefined) {
var _local8 = _specialPropertySplitterList[_local2].splitValues(_local5[_local2], _specialPropertySplitterList[_local2].parameters);
_local3 = 0;
while (_local3 < _local8.length) {
if (_specialPropertySplitterList[_local8[_local3].name] != undefined) {
var _local9 = _specialPropertySplitterList[_local8[_local3].name].splitValues(_local8[_local3].value, _specialPropertySplitterList[_local8[_local3].name].parameters);
_local7 = 0;
while (_local7 < _local9.length) {
_local4[_local9[_local7].name] = {valueStart:undefined, valueComplete:_local9[_local7].value, arrayIndex:_local9[_local7].arrayIndex, isSpecialProperty:false};
_local7++;
}
} else {
_local4[_local8[_local3].name] = {valueStart:undefined, valueComplete:_local8[_local3].value, arrayIndex:_local8[_local3].arrayIndex, isSpecialProperty:false};
}
_local3++;
}
} else if (_specialPropertyModifierList[_local2] != undefined) {
var _local10 = _specialPropertyModifierList[_local2].modifyValues(_local5[_local2]);
_local3 = 0;
while (_local3 < _local10.length) {
_local13[_local10[_local3].name] = {modifierParameters:_local10[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local2].getValue};
_local3++;
}
} else {
_local4[_local2] = {valueStart:undefined, valueComplete:_local5[_local2]};
}
}
}
for (_local2 in _local4) {
if (_specialPropertyList[_local2] != undefined) {
_local4[_local2].isSpecialProperty = true;
} else if (_local11[0][_local2] == undefined) {
printError(((("The property '" + _local2) + "' doesn't seem to be a normal object property of ") + _local11[0].toString()) + " or a registered special property.");
}
}
for (_local2 in _local13) {
if (_local4[_local2] != undefined) {
_local4[_local2].modifierParameters = _local13[_local2].modifierParameters;
_local4[_local2].modifierFunction = _local13[_local2].modifierFunction;
}
}
var _local21;
if (typeof(_local5.transition) == "string") {
var _local26 = _local5.transition.toLowerCase();
_local21 = _transitionList[_local26];
} else {
_local21 = _local5.transition;
}
if (_local21 == undefined) {
_local21 = _transitionList.easeoutexpo;
}
var _local14;
var _local6;
var _local20;
_local3 = 0;
while (_local3 < _local11.length) {
_local14 = new Object();
for (_local2 in _local4) {
_local14[_local2] = new caurina.transitions.PropertyInfoObj(_local4[_local2].valueStart, _local4[_local2].valueComplete, _local4[_local2].valueComplete, _local4[_local2].arrayIndex, {}, _local4[_local2].isSpecialProperty, _local4[_local2].modifierFunction, _local4[_local2].modifierParameters);
}
if (_local5.useFrames == true) {
_local6 = new caurina.transitions.TweenListObj(_local11[_local3], _currentTimeFrame + (_local12 / _timeScale), _currentTimeFrame + ((_local12 + _local19) / _timeScale), true, _local21, _local5.transitionParams);
} else {
_local6 = new caurina.transitions.TweenListObj(_local11[_local3], _currentTime + ((_local12 * 1000) / _timeScale), _currentTime + (((_local12 * 1000) + (_local19 * 1000)) / _timeScale), false, _local21, _local5.transitionParams);
}
_local6.properties = _local14;
_local6.onStart = _local5.onStart;
_local6.onUpdate = _local5.onUpdate;
_local6.onComplete = _local5.onComplete;
_local6.onOverwrite = _local5.onOverwrite;
_local6.onError = _local5.onError;
_local6.onStartParams = _local5.onStartParams;
_local6.onUpdateParams = _local5.onUpdateParams;
_local6.onCompleteParams = _local5.onCompleteParams;
_local6.onOverwriteParams = _local5.onOverwriteParams;
_local6.onStartScope = _local5.onStartScope;
_local6.onUpdateScope = _local5.onUpdateScope;
_local6.onCompleteScope = _local5.onCompleteScope;
_local6.onOverwriteScope = _local5.onOverwriteScope;
_local6.onErrorScope = _local5.onErrorScope;
_local6.rounded = _local5.rounded;
_local6.skipUpdates = _local5.skipUpdates;
if (((_local5.overwrite == undefined) ? (autoOverwrite) : (_local5.overwrite))) {
removeTweensByTime(_local6.scope, _local6.properties, _local6.timeStart, _local6.timeComplete);
}
_tweenList.push(_local6);
if ((_local19 == 0) && (_local12 == 0)) {
_local20 = _tweenList.length - 1;
updateTweenByIndex(_local20);
removeTweenByIndex(_local20);
}
_local3++;
}
return(true);
}
static function addCaller(p_scopes, p_parameters) {
if (p_scopes == undefined) {
return(false);
}
var _local5;
var _local6;
if (p_scopes instanceof Array) {
_local6 = p_scopes.concat();
} else {
_local6 = [p_scopes];
}
var _local3 = p_parameters;
if (!_inited) {
init();
}
if ((!_engineExists) || (_root[getControllerName()] == undefined)) {
startEngine();
}
var _local7 = (isNaN(_local3.time) ? 0 : (_local3.time));
var _local4 = (isNaN(_local3.delay) ? 0 : (_local3.delay));
var _local9;
if (typeof(_local3.transition) == "string") {
var _local11 = _local3.transition.toLowerCase();
_local9 = _transitionList[_local11];
} else {
_local9 = _local3.transition;
}
if (_local9 == undefined) {
_local9 = _transitionList.easeoutexpo;
}
var _local2;
var _local8;
_local5 = 0;
while (_local5 < _local6.length) {
if (_local3.useFrames == true) {
_local2 = new caurina.transitions.TweenListObj(_local6[_local5], _currentTimeFrame + (_local4 / _timeScale), _currentTimeFrame + ((_local4 + _local7) / _timeScale), true, _local9, _local3.transitionParams);
} else {
_local2 = new caurina.transitions.TweenListObj(_local6[_local5], _currentTime + ((_local4 * 1000) / _timeScale), _currentTime + (((_local4 * 1000) + (_local7 * 1000)) / _timeScale), false, _local9, _local3.transitionParams);
}
_local2.properties = undefined;
_local2.onStart = _local3.onStart;
_local2.onUpdate = _local3.onUpdate;
_local2.onComplete = _local3.onComplete;
_local2.onOverwrite = _local3.onOverwrite;
_local2.onStartParams = _local3.onStartParams;
_local2.onUpdateParams = _local3.onUpdateParams;
_local2.onCompleteParams = _local3.onCompleteParams;
_local2.onOverwriteParams = _local3.onOverwriteParams;
_local2.onStartScope = _local3.onStartScope;
_local2.onUpdateScope = _local3.onUpdateScope;
_local2.onCompleteScope = _local3.onCompleteScope;
_local2.onOverwriteScope = _local3.onOverwriteScope;
_local2.onErrorScope = _local3.onErrorScope;
_local2.isCaller = true;
_local2.count = _local3.count;
_local2.waitFrames = _local3.waitFrames;
_tweenList.push(_local2);
if ((_local7 == 0) && (_local4 == 0)) {
_local8 = _tweenList.length - 1;
updateTweenByIndex(_local8);
removeTweenByIndex(_local8);
}
_local5++;
}
return(true);
}
static function removeTweensByTime(p_scope, p_properties, p_timeStart, p_timeComplete) {
var _local5 = false;
var _local4;
var _local1;
var _local7 = _tweenList.length;
var _local2;
_local1 = 0;
while (_local1 < _local7) {
if (p_scope == _tweenList[_local1].scope) {
if ((p_timeComplete > _tweenList[_local1].timeStart) && (p_timeStart < _tweenList[_local1].timeComplete)) {
_local4 = false;
for (_local2 in _tweenList[_local1].properties) {
if (p_properties[_local2] != undefined) {
if (_tweenList[_local1].onOverwrite != undefined) {
var _local3 = ((_tweenList[_local1].onOverwriteScope != undefined) ? (_tweenList[_local1].onOverwriteScope) : (_tweenList[_local1].scope));
try {
_tweenList[_local1].onOverwrite.apply(_local3, _tweenList[_local1].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[_local1], e, "onOverwrite");
}
}
_tweenList[_local1].properties[_local2] = undefined;
delete _tweenList[_local1].properties[_local2];
_local4 = true;
_local5 = true;
}
}
if (_local4) {
if (caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local1].properties) == 0) {
removeTweenByIndex(_local1);
}
}
}
}
_local1++;
}
return(_local5);
}
static function removeTweens(p_scope) {
var _local5 = new Array();
var _local3;
_local3 = 1;
while (_local3 < arguments.length) {
if ((typeof(arguments[_local3]) == "string") && (!caurina.transitions.AuxFunctions.isInArray(arguments[_local3], _local5))) {
if (_specialPropertySplitterList[arguments[_local3]]) {
var _local6 = _specialPropertySplitterList[arguments[_local3]];
var _local4 = _local6.splitValues(p_scope, null);
var _local2 = 0;
while (_local2 < _local4.length) {
_local5.push(_local4[_local2].name);
_local2++;
}
} else {
_local5.push(arguments[_local3]);
}
}
_local3++;
}
return(affectTweens(removeTweenByIndex, p_scope, _local5));
}
static function removeAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
removeTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function pauseTweens(p_scope) {
var _local3 = new Array();
var _local2;
_local2 = 1;
while (_local2 < arguments.length) {
if ((typeof(arguments[_local2]) == "string") && (!caurina.transitions.AuxFunctions.isInArray(arguments[_local2], _local3))) {
_local3.push(arguments[_local2]);
}
_local2++;
}
return(affectTweens(pauseTweenByIndex, p_scope, _local3));
}
static function pauseAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
pauseTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function resumeTweens(p_scope) {
var _local3 = new Array();
var _local2;
_local2 = 1;
while (_local2 < arguments.length) {
if ((typeof(arguments[_local2]) == "string") && (!caurina.transitions.AuxFunctions.isInArray(arguments[_local2], _local3))) {
_local3.push(arguments[_local2]);
}
_local2++;
}
return(affectTweens(resumeTweenByIndex, p_scope, _local3));
}
static function resumeAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
resumeTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function affectTweens(p_affectFunction, p_scope, p_properties) {
var _local5 = false;
var _local2;
if (!_tweenList) {
return(false);
}
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == p_scope) {
if (p_properties.length == 0) {
p_affectFunction(_local2);
_local5 = true;
} else {
var _local4 = new Array();
var _local1;
_local1 = 0;
while (_local1 < p_properties.length) {
if (_tweenList[_local2].properties[p_properties[_local1]] != undefined) {
_local4.push(p_properties[_local1]);
}
_local1++;
}
if (_local4.length > 0) {
var _local7 = caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local2].properties);
if (_local7 == _local4.length) {
p_affectFunction(_local2);
_local5 = true;
} else {
var _local8 = splitTweens(_local2, _local4);
p_affectFunction(_local8);
_local5 = true;
}
}
}
}
_local2++;
}
return(_local5);
}
static function splitTweens(p_tween, p_properties) {
var _local6 = _tweenList[p_tween];
var _local5 = _local6.clone(false);
var _local1;
var _local2;
_local1 = 0;
while (_local1 < p_properties.length) {
_local2 = p_properties[_local1];
if (_local6.properties[_local2] != undefined) {
_local6.properties[_local2] = undefined;
delete _local6.properties[_local2];
}
_local1++;
}
var _local4;
for (_local2 in _local5.properties) {
_local4 = false;
_local1 = 0;
while (_local1 < p_properties.length) {
if (p_properties[_local1] == _local2) {
_local4 = true;
break;
}
_local1++;
}
if (!_local4) {
_local5.properties[_local2] = undefined;
delete _local5.properties[_local2];
}
}
_tweenList.push(_local5);
return(_tweenList.length - 1);
}
static function updateTweens() {
if (_tweenList.length == 0) {
return(false);
}
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (!_tweenList[_local1].isPaused) {
if (!updateTweenByIndex(_local1)) {
removeTweenByIndex(_local1);
}
if (_tweenList[_local1] == null) {
removeTweenByIndex(_local1, true);
_local1--;
}
}
_local1++;
}
return(true);
}
static function removeTweenByIndex(p_tween, p_finalRemoval) {
_tweenList[p_tween] = null;
if (p_finalRemoval) {
_tweenList.splice(p_tween, 1);
}
return(true);
}
static function pauseTweenByIndex(p_tween) {
var _local1 = _tweenList[p_tween];
if ((_local1 == null) || (_local1.isPaused)) {
return(false);
}
_local1.timePaused = getCurrentTweeningTime(_local1);
_local1.isPaused = true;
return(true);
}
static function resumeTweenByIndex(p_tween) {
var _local1 = _tweenList[p_tween];
if ((_local1 == null) || (!_local1.isPaused)) {
return(false);
}
var _local2 = getCurrentTweeningTime(_local1);
_local1.timeStart = _local1.timeStart + (_local2 - _local1.timePaused);
_local1.timeComplete = _local1.timeComplete + (_local2 - _local1.timePaused);
_local1.timePaused = undefined;
_local1.isPaused = false;
return(true);
}
static function updateTweenByIndex(i) {
var _local1 = _tweenList[i];
if ((_local1 == null) || (!_local1.scope)) {
return(false);
}
var _local13 = false;
var _local14;
var _local3;
var _local7;
var _local10;
var _local9;
var _local6;
var _local2;
var _local12;
var _local5;
var _local8 = getCurrentTweeningTime(_local1);
var _local4;
if (_local8 >= _local1.timeStart) {
_local5 = _local1.scope;
if (_local1.isCaller) {
do {
_local7 = ((_local1.timeComplete - _local1.timeStart) / _local1.count) * (_local1.timesCalled + 1);
_local10 = _local1.timeStart;
_local9 = _local1.timeComplete - _local1.timeStart;
_local6 = _local1.timeComplete - _local1.timeStart;
_local3 = _local1.transition(_local7, _local10, _local9, _local6, _local1.transitionParams);
if (_local8 >= _local3) {
if (_local1.onUpdate != undefined) {
_local12 = ((_local1.onUpdateScope != undefined) ? (_local1.onUpdateScope) : (_local5));
try {
_local1.onUpdate.apply(_local12, _local1.onUpdateParams);
} catch(e:Error) {
handleError(_local1, e, "onUpdate");
}
}
_local1.timesCalled++;
if (_local1.timesCalled >= _local1.count) {
_local13 = true;
break;
}
if (_local1.waitFrames) {
break;
}
}
} while (_local8 >= _local3);
} else {
_local14 = ((_local1.skipUpdates < 1) || (_local1.skipUpdates == undefined)) || (_local1.updatesSkipped >= _local1.skipUpdates);
if (_local8 >= _local1.timeComplete) {
_local13 = true;
_local14 = true;
}
if (!_local1.hasStarted) {
if (_local1.onStart != undefined) {
_local12 = ((_local1.onStartScope != undefined) ? (_local1.onStartScope) : (_local5));
try {
_local1.onStart.apply(_local12, _local1.onStartParams);
} catch(e:Error) {
handleError(_local1, e, "onStart");
}
}
var _local11;
for (_local2 in _local1.properties) {
if (_local1.properties[_local2].isSpecialProperty) {
if (_specialPropertyList[_local2].preProcess != undefined) {
_local1.properties[_local2].valueComplete = _specialPropertyList[_local2].preProcess(_local5, _specialPropertyList[_local2].parameters, _local1.properties[_local2].originalValueComplete, _local1.properties[_local2].extra);
}
_local11 = _specialPropertyList[_local2].getValue(_local5, _specialPropertyList[_local2].parameters, _local1.properties[_local2].extra);
} else {
_local11 = _local5[_local2];
}
_local1.properties[_local2].valueStart = (isNaN(_local11) ? (_local1.properties[_local2].valueComplete) : (_local11));
}
_local14 = true;
_local1.hasStarted = true;
}
if (_local14) {
for (_local2 in _local1.properties) {
_local4 = _local1.properties[_local2];
if (_local13) {
_local3 = _local4.valueComplete;
} else if (_local4.hasModifier) {
_local7 = _local8 - _local1.timeStart;
_local6 = _local1.timeComplete - _local1.timeStart;
_local3 = _local1.transition(_local7, 0, 1, _local6, _local1.transitionParams);
_local3 = _local4.modifierFunction(_local4.valueStart, _local4.valueComplete, _local3, _local4.modifierParameters);
} else {
_local7 = _local8 - _local1.timeStart;
_local10 = _local4.valueStart;
_local9 = _local4.valueComplete - _local4.valueStart;
_local6 = _local1.timeComplete - _local1.timeStart;
_local3 = _local1.transition(_local7, _local10, _local9, _local6, _local1.transitionParams);
}
if (_local1.rounded) {
_local3 = Math.round(_local3);
}
if (_local4.isSpecialProperty) {
_specialPropertyList[_local2].setValue(_local5, _local3, _specialPropertyList[_local2].parameters, _local1.properties[_local2].extra);
} else {
_local5[_local2] = _local3;
}
}
_local1.updatesSkipped = 0;
if (_local1.onUpdate != undefined) {
_local12 = ((_local1.onUpdateScope != undefined) ? (_local1.onUpdateScope) : (_local5));
try {
_local1.onUpdate.apply(_local12, _local1.onUpdateParams);
} catch(e:Error) {
handleError(_local1, e, "onUpdate");
}
}
} else {
_local1.updatesSkipped++;
}
}
if (_local13 && (_local1.onComplete != undefined)) {
_local12 = ((_local1.onCompleteScope != undefined) ? (_local1.onCompleteScope) : (_local5));
try {
_local1.onComplete.apply(_local12, _local1.onCompleteParams);
} catch(e:Error) {
handleError(_local1, e, "onComplete");
}
}
return(!_local13);
}
return(true);
}
static function init() {
_inited = true;
_transitionList = new Object();
caurina.transitions.Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
}
static function registerTransition(p_name, p_function) {
if (!_inited) {
init();
}
_transitionList[p_name] = p_function;
}
static function registerSpecialProperty(p_name, p_getFunction, p_setFunction, p_parameters, p_preProcessFunction) {
if (!_inited) {
init();
}
var _local1 = new caurina.transitions.SpecialProperty(p_getFunction, p_setFunction, p_parameters, p_preProcessFunction);
_specialPropertyList[p_name] = _local1;
}
static function registerSpecialPropertyModifier(p_name, p_modifyFunction, p_getFunction) {
if (!_inited) {
init();
}
var _local1 = new caurina.transitions.SpecialPropertyModifier(p_modifyFunction, p_getFunction);
_specialPropertyModifierList[p_name] = _local1;
}
static function registerSpecialPropertySplitter(p_name, p_splitFunction, p_parameters) {
if (!_inited) {
init();
}
var _local1 = new caurina.transitions.SpecialPropertySplitter(p_splitFunction, p_parameters);
_specialPropertySplitterList[p_name] = _local1;
}
static function startEngine() {
_engineExists = true;
_tweenList = new Array();
var _local2 = Math.floor(Math.random() * 999999);
var _local3 = _root.createEmptyMovieClip(getControllerName(), 31338 + _local2);
_local3.onEnterFrame = function () {
caurina.transitions.Tweener.onEnterFrame();
};
_currentTimeFrame = 0;
updateTime();
}
static function stopEngine() {
_engineExists = false;
_tweenList = null;
_currentTime = 0;
_currentTimeFrame = 0;
delete _root[getControllerName()].onEnterFrame;
_root[getControllerName()].removeMovieClip();
}
static function updateTime() {
_currentTime = getTimer();
}
static function updateFrame() {
_currentTimeFrame++;
}
static function onEnterFrame() {
updateTime();
updateFrame();
var _local1 = false;
_local1 = updateTweens();
if (!_local1) {
stopEngine();
}
}
static function setTimeScale(p_time) {
var _local1;
var _local2;
if (isNaN(p_time)) {
p_time = 1;
}
if (p_time < 1E-5) {
p_time = 1E-5;
}
if (p_time != _timeScale) {
_local1 = 0;
while (_local1 < _tweenList.length) {
_local2 = getCurrentTweeningTime(_tweenList[_local1]);
_tweenList[_local1].timeStart = _local2 - (((_local2 - _tweenList[_local1].timeStart) * _timeScale) / p_time);
_tweenList[_local1].timeComplete = _local2 - (((_local2 - _tweenList[_local1].timeComplete) * _timeScale) / p_time);
if (_tweenList[_local1].timePaused != undefined) {
_tweenList[_local1].timePaused = _local2 - (((_local2 - _tweenList[_local1].timePaused) * _timeScale) / p_time);
}
_local1++;
}
_timeScale = p_time;
}
}
static function isTweening(p_scope) {
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
return(true);
}
_local1++;
}
return(false);
}
static function getTweens(p_scope) {
var _local1;
var _local2;
var _local3 = new Array();
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
for (_local2 in _tweenList[_local1].properties) {
_local3.push(_local2);
}
}
_local1++;
}
return(_local3);
}
static function getTweenCount(p_scope) {
var _local1;
var _local2 = 0;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
_local2 = _local2 + caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local1].properties);
}
_local1++;
}
return(_local2);
}
static function handleError(pTweening, pError, pCallBackName) {
if ((pTweening.onError != undefined) && (typeof(pTweening.onError == "function"))) {
var _local3 = ((pTweening.onErrorScope != undefined) ? (pTweening.onErrorScope) : (pTweening.scope));
try {
pTweening.onError.apply(_local3, [pTweening.scope, pError]);
} catch(metaError:Error) {
printError((((pTweening.scope.toString() + " raised an error while executing the 'onError' handler. Original error:\n ") + pError) + "\nonError error: ") + metaError);
}
} else if (pTweening.onError == undefined) {
printError((((pTweening.scope.toString() + " raised an error while executing the '") + pCallBackName.toString()) + "'handler. \n") + pError);
}
}
static function getCurrentTweeningTime(p_tweening) {
return((p_tweening.useFrames ? (_currentTimeFrame) : (_currentTime)));
}
static function getVersion() {
return("AS2 1.33.74");
}
static function getControllerName() {
return("__tweener_controller__" + getVersion());
}
static function printError(p_message) {
trace("## [Tweener] Error: " + p_message);
}
static var _engineExists = false;
static var _inited = false;
static var _timeScale = 1;
static var autoOverwrite = true;
}
Symbol 289 MovieClip [__Packages.caurina.transitions.TweenListObj] Frame 0
class caurina.transitions.TweenListObj
{
var scope, timeStart, timeComplete, useFrames, transition, transitionParams, properties, isPaused, timePaused, isCaller, updatesSkipped, timesCalled, skipUpdates, hasStarted, onStart, onUpdate, onComplete, onOverwrite, onError, onStartParams, onUpdateParams, onCompleteParams, onOverwriteParams, onStartScope, onUpdateScope, onCompleteScope, onOverwriteScope, onErrorScope, rounded, count, waitFrames;
function TweenListObj (p_scope, p_timeStart, p_timeComplete, p_useFrames, p_transition, p_transitionParams) {
scope = p_scope;
timeStart = p_timeStart;
timeComplete = p_timeComplete;
useFrames = p_useFrames;
transition = p_transition;
transitionParams = p_transitionParams;
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
function clone(omitEvents) {
var _local2 = new caurina.transitions.TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams);
_local2.properties = new Object();
for (var _local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
}
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!omitEvents) {
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
_local2.onStartScope = onStartScope;
_local2.onUpdateScope = onUpdateScope;
_local2.onCompleteScope = onCompleteScope;
_local2.onOverwriteScope = onOverwriteScope;
_local2.onErrorScope = onErrorScope;
}
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return(_local2);
}
function toString() {
var _local2 = "\n[TweenListObj ";
_local2 = _local2 + ("scope:" + String(scope));
_local2 = _local2 + ", properties:";
var _local3 = true;
for (var _local4 in properties) {
if (!_local3) {
_local2 = _local2 + ",";
}
_local2 = _local2 + ("[name:" + properties[_local4].name);
_local2 = _local2 + (",valueStart:" + properties[_local4].valueStart);
_local2 = _local2 + (",valueComplete:" + properties[_local4].valueComplete);
_local2 = _local2 + "]";
_local3 = false;
}
_local2 = _local2 + (", timeStart:" + String(timeStart));
_local2 = _local2 + (", timeComplete:" + String(timeComplete));
_local2 = _local2 + (", useFrames:" + String(useFrames));
_local2 = _local2 + (", transition:" + String(transition));
_local2 = _local2 + (", transitionParams:" + String(transitionParams));
if (skipUpdates) {
_local2 = _local2 + (", skipUpdates:" + String(skipUpdates));
}
if (updatesSkipped) {
_local2 = _local2 + (", updatesSkipped:" + String(updatesSkipped));
}
if (onStart) {
_local2 = _local2 + (", onStart:" + String(onStart));
}
if (onUpdate) {
_local2 = _local2 + (", onUpdate:" + String(onUpdate));
}
if (onComplete) {
_local2 = _local2 + (", onComplete:" + String(onComplete));
}
if (onOverwrite) {
_local2 = _local2 + (", onOverwrite:" + String(onOverwrite));
}
if (onError) {
_local2 = _local2 + (", onError:" + String(onError));
}
if (onStartParams) {
_local2 = _local2 + (", onStartParams:" + String(onStartParams));
}
if (onUpdateParams) {
_local2 = _local2 + (", onUpdateParams:" + String(onUpdateParams));
}
if (onCompleteParams) {
_local2 = _local2 + (", onCompleteParams:" + String(onCompleteParams));
}
if (onOverwriteParams) {
_local2 = _local2 + (", onOverwriteParams:" + String(onOverwriteParams));
}
if (onStartScope) {
_local2 = _local2 + (", onStartScope:" + String(onStartScope));
}
if (onUpdateScope) {
_local2 = _local2 + (", onUpdateScope:" + String(onUpdateScope));
}
if (onCompleteScope) {
_local2 = _local2 + (", onCompleteScope:" + String(onCompleteScope));
}
if (onOverwriteScope) {
_local2 = _local2 + (", onOverwriteScope:" + String(onOverwriteScope));
}
if (onErrorScope) {
_local2 = _local2 + (", onErrorScope:" + String(onErrorScope));
}
if (rounded) {
_local2 = _local2 + (", rounded:" + String(rounded));
}
if (isPaused) {
_local2 = _local2 + (", isPaused:" + String(isPaused));
}
if (timePaused) {
_local2 = _local2 + (", timePaused:" + String(timePaused));
}
if (isCaller) {
_local2 = _local2 + (", isCaller:" + String(isCaller));
}
if (count) {
_local2 = _local2 + (", count:" + String(count));
}
if (timesCalled) {
_local2 = _local2 + (", timesCalled:" + String(timesCalled));
}
if (waitFrames) {
_local2 = _local2 + (", waitFrames:" + String(waitFrames));
}
if (hasStarted) {
_local2 = _local2 + (", hasStarted:" + String(hasStarted));
}
_local2 = _local2 + "]\n";
return(_local2);
}
static function makePropertiesChain(p_obj) {
var _local6 = p_obj.base;
if (_local6) {
var _local5 = {};
var _local2;
if (_local6 instanceof Array) {
_local2 = [];
var _local3 = 0;
while (_local3 < _local6.length) {
_local2.push(_local6[_local3]);
_local3++;
}
} else {
_local2 = [_local6];
}
_local2.push(p_obj);
var _local4;
var _local7 = _local2.length;
var _local1 = 0;
while (_local1 < _local7) {
if (_local2[_local1].base) {
_local4 = caurina.transitions.AuxFunctions.concatObjects(makePropertiesChain(_local2[_local1].base), _local2[_local1]);
} else {
_local4 = _local2[_local1];
}
_local5 = caurina.transitions.AuxFunctions.concatObjects(_local5, _local4);
_local1++;
}
if (_local5.base) {
delete _local5.base;
}
return(_local5);
}
return(p_obj);
}
}
Symbol 290 MovieClip [__Packages.caurina.transitions.AuxFunctions] Frame 0
class caurina.transitions.AuxFunctions
{
function AuxFunctions () {
}
static function numberToR(p_num) {
return((p_num & 16711680) >> 16);
}
static function numberToG(p_num) {
return((p_num & 65280) >> 8);
}
static function numberToB(p_num) {
return(p_num & 255);
}
static function isInArray(p_string, p_array) {
var _local2 = p_array.length;
var _local1 = 0;
while (_local1 < _local2) {
if (p_array[_local1] == p_string) {
return(true);
}
_local1++;
}
return(false);
}
static function getObjectLength(p_object) {
var _local1 = 0;
for (var _local2 in p_object) {
_local1++;
}
return(_local1);
}
static function concatObjects() {
var _local4 = {};
var _local2;
var _local3 = 0;
while (_local3 < arguments.length) {
_local2 = arguments[_local3];
for (var _local5 in _local2) {
if (_local2[_local5] == null) {
delete _local4[_local5];
} else {
_local4[_local5] = _local2[_local5];
}
}
_local3++;
}
return(_local4);
}
}
Symbol 291 MovieClip [__Packages.caurina.transitions.PropertyInfoObj] Frame 0
class caurina.transitions.PropertyInfoObj
{
var valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, hasModifier, modifierFunction, modifierParameters;
function PropertyInfoObj (p_valueStart, p_valueComplete, p_originalValueComplete, p_arrayIndex, p_extra, p_isSpecialProperty, p_modifierFunction, p_modifierParameters) {
valueStart = p_valueStart;
valueComplete = p_valueComplete;
originalValueComplete = p_originalValueComplete;
arrayIndex = p_arrayIndex;
extra = p_extra;
isSpecialProperty = p_isSpecialProperty;
hasModifier = p_modifierFunction != undefined;
modifierFunction = p_modifierFunction;
modifierParameters = p_modifierParameters;
}
function clone() {
var _local2 = new caurina.transitions.PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters);
return(_local2);
}
function toString() {
var _local2 = "\n[PropertyInfoObj ";
_local2 = _local2 + ("valueStart:" + String(valueStart));
_local2 = _local2 + ", ";
_local2 = _local2 + ("valueComplete:" + String(valueComplete));
_local2 = _local2 + ", ";
_local2 = _local2 + ("originalValueComplete:" + String(originalValueComplete));
_local2 = _local2 + ", ";
_local2 = _local2 + ("arrayIndex:" + String(arrayIndex));
_local2 = _local2 + ", ";
_local2 = _local2 + ("extra:" + String(extra));
_local2 = _local2 + ", ";
_local2 = _local2 + ("isSpecialProperty:" + String(isSpecialProperty));
_local2 = _local2 + ", ";
_local2 = _local2 + ("hasModifier:" + String(hasModifier));
_local2 = _local2 + ", ";
_local2 = _local2 + ("modifierFunction:" + String(modifierFunction));
_local2 = _local2 + ", ";
_local2 = _local2 + ("modifierParameters:" + String(modifierParameters));
_local2 = _local2 + "]\n";
return(_local2);
}
}
Symbol 292 MovieClip [__Packages.caurina.transitions.SpecialPropertySplitter] Frame 0
class caurina.transitions.SpecialPropertySplitter
{
var parameters;
function SpecialPropertySplitter (p_splitFunction, p_parameters) {
splitValues = p_splitFunction;
parameters = p_parameters;
}
function splitValues(p_value, p_parameters) {
return([]);
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialPropertySplitter ";
_local2 = _local2 + ("splitValues:" + splitValues.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("parameters:" + parameters.toString());
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 293 MovieClip [__Packages.caurina.transitions.Equations] Frame 0
class caurina.transitions.Equations
{
function Equations () {
trace("Equations is a static class and should not be instantiated.");
}
static function init() {
caurina.transitions.Tweener.registerTransition("easenone", easeNone);
caurina.transitions.Tweener.registerTransition("linear", easeNone);
caurina.transitions.Tweener.registerTransition("easeinquad", easeInQuad);
caurina.transitions.Tweener.registerTransition("easeoutquad", easeOutQuad);
caurina.transitions.Tweener.registerTransition("easeinoutquad", easeInOutQuad);
caurina.transitions.Tweener.registerTransition("easeoutinquad", easeOutInQuad);
caurina.transitions.Tweener.registerTransition("easeincubic", easeInCubic);
caurina.transitions.Tweener.registerTransition("easeoutcubic", easeOutCubic);
caurina.transitions.Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
caurina.transitions.Tweener.registerTransition("easeoutincubic", easeOutInCubic);
caurina.transitions.Tweener.registerTransition("easeinquart", easeInQuart);
caurina.transitions.Tweener.registerTransition("easeoutquart", easeOutQuart);
caurina.transitions.Tweener.registerTransition("easeinoutquart", easeInOutQuart);
caurina.transitions.Tweener.registerTransition("easeoutinquart", easeOutInQuart);
caurina.transitions.Tweener.registerTransition("easeinquint", easeInQuint);
caurina.transitions.Tweener.registerTransition("easeoutquint", easeOutQuint);
caurina.transitions.Tweener.registerTransition("easeinoutquint", easeInOutQuint);
caurina.transitions.Tweener.registerTransition("easeoutinquint", easeOutInQuint);
caurina.transitions.Tweener.registerTransition("easeinsine", easeInSine);
caurina.transitions.Tweener.registerTransition("easeoutsine", easeOutSine);
caurina.transitions.Tweener.registerTransition("easeinoutsine", easeInOutSine);
caurina.transitions.Tweener.registerTransition("easeoutinsine", easeOutInSine);
caurina.transitions.Tweener.registerTransition("easeincirc", easeInCirc);
caurina.transitions.Tweener.registerTransition("easeoutcirc", easeOutCirc);
caurina.transitions.Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
caurina.transitions.Tweener.registerTransition("easeoutincirc", easeOutInCirc);
caurina.transitions.Tweener.registerTransition("easeinexpo", easeInExpo);
caurina.transitions.Tweener.registerTransition("easeoutexpo", easeOutExpo);
caurina.transitions.Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
caurina.transitions.Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
caurina.transitions.Tweener.registerTransition("easeinelastic", easeInElastic);
caurina.transitions.Tweener.registerTransition("easeoutelastic", easeOutElastic);
caurina.transitions.Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
caurina.transitions.Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
caurina.transitions.Tweener.registerTransition("easeinback", easeInBack);
caurina.transitions.Tweener.registerTransition("easeoutback", easeOutBack);
caurina.transitions.Tweener.registerTransition("easeinoutback", easeInOutBack);
caurina.transitions.Tweener.registerTransition("easeoutinback", easeOutInBack);
caurina.transitions.Tweener.registerTransition("easeinbounce", easeInBounce);
caurina.transitions.Tweener.registerTransition("easeoutbounce", easeOutBounce);
caurina.transitions.Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
caurina.transitions.Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
static function easeNone(t, b, c, d, p_params) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d, p_params) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d, p_params) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d, p_params) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeOutInQuad(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutQuad(t * 2, b, c / 2, d, p_params));
}
return(easeInQuad((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInCubic(t, b, c, d, p_params) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d, p_params) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d, p_params) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutCubic(t * 2, b, c / 2, d, p_params));
}
return(easeInCubic((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInQuart(t, b, c, d, p_params) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d, p_params) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d, p_params) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutQuart(t * 2, b, c / 2, d, p_params));
}
return(easeInQuart((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInQuint(t, b, c, d, p_params) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d, p_params) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d, p_params) {
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 function easeOutInQuint(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutQuint(t * 2, b, c / 2, d, p_params));
}
return(easeInQuint((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInSine(t, b, c, d, p_params) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d, p_params) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d, p_params) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutSine(t * 2, b, c / 2, d, p_params));
}
return(easeInSine((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInExpo(t, b, c, d, p_params) {
return(((t == 0) ? (b) : (((c * Math.pow(2, 10 * ((t / d) - 1))) + b) - (c * 0.001))));
}
static function easeOutExpo(t, b, c, d, p_params) {
return(((t == d) ? (b + c) : (((c * 1.001) * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d, p_params) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * Math.pow(2, 10 * (t - 1))) + b) - (c * 0.0005));
}
t--;
return((((c / 2) * 1.0005) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutExpo(t * 2, b, c / 2, d, p_params));
}
return(easeInExpo((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInCirc(t, b, c, d, p_params) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d, p_params) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d, p_params) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutCirc(t * 2, b, c / 2, d, p_params));
}
return(easeInCirc((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInElastic(t, b, c, d, p_params) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
var _local2 = ((p_params.period == undefined) ? (d * 0.3) : (p_params.period));
var _local5;
var _local1 = p_params.amplitude;
if ((!_local1) || (_local1 < Math.abs(c))) {
_local1 = c;
_local5 = _local2 / 4;
} else {
_local5 = (_local2 / (Math.PI*2)) * Math.asin(c / _local1);
}
t = t - 1;
return((-((_local1 * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / _local2))) + b);
}
static function easeOutElastic(t, b, c, d, p_params) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
var _local3 = ((p_params.period == undefined) ? (d * 0.3) : (p_params.period));
var _local5;
var _local1 = p_params.amplitude;
if ((!_local1) || (_local1 < Math.abs(c))) {
_local1 = c;
_local5 = _local3 / 4;
} else {
_local5 = (_local3 / (Math.PI*2)) * Math.asin(c / _local1);
}
return((((_local1 * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / _local3)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, p_params) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
var _local3 = ((p_params.period == undefined) ? (d * 0.45) : (p_params.period));
var _local5;
var _local1 = p_params.amplitude;
if ((!_local1) || (_local1 < Math.abs(c))) {
_local1 = c;
_local5 = _local3 / 4;
} else {
_local5 = (_local3 / (Math.PI*2)) * Math.asin(c / _local1);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((_local1 * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / _local3))) + b);
}
t = t - 1;
return(((((_local1 * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / _local3)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutElastic(t * 2, b, c / 2, d, p_params));
}
return(easeInElastic((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInBack(t, b, c, d, p_params) {
var _local1 = ((p_params.overshoot == undefined) ? 1.70158 : (p_params.overshoot));
t = t / d;
return((((c * t) * t) * (((_local1 + 1) * t) - _local1)) + b);
}
static function easeOutBack(t, b, c, d, p_params) {
var _local2 = ((p_params.overshoot == undefined) ? 1.70158 : (p_params.overshoot));
t = (t / d) - 1;
return((c * (((t * t) * (((_local2 + 1) * t) + _local2)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, p_params) {
var _local2 = ((p_params.overshoot == undefined) ? 1.70158 : (p_params.overshoot));
t = t / (d / 2);
if (t < 1) {
_local2 = _local2 * 1.525;
return(((c / 2) * ((t * t) * (((_local2 + 1) * t) - _local2))) + b);
}
t = t - 2;
_local2 = _local2 * 1.525;
return(((c / 2) * (((t * t) * (((_local2 + 1) * t) + _local2)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutBack(t * 2, b, c / 2, d, p_params));
}
return(easeInBack((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
static function easeInBounce(t, b, c, d, p_params) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeOutBounce(t, b, c, d, p_params) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInOutBounce(t, b, c, d, p_params) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d, p_params) {
if (t < (d / 2)) {
return(easeOutBounce(t * 2, b, c / 2, d, p_params));
}
return(easeInBounce((t * 2) - d, b + (c / 2), c / 2, d, p_params));
}
}
Symbol 294 MovieClip [__Packages.caurina.transitions.SpecialProperty] Frame 0
class caurina.transitions.SpecialProperty
{
var getValue, setValue, parameters, preProcess;
function SpecialProperty (p_getFunction, p_setFunction, p_parameters, p_preProcessFunction) {
getValue = p_getFunction;
setValue = p_setFunction;
parameters = p_parameters;
preProcess = p_preProcessFunction;
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialProperty ";
_local2 = _local2 + ("getValue:" + getValue.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("setValue:" + setValue.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("parameters:" + parameters.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("preProcess:" + preProcess.toString());
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 295 MovieClip [__Packages.caurina.transitions.SpecialPropertyModifier] Frame 0
class caurina.transitions.SpecialPropertyModifier
{
var modifyValues, getValue;
function SpecialPropertyModifier (p_modifyFunction, p_getFunction) {
modifyValues = p_modifyFunction;
getValue = p_getFunction;
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialPropertyModifier ";
_local2 = _local2 + ("modifyValues:" + modifyValues.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("getValue:" + getValue.toString());
_local2 = _local2 + "]";
return(_local2);
}
}