Frame 1
_quality = "HIGH";
Stage.scaleMode = "noScale";
fscommand ("trapallkeys", true);
fscommand ("showmenu", "false");
_root.sound_on = true;
_root.main_link = "http://www.2DPlay.com/index.php?gameid=878";
_root.download_link = "http://www.2DPlay.com/downloadgame.php?gameid=878";
_root.get_game_link = "http://www.2DPlay.com/freecontent.htm";
_root.scores_link = "http://www.2Dplay.com/highscores.php?gameid=878&hiscore=";
_root.viewscores_link = "http://www.2dplay.com/showscores.php?gameid=878";
Frame 2
stop();
Frame 8
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_vm_test() {
return(hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72");
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var a = 1732584193;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var i = 0;
while (i < x.length) {
var olda = a;
var oldb = _local3;
var oldc = _local2;
var oldd = _local1;
a = md5_ff(a, _local3, _local2, _local1, x[i + 0], 7, -680876936);
_local1 = md5_ff(_local1, a, _local3, _local2, x[i + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, a, _local3, x[i + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, a, x[i + 3], 22, -1044525330);
a = md5_ff(a, _local3, _local2, _local1, x[i + 4], 7, -176418897);
_local1 = md5_ff(_local1, a, _local3, _local2, x[i + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, a, _local3, x[i + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, a, x[i + 7], 22, -45705983);
a = md5_ff(a, _local3, _local2, _local1, x[i + 8], 7, 1770035416);
_local1 = md5_ff(_local1, a, _local3, _local2, x[i + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, a, _local3, x[i + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, a, x[i + 11], 22, -1990404162);
a = md5_ff(a, _local3, _local2, _local1, x[i + 12], 7, 1804603682);
_local1 = md5_ff(_local1, a, _local3, _local2, x[i + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, a, _local3, x[i + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, a, x[i + 15], 22, 1236535329);
a = md5_gg(a, _local3, _local2, _local1, x[i + 1], 5, -165796510);
_local1 = md5_gg(_local1, a, _local3, _local2, x[i + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, a, _local3, x[i + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, a, x[i + 0], 20, -373897302);
a = md5_gg(a, _local3, _local2, _local1, x[i + 5], 5, -701558691);
_local1 = md5_gg(_local1, a, _local3, _local2, x[i + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, a, _local3, x[i + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, a, x[i + 4], 20, -405537848);
a = md5_gg(a, _local3, _local2, _local1, x[i + 9], 5, 568446438);
_local1 = md5_gg(_local1, a, _local3, _local2, x[i + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, a, _local3, x[i + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, a, x[i + 8], 20, 1163531501);
a = md5_gg(a, _local3, _local2, _local1, x[i + 13], 5, -1444681467);
_local1 = md5_gg(_local1, a, _local3, _local2, x[i + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, a, _local3, x[i + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, a, x[i + 12], 20, -1926607734);
a = md5_hh(a, _local3, _local2, _local1, x[i + 5], 4, -378558);
_local1 = md5_hh(_local1, a, _local3, _local2, x[i + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, a, _local3, x[i + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, a, x[i + 14], 23, -35309556);
a = md5_hh(a, _local3, _local2, _local1, x[i + 1], 4, -1530992060);
_local1 = md5_hh(_local1, a, _local3, _local2, x[i + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, a, _local3, x[i + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, a, x[i + 10], 23, -1094730640);
a = md5_hh(a, _local3, _local2, _local1, x[i + 13], 4, 681279174);
_local1 = md5_hh(_local1, a, _local3, _local2, x[i + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, a, _local3, x[i + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, a, x[i + 6], 23, 76029189);
a = md5_hh(a, _local3, _local2, _local1, x[i + 9], 4, -640364487);
_local1 = md5_hh(_local1, a, _local3, _local2, x[i + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, a, _local3, x[i + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, a, x[i + 2], 23, -995338651);
a = md5_ii(a, _local3, _local2, _local1, x[i + 0], 6, -198630844);
_local1 = md5_ii(_local1, a, _local3, _local2, x[i + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, a, _local3, x[i + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, a, x[i + 5], 21, -57434055);
a = md5_ii(a, _local3, _local2, _local1, x[i + 12], 6, 1700485571);
_local1 = md5_ii(_local1, a, _local3, _local2, x[i + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, a, _local3, x[i + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, a, x[i + 1], 21, -2054922799);
a = md5_ii(a, _local3, _local2, _local1, x[i + 8], 6, 1873313359);
_local1 = md5_ii(_local1, a, _local3, _local2, x[i + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, a, _local3, x[i + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, a, x[i + 13], 21, 1309151649);
a = md5_ii(a, _local3, _local2, _local1, x[i + 4], 6, -145523070);
_local1 = md5_ii(_local1, a, _local3, _local2, x[i + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, a, _local3, x[i + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, a, x[i + 9], 21, -343485551);
a = safe_add(a, olda);
_local3 = safe_add(_local3, oldb);
_local2 = safe_add(_local2, oldc);
_local1 = safe_add(_local1, oldd);
i = i + 16;
}
return(Array(a, _local3, _local2, _local1));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
var _local1 = b;
return(md5_cmn((_local1 & c) | ((~_local1) & d), a, _local1, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_hmac_md5(key, data) {
var _local2 = str2binl(key);
if (_local2.length > 16) {
_local2 = core_md5(_local2, key.length * chrsz);
}
var _local3 = Array(16);
var opad = Array(16);
var _local1 = 0;
while (_local1 < 16) {
_local3[_local1] = _local2[_local1] ^ 909522486;
opad[_local1] = _local2[_local1] ^ 1549556828;
_local1++;
}
var hash = core_md5(_local3.concat(str2binl(data)), 512 + (data.length * chrsz));
return(core_md5(opad.concat(hash), 640));
}
function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local2 = str;
var _local3 = Array();
var mask = ((1 << chrsz) - 1);
var _local1 = 0;
while (_local1 < (_local2.length * chrsz)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((_local2.charCodeAt(_local1 / chrsz) & mask) << (_local1 % 32));
_local1 = _local1 + chrsz;
}
return(_local3);
}
function binl2str(bin) {
var _local2 = bin;
var _local3 = "";
var mask = ((1 << chrsz) - 1);
var _local1 = 0;
while (_local1 < (_local2.length * 32)) {
_local3 = _local3 + String.fromCharCode((_local2[_local1 >> 5] >>> (_local1 % 32)) & mask);
_local1 = _local1 + chrsz;
}
return(_local3);
}
function binl2hex(binarray) {
var _local2 = binarray;
var _local3 = (hexcase ? "0123456789ABCDEF" : "0123456789abcdef");
var str = "";
var _local1 = 0;
while (_local1 < (_local2.length * 4)) {
str = str + (_local3.charAt((_local2[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((_local2[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(str);
}
function binl2b64(binarray) {
var _local3 = binarray;
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var str = "";
var _local2 = 0;
while (_local2 < (_local3.length * 4)) {
var triplet = (((((_local3[_local2 >> 2] >> (8 * (_local2 % 4))) & 255) << 16) | (((_local3[(_local2 + 1) >> 2] >> (8 * ((_local2 + 1) % 4))) & 255) << 8)) | ((_local3[(_local2 + 2) >> 2] >> (8 * ((_local2 + 2) % 4))) & 255));
var _local1 = 0;
while (_local1 < 4) {
if (((_local2 * 8) + (_local1 * 6)) > (_local3.length * 32)) {
str = str + b64pad;
} else {
str = str + tab.charAt((triplet >> (6 * (3 - _local1))) & 63);
}
_local1++;
}
_local2 = _local2 + 3;
}
return(str);
}
var hexcase = 0;
var b64pad = "";
var chrsz = 8;
function music_play(play_flag) {
var _local1 = _root;
if (play_flag) {
if (!_local1.music_started) {
_local1.music_started = true;
_local1.track_sfx.start(0, 99999);
}
} else {
_local1.music_started = false;
_local1.track_sfx.stop();
}
}
function CheckDayResult() {
var _local1 = _root;
_local1.average_accuracy = 0;
var _local2 = 0;
while (_local2 < _local1.AccuracyArray.length) {
_local1.average_accuracy = _local1.average_accuracy + _local1.AccuracyArray[_local2];
_local2++;
}
_local1.average_accuracy = Math.floor(_local1.average_accuracy / _local1.AccuracyArray.length);
_local1.current_receipts_text = String((("$" + _local1.current_receipts) + "/$") + _local1.receipts);
_local1.average_accuracy_text = String(_local1.average_accuracy + "%");
_local1.best_accuracy_text = String(_local1.best_accuracy + "%");
_local1.profit_loss = _local1.current_receipts - _local1.receipts;
_local1.new_balance = _local1.previous_cash + _local1.profit_loss;
_local1.previous_cash = _local1.new_balance;
if (_local1.mode_career) {
_local1.score = _local1.new_balance;
}
if (_local1.new_balance < 0) {
return(0);
}
if (_local1.profit_loss > 0) {
return(2);
}
return(1);
}
function SpeedGameInit() {
var _local1 = _root;
_local1.mode_career = false;
_local1.score = 0;
_local1.level = Number(_local1.daystart);
_local1.day_timer_speed = 0.9;
_local1.receipt_multiplier = 1;
}
function GameInit() {
var _local1 = _root;
_local1.mode_career = true;
_local1.score = 0;
_local1.previous_cash = 0;
_local1.level = Number(_local1.daystart);
_local1.day_timer_speed = 0.9;
_local1.receipt_multiplier = 1;
}
function SpeedLevelInit(level) {
var _local1 = _root;
_local1.girl.gotoAndStop(2);
_local1.perfect_made = 0;
_local1.best_accuracy = 0;
_local1.pizzas_prepared = 0;
_local1.AccuracyArray = new Array();
_local1.dayTime = 0;
_local1.current_receipts = 0;
_local1.total_ingred = 5;
_local1.fill_amount = 6;
_local1.pieces_increment = 1;
_local1.total_game_ingreds = 25;
_local1.receipts = _local1.speed_receipts_break;
_local1.receipts_text = String("$" + _local1.receipts);
_local1.piggy_full = false;
}
function LevelInit(level) {
var _local1 = _root;
var _local2 = level;
_local1.girl.gotoAndStop(2);
_local1.perfect_made = 0;
_local1.best_accuracy = 0;
_local1.pizzas_prepared = 0;
_local1.AccuracyArray = new Array();
_local1.dayTime = 0;
_local1.current_receipts = 0;
_local1.total_ingred = ((_local2 < 5) ? (_local2 + 1) : 5);
_local1.fill_amount = ((_local1.total_ingred * 2) + (_local2 * 2)) - 1;
_local1.fill_amount = ((_local1.fill_amount < 21) ? (_local1.fill_amount) : 21);
_local1.pieces_increment = 1;
_local1.total_game_ingreds = 25;
_local1.receipts = ((_local1.receipts_array[_local2 - 1] == undefined) ? (_local1.receipts_array[_local1.receipts_array.length - 1]) : (_local1.receipts_array[_local2 - 1]));
_local1.receipts_text = String("$" + _local1.receipts);
_local1.piggy_full = false;
}
function NextPizza() {
var _local1 = _root;
_local1.fill_amount = _local1.fill_amount + _local1.pieces_increment;
if (_local1.fill_amount > 21) {
_local1.fill_amount = 21;
}
if (_local1.dayTime == 4300) {
_local1.gotoAndPlay("end_day");
} else {
_local1.gotoAndPlay("pizza_start");
}
}
function AddReceipts(increm) {
var _local1 = _root;
_local1.current_receipts = _local1.current_receipts + increm;
if (_local1.mode_career) {
_local1.score = _local1.current_receipts + _local1.previous_cash;
} else {
_local1.score = _local1.score + increm;
}
var _local2 = Math.floor((_local1.current_receipts / _local1.receipts) * 100);
_local2 = ((_local2 > 100) ? 100 : (_local2));
if ((_local2 == 100) && (!_local1.piggy_full)) {
_local1.piggy_full = true;
_local1.piggy.attachMovie("piggy_full", "piggy_full", 1);
_local1.dzin_sfx.start(0, 1);
}
_local1.piggy.gotoAndStop(_local2 + 1);
}
function ShowGoalPizza() {
var _local1 = _root;
_local1.timer_line.gotoAndStop(1);
_local1.timer_mask._y = 234;
_local1.girl.gotoAndStop(2);
if (_local1.show_tips) {
_local1.attachMovie("tip_window", "tip_window", 200000, {_x:320, _y:195});
_local1.paused = true;
} else {
_local1.paused = false;
}
_local1.game_on = true;
_local1.ingred_counter = 0;
_local1.ingred_taken = 0;
removeMovieClip("_root.mouseingredient");
var _local2 = 1;
while (_local2 < (_local1.total_ingred + 1)) {
var _local3 = _local1.blank.attachMovie("ingred_button", "i_btn_" + _local2, _local2 + 100);
_local3.ingred_index = _local2;
var row = Math.floor((_local2 - 1) / 3);
var col = ((_local2 - 1) % 3);
_local3.left = _local1.PizzaIngreds[_local2];
_local3._x = (56 * col) + 112;
_local3._y = 334 + (row * 56);
_local2++;
}
_local2 = 0;
while (_local2 < _local1.total_game_ingreds) {
if (_local1.PizzaArray[_local2] > 0) {
var row = Math.floor(_local2 / Math.sqrt(_local1.total_game_ingreds));
var col = (_local2 - (row * Math.sqrt(_local1.total_game_ingreds)));
var ingred = _local1.blank.attachMovie("ingredient_drop", "ingred_" + _local2, _local2 + 10);
ingred._x = (col * 40) + 378;
ingred._y = (row * 40) + 93;
ingred.gotoAndPlay(Math.floor(Math.random() * 11) + 1);
ingred.gotoAndStop(_local1.PizzaArray[_local2]);
}
_local2++;
}
}
function CheckResultPizza() {
_root.clocks_sfx.stop("clocks");
_root.ingred_counter = 0;
_root.ingred_taken = 0;
_root.game_on = false;
removeMovieClip("_root.mouseingredient");
var i = 1;
while (i < (_root.total_ingred + 1)) {
var buttn = eval ("_root.blank.i_btn_" + i);
if (buttn.left != 0) {
buttn.left = 0;
buttn.useHandCursor = false;
buttn.flashing_border.removeMovieClip();
}
i++;
}
var i = 0;
while (i < 25) {
if (_root.PizzaArray[i] > 0) {
var placeholder = eval ("_root.place_" + i);
var j = 0;
while (j < 25) {
var ingred = eval ("_root.blank.set_ingred_" + j);
if (placeholder.hitTest(ingred._x, ingred._y, true) && (_root.PizzaArray[i] == ingred.ingred_index)) {
var distance = Math.sqrt(((ingred._x - placeholder._x) * (ingred._x - placeholder._x)) + ((ingred._y - placeholder._y) * (ingred._y - placeholder._y)));
if (distance == 0) {
distance = 0.01;
}
placeholder._x = -1000;
ingred.distance = distance;
break;
}
j++;
}
}
i++;
}
var result_pizza = 0;
_root.ResultClips = new Array();
var s = 0;
while (s < 25) {
var ingred = eval ("_root.blank.set_ingred_" + s);
if (ingred) {
if (ingred.distance) {
if (ingred.distance < 9) {
result_index = 4;
} else if (ingred.distance < 16) {
result_index = 3;
} else {
result_index = 2;
}
} else {
result_index = 1;
}
result_pizza = result_pizza + (result_index - 1);
var array_part = {result_index:result_index, x:ingred._x, y:ingred._y};
_root.ResultClips.push(array_part);
}
_root.ResultClips.sortOn("result_index");
_root.ResultClips.reverse();
_root.attachMovie("result_parts_counter", "result_parts", 3000);
s++;
}
_root.result_pizza_percent = Math.floor((result_pizza / (_root.fill_amount * 3)) * 100);
if (_root.result_pizza_percent == 100) {
_root.girl.gotoAndStop(1);
} else if (_root.result_pizza_percent < 30) {
_root.girl.gotoAndStop(4);
} else if (_root.result_pizza_percent < 60) {
_root.girl.gotoAndStop(3);
}
_root.best_accuracy = ((_root.best_accuracy < _root.result_pizza_percent) ? (_root.result_pizza_percent) : (_root.best_accuracy));
_root.AccuracyArray.push(_root.result_pizza_percent);
_root.pizzas_prepared = _root.pizzas_prepared + 1;
}
function MouseIngred() {
}
function IngredientButton() {
}
function FillArrays() {
var _local1 = _root;
_local1.PizzaArray = new Array(-1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1);
_local1.PizzaIngreds = new Array();
var _local3 = 0;
while (_local3 < _local1.total_ingred) {
_local1.PizzaIngreds[_local3] = 0;
_local3++;
}
var ingred_counter = _local1.fill_amount;
var flag:Boolean;
_local3 = 1;
while (_local3 < (_local1.total_ingred + 1)) {
ingred_counter = ingred_counter - 1;
do {
flag = false;
var _local2 = Math.floor(Math.random() * 36);
if (_local1.PizzaArray[_local2] == 0) {
flag = true;
_local1.PizzaArray[_local2] = _local3;
_local1.PizzaIngreds[_local3] = _local1.PizzaIngreds[_local3] + 1;
}
} while (!flag);
_local3++;
}
do {
do {
flag = false;
var _local2 = Math.floor(Math.random() * _local1.total_game_ingreds);
if (_local1.PizzaArray[_local2] == 0) {
flag = true;
ingred_counter = ingred_counter - 1;
var rnd_ingred = (Math.floor(Math.random() * _local1.total_ingred) + 1);
_local1.PizzaArray[_local2] = rnd_ingred;
_local1.PizzaIngreds[rnd_ingred] = _local1.PizzaIngreds[rnd_ingred] + 1;
}
} while (!flag);
} while (ingred_counter > 0);
}
_root.timer_speed = 0.45;
_root.speed_receipts_break = 100;
_root.speed_receipts_good = 150;
_root.receipts_array = new Array(100, 125, 150, 175, 200, 225, 250, 275);
_root.track_started = false;
_root.track_sfx = new Sound();
_root.track_sfx.attachSound("track");
_root.result_sfx = new Sound();
_root.pop_sfx = new Sound();
_root.pop_sfx.attachSound("pop");
_root.perfect_sfx = new Sound();
_root.perfect_sfx.attachSound("perfect");
_root.ingred_taken_sfx = new Sound();
_root.ingred_taken_sfx.attachSound("ingred_taken");
_root.ingred_placed_sfx = new Sound();
_root.ingred_placed_sfx.attachSound("ingred_placed");
_root.clocks_sfx = new Sound();
_root.clocks_sfx.attachSound("clocks");
_root.people_ouh_sfx = new Sound();
_root.people_ouh_sfx.attachSound("people_ouh");
_root.people_yeah_sfx = new Sound();
_root.people_yeah_sfx.attachSound("people_yeah");
_root.dzin_sfx = new Sound();
_root.dzin_sfx.attachSound("dzin");
_root.ring_sfx = new Sound();
_root.ring_sfx.attachSound("ring");
_root.timerout_sfx = new Sound();
_root.timerout_sfx.attachSound("timerout");
_root.perfect_sfx.setVolume(100);
_root.daystart = 1;
_root.music_started = false;
_root.first_play = SharedObject.getLocal("pizza_perfect");
if (_root.first_play.data.played != "true") {
_root.first_play.data.played = "true";
_root.first_play.flush();
_root.show_tips = true;
} else {
_root.show_tips = false;
}
MouseIngred.prototype = new MovieClip();
MouseIngred.prototype.onLoad = function () {
var _local1 = _root;
var _local2 = this;
_local2._x = Math.floor(_local1._xmouse);
_local2._y = Math.floor(_local1._ymouse);
_local2.gotoAndStop(_local1.ingred_taken + 1);
_local1.ingred_taken_sfx.start(0, 1);
};
MouseIngred.prototype.onEnterFrame = function () {
this._x = Math.floor(_root._xmouse);
this._y = Math.floor(_root._ymouse);
};
Object.registerClass("mouseingred", MouseIngred);
IngredientButton.prototype = new MovieClip();
IngredientButton.prototype.onLoad = function () {
var _local1 = this;
_local1.enable = false;
_local1.ingredient.gotoAndStop(_local1.ingred_index);
};
IngredientButton.prototype.Clicked = function () {
var i = 1;
while (i < (_root.total_ingred + 1)) {
eval (("_root.blank.i_btn_" + i) + ".flashing_border").removeMovieClip();
eval ("_root.blank.i_btn_" + i).enable = false;
i++;
}
_root.ingred_taken = this.ingred_index;
_root.ingred_left = this.left;
this.attachMovie("flashing_border", "flashing_border", 1);
_root.attachMovie("mouseingred", "mouseingredient", 1000);
};
IngredientButton.prototype.onPress = function () {
if ((this.left > 0) && (!_root.paused)) {
this.Clicked();
}
};
IngredientButton.prototype.onMouseDown = function () {
if (((this.ingred_index == _root.ingred_taken) && (this.enable)) && (!_root.paused)) {
_root.ingred_placed_sfx.start(0, 1);
if (_root.pizza_field.hitTest(_root._xmouse, _root._ymouse, true)) {
this.left = this.left - 1;
var at_ingred = eval (_root.blank.attachMovie("ingredient", "set_ingred_" + _root.ingred_counter, _root.ingred_counter + 200));
at_ingred._x = _root._xmouse;
at_ingred._y = _root._ymouse;
at_ingred.gotoAndStop(this.ingred_index);
at_ingred.ingred_index = this.ingred_index;
_root.ingred_counter = _root.ingred_counter + 1;
if (this.left == 0) {
this.useHandCursor = false;
removeMovieClip("_root.mouseingredient");
removeMovieClip(this.flashing_border);
_root.ingred_taken = 0;
this._alpha = 30;
if (_root.ingred_counter == _root.fill_amount) {
_root.gotoAndPlay("end_pizza");
} else {
var flag = false;
this.next_index = ((this.ingred_index < _root.total_ingred) ? (this.ingred_index + 1) : 1);
do {
var next_ingred = eval ("_root.blank.i_btn_" + this.next_index);
if (next_ingred.left > 0) {
next_ingred.Clicked();
flag = true;
} else {
this.next_index = ((this.next_index < _root.total_ingred) ? (this.next_index + 1) : 1);
}
} while (!flag);
}
}
}
}
};
Object.registerClass("ingred_button", IngredientButton);
Frame 9
_root.music_play(true);
stop();
Instance of Symbol 235 MovieClip in Frame 9
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 45 MovieClip in Frame 9
onClipEvent (load) {
this.dx = (Math.random() * 1) + 1;
this.dy = (Math.random() * 1) + 1;
if (Math.random() < 0.5) {
this.dx = -this.dx;
this.dy = -this.dy;
}
this.angle = Math.random() * 20;
}
onClipEvent (enterFrame) {
this._rotation = this.angle * 50;
this._x = (Math.cos(this.angle + this.dx) * 205) + 300;
this._y = (Math.sin(this.angle + this.dy) * 47) + 65;
this.angle = this.angle + ((this.dx + this.dy) / 40);
}
Instance of Symbol 45 MovieClip in Frame 9
onClipEvent (load) {
this.dx = (Math.random() * 1) + 1;
this.dy = (Math.random() * 1) + 1;
if (Math.random() < 0.5) {
this.dx = -this.dx;
this.dy = -this.dy;
}
this.angle = Math.random() * 20;
}
onClipEvent (enterFrame) {
this._rotation = this.angle * 50;
this._x = (Math.cos(this.angle + this.dx) * 205) + 300;
this._y = (Math.sin(this.angle + this.dy) * 47) + 65;
this.angle = this.angle + ((this.dx + this.dy) / 40);
}
Instance of Symbol 45 MovieClip in Frame 9
onClipEvent (load) {
this.dx = (Math.random() * 1) + 1;
this.dy = (Math.random() * 1) + 1;
if (Math.random() < 0.5) {
this.dx = -this.dx;
this.dy = -this.dy;
}
this.angle = Math.random() * 20;
}
onClipEvent (enterFrame) {
this._rotation = this.angle * 50;
this._x = (Math.cos(this.angle + this.dx) * 205) + 300;
this._y = (Math.sin(this.angle + this.dy) * 47) + 65;
this.angle = this.angle + ((this.dx + this.dy) / 40);
}
Instance of Symbol 45 MovieClip in Frame 9
onClipEvent (load) {
this.dx = (Math.random() * 1) + 1;
this.dy = (Math.random() * 1) + 1;
if (Math.random() < 0.5) {
this.dx = -this.dx;
this.dy = -this.dy;
}
this.angle = Math.random() * 20;
}
onClipEvent (enterFrame) {
this._rotation = this.angle * 50;
this._x = (Math.cos(this.angle + this.dx) * 205) + 300;
this._y = (Math.sin(this.angle + this.dy) * 47) + 65;
this.angle = this.angle + ((this.dx + this.dy) / 40);
}
Instance of Symbol 45 MovieClip in Frame 9
onClipEvent (load) {
this.dx = (Math.random() * 1) + 1;
this.dy = (Math.random() * 1) + 1;
if (Math.random() < 0.5) {
this.dx = -this.dx;
this.dy = -this.dy;
}
this.angle = Math.random() * 20;
}
onClipEvent (enterFrame) {
this._rotation = this.angle * 50;
this._x = (Math.cos(this.angle + this.dx) * 205) + 300;
this._y = (Math.sin(this.angle + this.dy) * 47) + 65;
this.angle = this.angle + ((this.dx + this.dy) / 40);
}
Instance of Symbol 45 MovieClip in Frame 9
onClipEvent (load) {
this.dx = (Math.random() * 1) + 1;
this.dy = (Math.random() * 1) + 1;
if (Math.random() < 0.5) {
this.dx = -this.dx;
this.dy = -this.dy;
}
this.angle = Math.random() * 20;
}
onClipEvent (enterFrame) {
this._rotation = this.angle * 50;
this._x = (Math.cos(this.angle + this.dx) * 205) + 300;
this._y = (Math.sin(this.angle + this.dy) * 47) + 65;
this.angle = this.angle + ((this.dx + this.dy) / 40);
}
Instance of Symbol 45 MovieClip in Frame 9
onClipEvent (load) {
this.dx = (Math.random() * 1) + 1;
this.dy = (Math.random() * 1) + 1;
if (Math.random() < 0.5) {
this.dx = -this.dx;
this.dy = -this.dy;
}
this.angle = Math.random() * 20;
}
onClipEvent (enterFrame) {
this._rotation = this.angle * 50;
this._x = (Math.cos(this.angle + this.dx) * 205) + 300;
this._y = (Math.sin(this.angle + this.dy) * 47) + 65;
this.angle = this.angle + ((this.dx + this.dy) / 40);
}
Instance of Symbol 45 MovieClip in Frame 9
onClipEvent (load) {
this.dx = (Math.random() * 1) + 1;
this.dy = (Math.random() * 1) + 1;
if (Math.random() < 0.5) {
this.dx = -this.dx;
this.dy = -this.dy;
}
this.angle = Math.random() * 20;
}
onClipEvent (enterFrame) {
this._rotation = this.angle * 50;
this._x = (Math.cos(this.angle + this.dx) * 205) + 300;
this._y = (Math.sin(this.angle + this.dy) * 47) + 65;
this.angle = this.angle + ((this.dx + this.dy) / 40);
}
Frame 10
stop();
Instance of Symbol 115 MovieClip in Frame 10
onClipEvent (enterFrame) {
if (_root.sound_on) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Instance of Symbol 127 MovieClip in Frame 10
onClipEvent (enterFrame) {
if (_quality == "LOW") {
gotoAndStop (1);
} else if (_quality == "MEDIUM") {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
}
Instance of Symbol 115 MovieClip in Frame 10
onClipEvent (enterFrame) {
if (_root.show_tips) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Frame 11
stop();
Frame 12
stop();
Instance of Symbol 235 MovieClip in Frame 12
onClipEvent (load) {
gotoAndStop (2);
}
Frame 17
stop();
Instance of Symbol 235 MovieClip "girl" in Frame 17
onClipEvent (load) {
gotoAndStop (2);
}
Frame 18
_root.SpeedLevelInit(_root.level);
stop();
Instance of Symbol 294 MovieClip in Frame 18
onClipEvent (mouseDown) {
_root.gotoAndPlay("pizza_start");
}
Frame 20
_root.girl.gotoAndStop(2);
_root.LevelInit(_root.level);
stop();
Instance of Symbol 308 MovieClip in Frame 20
onClipEvent (mouseDown) {
_root.gotoAndPlay("pizza_start");
}
Frame 21
_root.music_play(false);
Instance of Symbol 320 MovieClip "timer_line" in Frame 21
onClipEvent (load) {
this.setMask(_root.timer_mask);
}
Instance of Symbol 354 MovieClip "minute_hand" in Frame 21
onClipEvent (enterFrame) {
this._rotation = _root.hour_hand._currentframe * 1.2;
}
Frame 22
_root.FillArrays();
_root.ShowGoalPizza();
_root.onEnterFrame = function () {
var _local1 = _root;
if (!_local1.paused) {
if (_local1.game_on) {
_local1.timer_mask._y = _local1.timer_mask._y + _local1.timer_speed;
if ((_local1.timer_mask._y >= 500) && (_local1.timer_line._currentframe == 1)) {
_local1.clocks_sfx.start(0, 50);
_local1.timer_line.gotoAndPlay(2);
}
if (_local1.timer_mask._y >= 585) {
_local1.clocks_sfx.stop("clocks");
_local1.timerout_sfx.start(0, 1);
_local1.gotoAndPlay("end_pizza");
}
}
}
};
stop();
Instance of Symbol 358 MovieClip "blank" in Frame 22
onClipEvent (load) {
this._y = -430;
this.toy = 0;
}
onClipEvent (enterFrame) {
if (this._y != this.toy) {
this.dy = (this.toy - this._y) / 2;
this._y = this._y + this.dy;
if (Math.abs(this.dy) < 1) {
this._y = this.toy;
}
}
}
Frame 23
_root.CheckResultPizza();
stop();
Frame 24
_root.music_play(true);
if (!_root.mode_career) {
if (_root.current_receipts < _root.speed_receipts_break) {
_root.girl.gotoAndStop(4);
} else if (_root.current_receipts < _root.speed_receipts_good) {
_root.girl.gotoAndStop(2);
} else {
_root.girl.gotoAndStop(1);
}
}
stop();
Symbol 26 MovieClip [mouseingred] Frame 1
stop();
Symbol 31 MovieClip [flashing_border] Frame 1
_parent.enable = true;
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 2
stop();
Symbol 41 MovieClip Frame 3
stop();
Symbol 41 MovieClip Frame 4
stop();
Symbol 42 MovieClip [result_ingred_clip] Frame 10
_root.AddReceipts((this.part._currentframe - 1) * _root.receipt_multiplier);
Symbol 42 MovieClip [result_ingred_clip] Frame 47
removeMovieClip(this);
Symbol 43 MovieClip [result_parts_counter] Frame 1
var i = 0;
Symbol 43 MovieClip [result_parts_counter] Frame 6
if (_root.ResultClips.length > 0) {
var result_clip = _root.blank.attachMovie("result_ingred_clip", "res_clip_" + i, i + 2000);
result_clip.part.gotoAndStop(_root.ResultClips[i].result_index);
_root.result_sfx.attachSound(String("result_" + _root.ResultClips[i].result_index));
_root.result_sfx.start(0, 1);
result_clip._x = _root.ResultClips[i].x;
result_clip._y = _root.ResultClips[i].y;
}
i = i + 1;
if ((i == _root.ResultClips.length) || (_root.ResultClips.length == 0)) {
gotoAndPlay (7);
} else {
gotoAndPlay (2);
}
Symbol 43 MovieClip [result_parts_counter] Frame 17
if (_root.result_pizza_percent < 100) {
_root.perf_made.gotoAndPlay("n_pizza");
}
stop();
Instance of Symbol 45 MovieClip "part" in Symbol 46 MovieClip [star] Frame 1
onClipEvent (load) {
d = -8;
dd = (Math.random() * 2) + 0.5;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x + (_parent._x / 60);
_parent._y = _parent._y + d;
if (_parent._y > 244) {
_parent.removeMovieClip();
}
this._rotation = this._rotation + (d - 2);
d = d + dd;
}
Symbol 55 Button
on (press) {
Disable();
}
Symbol 60 Button
on (press) {
NextTip();
}
Symbol 73 Button
on (press) {
Disable();
}
Symbol 76 MovieClip [tip_window] Frame 1
function Disable() {
var _local1 = _root;
_local1.hour_hand.play();
_local1.show_tips = false;
_local1.paused = false;
this.removeMovieClip();
}
function NextTip() {
nextFrame();
}
_root.hour_hand.stop();
stop();
Symbol 76 MovieClip [tip_window] Frame 2
stop();
Symbol 76 MovieClip [tip_window] Frame 3
stop();
Symbol 76 MovieClip [tip_window] Frame 4
stop();
Symbol 76 MovieClip [tip_window] Frame 5
stop();
Symbol 81 Button
on (press) {
_parent.gotoAndPlay("up");
}
Symbol 86 Button
on (press) {
removeMovieClip("_root.result_parts");
removeMovieClip("_root.mouseingredient");
_root.gotoAndPlay("main_menu");
_parent.removeMovieClip();
}
Symbol 91 Button
on (press) {
getURL (_root.main_link, "_blank");
}
Symbol 96 Button
on (press) {
getURL (_root.get_game_link, "_blank");
}
Symbol 101 Button
on (press) {
getURL (_root.download_link, "_blank");
}
Symbol 105 Button
on (press) {
getURL (_root.viewscores_link, "_blank");
}
Symbol 110 Button
on (press) {
if (_root.sound_on) {
_root.sound_on = false;
_root.perfect_sfx.setVolume(0);
} else {
_root.sound_on = true;
_root.perfect_sfx.setVolume(100);
}
}
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 2
stop();
Symbol 120 Button
on (press) {
if (_quality == "HIGH") {
_quality = "LOW";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else {
_quality = "MEDIUM";
}
}
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 2
stop();
Symbol 127 MovieClip Frame 3
stop();
Instance of Symbol 115 MovieClip in Symbol 128 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.sound_on) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Instance of Symbol 127 MovieClip in Symbol 128 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_quality == "LOW") {
gotoAndStop (1);
} else if (_quality == "MEDIUM") {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
}
Symbol 129 MovieClip [pause_clip] Frame 16
stop();
Symbol 129 MovieClip [pause_clip] Frame 31
_root.hour_hand.play();
_root.mouseingredient._visible = true;
_root.paused = false;
removeMovieClip(this);
Symbol 136 MovieClip Frame 1
var gameBytesTotal = 0;
var gameBytesLoaded = 0;
var percent = 0;
Symbol 136 MovieClip Frame 3
gameBytesTotal = _root.getBytesTotal();
gameBytesLoaded = _root.getBytesLoaded();
percent = Math.round((gameBytesLoaded / gameBytesTotal) * 100);
bar.loadbar._xscale = percent;
if (((gameBytesLoaded >= gameBytesTotal) && (gameBytesTotal > 0)) && (_root.logo._currentframe >= _root.logo._totalframes)) {
_root.gotoAndPlay("game_init");
stop();
} else {
gotoAndPlay ("preload");
}
Symbol 139 Button
on (press) {
getURL (_root.main_link, "_blank");
}
Symbol 209 MovieClip Frame 1
_root.loading._visible = false;
Symbol 209 MovieClip Frame 207
_root.loading._visible = true;
stop();
Symbol 213 Button
on (press) {
getURL (_root.main_link, "_blank");
}
Symbol 229 MovieClip Frame 36
if (Math.random() < 0.3) {
gotoAndPlay ("left_look");
} else if (Math.random() < 0.6) {
gotoAndPlay ("forw_look");
} else {
gotoAndPlay ("blink");
}
Symbol 229 MovieClip Frame 58
if (Math.random() < 0.3) {
gotoAndPlay ("left_look");
} else if (Math.random() < 0.6) {
gotoAndPlay ("forw_look");
} else {
gotoAndPlay ("blink");
}
Symbol 229 MovieClip Frame 111
if (Math.random() < 0.3) {
gotoAndPlay ("left_look");
} else if (Math.random() < 0.6) {
gotoAndPlay ("forw_look");
} else {
gotoAndPlay ("blink");
}
Symbol 245 Button
on (press) {
_root.gotoAndPlay("game_start");
}
Symbol 250 Button
on (press) {
_root.gotoAndPlay("options");
}
Symbol 255 Button
on (press) {
_root.gotoAndPlay("help");
}
Symbol 263 Button
on (press) {
_root.gotoAndPlay("main_menu");
}
Symbol 268 Button
on (press) {
if (_root.show_tips) {
_root.show_tips = false;
} else {
_root.show_tips = true;
}
}
Symbol 279 Button
on (press) {
_root.GameInit();
_root.gotoAndPlay("level_start");
}
Symbol 285 Button
on (press) {
_root.SpeedGameInit();
_root.gotoAndPlay("speed_start");
}
Symbol 294 MovieClip Frame 73
_root.gotoAndPlay("pizza_start");
Symbol 308 MovieClip Frame 73
_root.gotoAndPlay("pizza_start");
Symbol 315 Button
on (press) {
getURL (_root.main_link, "_blank");
}
Symbol 320 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 17
gotoAndPlay (2);
Symbol 328 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 28
stop();
Symbol 342 MovieClip Frame 1
if (!_root.mode_career) {
gotoAndStop (2);
}
stop();
Symbol 342 MovieClip Frame 2
stop();
Symbol 348 Button
on (press, keyPress "p") {
if ((!_root.paused) && (_root._currentframe == 22)) {
_root.hour_hand.stop();
_root.mouseingredient._visible = false;
_root.paused = true;
var p_clip = _root.attachMovie("pause_clip", "pause_clip", 200000);
p_clip._x = 300;
p_clip._y = 235;
}
}
Symbol 353 MovieClip Frame 3600
_root.dayTime = 4300;
_root.ring_sfx.start(0, 1);
_root.counter.alarm.play();
_root.counter2.alarm.play();
_root.timer_mask._y = 585;
stop();
Symbol 354 MovieClip Frame 1
stop();
Instance of Symbol 371 MovieClip "single_number" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
this.single = _root.result_pizza_percent % 10;
this.gotoAndStop(this.single + 1);
}
Instance of Symbol 371 MovieClip "ten_number" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
this.ten = Math.floor(_root.result_pizza_percent / 10);
if (this.ten == 0) {
this._visible = false;
this.stop();
} else {
this.gotoAndStop(this.ten + 1);
}
}
Symbol 373 MovieClip Frame 1
if (_root.result_pizza_percent < 100) {
gotoAndPlay ("simple_pizza");
}
Symbol 373 MovieClip Frame 2
_root.AddReceipts(50);
_root.perfect_sfx.start(0, 1);
Symbol 373 MovieClip Frame 5
_root.perfect_made = _root.perfect_made + 1;
var counter = 0;
this.onEnterFrame = function () {
var _local2 = this;
if ((counter % 3) != 0) {
var _local1 = _local2.attachMovie("star", "star_" + counter, counter + 100000);
_local1._x = (Math.random() * _local2._width) - (_local2._width / 2);
_local1._y = -150;
}
counter = counter + 1;
};
Symbol 373 MovieClip Frame 39
delete this.onEnterFrame;
Symbol 373 MovieClip Frame 55
_root.timer_line.gotoAndStop(1);
_root.timer_mask._y = 234;
_root.blank.toy = -430;
Symbol 373 MovieClip Frame 81
_root.NextPizza();
stop();
Symbol 373 MovieClip Frame 82
_root.pop_sfx.start(0, 1);
Symbol 373 MovieClip Frame 94
stop();
Symbol 373 MovieClip Frame 106
_root.timer_line.gotoAndStop(1);
_root.timer_mask._y = 234;
_root.blank.toy = -430;
Symbol 373 MovieClip Frame 125
_root.NextPizza();
stop();
Symbol 387 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.new_balance > 0) {
new_balance_tf.textColor = 65280;
} else {
new_balance_tf.textColor = 16711680 /* 0xFF0000 */;
}
if (_root.profit_loss > 0) {
profit_loss_tf.textColor = 65280;
} else {
profit_loss_tf.textColor = 16711680 /* 0xFF0000 */;
}
};
Symbol 390 MovieClip Frame 19
gotoAndPlay (1);
Symbol 391 Button
on (press) {
removeMovieClip("_root.result_parts");
removeMovieClip("_root.mouseingredient");
_root.gotoAndPlay("main_menu");
}
Symbol 396 MovieClip Frame 1
if (_root.is_day_passed == 2) {
gotoAndPlay (22);
}
Symbol 396 MovieClip Frame 21
gotoAndPlay (2);
Symbol 396 MovieClip Frame 41
gotoAndPlay (22);
Symbol 401 Button
on (press) {
_root.level = _root.level + 1;
_root.gotoAndPlay("level_start");
}
Symbol 405 Button
on (press) {
nextFrame();
}
Symbol 410 Button
on (press) {
prevFrame();
}
Symbol 414 Button
on (press) {
removeMovieClip("_root.result_parts");
removeMovieClip("_root.mouseingredient");
_root.gotoAndPlay("main_menu");
_parent.removeMovieClip();
}
Symbol 417 MovieClip Frame 1
stop();
Symbol 417 MovieClip Frame 2
stop();
Symbol 433 Button
on (press) {
var hashkey = _root.hex_md5(("gameid=878&hiscore=" + _root.score) + "2DPlay.com/");
getURL (String(((_root.scores_link + _root.score) + "&hash=") + hashkey), "_blank");
}
Symbol 434 MovieClip Frame 1
if (_root.current_receipts < _root.speed_receipts_break) {
nextFrame();
}
stop();
Symbol 434 MovieClip Frame 2
stop();
Symbol 435 MovieClip Frame 1
_root.score_txt = "$" + _root.score;
if (!_root.mode_career) {
_root.is_day_passed = _root.CheckDayResult();
if (_root.current_receipts < _root.speed_receipts_break) {
_root.people_ouh_sfx.start(0, 1);
} else {
_root.people_yeah_sfx.start(0, 1);
}
gotoAndPlay ("speed_game_end");
} else {
_root.previous_cash_txt = "$" + _root.previous_cash;
_root.is_day_passed = _root.CheckDayResult();
_root.receipts_txt = "$" + _root.receipts;
_root.profit_loss_txt = "$" + _root.profit_loss;
_root.new_balance_txt = "$" + _root.new_balance;
_root.current_receipts_txt = "$" + _root.current_receipts;
switch (_root.is_day_passed) {
case 0 :
_root.girl.gotoAndStop(4);
_root.people_ouh_sfx.start(0, 1);
gotoAndPlay ("game_end");
break;
case 1 :
_root.girl.gotoAndStop(3);
gotoAndPlay ("game_continue");
break;
case 2 :
_root.girl.gotoAndStop(1);
_root.people_yeah_sfx.start(0, 1);
gotoAndPlay ("game_continue");
}
}
Symbol 435 MovieClip Frame 27
stop();
Symbol 435 MovieClip Frame 53
stop();
Symbol 435 MovieClip Frame 78
stop();