Combined Code
// unknown tag 88 length 77
// unknown tag 88 length 76
// unknown tag 88 length 70
button 12 {
on (rollOver) {
this.origxscale = this._xscale;
this.origyscale = this._yscale;
this._xscale += 130;
this._yscale += 130;
this._y -= 10;
if (_root.tutorial) {
if (_root.tute.tab) {
_root.tute.nextFrame();
}
}
}
on (rollOut, dragOut) {
this._y += 10;
this._xscale = this.origxscale;
this._yscale = this.origyscale;
}
}
movieClip 13 tab {
frame 1 {
stop();
}
}
movieClip 15 {
}
movieClip 16 {
}
movieClip 18 goodmc {
frame 20 {
removeMovieClip(this);
}
}
movieClip 20 {
}
movieClip 22 {
}
movieClip 24 {
}
movieClip 26 {
}
movieClip 28 {
}
movieClip 30 {
}
movieClip 32 {
}
movieClip 34 {
}
movieClip 36 {
}
movieClip 37 {
}
movieClip 38 {
}
movieClip 39 {
}
movieClip 41 {
}
movieClip 43 {
}
movieClip 44 cookTimerFast {
frame 204 {
removeMovieClip(this);
}
}
movieClip 45 cookTimer {
frame 306 {
removeMovieClip(this);
}
}
movieClip 47 {
}
movieClip 48 {
}
movieClip 50 {
}
movieClip 51 coins {
frame 1 {
this.active = false;
}
frame 1 {
stop();
}
frame 5 {
this.active = true;
}
frame 20 {
if (_root.tutorial) {
stop();
}
}
frame 726 {
gotoAndStop(1);
_root['carInBay' + this.num] = false;
_root['bay' + this.num].collectCoins = false;
--_root.carsOnStage;
_root.enableOrDisableBays();
}
}
movieClip 53 {
}
movieClip 54 conedrop {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 10 {
stop();
}
}
frame 1 {
function transition(frame) {
trans.play();
_root.goto = frame;
}
function fadeMusic(music) {
fadesound.onEnterFrame = function () {
if (music.getVolume() > 0) {
music.setVolume(music.getVolume() - 5);
} else {
music.stop();
music.setVolume(100);
delete fadesound.onEnterFrame;
}
};
}
var allSounds = new Sound();
}
frame 1 {
function go() {
firstPlay = true;
transition('intro');
}
_root.createEmptyMovieClip('scoresClip', _root.getNextHighestDepth());
mochi.as2.MochiServices.connect('afdf292221cb41ac', scoresClip);
var myMenu_cm = new ContextMenu();
myMenu_cm.builtInItems.zoom = false;
myMenu_cm.builtInItems.quality = true;
myMenu_cm.builtInItems.print = false;
myMenu_cm.builtInItems.save = false;
myMenu_cm.builtInItems.loop = false;
myMenu_cm.builtInItems.play = false;
myMenu_cm.builtInItems.rewind = false;
myMenu_cm.builtInItems.forward_back = false;
_root.menu = myMenu_cm;
stop();
var percent = 0;
var counter = 0;
var loaded = false;
this.onEnterFrame = function () {
percent = (getBytesTotal() / getBytesLoaded()) * 100;
if (percent > counter) {
percent = counter;
}
if (!loaded) {
loadmask.gotoAndStop(int(percent));
}
if (percent == 100) {
delete this.onEnterFrame;
loaded = true;
loadmask.gotoAndStop(100);
CGlogo.play();
}
counter += 0.2;
};
link.onPress = function () {
getURL('http://www.cookinggames.com', '_blank');
};
}
movieClip 96 {
}
movieClip 98 {
}
movieClip 99 {
}
movieClip 100 {
}
movieClip 103 {
}
movieClip 105 {
}
movieClip 106 {
}
movieClip 107 {
}
movieClip 111 {
}
movieClip 112 {
}
movieClip 115 {
}
movieClip 117 {
}
movieClip 119 {
}
movieClip 120 {
}
movieClip 122 {
}
movieClip 125 {
}
movieClip 126 {
}
movieClip 128 {
}
movieClip 130 {
}
movieClip 131 {
}
movieClip 136 {
}
movieClip 138 {
}
movieClip 139 {
frame 1 {
stop();
}
frame 101 {
stop();
_root.go();
}
}
movieClip 142 {
}
movieClip 144 {
}
movieClip 145 {
frame 1 {
stop();
}
frame 7 {
_root.gotoAndPlay(_root.goto);
}
}
movieClip 806 __Packages.mochi.as2.MochiSync {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSync) {
var v1 = function () {
this._syncContainer = {};
};
mochi.as2.MochiSync = v1;
var v2 = v1.prototype;
v2.getProp = function (name) {
return this._syncContainer[name];
};
v2.setProp = function (name, value) {
if (this._syncContainer[name] == value) {
return undefined;
}
this._syncContainer[name] = value;
mochi.as2.MochiServices.send('sync_propUpdate', {'name': name, 'value': value});
};
v2.triggerEvent = function (eventType, args) {
switch (eventType) {
case mochi.as2.MochiSync.SYNC_REQUEST:
mochi.as2.MochiServices.send('sync_syncronize', this._syncContainer);
break;
case mochi.as2.MochiSync.SYNC_PROPERTY:
this._syncContainer[args.name] = args.value;
}
};
v1.SYNC_REQUEST = 'SyncRequest';
v1.SYNC_PROPERTY = 'UpdateProperty';
ASSetPropFlags(mochi.as2.MochiSync.prototype, null, 1);
}
#endinitclip
}
movieClip 807 __Packages.mochi.as2.MochiServices {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiServices) {
var v1 = function () {};
mochi.as2.MochiServices = v1;
var v2 = v1.prototype;
v1.__get__id = function () {
return mochi.as2.MochiServices._id;
};
v1.__get__clip = function () {
return mochi.as2.MochiServices._container;
};
v1.__get__childClip = function () {
return mochi.as2.MochiServices._clip;
};
v1.getVersion = function () {
return '3.8 as2';
};
v1.allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.__get__isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1.__set__comChannelName = function (val) {
if (val != undefined) {
if (val.length > 3) {
mochi.as2.MochiServices._sendChannelName = val + '_fromgame';
mochi.as2.MochiServices.initComChannels();
}
}
return mochi.as2.MochiServices.__get__comChannelName();
};
v1.__get__connected = function () {
return mochi.as2.MochiServices._connected;
};
v1.connect = function (id, clip, onError) {
mochi.as2.MochiServices.warnID(id, false);
if (!mochi.as2.MochiServices._connected && mochi.as2.MochiServices._clip == undefined) {
trace('MochiServices Connecting...');
mochi.as2.MochiServices._connecting = true;
mochi.as2.MochiServices.init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else {
if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
};
v1.disconnect = function () {
if (mochi.as2.MochiServices._connected || mochi.as2.MochiServices._connecting) {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._connecting = mochi.as2.MochiServices._connected;
mochi.as2.MochiServices.flush(true);
if (mochi.as2.MochiServices._clip != undefined) {
mochi.as2.MochiServices._clip.removeMovieClip();
delete mochi.as2.MochiServices._clip;
}
mochi.as2.MochiServices._listenChannel.close();
}
};
v1.init = function (id, clip) {
mochi.as2.MochiServices._id = id;
if (clip != undefined) {
mochi.as2.MochiServices._container = clip;
} else {
mochi.as2.MochiServices._container = _root;
}
mochi.as2.MochiServices.loadCommunicator(id, mochi.as2.MochiServices._container);
};
v1.loadCommunicator = function (id, clip) {
var v6 = '_mochiservices_com_' + id;
var v5 = new MovieClipLoader();
var v3 = {};
if (mochi.as2.MochiServices._clip != null) {
return mochi.as2.MochiServices._clip;
}
if (!mochi.as2.MochiServices.__get__isNetworkAvailable()) {
return null;
}
if ((mochi.as2.MochiServices.urlOptions()).servURL) {
mochi.as2.MochiServices._servURL = (mochi.as2.MochiServices.urlOptions()).servURL;
}
var v4 = mochi.as2.MochiServices._servURL + mochi.as2.MochiServices._services;
if ((mochi.as2.MochiServices.urlOptions()).servicesURL) {
v4 = (mochi.as2.MochiServices.urlOptions()).servicesURL;
}
mochi.as2.MochiServices.allowDomains(v4);
mochi.as2.MochiServices._clip = clip.createEmptyMovieClip(v6, 10336, false);
mochi.as2.MochiServices._listenChannelName += Math.floor((new Date()).getTime()) + '_' + Math.floor(Math.random() * 99999);
mochi.as2.MochiServices.listen();
if (v3.waitInterval != null) {
clearInterval(v3.waitInterval);
}
v3.onLoadError = mochi.as2.MochiServices.loadError;
v3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
v3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
v3.startTime = getTimer();
v3.wait = function () {
if (getTimer() - this.startTime > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
}
clearInterval(this.waitInterval);
}
};
v3.waitInterval = setInterval(v3, 'wait', 1000);
v5.addListener(v3);
v5.loadClip(v4 + '?listenLC=' + mochi.as2.MochiServices._listenChannelName + '&mochiad_options=' + escape(_root.mochiad_options) + '&api_version=' + mochi.as2.MochiServices.getVersion(), mochi.as2.MochiServices._clip);
mochi.as2.MochiServices._sendChannel = new LocalConnection();
mochi.as2.MochiServices._sendChannel._queue = [];
return mochi.as2.MochiServices._clip;
};
v1.loadError = function (target_mc, errorCode, httpStatus) {
trace('MochiServices could not load.');
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
v1.onStatus = function (infoObject) {
if (infoObject.level !== 'error') {
} else {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
}
};
v1.listen = function () {
mochi.as2.MochiServices._listenChannel = new LocalConnection();
mochi.as2.MochiServices._listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
mochi.as2.MochiServices._listenChannel.allowDomain = function (d) {
return true;
};
mochi.as2.MochiServices._listenChannel.allowInsecureDomain = mochi.as2.MochiServices._listenChannel.allowDomain;
mochi.as2.MochiServices._listenChannel._nextcallbackID = 0;
mochi.as2.MochiServices._listenChannel._callbacks = {};
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
trace('Waiting for MochiAds services to connect...');
};
v1.initComChannels = function () {
if (!mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'handshakeDone'});
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'registerGame', 'id': mochi.as2.MochiServices._id, 'version': mochi.as2.MochiServices.getVersion()});
mochi.as2.MochiServices._listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._listenChannel.onReceive = function (pkg) {
var v5 = pkg.callbackID;
var v4 = this._callbacks[v5];
if (!v4) {
return undefined;
}
var v2 = v4.callbackMethod;
var v3 = v4.callbackObject;
if (v3 && typeof v2 == 'string') {
v2 = v3[v2];
}
if (v2 != undefined) {
v2.apply(v3, pkg.args);
}
delete this._callbacks[v5];
};
mochi.as2.MochiServices._listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case 'events':
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case 'coins':
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
break;
case 'sync':
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
mochi.as2.MochiServices._listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
};
trace('[SERVICES_API] connected!');
mochi.as2.MochiServices._connecting = false;
mochi.as2.MochiServices._connected = true;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', mochi.as2.MochiServices._sendChannel._queue.shift());
}
}
};
v1.updateCopy = function (args) {
mochi.as2.MochiServices.send('coins_updateCopy', args, null, null);
};
v1.flush = function (error) {
var v1;
var v2;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
v1 = mochi.as2.MochiServices._sendChannel._queue.shift();
false;
if (v1.callbackID != null) {
v2 = mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
}
delete mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
if (error) {
mochi.as2.MochiServices.handleError(v1.args, v2.callbackObject, v2.callbackMethod);
}
}
};
v1.handleError = function (args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ['NotConnected']);
}
if (args.options != null && args.options.onError != null) {
args.options.onError.apply(null, ['NotConnected']);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = 'NotConnected';
if (callbackObject != null && typeof callbackMethod == 'string') {
callbackObject[callbackMethod](args);
} else {
if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
};
v1.send = function (methodName, args, callbackObject, callbackMethod) {
if (mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
} else {
if (mochi.as2.MochiServices._clip == undefined || !mochi.as2.MochiServices._connecting) {
trace('Error: MochiServices not connected. Please call MochiServices.connect(). Function: ' + methodName);
mochi.as2.MochiServices.handleError(args, callbackObject, callbackMethod);
mochi.as2.MochiServices.flush(true);
return undefined;
} else {
mochi.as2.MochiServices._sendChannel._queue.push({'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
}
}
mochi.as2.MochiServices._listenChannel._callbacks[mochi.as2.MochiServices._listenChannel._nextcallbackID] = {'callbackObject': callbackObject, 'callbackMethod': callbackMethod};
++mochi.as2.MochiServices._listenChannel._nextcallbackID;
};
v1.urlOptions = function () {
var v5 = {};
var v6;
if (_root._url.indexOf('mochiad_options') != -1) {
var v2 = _root._url.indexOf('mochiad_options') + 'mochiad_options'.length + 1;
v6 = _root._url.substr(v2, _root._url.length);
} else {
if (_root.mochiad_options) {
v6 = _root.mochiad_options;
}
}
if (v6) {
var v4 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v4.length) {
var v3 = v4[v2].split('=');
v5[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
return v5;
};
v1.warnID = function (bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace('WARNING: ' + (leaderboard ? 'board' : 'game') + ' ID is not the appropriate length');
return undefined;
} else {
if (bid == '1e113c7239048b3f') {
if (leaderboard) {
trace('WARNING: Using testing board ID');
} else {
trace('WARNING: Using testing board ID as game ID');
}
return undefined;
} else {
if (bid == '84993a1de4031cd8') {
if (leaderboard) {
trace('WARNING: Using testing game ID as board ID');
} else {
trace('WARNING: Using testing game ID');
}
return undefined;
}
}
}
var v1 = 0;
while (v1 < bid.length) {
switch (bid.charAt(v1)) {
if (bid.charAt(v1) !== 'f') {
} else {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'a':
case 'b':
case 'c':
break;
case 'd':
case 'e':
}
default:
trace('WARNING: Board ID contains illegal characters: ' + bid);
return undefined;
}
++v1;
}
};
v1.addLinkEvent = function (url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var v2 = new Object();
v2.mav = mochi.as2.MochiServices.getVersion();
v2.swfv = btn.getSWFVersion() || 6;
v2.swfurl = btn._url;
v2.fv = System.capabilities.version;
v2.os = System.capabilities.os;
v2.lang = System.capabilities.language;
v2.scres = System.capabilities.screenResolutionX + 'x' + System.capabilities.screenResolutionY;
var s = '?';
var v3 = 0;
for (var v6 in v2) {
if (v3 != 0) {
s += '&';
}
++v3;
s = s + v6 + '=' + escape(v2[v6]);
}
if (!(mochi.as2.MochiServices.netupAttempted || mochi.as2.MochiServices._connected)) {
var ping = btn.createEmptyMovieClip('ping', 777);
var v7 = btn.createEmptyMovieClip('nettest', 778);
mochi.as2.MochiServices.netupAttempted = true;
ping.loadMovie('http://x.mochiads.com/linkping.swf?t=' + getTimer());
v7.onEnterFrame = function () {
if (ping._totalframes > 0 && ping._totalframes == ping._framesloaded) {
delete this.onEnterFrame;
} else {
if (getTimer() - t0 > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
}
};
}
var v4 = btn.createEmptyMovieClip('clk', 1001);
v4._alpha = 0;
v4.beginFill(1044735);
v4.moveTo(0, 0);
v4.lineTo(0, btn._height);
v4.lineTo(btn._width, btn._height);
v4.lineTo(btn._width, 0);
v4.lineTo(0, 0);
v4.endFill();
v4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL(url + s, '_blank');
} else {
getURL(burl, '_blank');
}
if (onClick != undefined) {
onClick();
}
};
};
v1.setContainer = function (clip) {};
v1.stayOnTop = function (clip) {};
v1._servURL = 'http://www.mochiads.com/static/lib/services/';
v1._services = 'services.swf';
v1._mochiLC = 'MochiLC.swf';
v1._listenChannelName = '__ms_';
v1._connecting = false;
v1._connected = false;
v1.netup = true;
v1.netupAttempted = false;
v1.servicesSync = new mochi.as2.MochiSync();
v1.addProperty('childClip', v1.__get__childClip, function () {});
v1.addProperty('clip', v1.__get__clip, function () {});
v1.addProperty('comChannelName', function () {}, v1.__set__comChannelName);
v1.addProperty('connected', v1.__get__connected, function () {});
v1.addProperty('id', v1.__get__id, function () {});
v1.addProperty('isNetworkAvailable', v1.__get__isNetworkAvailable, function () {});
ASSetPropFlags(mochi.as2.MochiServices.prototype, null, 1);
}
#endinitclip
}
movieClip 808 __Packages.mochi.as2.MochiEventDispatcher {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEventDispatcher) {
var v1 = function () {
this.eventTable = {};
};
mochi.as2.MochiEventDispatcher = v1;
var v2 = v1.prototype;
v2.buildDelegate = function (thisObject, thatObject) {
var v2 = {'thisObject': thisObject, 'thatObject': thatObject};
if (thatObject != undefined) {
var funct = (typeof thatObject == 'string') ? thisObject[thatObject] : thatObject;
v2.delegate = function (args) {
funct.call(thisObject, args);
};
return v2;
}
v2.delegate = thisObject;
return v2;
};
v2.compareDelegate = function (d_A, d_B) {
if (d_A.thisObject != d_B.thisObject || d_A.thatObject != d_B.thatObject) {
return false;
}
return true;
};
v2.addEventListener = function (event, thisObject, thatObject) {
this.removeEventListener(event, thisObject, thatObject);
this.eventTable[event].push(this.buildDelegate(thisObject, thatObject));
};
v2.removeEventListener = function (event, thisObject, thatObject) {
var v3 = this.buildDelegate(thisObject, thatObject);
if (this.eventTable[event] == undefined) {
this.eventTable[event] = [];
return undefined;
}
for (var v4 in this.eventTable[event]) {
if (!this.compareDelegate(this.eventTable[event][v4], v3)) {
continue;
}
this.eventTable[event].splice(Number(v4), 1);
}
};
v2.triggerEvent = function (event, args) {
if (this.eventTable[event] == undefined) {
return undefined;
}
for (var v4 in this.eventTable[event]) {
this.eventTable[event][v4].delegate(args);
}
};
ASSetPropFlags(mochi.as2.MochiEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 809 __Packages.mochi.as2.MochiEvents {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEvents) {
var v1 = function () {};
mochi.as2.MochiEvents = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.startSession = function (achievementID) {
mochi.as2.MochiServices.send('events_beginSession', {'achievementID': achievementID}, null, null);
};
v1.setNotifications = function (clip, style) {
var v2 = {};
for (var v3 in style) {
v2[v3] = style[v3];
}
v2.clip = clip;
mochi.as2.MochiServices.send('events_setNotifications', v2, null, null);
};
v1.addEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.addEventListener(eventType, thisObject, thatObject);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiEvents._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.removeEventListener(eventType, thisObject, thatObject);
};
v1.startPlay = function (tag) {
if (tag == undefined) {
tag = 'gameplay';
}
mochi.as2.MochiServices.send('events_setRoundID', {'tag': String(tag)}, null, null);
};
v1.endPlay = function () {
mochi.as2.MochiServices.send('events_clearRoundID', null, null, null);
};
v1.trackEvent = function (tag, value) {
mochi.as2.MochiServices.send('events_trackEvent', {'tag': tag, 'value': value}, null, null);
};
v1.ACHIEVEMENT_RECEIVED = 'AchievementReceived';
v1.ALIGN_TOP_LEFT = 'ALIGN_TL';
v1.ALIGN_TOP = 'ALIGN_T';
v1.ALIGN_TOP_RIGHT = 'ALIGN_TR';
v1.ALIGN_LEFT = 'ALIGN_L';
v1.ALIGN_CENTER = 'ALIGN_C';
v1.ALIGN_RIGHT = 'ALIGN_R';
v1.ALIGN_BOTTOM_LEFT = 'ALIGN_BL';
v1.ALIGN_BOTTOM = 'ALIGN_B';
v1.ALIGN_BOTTOM_RIGHT = 'ALIGN_BR';
v1.FORMAT_SHORT = 'ShortForm';
v1.FORMAT_LONG = 'LongForm';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiEvents.prototype, null, 1);
}
#endinitclip
}
movieClip 810 __Packages.mochi.as2.MochiSocial {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSocial) {
var v1 = function () {};
mochi.as2.MochiSocial = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showLoginWidget = function (options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send('coins_showLoginWidget', {'options': options});
};
v1.hideLoginWidget = function () {
mochi.as2.MochiServices.send('coins_hideLoginWidget');
};
v1.requestLogin = function () {
mochi.as2.MochiServices.send('coins_requestLogin');
};
v1.getUserInfo = function () {
mochi.as2.MochiServices.send('coins_getUserInfo');
};
v1.saveUserProperties = function (properties) {
mochi.as2.MochiServices.send('coins_saveUserProperties', properties);
};
v1.addEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.addEventListener(eventType, delegate);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiSocial._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.removeEventListener(eventType, delegate);
};
v1.LOGGED_IN = 'LoggedIn';
v1.LOGGED_OUT = 'LoggedOut';
v1.LOGIN_SHOW = 'LoginShow';
v1.LOGIN_HIDE = 'LoginHide';
v1.LOGIN_SHOWN = 'LoginShown';
v1.PROFILE_SHOW = 'ProfileShow';
v1.PROFILE_HIDE = 'ProfileHide';
v1.PROPERTIES_SAVED = 'PropertySaved';
v1.WIDGET_LOADED = 'WidgetLoaded';
v1.USER_INFO = 'UserInfo';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.NO_USER = 'NoUser';
v1.PROPERTIES_SIZE = 'PropertiesSize';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiSocial.prototype, null, 1);
}
#endinitclip
}
movieClip 811 __Packages.mochi.as2.MochiScores {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiScores) {
var v1 = function () {};
mochi.as2.MochiScores = v1;
var v2 = v1.prototype;
v1.setBoardID = function (boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send('scores_setBoardID', {'boardID': boardID});
};
v1.showLeaderboard = function (options) {
options.clip = mochi.as2.MochiServices.clip;
if (options.clip != mochi.as2.MochiServices.__get__clip() || (mochi.as2.MochiServices.__get__childClip())._target == undefined) {
mochi.as2.MochiServices.disconnect();
trace('WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!');
trace('make sure MochiServices.connect is called as early in the application runtime as possible.');
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof options.name == 'object') {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else {
if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
}
var v1 = Number(options.score);
if (isNaN(v1)) {
trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is \'Not a Number\'');
} else {
if (v1 == Number.NEGATIVE_INFINITY || v1 == Number.POSITIVE_INFINITY) {
trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is an infinite');
} else {
if (Math.floor(v1) != v1) {
trace('WARNING: Submitted score \'' + options.score + '\' will be truncated');
}
options.score = v1;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
(mochi.as2.MochiServices.__get__clip()).stop();
}
if (options.onClose != null) {
mochi.as2.MochiScores.onClose = options.onClose;
} else {
mochi.as2.MochiScores.onClose = function () {
(mochi.as2.MochiServices.__get__clip()).play();
};
}
if (options.onError != null) {
mochi.as2.MochiScores.onError = options.onError;
} else {
mochi.as2.MochiScores.onError = mochi.as2.MochiScores.onClose;
}
if (options.boardID == null) {
if (mochi.as2.MochiScores.boardID != null) {
options.boardID = mochi.as2.MochiScores.boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace('[MochiScores] NOTE: Security Sandbox Violation errors below are normal');
mochi.as2.MochiServices.send('scores_showLeaderboard', {'options': options}, null, mochi.as2.MochiScores.doClose);
};
v1.closeLeaderboard = function () {
mochi.as2.MochiServices.send('scores_closeLeaderboard');
};
v1.getPlayerInfo = function (callbackObj, callbackMethod) {
mochi.as2.MochiServices.send('scores_getPlayerInfo', null, callbackObj, callbackMethod);
};
v1.submit = function (score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace('ERROR: Submitted score \'' + String(score) + '\' will be rejected, score is \'Not a Number\'');
} else {
if (score == Number.NEGATIVE_INFINITY || score == Number.POSITIVE_INFINITY) {
trace('ERROR: Submitted score \'' + String(score) + '\' will be rejected, score is an infinite');
} else {
if (Math.floor(score) != score) {
trace('WARNING: Submitted score \'' + String(score) + '\' will be truncated');
}
score = Number(score);
}
}
mochi.as2.MochiServices.send('scores_submit', {'score': score, 'name': name}, callbackObj, callbackMethod);
};
v1.requestList = function (callbackObj, callbackMethod) {
mochi.as2.MochiServices.send('scores_requestList', null, callbackObj, callbackMethod);
};
v1.scoresArrayToObjects = function (scores) {
var v5 = {};
var v1;
var v4;
var v2;
var v6;
for (var v8 in scores) {
if (typeof scores[v8] == 'object') {
if (scores[v8].cols != null && scores[v8].rows != null) {
v5[v8] = [];
v2 = scores[v8];
v4 = 0;
while (v4 < v2.rows.length) {
v6 = {};
v1 = 0;
while (v1 < v2.cols.length) {
v6[v2.cols[v1]] = v2.rows[v4][v1];
++v1;
}
v5[v8].push(v6);
++v4;
}
} else {
v5[v8] = {};
for (var v7 in scores[v8]) {
v5[v8][v7] = scores[v8][v7];
}
}
} else {
v5[v8] = scores[v8];
}
}
return v5;
};
v1.doClose = function (args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = 'IOError';
}
mochi.as2.MochiScores.onError.apply(null, [args.errorCode]);
} else {
mochi.as2.MochiScores.onClose.apply();
}
};
ASSetPropFlags(mochi.as2.MochiScores.prototype, null, 1);
}
#endinitclip
}
movieClip 812 __Packages.mochi.as2.MochiDigits {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiDigits) {
var v1 = function (digit, index) {
this.Encoder = 0;
this.setValue(digit, index);
};
mochi.as2.MochiDigits = v1;
var v2 = v1.prototype;
v2.__get__value = function () {
return Number(this.toString());
};
v2.__set__value = function (v) {
this.setValue(v);
return this.__get__value();
};
v2.addValue = function (v) {
this.value += v;
};
v2.setValue = function (digit, index) {
var v3 = digit.toString();
if (index == undefined || isNaN(index)) {
index = 0;
}
this.Fragment = v3.charCodeAt(index++) ^ this.Encoder;
if (index < v3.length) {
this.Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
this.Sibling = null;
}
this.reencode();
};
v2.reencode = function () {
var v2 = int(2147483647 * Math.random());
this.Fragment ^= v2 ^ this.Encoder;
this.Encoder = v2;
};
v2.toString = function () {
var v2 = String.fromCharCode(this.Fragment ^ this.Encoder);
return (this.Sibling != null) ? v2.concat(this.Sibling.toString()) : v2;
};
v2.addProperty('value', v2.__get__value, v2.__set__value);
ASSetPropFlags(mochi.as2.MochiDigits.prototype, null, 1);
}
#endinitclip
}
movieClip 813 __Packages.mx.transitions.OnEnterFrameBeacon {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.transitions) {
_global.mx.transitions = new Object();
}
if (!_global.mx.transitions.OnEnterFrameBeacon) {
var v1 = function () {};
mx.transitions.OnEnterFrameBeacon = v1;
var v2 = v1.prototype;
v1.init = function () {
var v4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(v4);
var v3 = _root.createEmptyMovieClip('__OnEnterFrameBeacon', 9876);
v3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage('onEnterFrame');
};
}
};
v1.version = '1.1.0.52';
ASSetPropFlags(mx.transitions.OnEnterFrameBeacon.prototype, null, 1);
}
#endinitclip
}
movieClip 814 __Packages.mx.transitions.BroadcasterMX {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.transitions) {
_global.mx.transitions = new Object();
}
if (!_global.mx.transitions.BroadcasterMX) {
var v1 = function () {};
mx.transitions.BroadcasterMX = v1;
var v2 = v1.prototype;
v1.initialize = function (o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
};
v2.addListener = function (o) {
this.removeListener(o);
if (this.broadcastMessage == undefined) {
this.broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return this._listeners.push(o);
};
v2.removeListener = function (o) {
var v2 = this._listeners;
var v3 = v2.length;
while (v3--) {
if (v2[v3] == o) {
v2.splice(v3, 1);
if (!v2.length) {
this.broadcastMessage = undefined;
}
return true;
}
}
return false;
};
v2.broadcastMessage = function () {
var v5 = String(arguments.shift());
var v4 = this._listeners.concat();
var v6 = v4.length;
var v3 = 0;
while (v3 < v6) {
v4[v3][v5].apply(v4[v3], arguments);
++v3;
}
};
v1.version = '1.1.0.52';
ASSetPropFlags(mx.transitions.BroadcasterMX.prototype, null, 1);
}
#endinitclip
}
movieClip 815 __Packages.mx.transitions.Tween {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.transitions) {
_global.mx.transitions = new Object();
}
if (!_global.mx.transitions.Tween) {
var v1 = function (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return undefined;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
this.__set__position(begin);
this.__set__duration(duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.__set__finish(finish);
this._listeners = [];
this.addListener(this);
this.start();
};
mx.transitions.Tween = v1;
var v2 = v1.prototype;
v2.__set__time = function (t) {
this.prevTime = this._time;
if (t > this.__get__duration()) {
if (this.looping) {
this.rewind(t - this._duration);
this.update();
this.broadcastMessage('onMotionLooped', this);
} else {
if (this.useSeconds) {
this._time = this._duration;
this.update();
}
this.stop();
this.broadcastMessage('onMotionFinished', this);
}
} else {
if (t < 0) {
this.rewind();
this.update();
} else {
this._time = t;
this.update();
}
}
return this.__get__time();
};
v2.__get__time = function () {
return this._time;
};
v2.__set__duration = function (d) {
this._duration = (d == null || d <= 0) ? _global.Infinity : d;
return this.__get__duration();
};
v2.__get__duration = function () {
return this._duration;
};
v2.__set__FPS = function (fps) {
var v2 = this.isPlaying;
this.stopEnterFrame();
this._fps = fps;
if (v2) {
this.startEnterFrame();
}
return this.__get__FPS();
};
v2.__get__FPS = function () {
return this._fps;
};
v2.__set__position = function (p) {
this.setPosition(p);
return this.__get__position();
};
v2.setPosition = function (p) {
this.prevPos = this._pos;
this._pos = p;
this.obj[this.prop] = this._pos;
this.broadcastMessage('onMotionChanged', this, this._pos);
updateAfterEvent();
};
v2.__get__position = function () {
return this.getPosition();
};
v2.getPosition = function (t) {
if (t == undefined) {
t = this._time;
}
return this.func(t, this.begin, this.change, this._duration);
};
v2.__set__finish = function (f) {
this.change = f - this.begin;
return this.__get__finish();
};
v2.__get__finish = function () {
return this.begin + this.change;
};
v2.continueTo = function (finish, duration) {
this.begin = this.position;
this.__set__finish(finish);
if (duration != undefined) {
this.__set__duration(duration);
}
this.start();
};
v2.yoyo = function () {
this.continueTo(this.begin, this.__get__time());
};
v2.startEnterFrame = function () {
if (this._fps == undefined) {
_global.MovieClip.addListener(this);
} else {
this._intervalID = setInterval(this, 'onEnterFrame', 1000 / this._fps);
}
this.isPlaying = true;
};
v2.stopEnterFrame = function () {
if (this._fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(this._intervalID);
}
this.isPlaying = false;
};
v2.start = function () {
this.rewind();
this.startEnterFrame();
this.broadcastMessage('onMotionStarted', this);
};
v2.stop = function () {
this.stopEnterFrame();
this.broadcastMessage('onMotionStopped', this);
};
v2.resume = function () {
this.fixTime();
this.startEnterFrame();
this.broadcastMessage('onMotionResumed', this);
};
v2.rewind = function (t) {
this._time = (t == undefined) ? 0 : t;
this.fixTime();
this.update();
};
v2.fforward = function () {
this.__set__time(this._duration);
this.fixTime();
};
v2.nextFrame = function () {
if (this.useSeconds) {
this.__set__time((getTimer() - this._startTime) / 1000);
} else {
this.__set__time(this._time + 1);
}
};
v2.onEnterFrame = function () {
this.nextFrame();
};
v2.prevFrame = function () {
if (!this.useSeconds) {
this.__set__time(this._time - 1);
}
};
v2.toString = function () {
return '[Tween]';
};
v2.fixTime = function () {
if (this.useSeconds) {
this._startTime = getTimer() - this._time * 1000;
}
};
v2.update = function () {
this.__set__position(this.getPosition(this._time));
};
v1.version = '1.1.0.52';
v1.__initBeacon = mx.transitions.OnEnterFrameBeacon.init();
v1.__initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
v2.func = function (t, b, c, d) {
return c * t / d + b;
};
v2.addProperty('FPS', v2.__get__FPS, v2.__set__FPS);
v2.addProperty('duration', v2.__get__duration, v2.__set__duration);
v2.addProperty('finish', v2.__get__finish, v2.__set__finish);
v2.addProperty('position', v2.__get__position, v2.__set__position);
v2.addProperty('time', v2.__get__time, v2.__set__time);
ASSetPropFlags(mx.transitions.Tween.prototype, null, 1);
}
#endinitclip
}
movieClip 816 __Packages.mx.transitions.easing.Bounce {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.transitions) {
_global.mx.transitions = new Object();
}
if (!_global.mx.transitions.easing) {
_global.mx.transitions.easing = new Object();
}
if (!_global.mx.transitions.easing.Bounce) {
var v1 = function () {};
mx.transitions.easing.Bounce = v1;
var v2 = v1.prototype;
v1.easeOut = function (t, b, c, d) {
t /= d;
if (t < 0.3636363636363637) {
return c * (7.5625 * t * t) + b;
} else {
if (t < 0.7272727272727273) {
t -= 0.5454545454545454;
return c * (7.5625 * t * t + 0.75) + b;
} else {
if (t < 0.9090909090909091) {
t -= 0.8181818181818182;
return c * (7.5625 * t * t + 0.9375) + b;
} else {
t -= 0.9545454545454546;
return c * (7.5625 * t * t + 0.984375) + b;
}
}
}
};
v1.easeIn = function (t, b, c, d) {
return c - mx.transitions.easing.Bounce.easeOut(d - t, 0, c, d) + b;
};
v1.easeInOut = function (t, b, c, d) {
if (t < d / 2) {
return mx.transitions.easing.Bounce.easeIn(t * 2, 0, c, d) * 0.5 + b;
} else {
return mx.transitions.easing.Bounce.easeOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
}
};
v1.version = '1.1.0.52';
ASSetPropFlags(mx.transitions.easing.Bounce.prototype, null, 1);
}
#endinitclip
}
movieClip 817 __Packages.mx.transitions.easing.Regular {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.transitions) {
_global.mx.transitions = new Object();
}
if (!_global.mx.transitions.easing) {
_global.mx.transitions.easing = new Object();
}
if (!_global.mx.transitions.easing.Regular) {
var v1 = function () {};
mx.transitions.easing.Regular = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
t /= d;
return c * t * t + b;
};
v1.easeOut = function (t, b, c, d) {
t /= d;
return -c * t * (t - 2) + b;
};
v1.easeInOut = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t + b;
}
return (-c / 2) * (--t * (t - 2) - 1) + b;
};
v1.version = '1.1.0.52';
ASSetPropFlags(mx.transitions.easing.Regular.prototype, null, 1);
}
#endinitclip
}
// unknown tag 88 length 143
movieClip 160 {
frame 1 {
stop();
}
}
movieClip 163 {
}
movieClip 165 {
}
movieClip 167 {
}
movieClip 168 {
}
movieClip 174 {
}
movieClip 176 {
}
movieClip 177 blackcarmc {
frame 1 {
stop();
}
frame 2 {
this.exiting = true;
}
frame 44 {
stop();
_root.vehicles.push('blackcar');
this.exiting = false;
removeMovieClip(this);
}
frame 381 {
_root.completeOrder(this.bay);
gotoAndPlay('exit');
}
frame 382 {
if (this.exiting) {
trace('YES');
gotoAndPlay('exit');
}
}
frame 428 {
gotoAndStop(1);
}
}
movieClip 179 {
}
movieClip 180 bluecarmc {
frame 1 {
stop();
}
frame 2 {
this.exiting = true;
}
frame 44 {
stop();
_root.vehicles.push('bluecar');
removeMovieClip(this);
}
frame 382 {
_root.completeOrder(this.bay);
gotoAndPlay('exit');
}
frame 383 {
if (this.exiting) {
gotoAndPlay('exit');
}
}
frame 429 {
gotoAndStop(1);
}
}
movieClip 182 {
}
movieClip 183 redcarmc {
frame 1 {
stop();
}
frame 2 {
this.exiting = true;
}
frame 44 {
stop();
_root.vehicles.push('redcar');
removeMovieClip(this);
}
frame 215 {
if (_root.tutorial) {
gotoAndPlay(377);
}
}
frame 382 {
_root.completeOrder(this.bay);
gotoAndPlay('exit');
}
frame 383 {
if (this.exiting) {
gotoAndPlay('exit');
}
}
frame 429 {
gotoAndStop(1);
}
}
movieClip 185 {
}
movieClip 186 greencarmc {
frame 1 {
stop();
}
frame 2 {
this.exiting = true;
}
frame 44 {
stop();
_root.vehicles.push('greencar');
removeMovieClip(this);
}
frame 381 {
_root.completeOrder(this.bay);
gotoAndPlay('exit');
}
frame 382 {
if (this.exiting) {
gotoAndPlay('exit');
}
}
frame 428 {
gotoAndStop(1);
}
}
movieClip 188 {
}
movieClip 189 orangecarmc {
frame 1 {
stop();
}
frame 2 {
this.exiting = true;
}
frame 44 {
stop();
_root.vehicles.push('orangecar');
removeMovieClip(this);
}
frame 382 {
_root.completeOrder(this.bay);
gotoAndPlay('exit');
}
frame 383 {
if (this.exiting) {
gotoAndPlay('exit');
}
}
frame 429 {
gotoAndStop(1);
}
}
movieClip 191 {
}
movieClip 192 purplecarmc {
frame 1 {
stop();
}
frame 2 {
this.exiting = true;
}
frame 44 {
stop();
_root.vehicles.push('purplecar');
removeMovieClip(this);
}
frame 382 {
_root.completeOrder(this.bay);
gotoAndPlay('exit');
}
frame 383 {
if (this.exiting) {
gotoAndPlay('exit');
}
}
frame 429 {
gotoAndStop(1);
}
}
movieClip 194 {
}
// unknown tag 88 length 147
button 201 {
on (release) {
if (!_root.tutorial) {
_parent.play();
}
}
}
movieClip 203 {
}
movieClip 207 {
frame 1 {
stop();
}
}
movieClip 209 {
}
movieClip 213 {
frame 1 {
stop();
}
}
movieClip 215 {
}
movieClip 219 {
frame 1 {
stop();
}
}
movieClip 221 {
}
movieClip 225 {
frame 1 {
stop();
}
}
movieClip 227 {
}
movieClip 231 {
frame 1 {
stop();
}
}
movieClip 239 {
}
movieClip 240 {
frame 1 {
item1.food = 'pizza';
item2.food = 'burger';
item3.food = 'shake';
item4.food = 'hotdog';
item5.food = 'chicken';
item1.canPress = true;
item2.canPress = true;
item3.canPress = true;
if (_root.hotdogUpgrade) {
item4.canPress = true;
item4._alpha = 100;
} else {
item5.canPress = false;
item4._alpha = 20;
}
if (_root.chickenUpgrade) {
item5.canPress = true;
item5._alpha = 100;
} else {
item5.canPress = false;
item5._alpha = 20;
}
var i = 1;
while (i < 6) {
this['item' + i].onRelease = function () {
if (this.canPress && !_root.ordering) {
if (_root[this.food + 'Stock'] !== _root.stockMax) {
if (!this.selected) {
this.gotoAndStop('selected');
this.selected = true;
} else {
this.gotoAndStop(1);
this.selected = false;
}
}
}
};
++i;
}
var i = 1;
while (i < 6) {
this['item' + i].onRollOver = function () {
if (this.canPress && !_root.ordering) {
if (!this.selected) {
this.gotoAndStop('hover');
}
}
};
++i;
}
var i = 1;
while (i < 6) {
this['item' + i].onDragOut = function () {
if (!this.selected) {
this.gotoAndStop(1);
}
};
this['item' + i].onRollOut = this['item' + i].onDragOut;
++i;
}
orderbtn.onRelease = function () {
if (!noneselected) {
var newStock = new Array();
var i = 1;
while (i < 6) {
if ((eval('item' + i)).selected) {
newStock.push((eval('item' + i)).food);
}
++i;
}
_root.orderStock(newStock);
_parent.play();
}
};
this.onEnterFrame = function () {
if (_root.ordering) {
prompt._visible = true;
orderbtn.enabled = false;
} else {
prompt._visible = false;
orderbtn.enabled = true;
}
if (_root.foodUpgrade == 0) {
if (!item1.selected && !item2.selected && !item3.selected) {
noneselected = true;
} else {
noneselected = false;
}
} else {
if (_root.foodUpgrade == 1) {
if (!item1.selected && !item2.selected && !item3.selected && !item4.selected) {
noneselected = true;
} else {
noneselected = false;
}
} else {
if (_root.foodUpgrade == 2) {
if (!item1.selected && !item2.selected && !item3.selected && !item4.selected && !item5.selected) {
noneselected = true;
} else {
noneselected = false;
}
}
}
}
};
}
}
movieClip 241 stockbox {
frame 8 {
stop();
}
frame 16 {
_root.orderbox.enabled = true;
removeMovieClip(this);
}
}
movieClip 243 {
}
movieClip 244 {
}
movieClip 245 {
}
movieClip 246 {
}
movieClip 247 {
}
movieClip 248 {
}
movieClip 249 {
}
movieClip 251 {
}
movieClip 253 {
}
movieClip 255 {
}
movieClip 266 {
}
movieClip 271 {
}
movieClip 273 {
}
movieClip 275 {
}
movieClip 279 {
}
movieClip 280 {
}
movieClip 285 {
}
movieClip 288 {
}
movieClip 289 {
}
movieClip 291 {
}
movieClip 292 {
}
movieClip 294 {
}
movieClip 296 {
}
movieClip 297 {
}
movieClip 299 {
}
movieClip 301 {
}
movieClip 302 {
}
movieClip 303 {
frame 1 {
stop();
s;
}
frame 2 {
stop();
s;
}
frame 3 {
stop();
}
}
movieClip 305 {
frame 1 {
stop();
}
frame 13 {
stop();
}
}
movieClip 312 {
}
movieClip 323 {
}
movieClip 325 {
}
movieClip 327 {
}
movieClip 328 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
movieClip 330 {
}
movieClip 333 {
}
movieClip 334 {
}
movieClip 335 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
movieClip 337 {
}
movieClip 338 {
}
movieClip 339 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
movieClip 341 {
}
movieClip 342 {
}
movieClip 343 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
movieClip 345 {
}
movieClip 348 {
}
movieClip 349 {
}
movieClip 350 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
movieClip 351 {
frame 1 {
this.onEnterFrame = function () {
if (_root.cookSpeedUpgrade) {
speedup.gotoAndStop(3);
}
if (_root.patienceUpgrade) {
patienceup.gotoAndStop(3);
}
if (_root.hotdogUpgrade) {
hotdogup.gotoAndStop(3);
}
if (_root.chickenUpgrade) {
chickenup.gotoAndStop(3);
}
if (_root.stockUpgrade) {
stockup.gotoAndStop(3);
}
};
}
frame 13 {
stop();
}
}
button 352 {
on (release) {
continuebtn.enabled = false;
quitting = false;
this.play();
}
}
button 353 {
on (release) {
quitbtn.enabled = false;
quitting = true;
play();
}
}
button 355 {
on (rollOver) {
if (!prompting) {
upgrades.speedup.gotoAndStop(2);
description = 'Train up your chef and he\'ll cook your orders twice as fast!';
cost = 400;
}
}
on (rollOut, dragOut) {
upgrades.speedup.gotoAndStop(1);
description = '';
cost = '';
}
on (release) {
if (_root.money < cost) {
prompt.gotoAndStop(2);
} else {
buyUpgrade('speedup');
}
}
}
button 356 {
on (rollOver) {
if (!prompting) {
this.upgrades.patienceup.gotoAndStop(2);
description = 'Equip your diner with the latest tunes and make your customers more patient!';
cost = 500;
}
}
on (rollOut, dragOut) {
upgrades.patienceup.gotoAndStop(1);
description = '';
cost = '';
}
on (release) {
if (_root.money < cost) {
prompt.gotoAndStop(2);
} else {
buyUpgrade('patienceup');
}
}
}
button 357 {
on (rollOver) {
if (!prompting) {
this.upgrades.hotdogup.gotoAndStop(2);
description = 'Serve declicious hot dogs! Probably made with real meat!';
cost = 600;
}
}
on (rollOut, dragOut) {
upgrades.hotdogup.gotoAndStop(1);
description = '';
cost = '';
}
on (release) {
if (_root.money < cost) {
prompt.gotoAndStop(2);
} else {
buyUpgrade('hotdogup');
}
}
}
button 358 {
on (rollOver) {
if (!prompting) {
this.upgrades.chickenup.gotoAndStop(2);
description = 'Churn out fresh fried chicken! Sometimes fresh anyway..';
cost = 600;
}
}
on (rollOut, dragOut) {
upgrades.chickenup.gotoAndStop(1);
description = '';
cost = '';
}
on (release) {
if (_root.money < cost) {
prompt.gotoAndStop(2);
} else {
buyUpgrade('chickenup');
}
}
}
button 359 {
on (rollOver) {
if (!prompting) {
this.upgrades.stockup.gotoAndStop(2);
description = 'Stop worrying about ordering stock and upgrade your fridge to store more!';
cost = 500;
}
}
on (rollOut, dragOut) {
upgrades.stockup.gotoAndStop(1);
description = '';
cost = '';
}
on (release) {
if (_root.money < cost) {
prompt.gotoAndStop(2);
} else {
buyUpgrade('stockup');
}
}
}
button 365 {
on (release) {
gotoAndStop(1);
}
}
movieClip 367 {
frame 1 {
stop();
_parent.noStock = false;
_parent.prompting = false;
}
frame 2 {
stop();
_parent.prompting = true;
}
}
button 369 {
on (release) {
play();
}
}
movieClip 374 summary {
frame 16 {
_root.showMenuAutomatically = false;
_root.girl._x = _root.window._x;
_root.girl._y = _root.window._y;
_root.girl.gotoAndStop('still');
_root.girl.currentLoc = 'diner';
_root.walkLoc = undefined;
_root.girl.walkDirection = undefined;
}
frame 49 {
function coins() {
coinframe.onEnterFrame = function () {
if (earnRoll < _root.earned) {
earnRoll += 5;
_root.earnRoll -= 5;
_root.clink.start(0, 0);
} else {
if (_root.customersLost !== 0) {
lostInt = setInterval(lost, 1000);
} else {
if (_root.bonuses !== 0) {
bonusInt = setInterval(bonus, 1000);
} else {
removeMovieClip(coinframe);
removeMovieClip(lostframe);
removeMovieClip(bonusframe);
play();
}
}
delete this.onEnterFrame;
}
};
}
function lost() {
clearInterval(lostInt);
lostframe.onEnterFrame = function () {
if (lostRoll < _root.customersLost) {
++lostRoll;
_root.clink.start(0, 0);
} else {
if (_root.bonuses !== 0) {
bonusInt = setInterval(bonus, 1000);
} else {
medal();
removeMovieClip(coinframe);
removeMovieClip(lostframe);
removeMovieClip(bonusframe);
}
delete this.onEnterFrame;
}
};
}
function bonus() {
clearInterval(bonusInt);
bonusframe.onEnterFrame = function () {
if (bonusRoll < _root.bonuses) {
++bonusRoll;
_root.clink.start(0, 0);
} else {
removeMovieClip(coinframe);
removeMovieClip(lostframe);
removeMovieClip(bonusframe);
medal();
delete this.onEnterFrame;
}
};
}
function medal() {
if (_root.customersLost >= 2) {
medalGet = 'bronze';
} else {
if (_root.customersLost == 1) {
medalGet = 'silver';
} else {
if (_root.bonuses == _root.customersThisLevel) {
medalGet = 'gold';
++_root.goldMedals;
} else {
var v4 = _root.daysTarget + 85;
var v3 = _root.daysTarget + 250;
if (_root.earned < v4) {
medalGet = 'bronze';
} else {
if (_root.earned >= v4 && _root.earned < v3) {
medalGet = 'silver';
++_root.silverMedals;
} else {
if (_root.earned >= v3) {
medalGet = 'gold';
++_root.goldMedals;
}
}
}
}
}
}
medalclip.medal.onEnterFrame = function () {
this.gotoAndStop(medalGet);
};
medalclip.play();
play();
}
stop();
var earnRoll = 0;
var lostRoll = 0;
var bonusRoll = 0;
this.createEmptyMovieClip('coinframe', 10000);
this.createEmptyMovieClip('lostframe', 10001);
this.createEmptyMovieClip('bonusframe', 10002);
coins();
}
frame 55 {
stop();
continuebtn.onRelease = function () {
delete medalclip.medal.onEnterFrame;
this.enabled = false;
play();
};
}
frame 91 {
function buyUpgrade(upgrade) {
switch (upgrade) {
case 'speedup':
_root.cookSpeed = 200;
_root.cookSpeedUpgrade = true;
btn1.enabled = false;
_root.saveData.data.cookSpeedUpgrade = true;
_root.saveData.flush();
break;
case 'patienceup':
_root.patienceRate = 1400;
_root.patienceUpgrade = true;
_root.loudspeakers._visible = true;
btn2.enabled = false;
_root.saveData.data.patienceUpgrade = true;
_root.saveData.flush();
break;
case 'hotdogup':
_root.hotdogUpgrade = true;
if (_root.stockUpgrade) {
_root.hotdogStock = 15;
} else {
_root.hotdogStock = 6;
}
_root.foodUpgrade = 1;
_root.foods.push('hotdog');
btn3.enabled = false;
_root.saveData.data.hotdogUpgrade = true;
_root.saveData.flush();
break;
case 'chickenup':
_root.chickenUpgrade = true;
if (_root.stockUpgrade) {
_root.chickenStock = 15;
} else {
_root.chickenStock = 6;
}
_root.foodUpgrade = 2;
_root.foods.push('chicken');
btn4.enabled = false;
_root.saveData.data.chickenUpgrade = true;
_root.saveData.flush();
break;
case 'stockup':
_root.stockMax = 15;
_root.stockUpgrade = true;
btn5.enabled = false;
}
_root.kerching.start();
_root.money -= cost;
_root.moneyRoll = _root.money;
play();
}
stop();
if (_root.cookSpeedUpgrade) {
btn1.enabled = false;
}
if (_root.patienceUpgrade) {
btn2.enabled = false;
}
if (_root.hotdogUpgrade) {
btn3.enabled = false;
}
if (_root.chickenUpgrade) {
btn4.enabled = false;
}
if (_root.stockUpgrade) {
btn5.enabled = false;
}
_root.nextLevel();
}
frame 92 {
_root.fadeMusic(_root.summaryloop);
}
frame 129 {
if (!quitting) {
_root.brief.play();
} else {
_root.removeTabsMenu();
_root.transition('scorescreen');
}
removeMovieClip(this);
stop();
}
}
movieClip 376 {
}
movieClip 378 levelclear {
frame 69 {
stop();
_root.endLevel();
removeMovieClip(this);
}
}
movieClip 380 {
}
movieClip 386 {
}
// unknown tag 88 length 147
button 391 {
on (release) {
if (_root.money !== 0) {
_root.submitScore();
}
}
}
button 394 {
on (release) {
_root.backToMenu();
}
}
movieClip 395 {
}
movieClip 396 levelfailed {
frame 64 {
_root.saveProgess();
}
frame 116 {
stop();
}
}
movieClip 398 {
}
movieClip 399 {
}
movieClip 402 {
}
movieClip 404 {
}
movieClip 405 {
}
movieClip 407 {
}
movieClip 408 choose {
frame 5 {
stop();
}
frame 13 {
stop();
if (_root.tutorial) {
_root.tute.nextFrame();
}
}
frame 20 {
removeMovieClip(this);
}
}
movieClip 411 {
}
movieClip 413 speedbonus {
frame 20 {
removeMovieClip(this);
}
}
movieClip 415 {
}
movieClip 416 {
}
movieClip 417 perfectmc {
frame 20 {
removeMovieClip(this);
}
}
movieClip 419 {
}
movieClip 421 tabsmenu {
}
movieClip 423 {
}
movieClip 424 {
frame 1 {
stop();
}
}
movieClip 426 {
}
movieClip 428 {
}
movieClip 430 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 431 orderbubble {
frame 1 {
_root.correctOrder = true;
var num = 0;
var count = 1;
}
frame 1 {
stop();
}
frame 2 {
icons.gotoAndStop(_root.displayingOrder[num]);
if (_root.checkThisItem(_root.displayingOrder[num])) {
correct = true;
} else {
correct = false;
}
}
instance icons of movieClip 424 {
onClipEvent (load) {
this.gotoAndStop(_root.customers.dispOrder);
}
}
instance checkSymbol of movieClip 430 {
onClipEvent (load) {
if (correct) {
this.gotoAndStop('tick');
} else {
this.gotoAndStop('cross');
}
}
}
frame 16 {
if (correct) {
_root.correctSound.start();
} else {
_root.wrongSound.start();
_root.correctOrder = false;
}
}
instance checkSymbol of movieClip 430 {
onClipEvent (load) {
if (_parent.correct) {
this.gotoAndStop('tick');
} else {
this.gotoAndStop('cross');
}
}
}
frame 39 {
if (count == _root.displayingOrder.length) {
stop();
_root.finishedCheckingOrder();
} else {
++num;
++count;
gotoAndPlay(2);
}
}
}
movieClip 433 {
}
button 435 {
on (release) {
_root.hideChefMenu();
xbtn.enabled = false;
}
}
movieClip 438 {
}
movieClip 440 {
}
movieClip 445 {
}
movieClip 447 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 11 {
stop();
}
}
movieClip 451 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 11 {
stop();
}
}
movieClip 456 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 11 {
stop();
}
}
movieClip 458 {
}
movieClip 460 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 462 {
}
movieClip 465 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
movieClip 469 {
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 12 {
stop();
}
}
movieClip 473 {
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 11 {
stop();
}
}
movieClip 475 {
}
movieClip 477 {
}
movieClip 479 {
}
movieClip 480 {
}
movieClip 481 {
}
movieClip 484 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 496 {
}
movieClip 498 {
}
movieClip 500 {
}
movieClip 502 {
}
movieClip 504 {
}
movieClip 506 {
}
movieClip 509 {
}
movieClip 512 {
}
button 514 {
on (release) {
gotoAndStop(1);
}
}
button 520 {
on (release) {
gotoAndStop(1);
_parent.deleteItem(_parent.itemToDelete);
}
}
button 524 {
on (release) {
gotoAndStop(1);
}
}
movieClip 525 {
frame 1 {
stop();
_parent.noStock = false;
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
movieClip 526 chefMenu {
frame 1 {
function rollover(mc) {
if (!_root.cooking) {
if (!mc.outofstock) {
if (!mc.selected) {
mc.gotoAndStop('over');
}
}
}
}
function rollout(mc) {
if (!mc.outofstock) {
if (!mc.selected) {
mc.gotoAndStop(1);
}
}
}
function select(mc, num) {
if (!mc.outofstock) {
if (!mc.selected) {
if (totalQuantity !== 3) {
mc.gotoAndStop('selected');
mc.selected = true;
this['quantitem' + num] = 1;
}
} else {
mc.gotoAndStop('normal');
mc.selected = false;
}
}
}
function plusQuantity(item) {
if (totalQuantity !== 3) {
if (this['quantitem' + item] !== 5 && (eval('item' + item)).selected) {
++this['quantitem' + item];
}
}
}
function minusQuantity(item) {
if (this['quantitem' + item] !== 1 && (eval('item' + item)).selected) {
--this['quantitem' + item];
}
}
function deleteItem(item) {
(eval('ord' + item + 'item' + 1)).gotoAndStop(1);
(eval('ord' + item + 'item' + 2)).gotoAndStop(1);
(eval('ord' + item + 'item' + 3)).gotoAndStop(1);
this['bin' + item]._visible = false;
this['bin' + item]._visible = false;
this['orderbag' + item].enabled = false;
this['orderbag' + item]._visible = false;
_root['baggedOrder' + item] = [];
_root['bag' + item]._visible = false;
itemToDelete = undefined;
}
function orders() {
if (_root.baggedOrder1[0] == undefined && _root.baggedOrder2[0] == undefined && _root.baggedOrder[0] == undefined) {
noready._visible = true;
noorders = true;
} else {
noready._visible = false;
noorders = false;
}
if (_root.baggedOrder1[0] !== undefined) {
ord1item1.gotoAndStop(_root.baggedOrder1[0]);
orderbag1._visible = true;
bin1._visible = true;
bin1.enabled = true;
} else {
orderbag1._visible = false;
bin1._visible = false;
bin1.enabled = false;
}
if (_root.baggedOrder1[1] !== undefined) {
ord1item2.gotoAndStop(_root.baggedOrder1[1]);
}
if (_root.baggedOrder1[2] !== undefined) {
ord1item3.gotoAndStop(_root.baggedOrder1[2]);
}
if (_root.baggedOrder2[0] !== undefined) {
ord2item1.gotoAndStop(_root.baggedOrder2[0]);
orderbag2._visible = true;
bin2._visible = true;
bin2.enabled = true;
} else {
orderbag2._visible = false;
bin2._visible = false;
bin3.enabled = false;
}
if (_root.baggedOrder2[1] !== undefined) {
ord2item2.gotoAndStop(_root.baggedOrder2[1]);
}
if (_root.baggedOrder2[2] !== undefined) {
ord2item3.gotoAndStop(_root.baggedOrder2[2]);
}
if (_root.baggedOrder3[0] !== undefined) {
ord3item1.gotoAndStop(_root.baggedOrder3[0]);
orderbag3._visible = true;
bin3._visible = true;
bin3.enabled = true;
} else {
orderbag3._visible = false;
bin3._visible = false;
bin3.enabled = false;
}
if (_root.baggedOrder3[1] !== undefined) {
ord3item2.gotoAndStop(_root.baggedOrder3[1]);
}
if (_root.baggedOrder3[2] !== undefined) {
ord3item3.gotoAndStop(_root.baggedOrder3[2]);
}
if (_root.cooking) {
busy._visible = true;
cookbtn.enabled = false;
} else {
busy._visible = false;
cookbtn.enabled = true;
}
}
stop();
if (!_root.hotdogUpgrade) {
item4._visible = false;
quant4._visible = false;
padlock4._visible = true;
} else {
item4._visible = true;
quant4._visible = true;
padlock4._visible = false;
}
if (!_root.chickenUpgrade) {
item5._visible = false;
quant5._visible = false;
padlock5._visible = true;
} else {
item5._visible = true;
quant5._visible = true;
padlock5._visible = false;
}
if (_root.hotdogStock !== 0) {
item4.gotoAndStop(2);
} else {
item4.gotoAndStop('outofstock');
item4.enabled = false;
}
if (_root.chickenStock !== 0) {
item5.gotoAndStop(2);
} else {
item5.gotoAndStop('outofstock');
item5.enabled = false;
}
_root.showingMenu = true;
var totalQuantity = 0;
busy._visible = false;
collectOrders._visible = false;
var i = 1;
while (i < 6) {
this['quant' + i]._alpha = 20;
++i;
}
quantitem1 = 0;
quantitem2 = 0;
quantitem3 = 0;
quantitem4 = 0;
quantitem5 = 0;
item1.food = 'pizza';
item2.food = 'burger';
item3.food = 'shake';
item4.food = 'hotdog';
item5.food = 'chicken';
item1.onRollOver = function () {
rollover(this);
};
item2.onRollOver = function () {
rollover(this);
};
item3.onRollOver = function () {
rollover(this);
};
item4.onRollOver = function () {
if (_root.hotdogUpgrade && !_root.cooking) {
if (!this.selected) {
this.gotoAndStop('over');
}
}
};
item5.onRollOver = function () {
if (_root.chickenUpgrade && !_root.cooking) {
if (!this.selected) {
this.gotoAndStop('over');
}
}
};
item1.onRelease = function () {
if (!_root.cooking) {
select(this, 1);
}
};
item2.onRelease = function () {
if (!_root.cooking) {
select(this, 2);
}
};
item3.onRelease = function () {
if (!_root.cooking) {
select(this, 3);
}
};
item4.onRelease = function () {
if (_root.hotdogUpgrade) {
if (!_root.cooking) {
select(this, 4);
}
}
};
item5.onRelease = function () {
if (_root.chickenUpgrade) {
if (!_root.cooking) {
select(this, 5);
}
}
};
item1.onDragOut = function () {
rollout(this);
};
item1.onRollOut = item1.onDragOut;
item2.onDragOut = function () {
rollout(this);
};
item2.onRollOut = item2.onDragOut;
item3.onDragOut = function () {
rollout(this);
};
item3.onRollOut = item3.onDragOut;
item4.onDragOut = function () {
if (_root.hotdogUpgrade) {
if (!this.outofstock) {
if (!this.selected) {
this.gotoAndStop(2);
}
}
}
};
item4.onRollOut = item4.onDragOut;
item5.onDragOut = function () {
if (_root.chickenUpgrade) {
if (!this.outofstock) {
if (!this.selected) {
this.gotoAndStop(2);
}
}
}
};
item5.onRollOut = item5.onDragOut;
quant1.plusitem1.onRelease = function () {
plusQuantity(1);
};
quant2.plusitem2.onRelease = function () {
plusQuantity(2);
};
quant3.plusitem3.onRelease = function () {
plusQuantity(3);
};
quant4.plusitem4.onRelease = function () {
plusQuantity(4);
};
quant5.plusitem5.onRelease = function () {
plusQuantity(5);
};
quant1.minusitem1.onRelease = function () {
minusQuantity(1);
};
quant2.minusitem2.onRelease = function () {
minusQuantity(2);
};
quant3.minusitem3.onRelease = function () {
minusQuantity(3);
};
quant4.minusitem4.onRelease = function () {
minusQuantity(4);
};
quant5.minusitem5.onRelease = function () {
minusQuantity(5);
};
cookbtn.onRollOver = function () {
this.gotoAndStop('over');
};
cookbtn.onDragOut = function () {
this.gotoAndStop(1);
};
cookbtn.onRollOut = cookbtn.onDragOut;
cookbtn.onPress = function () {
this.gotoAndStop('down');
};
var i = 1;
while (i < 4) {
this['orderbag' + i].onRollOver = function () {
this.gotoAndStop(2);
};
this['orderbag' + i].onDragOut = function () {
this.gotoAndStop(1);
};
this['orderbag' + i].onRollOut = this['orderbag' + i].onDragOut;
++i;
}
bin1.onRelease = function () {
itemToDelete = 1;
stockprompt.gotoAndStop(3);
};
bin2.onRelease = function () {
itemToDelete = 2;
stockprompt.gotoAndStop(3);
};
bin3.onRelease = function () {
itemToDelete = 3;
stockprompt.gotoAndStop(3);
};
orderbag1.onRelease = function () {
if (_root.baggedOrder1[0] !== undefined && _root.girlIsCarrying.length == 0) {
_root.takeBag(1);
this.enabled = false;
this._visible = false;
ord1item1.gotoAndStop(1);
ord1item2.gotoAndStop(1);
ord1item3.gotoAndStop(1);
bin1.enabled = false;
bin1._visible = false;
if (_root.cooking || _root.tutorial) {
_root.hideChefMenu();
}
}
};
orderbag2.onRelease = function () {
if (_root.baggedOrder2[0] !== undefined && _root.girlIsCarrying.length == 0) {
_root.takeBag(2);
this.enabled = false;
this._visible = false;
ord2item1.gotoAndStop(1);
ord2item2.gotoAndStop(1);
ord2item3.gotoAndStop(1);
bin2.enabled = false;
bin2._visible = false;
if (_root.cooking) {
_root.hideChefMenu();
}
}
};
orderbag3.onRelease = function () {
if (_root.baggedOrder3[0] !== undefined && _root.girlIsCarrying.length == 0) {
_root.takeBag(3);
this.enabled = false;
this._visible = false;
ord3item1.gotoAndStop(1);
ord3item2.gotoAndStop(1);
ord3item3.gotoAndStop(1);
bin3.enabled = false;
bin3._visible = false;
if (_root.cooking) {
_root.hideChefMenu();
}
}
};
cookbtn.onRelease = function () {
noStock = false;
if (!_root.cooking) {
if (!noneselected) {
var foodArr = new Array();
var i = 1;
while (i < 6) {
if ((eval('item' + i)).selected) {
var food = (eval('item' + i)).food;
if (Number(_root[food + 'Stock']) < Number(eval('quantitem' + i))) {
noStock = true;
stockprompt.nextFrame();
} else {
if (eval('quantitem' + i) !== 1) {
var quantity = eval('quantitem' + i);
while (quantity > 0) {
foodArr.push((eval('item' + i)).food);
--quantity;
}
} else {
foodArr.push((eval('item' + i)).food);
}
}
}
++i;
}
if (!noStock) {
var freeBag;
if (_root.baggedOrder1[0] == undefined) {
freeBag = 1;
} else {
if (_root.baggedOrder2[0] == undefined) {
freeBag = 2;
} else {
if (_root.baggedOrder3[0] == undefined) {
freeBag = 3;
}
}
}
_root.cook(foodArr, freeBag);
delete foodArr;
orders();
}
}
}
if (noorders) {
if (!noStock) {
_root.hideChefMenu();
}
}
};
orders();
this.onEnterFrame = function () {
var j = 1;
while (j < 6) {
var food = (eval('item' + j)).food;
if (_root[food + 'Stock'] == 0) {
(eval('item' + j)).gotoAndStop('outofstock');
(eval('item' + j)).outofstock = true;
}
++j;
}
var i = 1;
while (i < 6) {
if ((eval('item' + i)).selected) {
(eval('quant' + i))._alpha = 100;
} else {
(eval('quant' + i))._alpha = 20;
this['quantitem' + i] = 0;
}
++i;
}
if (_root.baggedOrder1[0] !== undefined && _root.baggedOrder2[0] !== undefined && _root.baggedOrder3[0] !== undefined) {
noSpaceForOrders = true;
collectOrders._visible = true;
item1.enabled = false;
item2.enabled = false;
item3.enabled = false;
item4.enabled = false;
item5.enabled = false;
cookbtn.enabled = false;
} else {
noSpaceForOrders = false;
collectOrders._visible = false;
item1.enabled = true;
item2.enabled = true;
item3.enabled = true;
item4.enabled = true;
item5.enabled = true;
}
if (!_root.cooking && !noSpaceForOrders) {
if (_root.foodUpgrade == 0) {
if (!item1.selected && !item2.selected && !item3.selected) {
noneselected = true;
cookbtn.enabled = false;
} else {
noneselected = false;
cookbtn.enabled = true;
}
} else {
if (_root.foodUpgrade == 1) {
if (!item1.selected && !item2.selected && !item3.selected && !item4.selected) {
noneselected = true;
cookbtn.enabled = false;
} else {
noneselected = false;
cookbtn.enabled = true;
}
} else {
if (_root.foodUpgrade == 2) {
if (!item1.selected && !item2.selected && !item3.selected && !item4.selected && !item5.selected) {
noneselected = true;
cookbtn.enabled = false;
} else {
noneselected = false;
cookbtn.enabled = true;
}
}
}
}
}
totalQuantity = quantitem1 + quantitem2 + quantitem3 + quantitem4 + quantitem5;
if (_root.tutorial || _root.girlIsCarrying[0] == undefined) {
binmc.gotoAndStop(2);
} else {
binmc.gotoAndStop(1);
}
};
binmc.bingirl.onPress = function () {
binmc.nextFrame();
_root.girlIsCarrying = [];
_root.girl.gotoAndStop('stillUp');
};
}
}
movieClip 529 {
frame 49 {
stop();
}
}
movieClip 530 {
}
movieClip 532 {
}
movieClip 534 {
}
movieClip 535 chefspeech {
frame 100 {
stop();
_root.tute.nextFrame();
removeMovieClip(this);
}
}
movieClip 537 {
}
movieClip 539 {
}
movieClip 541 {
}
movieClip 543 {
frame 49 {
stop();
}
}
movieClip 545 {
}
movieClip 547 {
}
movieClip 548 {
}
movieClip 550 {
}
movieClip 551 suziespeech {
frame 100 {
stop();
removeMovieClip(this);
}
}
movieClip 555 {
}
button 576 {
on (release) {
gotoAndStop(15);
_root.tuteWalk();
}
}
button 580 {
on (release) {
gotoAndStop(170);
}
}
button 581 {
on (release) {
nextFrame();
}
}
movieClip 585 tute {
frame 1 {
okbtn.onRelease = function () {
nextFrame();
};
}
frame 2 {
function doText(toType) {
function type() {
textbox.text += typeArr[typeCount];
++typeCount;
if (typeCount >= typeArr.length) {
delete _root.onEnterFrame;
}
}
suzie.mouth.play();
textbox.text = '';
var typeArr = toType.split('');
var typeCount = 0;
_root.onEnterFrame = function () {
type();
};
}
suzie.mouth.stop();
var pop1 = new Sound();
pop1.attachSound('pop');
var tuteArr = new Array();
tuteArr[0] = 'Hi! I\'m suzie and this is my diner! You\'re just in time for me to show you how we do things around here..';
tuteArr[1] = 'I\'ve got big plans for this place, but need your help to put them into action..';
tuteArr[2] = 'This is our first customer of the day. Wait until they\'ve decided what they\'d like to eat.';
tuteArr[3] = 'Now, click on the customer to walk over and take their order.';
tuteArr[4] = 'Good job! Their order has been written down on the tab at the bottom of the screen. Mouse over it to see.';
tuteArr[5] = 'Click on the diner to give the order to the chef.';
tuteArr[6] = 'Click the items you want chef to cook. You can click the plus & minus buttons to cook more than one of each. When you\'re done, click \'Cook!\'.';
tuteArr[7] = 'Well done! Chef will let us know when our food is ready.';
tuteArr[8] = 'It\'s done! Click on the diner again..';
tuteArr[9] = 'On the right are the orders that are ready to take. The icons show the contents of each bag. Click on the bag to pick it up!';
tuteArr[10] = 'Now we can click on the customer again to take it to them.';
tuteArr[11] = 'Perfect! Well done. We can serve other customers if we need to while they eat.';
tuteArr[12] = 'Oops, that wasn\'t right! Do you want to try that again?';
tuteArr[13] = 'Excellent, a happy customer! Click on the coins to collect them.';
tuteArr[14] = 'Nice work! Looks like you\'ve got the hang of it!';
tuteArr[15] = 'Your stock is reduced everytime chef cooks a meal, so you\'ll need to keep an eye on it! Click the brown box in the top right hand corner..';
tuteArr[16] = 'From here, you can order more stock and see how much you have left. Simply click as many items as you need to order, then click \'Order!\'. Try it!';
tuteArr[17] = 'Good job! A delivery will be along shortly!';
tuteArr[18] = 'For now, we only have enough room for 6 of each item, but I hope to sort that out later on!';
tuteArr[19] = 'Here comes the delivery truck now, our fridge is nice and full again!';
tuteArr[20] = 'If we reach our daily target, we can use some of the money we made to upgrade the diner and attract more customers!';
tuteArr[21] = 'The more money we make, the longer I can keep this place going and it\'s all thanks to you!';
tuteArr[22] = 'Well, that about wraps it up for now, time to start making money! Good luck, and have fun!';
}
frame 14 {
stop();
skipbtn.onRelease = function () {
_root.fadeTute('out');
_root.tuteDone = true;
_root.fadeMusic(_root.tuteloop);
};
okbtn.onRelease = function () {
nextFrame();
};
doText(tuteArr[0]);
}
frame 15 {
doText(tuteArr[2]);
_root.spawnVehicle();
}
frame 16 {
doText(tuteArr[3]);
_root.canMove = true;
}
frame 17 {
doText(tuteArr[4]);
this.tab = true;
}
frame 18 {
doText(tuteArr[5]);
_root.dinerClick.enabled = true;
this.tab = false;
this.blank = true;
}
frame 19 {
this.blank = false;
_root.fadeTute('out');
}
frame 20 {
doText(tuteArr[6]);
_root.fadeTute('in');
}
frame 21 {
doText(tuteArr[7]);
_root.canMove = false;
_root.dinerClick.enabled = false;
play();
}
frame 162 {
stop();
_root.fadeTute('out');
}
frame 163 {
doText(tuteArr[8]);
_root.fadeTute('in');
_root.dinerClick.enabled = true;
_root.canMove = true;
}
frame 164 {
doText(tuteArr[9]);
}
frame 165 {
doText(tuteArr[10]);
}
frame 166 {
doText(tuteArr[11]);
_root.canMove = false;
_root.dinerClick.enabled = false;
}
frame 167 {
doText(tuteArr[12]);
}
frame 168 {
doText(tuteArr[13]);
_root.canMove = true;
}
frame 169 {
doText(tuteArr[14]);
_root.canMove = false;
}
frame 170 {
doText(tuteArr[15]);
_root.orderbox.enabled = true;
}
frame 171 {
doText(tuteArr[16]);
}
frame 172 {
doText(tuteArr[17]);
_root.orderbox.enabled = false;
}
frame 173 {
doText(tuteArr[18]);
}
frame 174 {
doText(tuteArr[19]);
}
frame 175 {
doText(tuteArr[20]);
}
frame 176 {
okbtn.onRelease = function () {
_root.fadeTute('out');
_root.tuteDone = true;
_root.fadeMusic(_root.tuteloop);
};
}
frame 176 {
doText(tuteArr[22]);
}
}
button 591 {
on (release) {
_root.unpause();
}
}
movieClip 593 {
}
movieClip 595 {
}
movieClip 597 {
}
movieClip 599 {
}
movieClip 601 {
}
movieClip 602 {
}
movieClip 603 {
}
movieClip 604 pausescreen {
}
movieClip 605 {
frame 1 {
stop();
}
}
frame 3 {
function go() {
transition('menu');
}
stop();
}
movieClip 607 {
}
movieClip 609 {
}
movieClip 612 {
}
movieClip 614 {
}
movieClip 616 {
}
movieClip 618 {
}
movieClip 620 {
}
movieClip 622 {
}
movieClip 624 {
}
movieClip 625 {
frame 1 {
invis._visible = 0;
}
frame 68 {
stop();
_root.go();
}
}
movieClip 626 {
}
frame 4 {
function getData() {
if (saveData.data.levelNum == undefined) {
savePresent = false;
return savePresent;
}
savePresent = true;
return savePresent;
}
function startGame() {
if (getData()) {
newgameprompt.nextFrame();
} else {
newGame();
}
}
function showScores() {
var v2 = {'n': [0, 8, 0, 10, 0, 4, 11, 7, 6, 9, 14, 10, 3, 1, 9, 9], 'f': function (i, s) {
if (s.length == 16) {
return s;
}
return this.f(i + 1, s + this.n[i].toString(16));
}};
var v3 = v2.f(0, '');
mochi.as2.MochiScores.showLeaderboard({'boardID': v3});
}
function newGame() {
tutorial = true;
saveData.clear();
btns.play();
fadeMusic(menutheme);
}
stop();
var saveData = SharedObject.getLocal('bigcitydiner');
_root.createEmptyMovieClip('fadesound', 20002);
_root.createEmptyMovieClip('menuclip', _root.getNextHighestDepth());
var menutheme = new Sound(menuclip);
menutheme.attachSound('sparklers');
var tutorial = false;
if (firstPlay) {
menutheme.start(0, 99);
firstPlay = false;
}
tutorial = false;
}
movieClip 627 {
}
movieClip 628 {
}
button 630 {
on (release) {
getURL('http://www.smooshie.co.uk', '_blank');
}
}
// unknown tag 88 length 108
movieClip 634 {
}
movieClip 635 {
}
movieClip 636 {
frame 1 {
stop();
}
frame 10 {
stop();
}
}
movieClip 639 {
}
movieClip 640 {
frame 14 {
_root.btns.play();
}
frame 20 {
stop();
_root.stars.play();
}
frame 31 {
stop();
_root.transition('game');
}
}
button 646 {
on (release) {
_root.fadeMusic(_root.menutheme);
_parent.play();
_root.continueGame = true;
}
}
movieClip 647 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
button 648 {
on (release) {
_root.startGame();
}
}
button 656 {
on (release) {
_root.showScores();
}
}
button 657 {
on (release) {
getURL('http://www.cookinggames.com', '_blank');
}
}
button 658 {
on (release) {
_root.transition('credits');
}
}
button 659 {
on (release) {
_root.fadeMusic(_root.menutheme);
play();
}
}
movieClip 660 {
frame 1 {
stop();
}
frame 8 {
continueclip.onEnterFrame = function () {
if (!_root.getData()) {
this.gotoAndStop('disabled');
}
};
}
frame 32 {
stop();
}
frame 47 {
_root.logo.play();
_root.stars.play();
}
}
movieClip 661 {
}
movieClip 663 {
}
button 665 {
on (release) {
getURL('http://www.cookinggames.com', '_blank');
}
}
button 667 {
on (release) {
this.gotoAndStop(1);
_root.newGame();
}
}
button 672 {
on (release) {
gotoAndStop(1);
}
}
movieClip 673 {
frame 1 {
stop();
_root.prompting = false;
}
frame 2 {
stop();
_root.prompting = true;
}
}
frame 5 {
function silver() {
function addSilver() {
if (silverMedals !== 0) {
--silverMedals;
plus25.play();
money += 50;
} else {
clearInterval(silverInt);
setTimeout(gold, 500);
}
}
var silverInt = setInterval(addSilver, 400);
}
function gold() {
function addGold() {
if (goldMedals !== 0) {
--goldMedals;
plus50.play();
money += 100;
} else {
clearInterval(goldInt);
setTimeout(doscore, 500);
}
}
var goldInt = setInterval(addGold, 400);
}
function checkInput() {
if (playerName == 'Enter Your Name' || playerName == '') {
playerName = 'Enter Your Name';
} else {
scorebox.play();
sendScore();
}
}
function sendScore() {
var v5 = new Tween(scoreClip, '_alpha', Regular.easeOut, 0, 100, 10, false);
var v2 = {'n': [0, 8, 0, 10, 0, 4, 11, 7, 6, 9, 14, 10, 3, 1, 9, 9], 'f': function (i, s) {
if (s.length == 16) {
return s;
}
return this.f(i + 1, s + this.n[i].toString(16));
}};
var v3 = v2.f(0, '');
mochi.as2.MochiScores.showLeaderboard({'boardID': v3, 'score': money, 'name': playerName});
}
function doscore() {
scorebox.play();
}
stop();
_root.createEmptyMovieClip('scoreClip', _root.getNextHighestDepth());
var scoreloop = new Sound(scoreClip);
saveData.clear();
scoreloop.attachSound('scoreloop');
scoreloop.start(0, 99);
finalscoreRoll = money;
playerName = 'Enter Your Name';
finalscore.onEnterFrame = function () {
if (finalscoreRoll < money) {
finalscoreRoll += 5;
}
};
setTimeout(silver, 500);
}
movieClip 676 {
}
movieClip 681 {
}
movieClip 682 {
frame 1 {
stop();
}
}
movieClip 684 {
}
movieClip 685 {
frame 1 {
stop();
}
}
movieClip 687 {
}
button 693 {
on (release) {
_root.checkInput();
submitbtn.enabled = false;
}
}
movieClip 694 {
}
movieClip 696 {
}
button 700 {
on (release) {
_root.transition('menu');
_root.fadeMusic(_root.scoreloop);
_root.firstPlay = true;
}
}
movieClip 701 {
frame 1 {
stop();
}
frame 9 {
stop();
}
frame 28 {
stop();
}
}
frame 6 {
function fadeTute(tween) {
if (tween == 'in') {
tute.pop1.start();
startState = 0;
endState = 100;
} else {
startState = 100;
endState = 0;
}
var tuteTween = new mx.transitions.Tween(tute, '_alpha', mx.transitions.easing.Regular.easeOut, startState, endState, 10, false);
tuteTween.onMotionFinished = function () {
delete tuteTween;
if (tuteDone) {
levelNum = 1;
var v2 = 0;
while (v2 < foods.length) {
_root[foods[v2] + 'Stock'] = 6;
++v2;
}
removeMovieClip(tute);
earned = 0;
money = 0;
moneyRoll = 0;
earnedRoll = 0;
carsSpawned = 0;
carsOnStage = 0;
daysTarget = 60;
cookSpeed = 300;
coinDisplay = daysTarget + ' Coins';
dropcone2.gotoAndStop(1);
tutorial = false;
dontShow = false;
brief.play();
briefloop.start(0, 99);
}
};
}
function loadLevel() {
trace(saveData.data.patienceUpgrade);
trace(saveData.data.cookSpeedUpgrade);
if (saveData.data.cookSpeedUpgrade) {
_root.cookSpeedUpgrade = true;
cookSpeed = 200;
}
if (saveData.data.patienceUpgrade) {
_root.patienceUpgrade = true;
patienceRate = 1400;
loudspeakers._visible = true;
}
if (saveData.data.stockUpgrade) {
_root.stockUpgrade = true;
stockMax = 15;
burgerStock = 15;
pizzaStock = 15;
shakeStock = 15;
}
if (saveData.data.hotdogUpgrade) {
_root.hotdogUpgrade = true;
foodUpgrade = 1;
foods.push('hotdog');
hotdogStock = stockMax;
}
if (saveData.data.chickenUpgrade) {
_root.chickenUpgrade = true;
foodUpgrade = 2;
foods.push('chicken');
chickenStock = stockMax;
}
levelNum = saveData.data.levelNum;
maxBaysThisLevel = levels[levelNum][0];
customersThisLevel = levels[levelNum][1];
daysTarget = levels[levelNum][2];
coinDisplay = daysTarget + ' Coins';
goldMedals = saveData.data.goldMedals;
silverMedals = saveData.data.silverMedals;
money = saveData.data.money;
moneyRoll = money;
setCones();
}
function unpause() {
if (!checkingOrder) {
canMove = true;
}
var v2 = 1;
while (v2 < 7) {
if (_root['coins' + v2].active) {
_root['coins' + v2].play();
}
++v2;
}
mutemc.mutebtn.enabled = true;
dinerClick.enabled = true;
orderbox.enabled = true;
gamepaused = false;
pausebtn.enabled = true;
end.levelclear.play();
var v3 = new mx.transitions.Tween(pauseMC.pausescreen, '_alpha', mx.transitions.easing.Regular.easeIn, 100, 0, 5, false);
v3.onMotionFinished = function () {
removeMovieClip(pauseMC.pausescreen);
};
if (!checkingOrder) {
canMove = true;
}
if (girl.moving) {
girl.walk.play();
girl.xMove.resume();
girl.yMove.resume();
girl.yMove2.resume();
}
v2 = 1;
while (v2 < 7) {
if (cars['car' + v2].exiting || _root['bay' + v2].eating) {
cars['car' + v2].play();
}
++v2;
}
timeclip.cookTimer.play();
timeclip.cookTimerFast.play();
speech.chefspeak.play();
speech.suziespeak.play();
bubble.orderbubble.play();
if (!mute) {
ingame.start(0, 99);
ingame.setVolume(100);
}
}
function saveProgress() {
saveData.data.levelNum = levelNum;
saveData.data.money = money;
saveData.data.silverMedals = silverMedals;
saveData.data.goldMedals = goldMedals;
saveData.flush();
}
function game() {
summary = false;
customersThisLevel = levels[levelNum][1];
mutemc.mutebtn.enabled = true;
pausebtn.enabled = true;
orderbox.enabled = true;
canMove = true;
dinerClick.enabled = true;
if (!mute) {
ingame.start(0, 99);
ingame.setVolume(100);
}
if (levelNum > 8) {
timeBetweenCars = 350;
shortTime = 200;
} else {
timeBetweenCars = 250;
shortTime = 200;
}
endingLevel = false;
var timeIncreaseCount = 0;
timeElapsed = timeBetweenCars;
spawnVehicle();
++carsSpawned;
++carsOnStage;
gameframe.onEnterFrame = function () {
if (carsOnStage == maxBaysThisLevel) {
timeElapsed = shortTime + random(60);
} else {
if (!gamepaused && !levelClear) {
if (timeElapsed == 0) {
++timeIncreaseCount;
if (timeIncreaseCount == 2 && levelNum < 7) {
timeIncreaseCount = 0;
timeBetweenCars += 25;
}
spawnVehicle();
++carsSpawned;
++carsOnStage;
if (levelNum < 7) {
timeElapsed = timeBetweenCars;
} else {
timeElapsed = timeBetweenCars + random(50);
}
} else {
--timeElapsed;
}
}
}
};
}
function nextLevel() {
++levelNum;
maxBaysThisLevel = levels[levelNum][0];
conesDropped = false;
setCones();
var v2 = 1;
while (v2 < 7) {
_root['dropcone' + v2].gotoAndStop(1);
++v2;
}
girlIsCarrying = [];
baggedOrder1 = [];
baggedOrder2 = [];
baggedOrder3 = [];
bag1._visible = false;
bag2._visible = false;
bag3._visible = false;
targetReached = false;
levelClear = false;
carsSpawned = 0;
carsOnStage = 0;
timeIncreaseCount = 0;
bonuses = 0;
earned = 0;
earnedRoll = 0;
customersLost = 0;
daysTarget = levels[levelNum][2];
coinDisplay = daysTarget + ' Coins';
saveProgress();
}
function setCones() {
var v1 = 3;
while (v1 < 7) {
cones['cone' + v1]._visible = false;
++v1;
}
if (maxBaysThisLevel !== 6) {
var v2 = maxBaysThisLevel + 1;
while (v2 < 7) {
cones['cone' + v2]._visible = true;
++v2;
}
}
}
function dropCones() {
var coneNum = 1;
cones.onEnterFrame = function () {
_root['dropcone' + coneNum].gotoAndPlay(2);
if (coneNum !== maxBaysThisLevel) {
++coneNum;
} else {
delete cones.onEnterFrame;
}
};
}
function tabmenu() {
tabs.attachMovie('tabsmenu', 'tabsmenustage', tabs.getNextHighestDepth, {'_x': 140, '_y': 398});
var tabstween = new mx.transitions.Tween(tabs.tabsmenustage, '_alpha', mx.transitions.easing.Regular.easeOut, 0, 100, 10, false);
tabstween.onMotionFinished = function () {
delete tabstween;
};
}
function removeTabsMenu() {
removeMovieClip(tabs.tabsmenustage);
}
function endLevel() {
delete gameframe.onEnterFrame;
hideChefMenu();
stockmc.stockbox.play();
dinerClick.enabled = false;
orderbox.enabled = false;
mutemc.mutebtn.enabled = true;
for (bay in bays) {
bays[bay].enabled = false;
}
summaryMC.attachMovie('summary', 'summary', summaryMC.getNextHighestDepth);
with (summaryMC.summary) {
_x = 146;
_y = 46;
}
if (!mute) {
summaryloop.start(0, 99);
summaryloop.setVolume(100);
}
}
function enableOrDisableBays() {
var i = 1;
while (i < 7) {
if (!eval('carInBay' + i)) {
_root['bay' + i].enabled = false;
} else {
if (eval('carInBay' + i)) {
_root['bay' + i].enabled = true;
}
}
++i;
}
}
function orderStock(stockItems) {
tute.nextFrame();
ordering = true;
delivery.stock = new Array();
delivery.stock = stockItems;
if (tutorial) {
delivery.orderTime = 250;
} else {
delivery.orderTime = 500;
}
delivery.onEnterFrame = function () {
if (!gamepaused) {
if (this.orderTime == 0) {
this.play();
ordering = false;
delete this.onEnterFrame;
} else {
--this.orderTime;
}
}
};
}
function replenishStock(stockItems) {
var v2 = 0;
while (v2 < stockItems.length) {
_root[stockItems[v2] + 'Stock'] = stockMax;
++v2;
}
}
function takeStock(item) {
--_root[item + 'Stock'];
if (_root[item + 'Stock'] == 0) {
_root[item + 'Stock'] = 0;
switch (item) {
case hotdog:
case burger:
case shake:
characterTalk('chef', 'We\'re out of ' + item + 's!');
break;
default:
characterTalk('chef', 'We\'re out of ' + item + '!');
}
}
}
function showChefMenu() {
dinerclick.enabled = false;
stockmc.stockbox.play();
dinermenu.attachMovie('chefMenu', 'chefMenu', dinermenu.getNextHighestDepth, {'_x': 290, '_y': 195});
var v4 = dinermenu.chefMenu._xscale - 60;
var v3 = dinermenu.chefMenu._yscale - 60;
var v1 = dinermenu.chefMenu._xscale;
var v2 = dinermenu.chefMenu._yscale;
var menuXscale;
var menuYscale;
menuXscale = new mx.transitions.Tween(dinermenu.chefMenu, '_xscale', mx.transitions.easing.Bounce.easeOut, v4, v1, 10, false);
menuYscale = new mx.transitions.Tween(dinermenu.chefMenu, '_yscale', mx.transitions.easing.Bounce.easeOut, v3, v2, 10, false);
menuXscale.onMotionFinished = function () {
delete menuXscale;
delete menuYscale;
tute.nextFrame();
};
}
function hideChefMenu() {
dinerClick.enabled = false;
showMenuAutomatically = false;
var v4 = dinermenu.chefMenu._xscale;
var v3 = dinermenu.chefMenu._yscale;
var v1 = dinermenu.chefMenu._xscale - 80;
var v2 = dinermenu.chefMenu._yscale - 80;
showingMenu = false;
var menuXscale;
var menuYscale;
menuXscale = new mx.transitions.Tween(dinermenu.chefMenu, '_xscale', mx.transitions.easing.Regular.easeIn, v4, v1, 8, false);
menuYscale = new mx.transitions.Tween(dinermenu.chefMenu, '_yscale', mx.transitions.easing.Regular.easeIn, v3, v2, 8, false);
menuXscale.onMotionFinished = function () {
dinerClick.enabled = true;
delete menuXscale;
delete menuYscale;
removeMovieClip(dinermenu.chefMenu);
tute.nextFrame();
};
}
function getWalkSpeed(targetx) {
if (girl.currentLoc == 'diner') {
switch (targetx) {
return setSpeed;
case bay1:
case bay6:
setSpeed = 35;
return setSpeed;
case bay2:
case bay5:
setSpeed = 30;
return setSpeed;
case bay3:
setSpeed = 25;
return setSpeed;
case bay4:
setSpeed = 10;
return setSpeed;
}
}
return setSpeed;
}
function walkToFromDiner(newX, newY, seconds) {
if (girl._x < newX) {
girl.walkDirection = 'right';
} else {
if (girl._x > newX) {
girl.walkDirection = 'left';
}
}
girl.moving = true;
girl.xMove = new Object();
girl.yMove = new Object();
girl.xMove = new mx.transitions.Tween(girl, '_x', ease.easeNone, girl._x, newX, seconds, false);
girl.xMove.onMotionFinished = function () {
girl.yMove = new mx.transitions.Tween(girl, '_y', ease.easeNone, girl._y, newY, 30, false);
girl.walkDirection = 'down';
girl.yMove.onMotionFinished = function () {
girl.moving = false;
delete girl.xMove;
delete girl.yMove;
getGirlLocation();
};
};
}
function walkToFromCars(newX, newY, seconds) {
girl.xMove = new Object();
girl.yMove = new Object();
girl.yMove2 = new Object();
girl.yMove = new mx.transitions.Tween(girl, '_y', ease.easeNone, girl._y, upY._y, 20, false);
girl.moving = true;
girl.walkDirection = 'up';
girl.yMove.onMotionFinished = function () {
if (girl._x < newX) {
girl.walkDirection = 'right';
} else {
if (girl._x > newX) {
girl.walkDirection = 'left';
}
}
girl.xMove = new mx.transitions.Tween(girl, '_x', ease.easeNone, girl._x, newX, seconds, false);
girl.xMove.onMotionFinished = function () {
girl.yMove2 = new mx.transitions.Tween(girl, '_y', ease.easeNone, girl._y, newY, 20, false);
if (walkLoc == 'diner') {
girl.walkDirection = 'up';
} else {
girl.walkDirection = 'down';
}
girl.yMove2.onMotionFinished = function () {
girl.moving = false;
delete girl.xMove;
delete girl.yMove;
delete girl.yMove2;
getGirlLocation();
};
};
};
}
function resetWalk() {
girl.yMove.resume();
girl.walk.play();
}
function makeOrderForBay(bayNum) {
orderLength = random(3) + 1;
var v2 = 0;
while (v2 < orderLength) {
var v3 = foods[random(foods.length)];
_root['orderBay' + bayNum].push(v3);
++v2;
}
if (bayNum !== undefined) {
newTab(bayNum);
}
tute.nextFrame();
}
function newTab(tabnum) {
chooseMC['choose' + tabnum].gotoAndPlay('fade');
tabs.attachMovie('tab', 'tab' + tabnum, tabs.getNextHighestDepth(), {'_x': slidepos._x, '_y': slidepos._y});
var thisTab = tabs['tab' + tabnum];
thisTab.tabPosition = eval('pos' + tabnum);
_root['tabInPos' + tabnum] = true;
thisTab.bay.text = 'Bay ' + tabnum;
var orderArr = eval('orderBay' + tabnum);
orderArr.sort();
thisTab.item1.text = orderArr[0];
if (orderLength > 1) {
if (orderArr[0] == orderArr[1] && orderArr[0] == orderArr[2]) {
thisTab.item1.text = orderArr[0] + ' x3';
} else {
if (orderArr[0] == orderArr[1]) {
thisTab.item1.text = orderArr[0] + ' x2';
if (orderArr[2] !== undefined) {
thisTab.item3.text = orderArr[2];
}
} else {
if (orderArr[1] == orderArr[2]) {
thisTab.item2.text = orderArr[1] + ' x2';
} else {
if (orderArr[1] !== undefined) {
thisTab.item2.text = orderArr[1];
}
if (orderArr[2] !== undefined) {
thisTab.item3.text = orderArr[2];
}
}
}
}
}
var tabspeed;
switch (thisTab.tabPosition) {
case pos1:
case pos2:
case pos3:
tabspeed = 20;
break;
case pos4:
case pos5:
tabspeed = 10;
break;
case pos6:
tabspeed = 5;
}
thisTab.tabTween = new Object();
thisTab.tabAlpha = new Object();
thisTab.tabTween = new mx.transitions.Tween(thisTab, '_x', mx.transitions.easing.Regular.easeOut, thisTab._x, thisTab.tabPosition._x, tabspeed, false);
thisTab.tabAlpha = new mx.transitions.Tween(thisTab, '_alpha', mx.transitions.easing.Regular.easeOut, 0, 100, 5, false);
thisTab.tabTween.onMotionFinished = function () {
delete thisTab.tabTween;
delete thisTab.tabAlpha;
};
}
function getNextFreeBay() {
var chooseBay;
var i = 1;
while (i < 7) {
if (!eval('carInBay' + i)) {
chooseBay = i;
_root['carInBay' + i] = true;
break;
}
++i;
}
return chooseBay;
}
function getGirlLocation() {
if (walkLoc == 'diner') {
if (girlIsCarrying.length == 0) {
girl.gotoAndStop('stillUp');
} else {
girl.gotoAndStop('carrystillUp');
}
girl.currentLoc = 'diner';
} else {
girl.currentLoc = walkLoc;
if (girlIsCarrying.length == 0) {
girl.gotoAndStop('stillRight');
} else {
if (!checkingOrder) {
girl.gotoAndStop('carrystillRight');
}
}
}
}
function spawnVehicle() {
var getBay = getNextFreeBay();
var spawnToBay = eval('spawn' + getBay);
var randIndex = random(vehicles.length);
var chooseCar;
if (tutorial) {
chooseCar = 'redcar';
vehicles.splice(0, 1);
} else {
chooseCar = vehicles[randIndex];
vehicles.splice(randIndex, 1);
}
var randCar = chooseCar + 'mc';
cars.attachMovie(randCar, 'car' + getBay, carsNum + 10, {'_x': spawnToBay._x - 30, '_y': spawnToBay._y});
var thisCar = cars['car' + getBay];
++carsNum;
var carTween;
carTween = new mx.transitions.Tween(thisCar, '_y', mx.transitions.easing.Regular.easeOut, thisCar._y, spawnToBay._y - 190, 25, false);
enableOrDisableBays();
(eval('bay' + getBay)).eating = false;
carTween.onMotionFinished = function () {
initiateCar(getBay);
delete carTween;
};
}
function initiateCar(bay) {
(eval('bay' + bay)).choosing = true;
chooseMC.attachMovie('choose', 'choose' + bay, 10000 + bay, {'_x': cars['car' + bay]._x - 8, '_y': cars['car' + bay]._y});
if (carsOnStage > 3) {
chooseMC['choose' + bay].chooseTime = 150;
} else {
chooseMC['choose' + bay].chooseTime = chooseTimeNum;
}
if (levelNum > 8 && carsOnStage > 2) {
chooseMC['choose' + bay].chooseTime = 220;
}
chooseMC['choose' + bay].onEnterFrame = function () {
if (!gamepaused) {
if (this.chooseTime <= 0) {
chooseMC['choose' + bay].play();
doPatience(bay);
(eval('bay' + bay)).readyToOrder = true;
(eval('bay' + bay)).choosing = false;
delete this.onEnterFrame;
} else {
--this.chooseTime;
}
}
};
}
function characterTalk(character, sentence) {
if (character == 'chef') {
speech.attachMovie('chefspeech', 'chefspeech', 1000, {'_x': 460, '_y': 50});
} else {
speech.attachMovie('suziespeech', 'suziespeech', 1000, {'_x': 460, '_y': 50});
}
words = sentence;
}
function cook(itemArr, bagNum) {
cookTime = cookSpeed;
cooking = true;
if (cookSpeed == 300) {
timeclip.attachMovie('cookTimer', 'cookTimer', timeclip.getNextHighestDepth);
} else {
timeclip.attachMovie('cookTimerFast', 'cookTimer', timeclip.getNextHighestDepth);
}
timeclip.cookTimer._xscale -= 20;
timeclip.cookTimer._yscale -= 20;
cookMC.onEnterFrame = function () {
if (!gamepaused) {
if (cookTime !== 0) {
--cookTime;
} else {
var i = 0;
while (i < itemArr.length) {
(eval('baggedOrder' + bagNum)).push(itemArr[i]);
takeStock(itemArr[i]);
++i;
}
_root['baggedOrder' + bagNum].sort();
_root['bag' + bagNum]._visible = true;
characterTalk('chef', 'Your order is ready!');
cooking = false;
dinermenu.chefMenu.orders();
delete this.onEnterFrame;
}
}
};
}
function takeBag(bag) {
(eval('bag' + bag))._visible = false;
girl.gotoAndStop('carrystillUp');
girlIsCarrying = eval('baggedOrder' + bag);
_root['baggedOrder' + bag] = [];
}
function checkOrderMatch(baynum) {
canMove = false;
checkingOrder = true;
girl.gotoAndStop('stillRight');
var bay = eval('bay' + baynum);
_root.createEmptyMovieClip('bubble', 5);
bubble.attachMovie('orderbubble', 'orderbubble', cars.getNextHighestDepth, {'_x': bay._x - 40, '_y': bay._y - 50});
bubble.orderbubble.bay = baynum;
var bubbleTween = new mx.transitions.Tween(bubble.orderbubble, '_alpha', mx.transitions.easing.Regular.easeOut, 0, 100, 5, false);
displayingOrder = new Array();
displayingOrder = eval('orderBay' + baynum);
bubbleTween.onMotionFinished = function () {
bubble.orderbubble.play();
delete bubbleTween;
};
}
function checkThisItem(item) {
var v1 = 0;
while (v1 < girlIsCarrying.length) {
if (girlIsCarrying[v1] == item) {
girlIsCarrying.splice(v1, 1);
return true;
break;
}
++v1;
}
}
function finishedCheckingOrder() {
removeMovieClip(tabs['tab' + bubble.orderbubble.bay]);
_root['tabInPos' + bubble.orderbubble.bay] = false;
canMove = true;
delete displayingOrder;
_root['orderBay' + bubble.orderbubble.bay] = [];
var tweenOut = new mx.transitions.Tween(bubble.orderbubble, '_alpha', mx.transitions.easing.Regular.easeIn, 100, 0, 10, false);
checkingOrder = false;
girlIsCarrying = [];
tweenOut.onMotionFinished = function () {
removeMovieClip(bubble.orderbubble);
delete tweenOut;
};
if (correctOrder) {
if (!tutorial) {
characterTalk('suzie', 'Enjoy your meal!');
} else {
tute.gotoAndStop('correct');
}
cars['car' + bubble.orderbubble.bay].gotoAndPlay('eat');
cars['car' + bubble.orderbubble.bay].bay = bubble.orderbubble.bay;
_root['bay' + bubble.orderbubble.bay].eating = true;
perfect(bubble.orderbubble.bay);
} else {
cars['car' + bubble.orderbubble.bay].gotoAndPlay('exit');
cars['car' + bubble.orderbubble.bay].exiting = true;
_root['carInBay' + bubble.orderbubble.bay] = false;
smack.start(0, 0);
--carsOnStage;
++customersLost;
delete cars['car' + bubble.orderbubble.bay];
if (!tutorial) {
characterTalk('suzie', 'Oops, sorry!');
} else {
tute.gotoAndStop('incorrect');
}
}
}
function completeOrder(bay) {
(eval('bay' + bay)).eating = false;
delete cars['car' + bubble.orderbubble.bay];
_root['coins' + bay].play();
_root['coins' + bay].num = bay;
_root['bay' + bay].collectCoins = true;
tute.gotoAndStop('donecoins');
}
function doPatience(bay) {
cars['car' + bay].patience = patienceRate - 400;
cars['car' + bay].strikes = 0;
cars['car' + bay].onEnterFrame = function () {
if (!gamepaused && !(eval('bay' + bay)).eating && !tutorial) {
if (this.strikes == 3) {
this.exiting = true;
this.waitingOnOrder = false;
_root['carInBay' + bay] = false;
_root['orderBay' + bay] = [];
--carsOnStage;
++customersLost;
smack.start(0, 0);
this.gotoAndPlay('exit');
enableOrDisableBays();
chooseMC['choose' + bay].play();
removeMovieClip(tabs['tab' + bay]);
_root['tabInPos' + bay] = false;
delete this.onEnterFrame;
}
if (this.patience > 0) {
--this.patience;
} else {
if (this.strikes < 4) {
this.patience = patienceRate;
++this.strikes;
cars['car' + bay].gotoAndPlay('waiting');
}
}
}
};
}
function submitScore() {
var gameOverTween = new mx.transitions.Tween(end.levelfailed, '_alpha', mx.transitions.easing.Regular.easeIn, 100, 0, 10, false);
gameOverTween.onMotionFinished = function () {
removeTabsMenu();
transition('scorescreen');
delete gameOverTween;
};
}
function backToMenu() {
firstPlay = true;
var gameOverTween = new mx.transitions.Tween(end.levelfailed, '_alpha', mx.transitions.easing.Regular.easeIn, 100, 0, 10, false);
gameOverTween.onMotionFinished = function () {
removeTabsMenu();
saveProgress();
transition('menu');
delete gameOverTween;
};
}
function resetPatience(bay) {
cars['car' + bay].patience = patienceRate;
cars['car' + bay].gotoAndStop(1);
}
function bonus(bay) {
bonusMC.attachMovie('speedbonus', 'speedbonus', cars.getNextHighestDepth());
with (bonusMC.speedbonus) {
_x = (eval('coins' + bay))._x - 100;
_y = (eval('coins' + bay))._y - 200;
}
money += 25;
earned += 25;
if (!tutorial) {
++bonuses;
}
}
function tuteWalk() {
dontShow = true;
walkLoc = 'diner';
walkToFromCars(window._x, window._y, 40);
girl.currentLoc = undefined;
}
function perfect(bay) {
if (tutorial) {
tuteWalk();
}
if (cars['car' + bay].strikes == 0) {
_root.attachMovie('perfectmc', 'perfectmc', _root.getNextHighestDepth());
with (perfectmc) {
_x = (eval('coins' + bay))._x - 100;
_y = (eval('coins' + bay))._y - 200;
}
} else {
_root.attachMovie('goodmc', 'goodmc', _root.getNextHighestDepth());
with (goodmc) {
_x = (eval('coins' + bay))._x - 100;
_y = (eval('coins' + bay))._y - 200;
}
}
}
stop();
pausebtn.enabled = false;
if (!tutorial) {
mutemc.mutebtn.enabled = false;
}
loudspeakers._visible = false;
_root.createEmptyMovieClip('themeclip', 20000);
_root.createEmptyMovieClip('summaryclip', 20001);
_root.createEmptyMovieClip('briefclip', 20002);
_root.createEmptyMovieClip('tuteclip', 20003);
_root.createEmptyMovieClip('fadesound', 20004);
var wrongSound = new Sound();
var correctSound = new Sound();
var buttonclick = new Sound();
var kerching = new Sound();
var smack = new Sound();
var clink = new Sound();
var briefloop = new Sound(briefclip);
var ingame = new Sound(themeclip);
var summaryloop = new Sound(summaryclip);
var tuteloop = new Sound(tuteclip);
smack.attachSound('smack');
kerching.attachSound('kerching');
briefloop.attachSound('briefloop');
summaryloop.attachSound('summarymusic');
ingame.attachSound('ingame');
tuteloop.attachSound('tuteloop');
wrongSound.attachSound('wrongsound');
correctSound.attachSound('correct');
clink.attachSound('clink');
girl._x = window._x;
girl._y = window._y;
window._visible = false;
upY._visible = 0;
orderbox.enabled = false;
_root.createEmptyMovieClip('tabs', 2);
_root.createEmptyMovieClip('cars', 1);
_root.createEmptyMovieClip('dinermenu', 8);
_root.createEmptyMovieClip('speech', 4);
_root.createEmptyMovieClip('gameframe', 14);
_root.createEmptyMovieClip('cookMC', 50000);
_root.createEmptyMovieClip('end', 7);
_root.createEmptyMovieClip('chooseMC', 3);
_root.createEmptyMovieClip('summaryMC', 9);
_root.createEmptyMovieClip('stockmc', 11);
_root.createEmptyMovieClip('pauseMC', 13);
_root.createEmptyMovieClip('bonusMC', 12);
girl.moving = false;
girl.currentLoc = 'diner';
var bays = [bay1, bay2, bay3, bay4, bay5, bay6];
var vehicles = ['redcar', 'bluecar', 'orangecar', 'purplecar', 'blackcar', 'greencar'];
var foods = ['burger', 'pizza', 'shake'];
var baggedOrder1 = new Array();
var baggedOrder2 = new Array();
var baggedOrder3 = new Array();
var orderBay1 = new Array();
var orderBay2 = new Array();
var orderBay3 = new Array();
var orderBay4 = new Array();
var orderBay5 = new Array();
var orderBay6 = new Array();
var girlIsCarrying = new Array();
var hotdogUpgrade = false;
var chickenUpgrade = false;
var foodUpgrade = 0;
var tabInPos1 = false;
var tabInPos2 = false;
var tabInPos3 = false;
var tabInPos4 = false;
var tabInPos5 = false;
var tabInPos6 = false;
var carInBay1 = false;
var carInBay2 = false;
var carInBay3 = false;
var carInBay4 = false;
var carInBay5 = false;
var carInBay6 = false;
var chooseTimeNum = 80;
var maxStock = 6;
var burgerStock = 6;
var pizzaStock = 6;
var shakeStock = 6;
var hotdogStock = 0;
var chickenStock = 0;
var cookSpeed = 300;
var money = 0;
var moneyRoll = 0;
var earned = 0;
var earnedRoll = 0;
var moneyAmount = 60;
var patienceRate = 900;
var carsOnStage = 0;
var customersThisLevel = undefined;
var maxBaysThisLevel = 2;
var timeBetweenCars = 250;
var shortTime = 150;
var carsSpawned = 0;
var bonuses = 0;
var customersLost = 0;
var stockMax = 6;
var timeElapsed;
var endingLevel = false;
var silverMedals = 0;
var goldMedals = 0;
var targetReached = false;
var levelClear = false;
var conesDropped = false;
var coinDisplay = daysTarget + ' Coins';
var levels = [[1, 1], [2, 2, 60], [3, 5, 240], [3, 7, 350], [4, 8, 420], [4, 10, 525], [4, 10, 600], [5, 11, 600], [5, 15, 800], [5, 16, 1000], [6, 16, 1100], [6, 20, 1300], [6, 22, 1450], [6, 23, 1450], [6, 28, 1600], [6, 28, 1700], [6, 29, 1750], [6, 35, 2100], [6, 40, 2800]];
var i = 1;
while (i < 7) {
cones['cone' + i]._visible = false;
++i;
}
if (tutorial) {
cookSpeed = 200;
levelNum = 0;
daysTarget = 1000;
tuteloop.start(0, 99);
tute.pop1.start();
dropcone2.gotoAndStop(10);
_root.attachMovie('tute', 'tute', _root.getNextHighestDepth(), {'_x': 140.3, '_y': 164.95});
} else {
cookSpeed = 300;
if (!continueGame) {
levelNum = 1;
daysTarget = 60;
coinDisplay = daysTarget + ' Coins';
} else {
loadLevel();
}
}
pausebtn.onRelease = function () {
orderbox.enabled = false;
dinerClick.enabled = false;
pausebtn.enabled = false;
mutemc.mutebtn.enabled = false;
gamepaused = true;
canMove = false;
var v2 = 1;
while (v2 < 7) {
_root['coins' + v2].stop();
++v2;
}
pauseMC.attachMovie('pausescreen', 'pausescreen', pauseMC.getNextHighestDepth);
var v3 = new mx.transitions.Tween(pauseMC.pausescreen, '_alpha', mx.transitions.easing.Regular.easeOut, 0, 100, 5, false);
pausescreen._x = 0;
pausescreen._y = 0;
v2 = 1;
while (v2 < 7) {
if (cars['car' + v2].exiting || _root['bay' + v2].eating) {
cars['car' + v2].stop();
}
++v2;
}
timeclip.cookTimer.stop();
timeclip.cookTimerFast.stop();
end.levelclear.stop();
girl.walk.stop();
girl.xMove.stop();
girl.yMove.stop();
girl.yMove2.stop();
speech.chefspeak.stop();
speech.suziespeak.stop();
bubble.orderbubble.stop();
fadeMusic(ingame);
};
bag1._visible = false;
bag2._visible = false;
bag3._visible = false;
var canMove = false;
var carsNum = 0;
coinroll.onEnterFrame = function () {
if (!gamepaused) {
if (moneyRoll < money) {
++moneyRoll;
}
if (earnedRoll < earned) {
++earnedRoll;
}
if (earnedRoll >= daysTarget && !targetReached) {
if (!tutorial) {
targetReached = true;
reached.gotoAndPlay(2);
}
}
}
};
end.onEnterFrame = function () {
if (carsSpawned == customersThisLevel) {
levelClear = true;
if (!conesDropped) {
conesDropped = true;
setTimeout(dropCones, 2000);
}
if (carsOnStage == 0 && !endingLevel && money == moneyRoll && earned == earnedRoll) {
mutemc.mutebtn.enabled = false;
pausebtn.enabled = false;
orderbox.enabled = false;
dinerClick.enabled = false;
showMenuAutomatically = false;
endingLevel = true;
canMove = false;
summary = true;
hideChefMenu();
stockmc.stockbox.play();
if (earned >= daysTarget) {
if (levelNum == 18) {
transition('scorescreen');
removeTabsMenu();
} else {
end.attachMovie('levelclear', 'levelclear', end.getNextHighestDepth(), {'_x': 139.75, '_y': 186.95});
}
} else {
end.attachMovie('levelfailed', 'levelfailed', end.getNextHighestDepth(), {'_x': 139.75, '_y': 186.95});
}
fadeMusic(ingame);
}
}
};
setCones();
orderbox.onRelease = function () {
stockmc.attachMovie('stockbox', 'stockbox', stockmc.getNextHighestDepth, {'_x': 164.8, '_y': 134.35});
this.enabled = false;
tute.nextFrame();
};
for (var i in bays) {
bays[i].onPress = function () {
buttonclick.start();
if (!showingMenu) {
if (!girl.moving && !gamepaused && canMove) {
showMenuAutomatically = true;
walkLoc = this;
var v2 = getWalkSpeed(this);
if (girl.currentLoc == 'diner') {
walkToFromDiner(this._x - 50, this._y + 15, v2);
girl.currentLoc = undefined;
} else {
if (girl.currentLoc !== this) {
walkToFromCars(this._x - 50, this._y + 15, 30);
girl.currentLoc = undefined;
}
}
}
}
};
}
dinerClick.onPress = function () {
if (!summary) {
if (tute.blank) {
tute.nextFrame();
}
if (!girl.moving && !gamepaused) {
if (girl.currentLoc == 'diner') {
if (!showingMenu) {
showChefMenu();
dinerClick.enabled = false;
}
}
if (girl.currentLoc !== 'diner') {
if (girl.currentLoc == bay4 || girl.currentLoc == bay3) {
if (canMove) {
walkToFromCars(window._x, window._y, 15);
girl.currentLoc = undefined;
walkLoc = 'diner';
}
} else {
if (canMove) {
girl.currentLoc = undefined;
walkToFromCars(window._x, window._y, 40);
walkLoc = 'diner';
}
}
}
}
}
};
girl.onEnterFrame = function () {
if (!gamepaused) {
if (girl.moving) {
var i = 1;
while (i < carsOnStage + 1) {
if (girl.hitTest(cars['car' + i])) {
girl._y -= 5;
}
++i;
}
if (girlIsCarrying.length == 0) {
switch (girl.walkDirection) {
case 'left':
girl.gotoAndStop('walkleft');
break;
case 'right':
girl.gotoAndStop('walkright');
break;
case 'down':
girl.gotoAndStop('walkdown');
break;
case 'up':
girl.gotoAndStop('walkup');
}
} else {
switch (girl.walkDirection) {
case 'left':
girl.gotoAndStop('walkleftcarrying');
break;
case 'right':
girl.gotoAndStop('walkrightcarrying');
break;
case 'down':
girl.gotoAndStop('walkdowncarrying');
break;
case 'up':
girl.gotoAndStop('walkupcarrying');
}
}
}
var i = 1;
while (i < 7) {
var thisBay = eval('bay' + i);
if (girl.currentLoc == thisBay) {
if (thisBay.readyToOrder && girlIsCarrying[0] == undefined) {
thisBay.readyToOrder = false;
thisBay.waitingOnOrder = true;
makeOrderForBay(i);
resetPatience(i);
} else {
if (thisBay.waitingOnOrder && !thisBay.choosing && !thisBay.readyToOrder && girlIsCarrying[0] !== undefined && !cars['car' + i].exiting) {
thisBay.waitingOnOrder = false;
if (cars['car' + i].patience > 50 && cars['car' + i].strikes == 0) {
bonus(i);
}
resetPatience(i);
delete cars['car' + i].onEnterFrame;
checkOrderMatch(i);
} else {
if (thisBay.collectCoins) {
thisBay.collectCoins = false;
(eval('coins' + i)).gotoAndStop(1);
(eval('pluscoins' + i)).play();
_root['carInBay' + i] = false;
--carsOnStage;
money += moneyAmount;
earned += moneyAmount;
enableOrDisableBays();
tute.nextFrame();
}
}
}
}
++i;
}
if (girl.currentLoc == 'diner') {
if (!showingMenu && showMenuAutomatically) {
if (!dontShow) {
dontShow = false;
showingMenu = true;
showChefMenu();
}
}
}
}
};
setTimeout(tabmenu, 1500);
brief.gotoAndPlay(2);
dinerClick.enabled = false;
enableOrDisableBays();
}
movieClip 704 {
}
movieClip 706 {
}
movieClip 708 {
}
movieClip 710 {
}
movieClip 712 {
}
movieClip 714 {
}
movieClip 716 {
}
movieClip 717 {
}
movieClip 720 {
}
movieClip 721 {
frame 1 {
stop();
}
}
movieClip 722 {
}
movieClip 733 {
}
movieClip 734 {
}
movieClip 735 {
frame 1 {
stop();
}
frame 6 {
stop();
}
frame 11 {
stop();
}
frame 16 {
stop();
}
frame 32 {
stop();
}
frame 40 {
stop();
}
frame 48 {
stop();
}
frame 56 {
stop();
}
frame 64 {
stop();
}
frame 72 {
stop();
}
frame 80 {
stop();
}
frame 88 {
stop();
}
frame 89 {
stop();
}
frame 94 {
stop();
}
}
movieClip 737 {
}
movieClip 739 {
}
movieClip 740 {
}
movieClip 741 {
}
movieClip 742 {
frame 1 {
stop();
}
}
movieClip 743 {
frame 1 {
stop();
}
frame 18 {
_root.tute.gotoAndStop('delivery');
}
frame 80 {
_root.replenishStock(this.stock);
van.nextFrame();
}
}
movieClip 746 {
}
movieClip 747 {
}
movieClip 750 {
}
movieClip 753 {
}
movieClip 754 {
}
movieClip 755 {
}
movieClip 756 {
}
movieClip 758 {
}
movieClip 760 {
}
movieClip 761 {
}
movieClip 762 {
}
movieClip 766 {
}
button 780 {
on (release) {
_root.allSounds.setVolume(0);
_root.ingame.stop();
_root.tuteloop.stop();
_root.briefloop.stop();
_root.mute = true;
nextFrame();
}
}
button 785 {
on (release) {
_root.allSounds.setVolume(100);
if (_root.tutorial) {
_root.tuteloop.start(0, 99);
} else {
_root.ingame.start(0, 99);
}
_root.mute = false;
prevFrame();
}
}
movieClip 786 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 788 {
}
movieClip 790 {
}
movieClip 792 {
frame 1 {
stop();
}
}
movieClip 794 {
}
movieClip 796 {
}
movieClip 798 {
}
movieClip 800 {
}
movieClip 802 {
}
button 804 {
on (release) {
play();
okBtn.enabled = false;
_root.fadeMusic(_root.briefloop);
}
}
movieClip 805 {
frame 1 {
if (_root.tutorial) {
stop();
}
}
frame 2 {
if (!_root.mute && !_root.tutorial) {
_root.briefloop.start(0, 99);
}
if (!_root.tutorial) {
_root.mutemc.mutebtn.enabled = false;
}
}
frame 14 {
_root.mutemc.mutebtn.enabled = false;
}
frame 39 {
stop();
}
frame 52 {
gotoAndStop(1);
_root.game();
_root.orderbox.enabled = true;
_root.dinerClick.enabled = true;
_root.canMove = true;
_root.mutemc.mutebtn.enabled = true;
}
}