Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
var chooser = Math.random();
if (chooser > 0.5) {
MochiAd.showPreGameAd({id:"5498d57541fb1e93", res:"640x500"});
} else {
MochiAd.showPreGameAd({id:"374d658e4625082a", res:"640x500"});
}
__com_mochibot__("6f34bd0f", this, 10301, true);
Stage.showMenu = false;
var soundMute = true;
muteSound = new Sound();
muteBut.onRelease = function () {
if (soundMute == false) {
soundMute = true;
muteBut.gotoAndStop("on");
muteSound.setVolume(100);
loop1.setVolume(30);
} else {
soundMute = false;
muteBut.gotoAndStop("off");
muteSound.setVolume(0);
}
};
Frame 2
if (false) {
}
Frame 3
if (false) {
}
Frame 4
var PATH = "http://www.robotjamgames.com/scoreSystem/";
var GAMENAME = "kebabvan";
this.createEmptyMovieClip("soundholder1", 10000);
this.createEmptyMovieClip("soundholder2", 10001);
this.createEmptyMovieClip("soundholder3", 10002);
this.createEmptyMovieClip("soundholder4", 10003);
this.createEmptyMovieClip("soundholder5", 10004);
this.createEmptyMovieClip("soundholder6", 10005);
this.createEmptyMovieClip("cheerholder", 10006);
loop1 = new Sound(soundholder1);
loop1.attachSound("loop1");
loop1.setVolume(50);
loop2 = new Sound(soundholder2);
loop2.attachSound("loop2");
loop2.setVolume(0);
loop3 = new Sound(soundholder3);
loop3.attachSound("loop3");
loop3.setVolume(0);
loop4 = new Sound(soundholder4);
loop4.attachSound("loop4");
loop4.setVolume(0);
loop5 = new Sound(soundholder3);
loop5.attachSound("loop5");
loop5.setVolume(0);
loop6 = new Sound(soundholder4);
loop6.attachSound("loop6");
loop6.setVolume(0);
this.createEmptyMovieClip("burpholder1", 10006);
this.createEmptyMovieClip("burpholder2", 10007);
this.createEmptyMovieClip("burpholder3", 10008);
this.createEmptyMovieClip("burpholder4", 10009);
this.createEmptyMovieClip("burpholder5", 10010);
this.createEmptyMovieClip("burpholder6", 10011);
burp1 = new Sound(burpholder1);
burp1.attachSound("burp1");
burp1.setVolume(30);
burp2 = new Sound(burpholder2);
burp2.attachSound("burp2");
burp2.setVolume(30);
burp3 = new Sound(burpholder3);
burp3.attachSound("burp3");
burp3.setVolume(30);
burp4 = new Sound(burpholder4);
burp4.attachSound("burp4");
burp4.setVolume(30);
burp5 = new Sound(burpholder3);
burp5.attachSound("burp5");
burp5.setVolume(30);
burp6 = new Sound(burpholder4);
burp6.attachSound("burp6");
burp6.setVolume(30);
burp1.start(0, 1);
this.createEmptyMovieClip("cityholder", 10012);
city = new Sound(cityholder);
city.attachSound("city");
city.setVolume(50);
this.createEmptyMovieClip("carLeftholder", 10013);
carLeft = new Sound(carLeftholder);
carLeft.attachSound("carLeft");
carLeft.setVolume(60);
this.createEmptyMovieClip("carRightholder", 10014);
carRight = new Sound(carRightholder);
carRight.attachSound("carright");
carRight.setVolume(60);
loop1.start(0, 2);
loop1.onSoundComplete = function () {
loop2.setVolume(50);
loop2.start(0, 2);
};
loop2.onSoundComplete = function () {
loop3.setVolume(50);
loop3.start(0, 2);
};
loop3.onSoundComplete = function () {
loop4.setVolume(50);
loop4.start(0, 2);
};
loop4.onSoundComplete = function () {
loop5.setVolume(50);
loop5.start(0, 2);
};
loop5.onSoundComplete = function () {
loop6.setVolume(50);
loop6.start(0, 2);
};
loop6.onSoundComplete = function () {
loop1.setVolume(50);
loop1.start(0, 2);
};
Frame 5
if (false) {
}
Frame 6
if (false) {
}
Frame 8
if (false) {
}
Frame 10
stop();
var score = 0;
playGame.onRelease = function () {
gotoAndPlay ("game");
};
creditsBtn.onRelease = function () {
gotoAndPlay ("credits");
};
moreGamesBtn.onRelease = function () {
getURL ("http://www.kebabvan.com", "_blank");
};
highScores.onRelease = function () {
getURL ("http://www.kebabvan.com/scores.aspx?game=kebab", "_blank");
};
Frame 26
if (false) {
}
Frame 28
if (false) {
}
Frame 29
if (false) {
}
Frame 32
stop();
back.onRelease = function () {
gotoAndPlay ("options");
};
Frame 37
if (false) {
}
Frame 44
if (false) {
}
Frame 45
if (false) {
}
Frame 46
KebabVan.Initialise();
city.start(0, 999);
Frame 47
if (false) {
}
Frame 48
if (false) {
}
Frame 49
if (false) {
}
Frame 50
if (false) {
}
Frame 51
if (false) {
}
Frame 52
if (false) {
}
Frame 57
stop();
Frame 63
if (false) {
}
Frame 64
if (false) {
}
Frame 65
if (false) {
}
Frame 66
stop();
city.stop();
yourScore.scoreText.text = _root.score;
yourScore.backMenu.onPress = function () {
play();
};
yourScore.highscores._visible = false;
yourScore.highscores.onRelease = function () {
getURL ("http://www.kebabvan.com/scores.aspx?game=kebab", "_blank");
};
yourScore.submit._alpha = 50;
yourScore.submit.enabled = false;
this.createEmptyMovieClip("highSender", this.getNextHighestDepth());
yourScore.submit.onRelease = function () {
highSender.playerName = yourScore.nameText;
highSender.score = _root.score;
highSender.gamename = GAMENAME;
highSender.validator = _root.scoreSystem.processScore(_root.score);
highSender.loadVariables(PATH + "new_score.php", "POST");
yourScore.highscores._visible = true;
yourScore.submitted.play();
this._visible = false;
};
onEnterFrame = function () {
if (yourScore.nameText != eval("NULL")) {
yourScore.submit._alpha = 100;
yourScore.submit.enabled = true;
}
};
Frame 67
if (false) {
}
Frame 71
if (false) {
}
Frame 73
gotoAndPlay ("options");
Symbol 3 MovieClip [target] Frame 1
#initclip 25
Object.registerClass("target", Model.Target);
#endinitclip
Symbol 5 MovieClip [spawner] Frame 1
#initclip 24
Object.registerClass("spawner", Model.Spawner);
#endinitclip
Symbol 17 MovieClip Frame 3
stop();
Symbol 18 MovieClip Frame 1
eyelids.play();
var blink = Math.round(Math.random() * 200);
var counter = 1;
this.createEmptyMovieClip("blinker", this.getNextHighestDepth());
blinker.onEnterFrame = function () {
counter++;
if (counter == blink) {
eyelids.play();
counter = 0;
blink = Math.round(Math.random() * 200);
}
};
Symbol 19 MovieClip Frame 1
head.stop();
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 5
stop();
Symbol 677 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 678 MovieClip [__Packages.Model.Base] Frame 0
class Model.Base extends MovieClip
{
var eventDispatcher, _control, swapDepths, removeMovieClip;
function Base (control) {
super();
eventDispatcher = new mx.events.EventDispatcher();
_control = control;
}
function get Control() {
return(_control);
}
function set Control(val) {
_control = val;
//return(Control);
}
function RemoveMe() {
swapDepths(15000);
removeMovieClip();
}
}
Symbol 679 MovieClip [__Packages.KebabVanControl] Frame 0
class KebabVanControl extends Model.Base
{
var _view, _kebab, _delivery, _alerts, _time, _alternativeTargets, _foregroundObjects, _topObjects, _spawners, _currentCustomers, _controlLoopInt, _vanTarget, _vanSpawner, _carInt, eventDispatcher;
function KebabVanControl (view) {
super();
_view = view;
_kebab = new Model.Kebab(this);
_delivery = new Model.Delivery(this);
_alerts = new Model.Alerts(this);
_time = new Model.Time(this);
_kebab.addKebabReadyListener(this, initTime);
_alternativeTargets = new Array();
_foregroundObjects = new Array();
_topObjects = new Array();
_spawners = new Array();
_currentCustomers = new Array();
_controlLoopInt = setInterval(this, "controlLoop", 75);
}
function Initialise() {
assignCustomersToSpawners();
initialiseSpawners();
newCar();
}
function get VanTarget() {
return(_vanTarget);
}
function set VanTarget(val) {
_vanTarget = val;
_vanTarget.__set__StoreCustomers(true);
//return(VanTarget);
}
function get VanSpawner() {
return(_vanSpawner);
}
function set VanSpawner(val) {
_vanSpawner = val;
//return(VanSpawner);
}
function get Time() {
return(_time);
}
function get Kebab() {
return(_kebab);
}
function get Delivery() {
return(_delivery);
}
function get Alerts() {
return(_alerts);
}
function RegisterAlternativeTarget(target) {
_alternativeTargets.push(target);
}
function RegisterSpawner(spawner) {
_spawners.push(spawner);
}
function RegisterForegroundObject(object) {
if (object.getDepth() < 0) {
object.swapDepths(Math.max(object._parent.getNextHighestDepth(), 0));
}
_foregroundObjects.push(object);
}
function RegisterTopObject(object) {
_topObjects.push(object);
}
function assignCustomersToSpawners() {
var _local4 = 0;
while (_local4 < Config.TIME_LENGTH) {
var _local3 = 0;
while (_local3 < Config.CUSTOMERS_PER_HOUR) {
var _local2 = new Model.Customer(this);
_local2.OptionalTarget = getAlternativeTarget();
_local2.Spawner = getRandomSpawner();
_local2.Spawner.RegisterCustomer(_local4, _local2);
_local2.addCustomerCreatedListener(this, customerCreatedListener);
_local2.addCustomerRemovedListener(this, removeCustomerListener);
_local3++;
}
_local4++;
}
}
function getAlternativeTarget() {
return(_alternativeTargets[Math.round(Math.random() * (_alternativeTargets.length - 1))]);
}
function getRandomSpawner() {
return(_spawners[Math.round(Math.random() * (_spawners.length - 1))]);
}
function initialiseSpawners() {
var _local2 = 0;
while (_local2 < _spawners.length) {
_spawners[_local2].Initialise();
_local2++;
}
}
function createEmptyClip(name) {
var _local2 = _view.createEmptyMovieClip((name + "_") + _view.getNextHighestDepth(), _view.getNextHighestDepth());
return(_local2);
}
function customerCreatedListener(eventObj) {
_customerCount++;
_currentCustomers.push(eventObj.customer);
}
function removeCustomerListener(eventObj) {
for (var _local3 in _currentCustomers) {
if (_currentCustomers[_local3] == eventObj.customer) {
_currentCustomers.splice(_local3, 1);
}
}
checkGameEndTime();
}
function removeForegroundObjectListener(eventObj) {
RemoveForegroundObject(eventObj.object);
}
function RemoveForegroundObject(obj) {
for (var _local3 in _foregroundObjects) {
if (_foregroundObjects[_local3] == obj) {
_foregroundObjects.splice(_local3, 1);
}
}
}
function controlLoop() {
for (var _local3 in _currentCustomers) {
for (var _local2 in _currentCustomers) {
if (_currentCustomers[_local3] != _currentCustomers[_local2]) {
if ((_currentCustomers[_local3].Artwork._y <= _currentCustomers[_local2].Artwork._y) && (_currentCustomers[_local3].Artwork.getDepth() > _currentCustomers[_local2].Artwork.getDepth())) {
_currentCustomers[_local3].Artwork.swapDepths(_currentCustomers[_local2].Artwork);
}
}
}
for (var _local2 in _foregroundObjects) {
if (_foregroundObjects[_local2].getDepth() < _currentCustomers[_local3].Artwork.getDepth()) {
_foregroundObjects[_local2].swapDepths(_currentCustomers[_local3].Artwork);
}
}
if (_delivery.__get__ManComingBack()) {
if ((_currentCustomers[_local3].Artwork._y < _delivery.__get__Man()._y) && (_currentCustomers[_local3].Artwork.getDepth() > _delivery.__get__Man().getDepth())) {
_delivery.__get__Man().swapDepths(_currentCustomers[_local3].Artwork);
}
} else if ((_currentCustomers[_local3].Artwork._y > _delivery.__get__Man()._y) && (_currentCustomers[_local3].Artwork.getDepth() < _delivery.__get__Man().getDepth())) {
_delivery.__get__Man().swapDepths(_currentCustomers[_local3].Artwork);
}
}
for (var _local3 in _foregroundObjects) {
for (var _local2 in _foregroundObjects) {
if (_foregroundObjects[_local2] != _foregroundObjects[_local3]) {
if ((_foregroundObjects[_local3]._y <= _foregroundObjects[_local2]._y) && (_foregroundObjects[_local3].getDepth() > _foregroundObjects[_local2].getDepth())) {
_foregroundObjects[_local3].swapDepths(_foregroundObjects[_local2]);
}
}
}
}
sortTopObjects();
addMessages();
}
function sortTopObjects() {
for (var _local2 in _topObjects) {
if (_topObjects[_local2].getDepth() != (_view.getNextHighestDepth() - (_topObjects.length - _local2))) {
_topObjects[_local2].swapDepths(_view.getNextHighestDepth() - (_topObjects.length - _local2));
}
}
}
function addMessages() {
if (_kebab.__get__Ready()) {
if (_kebab.__get__Meat() == 0) {
_alerts.AddMessage("Kebabs need at least some meat!");
}
if (!_kebab.__get__KebabsAvailable()) {
_alerts.AddMessage("You do not have enough stock to serve kebabs!");
}
if (_kebab.__get__MeatStock() < (_kebab.__get__Meat() * 4)) {
_alerts.AddMessage("Your meat stocks are running low!");
}
if (_kebab.__get__ChilliStock() < (_kebab.__get__Chilli() * 4)) {
_alerts.AddMessage("Your chilli stocks are running low!");
}
if (_kebab.__get__SaladStock() < (_kebab.__get__Salad() * 4)) {
_alerts.AddMessage("Your salad stocks are running low!");
}
if (_kebab.__get__MeatStock() < _kebab.__get__Meat()) {
_alerts.AddMessage("You are out of meat!");
checkGameEndNoStock();
}
if (_kebab.__get__ChilliStock() < _kebab.__get__Chilli()) {
_alerts.AddMessage("You are out of chilli!");
}
if (_kebab.__get__SaladStock() < _kebab.__get__Salad()) {
_alerts.AddMessage("You are out of salad!");
}
if (_kebab.__get__CustomerSatisfaction() <= 0.1) {
_alerts.AddMessage("Your customers are very unsatisfied!", "Satisfaction");
} else if (_kebab.__get__CustomerSatisfaction() > 0.5) {
_alerts.AddMessage("Good work, your customers are pretty happy.", "Satisfaction");
} else if (_kebab.__get__CustomerSatisfaction() > 0.7) {
_alerts.AddMessage("Excellent, your customers are very happy.", "Satisfaction");
} else if (_kebab.__get__CustomerSatisfaction() > 0.9) {
_alerts.AddMessage("Wow, your customers think you rock!", "Satisfaction");
}
if (_time.__get__HoursIn() == 1) {
_alerts.AddMessage("They're all pretty sober at the moment.", "Pissed");
} else if (_time.__get__HoursIn() == 2) {
_alerts.AddMessage("People seem to be having a good time, getting merry.", "Pissed");
} else if (_time.__get__HoursIn() == (Config.TIME_LENGTH - 1)) {
_alerts.AddMessage("It's getting messy out there, they're all pretty drunk!", "Pissed");
}
if (_kebab.__get__PriceSatisfaction() <= 0.1) {
_alerts.AddMessage("Your prices are way too high!", "Price");
} else if (_kebab.__get__PriceSatisfaction() < 0.4) {
_alerts.AddMessage("You seem to be too expensive.", "Price");
} else if (_kebab.__get__PriceSatisfaction() < 0.7) {
_alerts.AddMessage("Your kebabs are quite pricy.", "Price");
}
}
}
function initTime() {
_time.Initialise();
}
function newCar() {
clearInterval(_carInt);
_carInt = setInterval(this, "newCar", Config.BASE_CAR_INTERVAL + (Math.random() * Config.CAR_INTERVAL_VARIANCE));
var _local2 = _view.attachMovie("Cars", "car_" + _view.getNextHighestDepth(), _view.getNextHighestDepth());
RegisterForegroundObject(_local2);
_local2.addCarRemovedListener(this, mx.utils.Delegate.create(this, removeForegroundObjectListener));
_local2.Initialise();
}
function checkGameEndTime() {
_totalCustomerCount++;
if (_totalCustomerCount == (Config.CUSTOMERS_PER_HOUR * Config.TIME_LENGTH)) {
endIt();
}
}
function checkGameEndNoStock() {
if ((Config.MEAT_COST * Config.MIN_ORDER_AMOUNT) > _kebab.__get__Money()) {
endIt();
}
}
function endIt() {
_view.GameEnded();
_time.EndTimer();
clearInterval(_controlLoopInt);
clearInterval(_carInt);
removeAllObjects();
}
function removeAllObjects() {
for (var _local2 in _foregroundObjects) {
_foregroundObjects[_local2].RemoveMe();
}
for (var _local2 in _currentCustomers) {
_currentCustomers[_local2].RemoveMe();
}
_alerts.RemoveMe();
_kebab.RemoveMe();
}
function PauseGame() {
}
function UnPauseGame() {
}
function addPauseGameListener(scope, handler) {
eventDispatcher.addEventListener("pauseGame", mx.utils.Delegate.create(scope, handler));
}
function addUnPauseGameListener(scope, handler) {
eventDispatcher.addEventListener("unPauseGame", mx.utils.Delegate.create(scope, handler));
}
var _customerCount = 0;
var _totalCustomerCount = 0;
}
Symbol 680 MovieClip [__Packages.KebabVanView] Frame 0
class KebabVanView extends MovieClip
{
var _control, panel, lowerHud, alert, summary, sky, lamp1, lamp2, lamp3, lamp4, target1, target6, spawner1, spawner2, spawner4, target4, spawner3, spawner5, target7, deliveryVan, hud, satisfaction, hudBorder, instructions, moobar, pub, target2, target3, target5, billboard;
function KebabVanView () {
super();
}
function Initialise() {
_control = new KebabVanControl(this);
_control.__get__Time().addTimeTickListener(this, timeDisplay);
registerTargets();
_control.Initialise();
panel.stockOrder.meatStepper.addStepperChangeListener(this, meatStockStepperChange);
panel.stockOrder.saladStepper.addStepperChangeListener(this, saladStockStepperChange);
panel.stockOrder.chilliStepper.addStepperChangeListener(this, chilliStockStepperChange);
panel.kebabMixer.meatStepper.addStepperChangeListener(this, meatMixStepperChange);
panel.kebabMixer.saladStepper.addStepperChangeListener(this, saladMixStepperChange);
panel.kebabMixer.chilliStepper.addStepperChangeListener(this, chilliMixStepperChange);
panel.kebabMixer.priceStepper.addStepperChangeListener(this, priceMixStepperChange);
_control.__get__Kebab().addOrderCostChangeListener(this, orderCostChange);
_control.__get__Kebab().addProfitChangeListener(this, profitChange);
_control.__get__Kebab().addNewStockAddedListener(this, newStockAdded);
_control.__get__Kebab().addMoneyChangedListener(this, moneyChanged);
_control.__get__Kebab().addSatisfactionChangedListener(this, satisfactionChanged);
_control.__get__Alerts().addMessageListener(this, messageAlert);
_control.__get__Alerts().addNoMessageListener(this, hideMessage);
lowerHud.money.money.text = Helper.formatCost(_control.__get__Kebab().Money);
lowerHud.clock.txtTime.text = Config.START_TIME + ":00";
alert._visible = false;
summary._visible = false;
}
function okKebabStock() {
return(_control.__get__Kebab().okStock());
}
function okKebabMix() {
return(_control.__get__Kebab().okMix());
}
function timeDisplay(eventObj) {
lowerHud.clock.txtTime.text = eventObj.timeString;
sky.gotoAndStop(Math.min(((eventObj.hours * 60) + eventObj.minutes) / Config.TIME_LENGTH, sky._totalframes));
if (eventObj.hours == 2) {
if (eventObj.minutes > 10) {
lamp1.gotoAndStop("on");
}
if (eventObj.minutes > 30) {
lamp2.gotoAndStop("on");
}
if (eventObj.minutes > 5) {
lamp3.gotoAndStop("on");
}
if (eventObj.minutes > 55) {
lamp4.gotoAndStop("on");
}
}
}
function registerTargets() {
_control.RegisterAlternativeTarget(target1);
_control.RegisterAlternativeTarget(target6);
_control.RegisterSpawner(spawner1);
_control.RegisterSpawner(spawner2);
_control.RegisterSpawner(spawner4);
_control.__set__VanTarget(target4);
_control.__set__VanSpawner(spawner3);
_control.__get__Delivery().Spawner = spawner5;
_control.__get__Delivery().Target = target7;
_control.__get__Delivery().Van = deliveryVan;
_control.RegisterForegroundObject(lamp1);
_control.RegisterForegroundObject(lamp2);
_control.RegisterForegroundObject(lamp3);
_control.RegisterForegroundObject(lamp4);
_control.RegisterForegroundObject(deliveryVan);
_control.RegisterTopObject(hud);
_control.RegisterTopObject(panel);
_control.RegisterTopObject(alert);
_control.RegisterTopObject(satisfaction);
_control.RegisterTopObject(hudBorder);
_control.RegisterTopObject(lowerHud);
_control.RegisterTopObject(instructions);
_control.RegisterTopObject(summary);
spawner1.RegisterAnim(moobar.door);
spawner2.RegisterAnim(pub.door);
}
function meatStockStepperChange(eventObj) {
_control.__get__Kebab().MeatStockOrder = eventObj.stepperValue;
}
function chilliStockStepperChange(eventObj) {
_control.__get__Kebab().ChilliStockOrder = eventObj.stepperValue;
}
function saladStockStepperChange(eventObj) {
_control.__get__Kebab().SaladStockOrder = eventObj.stepperValue;
}
function meatMixStepperChange(eventObj) {
_control.__get__Kebab().MeatMix = eventObj.stepperValue;
}
function chilliMixStepperChange(eventObj) {
_control.__get__Kebab().ChilliMix = eventObj.stepperValue;
}
function saladMixStepperChange(eventObj) {
_control.__get__Kebab().SaladMix = eventObj.stepperValue;
}
function priceMixStepperChange(eventObj) {
_control.__get__Kebab().PriceMix = eventObj.stepperValue;
}
function orderCostChange(eventObj) {
panel.stockOrder.cost.text = eventObj.costFormat;
}
function profitChange(eventObj) {
panel.kebabMixer.profit.text = eventObj.profitFormat;
}
function moneyChanged(eventObj) {
lowerHud.money.money.text = eventObj.moneyFormat;
}
function satisfactionChanged(eventObj) {
satisfaction.bar._yscale = eventObj.satisfaction * 100;
}
function messageAlert(eventObj) {
alert.message.text = eventObj.message;
alert._visible = true;
}
function hideMessage(eventObj) {
alert._visible = false;
}
function newStockAdded(eventObj) {
lowerHud.stockLevels.meat.text = eventObj.meat;
lowerHud.stockLevels.salad.text = eventObj.salad;
lowerHud.stockLevels.chilli.text = eventObj.chilli;
}
function OpenStockScreen() {
if (!_control.__get__Kebab().WaitingDelivery) {
panel.stockOrder.meatStepper.quantity = 0;
panel.stockOrder.saladStepper.quantity = 0;
panel.stockOrder.chilliStepper.quantity = 0;
_control.__get__Kebab().MeatStockOrder = 0;
_control.__get__Kebab().ChilliStockOrder = 0;
_control.__get__Kebab().SaladStockOrder = 0;
panel.stockOrder.meatCost.text = Helper.formatCost(Config.MEAT_COST);
panel.stockOrder.saladCost.text = Helper.formatCost(Config.SALAD_COST);
panel.stockOrder.chilliCost.text = Helper.formatCost(Config.CHILLI_COST);
_control.PauseGame();
} else {
panel.stockOrder._visible = false;
_control.__get__Alerts().Show("Currently waiting delivery");
}
}
function OpenMixerScreen() {
_control.__get__Kebab().initMix();
panel.kebabMixer.meatStepper.quantity = _control.__get__Kebab().MeatMix;
panel.kebabMixer.saladStepper.quantity = _control.__get__Kebab().SaladMix;
panel.kebabMixer.chilliStepper.quantity = _control.__get__Kebab().ChilliMix;
panel.kebabMixer.priceStepper.quantity = _control.__get__Kebab().PriceMix;
_control.__get__Kebab().calcProfit();
_control.PauseGame();
}
function OpenUpgradeScreen() {
_control.PauseGame();
}
function CloseScreen() {
_control.UnPauseGame();
}
function GameEnded() {
summary.kebabs.text = _control.__get__Kebab().KebabsSold;
summary.pizzas.text = _control.__get__Kebab().PukeCount;
summary.cleanup.text = Helper.formatCost(_control.__get__Kebab().CleanUpBill);
summary.profit.text = Helper.formatCost(_control.__get__Kebab().FinalProfit);
_root.score = _control.__get__Kebab().FinalProfit * 100;
summary._visible = true;
removeAllObjects();
}
function removeAllObjects() {
target1.RemoveMe();
target2.RemoveMe();
target3.RemoveMe();
target4.RemoveMe();
target5.RemoveMe();
target6.RemoveMe();
target7.RemoveMe();
billboard.RemoveMe();
}
}
Symbol 681 MovieClip [__Packages.Model.Target] Frame 0
class Model.Target extends Model.Base
{
var _currentCustomers, _visible, _controlLoopInt, _control, _y;
function Target () {
super();
_currentCustomers = new Array();
_visible = false;
_controlLoopInt = setInterval(this, "controlLoop", 75);
_control.addPauseGameListener(this, pauseHandler);
_control.addUnPauseGameListener(this, unPauseHandler);
}
function get StoreCustomers() {
return(_storeCustomers);
}
function set StoreCustomers(val) {
_storeCustomers = val;
//return(StoreCustomers);
}
function AddCustomer(customer) {
if (_storeCustomers) {
_currentCustomers.push(customer);
}
}
function RemoveCustomer(customer) {
for (var _local2 in _currentCustomers) {
_currentCustomers[_local2].Artwork._y = _y + (_local2 * 5);
if (_currentCustomers[_local2] == customer) {
_currentCustomers.splice(_local2, 1);
}
}
}
function get yPos() {
return(_y + (_currentCustomers.length * 5));
}
function controlLoop() {
_currentCustomers[0].BuyKebab();
}
function pauseHandler(eventObj) {
if (_controlLoopInt != null) {
_resetControlLoopInt = true;
}
clearInterval(_controlLoopInt);
_controlLoopInt = null;
}
function RemoveMe() {
clearInterval(_controlLoopInt);
super.RemoveMe();
}
function unPauseHandler(eventObj) {
if (_resetControlLoopInt) {
_controlLoopInt = setInterval(this, "controlLoop", 75);
}
_resetControlLoopInt = false;
}
var _storeCustomers = false;
var _resetControlLoopInt = false;
}
Symbol 682 MovieClip [__Packages.Model.BaseObject] Frame 0
class Model.BaseObject extends Model.Base
{
var _artwork, _control;
function BaseObject (control) {
super(control);
}
function attachArtwork(attach) {
_artwork = _control.createEmptyClip("_artwork");
_artwork.attachMovie(attach, "inner", 1);
}
function get Artwork() {
return(_artwork);
}
}
Symbol 683 MovieClip [__Packages.Model.Customer] Frame 0
class Model.Customer extends Model.BaseObject
{
var _customerValues, _indicatorQueue, _spawner, _optionalTarget, _hourToSpawn, _minuteToSpawn, _control, _artwork, _actualTarget, _xTween, _walkDistance, _yTween, _buying, eventDispatcher, _indicatorInt;
function Customer (control) {
super(control);
_customerValues = new Model.CustomerValues(this, control);
_indicatorQueue = [];
}
function get Spawner() {
return(_spawner);
}
function set Spawner(val) {
_spawner = val;
//return(Spawner);
}
function get OptionalTarget() {
return(_optionalTarget);
}
function set OptionalTarget(val) {
_optionalTarget = val;
//return(OptionalTarget);
}
function Initialise(hourToSpawn, minuteToSpawn) {
_hourToSpawn = hourToSpawn;
_minuteToSpawn = minuteToSpawn;
_control.__get__Time().addTimeTickListener(this, spawnListen);
setup();
}
function spawnListen(eventObj) {
if ((eventObj.hours == _hourToSpawn) && (eventObj.minutes == _minuteToSpawn)) {
attachArtwork();
generateTarget();
calcWalkDistance();
createTweens(true);
_spawner.PlayAnim();
animate();
}
}
function attachArtwork() {
_artwork = _control.createEmptyClip("_artwork");
_artwork.attachMovie("man", "inner", 1);
_artwork.inner.eatEnd = mx.utils.Delegate.create(this, KebabEaten);
_artwork.inner.danceEnd = mx.utils.Delegate.create(this, ReactionEnded);
_artwork.inner.vomitEnd = mx.utils.Delegate.create(this, ReactionEnded);
_artwork.inner.collapseEnd = mx.utils.Delegate.create(this, ReactionEnded);
_artwork.inner.explodeEnd = mx.utils.Delegate.create(this, RemoveMe);
_artwork.inner.standing = mx.utils.Delegate.create(this, IsStanding);
_artFrame = 1 + Math.round(Math.random() * 15);
goToArtFrames();
showIndicator({frame:"pints"});
_artwork.inner.indicator.pintCount.text = _customerValues.Pissed;
}
function IsStanding() {
_isStanding = true;
}
function goToArtFrames() {
_artwork.inner.indicator.gotoAndStop(0);
_artwork.inner.head.gotoAndStop(_artFrame);
_artwork.inner.leftarm.gotoAndStop(_artFrame);
_artwork.inner.body.gotoAndStop(_artFrame);
_artwork.inner.rightarm.gotoAndStop(_artFrame);
_artwork.inner.rightupper.gotoAndStop(_artFrame);
_artwork.inner.leftupper.gotoAndStop(_artFrame);
_artwork.inner.rightfoot.gotoAndStop(_artFrame);
_artwork.inner.leftfoot.gotoAndStop(_artFrame);
}
function setup() {
_queueTime = 15000;
_eatTime = 50 + (Math.random() * 150);
}
function createTweens(firstIn) {
goToArtFrames();
if (_actualTarget._x < _spawner._x) {
_artwork._xscale = -100;
_artwork.inner.indicator._xscale = -100;
} else {
_artwork._xscale = 100;
_artwork.inner.indicator._xscale = 100;
}
_xTween = new mx.transitions.Tween(_artwork, "_x", mx.transitions.easing.None.easeNone, _spawner._x, _actualTarget._x, (_walkDistance / getWalkSpeed()) * 25, false);
_yTween = new mx.transitions.Tween(_artwork, "_y", mx.transitions.easing.None.easeNone, _spawner._y, _actualTarget.__get__yPos(), (_walkDistance / getWalkSpeed()) * 25, false);
_xTween.onMotionFinished = mx.utils.Delegate.create(this, xTweenEnded);
_yTween.onMotionFinished = mx.utils.Delegate.create(this, yTweenEnded);
_yTween.onMotionChanged = mx.utils.Delegate.create(this, tweening);
_xTween.onMotionChanged = mx.utils.Delegate.create(this, tweening);
}
function get Artwork() {
return(_artwork);
}
function tweening() {
goToArtFrames();
if (_buying) {
_buying = false;
_artwork.inner.gotoAndPlay(getWalkCycle());
}
if (_isStanding) {
_isStanding = false;
_artwork.inner.gotoAndPlay(getWalkCycle());
}
if (_eatCount > -1) {
_eatCount++;
if (_eatCount >= _eatTime) {
_artwork.inner.gotoAndPlay("eat");
goToArtFrames();
_xTween.stop();
_yTween.stop();
_eatCount = -1;
_isMoving = false;
}
}
}
function animate() {
_isMoving = true;
_xTween.start();
_yTween.start();
_artwork.inner.gotoAndPlay(getWalkCycle());
goToArtFrames();
eventDispatcher.dispatchEvent({type:"customerCreated", customer:this});
}
function resumeAnimate(eventObj) {
_xTween.resume();
_yTween.resume();
_isMoving = true;
_artwork.inner.gotoAndPlay(getWalkCycle());
goToArtFrames();
}
function calcWalkDistance() {
var _local3 = new flash.geom.Point(_spawner._x, _spawner._y);
var _local2 = new flash.geom.Point(_actualTarget._x, _actualTarget._y);
_walkDistance = flash.geom.Point.distance(_local3, _local2);
}
function generateTarget() {
if (_customerValues.CalcBuyDecision()) {
_actualTarget = _control.VanTarget;
_endRemove = false;
} else {
_actualTarget = _optionalTarget;
_endRemove = true;
}
}
function yTweenEnded() {
_yEnded = true;
_yTween.stop();
if (_xEnded) {
endAnimate();
_xEnded = false;
_yEnded = false;
}
}
function xTweenEnded() {
_xEnded = true;
_xTween.stop();
if (_yEnded) {
endAnimate();
_xEnded = false;
_yEnded = false;
}
}
function endAnimate() {
if (_endRemove) {
RemoveMe();
} else {
_actualTarget.AddCustomer(this);
clearInterval(_kebabQueueInt);
_kebabQueueInt = setInterval(this, "KebabNotBought", _queueTime);
_artwork.inner.gotoAndPlay("standkebab");
_buying = true;
goToArtFrames();
}
}
function RemoveMe() {
eventDispatcher.dispatchEvent({type:"customerRemoved", customer:this});
_artwork.swapDepths(15000);
_artwork.removeMovieClip();
clearInterval(_kebabQueueInt);
clearInterval(_indicatorInt);
super.RemoveMe();
}
function addCustomerCreatedListener(scope, handler) {
eventDispatcher.addEventListener("customerCreated", mx.utils.Delegate.create(scope, handler));
}
function addCustomerRemovedListener(scope, handler) {
eventDispatcher.addEventListener("customerRemoved", mx.utils.Delegate.create(scope, handler));
}
function getWalkCycle() {
if (_customerValues.__get__Pissed() > 8) {
return("collapse");
}
if (_customerValues.__get__Pissed() > 5) {
return("walk_pissed2");
}
if (_customerValues.__get__Pissed() > 2) {
return("walk_pissed");
}
return("walk_right");
}
function getWalkSpeed() {
var _local2 = Config.WALK_SPEED;
var _local3 = Config.CRAWL_SPEED;
var _local4 = Math.round((_local3 - _local2) * _customerValues.__get__PissedPercentage());
return(_local2 + _local4);
}
function KebabReaction() {
_control.__get__Kebab().CalcCustomerSatisfaction(_customerValues.__get__Satisfaction());
_indicatorQueue = [];
if (_customerValues.__get__Satisfaction() >= 0.9) {
_indicatorQueue.push({frame:"satisfied"});
} else if (_customerValues.__get__Satisfaction() <= 0.75) {
_indicatorQueue.push({frame:"swear"});
if (_customerValues.__get__MeatSatisfaction() < 0.75) {
_indicatorQueue.push({frame:"meat", up:1});
}
if (_customerValues.__get__SaladSatisfaction() < 0.75) {
_indicatorQueue.push({frame:"salad", up:1});
}
if (_customerValues.__get__ChilliSatisfaction() < 0.75) {
_indicatorQueue.push({frame:"chilli", up:1});
}
if (_customerValues.__get__PriceSatisfaction() < 0.75) {
_indicatorQueue.push({frame:"price", up:-1});
}
}
_currentIndicator = 0;
displayIndicators();
if (_customerValues.__get__FoodSatisfaction() <= 0.4) {
_artwork.inner.gotoAndPlay("vomit");
_control.__get__Kebab().AddPuke();
goToArtFrames();
return(undefined);
}
if (_customerValues.__get__ChilliHeatReaction()) {
_artwork.inner.gotoAndPlay("explode");
goToArtFrames();
return(undefined);
}
if (_customerValues.__get__Satisfaction() >= 0.75) {
_artwork.inner.gotoAndPlay("dance");
goToArtFrames();
return(undefined);
}
goToArtFrames();
resumeAnimate();
}
function BuyKebab() {
if (!_bought) {
_control.__get__Kebab().BuyKebab(this);
_bought = true;
}
}
function KebabBought() {
LeaveQueue();
_eatCount++;
}
function KebabNotBought() {
_control.__get__Kebab().CalcCustomerSatisfaction(_customerValues.__get__Satisfaction());
LeaveQueue();
showIndicator({frame:"swear"});
}
function KebabEaten() {
KebabReaction();
}
function ReactionEnded() {
resumeAnimate();
}
function LeaveQueue() {
clearInterval(_kebabQueueInt);
_kebabQueueInt = null;
_actualTarget.RemoveCustomer(this);
_endRemove = true;
_spawner = _control.VanSpawner;
_actualTarget = _control.getAlternativeTarget();
calcWalkDistance();
createTweens();
animate();
}
function displayIndicators() {
_artwork.inner.indicator._visible = false;
if (_currentIndicator < _indicatorQueue.length) {
showIndicator(_indicatorQueue[_currentIndicator]);
} else {
clearInterval(_indicatorInt);
_indicatorQueue = [];
}
_currentIndicator++;
}
function showIndicator(indicator) {
_artwork.inner.indicator._visible = true;
_artwork.inner.indicator.gotoAndStop(indicator.frame);
_artwork.inner.indicator.arrow._yscale = indicator.up * 100;
clearInterval(_indicatorInt);
_indicatorInt = setInterval(this, "displayIndicators", 1000);
}
var _currentIndicator = 0;
var _isStanding = false;
var _endRemove = true;
var _xEnded = false;
var _yEnded = false;
var _kebabQueueInt = null;
var _bought = false;
var _queueTime = 0;
var _eatTime = 0;
var _eatCount = -1;
var _artFrame = 0;
var _isMoving = false;
var _resetKebabQueueInt = false;
}
Symbol 684 MovieClip [__Packages.Model.CustomerValues] Frame 0
class Model.CustomerValues extends Model.Base
{
var _customer, _pissed, _control, _meat, _salad, _chilli, _price;
function CustomerValues (customer, control) {
super(control);
_customer = customer;
}
function get Customer() {
return(_customer);
}
function get pissedInc() {
return((Config.MAX_PISSED + 1) / Config.TIME_LENGTH);
}
function set Pissed(value) {
_pissed = value;
//return(Pissed);
}
function get Pissed() {
if (_pissed == null) {
_pissed = _control.__get__Time().HoursIn * pissedInc;
_pissed = _pissed + Math.round(Math.random() * pissedInc);
_pissed = Math.min(_pissed, Config.MAX_PISSED);
}
return(_pissed);
}
function get PissedPercentage() {
return(Pissed / 10);
}
function get Meat() {
return(_control.__get__Kebab().Meat);
}
function set Meat(value) {
_meat = value;
//return(Meat);
}
function get Salad() {
return(_control.__get__Kebab().Salad);
}
function set Salad(value) {
_salad = value;
//return(Salad);
}
function get Chilli() {
return(_control.__get__Kebab().Chilli);
}
function set Chilli(value) {
_chilli = value;
//return(Chilli);
}
function get Price() {
return(_control.__get__Kebab().Price);
}
function set Price(value) {
_price = value;
//return(Price);
}
function get OverallSatisfaction() {
return(_control.__get__Kebab().CustomerSatisfaction);
}
function get MeatRequirement() {
var _local2 = 2;
var _local3 = 8;
var _local4 = Math.round((_local3 - _local2) * PissedPercentage);
return(_local2 + _local4);
}
function get ChilliRequirement() {
var _local2 = 1;
var _local3 = 12;
var _local4 = Math.round((_local3 - _local2) * PissedPercentage);
return(_local2 + _local4);
}
function get SaladRequirement() {
var _local2 = 5;
var _local3 = 0;
var _local4 = Math.round((_local3 - _local2) * PissedPercentage);
return(_local2 + _local4);
}
function get RequirementCost() {
var _local2 = MeatRequirement * Config.MEAT_COST;
_local2 = _local2 + (SaladRequirement * Config.SALAD_COST);
_local2 = _local2 + (ChilliRequirement * Config.CHILLI_COST);
return(_local2);
}
function get ProfitAllowance() {
var _local2 = 4;
var _local3 = 12;
var _local4 = Math.round((_local3 - _local2) * PissedPercentage);
return(_local2 + _local4);
}
function get PriceRequirement() {
var _local2 = (ProfitAllowance / 10) * RequirementCost;
return(RequirementCost + _local2);
}
function get ActualCost() {
var _local2 = Meat * Config.MEAT_COST;
_local2 = _local2 + (Salad * Config.SALAD_COST);
_local2 = _local2 + (Chilli * Config.CHILLI_COST);
return(_local2);
}
function get MeatSatisfaction() {
var _local2 = Meat - MeatRequirement;
_local2 = Math.max(0, (_local2 / MeatRequirement) + 1);
return(Math.min(_local2, 1));
}
function get SaladSatisfaction() {
var _local2 = Salad - SaladRequirement;
_local2 = Math.max(0, (_local2 / SaladRequirement) + 1);
return(Math.min(_local2, 1));
}
function get ChilliSatisfaction() {
var _local2 = Chilli - ChilliRequirement;
_local2 = Math.max(0, (_local2 / ChilliRequirement) + 1);
return(Math.min(_local2, 1));
}
function get PriceSatisfaction() {
var _local2 = Price - PriceRequirement;
_local2 = Math.max(0, 1 - (_local2 / PriceRequirement));
return(Math.min(_local2, 1));
}
function get Satisfaction() {
var _local2 = ((MeatSatisfaction * SaladSatisfaction) * ChilliSatisfaction) * PriceSatisfaction;
return(_local2);
}
function get FoodSatisfaction() {
var _local2 = (MeatSatisfaction + SaladSatisfaction) + ChilliSatisfaction;
return(_local2 / 3);
}
function get Attractiveness() {
return(OverallSatisfactionAttractiveness * PriceSatisfaction);
}
function get OverallSatisfactionAttractiveness() {
var _local2 = Math.max(OverallSatisfaction, 0.35);
var _local3 = 1;
var _local4 = (_local3 - _local2) * (PissedPercentage + 0.1);
return(_local2 + _local4);
}
function CalcBuyDecision() {
var _local2 = Math.random();
_control.__get__Kebab().PriceSatisfaction = PriceSatisfaction;
if (Attractiveness > _local2) {
return(true);
}
return(false);
}
function get ChilliHeatReaction() {
var _local2 = 4;
var _local3 = ChilliRequirement * 3;
var _local4 = Math.round((_local3 - _local2) * PissedPercentage);
return(Chilli >= (_local2 + _local4));
}
}
Symbol 685 MovieClip [__Packages.Config] Frame 0
class Config
{
function Config () {
}
static var START_TIME = 21;
static var TIME_LENGTH = 5;
static var CLOCK_SPEED = 0.5;
static var SPEED_MULTIPLIER = 1500;
static var CUSTOMERS_PER_HOUR = 14;
static var WALK_SPEED = 35;
static var CRAWL_SPEED = 15;
static var MAX_PISSED = 9;
static var CHILLI_COST = 0.05;
static var SALAD_COST = 0.45;
static var MEAT_COST = 0.22;
static var MIN_ORDER_AMOUNT = 5;
static var CAR_SPEED = 200;
static var BASE_CAR_INTERVAL = 3000;
static var CAR_INTERVAL_VARIANCE = 8000;
static var DELIVERY_TIME = 5000;
static var DELIVERY_MAN_FRAME = 16;
static var DELIVERY_VAN_FRAME = 5;
static var ALERT_TIME = 2000;
static var MESSAGE_REPLAY_TIME = 15000;
static var CLEANUP_PRICE = 0.25;
static var ADS_XML = "http://www.kebabvan.com/KebabAds/Ads.xml";
static var AD_DISPLAY_TIME = 15000;
}
Symbol 686 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 687 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(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();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 688 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 689 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 690 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 691 MovieClip [__Packages.Helper] Frame 0
class Helper
{
function Helper () {
}
static function roundToPlace(val, places) {
var _local1 = Math.pow(10, places);
return(int(val * _local1) / _local1);
}
static function formatCost(val) {
val = roundToPlace(val, 2);
var _local2 = val.toString().split(".");
if (_local2[1].length == 1) {
return(("\u00A3" + val) + "0");
}
if (_local2[1] == null) {
return(("\u00A3" + val) + ".00");
}
return("\u00A3" + val);
}
static function AddPercentage(value, percentage) {
var _local1 = (percentage / 100) * value;
return(value + _local1);
}
}
Symbol 692 MovieClip [__Packages.Model.Time] Frame 0
class Model.Time extends Model.Base
{
var _control, _timeInterval, eventDispatcher;
function Time (control) {
super(control);
_control.addPauseGameListener(this, pauseHandler);
_control.addUnPauseGameListener(this, unPauseHandler);
}
function get Minutes() {
return(_minutes);
}
function get Hours() {
var _local2 = _hours + Config.START_TIME;
if (_local2 > 23) {
_local2 = _local2 - 24;
}
return(_local2);
}
function get HoursIn() {
return(_hours);
}
function Initialise() {
_hasStarted = true;
StartTimer();
}
function get HasStarted() {
return(_hasStarted);
}
function StartTimer() {
clearInterval(_timeInterval);
_timeInterval = setInterval(this, "Tick", Config.SPEED_MULTIPLIER * Config.CLOCK_SPEED);
eventDispatcher.dispatchEvent({type:"timeHour", timeString:getTimeString(), hours:_hours, minutes:_minutes});
}
function EndTimer() {
clearInterval(_timeInterval);
}
function Tick() {
if (_hours <= Config.TIME_LENGTH) {
eventDispatcher.dispatchEvent({type:"timeTick", timeString:getTimeString(), hours:_hours, minutes:_minutes});
} else {
clearInterval(_timeInterval);
eventDispatcher.dispatchEvent({type:"timeEnd"});
}
_minutes++;
if (_minutes > 59) {
_minutes = 0;
_hours++;
eventDispatcher.dispatchEvent({type:"timeHour", timeString:getTimeString(), hours:_hours, minutes:_minutes});
}
}
function addTimeTickListener(scope, handler) {
eventDispatcher.addEventListener("timeTick", mx.utils.Delegate.create(scope, handler));
}
function addTimeHourListener(scope, handler) {
eventDispatcher.addEventListener("timeHour", mx.utils.Delegate.create(scope, handler));
}
function addTimeEndListener(scope, handler) {
eventDispatcher.addEventListener("timeEnd", mx.utils.Delegate.create(scope, handler));
}
function getTimeString() {
var _local2 = ((Minutes > 9) ? (Minutes.toString()) : ("0" + Minutes.toString()));
var _local3 = ((Hours > 9) ? (Hours.toString()) : ("0" + Hours.toString()));
return((_local3 + ":") + _local2);
}
function pauseHandler(eventObj) {
clearInterval(_timeInterval);
}
function unPauseHandler(eventObj) {
StartTimer();
}
var _minutes = 0;
var _hours = 0;
var _hasStarted = false;
}
Symbol 693 MovieClip [__Packages.Model.Kebab] Frame 0
class Model.Kebab extends Model.Base
{
var _control, _waitingDelivery, _deliveryInt, eventDispatcher, _currentCustomer;
function Kebab (control) {
super(control);
_control.addPauseGameListener(this, pauseHandler);
_control.addUnPauseGameListener(this, unPauseHandler);
}
function okStock() {
if (_orderCost <= _money) {
if (!_initStockSet) {
deliverStock();
} else if (!_control.__get__Delivery().IsDelivering) {
_waitingDelivery = true;
_deliveryInt = setInterval(this, "deliverAnim", Config.DELIVERY_TIME);
}
} else {
_control.__get__Alerts().Show("You don't have enough money to make this order!");
return(false);
}
return(true);
}
function deliverAnim() {
clearInterval(_deliveryInt);
_control.__get__Delivery().addDeliverListener(this, deliverStock);
_control.__get__Delivery().Initialise();
}
function deliverStock() {
_chilliStock = _chilliStock + _chilliStockOrder;
_meatStock = _meatStock + _meatStockOrder;
_saladStock = _saladStock + _saladStockOrder;
_money = _money - _orderCost;
_chilliStockOrder = 0;
_meatStockOrder = 0;
_saladStockOrder = 0;
eventDispatcher.dispatchEvent({type:"newStockAdded", meat:_meatStock, chilli:_chilliStock, salad:_saladStock});
eventDispatcher.dispatchEvent({type:"moneyChanged", money:_money, moneyFormat:Helper.formatCost(_money)});
_initStockSet = true;
isKebabReady();
if (_currentCustomer) {
kebabBought(true);
}
_waitingDelivery = false;
}
function okMix() {
_chilli = _chilliMix;
_meat = _meatMix;
_salad = _saladMix;
_price = _priceMix;
_initMixSet = true;
isKebabReady();
if (_currentCustomer) {
kebabBought(true);
}
return(true);
}
function get WaitingDelivery() {
return(_waitingDelivery);
}
function get ChilliStockOrder() {
return(_chilliStockOrder);
}
function set ChilliStockOrder(val) {
_chilliStockOrder = Math.max(val, 0);
calcOrderCost();
//return(ChilliStockOrder);
}
function get SaladStockOrder() {
return(_chilliStockOrder);
}
function set SaladStockOrder(val) {
_saladStockOrder = Math.max(val, 0);
calcOrderCost();
//return(SaladStockOrder);
}
function get MeatStockOrder() {
return(_chilliStockOrder);
}
function set MeatStockOrder(val) {
_meatStockOrder = Math.max(val, 0);
calcOrderCost();
//return(MeatStockOrder);
}
function get ChilliMix() {
return(_chilliMix);
}
function set ChilliMix(val) {
_chilliMix = val;
calcProfit();
//return(ChilliMix);
}
function get MeatMix() {
return(_meatMix);
}
function set MeatMix(val) {
_meatMix = val;
calcProfit();
//return(MeatMix);
}
function get SaladMix() {
return(_saladMix);
}
function set SaladMix(val) {
_saladMix = val;
calcProfit();
//return(SaladMix);
}
function get PriceMix() {
return(_priceMix);
}
function set PriceMix(val) {
_priceMix = val;
calcProfit();
//return(PriceMix);
}
function get Money() {
return(_money);
}
function get Meat() {
return(_meat);
}
function get Chilli() {
return(_chilli);
}
function get Salad() {
return(_salad);
}
function get MeatStock() {
return(_meatStock);
}
function get ChilliStock() {
return(_chilliStock);
}
function get SaladStock() {
return(_saladStock);
}
function get Price() {
return(_price);
}
function get ServeTime() {
return(_serveTime);
}
function calcOrderCost() {
_orderCost = 0;
_orderCost = _orderCost + (_meatStockOrder * Config.MEAT_COST);
_orderCost = _orderCost + (_saladStockOrder * Config.SALAD_COST);
_orderCost = _orderCost + (_chilliStockOrder * Config.CHILLI_COST);
eventDispatcher.dispatchEvent({type:"orderCostChange", cost:_orderCost, costFormat:Helper.formatCost(_orderCost)});
}
function calcProfit() {
_cost = 0;
_cost = _cost + (_meatMix * Config.MEAT_COST);
_cost = _cost + (_saladMix * Config.SALAD_COST);
_cost = _cost + (_chilliMix * Config.CHILLI_COST);
_profit = _priceMix - _cost;
eventDispatcher.dispatchEvent({type:"profitChange", profit:_profit, profitFormat:Helper.formatCost(_profit)});
}
function initMix() {
_meatMix = _meat;
_saladMix = _salad;
_chilliMix = _chilli;
_priceMix = _price;
}
function isKebabReady() {
if ((_initStockSet && (_initMixSet)) && (!_isKebabReady)) {
_isKebabReady = true;
eventDispatcher.dispatchEvent({type:"kebabReady", profit:_profit, profitFormat:Helper.formatCost(_profit)});
eventDispatcher.dispatchEvent({type:"satisfactionChanged", satisfaction:_customerSatisfaction});
}
}
function get Ready() {
return(_isKebabReady);
}
function BuyKebab(currentCustomer) {
_currentCustomer = currentCustomer;
clearInterval(_serveInt);
_serveInt = setInterval(this, "kebabBought", ServeTime);
}
function kebabBought(traceIt) {
clearInterval(_serveInt);
_serveInt = null;
if (traceIt) {
}
if (KebabsAvailable) {
_currentCustomer.KebabBought();
_kebabsSold++;
_chilliStock = _chilliStock - _chilli;
_meatStock = _meatStock - _meat;
_saladStock = _saladStock - _salad;
_money = _money + _price;
eventDispatcher.dispatchEvent({type:"newStockAdded", meat:_meatStock, chilli:_chilliStock, salad:_saladStock});
eventDispatcher.dispatchEvent({type:"moneyChanged", money:_money, moneyFormat:Helper.formatCost(_money)});
_currentCustomer = null;
}
}
function CalcCustomerSatisfaction(addSatisfaction) {
_totalBought++;
_totalSatisfaction = _totalSatisfaction + addSatisfaction;
_customerSatisfaction = _totalSatisfaction / _totalBought;
eventDispatcher.dispatchEvent({type:"satisfactionChanged", satisfaction:_customerSatisfaction});
}
function get KebabsSold() {
return(_kebabsSold);
}
function get PriceSatisfaction() {
return(_priceSatisfaction);
}
function set PriceSatisfaction(value) {
_priceSatisfaction = value;
//return(PriceSatisfaction);
}
function get KebabsAvailable() {
if (((((_chilliStock < _chilli) && (_chilli != 0)) || (_meatStock < _meat)) || (_meat == 0)) || ((_saladStock < _salad) && (_salad != 0))) {
return(0);
}
return(1);
}
function AddPuke() {
_pukeCount++;
}
function get PukeCount() {
return(_pukeCount);
}
function get CleanUpBill() {
return(_pukeCount * Config.CLEANUP_PRICE);
}
function get FinalProfit() {
return(Math.max(_money - CleanUpBill, 0));
}
function get CustomerSatisfaction() {
return(_customerSatisfaction);
}
function addChilliStockChangeListener(scope, handler) {
eventDispatcher.addEventListener("chilliStockChange", mx.utils.Delegate.create(scope, handler));
}
function addMeatStockChangeListener(scope, handler) {
eventDispatcher.addEventListener("meatStockChange", mx.utils.Delegate.create(scope, handler));
}
function addSaladStockChangeListener(scope, handler) {
eventDispatcher.addEventListener("saladStockChange", mx.utils.Delegate.create(scope, handler));
}
function addOrderCostChangeListener(scope, handler) {
eventDispatcher.addEventListener("orderCostChange", mx.utils.Delegate.create(scope, handler));
}
function addChilliMixChangeListener(scope, handler) {
eventDispatcher.addEventListener("chilliMixChange", mx.utils.Delegate.create(scope, handler));
}
function addMeatMixChangeListener(scope, handler) {
eventDispatcher.addEventListener("meatMixChange", mx.utils.Delegate.create(scope, handler));
}
function addSaladMixChangeListener(scope, handler) {
eventDispatcher.addEventListener("saladMixChange", mx.utils.Delegate.create(scope, handler));
}
function addPriceChangeListener(scope, handler) {
eventDispatcher.addEventListener("priceChange", mx.utils.Delegate.create(scope, handler));
}
function addProfitChangeListener(scope, handler) {
eventDispatcher.addEventListener("profitChange", mx.utils.Delegate.create(scope, handler));
}
function addSatisfactionChangedListener(scope, handler) {
eventDispatcher.addEventListener("satisfactionChanged", mx.utils.Delegate.create(scope, handler));
}
function addNewStockAddedListener(scope, handler) {
eventDispatcher.addEventListener("newStockAdded", mx.utils.Delegate.create(scope, handler));
}
function addMoneyChangedListener(scope, handler) {
eventDispatcher.addEventListener("moneyChanged", mx.utils.Delegate.create(scope, handler));
}
function addKebabReadyListener(scope, handler) {
eventDispatcher.addEventListener("kebabReady", mx.utils.Delegate.create(scope, handler));
}
function pauseHandler(eventObj) {
if (_serveInt != null) {
_resetServeInt = true;
}
clearInterval(_serveInt);
_serveInt = null;
}
function unPauseHandler(eventObj) {
if (_resetServeInt) {
_serveInt = setInterval(this, "kebabBought", ServeTime);
}
_resetServeInt = false;
}
function RemoveMe() {
clearInterval(_serveInt);
clearInterval(_deliveryInt);
super.RemoveMe();
}
var _chilli = 0;
var _meat = 0;
var _salad = 0;
var _price = 0;
var _chilliMix = 0;
var _meatMix = 0;
var _saladMix = 0;
var _priceMix = 0;
var _cost = 0;
var _profit = 0;
var _chilliStock = 0;
var _saladStock = 0;
var _meatStock = 0;
var _chilliStockOrder = 0;
var _saladStockOrder = 0;
var _meatStockOrder = 0;
var _orderCost = 0;
var _money = 100;
var _initMixSet = false;
var _initStockSet = false;
var _isKebabReady = false;
var _customerSatisfaction = 0.5;
var _totalBought = 1;
var _totalSatisfaction = 0.5;
var _pukeCount = 0;
var _kebabsSold = 0;
var _priceSatisfaction = 1;
var _serveTime = 2000;
var _serveInt = null;
var _resetServeInt = false;
}
Symbol 694 MovieClip [__Packages.Model.Delivery] Frame 0
class Model.Delivery extends Model.Base
{
var _isDelivering, _van, _spawner, _vanTween, _man, _control, _target, _comingBack, _manTweenX, _walkDistance, _manTweenY, _manXEnded, _manYEnded, eventDispatcher;
function Delivery (control) {
super(control);
}
function Initialise() {
_isDelivering = true;
_van.gotoAndStop(Config.DELIVERY_VAN_FRAME);
var _local2 = _spawner._x;
var _local3 = _local2 - _van._x;
_vanTween = new mx.transitions.Tween(_van, "_x", mx.transitions.easing.None.easeNone, _van._x, _local2, (_local3 / Config.CAR_SPEED) / 2, true);
_vanTween.onMotionFinished = mx.utils.Delegate.create(this, initialVanStop);
}
function initialVanStop() {
_man = _control.createEmptyClip("_man");
_van.wheelfront.stop();
_van.wheelback.stop();
_van.swapDepths(_man);
_man.attachMovie("man", "inner", 1);
_man.inner.gotoAndPlay("walk_right");
goToArtFrames();
calcWalkDistance(_spawner, _target);
_comingBack = false;
makeManTweens(_spawner, _target);
}
function makeManTweens(startObj, endObject) {
_manTweenX = new mx.transitions.Tween(_man, "_x", mx.transitions.easing.None.easeNone, startObj._x, endObject._x, _walkDistance / Config.WALK_SPEED, true);
_manTweenY = new mx.transitions.Tween(_man, "_y", mx.transitions.easing.None.easeNone, startObj._y, endObject._y, _walkDistance / Config.WALK_SPEED, true);
_manXEnded = false;
_manYEnded = false;
_manTweenX.onMotionFinished = mx.utils.Delegate.create(this, manTweenXEnded);
_manTweenY.onMotionFinished = mx.utils.Delegate.create(this, manTweenYEnded);
}
function manTweenXEnded() {
_manXEnded = true;
if (_manYEnded) {
endManAnim();
}
}
function manTweenYEnded() {
_manYEnded = true;
if (_manXEnded) {
endManAnim();
}
}
function endManAnim() {
if (!_comingBack) {
_comingBack = true;
_man.inner._xscale = _man.inner._xscale * -1;
_man.inner.gotoAndPlay("walk_right");
goToArtFrames();
calcWalkDistance(_target, _spawner);
makeManTweens(_target, _spawner);
eventDispatcher.dispatchEvent({type:"deliver"});
} else {
_man.removeMovieClip();
_control.RemoveForegroundObject(_man);
var _local2 = Stage.width + _van._width;
var _local3 = _local2 - _van._x;
_van.wheelfront.play();
_van.wheelback.play();
_vanTween = new mx.transitions.Tween(_van, "_x", mx.transitions.easing.None.easeNone, _van._x, _local2, (_local3 / Config.CAR_SPEED) / 2, true);
_vanTween.onMotionFinished = mx.utils.Delegate.create(this, finalVanStop);
}
}
function finalVanStop() {
_van._x = -_van._width;
_isDelivering = false;
}
function calcWalkDistance(obj1, obj2) {
var _local3 = new flash.geom.Point(obj1._x, obj1._y);
var _local2 = new flash.geom.Point(obj2._x, obj2._y);
_walkDistance = flash.geom.Point.distance(_local3, _local2);
}
function goToArtFrames() {
_man.inner.head.gotoAndStop(Config.DELIVERY_MAN_FRAME);
_man.inner.leftarm.gotoAndStop(Config.DELIVERY_MAN_FRAME);
_man.inner.body.gotoAndStop(Config.DELIVERY_MAN_FRAME);
_man.inner.rightarm.gotoAndStop(Config.DELIVERY_MAN_FRAME);
_man.inner.rightupper.gotoAndStop(Config.DELIVERY_MAN_FRAME);
_man.inner.leftupper.gotoAndStop(Config.DELIVERY_MAN_FRAME);
_man.inner.rightfoot.gotoAndStop(Config.DELIVERY_MAN_FRAME);
_man.inner.leftfoot.gotoAndStop(Config.DELIVERY_MAN_FRAME);
}
function get IsDelivering() {
return(_isDelivering);
}
function get Spawner() {
return(_spawner);
}
function set Spawner(value) {
_spawner = value;
//return(Spawner);
}
function get Target() {
return(_target);
}
function set Target(value) {
_target = value;
//return(Target);
}
function get Van() {
return(_van);
}
function get Man() {
return(_man);
}
function get ManComingBack() {
return(_comingBack);
}
function set Van(value) {
_van = value;
//return(Van);
}
function addDeliverListener(scope, handler) {
eventDispatcher.addEventListener("deliver", mx.utils.Delegate.create(scope, handler));
}
}
Symbol 695 MovieClip [__Packages.Model.Alerts] Frame 0
class Model.Alerts extends Model.Base
{
var _alertQueue, _oldAlertQueue, _controlLoop, eventDispatcher;
function Alerts (control) {
super(control);
_alertQueue = [];
_oldAlertQueue = [];
_controlLoop = setInterval(this, "controlMessages", Config.ALERT_TIME);
}
function AddMessage(message, type) {
var _local5 = new Object({message:message, time:0, type:type});
for (var _local4 in _alertQueue) {
if (_alertQueue[_local4].type == type) {
return(undefined);
}
}
for (var _local4 in _oldAlertQueue) {
if (_oldAlertQueue[_local4].message == message) {
return(undefined);
}
}
_alertQueue.push(_local5);
}
function Show(message) {
var _local2 = new Object({message:message, noQueue:true});
_alertQueue.unshift(_local2);
controlMessages();
clearInterval(_controlLoop);
_controlLoop = setInterval(this, "controlMessages", Config.ALERT_TIME);
}
function controlMessages() {
if (_alertQueue.length > 0) {
var _local2 = _alertQueue.pop();
if (!_local2.noQueue) {
_local2.time = Config.MESSAGE_REPLAY_TIME;
_oldAlertQueue.push(_local2);
}
eventDispatcher.dispatchEvent({type:"message", message:_local2.message});
} else {
eventDispatcher.dispatchEvent({type:"noMessage"});
}
processOldAlerts();
}
function processOldAlerts() {
for (var _local2 in _oldAlertQueue) {
_oldAlertQueue[_local2].time = _oldAlertQueue[_local2].time - Config.ALERT_TIME;
if (_oldAlertQueue[_local2].time <= 0) {
_oldAlertQueue.splice(_local2, 1);
}
}
}
function RemoveMe() {
clearInterval(_controlLoop);
super.RemoveMe();
}
function addMessageListener(scope, handler) {
eventDispatcher.addEventListener("message", mx.utils.Delegate.create(scope, handler));
}
function addNoMessageListener(scope, handler) {
eventDispatcher.addEventListener("noMessage", mx.utils.Delegate.create(scope, handler));
}
}
Symbol 696 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 697 MovieClip [__Packages.Model.Spawner] Frame 0
class Model.Spawner extends Model.Base
{
var _customers, _visible, _anim;
function Spawner (control) {
super(control);
_customers = new Array();
_visible = false;
}
function RegisterCustomer(timeSlot, customer) {
if (_customers[timeSlot] == null) {
_customers[timeSlot] = new Array();
}
_customers[timeSlot].push(customer);
}
function Initialise() {
initialiseCustomers();
}
function initialiseCustomers() {
var _local3 = 0;
while (_local3 < _customers.length) {
var _local2 = 0;
while (_local2 < _customers[_local3].length) {
var _local4 = 59 / _customers[_local3].length;
var _local5 = Math.random() * _local4;
var _local6 = (_local4 * _local2) + _local5;
_customers[_local3][_local2].Initialise(_local3, Math.floor(_local6));
_local2++;
}
_local3++;
}
}
function RegisterAnim(anim) {
_anim = anim;
}
function PlayAnim() {
_anim.play();
}
}
Symbol 698 MovieClip [__Packages.Model.Car] Frame 0
class Model.Car extends Model.Base
{
var gotoAndStop, _totalframes, _startPos, _endPos, _y, _xscale, _moveTween, eventDispatcher;
function Car (control) {
super(control);
}
function Initialise() {
(gotoAndStop(Math.ceil(Math.random() * _totalframes)));// not popped
if (!goingLeft) {
_startPos = -200;
_endPos = 800;
_y = 425;
} else {
_xscale = _xscale * -1;
_startPos = 800;
_endPos = -200;
_y = 450;
}
_moveTween = new mx.transitions.Tween(this, "_x", mx.transitions.easing.None.easeNone, _startPos, _endPos, 1000 / Config.CAR_SPEED, true);
_moveTween.onMotionFinished = mx.utils.Delegate.create(this, RemoveMe);
_moveTween.start();
}
function RemoveMe() {
eventDispatcher.dispatchEvent({type:"carRemoved", car:this});
super.RemoveMe();
}
function addCarRemovedListener(scope, handler) {
eventDispatcher.addEventListener("carRemoved", mx.utils.Delegate.create(scope, handler));
}
function get goingLeft() {
return(Math.round(Math.random()));
}
}
Symbol 699 MovieClip [__Packages.Model.BillBoard] Frame 0
class Model.BillBoard
{
var _movieClipLoader, _ads, _xml, panels, _displayInt, ad1, ad2;
function BillBoard () {
_movieClipLoader = new MovieClipLoader();
_movieClipLoader.addListener(this);
_ads = new Array();
_xml = new XML();
_xml.ignoreWhite = true;
_xml.onLoad = mx.utils.Delegate.create(this, xmlLoaded);
_xml.load(Config.ADS_XML);
}
function onLoadInit(mc) {
var _local2 = 1;
while (_local2 <= 7) {
panels["panel" + _local2].play();
_local2++;
}
}
function onLoadError(mc, errorCode) {
}
function onRelease() {
if (_currentAd > -1) {
getURL (_ads[_currentAd].ClickUrl, "_blank");
}
}
function xmlLoaded(success) {
if (success) {
for (var _local5 in _xml.firstChild.childNodes) {
var _local3 = new Object();
for (var _local4 in _xml.firstChild.childNodes[_local5].childNodes) {
var _local2 = _xml.firstChild.childNodes[_local5].childNodes[_local4];
_local3[_local2.nodeName] = _local2.firstChild.nodeValue;
}
_ads.push(_local3);
}
displayAd();
_displayInt = setInterval(this, "displayAd", Config.AD_DISPLAY_TIME);
}
}
function RemoveMe() {
clearInterval(_displayInt);
super.RemoveMe();
}
function displayAd() {
var _local2 = _currentAd;
var _local3 = 0;
while (_local2 == _currentAd) {
_local2 = Math.round(Math.random() * (_ads.length - 1));
if (_ads[_local2].Active != "True") {
_local2 = _currentAd;
}
_local3++;
if (_local3 > 1000) {
clearInterval(_displayInt);
break;
}
}
_currentAd = _local2;
if (_frontAd) {
_movieClipLoader.loadClip(_ads[_currentAd].Artwork, ad1);
_frontAd = false;
} else {
_movieClipLoader.loadClip(_ads[_currentAd].Artwork, ad2);
_frontAd = true;
}
}
var _frontAd = false;
var _currentAd = -1;
}
Symbol 45 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 12
stop();
Symbol 51 MovieClip [billboard] Frame 1
#initclip 28
Object.registerClass("billboard", Model.BillBoard);
#endinitclip
Symbol 68 MovieClip [Cars] Frame 1
#initclip 26
Object.registerClass("Cars", Model.Car);
#endinitclip
stop();
Symbol 76 MovieClip [DeliveryVans] Frame 1
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
onEnterFrame = function () {
var _local1 = Math.round(Math.random() * 1000);
if (_local1 >= 999) {
play();
}
};
Symbol 128 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 1
rand = Math.round(Math.random() * 20);
gotoAndPlay(rand);
Symbol 133 MovieClip Frame 20
gotoAndPlay (2);
Symbol 137 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 1
eyelids.play();
var blink = Math.round(Math.random() * 200);
var counter = 1;
this.createEmptyMovieClip("blinker", this.getNextHighestDepth());
blinker.onEnterFrame = function () {
counter++;
if (counter == blink) {
eyelids.play();
counter = 0;
blink = Math.round(Math.random() * 200);
}
};
Symbol 146 MovieClip Frame 1
eyelids.play();
var blink = Math.round(Math.random() * 200);
var counter = 1;
this.createEmptyMovieClip("blinker", this.getNextHighestDepth());
blinker.onEnterFrame = function () {
counter++;
if (counter == blink) {
eyelids.play();
counter = 0;
blink = Math.round(Math.random() * 200);
}
};
Symbol 149 MovieClip Frame 1
eyelids.play();
var blink = Math.round(Math.random() * 200);
var counter = 1;
this.createEmptyMovieClip("blinker", this.getNextHighestDepth());
blinker.onEnterFrame = function () {
counter++;
if (counter == blink) {
eyelids.play();
counter = 0;
blink = Math.round(Math.random() * 200);
}
};
Symbol 151 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 10
stop();
Symbol 221 Button
on (press) {
_parent.panel.kebabMixer._visible = false;
_parent.panel.stockOrder._visible = true;
_parent.panel.upgrades._visible = false;
_parent.OpenStockScreen();
}
Symbol 223 Button
on (press) {
_parent.panel.kebabMixer._visible = true;
_parent.panel.stockOrder._visible = false;
_parent.panel.upgrades._visible = false;
_parent.OpenMixerScreen();
}
Symbol 226 Button
on (press) {
_parent.panel.kebabMixer._visible = false;
_parent.panel.stockOrder._visible = false;
_parent.panel.upgrades._visible = true;
upgrades.gotoAndStop("initial");
_parent.OpenUpgradeScreen();
}
Symbol 264 Button
on (release) {
if (_parent._parent.okKebabStock()) {
_visible = false;
_parent.mixerButton._visible = true;
_parent.orderButton._visible = true;
}
}
Symbol 269 MovieClip Frame 1
function goUp() {
quantity = quantity + inc;
if (inc < 1) {
quantity = Helper.roundToPlace(quantity, 2);
}
this._parent.quantity.text = quantity;
eventDispatcher.dispatchEvent({type:"stepperChange", stepperValue:quantity});
}
function goDown() {
if (quantity > 0) {
quantity = quantity - inc;
if (inc < 1) {
quantity = Helper.roundToPlace(quantity, 2);
}
} else {
quantity = 0;
}
this._parent.quantity.text = quantity;
eventDispatcher.dispatchEvent({type:"stepperChange", stepperValue:quantity});
}
function addStepperChangeListener(scope, handler) {
eventDispatcher.addEventListener("stepperChange", mx.utils.Delegate.create(scope, handler));
}
eventDispatcher = new mx.events.EventDispatcher();
quantity = 0;
if (!inc) {
inc = 1;
}
var scope = this;
up.onPress = function () {
goUp();
incInt = setInterval(scope, "goUp", 100);
};
down.onPress = function () {
goDown();
incInt = setInterval(scope, "goDown", 100);
};
up.onRelease = function () {
clearInterval(incInt);
};
up.onReleaseOutside = up.onRelease;
up.onDragOut = up.onDragOut;
down.onRelease = up.onRelease;
down.onReleaseOutside = up.onRelease;
down.onDragOut = up.onDragOut;
Symbol 274 Button
on (release) {
this._visible = false;
_parent.mixerButton._visible = true;
_parent.orderButton._visible = true;
_parent.upgradeButton._visible = true;
_parent._parent.CloseScreen();
}
Instance of Symbol 269 MovieClip "meatStepper" in Symbol 281 MovieClip Frame 1
onClipEvent (load) {
this.inc = Config.MIN_ORDER_AMOUNT;
}
Instance of Symbol 269 MovieClip "chilliStepper" in Symbol 281 MovieClip Frame 1
onClipEvent (load) {
this.inc = Config.MIN_ORDER_AMOUNT;
}
Instance of Symbol 269 MovieClip "saladStepper" in Symbol 281 MovieClip Frame 1
onClipEvent (load) {
this.inc = Config.MIN_ORDER_AMOUNT;
}
Symbol 284 Button
on (release) {
if (_parent._parent.okKebabMix()) {
_visible = false;
_parent.mixerButton._visible = true;
_parent.orderButton._visible = true;
}
}
Instance of Symbol 269 MovieClip "priceStepper" in Symbol 288 MovieClip Frame 1
onClipEvent (load) {
this.inc = 0.1;
}
Symbol 302 Button
on (release) {
_parent._parent.okKebabMix();
_visible = false;
_parent.mixerButton._visible = true;
_parent.orderButton._visible = true;
}
Symbol 324 Button
on (release) {
gotoAndStop ("initial");
}
Symbol 400 MovieClip Frame 1
stop();
staffUpgrade.onRelease = function () {
gotoAndStop ("staff");
};
signUpgrade.onRelease = function () {
gotoAndStop ("sign");
};
vanUpgrade.onRelease = function () {
gotoAndStop ("vans");
};
deliveryUpgrade.onRelease = function () {
gotoAndStop ("delivery");
};
advertUpgrade.onRelease = function () {
gotoAndStop ("adverts");
};
Symbol 401 MovieClip Frame 1
upgrades._visible = false;
kebabMixer._visible = false;
stockOrder._visible = false;
Instance of Symbol 400 MovieClip "upgrades" in Symbol 401 MovieClip Frame 1
/* no clip actions */
Symbol 405 Button
on (release) {
this._visible = false;
}
Symbol 419 MovieClip Frame 1
blocker.useHandCursor = false;
Symbol 433 Button
on (press) {
_root.play();
}
Symbol 434 MovieClip Frame 1
this._visible = false;
blocker.useHandCursor = false;
Symbol 435 MovieClip [KebabVanView] Frame 1
#initclip 27
Object.registerClass("KebabVanView", KebabVanView);
#endinitclip
plane._visible = false;
Hud.upgradeButton._visible = false;
Instance of Symbol 434 MovieClip "summary" in Symbol 435 MovieClip [KebabVanView] Frame 1
/* no clip actions */
Symbol 521 MovieClip Frame 1
eyelids.play();
var blink = Math.round(Math.random() * 200);
var counter = 1;
this.createEmptyMovieClip("blinker", this.getNextHighestDepth());
blinker.onEnterFrame = function () {
counter++;
if (counter == blink) {
eyelids.play();
counter = 0;
blink = Math.round(Math.random() * 200);
}
};
Symbol 530 MovieClip Frame 1
stop();
Symbol 530 MovieClip Frame 2
stop();
Symbol 530 MovieClip Frame 3
stop();
Symbol 530 MovieClip Frame 4
stop();
Symbol 530 MovieClip Frame 5
stop();
Symbol 530 MovieClip Frame 6
stop();
Symbol 530 MovieClip Frame 7
stop();
Symbol 530 MovieClip Frame 8
stop();
Symbol 611 MovieClip Frame 40
stop();
this._parent.removeMovieClip();
Symbol 617 MovieClip [man] Frame 13
gotoAndPlay ("walk_right");
Symbol 617 MovieClip [man] Frame 39
gotoAndPlay ("walk_pissed");
Symbol 617 MovieClip [man] Frame 87
gotoAndPlay ("walk_pissed2");
Symbol 617 MovieClip [man] Frame 125
gotoAndPlay ("crawlloop");
Symbol 617 MovieClip [man] Frame 144
stop();
collapseEnd();
Symbol 617 MovieClip [man] Frame 209
stop();
danceEnd();
Symbol 617 MovieClip [man] Frame 248
gotoAndPlay ("standfront");
Symbol 617 MovieClip [man] Frame 281
gotoAndPlay ("standkebab");
standing();
Symbol 617 MovieClip [man] Frame 312
gotoAndPlay ("walkkebab");
Symbol 617 MovieClip [man] Frame 390
var randomburp = (1 + (Math.round(Math.random()) * 5));
_root["burp" + randomburp].start(0, 1);
Symbol 617 MovieClip [man] Frame 395
stop();
eatEnd();
Symbol 617 MovieClip [man] Frame 467
stop();
explodeEnd();
Symbol 617 MovieClip [man] Frame 515
stop();
vomitEnd();
Symbol 618 MovieClip Frame 1
stop();
Symbol 635 MovieClip Frame 1
stop();
stop();
Symbol 638 MovieClip Frame 1
loadMovie ("http://www.robotjamgames.com/scoreSystem/encrypted.swf", this);
this._visible = false;
Symbol 656 Button
on (release) {
getURL ("http://www.robbiewoodhead.com/", "blank");
}
Symbol 658 Button
on (release) {
getURL ("http://www.robotjam.com/", "blank");
}
Symbol 675 MovieClip Frame 1
stop();
this._visible = false;
Symbol 675 MovieClip Frame 2
this._visible = true;
Symbol 675 MovieClip Frame 15
stop();