Frame 2
function _doGameOver(score, gamestate, showskip, delay) {
trace((((("CALLED : _doGameOver : score:" + score) + " gamestate:") + gamestate) + " showskip: ") + showskip);
clearInterval(_gameoverinterval);
if (delay == undefined) {
delay = 3000;
}
if ((score != undefined) and (gamestate != undefined)) {
_root.partner_score = score;
_root.obj_game._gstatus = gamestate;
_gameoverinterval = setInterval(attachGameOverMc, delay, showskip);
} else {
trace("Could Not Load GAMEOVER!!!");
}
}
function attachGameOverMc(showskip) {
stopAllSounds();
var _local2 = flash.external.ExternalInterface.call("document.URL.toString");
if ((_local2 != null) && (_local2.indexOf("games2win.com") != -1)) {
trace(_local2.indexOf("games2win.com"));
flash.external.ExternalInterface.call("inviziShowHtmlPlaceHolder", "");
}
clearInterval(_gameoverinterval);
_root.__gameover_mc = _root.attachMovie("_g2w_gameover_mc", "mc_gameover", _root.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 2});
if (_root.obj_game._gstatus == "gameover") {
_root.__gameover_mc.gotoAndStop("g2w_gameover");
if (showskip) {
_root.__gameover_mc.panel_btn.gotoAndStop("skip");
}
}
}
function g2w_playagain(resetlevel) {
_root.__gameover_mc.removeMovieClip();
_root.score = 0;
_root.counterV = 0;
trace(_root.counterV);
if (resetlevel) {
_root.level = 1;
}
_root.myGame.gotoAndStop(1);
}
function g2w_skiplevel() {
_root.__gameover_mc.removeMovieClip();
_root.score = 0;
_root.counterV = 0;
_root.level++;
_root.myGame.gotoAndStop(1);
}
var obj_game = new Array();
obj_game._host = "g2w";
obj_game._gameName = "fast_food_delivery";
obj_game._gameTitle = "Fast Food Delivery";
obj_game._g2wGameId = "1224";
obj_game._partnerGameId = "fast_food_delivery";
obj_game._gstatus = "gameover";
obj_game._googleText = "Fast Food Delivery";
obj_game._gameStageW = 800;
obj_game._gameStageH = 600;
obj_game._gameScoreOrder = "desc";
obj_game._gameResolution = (Stage.width + "x") + Stage.height;
obj_game.g2wBot = "";
obj_game.g2wBotId = 10301;
obj_game.inviziads = ((("http://s1.inviziads.com/lookup.html?g=" + obj_game._g2wGameId) + "&h=") + obj_game._host) + "&v=4_0";
var obj_partner = new Array();
obj_partner.partner_name = "g2w";
obj_partner.partner_id = 1;
obj_partner.invalid_txt = "Invalid Nickname!";
obj_partner.show_submit = false;
obj_partner.submitURL = "/submit_score.asp";
obj_partner.top10URL = "/get_top_scorer.asp";
obj_partner.lblsubmit = "Enter your Games2win Nickname below";
obj_partner.show_g2w_slate = true;
obj_partner.show_register = true;
obj_partner.text_register = "Create Nickname";
obj_partner.url_register = "http://www.games2win.com/register.asp";
obj_partner.clickthru = "http://www.games2win.com/";
obj_partner._allowclick = true;
_validateHost = function (mcpath) {
var _local2 = mcpath;
_local2.overlay_btn.useHandCursor = false;
if (_root.obj_game._gstatus == "gameover") {
_initGameOver(_local2);
} else if (_root.checkhost()) {
_initLoginPanel(_local2);
} else {
_initAlientHost(_local2);
}
};
_initGameOver = function (mcpath) {
var _local2 = mcpath;
_local2.gotoAndStop("g2w_gameover");
_local2.panel_btn.playagain_btn.onRelease = function () {
_root.g2w_playagain();
};
_local2.panel_btn.skiplvl_btn.onRelease = function () {
_root.g2w_skiplevel();
};
};
_initLoginPanel = function (mcpath) {
var mc = mcpath;
mc.gotoAndStop("g2w_login");
Selection.setFocus("username_txt");
mc.username_txt.onSetFocus = function () {
if (this.text == obj_partner.invalid_txt) {
this.text = "";
}
};
mc.playagain_btn.onRelease = function () {
_root.g2w_playagain(true);
};
mc.nickname_btn.onRelease = function () {
getURL (_root.obj_partner.url_register, "_blank");
};
mc.submit_btn.onRelease = function () {
_root._scoreSubmit(mc);
};
};
_initAlientHost = function (mcpath) {
var _local2 = mcpath;
_local2.gotoAndStop("g2w_alienhost");
_local2.playagain_btn.onRelease = function () {
trace("CALLING : _root.g2w_playagain()");
_root.g2w_playagain(true);
};
};
_scoreSubmit = function (mcpath) {
var mc = mcpath;
myname = _root.partner_uname;
myscore = _root.partner_score;
mygameid = _root.obj_game._g2wGameId;
myname = myname.trim();
if (((myname.length == 0) or (myname == obj_partner.invalid_txt)) or (myname == undefined)) {
_root.partner_uname = obj_partner.invalid_txt;
} else {
mc.gotoAndStop("g2w_status");
mc.tryagain_btn._visible = false;
_root.send_lv = new LoadVars();
_root.send_lv.onLoad = function (success) {
if (success) {
if (_root.send_lv.isreg == 0) {
mc.status_txt.text = obj_partner.invalid_txt;
mc.tryagain_btn._visible = true;
mc.tryagain_btn.onRelease = function () {
_initLoginPanel(mc);
};
} else if (_root.send_lv.isreg == 1) {
mc.status_txt.text = "";
_root._getTop10(mc);
}
} else {
mc.status_txt.text = "Error in Connection...!";
mc.tryagain_btn._visible = true;
mc.tryagain_btn.onRelease = function () {
_initLoginPanel(mc);
};
}
};
_root.send_lv.nickname = myname;
_root.send_lv.points = myscore;
_root.send_lv.gameid = mygameid;
_root.send_lv.sendAndLoad(obj_partner.submitURL, _root.send_lv, "POST");
mc.status_txt.text = "Connecting to Server...";
}
};
c_fail = 0;
_getTop10 = function (mcpath) {
var mc = mcpath;
_root.send_lv = new XML();
_root.rst_lv = new XML();
mc.gotoAndStop("g2w_status");
_root.rst_lv.onLoad = function (success) {
if (success) {
var _local3 = new it.sephiroth.XML2Object();
mc.status_txt.text = "";
var _local4 = _local3.parseXML(this);
_initTop10(mc, _local4);
} else {
_root.c_fail++;
if (_root.c_fail >= 3) {
mc.status_txt.text = "Error!";
tryagain_btn._visible = true;
mc.tryagain_btn.onRelease = function () {
_initLoginPanel(mc);
};
} else {
_root.send_lv.sendAndLoad(url, _root.rst_lv, "POST");
}
}
};
var url = ((((((obj_partner.top10URL + "?game_id=") + _root.obj_game._g2wGameId) + "&order=") + obj_game._gameScoreOrder) + "&timspam") + getTimer());
mc.status_txt.text = "Connecting to Server...";
_root.send_lv.sendAndLoad(url, _root.rst_lv, "POST");
};
_initTop10 = function (mcpath, list) {
var _local3 = mcpath;
_local3.gotoAndStop("g2w_top10");
if ((list.top_score.status.data == 0) or (list.top_score.user[0].score.data == 0)) {
_top10_lbl._visible = false;
var _local2 = 0;
while (_local2 < 10) {
_local3["row" + _local2]._visible = false;
_local2++;
}
} else {
_noscore_mc._visible = false;
var _local2 = 0;
while (_local2 < 10) {
if ((list.top_score.user[_local2] == undefined) or (list.top_score.user[_local2].score.data == 0)) {
_local3["row" + _local2].txtrollno.text = "";
_local3["row" + _local2].txtusername.text = "";
_local3["row" + _local2].txtscore.text = "";
} else {
_local3["row" + _local2].txtrollno.text = _local2 + 1;
_local3["row" + _local2].txtusername.text = list.top_score.user[_local2].nick_name.data;
_local3["row" + _local2].txtscore.text = list.top_score.user[_local2].score.data;
}
_local2++;
}
}
_local3.playagain_btn.onRelease = function () {
_root.g2w_playagain(true);
};
};
var g2w_menu = new ContextMenu();
g2w_menu.hideBuiltInItems();
g2w_menu.customItems.push(new ContextMenuItem("Games2win.com", itemHandler));
itemHandler = function (obj, item) {
getURL (obj_partner.clickthru, "_blank");
};
this.menu = g2w_menu;
checkhost = function () {
trace("CALL CHECKHOST");
swfurl = this._url;
if (swfurl.indexOf("games2win.com") == -1) {
return(false);
}
return(true);
};
_trackClickThru = function (mc) {
if (obj_partner._allowclick) {
mc.hit_area.onRelease = function () {
getURL (obj_partner.clickthru, "_blank");
};
} else {
mc.hit_area.useHandCursor = false;
}
};
String.prototype.trim = function () {
var _local3 = 0;
var _local2 = this.length;
white = new Object();
white._32 = 1;
_local2--;
while (white["_" + ord(this.charAt(_local2))]) {
}
while (white["_" + ord(this.charAt(_local3++))]) {
}
return(this.slice(_local3 - 1, _local2 + 1));
};
function randomRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function playAgain() {
_root.g2w_playagain(false);
}
function restart() {
_root.g2w_playagain(true);
}
_root.playIntro = true;
_root.allSounds = new Sound();
_root.score = 0;
_root.timeScore = 0;
_root.levelScore = 0;
_root.isPause = false;
_root.maxLevels = 4;
_root.levelArray = new Array(1 + _root.maxLevels);
i = 0;
while (i < maxLevels) {
_root.levelArray[i] = "lbllevel" + (i + 1);
i++;
}
_root.levelArray[maxLevels] = "win";
_root.level = 1;
_root.playIntroSound = true;
_root.debug = false;
MovieClip.prototype.pause = function (bool) {
var _parentClip = this;
var myFrame = this._currentframe;
trace(bool);
if (bool) {
var _local2 = this.createEmptyMovieClip("temp", this.getNextHighestDepth());
_local2.counter = 0;
_local2.onEnterFrame = function () {
if (this.counter == 1) {
if (_parentClip._currentframe != myFrame) {
_parentClip.gotoAndStop(myFrame + 1);
} else {
this.removeMovieClip();
}
} else {
this.counter++;
}
};
} else if (_parentClip.temp.counter == 1) {
_parentClip.temp.removeMovieClip();
_parentClip.gotoAndPlay(myFrame + 1);
}
};
MovieClip.prototype.globalPause = function (level) {
if (level > 0) {
for (var _local4 in this) {
if (typeof(this[_local4]) == "movieclip") {
_root.depth--;
this[_local4].pause(_root.isPause);
this[_local4].globalPause(level - 1);
}
}
}
};
Frame 6
stop();
Frame 15
stop();
Frame 23
stop();
Frame 33
stop();
_root.myGame = _root.game_mc;
Symbol 536 MovieClip Frame 1
function brain() {
create_assets(myself, _global.obj_iads.type);
switch (_global.obj_iads.type) {
case "FULL" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main);
break;
case "EMBED" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main.trgt_ads);
if (_global.obj_iads.link ne undefined) {
trgt_main.onRelease = function () {
getURL (_global.obj_iads.link, "_blank");
};
}
break;
case "NOOP" :
clearInterval(int1);
_root.play();
break;
}
}
function get_iads() {
lv_iads = new XML();
lv_result = new XML();
lv_result.ignoreWhite = true;
lv_result.onLoad = function (success) {
if (success) {
parse_iads(lv_result);
} else {
_root.play();
}
};
lv_iads.sendAndLoad(adurl, lv_result, "POST");
}
function parse_iads(lv_result) {
_global.obj_iads = new Array();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes.length) {
if (lv_result.firstChild.childNodes[_local2].firstChild.nodeValue != null) {
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = lv_result.firstChild.childNodes[_local2].firstChild.nodeValue;
} else if (lv_result.firstChild.childNodes[_local2].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local4 = 0;
while (_local4 < lv_result.firstChild.childNodes[_local2].childNodes.length) {
_local5[lv_result.firstChild.childNodes[_local2].childNodes[_local4].nodeName] = lv_result.firstChild.childNodes[_local2].childNodes[_local4].firstChild.nodeValue;
_local4++;
}
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = _local5;
}
_local2++;
}
show_time = int(_global.obj_iads.t);
check_type();
}
function time_delay() {
tim = 0;
int1 = setInterval(timespam, 1000);
}
function timespam() {
tim++;
trace(tim);
if (tim == show_time) {
clearInterval(int1);
_root.play();
}
}
function create_assets(mc, _type) {
mc.createEmptyMovieClip("whitebg", 0);
whitebg.beginFill(16777215);
whitebg.moveTo(0, 0);
whitebg.lineTo(0, 0);
whitebg.lineTo(Stage.width, 0);
whitebg.lineTo(Stage.width, Stage.height + 20);
whitebg.lineTo(0, Stage.height + 20);
whitebg.endFill();
mc.createEmptyMovieClip("trgt_main", 4);
mcLoader = new MovieClipLoader();
mcLoader.addListener(mc);
if (_type != "FULL") {
mc.createEmptyMovieClip("square_mc", 5);
var _local4 = trgt_main.createEmptyMovieClip("trgt_ads", getNextHighestDepth());
var _local3 = new TextFormat();
_local3.align = "center";
_local3.font = "Verdana";
_local3.size = 10;
var _local2 = new TextFormat();
_local2.align = "right";
_local2.font = "Verdana";
_local2.size = 10;
_local2.underline = true;
mc.createTextField("h_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("b_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("m_txt", mc.getNextHighestDepth(), 0, 0, 120, 22);
b_txt.autoSize = true;
m_txt.autoSize = true;
b_txt.selectable = false;
h_txt.selectable = false;
m_txt.selectable = false;
m_txt.html = true;
b_txt.multiline = true;
b_txt.setNewTextFormat(_local3);
h_txt.autoSize = true;
h_txt.setNewTextFormat(_local3);
m_txt.setNewTextFormat(_local2);
h_txt.text = "";
mc.createEmptyMovieClip("progressBar", 500);
}
}
function onLoadInit(mc) {
ad_width = int(_global.obj_iads.x);
ad_height = int(_global.obj_iads.y);
h_txt.text = "Advertisement";
loadMessages();
progressBar.tim = show_time;
progressBar.width = _global.obj_iads.x;
progressBar.height = 15;
progressBar.start = function () {
game_fps = getFps();
maxw = this.width - 2;
this.ad = maxw / (this.tim + 1);
this.ad = this.ad / game_fps;
};
progressBar.onEnterFrame = function () {
if (this.bar._width < (this.width - 2)) {
this.bar._width = this.bar._width + this.ad;
} else {
this.bar._width = this.width;
}
};
progressBar._x = 100;
progressBar._y = 100;
bar_mc = progressBar.createEmptyMovieClip("bar", 1);
box_mc = progressBar.createEmptyMovieClip("box", 2);
bar_mc.beginFill(26112);
bar_mc.moveTo(0, 0);
bar_mc.lineTo(1, 0);
bar_mc.lineTo(1, progressBar.height - 2);
bar_mc.lineTo(0, progressBar.height - 2);
bar_mc.lineTo(0, 0);
bar_mc.endFill();
bar_mc._x = 1.5;
bar_mc._y = 1.5;
box_mc.lineStyle(1, 3355443, 100, true, "none", "round", "miter", 1);
box_mc.lineTo(progressBar.width, 0);
box_mc.lineTo(progressBar.width, progressBar.height);
box_mc.lineTo(0, progressBar.height);
box_mc.lineTo(0, 0);
box_mc._x = 0;
box_mc._y = 0;
progressBar.start();
b_txt.text = "Note\rClicking on the above Ad won't interrupt your game.\rAd link opens in a new window.";
myself._y = b_txt._y - 10;
x = (Stage.width / 2) - (ad_width / 2);
y = (Stage.height / 2) - (ad_height / 2);
mc._x = x;
mc._y = y;
h_txt._x = (x + (ad_width / 2)) - (h_txt._width / 2);
h_txt._y = y - 20;
progressBar._x = (x + (ad_width / 2)) - (progressBar._width / 2);
progressBar._y = (y + 5) + ad_height;
myself.invizi_logo.swapDepths(myself.getNextHighestDepth());
myself.invizi_logo._alpha = 100;
myself.invizi_logo._x = int(progressBar._x);
myself.invizi_logo._y = int(progressBar._y + progressBar._height) + 5;
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 3;
myself.invizi_logo.onRelease = function () {
getURL ("http://www.inviziads.com/index.html?utm_source=4_1&utm_medium=logo&utm_content=default&utm_campaign=invizi", "_blank");
};
b_txt._x = (x + (ad_width / 2)) - (b_txt._width / 2);
b_txt._y = progressBar._y + 38;
square_mc.beginFill(16711680);
square_mc.moveTo(0, 0);
square_mc.lineTo(ad_width, 0);
square_mc.lineTo(ad_width, ad_height);
square_mc.lineTo(0, ad_height);
square_mc.lineTo(0, 0);
square_mc.endFill();
square_mc._x = x;
square_mc._y = y;
trgt_main.setMask(square_mc);
}
function loadMessages() {
lv_messages = new XML();
lv_messages.ignoreWhite = true;
lv_messages.onLoad = function (success) {
if (success) {
totalNodes = lv_messages.firstChild.childNodes.length;
ran = Math.floor(Math.random() * totalNodes);
if (lv_messages.firstChild.childNodes[ran].firstChild == undefined) {
m_txt.htmlText = "<font color='#0066CC'><a href='http://www.inviziads.com/adv-starter-pack.html' target='_blank'>Advertisers, try us out for US$250</a></font>";
} else {
m_txt.htmlText = ((("<font color='#0066CC'><a href='" + lv_messages.firstChild.childNodes[ran].attributes.link) + "' target='_blank'>") + lv_messages.firstChild.childNodes[ran].firstChild) + "</a></font>";
}
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
} else {
m_txt.htmlText = "<font color='#0066CC'><a href='http://inviziads.com' target='_blank'>Advertisers, try us out for US$250</a></font>";
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
}
};
lv_messages.load(messageURL);
}
function pushdata() {
holder.obj_iads = _global.obj_iads;
}
function startdatapush(mc) {
var _local2;
_local2 = setInterval(this, "pushdata", 10);
}
function check_type() {
if (_global.obj_iads.type eq "UPDATE") {
myself.createEmptyMovieClip("holder", 100);
var _local3 = _global.obj_iads.url;
obj_iads = _global.obj_iads;
var _local2 = new MovieClipLoader();
_local2.loadClip(_global.obj_iads.url, holder);
} else {
brain();
time_delay();
}
}
function parse_xml(mydata) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < mydata.firstChild.childNodes.length) {
if (mydata.firstChild.childNodes[_local1].firstChild.nodeValue != null) {
_local4[mydata.firstChild.childNodes[_local1].nodeName] = mydata.firstChild.childNodes[_local1].firstChild.nodeValue;
} else if (mydata.firstChild.childNodes[_local1].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes[_local1].childNodes.length) {
_local4[lv_result.firstChild.childNodes[_local1].childNodes[_local2].nodeName] = mydata.firstChild.childNodes[_local1].childNodes[_local2].firstChild.nodeValue;
_local2++;
}
_local4[lv_result.firstChild.childNodes[_local1].nodeName] = _local5;
}
_local1++;
}
return(_local4);
}
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
var time = 0;
var tim = 0;
var show_time = 0;
var tempo = 0;
var int1;
getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
game_fps = getFps();
if ((game_fps != 0) && (game_fps != undefined)) {
this.onEnterFrame = null;
}
};
myself = this;
signal = true;
var purl = flash.external.ExternalInterface.call("document.URL.toString");
var hurl = escape(_root._url);
var adurl = "http://s1.inviziads.com/lookup.html?";
adurl = adurl + "g=1224";
adurl = adurl + "&h=g2w";
adurl = adurl + "&type=pre";
adurl = adurl + "&v=4_32";
adurl = adurl + ("&purl=" + escape(purl));
adurl = adurl + ("&hurl=" + hurl);
var my_date = new Date();
adurl = adurl + ("&ts=" + my_date.getSeconds());
var messageURL = "http://s1.inviziads.com/template/invizi_messages.xml";
get_iads();
_root.stop();
Symbol 5 MovieClip Frame 1
stop();
Symbol 5 MovieClip Frame 2
stop();
Symbol 35 MovieClip Frame 1
_root._trackClickThru(this);
Symbol 44 MovieClip Frame 1
function brain() {
create_assets(myself, _global.obj_iads.type);
switch (_global.obj_iads.type) {
case "FULL" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main);
break;
case "EMBED" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main.trgt_ads);
if (_global.obj_iads.link ne undefined) {
trgt_main.onRelease = function () {
trace("_global.obj_iads.link " + _global.obj_iads.link);
getURL (_global.obj_iads.link, "_blank");
};
}
break;
case "NOOP" :
_parent._parent._visible = 0;
break;
}
}
function get_iads() {
lv_iads = new XML();
lv_result = new XML();
lv_result.ignoreWhite = true;
lv_result.onLoad = function (success) {
trace("success " + success);
if (success) {
parse_iads(lv_result);
myself.attachMovie("invizi_logo", "invizi_logo", this.getNextHighestDepth(), {_x:Stage.width - 120, _y:Stage.height - 20});
}
};
lv_iads.sendAndLoad(adurl, lv_result, "POST");
}
function parse_iads(lv_result) {
_global.obj_iads = new Array();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes.length) {
if (lv_result.firstChild.childNodes[_local2].firstChild.nodeValue != null) {
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = lv_result.firstChild.childNodes[_local2].firstChild.nodeValue;
} else if (lv_result.firstChild.childNodes[_local2].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local4 = 0;
while (_local4 < lv_result.firstChild.childNodes[_local2].childNodes.length) {
_local5[lv_result.firstChild.childNodes[_local2].childNodes[_local4].nodeName] = lv_result.firstChild.childNodes[_local2].childNodes[_local4].firstChild.nodeValue;
_local4++;
}
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = _local5;
}
_local2++;
}
show_time = int(_global.obj_iads.t);
check_type();
}
function create_assets(mc, _type) {
trace((("Create _ assets " + mc) + " ") + _type);
mc.createEmptyMovieClip("trgt_main", 4);
mcLoader = new MovieClipLoader();
mcLoader.addListener(mc);
if (_type != "FULL") {
mc.createEmptyMovieClip("square_mc", 5);
var _local4 = trgt_main.createEmptyMovieClip("trgt_ads", getNextHighestDepth());
var _local2 = new TextFormat();
_local2.align = "center";
_local2.font = "Verdana";
_local2.size = 10;
mc.createTextField("h_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("b_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
b_txt.autoSize = true;
b_txt.selectable = false;
h_txt.selectable = false;
b_txt.multiline = true;
b_txt.setNewTextFormat(_local2);
h_txt.autoSize = true;
h_txt.setNewTextFormat(_local2);
h_txt.text = "";
}
}
function onLoadInit(mc) {
ad_width = int(_global.obj_iads.x);
ad_height = int(_global.obj_iads.y);
_x = ((336 - ad_width) / 2);
_y = ((280 - ad_height) / 2);
progressBar.tim = show_time;
progressBar.width = _global.obj_iads.x;
progressBar.height = 15;
progressBar.start = function () {
maxw = this.width - 2;
this.ad = maxw / (this.tim + 1);
this.ad = this.ad / game_fps;
};
progressBar.onEnterFrame = function () {
if (this.bar._width < (this.width - 2)) {
this.bar._width = this.bar._width + this.ad;
} else {
this.bar._width = this.width;
}
};
progressBar._x = 100;
progressBar._y = 100;
bar_mc = progressBar.createEmptyMovieClip("bar", 1);
box_mc = progressBar.createEmptyMovieClip("box", 2);
bar_mc.beginFill(26112);
bar_mc.moveTo(0, 0);
bar_mc.lineTo(1, 0);
bar_mc.lineTo(1, progressBar.height - 2);
bar_mc.lineTo(0, progressBar.height - 2);
bar_mc.lineTo(0, 0);
bar_mc.endFill();
bar_mc._x = 1.5;
bar_mc._y = 1.5;
box_mc.lineStyle(1, 3355443, 100, true, "none", "round", "miter", 1);
box_mc.lineTo(progressBar.width, 0);
box_mc.lineTo(progressBar.width, progressBar.height);
box_mc.lineTo(0, progressBar.height);
box_mc.lineTo(0, 0);
box_mc._x = 0;
box_mc._y = 0;
progressBar.start();
x = 0;
y = 0;
mc._x = x;
mc._y = y;
square_mc.beginFill(16711680);
square_mc.moveTo(0, 0);
square_mc.lineTo(ad_width, 0);
square_mc.lineTo(ad_width, ad_height);
square_mc.lineTo(0, ad_height);
square_mc.lineTo(0, 0);
square_mc.endFill();
square_mc._x = x;
square_mc._y = y;
trgt_main.setMask(square_mc);
}
function check_type() {
if (_global.obj_iads.type eq "UPDATE") {
this.createEmptyMovieClip("holder", 100);
var _local5 = _global.obj_iads.url;
_root.obj_iads = _global.obj_iads.payload;
holder.loadMovie(_global.obj_iads.url);
holder.obj_iads = _root.obj_iads;
show_time = 20;
} else {
if (((_global.obj_iads.htmlPostRoll != undefined) && (purl != null)) && (purl.indexOf("games2win.com") != -1)) {
trace(purl.indexOf("games2win.com") != -1);
var _local4 = flash.external.ExternalInterface.call("inviziShowHtmlPostRoll", _global.obj_iads.htmlPostRoll);
}
if (((_local4 != null) && (purl != null)) && (purl.indexOf("games2win.com") != -1)) {
this._parent._visible = false;
} else {
brain();
}
}
}
function parse_xml(mydata) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < mydata.firstChild.childNodes.length) {
if (mydata.firstChild.childNodes[_local1].firstChild.nodeValue != null) {
_local4[mydata.firstChild.childNodes[_local1].nodeName] = mydata.firstChild.childNodes[_local1].firstChild.nodeValue;
} else if (mydata.firstChild.childNodes[_local1].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes[_local1].childNodes.length) {
_local4[lv_result.firstChild.childNodes[_local1].childNodes[_local2].nodeName] = mydata.firstChild.childNodes[_local1].childNodes[_local2].firstChild.nodeValue;
_local2++;
}
_local4[lv_result.firstChild.childNodes[_local1].nodeName] = _local5;
}
_local1++;
}
return(_local4);
}
System.security.allowDomain("*");
this.getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
game_fps = getFps();
if ((game_fps ne 0) and (game_fps ne undefined)) {
this.onEnterFrame = null;
}
};
myself = this;
signal = true;
var purl = flash.external.ExternalInterface.call("document.URL.toString");
var hurl = escape(_root._url);
adurl = _root.obj_game.inviziads;
adurl = adurl + "&type=post&v=2_0";
adurl = adurl + ("&purl=" + escape(purl));
adurl = adurl + ("&hurl=" + hurl);
adurl = adurl + ("&ts=" + getTimer());
trace(adurl);
get_iads();
stop();
Symbol 46 MovieClip Frame 1
invizi_logo.onRelease = function () {
getURL ("http://www.inviziads.com/", "_blank");
};
Symbol 57 Button
on (release) {
trace("CALLING : _root.g2w_playagain()");
_root.g2w_playagain();
}
Symbol 60 Button
on (release) {
trace("CALLING : _root.g2w_skiplevel()");
_root.g2w_skiplevel();
}
Symbol 61 MovieClip Frame 1
stop();
Symbol 78 MovieClip [_g2w_gameover_mc] Frame 1
stop();
_root._validateHost(this);
Symbol 78 MovieClip [_g2w_gameover_mc] Frame 2
stop();
Symbol 78 MovieClip [_g2w_gameover_mc] Frame 11
stop();
Symbol 78 MovieClip [_g2w_gameover_mc] Frame 20
stop();
Symbol 78 MovieClip [_g2w_gameover_mc] Frame 30
stop();
Symbol 78 MovieClip [_g2w_gameover_mc] Frame 41
stop();
Symbol 87 MovieClip [game_sound_ctrl] Frame 1
_gameSounds = new Sound();
var frame = "on";
changeVol = function (targetvol, step) {
this.onEnterFrame = function () {
var _local3 = _gameSounds.getVolume();
if ((step < 0) and (_local3 <= targetvol)) {
_local3 = targetvol;
delete this.onEnterFrame;
_root.so_sound = 1;
} else if ((step > 0) and (_local3 >= targetvol)) {
_local3 = targetvol;
delete this.onEnterFrame;
_root.so_sound = 0;
} else {
_gameSounds.setVolume(_local3 + step);
}
};
};
if (_root.so_sound == 1) {
frame = "off";
this.gotoAndPlay(frame);
}
this.onRelease = function () {
if (frame == "on") {
frame = "off";
} else {
frame = "on";
}
this.gotoAndPlay(frame);
};
Symbol 87 MovieClip [game_sound_ctrl] Frame 2
stop();
changeVol(100, 5);
Symbol 87 MovieClip [game_sound_ctrl] Frame 3
stop();
changeVol(0, -5);
Symbol 533 MovieClip [__Packages.it.sephiroth.XML2Object] Frame 0
class it.sephiroth.XML2Object
{
var oXML;
function XML2Object () {
}
function get xml() {
return(oXML);
}
function parseXML(sFile) {
oResult = new Object();
oXML = sFile;
oResult = translateXML();
return(oResult);
}
function translateXML(from, path, name, position) {
var _local2;
var _local9;
var _local4;
var _local10;
if (path == undefined) {
path = this;
name = "oResult";
}
path = path[name];
if (from == undefined) {
from = new XML(xml.toString());
from.ignoreWhite = true;
}
if (from.hasChildNodes()) {
_local9 = from.childNodes;
if (position != undefined) {
_local10 = path;
path = path[position];
}
while (_local9.length > 0) {
_local4 = _local9.shift();
_local2 = _local4.nodeName;
if (_local2 != undefined) {
var _local5 = new Object();
_local5.attributes = _local4.attributes;
_local5.data = _local4.firstChild.nodeValue;
if (position != undefined) {
_local10 = path;
}
if (path[_local2] != undefined) {
if (path[_local2].__proto__ == Array.prototype) {
path[_local2].push(_local5);
name = _local4.nodeName;
position = path[_local2].length - 1;
} else {
var _local8 = path[_local2];
path[_local2] = new Array();
path[_local2].push(_local8);
path[_local2].push(_local5);
name = _local2;
position = path[_local2].length - 1;
}
} else {
path[_local2] = _local5;
name = _local2;
position = undefined;
}
}
if (_local4.hasChildNodes()) {
translateXML(_local4, path, name, position);
}
}
}
return(oResult);
}
var oResult = new Object();
}
Symbol 93 MovieClip Frame 120
stop();
_root.gotoAndStop("lblloader");
Symbol 148 MovieClip Frame 1
var total = _root.getBytesTotal();
var loaded = 0;
var percent = 0;
onEnterFrame = function () {
if (percent < 100) {
loaded = _root.getBytesLoaded();
percent = Math.ceil((loaded / total) * 100);
}
if (percent == 100) {
_root.gotoAndStop("lblgameintro");
}
};
Symbol 151 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 2
stop();
Symbol 190 MovieClip Frame 1
if (!_root.playIntro) {
gotoAndStop(_totalframes);
}
_root.playIntro = false;
Symbol 190 MovieClip Frame 2
stop();
instructions_btn.onRelease = function () {
_parent.gotoAndStop("instructions");
};
story_btn.onRelease = function () {
_parent.gotoAndStop("story");
};
start_btn.onRelease = function () {
_root.gotoAndStop("lblgame");
};
Symbol 193 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 2
stop();
Symbol 208 MovieClip Frame 1
stop();
start_btn.onRelease = function () {
_root.gotoAndStop("lblgame");
};
back_btn.onRelease = function () {
_parent.gotoAndStop("lblgameintro");
};
Symbol 220 MovieClip Frame 1
stop();
start_btn.onRelease = function () {
_root.gotoAndStop("lblgame");
};
back_btn.onRelease = function () {
_parent.gotoAndStop("lblgameintro");
};
Symbol 221 MovieClip Frame 1
stop();
start_btn.onRelease = function () {
_root.gotoAndStop("lblgame");
};
Symbol 222 MovieClip Frame 1
gotoAndStop ("lblgameintro");
Symbol 222 MovieClip Frame 9
stop();
if (_root.playIntroSound) {
stopAllSounds();
sound_mc.gotoAndStop(2);
}
_root.playIntroSound = false;
Symbol 222 MovieClip Frame 18
stop();
Symbol 222 MovieClip Frame 23
stop();
Symbol 222 MovieClip Frame 30
stop();
Symbol 226 MovieClip Frame 1
stop();
start_btn.onRelease = function () {
_parent.gotoAndStop("lbllevel1");
};
back_btn.onRelease = function () {
_parent.gotoAndStop("lblgameintro");
};
Symbol 269 MovieClip Frame 1
onEnterFrame = function () {
};
stop();
Symbol 269 MovieClip Frame 2
stop();
Symbol 269 MovieClip Frame 6
Symbol 269 MovieClip Frame 7
stop();
Symbol 274 MovieClip Frame 3
_root.queueMove1 = true;
_root.queueMove2 = true;
_root.queueMove3 = true;
_root.queueMove4 = true;
_parent._parent._parent.allFood5_mc._visible = false;
_parent._parent._parent.allFood6_mc._visible = false;
_root.arrayColumn++;
Symbol 274 MovieClip Frame 5
_root.queueMove1 = false;
_root.queueMove2 = false;
_root.queueMove3 = false;
_root.queueMove4 = false;
Symbol 274 MovieClip Frame 6
stop();
trace(_root.arrayColumn + " colmn");
if (_root.customerSatisfaction >= _root.noOfCustomers[_root.level]) {
_root.timeScore = _root.time * 10;
_root.score = _root.score + _root.timeScore;
Key.removeListener(_root.game_mc.lvl1_mc.keyListener);
Key.removeListener(_root.game_mc.lvl2_mc.keyListener);
Key.removeListener(_root.game_mc.lvl3_mc.keyListener);
Key.removeListener(_root.game_mc.lvl4_mc.keyListener);
trace("this is one");
_root.counterV = 0;
if (_root.level < 4) {
trace("hi");
trace("this is one");
_root.myGame.gotoAndStop("levelComplete");
} else {
_root.counterV = 0;
_root.myGame.gotoAndStop("win");
}
} else {
_root.myFood = 0;
_parent._parent.gotoAndStop(6);
_parent._parent.custmer_mc.gotoAndStop(1);
}
Symbol 276 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.queueMove1 == true) {
if (_currentframe == 1) {
_root.queueMove1 = false;
gotoAndStop (2);
}
onEnterFrame = null;
}
};
Symbol 276 MovieClip Frame 2
stop();
onEnterFrame = function () {
if (_root.queueMove1 == true) {
if (_currentframe == 2) {
_root.queueMove1 = false;
gotoAndStop (3);
}
onEnterFrame = null;
}
};
Symbol 276 MovieClip Frame 3
stop();
onEnterFrame = function () {
if (_root.queueMove1 == true) {
_root.queueMove1 = false;
if (_currentframe == 3) {
gotoAndStop (4);
}
onEnterFrame = null;
}
};
Symbol 276 MovieClip Frame 4
stop();
_parent.reset();
var initialTime = 0;
var maxTime = 240;
onEnterFrame = function () {
if (initialTime <= maxTime) {
initialTime++;
if ((initialTime >= (maxTime / 2)) && (initialTime <= (maxTime / 1.2))) {
expression_mc.gotoAndStop(2);
} else if (initialTime >= (maxTime / 1.2)) {
expression_mc.gotoAndPlay(3);
} else {
expression_mc.gotoAndStop(1);
}
_parent.collectAlItems(this);
if (_root.specialPower == true) {
_root.specialPower = false;
maxTime = maxTime + 120;
}
} else {
gotoAndStop (5);
}
};
Symbol 276 MovieClip Frame 5
stop();
Symbol 299 MovieClip Frame 3
_root.queueMove1 = true;
_root.queueMove2 = true;
_root.queueMove3 = true;
_root.queueMove4 = true;
_parent._parent._parent.allFood5_mc._visible = false;
_parent._parent._parent.allFood6_mc._visible = false;
_root.arrayColumn++;
Symbol 299 MovieClip Frame 5
_root.queueMove1 = false;
_root.queueMove2 = false;
_root.queueMove3 = false;
_root.queueMove4 = false;
Symbol 299 MovieClip Frame 6
stop();
trace(_root.arrayColumn + " colmn");
if (_root.customerSatisfaction >= _root.noOfCustomers[_root.level]) {
trace(" next Level");
_root.timeScore = _root.time * 10;
_root.score = _root.score + _root.timeScore;
Key.removeListener(_root.game_mc.lvl1_mc.keyListener);
Key.removeListener(_root.game_mc.lvl2_mc.keyListener);
Key.removeListener(_root.game_mc.lvl3_mc.keyListener);
Key.removeListener(_root.game_mc.lvl4_mc.keyListener);
_root.counterV = 0;
if (_root.level < 4) {
_root.myGame.gotoAndStop("levelComplete");
trace("this is one");
} else {
_root.myGame.gotoAndStop("win");
}
} else {
_root.myFood = 0;
_parent._parent.gotoAndStop(5);
_parent._parent.custmer_mc.gotoAndStop(1);
}
Symbol 300 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.queueMove2 == true) {
if (_currentframe == 1) {
_root.queueMove2 = false;
gotoAndStop (2);
}
onEnterFrame = null;
}
};
Symbol 300 MovieClip Frame 2
stop();
onEnterFrame = function () {
if (_root.queueMove2 == true) {
if (_currentframe == 2) {
_root.queueMove2 = false;
gotoAndStop (3);
}
onEnterFrame = null;
}
};
Symbol 300 MovieClip Frame 3
stop();
onEnterFrame = function () {
if (_root.queueMove2 == true) {
_root.queueMove2 = false;
if (_currentframe == 3) {
gotoAndStop (4);
}
onEnterFrame = null;
}
};
Symbol 300 MovieClip Frame 4
stop();
_parent.reset();
var initialTime = 0;
var maxTime = 240;
onEnterFrame = function () {
if (initialTime <= maxTime) {
initialTime++;
if ((initialTime >= (maxTime / 2)) && (initialTime <= (maxTime / 1.2))) {
expression_mc.gotoAndStop(2);
} else if (initialTime >= (maxTime / 1.2)) {
expression_mc.gotoAndPlay(3);
} else {
expression_mc.gotoAndStop(1);
}
_parent.collectAlItems(this);
if (_root.specialPower == true) {
_root.specialPower = false;
maxTime = maxTime + 120;
}
} else {
gotoAndStop (5);
}
};
Symbol 300 MovieClip Frame 5
stop();
Symbol 325 MovieClip Frame 3
_root.queueMove1 = true;
_root.queueMove2 = true;
_root.queueMove3 = true;
_root.queueMove4 = true;
_parent._parent._parent.allFood5_mc._visible = false;
_parent._parent._parent.allFood6_mc._visible = false;
_root.arrayColumn++;
Symbol 325 MovieClip Frame 5
_root.queueMove1 = false;
_root.queueMove2 = false;
_root.queueMove3 = false;
_root.queueMove4 = false;
Symbol 325 MovieClip Frame 6
stop();
trace(_root.arrayColumn + " colmn");
if (_root.customerSatisfaction >= _root.noOfCustomers[_root.level]) {
trace(" next Level");
_root.timeScore = _root.time * 10;
_root.score = _root.score + _root.timeScore;
_root.counterV = 0;
Key.removeListener(_root.game_mc.lvl1_mc.keyListener);
Key.removeListener(_root.game_mc.lvl2_mc.keyListener);
Key.removeListener(_root.game_mc.lvl3_mc.keyListener);
Key.removeListener(_root.game_mc.lvl4_mc.keyListener);
if (_root.level < 4) {
_root.myGame.gotoAndStop("levelComplete");
} else {
_root.myGame.gotoAndStop("win");
}
} else {
_root.myFood = 0;
_parent._parent.gotoAndStop(4);
_parent._parent.custmer_mc.gotoAndStop(1);
}
Symbol 326 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.queueMove3 == true) {
if (_currentframe == 1) {
_root.queueMove3 = false;
gotoAndStop (2);
}
onEnterFrame = null;
}
};
Symbol 326 MovieClip Frame 2
stop();
onEnterFrame = function () {
if (_root.queueMove3 == true) {
if (_currentframe == 2) {
_root.queueMove3 = false;
gotoAndStop (3);
}
onEnterFrame = null;
}
};
Symbol 326 MovieClip Frame 3
stop();
onEnterFrame = function () {
if (_root.queueMove3 == true) {
_root.queueMove3 = false;
if (_currentframe == 3) {
gotoAndStop (4);
}
onEnterFrame = null;
}
};
Symbol 326 MovieClip Frame 4
stop();
_parent.reset();
var initialTime = 0;
var maxTime = 240;
onEnterFrame = function () {
if (initialTime <= maxTime) {
initialTime++;
if ((initialTime >= (maxTime / 2)) && (initialTime <= (maxTime / 1.2))) {
expression_mc.gotoAndStop(2);
} else if (initialTime >= (maxTime / 1.2)) {
expression_mc.gotoAndPlay(3);
} else {
expression_mc.gotoAndStop(1);
}
_parent.collectAlItems(this);
if (_root.specialPower == true) {
_root.specialPower = false;
maxTime = maxTime + 120;
}
} else {
gotoAndStop (5);
}
};
Symbol 326 MovieClip Frame 5
stop();
Symbol 347 MovieClip Frame 3
_root.queueMove1 = true;
_root.queueMove2 = true;
_root.queueMove3 = true;
_root.queueMove4 = true;
_parent._parent._parent.allFood5_mc._visible = false;
_parent._parent._parent.allFood6_mc._visible = false;
_root.arrayColumn++;
Symbol 347 MovieClip Frame 5
_root.queueMove1 = false;
_root.queueMove2 = false;
_root.queueMove3 = false;
_root.queueMove4 = false;
Symbol 347 MovieClip Frame 6
stop();
trace((_root.arrayColumn + " colmn ") + _root.myFood);
if (_root.customerSatisfaction >= _root.noOfCustomers[_root.level]) {
trace(" next Level");
_root.timeScore = _root.time * 10;
_root.score = _root.score + _root.timeScore;
_root.counterV = 0;
Key.removeListener(_root.game_mc.lvl1_mc.keyListener);
Key.removeListener(_root.game_mc.lvl2_mc.keyListener);
Key.removeListener(_root.game_mc.lvl3_mc.keyListener);
Key.removeListener(_root.game_mc.lvl4_mc.keyListener);
if (_root.level < 4) {
_root.myGame.gotoAndStop("levelComplete");
trace("this is one");
} else {
_root.myGame.gotoAndStop("win");
}
} else {
_root.myFood = 0;
_parent._parent.gotoAndStop(3);
_parent._parent.custmer_mc.gotoAndStop(1);
}
Symbol 348 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.queueMove4 == true) {
if (_currentframe == 1) {
_root.queueMove4 = false;
gotoAndStop (2);
}
onEnterFrame = null;
}
};
Symbol 348 MovieClip Frame 2
stop();
onEnterFrame = function () {
if (_root.queueMove4 == true) {
if (_currentframe == 2) {
_root.queueMove4 = false;
gotoAndStop (3);
}
onEnterFrame = null;
}
};
Symbol 348 MovieClip Frame 3
stop();
onEnterFrame = function () {
if (_root.queueMove4 == true) {
_root.queueMove4 = false;
if (_currentframe == 3) {
gotoAndStop (4);
}
onEnterFrame = null;
}
};
Symbol 348 MovieClip Frame 4
stop();
_parent.reset();
var initialTime = 0;
var maxTime = 240;
onEnterFrame = function () {
if (initialTime <= maxTime) {
initialTime++;
if ((initialTime >= (maxTime / 2)) && (initialTime <= (maxTime / 1.2))) {
expression_mc.gotoAndStop(2);
} else if (initialTime >= (maxTime / 1.2)) {
expression_mc.gotoAndPlay(3);
} else {
expression_mc.gotoAndStop(1);
}
_parent.collectAlItems(this);
if (_root.specialPower == true) {
_root.specialPower = false;
maxTime = maxTime + 120;
}
} else {
gotoAndStop (5);
}
};
Symbol 348 MovieClip Frame 5
stop();
Symbol 349 MovieClip Frame 1
function randomRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function ChangeCustmer() {
gotoAndStop (3);
custmer_mc.gotoAndStop(1);
}
function reset() {
_parent.foodOnTable_mc.gotoAndStop(10);
trace("length " + _parent.food[_root.arrayColumn].length);
i = 1;
while (i < _parent.food[_root.arrayColumn].length) {
_parent[("allFood" + i) + "_mc"]._visible = true;
_parent[("allFood" + i) + "_mc"].gotoAndStop(_parent.food[_root.arrayColumn][i]);
i++;
}
}
function resetFood() {
_parent.allFood1_mc._visible = false;
_parent.allFood2_mc._visible = false;
_parent.allFood3_mc._visible = false;
_parent.allFood4_mc._visible = false;
_parent.allFood5_mc._visible = false;
_parent.allFood6_mc._visible = false;
}
function collectAlItems(mov) {
if ((((((_parent.allFood1_mc._visible == false) && (_parent.allFood2_mc._visible == false)) && (_parent.allFood3_mc._visible == false)) && (_parent.allFood4_mc._visible == false)) && (_parent.allFood5_mc._visible == false)) && (_parent.allFood6_mc._visible == false)) {
if (mov.currentframe != 5) {
mov.gotoAndStop(5);
}
}
}
gotoAndStop(_parent.counter);
_parent.counter++;
custmer_mc.gotoAndStop(_currentframe);
stop();
Symbol 349 MovieClip Frame 2
stop();
Symbol 349 MovieClip Frame 3
stop();
Symbol 349 MovieClip Frame 4
stop();
Symbol 349 MovieClip Frame 5
stop();
Symbol 349 MovieClip Frame 6
stop();
Symbol 359 MovieClip Frame 1
gotoAndStop(_root.level);
stop();
Symbol 359 MovieClip Frame 2
stop();
Symbol 359 MovieClip Frame 3
stop();
Symbol 359 MovieClip Frame 4
stop();
Symbol 365 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 1
stop();
Symbol 387 MovieClip Frame 1
stop();
Symbol 392 MovieClip Frame 1
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 2
stop();
Symbol 405 MovieClip Frame 3
stop();
Symbol 407 MovieClip Frame 1
stop();
Symbol 408 MovieClip Frame 1
onEnterFrame = function () {
if (_parent.objectsInMenu == false) {
if (_parent.theKey == _currentframe) {
if (this._visible == true) {
_parent[("allFood" + myName) + "_mc"]._visible = false;
_root.score = _root.score + 200;
_parent.foodOnTable_mc.gotoAndStop(_currentframe);
_root.myFood++;
if (_root.myFood >= (_parent.food[_root.arrayColumn].length - 1)) {
_root.customerSatisfaction++;
}
_parent.objectsInMenu = true;
}
}
}
};
stop();
Symbol 408 MovieClip Frame 2
stop();
Symbol 408 MovieClip Frame 3
stop();
Symbol 408 MovieClip Frame 4
stop();
Symbol 408 MovieClip Frame 5
stop();
Symbol 408 MovieClip Frame 6
stop();
Symbol 408 MovieClip Frame 7
stop();
Symbol 408 MovieClip Frame 8
stop();
Symbol 408 MovieClip Frame 9
stop();
Symbol 416 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 2
stop();
Symbol 416 MovieClip Frame 3
stop();
Symbol 416 MovieClip Frame 4
stop();
Symbol 416 MovieClip Frame 5
stop();
Symbol 416 MovieClip Frame 6
stop();
Symbol 416 MovieClip Frame 7
stop();
Symbol 416 MovieClip Frame 8
stop();
Symbol 416 MovieClip Frame 9
stop();
Symbol 416 MovieClip Frame 10
stop();
Symbol 416 MovieClip Frame 11
stop();
Symbol 416 MovieClip Frame 12
stop();
Symbol 449 MovieClip Frame 1
var countDown = true;
var minutes = [0, 1, 1, 1, 1];
var count = 0;
var maxTime = (minutes[_root.level] * 60);
if (!countDown) {
_root.time = 0;
} else {
_root.time = maxTime;
}
var timer = 0;
var custCount = _root.noOfCustomers[_root.level];
onEnterFrame = function () {
if (!_root.isPause) {
if (timer <= (maxTime * 24)) {
timer++;
if (!countDown) {
_root.time = Math.round(timer / 24);
} else {
_root.time = maxTime - Math.round(timer / 24);
}
} else {
_root.myGame.gotoAndStop("gameOver");
}
if (_root.level != 1) {
if (Key.isDown(48)) {
if ((count == 0) && (_root.specialPower == false)) {
_root.powerTxt = "Time Bonus";
_parent.timePower_mc.gotoAndPlay(2);
count++;
maxTime = maxTime + 5;
_root.specialPower = true;
_parent.timeBonus = true;
trace((maxTime + " Special Power ") + _root.time);
}
if (((_root.mealVouchers == false) && (_root.time <= 45)) && (_root.time >= 35)) {
_root.couponTxt = "Meal Vouchers";
_parent.coupnPower_mc.gotoAndPlay(2);
trace("Meal Coupons");
_root.mealVouchers = true;
}
if ((_root.specialCoupon == false) && (_root.time <= 30)) {
_root.couponTxt = "Special Coupons";
_parent.coupnPower_mc.gotoAndPlay(2);
trace("Special Coupon");
_root.specialCoupon = true;
}
}
}
}
};
Symbol 450 MovieClip Frame 1
function clickButton(no) {
this["food" + no].gotoAndPlay(2);
j = 0;
while (j < food[_root.arrayColumn].length) {
if (no == food[_root.arrayColumn][j]) {
trace(_root.counterV + " menu");
if (_root.counterV > 0) {
_root.counterV = 0;
} else if ((_root.counterV > 0) && (no == food[_root.arrayColumn][j - 1])) {
_root.counterV++;
}
objectsInMenu = false;
break;
}
if ((((no != food[_root.arrayColumn][1]) && (no != food[_root.arrayColumn][2])) && (no != food[_root.arrayColumn][3])) && (no != food[_root.arrayColumn][4])) {
if (_root.counterV > 3) {
_root.counterV = 0;
Key.removeListener(keyListener);
_root.myGame.gotoAndStop("gameOver");
}
}
j++;
}
}
allFood1_mc._visible = false;
allFood2_mc._visible = false;
allFood3_mc._visible = false;
allFood4_mc._visible = false;
allFood5_mc._visible = false;
allFood6_mc._visible = false;
foodOnTable_mc.gotoAndStop(10);
_root.myFood = 0;
_root.customerSatisfaction = 0;
var counter = 1;
_root.counterV = 0;
var queue = [4, 1, 3, 2];
_root.queueMove1 = false;
_root.queueMove2 = false;
food = [[0], [0, 9, 2, 5], [0, 3, 5, 5], [0, 1, 8, 6], [0, 4, 9, 9], [0, 6, 6, 2], [0, 9, 5, 5], [0, 6, 3, 3], [0, 9, 9, 1], [0, 9, 2, 5], [0, 3, 5, 5], [0, 1, 8, 6], [0, 4, 9, 9], [0, 6, 6, 2], [0, 9, 5, 5], [0, 6, 3, 3], [0, 9, 9, 1]];
var Check = true;
var theKey;
_root.specialPower = false;
var timeBonus = false;
_root.mealVouchers = false;
_root.specialCoupon = false;
_root.arrayColumn = 1;
_root.queueMove3 = false;
_root.queueMove4 = false;
var keyListener = new Object();
keyListener.onKeyDown = function () {
var _local2 = Key.getAscii();
if ((_local2 >= 48) && (_local2 <= 57)) {
_root.counterV = _root.counterV + 1;
trace(_root.counterV + " hi tuhksbih");
if (Check) {
Check = false;
var _local3 = Key.getAscii();
theKey = chr(Key.getAscii());
clickButton(theKey);
}
}
};
keyListener.onKeyUp = function () {
Check = true;
};
var i;
var counterValue = 0;
var objectsInMenu = true;
Key.addListener(keyListener);
Instance of Symbol 365 MovieClip "food1" in Symbol 450 MovieClip Frame 1
onClipEvent (load) {
var myName = food1;
}
Instance of Symbol 408 MovieClip "allFood3_mc" in Symbol 450 MovieClip Frame 1
onClipEvent (load) {
var myName = 3;
}
Instance of Symbol 408 MovieClip "allFood4_mc" in Symbol 450 MovieClip Frame 1
onClipEvent (load) {
var myName = 4;
}
Instance of Symbol 408 MovieClip "allFood2_mc" in Symbol 450 MovieClip Frame 1
onClipEvent (load) {
var myName = 2;
}
Instance of Symbol 408 MovieClip "allFood1_mc" in Symbol 450 MovieClip Frame 1
onClipEvent (load) {
var myName = 1;
}
Instance of Symbol 408 MovieClip "allFood5_mc" in Symbol 450 MovieClip Frame 1
onClipEvent (load) {
var myName = 5;
}
Instance of Symbol 408 MovieClip "allFood6_mc" in Symbol 450 MovieClip Frame 1
onClipEvent (load) {
var myName = 6;
}
Symbol 453 MovieClip Frame 1
Symbol 453 MovieClip Frame 2
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 2
_parent.food0.bonus_mc.gotoAndStop(3);
Symbol 457 MovieClip Frame 29
Symbol 457 MovieClip Frame 30
_parent.food0.bonus_mc.gotoAndStop(1);
Symbol 459 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 2
_parent.food0.bonus_mc.gotoAndStop(2);
Symbol 459 MovieClip Frame 31
_parent.food0.bonus_mc.gotoAndStop(1);
Symbol 460 MovieClip Frame 1
function clickButton(no) {
this["food" + no].gotoAndPlay(2);
j = 0;
while (j < food[_root.arrayColumn].length) {
if (no == food[_root.arrayColumn][j]) {
if (_root.counterV > 0) {
_root.counterV = 0;
} else if ((_root.counterV > 0) && (no == food[_root.arrayColumn][j - 1])) {
_root.counterV++;
}
objectsInMenu = false;
break;
}
if ((((no != food[_root.arrayColumn][1]) && (no != food[_root.arrayColumn][2])) && (no != food[_root.arrayColumn][3])) && (no != food[_root.arrayColumn][4])) {
if (_root.counterV > 6) {
_root.counterV++;
Key.removeListener(keyListener);
_root.myGame.gotoAndStop("gameOver");
}
}
j++;
}
}
allFood1_mc._visible = false;
allFood2_mc._visible = false;
allFood3_mc._visible = false;
allFood4_mc._visible = false;
allFood5_mc._visible = false;
allFood6_mc._visible = false;
foodOnTable_mc.gotoAndStop(10);
_root.myFood = 0;
_root.customerSatisfaction = 0;
var counter = 1;
_root.counterV = 0;
var queue = [4, 1, 3, 2];
_root.queueMove1 = false;
_root.queueMove2 = false;
food = [[0], [0, 9, 2, 1, 9], [0, 3, 5, 4, 6], [0, 1, 8, 2, 7], [0, 4, 4, 9, 2], [0, 6, 6, 2, 5], [0, 9, 6, 2, 8], [0, 6, 8, 3, 3], [0, 9, 6, 7, 1], [0, 2, 8, 3, 6], [0, 5, 5, 3, 4], [0, 9, 2, 1, 9], [0, 3, 5, 4, 6], [0, 1, 8, 2, 7], [0, 4, 4, 9, 2], [0, 6, 6, 2, 5], [0, 9, 6, 2, 8], [0, 6, 8, 3, 3], [0, 9, 6, 7, 1], [0, 2, 8, 3, 6], [0, 5, 5, 3, 4]];
var Check = true;
var theKey;
_root.specialPower = false;
var timeBonus = false;
_root.mealVouchers = false;
_root.specialCoupon = false;
_root.arrayColumn = 1;
_root.queueMove3 = false;
_root.queueMove4 = false;
var keyListener = new Object();
keyListener.onKeyDown = function () {
var _local2 = Key.getAscii();
trace(counterV);
if ((_local2 >= 48) && (_local2 <= 57)) {
_root.counterV++;
if (Check) {
Check = false;
var _local3 = Key.getAscii();
theKey = chr(Key.getAscii());
clickButton(theKey);
}
}
if (_root.level != 1) {
if (_local2 == 48) {
if (Check) {
Check = false;
var _local3 = Key.getAscii();
theKey = chr(Key.getAscii());
clickButton(theKey);
}
}
}
};
keyListener.onKeyUp = function () {
Check = true;
};
var i;
var counterValue = 0;
var objectsInMenu = true;
Key.addListener(keyListener);
Instance of Symbol 365 MovieClip "food1" in Symbol 460 MovieClip Frame 1
onClipEvent (load) {
var myName = food1;
}
Instance of Symbol 408 MovieClip "allFood3_mc" in Symbol 460 MovieClip Frame 1
onClipEvent (load) {
var myName = 3;
}
Instance of Symbol 408 MovieClip "allFood4_mc" in Symbol 460 MovieClip Frame 1
onClipEvent (load) {
var myName = 4;
}
Instance of Symbol 408 MovieClip "allFood2_mc" in Symbol 460 MovieClip Frame 1
onClipEvent (load) {
var myName = 2;
}
Instance of Symbol 408 MovieClip "allFood1_mc" in Symbol 460 MovieClip Frame 1
onClipEvent (load) {
var myName = 1;
}
Instance of Symbol 408 MovieClip "allFood5_mc" in Symbol 460 MovieClip Frame 1
onClipEvent (load) {
var myName = 5;
}
Instance of Symbol 408 MovieClip "allFood6_mc" in Symbol 460 MovieClip Frame 1
onClipEvent (load) {
var myName = 6;
}
Symbol 462 MovieClip Frame 1
Symbol 462 MovieClip Frame 2
stop();
Symbol 464 MovieClip Frame 1
function clickButton(no) {
this["food" + no].gotoAndPlay(2);
j = 0;
while (j < food[_root.arrayColumn].length) {
if (no == food[_root.arrayColumn][j]) {
if (_root.counterV > 0) {
_root.counterV = 0;
} else if ((_root.counterV > 0) && (no == food[_root.arrayColumn][j - 1])) {
_root.counterV++;
}
objectsInMenu = false;
break;
}
if ((((((no != food[_root.arrayColumn][1]) && (no != food[_root.arrayColumn][2])) && (no != food[_root.arrayColumn][3])) && (no != food[_root.arrayColumn][4])) && (no != food[_root.arrayColumn][5])) && (no != food[_root.arrayColumn][6])) {
if (_root.counterV > 6) {
_root.counterV = 0;
Key.removeListener(keyListener);
_root.myGame.gotoAndStop("gameOver");
}
}
j++;
}
}
allFood1_mc._visible = false;
allFood2_mc._visible = false;
allFood3_mc._visible = false;
allFood4_mc._visible = false;
allFood5_mc._visible = false;
allFood6_mc._visible = false;
foodOnTable_mc.gotoAndStop(10);
_root.myFood = 0;
_root.customerSatisfaction = 0;
var counter = 1;
_root.counterV = 0;
var queue = [4, 1, 3, 2];
_root.queueMove1 = false;
_root.queueMove2 = false;
food = [[0], [0, 9, 2, 8, 1, 4], [0, 3, 5, 7, 8, 3], [0, 1, 8, 9, 3, 6], [0, 4, 9, 9, 6, 2], [0, 6, 6, 2, 2, 4], [0, 9, 6, 7, 6, 5], [0, 6, 6, 3, 3, 4], [0, 9, 2, 9, 1, 4], [0, 2, 2, 7, 7, 1], [0, 5, 3, 3, 4, 6], [0, 9, 2, 8, 1, 4], [0, 3, 5, 7, 8, 3], [0, 1, 8, 9, 3, 6], [0, 4, 9, 9, 6, 2], [0, 6, 6, 2, 2, 4], [0, 9, 6, 7, 6, 5], [0, 6, 6, 3, 3, 4], [0, 9, 2, 9, 1, 4], [0, 2, 2, 7, 7, 1], [0, 5, 3, 3, 4, 6]];
var Check = true;
var theKey;
_root.specialPower = false;
var timeBonus = false;
_root.mealVouchers = false;
_root.specialCoupon = false;
_root.arrayColumn = 1;
_root.queueMove3 = false;
_root.queueMove4 = false;
var keyListener = new Object();
keyListener.onKeyDown = function () {
var _local2 = Key.getAscii();
trace(counterV);
if ((_local2 >= 48) && (_local2 <= 57)) {
_root.counterV++;
if (Check) {
Check = false;
var _local3 = Key.getAscii();
theKey = chr(Key.getAscii());
clickButton(theKey);
}
}
if (_root.level != 1) {
if (_local2 == 48) {
if (Check) {
Check = false;
var _local3 = Key.getAscii();
theKey = chr(Key.getAscii());
clickButton(theKey);
}
}
}
};
keyListener.onKeyUp = function () {
Check = true;
};
var i;
var counterValue = 0;
var objectsInMenu = true;
Key.addListener(keyListener);
Instance of Symbol 365 MovieClip "food1" in Symbol 464 MovieClip Frame 1
onClipEvent (load) {
var myName = food1;
}
Instance of Symbol 408 MovieClip "allFood3_mc" in Symbol 464 MovieClip Frame 1
onClipEvent (load) {
var myName = 3;
}
Instance of Symbol 408 MovieClip "allFood4_mc" in Symbol 464 MovieClip Frame 1
onClipEvent (load) {
var myName = 4;
}
Instance of Symbol 408 MovieClip "allFood2_mc" in Symbol 464 MovieClip Frame 1
onClipEvent (load) {
var myName = 2;
}
Instance of Symbol 408 MovieClip "allFood1_mc" in Symbol 464 MovieClip Frame 1
onClipEvent (load) {
var myName = 1;
}
Instance of Symbol 408 MovieClip "allFood5_mc" in Symbol 464 MovieClip Frame 1
onClipEvent (load) {
var myName = 5;
}
Instance of Symbol 408 MovieClip "allFood6_mc" in Symbol 464 MovieClip Frame 1
onClipEvent (load) {
var myName = 6;
}
Symbol 466 MovieClip Frame 1
Symbol 466 MovieClip Frame 2
stop();
Symbol 468 MovieClip Frame 1
function clickButton(no) {
this["food" + no].gotoAndPlay(2);
j = 0;
while (j < food[_root.arrayColumn].length) {
if (no == food[_root.arrayColumn][j]) {
if (_root.counterV > 0) {
_root.counterV = 0;
} else if ((_root.counterV > 0) && (no == food[_root.arrayColumn][j - 1])) {
_root.counterV++;
}
objectsInMenu = false;
break;
}
if ((((((no != food[_root.arrayColumn][1]) && (no != food[_root.arrayColumn][2])) && (no != food[_root.arrayColumn][3])) && (no != food[_root.arrayColumn][4])) && (no != food[_root.arrayColumn][5])) && (no != food[_root.arrayColumn][6])) {
if (_root.counterV > 6) {
_root.counterV = 0;
Key.removeListener(keyListener);
_root.myGame.gotoAndStop("gameOver");
}
}
j++;
}
}
allFood1_mc._visible = false;
allFood2_mc._visible = false;
allFood3_mc._visible = false;
allFood4_mc._visible = false;
allFood5_mc._visible = false;
allFood6_mc._visible = false;
foodOnTable_mc.gotoAndStop(10);
_root.myFood = 0;
_root.customerSatisfaction = 0;
var counter = 1;
_root.counterV = 0;
var queue = [4, 1, 3, 2];
_root.queueMove1 = false;
_root.queueMove2 = false;
food = [[0], [0, 9, 2, 4, 1, 6, 9], [0, 3, 5, 2, 4, 8, 7], [0, 1, 8, 8, 3, 7, 1], [0, 4, 9, 9, 2, 6, 4], [0, 6, 3, 6, 2, 4, 1], [0, 9, 9, 6, 7, 8, 3], [0, 6, 9, 3, 2, 5, 2], [0, 9, 4, 9, 1, 2, 5], [0, 2, 2, 3, 7, 6, 1], [0, 5, 3, 3, 4, 2, 6], [0, 5, 5, 2, 9, 1, 1], [0, 6, 2, 9, 3, 3, 9], [0, 9, 2, 4, 1, 6, 9], [0, 3, 5, 2, 4, 8, 7], [0, 1, 8, 8, 3, 7, 1], [0, 4, 9, 9, 2, 6, 4], [0, 6, 3, 6, 2, 4, 1], [0, 9, 9, 6, 7, 8, 3], [0, 6, 9, 3, 2, 5, 2], [0, 9, 4, 9, 1, 2, 5], [0, 2, 2, 3, 7, 6, 1], [0, 5, 3, 3, 4, 2, 6], [0, 5, 5, 2, 9, 1, 1], [0, 6, 2, 9, 3, 3, 9]];
var Check = true;
var theKey;
_root.specialPower = false;
var timeBonus = false;
_root.mealVouchers = false;
_root.specialCoupon = false;
_root.arrayColumn = 1;
_root.queueMove3 = false;
_root.queueMove4 = false;
var keyListener = new Object();
keyListener.onKeyDown = function () {
var _local2 = Key.getAscii();
_root.counterV++;
trace(counterV);
if ((_local2 >= 48) && (_local2 <= 57)) {
if (Check) {
Check = false;
var _local3 = Key.getAscii();
theKey = chr(Key.getAscii());
clickButton(theKey);
}
}
if (_root.level != 1) {
if (_local2 == 48) {
if (Check) {
Check = false;
var _local3 = Key.getAscii();
theKey = chr(Key.getAscii());
clickButton(theKey);
}
}
}
};
keyListener.onKeyUp = function () {
Check = true;
};
var i;
var counterValue = 0;
var objectsInMenu = true;
Key.addListener(keyListener);
Instance of Symbol 365 MovieClip "food1" in Symbol 468 MovieClip Frame 1
onClipEvent (load) {
var myName = food1;
}
Instance of Symbol 408 MovieClip "allFood3_mc" in Symbol 468 MovieClip Frame 1
onClipEvent (load) {
var myName = 3;
}
Instance of Symbol 408 MovieClip "allFood4_mc" in Symbol 468 MovieClip Frame 1
onClipEvent (load) {
var myName = 4;
}
Instance of Symbol 408 MovieClip "allFood2_mc" in Symbol 468 MovieClip Frame 1
onClipEvent (load) {
var myName = 2;
}
Instance of Symbol 408 MovieClip "allFood1_mc" in Symbol 468 MovieClip Frame 1
onClipEvent (load) {
var myName = 1;
}
Instance of Symbol 408 MovieClip "allFood5_mc" in Symbol 468 MovieClip Frame 1
onClipEvent (load) {
var myName = 5;
}
Instance of Symbol 408 MovieClip "allFood6_mc" in Symbol 468 MovieClip Frame 1
onClipEvent (load) {
var myName = 6;
}
Symbol 470 MovieClip Frame 1
Symbol 470 MovieClip Frame 2
stop();
Symbol 482 MovieClip Frame 1
stop();
Symbol 484 MovieClip Frame 1
_root.level = 1;
Symbol 494 MovieClip Frame 1
Symbol 494 MovieClip Frame 2
stop();
Symbol 518 MovieClip Frame 1
if (_root.level == 4) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
stop();
Symbol 518 MovieClip Frame 2
stop();
Symbol 523 MovieClip Frame 1
Symbol 523 MovieClip Frame 2
stop();
Symbol 531 MovieClip Frame 1
stop();
next_btn.onRelease = function () {
_root.myGame.gotoAndStop(_root.levelArray[int(_root.level)]);
};
stop();
Symbol 532 MovieClip Frame 1
_root.noOfCustomers = [0, 5, 7, 9, 12];
stop();
if (_root.level != 1) {
gotoAndStop(_root.levelArray[_root.level - 1]);
}
Symbol 532 MovieClip Frame 13
stop();
stopAllSounds();
_root.level = 1;
trace(_root.level + " lvl");
Symbol 532 MovieClip Frame 19
stop();
stopAllSounds();
_root.level = 2;
trace(_root.level + " lvl");
Symbol 532 MovieClip Frame 26
stop();
stopAllSounds();
_root.level = 3;
trace(_root.level + " lvl");
Symbol 532 MovieClip Frame 34
stop();
stopAllSounds();
_root.level = 4;
trace(_root.level + " lvl");
Symbol 532 MovieClip Frame 41
stop();
stopAllSounds();
_root._doGameOver(_root.score, "gamecomplete", false, 3000);
Symbol 532 MovieClip Frame 48
stop();
stopAllSounds();
_root.counterV = 0;
var showSkip = true;
if (_root.level >= _root.maxLevels) {
showSkip = false;
} else {
showSkip = true;
}
var gameOverframes = 2;
_root._doGameOver(_root.score, "gameover", showSkip, 3000);
Symbol 532 MovieClip Frame 58
stop();
stopAllSounds();