Section 1
//Breadroll (gameplay.elements.Breadroll)
package gameplay.elements {
import main.*;
import flash.display.*;
import gameplay.*;
public class Breadroll extends Item {
public var inside:MovieClip;
public var nails:MovieClip;
public var bloodySauce:MovieClip;
public var onionState;
public var finger:MovieClip;
public var meatState;
public var greenSauce:MovieClip;
public var s:MovieClip;
public function Breadroll(){
var _local1:Level;
super();
finger.visible = false;
bloodySauce.visible = false;
greenSauce.visible = false;
nails.visible = false;
_local1 = Game.getInstance().currentLevel;
itemType = Item.BREADROLL;
this.visible = false;
inside = new MovieClip();
addChild(inside);
}
override public function added(_arg1){
super.added(_arg1);
if (Game.getInstance().currentLevel.breadrolls.indexOf(this) < 0){
Game.getInstance().currentLevel.breadrolls.push(this);
};
}
override public function respawn(){
while (inside.numChildren > 0) {
inside.removeChildAt(0);
};
super.respawn();
onionState = null;
meatState = null;
itemType = BREADROLL;
finger.visible = false;
bloodySauce.visible = false;
greenSauce.visible = false;
nails.visible = false;
}
public function update(_arg1:Item){
if (_arg1.itemType == SAUSAGE){
finger.visible = true;
finger.gotoAndStop(HotMeal(_arg1).mealState);
};
if (_arg1.itemType == ONION){
nails.visible = true;
};
if (_arg1.itemType == KETCHUP){
bloodySauce.visible = true;
};
if (_arg1.itemType == MUSTARD){
greenSauce.visible = true;
};
}
}
}//package gameplay.elements
Section 2
//Breadroll2 (gameplay.elements.Breadroll2)
package gameplay.elements {
import main.*;
import flash.display.*;
import gameplay.*;
public class Breadroll2 extends Item {
public var inside:MovieClip;
public var nails:MovieClip;
public var tounge:MovieClip;
public var bloodySauce:MovieClip;
public var onionState;
public var meatState;
public var greenSauce:MovieClip;
public var s:MovieClip;
public function Breadroll2(){
var _local1:Level;
super();
_local1 = Game.getInstance().currentLevel;
itemType = Item.BREADROLL2;
inside = new MovieClip();
addChild(inside);
this.visible = false;
}
override public function added(_arg1){
super.added(_arg1);
if (Game.getInstance().currentLevel.breadrolls2.indexOf(this) < 0){
Game.getInstance().currentLevel.breadrolls2.push(this);
};
}
override public function respawn(){
while (inside.numChildren > 0) {
inside.removeChildAt(0);
};
super.respawn();
onionState = null;
meatState = null;
itemType = BREADROLL2;
tounge.visible = false;
bloodySauce.visible = false;
greenSauce.visible = false;
nails.visible = false;
}
public function update(_arg1:Item){
if (_arg1.itemType == STEAK){
tounge.visible = true;
tounge.gotoAndStop(HotMeal(_arg1).mealState);
};
if (_arg1.itemType == ONION){
nails.visible = true;
};
if (_arg1.itemType == KETCHUP){
bloodySauce.visible = true;
};
if (_arg1.itemType == MUSTARD){
greenSauce.visible = true;
};
}
}
}//package gameplay.elements
Section 3
//Breadroll2Spawner (gameplay.elements.Breadroll2Spawner)
package gameplay.elements {
import main.*;
public class Breadroll2Spawner extends Spawner {
public function Breadroll2Spawner(){
ref = Game.getInstance().currentLevel.breadrolls2;
}
}
}//package gameplay.elements
Section 4
//BreadrollSpawner (gameplay.elements.BreadrollSpawner)
package gameplay.elements {
import main.*;
public class BreadrollSpawner extends Spawner {
public function BreadrollSpawner(){
ref = Game.getInstance().currentLevel.breadrolls;
}
}
}//package gameplay.elements
Section 5
//Chips (gameplay.elements.Chips)
package gameplay.elements {
import main.*;
import gameplay.*;
public class Chips extends Item {
public function Chips(){
this.visible = false;
itemType = Item.CHIPS;
}
override public function added(_arg1){
var _local2:Level;
super.added(_arg1);
_local2 = Game.getInstance().currentLevel;
if (_local2.chips.indexOf(this) < 0){
_local2.chips.push(this);
};
}
}
}//package gameplay.elements
Section 6
//ChipsSpawner (gameplay.elements.ChipsSpawner)
package gameplay.elements {
import flash.events.*;
import main.*;
import sounds.*;
import gameplay.*;
import flash.utils.*;
public class ChipsSpawner extends Spawner {
private var snd2:Frying1;
private var timer:Timer;
private var snd:ChipsOnOil;
private var time:Number;
private var temp:Level;
public function ChipsSpawner(){
snd = new ChipsOnOil();
snd2 = new Frying1();
timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, onTick);
time = 0;
temp = Game.getInstance().currentLevel;
temp.chipsFlag = true;
}
private function onTick(_arg1){
var _local2:Level;
var _local3:int;
time++;
if (time > 4){
_local2 = Game.getInstance().currentLevel;
_local3 = (_local2.chips.length - 1);
while (_local3 >= 0) {
_local2.potatos.visible = false;
_local2.chips[_local3].respawn();
timer.stop();
time = 0;
_local3--;
};
};
}
override public function lvlResumed(_arg1:Event){
super.lvlResumed(_arg1);
if (temp.potatos.visible == true){
timer.start();
};
}
override public function onClick(_arg1):Boolean{
if (!temp.potatos.visible){
snd.play();
temp.potatos.visible = true;
time = 0;
timer.reset();
timer.start();
};
snd2.play();
return (true);
}
override public function lvlPaused(_arg1:Event){
super.lvlPaused(_arg1);
if (temp.potatos.visible == true){
timer.stop();
};
}
}
}//package gameplay.elements
Section 7
//Coke (gameplay.elements.Coke)
package gameplay.elements {
import flash.events.*;
import main.*;
import gameplay.*;
public class Coke extends Item {
public function Coke(){
var _local1:Level;
super();
_local1 = Game.getInstance().currentLevel;
itemType = Item.COKE;
addEventListener(Event.ADDED_TO_STAGE, added);
}
override public function putDown(_arg1):Boolean{
var _local2:Boolean;
_local2 = super.putDown(_arg1);
this.stopDrag();
this.visible = false;
return (_local2);
}
}
}//package gameplay.elements
Section 8
//CokeSpawner (gameplay.elements.CokeSpawner)
package gameplay.elements {
import flash.events.*;
import main.*;
public class CokeSpawner extends Spawner {
private var coke:Coke;
public function CokeSpawner(){
coke = new Coke();
addEventListener(MouseEvent.MOUSE_DOWN, down);
Game.getInstance().currentLevel.cokeFlag = true;
}
public function down(_arg1){
coke.x = _arg1.stageX;
coke.y = _arg1.stageY;
coke.visible = true;
MainGameClass.getInstance().addChild(coke);
coke.startDrag();
Item.lastDragged = coke;
}
public function up(_arg1){
parent.removeChild(coke);
coke.stopDrag();
Item.lastDragged = null;
}
override public function onClick(_arg1):Boolean{
return (true);
}
}
}//package gameplay.elements
Section 9
//Customer (gameplay.elements.Customer)
package gameplay.elements {
import flash.events.*;
import main.*;
import graphics.*;
import sounds.*;
import flash.display.*;
import gameplay.*;
import flash.utils.*;
public class Customer extends MovieClip {
public var bill:Number;
public var male:Boolean;
private var slotW:Number;
public var balloon:Balloon;
public var customerType:String;
private var speed:Number;
public var zombieHappy:SoundContainer;
private var levelRef:Level;
public var growlSnds:SoundContainer;
public var leaveT:Number;
public var finished:Boolean;
public var orderSnds:SoundContainer;
private var waitingTime:Number;
public var zombieTimer:Timer;
public var interval:Number;
public var step:Number;
public var angryT:Number;
public var drinkSnds:SoundContainer;
public var zombieAngry:SoundContainer;
public var biteSnds:SoundContainer;
private var gameRef:Game;
public var order:Array;
public var customerState;
public var neutralT:Number;
public var footSteps:SoundContainer;
public var done:Boolean;
public var irritatedT:Number;
public var isWaiting:Boolean;
public var zombieIrritated:SoundContainer;
private var direct:Boolean;
private var slot:Number;
public static var HAPPY = "walking_happy";
public static var ANGRY = "walking_angry";
public static var IRRITATED = "walking_irritated";
public static var NEUTRAL = "walking_neutral";
public function Customer(){
customerState = HAPPY;
super();
finished = false;
zombieHappy = new SoundContainer();
zombieIrritated = new SoundContainer();
biteSnds = new SoundContainer();
drinkSnds = new SoundContainer();
footSteps = new SoundContainer();
zombieHappy = new SoundContainer();
zombieAngry = new SoundContainer();
drinkSnds.inside.push(new Drink());
biteSnds.inside.push(new Bite1());
biteSnds.inside.push(new Bite2());
biteSnds.inside.push(new Bite3());
footSteps.inside.push(new FootStep1());
footSteps.inside.push(new FootStep2());
zombieHappy.inside.push(new ZombieHappy1());
zombieHappy.inside.push(new ZombieHappy2());
zombieIrritated.inside.push(new ZombieIrritated1());
zombieIrritated.inside.push(new ZombieIrritated2());
zombieIrritated.inside.push(new ZombieIrritated3());
zombieAngry.inside.push(new ZombieAngry1());
zombieAngry.inside.push(new ZombieAngry2());
balloon = new Balloon();
buttonMode = true;
mouseChildren = false;
if (zombieTimer == null){
zombieTimer = new Timer(1000);
zombieTimer.start();
};
zombieTimer.addEventListener(TimerEvent.TIMER, onTimer);
addEventListener(Event.ADDED_TO_STAGE, added);
addEventListener(Event.ENTER_FRAME, onFrame);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
levelRef = Game.getInstance().currentLevel;
gameRef = Game.getInstance();
speed = 2;
waitingTime = 0;
isWaiting = false;
slotW = (gameRef.stage.stageWidth / 5);
done = false;
neutralT = 10;
irritatedT = 15;
angryT = 20;
leaveT = 25;
order = new Array();
bill = 0;
y = 330;
scaleX = 0.75;
scaleY = 0.75;
setType("normal");
interval = 20;
step = 60;
}
public function makeOrder(){
var _local1:Number;
finished = false;
while (order.length == 0) {
orderDrink();
_local1 = Math.random();
if (((levelRef.hotDogFlag) && (levelRef.burgerFlag))){
if (_local1 > 0.4){
_local1 = Math.random();
if (_local1 > 0.5){
order.push(Item.HOT_DOG);
orderAddons();
} else {
order.push(Item.HAMBURGER);
orderAddons();
};
};
} else {
if (((levelRef.hotDogFlag) && ((_local1 > 0.4)))){
order.push(Item.HOT_DOG);
orderAddons();
};
if (((levelRef.burgerFlag) && ((_local1 > 0.4)))){
order.push(Item.HAMBURGER);
orderAddons();
};
};
_local1 = Math.random();
if (((levelRef.chipsFlag) && ((_local1 > 0.5)))){
_local1 = 1;
if (levelRef.multiChips){
_local1 = (Math.random() * 3);
_local1 = Math.round(_local1);
};
while (_local1 > 0) {
order.push(Item.CHIPS);
_local1--;
};
};
};
showOrder();
addChild(balloon);
balloon.y = (-(height) - (balloon.height * 0.7));
balloon.x = ((width * 0.5) - (balloon.width * 0.5));
zombieHappy.playRandSnd();
}
public function beNeutral(){
customerState = NEUTRAL;
gotoAndStop(customerState);
refreshBalloon();
}
public function interact(_arg1:Item){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:*;
_local2 = 1;
_local3 = 1;
_local4 = 0;
if (((((((((!((_arg1.itemType == Item.KETCHUP))) && (!((_arg1.itemType == Item.ONION))))) && (_arg1.visible))) && (!((_arg1.itemType == Item.MUSTARD))))) && ((order.indexOf(_arg1.itemType) >= 0)))){
if ((((_arg1.itemType == Item.COKE)) || ((_arg1.itemType == Item.LEMONADE)))){
drinkSnds.playRandSnd();
} else {
biteSnds.playRandSnd();
};
drinkSnds;
if ((((order[_local5] == Item.HAMBURGER)) || ((order[_local5] == Item.HOT_DOG)))){
if (order[_local5] == Item.HAMBURGER){
_local6 = Breadroll2(_arg1);
};
if (order[_local5] == Item.HOT_DOG){
_local6 = Breadroll(_arg1);
};
switch (_local6.meatState){
case HotMeal.COOKED:
bill = (bill + Item.prices[_local6.itemType]);
break;
case HotMeal.OVERCOOKED:
case HotMeal.WARM:
bill = (bill + Math.round((Item.prices[_local6.itemType] * 0.5)));
break;
default:
bill = (bill + 1);
break;
};
while (order[(_local5 + _local2)] != "end") {
_local4 = _local6.ingredients.indexOf(order[(_local5 + _local2)]);
if (_local4 >= 0){
if (order[(_local5 + _local2)] != Item.ONION){
bill = (bill + Item.prices[order[(_local5 + _local2)]]);
} else {
if (_local6.onionState == HotMeal.COOKED){
bill = (bill + Item.prices[order[(_local5 + _local2)]]);
};
if ((((_local6.onionState == HotMeal.WARM)) || ((_local6.onionState == HotMeal.OVERCOOKED)))){
bill = (bill + 1);
};
};
_arg1.ingredients.splice(_local4, 1);
order.splice((_local5 + _local2), 1);
} else {
_local2 = (_local2 + 1);
};
};
order.splice(_local5, (_local2 + 1));
} else {
bill = (bill + Item.prices[_arg1.itemType]);
order.splice(_local5, 1);
};
if (_local2 > 1){
};
if (_arg1.ingredients.length > 1){
};
if (order.length > 0){
waitingTime = (waitingTime - 5);
};
_arg1.consumed = true;
_arg1.visible = false;
showOrder();
};
if ((((order.length == 0)) && (!(finished)))){
if (customerState == IRRITATED){
bill = (bill - 5);
};
if (customerState == ANGRY){
bill = (bill - 10);
};
if (bill <= 0){
bill = 1;
};
levelRef.moneyContainer.addChild(Money.dropMoney(x, 0xFF, bill, slot));
finished = true;
goAway();
};
Item.actual = null;
}
public function beHappy(){
customerState = HAPPY;
gotoAndStop(customerState);
refreshBalloon();
}
public function showOrder(){
balloon.showOrder(order);
}
public function beIrritated(){
customerState = IRRITATED;
gotoAndStop(customerState);
zombieIrritated.playRandSnd();
refreshBalloon();
}
private function onTimer(_arg1){
if (isWaiting){
waitingTime = (waitingTime + 1);
if (waitingTime == leaveT){
goAway();
levelRef.slots[slot] = true;
} else {
if (waitingTime == angryT){
beAngry();
} else {
if (waitingTime == irritatedT){
beIrritated();
} else {
if (waitingTime == neutralT){
beNeutral();
};
};
};
};
};
}
public function setType(_arg1:String){
customerType = _arg1;
switch (_arg1){
case "easy":
neutralT = 15;
irritatedT = 20;
angryT = 25;
leaveT = 30;
break;
case "normal":
neutralT = 10;
irritatedT = 15;
angryT = 20;
leaveT = 25;
break;
case "hard":
neutralT = 5;
irritatedT = 8;
angryT = 10;
leaveT = 15;
break;
default:
break;
};
}
public function onFrame(_arg1){
go();
}
public function refreshBalloon(){
if (isWaiting){
addChild(balloon);
};
}
public function go(){
if (direct){
if ((x - width) < gameRef.stage.stageWidth){
if ((((x < (slotW * slot))) || (done))){
x = (x + speed);
} else {
if (!isWaiting){
beHappy();
makeOrder();
isWaiting = true;
};
};
} else {
deinit();
};
} else {
if ((x + (width * 2)) > gameRef.stage.x){
if ((((x > (slotW * slot))) || (done))){
x = (x - speed);
} else {
if (!isWaiting){
beHappy();
makeOrder();
isWaiting = true;
};
};
} else {
deinit();
};
};
if (!isWaiting){
if (interval > step){
footSteps.playRandSnd();
interval = 0;
};
interval = (interval + speed);
};
if (((isWaiting) && (done))){
gotoAndPlay(customerState);
isWaiting = false;
};
}
private function onOut(_arg1){
}
private function onResume(_arg1:Event){
refreshMe();
zombieTimer.start();
buttonMode = true;
addEventListener(Event.ENTER_FRAME, onFrame);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
}
public function added(_arg1){
init();
levelRef.zombies.push(this);
levelRef.addEventListener(Level.LEVEL_PAUSED, onPause);
levelRef.addEventListener(Level.LEVEL_RESUMED, onResume);
}
public function init(){
var _local1:int;
var _local2:Number;
var _local3:int;
_local2 = Math.random();
if (_local2 >= 0.5){
direct = true;
x = -(width);
} else {
direct = false;
x = gameRef.stage.stageWidth;
};
_local3 = (levelRef.slots.length - 1);
while (_local3 >= 0) {
if (levelRef.slots[_local3]){
_local1 = (_local1 + 1);
};
_local3--;
};
_local1--;
slot = Math.round((_local1 * _local2));
_local3 = (levelRef.slots.length - 1);
while (_local3 >= 0) {
if ((((slot == 0)) && (levelRef.slots[_local3]))){
levelRef.slots[_local3] = false;
slot = _local3;
break;
};
if (((levelRef.slots[_local3]) && (!((slot == 0))))){
slot = (slot - 1);
};
_local3--;
};
gotoAndPlay(customerState);
}
public function beAngry(){
customerState = ANGRY;
gotoAndPlay(customerState);
zombieAngry.playRandSnd();
refreshBalloon();
}
public function deinit(){
zombieTimer.removeEventListener(TimerEvent.TIMER, onTimer);
levelRef.removeEventListener(Level.LEVEL_PAUSED, onPause);
levelRef.removeEventListener(Level.LEVEL_RESUMED, onResume);
removeEventListener(Event.ENTER_FRAME, onFrame);
if (parent){
parent.removeChild(this);
};
levelRef.zombies.splice(levelRef.zombies.indexOf(this), 1);
levelRef.addZombie();
}
public function orderAddons(){
var _local1:Number;
_local1 = Math.random();
if (((levelRef.mustardFlag) && (levelRef.ketchupFlag))){
_local1 = Math.random();
if (_local1 > 0.3){
order.push(Item.MUSTARD);
};
if (_local1 < 0.7){
order.push(Item.KETCHUP);
};
} else {
if (((levelRef.ketchupFlag) && ((_local1 > 0.5)))){
order.push(Item.KETCHUP);
};
if (((levelRef.mustardFlag) && ((_local1 > 0.5)))){
order.push(Item.MUSTARD);
};
};
_local1 = Math.random();
if (((levelRef.onionFlag) && ((_local1 > 0.5)))){
order.push(Item.ONION);
};
order.push("end");
}
private function onPause(_arg1:Event){
stop();
zombieTimer.stop();
buttonMode = false;
removeEventListener(Event.ENTER_FRAME, onFrame);
removeEventListener(MouseEvent.MOUSE_OVER, onOver);
removeEventListener(MouseEvent.MOUSE_OUT, onOut);
}
private function onOver(_arg1){
}
public function refreshMe(){
if ((((customerState == ANGRY)) || (!(isWaiting)))){
gotoAndPlay(customerState);
} else {
gotoAndStop(customerState);
};
}
public function orderDrink(){
var _local1:Number;
_local1 = Math.random();
if (((levelRef.cokeFlag) && (levelRef.lemonadeFlag))){
if (_local1 > 0.7){
_local1 = Math.random();
if (_local1 > 0.5){
order.push(Item.COKE);
} else {
order.push(Item.LEMONADE);
};
};
} else {
if (((levelRef.cokeFlag) && ((_local1 > 0.7)))){
order.push(Item.COKE);
};
if (((levelRef.lemonadeFlag) && ((_local1 > 0.7)))){
order.push(Item.LEMONADE);
};
};
}
public function goAway(){
var _local1:int;
var _local2:int;
var _local3:int;
if (customerState != ANGRY){
beHappy();
zombieHappy.playRandSnd();
};
done = true;
_local2 = parent.getChildIndex(this);
_local3 = (levelRef.zombies.length - 1);
while (_local3 >= 0) {
if (levelRef.zombies[_local3].isWaiting){
_local1 = parent.getChildIndex(levelRef.zombies[_local3]);
if (_local2 > _local1){
_local2 = _local1;
};
};
_local3--;
};
if (((balloon) && ((balloon.parent == this)))){
removeChild(balloon);
};
parent.addChildAt(this, _local2);
}
}
}//package gameplay.elements
Section 10
//HotMeal (gameplay.elements.HotMeal)
package gameplay.elements {
import flash.media.*;
import sounds.*;
public class HotMeal extends Item {
var cookingCounter:Number;
private var channel:SoundChannel;
var burningTime:Number;
var overcookingTime:Number;
var fire:Fire;
private var snds:SoundContainer;
var cookingTime:Number;
public var mealState:String;
private var frying:Frying;
var warmingTime:Number;
public static var COLD = "cold";
public static var WARM = "warm";
public static var COOKED = "cooked";
public static var OVERCOOKED = "overcooked";
public static var BURNED = "burned";
public function HotMeal(){
snds = new SoundContainer();
snds.inside.push(new Frying1());
snds.inside.push(new Frying2());
fire = new Fire();
channel = new SoundChannel();
cookingCounter = 0;
warmingTime = 4;
cookingTime = 8;
overcookingTime = 12;
burningTime = 16;
mealState = COLD;
}
override public function interact(_arg1:Item){
super.interact(_arg1);
levelRef.stopGrillSnd();
levelRef.stopFryingPanSnd();
}
public function cook(){
if (cookingCounter == warmingTime){
mealState = WARM;
gotoAndStop(WARM);
};
if (cookingCounter == cookingTime){
mealState = COOKED;
gotoAndStop(COOKED);
};
if (cookingCounter == overcookingTime){
mealState = OVERCOOKED;
gotoAndStop(OVERCOOKED);
};
if (cookingCounter == burningTime){
mealState = BURNED;
gotoAndStop(BURNED);
channel = fire.play();
};
cookingCounter++;
}
override public function putDown(_arg1):Boolean{
var _local2:Boolean;
_local2 = super.putDown(_arg1);
if (!_local2){
snds.playRandSnd();
};
return (_local2);
}
override public function respawn(){
interacted = false;
snds.playRandSnd();
mealState = COLD;
cookingCounter = 0;
gotoAndStop(mealState);
visible = true;
}
public function isReady():Boolean{
if (mealState == COOKED){
return (true);
};
return (false);
}
override public function pickUp(_arg1){
super.pickUp(_arg1);
snds.endSound();
}
}
}//package gameplay.elements
Section 11
//HotMealSpawner (gameplay.elements.HotMealSpawner)
package gameplay.elements {
import flash.events.*;
import main.*;
import flash.utils.*;
public class HotMealSpawner extends Spawner {
public var mainTimer:Timer;
private var flag:Boolean;
public function HotMealSpawner(){
mainTimer = new Timer(1000);
}
override public function added(_arg1:Event){
super.added(_arg1);
if (parent == Game.getInstance().currentLevel.tableContainer){
mainTimer.addEventListener(TimerEvent.TIMER, onTick);
mainTimer.start();
};
}
private function onTick(_arg1){
var _local2:int;
_local2 = (ref.length - 1);
while (_local2 >= 0) {
if ((((ref[_local2].visible == true)) && ((ref[_local2].dragged == false)))){
ref[_local2].cook();
};
_local2--;
};
}
override public function removed(_arg1:Event){
super.removed(_arg1);
mainTimer.removeEventListener(TimerEvent.TIMER, onTick);
}
override public function lvlResumed(_arg1:Event){
super.lvlResumed(_arg1);
mainTimer.start();
}
override public function onClick(_arg1):Boolean{
return (super.onClick(_arg1));
}
override public function lvlPaused(_arg1:Event){
super.lvlPaused(_arg1);
mainTimer.stop();
}
}
}//package gameplay.elements
Section 12
//Item (gameplay.elements.Item)
package gameplay.elements {
import flash.events.*;
import main.*;
import flash.display.*;
import gameplay.*;
public class Item extends MovieClip {
public var destinations:Array;
public var dropX;
public var interacted:Boolean;
public var levelRef:Level;
public var dropY:Number;
public var flag:Boolean;
public var dragged:Boolean;
public var ingredients:Array;
public var depth:int;
public var consumed:Boolean;
public var itemType:String;
public static var KETCHUP = "ketchup";
public static var COKE = "coke";
public static var CHIPS = "chips";
public static var MUSTARD = "mustard";
public static var actual:Item;
public static var LEMONADE = "lemonade";
public static var HOT_DOG = "hot_dog";
public static var BREADROLL = "breadroll";
public static var lastDragged:Item;
public static var ONION = "onion";
public static var prices:Array;
public static var STEAK = "steak";
public static var HAMBURGER = "hamburger";
public static var SAUSAGE = "sausage";
public static var BREADROLL2 = "breadroll2";
public function Item(){
flag = true;
cacheAsBitmap = true;
prices = new Array();
prices[ONION] = 4;
prices[CHIPS] = 10;
prices[KETCHUP] = 2;
prices[MUSTARD] = 2;
prices[LEMONADE] = 5;
prices[COKE] = 8;
prices[BREADROLL] = 2;
prices[BREADROLL2] = 2;
prices[SAUSAGE] = 2;
prices[STEAK] = 2;
prices[HOT_DOG] = 15;
prices[HAMBURGER] = 25;
itemType = "empty";
consumed = false;
interacted = false;
destinations = new Array();
ingredients = new Array();
addEventListener(Event.ADDED_TO_STAGE, added);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
actual = null;
}
public function added(_arg1){
var e = _arg1;
levelRef = Game.getInstance().currentLevel;
addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
addEventListener(MouseEvent.MOUSE_UP, putDown);
addEventListener(MouseEvent.CLICK, onClick);
levelRef.addEventListener(Level.LEVEL_PAUSED, lvlPaused);
levelRef.addEventListener(Level.LEVEL_RESUMED, lvlResumed);
levelRef.itemContainer.addChild(this);
try {
depth = parent.getChildIndex(this);
} catch(e:ArgumentError) {
};
dropX = x;
dropY = y;
flag = false;
}
public function interact(_arg1:Item){
if (_arg1.ingredients.indexOf(this.itemType) < 0){
_arg1.ingredients.push(this.itemType);
this.visible = false;
if ((((_arg1.itemType == BREADROLL)) || ((_arg1.itemType == HOT_DOG)))){
Breadroll(_arg1).update(this);
};
if ((((_arg1.itemType == BREADROLL2)) || ((_arg1.itemType == HAMBURGER)))){
Breadroll2(_arg1).update(this);
};
interacted = true;
};
actual = _arg1;
}
public function putDown(_arg1):Boolean{
var _local2:Boolean;
var _local3:int;
var _local4:int;
_local2 = false;
this.stopDrag();
_local3 = (destinations.length - 1);
while ((((_local3 >= 0)) && (!(_local2)))) {
_local4 = (destinations[_local3].length - 1);
while (_local4 >= 0) {
if ((((destinations[_local3][_local4].visible == true)) && (destinations[_local3][_local4].hitTestPoint(x, y)))){
this.interact(destinations[_local3][_local4]);
actual = destinations[_local3][_local4];
_local2 = true;
break;
};
_local4--;
};
_local3--;
};
_local3 = (levelRef.zombies.length - 1);
while ((((_local3 >= 0)) && (!(_local2)))) {
if ((((((_arg1.stageY < 240)) && (levelRef.zombies[_local3].isWaiting))) && (levelRef.zombies[_local3].hitTestPoint(x, y)))){
levelRef.zombies[_local3].interact(this);
_local2 = true;
};
_local3--;
};
if (levelRef.trash[0].hitTestPoint(x, y)){
levelRef.trash[0].interact(this);
_local2 = true;
};
x = dropX;
y = dropY;
dragged = false;
lastDragged = null;
parent.addChildAt(this, depth);
return (_local2);
}
public function respawn(){
visible = true;
consumed = false;
interacted = false;
ingredients = new Array();
}
public function removed(_arg1){
removeEventListener(MouseEvent.MOUSE_DOWN, pickUp);
removeEventListener(MouseEvent.MOUSE_UP, putDown);
removeEventListener(MouseEvent.CLICK, onClick);
actual = null;
}
private function lvlResumed(_arg1:Event){
addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
addEventListener(MouseEvent.MOUSE_UP, putDown);
addEventListener(MouseEvent.CLICK, onClick);
buttonMode = true;
}
public function remove(){
if (parent){
parent.removeChild(this);
};
}
public function pickUp(_arg1){
parent.addChild(this);
this.startDrag();
lastDragged = this;
this.dragged = true;
x = _arg1.stageX;
y = _arg1.stageY;
}
public function setType(_arg1:String){
itemType = _arg1;
}
public function onClick(_arg1){
var _local2:int;
if (((((!((actual == null))) && (!((actual == this))))) && (!(dragged)))){
_local2 = (actual.destinations.length - 1);
while (_local2 >= 0) {
if (actual.destinations[_local2].indexOf(this) >= 0){
actual.interact(this);
break;
};
_local2--;
};
};
if (!interacted){
actual = this;
putDown(_arg1);
};
}
public function lvlPaused(_arg1:Event){
removeEventListener(MouseEvent.MOUSE_DOWN, pickUp);
removeEventListener(MouseEvent.MOUSE_UP, putDown);
removeEventListener(MouseEvent.CLICK, onClick);
buttonMode = false;
}
public static function dropItem(_arg1, _arg2, _arg3="default"):Item{
var _local4:Item;
_local4.x = _arg1;
_local4.y = _arg2;
_local4.itemType = _arg3;
return (_local4);
}
public static function drop(){
if (lastDragged){
lastDragged.stopDrag();
lastDragged.remove();
};
}
public static function stopDragging(_arg1:MouseEvent){
if (lastDragged){
lastDragged.stopDrag();
lastDragged.x = lastDragged.dropX;
lastDragged.y = lastDragged.dropY;
lastDragged.rotation = 0;
lastDragged.putDown(_arg1);
};
}
}
}//package gameplay.elements
Section 13
//Ketchup (gameplay.elements.Ketchup)
package gameplay.elements {
import main.*;
import gameplay.*;
public class Ketchup extends Item {
public function Ketchup(){
var _local1:Level;
super();
_local1 = Game.getInstance().currentLevel;
destinations.push(_local1.breadrolls);
destinations.push(_local1.breadrolls2);
itemType = Item.KETCHUP;
Game.getInstance().currentLevel.ketchupFlag = true;
}
override public function added(_arg1){
super.added(_arg1);
Game.getInstance().currentLevel.ketchup = this;
}
override public function interact(_arg1:Item){
_arg1.ingredients.push(this.itemType);
if ((((_arg1.itemType == BREADROLL)) || ((_arg1.itemType == HOT_DOG)))){
Breadroll(_arg1).update(this);
};
if ((((_arg1.itemType == BREADROLL2)) || ((_arg1.itemType == HAMBURGER)))){
Breadroll2(_arg1).update(this);
};
Game.getInstance().currentLevel.sauceSnds.playRandSnd();
actual = _arg1;
}
override public function putDown(_arg1):Boolean{
var _local2:Boolean;
this.rotation = 0;
_local2 = super.putDown(_arg1);
return (_local2);
}
override public function pickUp(_arg1){
super.pickUp(_arg1);
this.rotation = 190;
}
}
}//package gameplay.elements
Section 14
//Lemonade (gameplay.elements.Lemonade)
package gameplay.elements {
import main.*;
import gameplay.*;
public class Lemonade extends Item {
public function Lemonade(){
var _local1:Level;
super();
_local1 = Game.getInstance().currentLevel;
itemType = Item.LEMONADE;
}
override public function putDown(_arg1):Boolean{
var _local2:Boolean;
_local2 = super.putDown(_arg1);
this.stopDrag();
this.visible = false;
return (_local2);
}
public static function dropLemonade(_arg1, _arg2){
var _local3:Lemonade;
_local3 = new (Lemonade);
_local3.x = _arg1;
_local3.y = _arg2;
return (_local3);
}
}
}//package gameplay.elements
Section 15
//LemonadeSpawner (gameplay.elements.LemonadeSpawner)
package gameplay.elements {
import flash.events.*;
import main.*;
public class LemonadeSpawner extends Spawner {
private var lemonade:Lemonade;
public function LemonadeSpawner(){
lemonade = new Lemonade();
addEventListener(MouseEvent.MOUSE_DOWN, down);
Game.getInstance().currentLevel.lemonadeFlag = true;
}
public function down(_arg1){
lemonade.x = _arg1.stageX;
lemonade.y = _arg1.stageY;
lemonade.visible = true;
lemonade.consumed = false;
parent.addChild(lemonade);
lemonade.startDrag();
Item.lastDragged = lemonade;
}
public function up(_arg1){
parent.removeChild(lemonade);
lemonade.stopDrag();
Item.lastDragged = null;
}
override public function onClick(_arg1):Boolean{
return (true);
}
}
}//package gameplay.elements
Section 16
//Money (gameplay.elements.Money)
package gameplay.elements {
import flash.events.*;
import main.*;
import graphics.*;
import sounds.*;
import flash.display.*;
import gameplay.*;
public class Money extends MovieClip {
public var slot:Number;
public var moneyCounter;
private var snds:SoundContainer;
public var info:MovieClip;
public function Money(){
addFrameScript(0, frame1, 1, frame2, 31, frame32);
super();
snds = new SoundContainer();
snds.inside.push(new Cash2());
snds.inside.push(new Cash1());
moneyCounter = 0;
slot = 0;
addEventListener(Event.ADDED_TO_STAGE, added);
buttonMode = true;
}
public function added(_arg1:Event){
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
Game.getInstance().currentLevel.addEventListener(Level.LEVEL_PAUSED, onPause);
Game.getInstance().currentLevel.addEventListener(Level.LEVEL_RESUMED, onResume);
}
private function onResume(_arg1:Event){
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
buttonMode = true;
}
private function onPause(_arg1:Event){
removeEventListener(MouseEvent.CLICK, onClick);
removeEventListener(MouseEvent.MOUSE_OVER, onOver);
buttonMode = false;
}
private function onOver(_arg1){
}
function frame1(){
stop();
}
public function remove(){
if (parent){
Game.getInstance().currentLevel.removeEventListener(Level.LEVEL_PAUSED, onPause);
Game.getInstance().currentLevel.removeEventListener(Level.LEVEL_PAUSED, onResume);
this.visible = false;
parent.removeChild(this);
};
}
function frame2(){
update();
}
function frame32(){
remove();
}
public function update(){
info.counter.text = ("$" + moneyCounter.toString());
}
private function onClick(_arg1){
var _local2:Number;
if (parent){
Game.getInstance().currentLevel.addMoney(moneyCounter);
Game.getInstance().currentLevel.slots[slot] = true;
snds.playRandSnd();
removeEventListener(MouseEvent.CLICK, onClick);
removeEventListener(MouseEvent.MOUSE_OVER, onOver);
play();
};
}
public static function dropMoney(_arg1, _arg2, _arg3:Number, _arg4:Number=0):Money{
var _local5:Money;
_local5 = new (Money);
_local5.moneyCounter = _arg3;
_local5.slot = _arg4;
_local5.x = _arg1;
_local5.y = _arg2;
return (_local5);
}
}
}//package gameplay.elements
Section 17
//Mustard (gameplay.elements.Mustard)
package gameplay.elements {
import main.*;
import gameplay.*;
public class Mustard extends Item {
public function Mustard(){
var _local1:Level;
super();
_local1 = Game.getInstance().currentLevel;
destinations.push(_local1.breadrolls);
destinations.push(_local1.breadrolls2);
itemType = Item.MUSTARD;
Game.getInstance().currentLevel.mustardFlag = true;
}
override public function added(_arg1){
super.added(_arg1);
Game.getInstance().currentLevel.mustard = this;
}
override public function interact(_arg1:Item){
_arg1.ingredients.push(this.itemType);
if ((((_arg1.itemType == BREADROLL)) || ((_arg1.itemType == HOT_DOG)))){
Breadroll(_arg1).update(this);
};
if ((((_arg1.itemType == BREADROLL2)) || ((_arg1.itemType == HAMBURGER)))){
Breadroll2(_arg1).update(this);
};
Game.getInstance().currentLevel.sauceSnds.playRandSnd();
actual = _arg1;
}
override public function putDown(_arg1):Boolean{
var _local2:Boolean;
this.rotation = 0;
_local2 = super.putDown(_arg1);
return (_local2);
}
override public function pickUp(_arg1){
super.pickUp(_arg1);
this.rotation = 190;
}
}
}//package gameplay.elements
Section 18
//Onion (gameplay.elements.Onion)
package gameplay.elements {
import flash.events.*;
import flash.media.*;
import main.*;
import sounds.*;
import gameplay.*;
public class Onion extends HotMeal {
private var channel:SoundChannel;
private var snd:Frying;
public function Onion(){
var _local1:Level;
super();
snd = new Frying();
_local1 = Game.getInstance().currentLevel;
destinations.push(_local1.breadrolls);
destinations.push(_local1.breadrolls2);
this.visible = false;
itemType = Item.ONION;
}
override public function added(_arg1){
var _local2:Level;
_local2 = Game.getInstance().currentLevel;
if (_local2.onions.indexOf(this) < 0){
_local2.onions.push(this);
};
super.added(_arg1);
}
override public function interact(_arg1:Item){
var _local2:*;
super.interact(_arg1);
if ((((_arg1.itemType == Item.HAMBURGER)) || ((_arg1.itemType == BREADROLL2)))){
_local2 = Breadroll2(_arg1);
};
if ((((_arg1.itemType == Item.HOT_DOG)) || ((_arg1.itemType == BREADROLL)))){
_local2 = Breadroll(_arg1);
};
_local2.onionState = mealState;
}
override public function respawn(){
super.respawn();
}
override public function pickUp(_arg1){
super.pickUp(_arg1);
if (channel){
channel.stop();
};
}
}
}//package gameplay.elements
Section 19
//OnionSpawner (gameplay.elements.OnionSpawner)
package gameplay.elements {
import flash.media.*;
import main.*;
public class OnionSpawner extends HotMealSpawner {
private var channel:SoundChannel;
public function OnionSpawner(){
ref = Game.getInstance().currentLevel.onions;
Game.getInstance().currentLevel.onionFlag = true;
}
}
}//package gameplay.elements
Section 20
//Potatos (gameplay.elements.Potatos)
package gameplay.elements {
import flash.events.*;
import main.*;
import flash.display.*;
public class Potatos extends MovieClip {
public function Potatos(){
addEventListener(Event.ADDED_TO_STAGE, added);
visible = false;
}
public function added(_arg1){
Game.getInstance().currentLevel.potatos = this;
}
}
}//package gameplay.elements
Section 21
//Sausage (gameplay.elements.Sausage)
package gameplay.elements {
import main.*;
import gameplay.*;
public class Sausage extends HotMeal {
public function Sausage(){
var _local1:Level;
super();
_local1 = Game.getInstance().currentLevel;
destinations.push(_local1.breadrolls);
this.visible = false;
itemType = Item.SAUSAGE;
}
override public function added(_arg1){
var _local2:Level;
super.added(_arg1);
_local2 = Game.getInstance().currentLevel;
if (_local2.sausages.indexOf(this) < 0){
_local2.sausages.push(this);
};
}
override public function interact(_arg1:Item){
super.interact(_arg1);
_arg1.itemType = Item.HOT_DOG;
Breadroll(_arg1).meatState = mealState;
}
override public function putDown(_arg1):Boolean{
var _local2:Boolean;
_local2 = super.putDown(_arg1);
if (!_local2){
Game.getInstance().currentLevel.startGrillSnd();
};
return (_local2);
}
override public function respawn(){
super.respawn();
Game.getInstance().currentLevel.startGrillSnd();
}
override public function pickUp(_arg1){
super.pickUp(_arg1);
Game.getInstance().currentLevel.stopGrillSnd();
}
}
}//package gameplay.elements
Section 22
//Sausage22 (gameplay.elements.Sausage22)
package gameplay.elements {
import flash.display.*;
public dynamic class Sausage22 extends MovieClip {
public function Sausage22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package gameplay.elements
Section 23
//SausageSpawner (gameplay.elements.SausageSpawner)
package gameplay.elements {
import main.*;
public class SausageSpawner extends HotMealSpawner {
public function SausageSpawner(){
ref = Game.getInstance().currentLevel.sausages;
Game.getInstance().currentLevel.hotDogFlag = true;
super();
}
}
}//package gameplay.elements
Section 24
//Spawner (gameplay.elements.Spawner)
package gameplay.elements {
import flash.events.*;
import main.*;
import flash.display.*;
import gameplay.*;
public class Spawner extends MovieClip {
public var ref:Array;
public function Spawner(){
cacheAsBitmap = true;
addEventListener(Event.ADDED_TO_STAGE, added);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function added(_arg1:Event){
if (!Game.getInstance().currentLevel.pauseFlag){
addEventListener(MouseEvent.MOUSE_DOWN, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
buttonMode = true;
};
Game.getInstance().currentLevel.addEventListener(Level.LEVEL_PAUSED, lvlPaused);
Game.getInstance().currentLevel.addEventListener(Level.LEVEL_RESUMED, lvlResumed);
Game.getInstance().currentLevel.tableContainer.addChild(this);
}
public function onOver(_arg1){
}
public function lvlResumed(_arg1:Event){
addEventListener(MouseEvent.MOUSE_DOWN, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
buttonMode = true;
}
public function removed(_arg1:Event){
removeEventListener(MouseEvent.MOUSE_DOWN, onClick);
removeEventListener(MouseEvent.MOUSE_OVER, onOver);
Game.getInstance().currentLevel.removeEventListener(Level.LEVEL_PAUSED, lvlPaused);
Game.getInstance().currentLevel.removeEventListener(Level.LEVEL_RESUMED, lvlResumed);
}
public function onClick(_arg1):Boolean{
var _local2:Boolean;
var _local3:Item;
var _local4:int;
_local2 = false;
_local3 = null;
_local4 = (ref.length - 1);
while (_local4 >= 0) {
if (ref[_local4].visible == false){
if (!_local3){
_local3 = ref[_local4];
} else {
if (Item(_local3).depth > Item(ref[_local4]).depth){
_local3 = ref[_local4];
};
};
};
_local4--;
};
if (_local3){
_local3.respawn();
_local2 = true;
};
return (_local2);
}
public function lvlPaused(_arg1:Event){
removeEventListener(MouseEvent.MOUSE_DOWN, onClick);
removeEventListener(MouseEvent.MOUSE_OVER, onOver);
buttonMode = false;
}
}
}//package gameplay.elements
Section 25
//Steak (gameplay.elements.Steak)
package gameplay.elements {
import main.*;
import gameplay.*;
public class Steak extends HotMeal {
public function Steak(){
var _local1:Level;
super();
_local1 = Game.getInstance().currentLevel;
destinations.push(_local1.breadrolls2);
this.visible = false;
itemType = Item.STEAK;
mouseChildren = false;
}
override public function added(_arg1){
super.added(_arg1);
if (Game.getInstance().currentLevel.steaks.indexOf(this) < 0){
Game.getInstance().currentLevel.steaks.push(this);
};
}
override public function interact(_arg1:Item){
super.interact(_arg1);
_arg1.itemType = Item.HAMBURGER;
Breadroll2(_arg1).meatState = mealState;
}
override public function putDown(_arg1):Boolean{
var _local2:Boolean;
_local2 = super.putDown(_arg1);
if (!_local2){
Game.getInstance().currentLevel.startGrillSnd();
};
return (_local2);
}
override public function respawn(){
super.respawn();
Game.getInstance().currentLevel.startGrillSnd();
}
override public function pickUp(_arg1){
super.pickUp(_arg1);
Game.getInstance().currentLevel.stopGrillSnd();
}
}
}//package gameplay.elements
Section 26
//SteakSpawner (gameplay.elements.SteakSpawner)
package gameplay.elements {
import main.*;
public class SteakSpawner extends HotMealSpawner {
public function SteakSpawner(){
ref = Game.getInstance().currentLevel.steaks;
Game.getInstance().currentLevel.burgerFlag = true;
}
}
}//package gameplay.elements
Section 27
//TableTop (gameplay.elements.TableTop)
package gameplay.elements {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.geom.*;
public class TableTop extends MovieClip {
public function TableTop(){
addEventListener(Event.ADDED_TO_STAGE, added);
}
private function added(_arg1:Event){
var _local2:Point;
_local2 = new Point(x, y);
_local2 = localToGlobal(_local2);
Game.getInstance().currentLevel.blocksContainer.addChild(this);
x = _local2.x;
y = _local2.y;
}
}
}//package gameplay.elements
Section 28
//Trash (gameplay.elements.Trash)
package gameplay.elements {
import flash.events.*;
import main.*;
import graphics.*;
import sounds.*;
import flash.display.*;
public class Trash extends MovieClip {
var garbage:Garbage;
public function Trash(){
addEventListener(Event.ADDED_TO_STAGE, added);
addEventListener(Event.REMOVED_FROM_STAGE, onRemove);
garbage = new Garbage();
}
public function added(_arg1:Event){
var _local2:int;
Game.getInstance().currentLevel.trash.push(this);
}
public function interact(_arg1:Item){
var _local2:Number;
var _local3:int;
if (((!((_arg1.itemType == Item.MUSTARD))) && (!((_arg1.itemType == Item.KETCHUP))))){
_local2 = Item.prices[_arg1.itemType];
_local3 = (_arg1.ingredients.length - 1);
while (_local3 >= 0) {
_local2 = (_local2 + Item.prices[_arg1.ingredients[_local3]]);
_local3--;
};
_local2 = Math.round((_local2 * 0.5));
Game.getInstance().currentLevel.addMoney(-(_local2));
_arg1.visible = false;
_local2 = -(_local2);
parent.addChild(new PopUpInfo(x, y, _local2.toString()));
garbage.play();
_arg1.interacted = true;
};
}
private function onRemove(_arg1:Event){
Game.getInstance().currentLevel.trash.pop();
}
public function remove(){
if (parent){
parent.removeChild(this);
};
Game.getInstance().currentLevel.trash.pop();
}
}
}//package gameplay.elements
Section 29
//Level (gameplay.Level)
package gameplay {
import flash.events.*;
import flash.media.*;
import gameplay.elements.*;
import main.*;
import graphics.*;
import sounds.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class Level extends MovieClip {
public var neededMoney:Number;
public var environment:Environment;
public var levelTimer:Timer;
public var trashContainer:MovieClip;
public var slots:Array;
public var mustardFlag:Boolean;
public var envirContainer:MovieClip;
public var breadrolls2:Array;
public var sauceSnds:SoundContainer;
public var tableContainer:MovieClip;
public var ch2:SoundChannel;
public var ch1:SoundChannel;
public var earnedMoney:Number;
public var pauseFlag:Boolean;
public var itemContainer:MovieClip;
public var sausages:Array;
public var fryingPan:Frying;
public var onionFlag:Boolean;
public var lemonadeFlag:Boolean;
public var grill:Grill;
public var steaks:Array;
public var timeLimit:Number;
public var lvlBackground:MovieClip;
public var zombieDelay:Number;
public var hud:Hud;
public var maxZombies:Number;
public var zombies:Array;
public var meals:Array;
public var zombieTypesNr:Number;
public var ketchup:Item;
public var itemsAdded:String;
public var potatos:Potatos;
public var trash:Array;
public var normalChance:Number;
public var cokeFlag:Boolean;
public var gameMusic:GameMusic;
public var zombieSpawnTime:Number;
public var tutorial:MovieClip;
public var zombieContainer:MovieClip;
public var burgerFlag:Boolean;
public var blocks:Blocksx;
public var tableTopContainer:MovieClip;
public var breadrolls:Array;
public var moneyContainer:MovieClip;
public var blocksContainer:MovieClip;
public var ketchupFlag:Boolean;
public var chips:Array;
public var mustard:Item;
public var chipsFlag:Boolean;
public var hotDogFlag:Boolean;
public var onions:Array;
public var easyChance:Number;
public var gameTime:Number;
public var multiChips:Boolean;
public static var LEVEL_PAUSED = "level_paused";
public static var LEVEL_RESUMED = "level_resumed";
public function Level(){
var _local1:int;
super();
lvlBackground = new Background();
grill = new Grill();
fryingPan = new Frying();
sauceSnds = new SoundContainer();
sauceSnds.inside.push(new Sauce1());
sauceSnds.inside.push(new Sauce2());
sauceSnds.inside.push(new Sauce3());
sauceSnds.inside.push(new Sauce4());
sauceSnds.inside.push(new Sauce5());
sauceSnds.inside.push(new Sauce6());
zombieContainer = new MovieClip();
envirContainer = new MovieClip();
tableContainer = new MovieClip();
moneyContainer = new MovieClip();
trashContainer = new MovieClip();
itemContainer = new MovieClip();
blocksContainer = new MovieClip();
tableTopContainer = new MovieClip();
x = 0;
y = 0;
easyChance = 0.3;
normalChance = 0.8;
timeLimit = 60;
gameTime = 0;
zombieTypesNr = 7;
maxZombies = 3;
zombieDelay = 0;
zombieSpawnTime = 3;
earnedMoney = 0;
neededMoney = 200;
levelTimer = new Timer(1000);
levelTimer.addEventListener(TimerEvent.TIMER, onTick);
addEventListener(Event.ADDED_TO_STAGE, added);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
trash = new Array();
slots = new Array(5);
sausages = new Array();
steaks = new Array();
breadrolls = new Array();
breadrolls2 = new Array();
chips = new Array();
onions = new Array();
zombies = new Array();
_local1 = (slots.length - 1);
while (_local1 >= 0) {
slots[_local1] = true;
_local1--;
};
multiChips = false;
hud = new Hud();
pauseFlag = false;
gameMusic = new GameMusic();
}
private function onTick(_arg1){
var _local2:Boolean;
var _local3:int;
gameTime = (gameTime + 1);
zombieDelay = (zombieDelay + 1);
if (zombieDelay > zombieSpawnTime){
addZombie();
zombieDelay = 0;
};
if (gameTime > timeLimit){
_local2 = true;
if (zombies.length > 0){
_local2 = false;
};
_local3 = (slots.length - 1);
while ((((_local3 >= 0)) && (_local2))) {
if (slots[_local3] == false){
_local2 = false;
};
_local3--;
};
if (_local2){
Item.drop();
if (Game.getInstance().gameType == "career"){
Game.getInstance().lastScore = earnedMoney;
if (earnedMoney >= neededMoney){
Game.getInstance().updateStats(earnedMoney);
if (Game.getInstance().levelNr == 5){
Game.getInstance().showOutro();
} else {
Game.getInstance().showSummary();
};
} else {
Game.getInstance().showFailScreen();
};
} else {
Game.getInstance().lastScore = earnedMoney;
Game.getInstance().showSpeedSummary();
};
};
};
hud.updateTime();
}
public function addZombie(){
var _local1:Boolean;
var _local2:Number;
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:String;
var _local7:Class;
var _local8:Object;
var _local9:int;
_local1 = false;
_local3 = (slots.length - 1);
while (_local3 >= 0) {
if (slots[_local3]){
_local1 = true;
break;
};
_local3--;
};
if ((((((zombies.length < maxZombies)) && (_local1))) && ((gameTime < timeLimit)))){
_local4 = -1;
_local6 = "Zombie";
_local2 = Math.random();
_local2 = (_local2 * zombieTypesNr);
_local2 = Math.round(_local2);
_local7 = (getDefinitionByName(("Zombie" + _local2.toString())) as Class);
_local8 = new (_local7);
_local2 = Math.random();
if (_local2 <= easyChance){
_local8.setType("easy");
};
if (_local2 > normalChance){
_local8.setType("hard");
};
_local9 = (zombies.length - 1);
while (_local9 >= 0) {
_local5 = zombieContainer.getChildIndex(zombies[_local9]);
if (_local4 < 0){
_local4 = _local5;
};
if (_local4 > _local5){
_local4 = _local5;
};
_local9--;
};
if (_local4 < 0){
_local4 = 0;
};
zombieContainer.addChildAt(Customer(_local8), _local4);
};
}
public function startGrillSnd(){
grill.play(0, int.MAX_VALUE);
}
private function removed(_arg1){
remove();
}
public function setEnvironment(_arg1:int){
}
public function remove(){
var _local1:int;
if (this.parent){
if (Item.lastDragged){
Item.lastDragged.stopDrag();
};
levelTimer.removeEventListener(TimerEvent.TIMER, onTick);
if (ketchup){
ketchup.remove();
};
if (mustard){
mustard.remove();
};
_local1 = (sausages.length - 1);
while (_local1 >= 0) {
sausages[_local1].remove();
_local1--;
};
_local1 = (steaks.length - 1);
while (_local1 >= 0) {
steaks[_local1].remove();
_local1--;
};
_local1 = (breadrolls.length - 1);
while (_local1 >= 0) {
breadrolls[_local1].remove();
_local1--;
};
_local1 = (breadrolls2.length - 1);
while (_local1 >= 0) {
breadrolls2[_local1].remove();
_local1--;
};
_local1 = (chips.length - 1);
while (_local1 >= 0) {
chips[_local1].remove();
_local1--;
};
hud.remove();
pauseFlag = false;
while (tableContainer.numChildren > 0) {
tableContainer.removeChildAt((tableContainer.numChildren - 1));
};
if (tableContainer.parent){
tableContainer.parent.removeChild(tableContainer);
};
while (zombieContainer.numChildren > 0) {
zombieContainer.removeChildAt((zombieContainer.numChildren - 1));
};
if (zombieContainer.parent){
zombieContainer.parent.removeChild(zombieContainer);
};
while (moneyContainer.numChildren > 0) {
moneyContainer.removeChildAt((moneyContainer.numChildren - 1));
};
if (moneyContainer.parent){
moneyContainer.parent.removeChild(moneyContainer);
};
while (itemContainer.numChildren > 0) {
itemContainer.removeChildAt((itemContainer.numChildren - 1));
};
if (itemContainer.parent){
itemContainer.parent.removeChild(itemContainer);
};
MutebleSound.silencer.dispatchEvent(new Event(MutebleSound.SILENCE));
if (tutorial){
tutorial.remove();
};
};
}
public function addMoney(_arg1:Number){
earnedMoney = (earnedMoney + _arg1);
hud.updateMoney();
}
public function stopFryingPanSnd(){
var _local1:Boolean;
var _local2:int;
_local1 = false;
_local2 = (onions.length - 1);
while (((!(_local1)) && ((_local2 >= 0)))) {
if (onions[_local2].visible == true){
_local1 = true;
};
_local2--;
};
if (!_local1){
fryingPan.stop();
};
}
private function added(_arg1){
levelTimer.start();
lvlBackground.gotoAndStop(Game.getInstance().placeBackground);
Game.getInstance().addChild(lvlBackground);
Game.getInstance().addChild(zombieContainer);
Game.getInstance().addChild(envirContainer);
Game.getInstance().addChild(trashContainer);
Game.getInstance().addChild(tableContainer);
Game.getInstance().addChild(tableTopContainer);
Game.getInstance().addChild(blocksContainer);
Game.getInstance().addChild(moneyContainer);
Game.getInstance().addChild(itemContainer);
Game.getInstance().addChild(hud);
if (itemsAdded){
hud.todaysMenu();
} else {
hud.showIntro();
};
gameMusic.play(0, int.MAX_VALUE);
}
public function startFryingPanSnd(){
fryingPan.play(0, 9999);
}
public function pauseLevel(){
if (!pauseFlag){
if (levelTimer.running){
levelTimer.stop();
};
dispatchEvent(new Event(LEVEL_PAUSED));
MutebleSound.silencer.dispatchEvent(new Event(MutebleSound.PAUSE_ALL_SOUNDS));
} else {
if (!levelTimer.running){
levelTimer.start();
};
dispatchEvent(new Event(LEVEL_RESUMED));
MutebleSound.silencer.dispatchEvent(new Event(MutebleSound.RESUME_ALL_SOUNDS));
};
pauseFlag = !(pauseFlag);
}
public function showTutorial(){
if (tutorial){
tutorial.visible = true;
};
}
public function startMe(){
Game.getInstance().addChild(lvlBackground);
Game.getInstance().addChild(zombieContainer);
Game.getInstance().addChild(moneyContainer);
Game.getInstance().addChild(tableContainer);
Game.getInstance().addChild(blocksContainer);
Game.getInstance().addChild(tableTopContainer);
Game.getInstance().addChild(itemContainer);
Game.getInstance().addChild(hud);
}
public function stopGrillSnd(){
var _local1:Boolean;
var _local2:int;
_local1 = false;
_local2 = (steaks.length - 1);
while (((!(_local1)) && ((_local2 >= 0)))) {
if ((((steaks[_local2].visible == true)) && (!(steaks[_local2].dragged)))){
_local1 = true;
};
_local2--;
};
_local2 = (sausages.length - 1);
while (((!(_local1)) && ((_local2 >= 0)))) {
if ((((sausages[_local2].visible == true)) && (!(sausages[_local2].dragged)))){
_local1 = true;
};
_local2--;
};
if (!_local1){
grill.stop();
};
}
}
}//package gameplay
Section 30
//Background (graphics.Background)
package graphics {
import flash.display.*;
public class Background extends MovieClip {
public function Background(){
addFrameScript(0, frame1);
super();
cacheAsBitmap = true;
}
function frame1(){
stop();
}
}
}//package graphics
Section 31
//BadNight (graphics.BadNight)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class BadNight extends MovieClip {
public var backToMenu:TextField;
public var tryAgain:TextField;
public var stats:TextField;
public function BadNight(){
tryAgain.addEventListener(MouseEvent.CLICK, onClick);
tryAgain.addEventListener(MouseEvent.MOUSE_OVER, over);
tryAgain.addEventListener(MouseEvent.MOUSE_OUT, out);
backToMenu.addEventListener(MouseEvent.CLICK, onClick);
backToMenu.addEventListener(MouseEvent.MOUSE_OVER, over);
backToMenu.addEventListener(MouseEvent.MOUSE_OUT, out);
stats.text = (("Needed to earn: " + Game.getInstance().currentLevel.neededMoney.toString()) + "$\n");
stats.appendText(((((("Earned: " + Game.getInstance().lastScore.toString()) + "$\n") + "Total: ") + Game.getInstance().returnStats().toString()) + "$\n"));
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
if (_arg1.currentTarget == tryAgain){
Game.getInstance().retryLevel();
};
if (_arg1.currentTarget == backToMenu){
Game.getInstance().goToMenu();
};
}
}
}//package graphics
Section 32
//Balloon (graphics.Balloon)
package graphics {
import flash.events.*;
import gameplay.elements.*;
import flash.display.*;
public class Balloon extends MovieClip {
public var chips1:MovieClip;
public var chips2:MovieClip;
public var burger:MovieClip;
public var chips3:MovieClip;
public var hotDog:MovieClip;
public var coke:MovieClip;
public var lemonade:MovieClip;
public function showOrder(_arg1:Array){
var _local2:MovieClip;
var _local3:int;
var _local4:int;
hotDog.visible = false;
hotDog.bloodySauce.visible = false;
hotDog.greenSauce.visible = false;
hotDog.nails.visible = false;
burger.visible = false;
burger.bloodySauce.visible = false;
burger.greenSauce.visible = false;
burger.nails.visible = false;
coke.visible = false;
lemonade.visible = false;
chips1.visible = false;
chips2.visible = false;
chips3.visible = false;
_local3 = 0;
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg1[_local4] == Item.HOT_DOG){
hotDog.visible = true;
_local2 = hotDog;
};
if (_arg1[_local4] == Item.HAMBURGER){
burger.visible = true;
_local2 = burger;
};
if (_arg1[_local4] == Item.ONION){
_local2.nails.visible = true;
};
if (_arg1[_local4] == Item.KETCHUP){
_local2.bloodySauce.visible = true;
};
if (_arg1[_local4] == Item.MUSTARD){
_local2.greenSauce.visible = true;
};
if (_arg1[_local4] == Item.COKE){
coke.visible = true;
};
if (_arg1[_local4] == Item.LEMONADE){
lemonade.visible = true;
};
if (_arg1[_local4] == Item.CHIPS){
_local3++;
};
_local4++;
};
switch (_local3){
case 3:
chips3.visible = true;
case 2:
chips2.visible = true;
case 1:
chips1.visible = true;
default:
break;
};
}
}
}//package graphics
Section 33
//Blocksx (graphics.Blocksx)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.geom.*;
public class Blocksx extends MovieClip {
public function Blocksx(){
addEventListener(Event.ADDED_TO_STAGE, added);
}
private function added(_arg1:Event){
var _local2:Point;
_local2 = new Point(x, y);
_local2 = localToGlobal(_local2);
Game.getInstance().currentLevel.blocksContainer.addChild(this);
x = _local2.x;
y = _local2.y;
}
}
}//package graphics
Section 34
//ButtonBack (graphics.ButtonBack)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ButtonBack extends MovieClip {
public function ButtonBack(){
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
gotoAndStop("out");
buttonMode = true;
tabEnabled = false;
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
private function onClick(_arg1:MouseEvent){
MainGameClass.getInstance().play();
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 35
//ButtonHighscores (graphics.ButtonHighscores)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ButtonHighscores extends MovieClip {
public function ButtonHighscores(){
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
gotoAndStop("out");
buttonMode = true;
tabEnabled = false;
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
private function onClick(_arg1:MouseEvent){
MainGameClass.getInstance().gotoAndPlay("2Highscores");
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 36
//ButtonProceed (graphics.ButtonProceed)
package graphics {
import flash.events.*;
import flash.display.*;
public class ButtonProceed extends MovieClip {
public function ButtonProceed(){
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
private function onClick(_arg1:MouseEvent){
MovieClip(parent.parent).play();
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 37
//ButtonRetry (graphics.ButtonRetry)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ButtonRetry extends MovieClip {
public function ButtonRetry(){
addFrameScript(0, frame1);
super();
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
function frame1(){
stop();
}
private function onClick(_arg1:MouseEvent){
Game.getInstance().retryLevel();
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 38
//ButtonSkip (graphics.ButtonSkip)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ButtonSkip extends MovieClip {
public function ButtonSkip(){
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
gotoAndStop("out");
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
private function onClick(_arg1:MouseEvent){
MainGameClass.getInstance().gotoAndPlay("Intro2");
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 39
//ButtonSkipEnding (graphics.ButtonSkipEnding)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ButtonSkipEnding extends MovieClip {
public function ButtonSkipEnding(){
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
stop();
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
private function onClick(_arg1:MouseEvent){
MainGameClass.getInstance().gotoAndPlay("2Title");
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 40
//ButtonStory (graphics.ButtonStory)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ButtonStory extends MovieClip {
var ciapciak:Blood;
public function ButtonStory(){
ciapciak = new Blood();
super();
ciapciak = new Blood();
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
addChildAt(ciapciak, 0);
ciapciak.scaleX = 2;
ciapciak.scaleY = 2;
ciapciak.x = 91;
ciapciak.y = 65.5;
mouseChildren = false;
}
private function onOver(_arg1:MouseEvent){
ciapciak.play();
}
public function update(){
}
private function onClick(_arg1:MouseEvent){
MainGameClass.getInstance().setStoryMode();
MainGameClass.getInstance().play();
ciapciak.play();
}
private function onOut(_arg1:MouseEvent){
ciapciak.gotoAndStop(1);
}
}
}//package graphics
Section 41
//ButtonTime (graphics.ButtonTime)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ButtonTime extends MovieClip {
var ciapciak:Blood;
public function ButtonTime(){
ciapciak = new Blood();
super();
ciapciak = new Blood();
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
addChildAt(ciapciak, 0);
ciapciak.scaleX = 2;
ciapciak.scaleY = 2;
ciapciak.x = 91;
ciapciak.y = 65.5;
mouseChildren = false;
}
private function onOver(_arg1:MouseEvent){
ciapciak.play();
}
public function update(){
}
private function onClick(_arg1:MouseEvent){
MainGameClass.getInstance().setTimeMode();
MainGameClass.getInstance().play();
ciapciak.play();
}
private function onOut(_arg1:MouseEvent){
ciapciak.gotoAndStop(1);
}
}
}//package graphics
Section 42
//CareerIntro (graphics.CareerIntro)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class CareerIntro extends MovieClip {
public var needToEarn:TextField;
public var titleS:TextField;
public var okBtn:TextField;
public function CareerIntro(){
var _local1:int;
super();
okBtn.addEventListener(MouseEvent.CLICK, onClick);
okBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
okBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
titleS.text = "Night ";
_local1 = Game.getInstance().levelNr;
titleS.appendText(_local1.toString());
needToEarn.text = (("You need to earn: " + Game.getInstance().currentLevel.neededMoney.toString()) + "$");
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
public function remove(){
if (parent){
parent.removeChild(this);
};
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
remove();
Game.getInstance().startLevel(Game.getInstance().levelNr);
}
}
}//package graphics
Section 43
//Environment (graphics.Environment)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class Environment extends MovieClip {
public function Environment(){
addEventListener(Event.ADDED_TO_STAGE, added);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
private function added(_arg1:Event){
Game.getInstance().currentLevel.environment = this;
Game.getInstance().currentLevel.envirContainer.addChild(this);
}
public function remove(){
if (parent){
parent.removeChild(this);
};
Game.getInstance().currentLevel.environment = null;
}
private function removed(_arg1:Event){
}
}
}//package graphics
Section 44
//ExitBtn (graphics.ExitBtn)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ExitBtn extends MovieClip {
public function ExitBtn(){
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
private function onClick(_arg1:MouseEvent){
Game.getInstance().currentLevel.remove();
MainGameClass.getInstance().gotoAndPlay("2Title");
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 45
//GameMenuLevel (graphics.GameMenuLevel)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class GameMenuLevel extends MovieClip {
public var foodName:TextField;
public var description:TextField;
public var price:TextField;
public var food:MovieClip;
public function GameMenuLevel(){
description.text = "";
price.text = "";
foodName.text = "";
food.hotDog.visible = false;
food.hotDog.bloodySauce.visible = false;
food.hotDog.greenSauce.visible = false;
food.hotDog.nails.visible = false;
food.burger.visible = false;
food.burger.bloodySauce.visible = false;
food.burger.greenSauce.visible = false;
food.burger.nails.visible = false;
food.coke.visible = false;
food.lemonade.visible = false;
food.chips.visible = false;
}
}
}//package graphics
Section 46
//HighScores (graphics.HighScores)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public class HighScores extends MovieClip {
public var backToMenu:TextField;
private var file:SharedObject;
public var results:TextField;
private static var list:Array;
public function HighScores(){
if (list == null){
list = new Array();
update();
};
this.visible = false;
backToMenu.addEventListener(MouseEvent.CLICK, onClick);
backToMenu.addEventListener(MouseEvent.MOUSE_OVER, over);
backToMenu.addEventListener(MouseEvent.MOUSE_OUT, out);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function removed(_arg1:Event){
}
public function showScores(){
var _local1:int;
var _local2:String;
var _local3:int;
this.visible = true;
if (!(parent is MainMenu)){
update();
};
_local1 = 1;
_local2 = "";
_local3 = (list.length - 1);
while (_local3 >= 0) {
_local2 = (_local2 + (((((("" + _local1.toString()) + ". ") + list[_local3][0]) + " - ") + list[_local3][1]) + "\n"));
_local1++;
_local3--;
};
results.text = _local2;
}
public function update():Boolean{
var _local1:Boolean;
var _local2:int;
file = SharedObject.getLocal("tempFile");
if (!file.data.savedValue){
list.push(new Array("Kenny", 0));
list.push(new Array("Eric", 0));
list.push(new Array("Bonzo", 0));
file.data.savedValue = list;
_local1 = false;
} else {
_local1 = true;
list = file.data.savedValue;
if (Game.getInstance()){
_local2 = (list.length - 1);
while (_local2 >= 0) {
if (list[_local2][1] <= Game.getInstance().lastScore){
list.splice((_local2 + 1), 0, new Array(Game.getInstance().playerName, Game.getInstance().lastScore));
list.splice(0, 1);
file.data.savedValue = list;
break;
};
_local2--;
};
};
};
return (_local1);
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
if (_arg1.currentTarget == backToMenu){
if ((parent is MainMenu)){
this.visible = false;
parent.removeChild(this);
} else {
parent.removeChild(this);
Game.getInstance().goToMenu();
};
};
}
}
}//package graphics
Section 47
//Hud (graphics.Hud)
package graphics {
import flash.events.*;
import main.*;
import sounds.*;
import flash.display.*;
import flash.text.*;
import gameplay.*;
public class Hud extends MovieClip {
private var result:Number;
public var popups:Popups;
private var levelRef:Level;
private var flag:Boolean;
private var t:String;
public var menuBtn:MovieClip;
private var clockSnd:Clock1;
public var earnedMoney:TextField;
private var ss:Number;
private var mm:Number;
public var time:TextField;
private var temp:String;
public function Hud(){
flag = true;
clockSnd = new Clock1();
x = 10;
y = 9;
addEventListener(Event.ADDED_TO_STAGE, added);
}
private function added(_arg1:Event){
menuBtn.addEventListener(MouseEvent.CLICK, onClick);
menuBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
menuBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
levelRef = Game.getInstance().currentLevel;
if (Game.getInstance().gameType == "career"){
temp = (("/" + levelRef.neededMoney) + "$");
} else {
temp = "$";
};
earnedMoney.text = (levelRef.earnedMoney + temp);
updateMoney();
updateTime();
}
public function showFailInfo(){
popups.gotoAndPlay("failInfo");
}
public function showOutro(){
popups.gotoAndPlay("outro");
}
public function updateTime(){
result = (levelRef.timeLimit - levelRef.gameTime);
if (result < 0){
result = 0;
};
if (result != 0){
ss = (result % 60);
} else {
ss = 0;
};
t = ss.toString();
if (t.length < 2){
t = ("0" + t);
};
mm = Math.floor((result / 60));
time.text = ((mm.toString() + ":") + t);
if ((((result < 5)) && (flag))){
flag = false;
clockSnd.play(0, 4);
};
}
private function out(_arg1:MouseEvent){
menuBtn.gotoAndStop("out");
}
public function updateMoney(){
earnedMoney.text = (levelRef.earnedMoney + temp);
}
public function showIntro(){
if (Game.getInstance().gameType == "career"){
popups.gotoAndPlay("intro");
} else {
Game.getInstance().currentLevel.pauseLevel();
popups.gotoAndPlay("timeChallengeIntro");
};
}
public function remove(){
if (parent){
parent.removeChild(this);
};
}
public function placeClear(){
popups.gotoAndPlay("place_complete");
}
public function todaysMenu(){
levelRef.pauseLevel();
popups.gotoAndPlay("todays_menu");
}
private function over(_arg1:MouseEvent){
menuBtn.gotoAndStop("over");
}
private function onClick(_arg1:MouseEvent){
if (levelRef.pauseFlag == false){
levelRef.pauseLevel();
};
popups.gotoAndPlay("menu_on");
}
}
}//package graphics
Section 48
//Hudpppp (graphics.Hudpppp)
package graphics {
import flash.display.*;
import flash.text.*;
public dynamic class Hudpppp extends MovieClip {
public var menuBtn:TextField;
public var earnedMoney:TextField;
public var goToMenu:TextField;
public var pauseBtn:TextField;
public var sign:TextField;
public var time:TextField;
public var backToGame:TextField;
}
}//package graphics
Section 49
//Instructions (graphics.Instructions)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class Instructions extends MovieClip {
public var closeBtn:TextField;
public function Instructions(){
closeBtn.addEventListener(MouseEvent.CLICK, onClick);
closeBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
closeBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
Game.getInstance().gotoAndStop("mainMenu");
}
}
}//package graphics
Section 50
//LogoAddicting (graphics.LogoAddicting)
package graphics {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class LogoAddicting extends MovieClip {
public function LogoAddicting(){
addEventListener(MouseEvent.CLICK, onClick);
buttonMode = true;
}
private function onClick(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.addictinggames.com"));
}
}
}//package graphics
Section 51
//LogoFactory (graphics.LogoFactory)
package graphics {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class LogoFactory extends MovieClip {
public function LogoFactory(){
addEventListener(MouseEvent.CLICK, onClick);
buttonMode = true;
}
private function onClick(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.game-factory.eu"));
}
}
}//package graphics
Section 52
//MainMenu (graphics.MainMenu)
package graphics {
import flash.display.*;
public class MainMenu extends MovieClip {
}
}//package graphics
Section 53
//Map (graphics.Map)
package graphics {
import flash.display.*;
public dynamic class Map extends MovieClip {
}
}//package graphics
Section 54
//Menu (graphics.Menu)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class Menu extends MovieClip {
public var speed:TextField;
public var career:TextField;
public function Menu(){
speed.addEventListener(MouseEvent.CLICK, onClick);
speed.addEventListener(MouseEvent.MOUSE_OVER, over);
speed.addEventListener(MouseEvent.MOUSE_OUT, out);
career.addEventListener(MouseEvent.CLICK, onClick);
career.addEventListener(MouseEvent.MOUSE_OVER, over);
career.addEventListener(MouseEvent.MOUSE_OUT, out);
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
if (_arg1.currentTarget == speed){
Game.getInstance().gotoAndStop("speedIntro");
};
if (_arg1.currentTarget == career){
Game.getInstance().gameType = "career";
Game.getInstance().levelNr = 0;
Game.getInstance().gotoAndStop("selectPlace");
};
}
}
}//package graphics
Section 55
//Outro (graphics.Outro)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class Outro extends MovieClip {
public var menuBtn:TextField;
public var stats:TextField;
public function Outro(){
var _local1:Array;
var _local2:Number;
var _local3:int;
super();
menuBtn.addEventListener(MouseEvent.CLICK, onClick);
menuBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
menuBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
_local2 = 0;
_local1 = Game.getInstance().stats;
stats.text = "";
_local3 = 0;
while (_local3 < _local1.length) {
stats.appendText((((("Place" + _local3.toString()) + " ") + _local1[_local3].toString()) + "\n"));
_local2 = (_local2 + _local1[_local3]);
_local3++;
};
stats.appendText(("Total score: " + _local2.toString()));
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
Game.getInstance().goToMenu();
}
}
}//package graphics
Section 56
//PlaceButton (graphics.PlaceButton)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class PlaceButton extends MovieClip {
public var btnState;// = "unactive"
public var sign:TextField;
public var _mask:MovieClip;
public function PlaceButton(){
btnState = "unactive";
super();
_mask.addEventListener(MouseEvent.CLICK, onClick);
_mask.addEventListener(MouseEvent.MOUSE_OVER, onOver);
_mask.addEventListener(MouseEvent.MOUSE_OUT, onOut);
_mask.buttonMode = true;
tabEnabled = false;
mouseChildren = true;
MainGameClass.getInstance().getState(this);
gotoAndStop(btnState);
}
private function onOver(_arg1:MouseEvent){
if (btnState == "active"){
gotoAndStop("visited");
};
}
private function onClick(_arg1:MouseEvent){
if (btnState == "active"){
MainGameClass.getInstance().gotoAndPlay("Map2");
};
}
private function onOut(_arg1:MouseEvent){
if (btnState == "active"){
gotoAndStop("active");
};
}
}
}//package graphics
Section 57
//PlaceSelect (graphics.PlaceSelect)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
import gameplay.*;
public class PlaceSelect extends MovieClip {
public var morgue:TextField;
public var mortuary:TextField;
public var city:TextField;
var levelRef:Level;
public var church:TextField;
public var cemetery:TextField;
public function PlaceSelect(){
Game.getInstance().setNextLevel();
cemetery.addEventListener(MouseEvent.CLICK, onClick);
cemetery.addEventListener(MouseEvent.MOUSE_OVER, over);
cemetery.addEventListener(MouseEvent.MOUSE_OUT, out);
church.addEventListener(MouseEvent.CLICK, onClick);
church.addEventListener(MouseEvent.MOUSE_OVER, over);
church.addEventListener(MouseEvent.MOUSE_OUT, out);
city.addEventListener(MouseEvent.CLICK, onClick);
city.addEventListener(MouseEvent.MOUSE_OVER, over);
city.addEventListener(MouseEvent.MOUSE_OUT, out);
morgue.addEventListener(MouseEvent.CLICK, onClick);
morgue.addEventListener(MouseEvent.MOUSE_OVER, over);
morgue.addEventListener(MouseEvent.MOUSE_OUT, out);
mortuary.addEventListener(MouseEvent.CLICK, onClick);
mortuary.addEventListener(MouseEvent.MOUSE_OVER, over);
mortuary.addEventListener(MouseEvent.MOUSE_OUT, out);
levelRef = Game.getInstance().currentLevel;
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
switch (_arg1.currentTarget){
case city:
Game.getInstance().placeBackground = "cityAtNight";
Game.getInstance().place = 0;
break;
case morgue:
Game.getInstance().placeBackground = "morgue";
Game.getInstance().place = 1;
break;
case mortuary:
Game.getInstance().placeBackground = "mortuary";
Game.getInstance().place = 2;
break;
case cemetery:
Game.getInstance().placeBackground = "cemetery";
Game.getInstance().place = 3;
break;
case church:
Game.getInstance().placeBackground = "church";
Game.getInstance().place = 4;
break;
default:
levelRef.lvlBackground = new MovieClip();
};
Game.getInstance().clearPlaceStats();
Game.getInstance().gotoAndStop("careerIntro");
}
}
}//package graphics
Section 58
//PopUpInfo (graphics.PopUpInfo)
package graphics {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class PopUpInfo extends MovieClip {
var t2:Number;
var t1:Number;
var timer:Timer;
public var textInfo:TextField;
var fade:Boolean;
public function PopUpInfo(_arg1:Number=0, _arg2:Number=0, _arg3:String="", _arg4:Boolean=true){
fade = _arg4;
if (fade){
alpha = 0;
};
t1 = 0;
t2 = 40;
x = _arg1;
y = _arg2;
textInfo.text = _arg3;
timer = new Timer(100);
addEventListener(Event.ADDED_TO_STAGE, added);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
timer.addEventListener(TimerEvent.TIMER, time);
}
private function added(_arg1){
timer.start();
}
public function dropInfo(_arg1, _arg2:Number, _arg3:String){
x = _arg1;
y = _arg2;
textInfo.text = _arg3;
}
public function remove(){
if (parent){
parent.removeChild(this);
};
}
private function removed(_arg1){
removeEventListener(Event.ADDED_TO_STAGE, added);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
timer.removeEventListener(TimerEvent.TIMER, time);
}
private function time(_arg1){
t1 = (t1 + 1);
if (fade){
if (t1 < (t2 * 0.5)){
alpha = (alpha + (2 / t2));
} else {
alpha = (alpha - (2 / t2));
};
};
if (t1 > t2){
remove();
};
}
}
}//package graphics
Section 59
//Popups (graphics.Popups)
package graphics {
import flash.events.*;
import main.*;
import sounds.*;
import flash.display.*;
import flash.text.*;
import gameplay.*;
public class Popups extends MovieClip {
public var fail:MovieClip;
public var popupMenu:MovieClip;
public var night:MovieClip;
public var excellent:MovieClip;
public var done:MovieClip;
public var certificate:MovieClip;
public function Popups(){
addFrameScript(0, frame1, 1, frame2, 66, frame67, 113, frame114, 192, frame193, 203, frame204, 251, frame252, 253, frame254, 340, frame341, 352, frame353, 353, frame354, 398, frame399, 411, frame412, 431, frame432, 441, frame442, 477, frame478, 489, frame490, 567, frame568, 580, frame581, 657, frame658, 669, frame670, 695, frame696, 706, frame707, 707, frame708, 726, frame727, 736, frame737);
super();
}
function frame399(){
stop();
}
function frame670(){
stop();
}
public function updateDone(){
done.neededMoney.text = ("$" + Game.getInstance().currentLevel.neededMoney.toString());
done.earnedMoney.text = ("$" + Game.getInstance().currentLevel.earnedMoney.toString());
done.total.text = ("$" + Game.getInstance().returnStats().toString());
}
public function updateCertificate(){
var _local1:Array;
var _local2:Number;
var _local3:int;
_local2 = 0;
_local1 = MainGameClass.getInstance().returnScores();
certificate.addEventListener(MouseEvent.CLICK, cert);
certificate.score.t1.text = _local1[0][1].toString();
certificate.score.t2.text = _local1[1][1].toString();
certificate.score.t3.text = _local1[2][1].toString();
certificate.score.t4.text = _local1[3][1].toString();
certificate.score.t5.text = _local1[4][1].toString();
_local3 = 0;
while (_local3 < _local1.length) {
_local2 = (_local2 + _local1[_local3][1]);
_local3++;
};
certificate.score.total.text = _local2.toString();
}
public function endTodaysMenu(){
Game.getInstance().currentLevel.pauseLevel();
}
public function updateIntro(){
night.gotoAndStop(Game.getInstance().levelNr);
night.money.text = ("$" + Game.getInstance().currentLevel.neededMoney.toString());
}
function frame442(){
gotoAndPlay("Outro");
}
function frame204(){
stop();
}
public function resume(){
Game.getInstance().currentLevel.pauseLevel();
}
function frame568(){
stop();
}
function frame727(){
stop();
}
function frame432(){
stop();
updateCertificate();
}
function frame341(){
stop();
}
function frame737(){
endTodaysMenu();
gotoAndPlay("intro");
}
public function endLevel(){
Game.getInstance().nextLevel();
}
public function cert(_arg1:MouseEvent){
MainGameClass.getInstance().gotoAndPlay("Outro");
}
function frame1(){
stop();
}
function frame581(){
updateSpeedOutro();
}
public function submitScore(){
MainGameClass.getInstance().playerName = excellent.playerName.text;
MainGameClass.getInstance().lastScore = Game.getInstance().currentLevel.earnedMoney;
Game.getInstance().goToMenu();
}
function frame696(){
stop();
}
function frame353(){
stop();
}
public function updateFail(){
fail.neededMoney.text = ("$" + Game.getInstance().currentLevel.neededMoney.toString());
fail.earnedMoney.text = ("$" + Game.getInstance().currentLevel.earnedMoney.toString());
}
public function showTutorial(){
Game.getInstance().currentLevel.showTutorial();
}
public function endPopupMenu(){
popupMenu.play();
popupMenu.removeEventListener(MouseEvent.CLICK, endMenu);
}
function frame354(){
updateDone();
}
function frame114(){
stop();
endLevel();
}
public function updateSpeedOutro(){
excellent.earned.text = ("$" + Game.getInstance().lastScore.toString());
}
function frame478(){
stop();
}
function frame193(){
stop();
}
function frame2(){
updateIntro();
}
function frame490(){
stop();
resume();
}
function frame252(){
stop();
goToMap();
}
function frame658(){
stop();
}
function frame412(){
stop();
endLevel();
}
function frame254(){
updateFail();
}
public function goToMap(){
Game.getInstance().goToMap();
}
private function endMenu(_arg1:MouseEvent){
Game.getInstance().currentLevel.hud.popups.play();
}
public function setPopupMenu(){
switch (Game.getInstance().currentLevel.itemsAdded){
case "level1":
popupMenu.m1.foodName.text = "Bloody HotDog";
popupMenu.m1.description.text = "Cooked finger in fresh meat with bloody sauce!";
popupMenu.m1.price.text = "17";
popupMenu.m1.food.hotDog.visible = true;
popupMenu.m1.food.hotDog.bloodySauce.visible = true;
break;
case "level2":
popupMenu.m2.food.hotDog.visible = true;
popupMenu.m2.food.hotDog.bloodySauce.visible = true;
popupMenu.m2.foodName.text = "Bloody HotDog";
popupMenu.m2.description.text = "Cooked finger in fresh meat with bloody sauce!";
popupMenu.m2.price.text = "17";
popupMenu.m1.foodName.text = "Energy Glop";
popupMenu.m1.price.text = "5";
popupMenu.m1.description.text = "Feel out of energy? Try our energy drink!";
popupMenu.m1.food.lemonade.visible = true;
break;
case "level4":
popupMenu.m3.food.hotDog.visible = true;
popupMenu.m3.food.hotDog.bloodySauce.visible = true;
popupMenu.m3.foodName.text = "Bloody HotDog";
popupMenu.m3.description.text = "Cooked finger in fresh meat with bloody sauce!";
popupMenu.m3.price.text = "17";
popupMenu.m2.foodName.text = "Energy Glop";
popupMenu.m2.description.text = "Feel out of energy? Try our energy drink!";
popupMenu.m2.price.text = "5";
popupMenu.m2.food.lemonade.visible = true;
popupMenu.m1.foodName.text = "Fryied Eye Balls";
popupMenu.m1.description.text = "Eye balls fried in deep oil";
popupMenu.m1.price.text = "10";
popupMenu.m1.food.chips.visible = true;
break;
case "level6":
popupMenu.m3.foodName.text = "Energy Glop";
popupMenu.m3.description.text = "Feel out of energy? Try our energy drink!";
popupMenu.m3.price.text = "5";
popupMenu.m3.food.lemonade.visible = true;
popupMenu.m2.foodName.text = "Fryied Eye Balls";
popupMenu.m2.description.text = "Eye balls fried in deep oil";
popupMenu.m2.price.text = "10";
popupMenu.m2.food.chips.visible = true;
popupMenu.m1.foodName.text = "Fresh Blood";
popupMenu.m1.description.text = "Fresh blood. Always served chilled!";
popupMenu.m1.price.text = "10";
popupMenu.m1.food.coke.visible = true;
break;
case "level8":
popupMenu.m3.foodName.text = "Fryied Eye Balls";
popupMenu.m3.description.text = "Eye balls fried in deep oil";
popupMenu.m3.price.text = "10";
popupMenu.m3.food.chips.visible = true;
popupMenu.m2.foodName.text = "Fresh Blood";
popupMenu.m2.description.text = "Fresh blood. Always served chilled!";
popupMenu.m2.price.text = "10";
popupMenu.m2.food.coke.visible = true;
popupMenu.m1.food.burger.visible = true;
popupMenu.m1.foodName.text = "Bloody Brain";
popupMenu.m1.description.text = "Fryied toung inside of brain halves with bloody sauce";
popupMenu.m1.price.text = "37";
popupMenu.m1.food.burger.bloodySauce.visible = true;
break;
case "level10":
popupMenu.m3.foodName.text = "Fresh Blood";
popupMenu.m3.description.text = "Fresh blood. Always served chilled!";
popupMenu.m3.price.text = "10";
popupMenu.m3.food.coke.visible = true;
popupMenu.m2.food.hotDog.visible = true;
popupMenu.m2.food.hotDog.greenSauce.visible = true;
popupMenu.m2.food.hotDog.bloodySauce.visible = true;
popupMenu.m2.description.text = "Now you can get our delicious HotDog with new spicy sauce!";
popupMenu.m2.foodName.text = "Spicy HotDog";
popupMenu.m2.price.text = "19";
popupMenu.m1.food.burger.visible = true;
popupMenu.m1.food.burger.greenSauce.visible = true;
popupMenu.m1.food.burger.bloodySauce.visible = true;
popupMenu.m1.description.text = "Try yummy brain halves with new spicy flavour!";
popupMenu.m1.foodName.text = "Spicy Brain";
popupMenu.m1.price.text = "39";
break;
case "level12":
popupMenu.m3.foodName.text = "Fresh Blood";
popupMenu.m3.description.text = "Fresh blood. Always served chilled!";
popupMenu.m3.price.text = "10";
popupMenu.m3.food.coke.visible = true;
popupMenu.m2.food.hotDog.visible = true;
popupMenu.m2.food.hotDog.greenSauce.visible = true;
popupMenu.m2.food.hotDog.bloodySauce.visible = true;
popupMenu.m2.food.hotDog.nails.visible = true;
popupMenu.m2.foodName.text = "Crispy Spicy HotDog";
popupMenu.m2.description.text = "Try delicious, fried nails added to our Spicy HotDog!";
popupMenu.m2.price.text = "23";
popupMenu.m1.food.burger.visible = true;
popupMenu.m1.food.burger.greenSauce.visible = true;
popupMenu.m1.food.burger.bloodySauce.visible = true;
popupMenu.m1.food.burger.nails.visible = true;
popupMenu.m1.description.text = "Try delicious, fried nails added to our Spicy Burger!";
popupMenu.m1.foodName.text = "Crispy Spicy Burger";
popupMenu.m1.price.text = "43";
break;
default:
break;
};
if (popupMenu.m1.price.text != ""){
popupMenu.m1.price.text = (popupMenu.m1.price.text + "$");
};
if (popupMenu.m2.price.text != ""){
popupMenu.m2.price.text = (popupMenu.m2.price.text + "$");
};
if (popupMenu.m3.price.text != ""){
popupMenu.m3.price.text = (popupMenu.m3.price.text + "$");
};
popupMenu.addEventListener(MouseEvent.CLICK, endMenu);
popupMenu.play();
}
function frame67(){
stop();
showTutorial();
}
function frame707(){
stop();
submitScore();
}
function frame708(){
setPopupMenu();
}
}
}//package graphics
Section 60
//Preloader (graphics.Preloader)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class Preloader extends MovieClip {
public var percent2:TextField;
public var percent1:TextField;
var isFinished:Boolean;
public function Preloader(){
isFinished = false;
startPreloading();
}
function loadingUpdate(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:String;
var _local5:Number;
_local2 = MainGameClass.getInstance().loaderInfo.bytesTotal;
_local3 = MainGameClass.getInstance().loaderInfo.bytesLoaded;
_local5 = Math.round(((_local3 * 100) / _local2));
_local4 = (_local5.toString() + "%");
percent1.text = _local4;
percent2.text = _local4;
gotoAndStop(_local5);
if (_local2 <= _local3){
this.removeEventListener(Event.ENTER_FRAME, loadingUpdate);
MainGameClass.getInstance().gotoAndPlay("Preloader2");
};
}
private function startPreloading():void{
this.addEventListener(Event.ENTER_FRAME, loadingUpdate);
}
}
}//package graphics
Section 61
//ResumeBtn (graphics.ResumeBtn)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class ResumeBtn extends MovieClip {
public function ResumeBtn(){
addFrameScript(0, frame1);
super();
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
function frame1(){
stop();
}
private function onClick(_arg1:MouseEvent){
MovieClip(parent.parent).gotoAndPlay("menu_off");
Game.getInstance().currentLevel.pauseLevel();
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 62
//RetryButton (graphics.RetryButton)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class RetryButton extends SimpleButton {
public function RetryButton(){
addEventListener(MouseEvent.CLICK, onClick);
}
private function onClick(_arg1){
Game.getInstance().retryLevel();
}
}
}//package graphics
Section 63
//SpeedIntro (graphics.SpeedIntro)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class SpeedIntro extends MovieClip {
public var okBtn:TextField;
public function SpeedIntro(){
okBtn.addEventListener(MouseEvent.CLICK, onClick);
okBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
okBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
}
private function out(_arg1:MouseEvent){
if (_arg1.currentTarget == okBtn){
okBtn.scaleX = 1;
okBtn.scaleY = 1;
};
}
public function remove(){
if (parent){
parent.removeChild(this);
};
}
private function over(_arg1:MouseEvent){
if (_arg1.currentTarget == okBtn){
okBtn.scaleX = 1.2;
okBtn.scaleY = 1.2;
};
}
private function onClick(_arg1:MouseEvent){
remove();
Game.getInstance().gameType = "speed";
Game.getInstance().levelNr = -1;
Game.getInstance().startLevel(-1);
}
}
}//package graphics
Section 64
//SpeedSummary (graphics.SpeedSummary)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class SpeedSummary extends MovieClip {
public var submit:TextField;
public var backToMenu:TextField;
public var submitDialog:SubmitDialog;
public var playAgain:TextField;
public var money:TextField;
public function SpeedSummary(){
playAgain.addEventListener(MouseEvent.CLICK, onClick);
playAgain.addEventListener(MouseEvent.MOUSE_OVER, over);
playAgain.addEventListener(MouseEvent.MOUSE_OUT, out);
submit.addEventListener(MouseEvent.CLICK, onClick);
submit.addEventListener(MouseEvent.MOUSE_OVER, over);
submit.addEventListener(MouseEvent.MOUSE_OUT, out);
backToMenu.addEventListener(MouseEvent.CLICK, onClick);
backToMenu.addEventListener(MouseEvent.MOUSE_OVER, over);
backToMenu.addEventListener(MouseEvent.MOUSE_OUT, out);
money.text = (Game.getInstance().lastScore.toString() + "$");
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
if (_arg1.currentTarget == playAgain){
Game.getInstance().retryLevel();
};
if (_arg1.currentTarget == submit){
submitDialog.visible = true;
};
if (_arg1.currentTarget == backToMenu){
Game.getInstance().goToMenu();
};
}
}
}//package graphics
Section 65
//SubmitBtn (graphics.SubmitBtn)
package graphics {
import flash.events.*;
import flash.display.*;
public class SubmitBtn extends MovieClip {
public function SubmitBtn(){
addFrameScript(0, frame1);
super();
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
function frame1(){
stop();
}
private function onClick(_arg1:MouseEvent){
MovieClip(parent.parent).play();
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 66
//SubmitDialog (graphics.SubmitDialog)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class SubmitDialog extends MovieClip {
public var okButton:TextField;
public var scores:HighScores;
public var closeBtn:TextField;
public var inputName:TextField;
public var score:TextField;
public function SubmitDialog(){
okButton.addEventListener(MouseEvent.CLICK, onClick);
okButton.addEventListener(MouseEvent.MOUSE_OVER, over);
okButton.addEventListener(MouseEvent.MOUSE_OUT, out);
closeBtn.addEventListener(MouseEvent.CLICK, onClick);
closeBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
closeBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
inputName.maxChars = 13;
score.text = ("Submit your score: " + Game.getInstance().lastScore.toString());
visible = false;
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
if (_arg1.currentTarget == okButton){
Game.getInstance().playerName = inputName.text;
scores.showScores();
} else {
this.visible = false;
};
}
}
}//package graphics
Section 67
//SubmitScoreBtn (graphics.SubmitScoreBtn)
package graphics {
import flash.events.*;
import flash.display.*;
public class SubmitScoreBtn extends MovieClip {
public function SubmitScoreBtn(){
addFrameScript(0, frame1);
super();
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
function frame1(){
stop();
}
private function onClick(_arg1:MouseEvent){
MovieClip(parent.parent).gotoAndPlay("submit");
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 68
//SummaryScreen (graphics.SummaryScreen)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
import flash.text.*;
public class SummaryScreen extends MovieClip {
public var nextLvl:TextField;
public var stats:TextField;
public function SummaryScreen(){
nextLvl.addEventListener(MouseEvent.CLICK, onClick);
nextLvl.addEventListener(MouseEvent.MOUSE_OVER, over);
nextLvl.addEventListener(MouseEvent.MOUSE_OUT, out);
stats.text = (("Needed to earn: " + Game.getInstance().currentLevel.neededMoney.toString()) + "\n");
stats.appendText(((((("Earned: " + Game.getInstance().lastScore.toString()) + "\n") + "Total: ") + Game.getInstance().returnStats().toString()) + "\n"));
}
private function out(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1;
_arg1.currentTarget.scaleY = 1;
}
private function over(_arg1:MouseEvent){
_arg1.currentTarget.scaleX = 1.2;
_arg1.currentTarget.scaleY = 1.2;
}
private function onClick(_arg1:MouseEvent){
Game.getInstance().setNextLevel();
Game.getInstance().gotoAndStop("careerIntro");
}
}
}//package graphics
Section 69
//TitleMuteButton (graphics.TitleMuteButton)
package graphics {
import flash.events.*;
import main.*;
import sounds.*;
import flash.display.*;
public class TitleMuteButton extends MovieClip {
var flag:Boolean;
var s;// = "out"
var temp;// = "on"
public function TitleMuteButton(){
temp = "on";
s = "out";
addFrameScript(0, frame1);
super();
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
flag = true;
buttonMode = true;
tabEnabled = false;
s = "_out";
if (MainGameClass.getInstance().mute == true){
temp = "off";
} else {
temp = "on";
};
update();
}
private function onOver(_arg1:MouseEvent){
s = "_over";
update();
}
function frame1(){
stop();
}
public function update(){
gotoAndStop((temp + s));
}
private function onClick(_arg1:MouseEvent){
flag = MainGameClass.getInstance().mute;
if (flag){
temp = "on";
MainGameClass.getInstance().mute = false;
MainGameClass.getInstance().startMusic();
} else {
temp = "off";
MainGameClass.getInstance().mute = true;
MutebleSound.silencer.dispatchEvent(new Event(MutebleSound.SILENCE));
};
update();
}
private function onOut(_arg1:MouseEvent){
s = "_out";
update();
}
}
}//package graphics
Section 70
//TitlePlayButton (graphics.TitlePlayButton)
package graphics {
import flash.events.*;
import main.*;
import flash.display.*;
public class TitlePlayButton extends MovieClip {
public function TitlePlayButton(){
addFrameScript(0, frame1);
super();
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
buttonMode = true;
tabEnabled = false;
gotoAndStop("out");
}
private function onOver(_arg1:MouseEvent){
gotoAndStop("over");
}
function frame1(){
stop();
}
public function update(){
}
private function onClick(_arg1:MouseEvent){
MainGameClass.getInstance().gotoAndPlay("Title2");
}
private function onOut(_arg1:MouseEvent){
gotoAndStop("out");
}
}
}//package graphics
Section 71
//Tutorial (graphics.Tutorial)
package graphics {
import flash.events.*;
import gameplay.elements.*;
import main.*;
import flash.display.*;
import gameplay.*;
public class Tutorial extends MovieClip {
public var levelRef:Level;
public var t:int;
public var money:MovieClip;
public function Tutorial(){
addFrameScript(0, frame1);
super();
levelRef = Game.getInstance().currentLevel;
addEventListener(Event.ENTER_FRAME, onFrame);
addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
gotoAndStop(1);
mouseEnabled = false;
mouseChildren = true;
t = 0;
}
private function onRemovedFromStage(_arg1:Event){
removeEventListener(Event.ENTER_FRAME, onFrame);
}
function frame1(){
stop();
}
public function goNext(){
gotoAndStop((currentFrame + 1));
t++;
}
public function remove(){
if (parent){
try {
parent.removeChild(this);
} catch(e:ArgumentError) {
};
};
}
private function onAddedToStage(_arg1:Event){
levelRef.tutorial = this;
visible = false;
}
private function onFrame(_arg1:Event){
var _local2:Array;
var _local3:int;
switch (t){
case 0:
_local2 = levelRef.breadrolls;
_local3 = 0;
while (_local3 < _local2.length) {
if (_local2[_local3].visible){
goNext();
break;
};
_local3++;
};
break;
case 1:
_local2 = levelRef.sausages;
_local3 = 0;
while (_local3 < _local2.length) {
if (_local2[_local3].visible){
goNext();
break;
};
_local3++;
};
break;
case 2:
_local2 = levelRef.sausages;
_local3 = 0;
while (_local3 < _local2.length) {
if (HotMeal(_local2[_local3]).isReady()){
goNext();
break;
};
_local3++;
};
break;
case 3:
_local2 = levelRef.breadrolls;
_local3 = 0;
while (_local3 < _local2.length) {
if (Item(_local2[_local3]).itemType == Item.HOT_DOG){
goNext();
break;
};
_local3++;
};
break;
case 4:
if (levelRef.moneyContainer.numChildren > 0){
goNext();
money = MovieClip(levelRef.moneyContainer.getChildAt(0));
};
break;
case 5:
if (((((money) && (!((money.parent == levelRef.moneyContainer))))) || ((money.visible == false)))){
remove();
};
break;
default:
break;
};
}
}
}//package graphics
Section 72
//Tutorial444 (graphics.Tutorial444)
package graphics {
import flash.display.*;
public dynamic class Tutorial444 extends MovieClip {
public function Tutorial444(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package graphics
Section 73
//Game (main.Game)
package main {
import flash.events.*;
import flash.media.*;
import gameplay.elements.*;
import graphics.*;
import sounds.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import gameplay.*;
public class Game extends MovieClip {
public var environment:Environment;
public var mute:Boolean;
public var menager:MainGameClass;
public var gameType:String;
public var levelNr:Number;
public var stats:Array;
public var channel:SoundChannel;
public var place:Number;
public var playerName:String;
public var levels:Array;
public var currentLevel:Level;
public var placeBackground;// = "cityAtNight"
public var lastScore:Number;
public var levelEnvir:String;
public static var instance:Game;
public function Game(){
placeBackground = "cityAtNight";
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28);
instance = this;
levelNr = 1;
levels = new Array();
stats = new Array(5);
place = 0;
lastScore = -(Infinity);
addEventListener(Event.ADDED_TO_STAGE, added);
addEventListener(MouseEvent.MOUSE_UP, mup);
menager = MainGameClass.getInstance();
clearPlaceStats();
gotoAndStop("empty");
}
public function clearPlaceStats(){
stats[place] = 0;
}
public function showFailScreen(){
currentLevel.pauseLevel();
currentLevel.hud.showFailInfo();
}
public function setNextLevel(){
levelNr++;
currentLevel = levels[levelNr];
}
public function beginGame(){
initGame();
placeBackground = menager.currentActivePlace;
MainGameClass.getInstance().updatePlaceScore(placeBackground, 0);
menager.currentActivePlace = null;
gameType = menager.gameType;
if (gameType == "speed"){
startLevel(-1);
} else {
startLevel(1);
};
}
public function startLevel(_arg1:Number){
_arg1 = (_arg1 + MainGameClass.getInstance().giveLevelNr());
killChildren();
gotoAndStop("empty");
MutebleSound.silencer.dispatchEvent(new Event(MutebleSound.SILENCE));
switch (_arg1){
case -1:
gameType = "speed";
currentLevel = levels[0];
placeBackground = "cementary";
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 1:
currentLevel = levels[1];
addChild(currentLevel);
gotoAndPlay("level1");
break;
case 2:
currentLevel = levels[2];
addChild(currentLevel);
gotoAndPlay("level2");
break;
case 3:
currentLevel = levels[3];
addChild(currentLevel);
gotoAndPlay("level3");
break;
case 4:
currentLevel = levels[4];
addChild(currentLevel);
gotoAndPlay("level4");
break;
case 5:
currentLevel = levels[5];
addChild(currentLevel);
gotoAndPlay("level5");
break;
case 6:
currentLevel = levels[6];
addChild(currentLevel);
gotoAndPlay("level6");
break;
case 7:
currentLevel = levels[7];
addChild(currentLevel);
gotoAndPlay("level7");
break;
case 8:
currentLevel = levels[8];
addChild(currentLevel);
gotoAndPlay("level8");
break;
case 9:
currentLevel = levels[9];
addChild(currentLevel);
gotoAndPlay("level9");
break;
case 10:
currentLevel = levels[10];
addChild(currentLevel);
gotoAndPlay("level10");
break;
case 11:
currentLevel = levels[11];
addChild(currentLevel);
gotoAndPlay("level11");
break;
case 12:
currentLevel = levels[12];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 13:
currentLevel = levels[13];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 14:
currentLevel = levels[14];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 15:
currentLevel = levels[15];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 16:
currentLevel = levels[16];
addChild(currentLevel);
gotoAndPlay("level11");
break;
case 17:
currentLevel = levels[17];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 18:
currentLevel = levels[18];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 19:
currentLevel = levels[19];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 20:
currentLevel = levels[20];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 21:
currentLevel = levels[21];
addChild(currentLevel);
gotoAndPlay("level11");
break;
case 22:
currentLevel = levels[22];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 23:
currentLevel = levels[23];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 24:
currentLevel = levels[24];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 25:
currentLevel = levels[25];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 26:
currentLevel = levels[26];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 27:
currentLevel = levels[27];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 28:
currentLevel = levels[28];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 29:
currentLevel = levels[29];
addChild(currentLevel);
gotoAndPlay("level12");
break;
case 30:
currentLevel = levels[30];
addChild(currentLevel);
gotoAndPlay("level12");
break;
default:
break;
};
}
function frame10(){
stop();
}
function frame14(){
stop();
}
public function nextLevel(){
currentLevel.remove();
initGame();
setNextLevel();
if (levelNr < 6){
startLevel(levelNr);
} else {
showOutro();
};
}
function frame16(){
stop();
}
function frame18(){
stop();
}
function frame19(){
stop();
}
function frame12(){
stop();
}
function frame15(){
stop();
}
function frame17(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
public function traceChildren(){
var _local1:int;
_local1 = 0;
while (_local1 < numChildren) {
_local1++;
};
}
function frame22(){
stop();
}
function frame23(){
stop();
}
function frame5(){
stop();
}
function frame25(){
stop();
}
function frame13(){
stop();
}
function frame9(){
stop();
}
function frame2(){
stop();
}
function frame24(){
stop();
}
function frame21(){
stop();
}
function frame1(){
stop();
}
function frame26(){
stop();
}
function frame8(){
stop();
}
public function showEnding(){
currentLevel.hud.popups.gotoAndPlay("certificate");
}
function frame11(){
stop();
}
function frame27(){
stop();
}
function frame28(){
stop();
}
function frame20(){
stop();
}
public function goToMap(){
MainGameClass.getInstance().gotoAndPlay("2Map");
MainGameClass.getInstance().startMusic();
}
public function showSpeedSummary(){
currentLevel.pauseLevel();
currentLevel.hud.popups.gotoAndPlay("speedOutro");
}
private function added(_arg1){
initGame();
}
public function startCurrentLevel(){
if (levelNr < levels.length){
startLevel(levelNr);
killChildren();
} else {
gotoAndStop("outro");
};
}
public function showOutro(){
currentLevel.pauseLevel();
MainGameClass.getInstance().updatePlaceScore(placeBackground, stats[place]);
if (MainGameClass.getInstance().isGameFinished()){
showEnding();
} else {
currentLevel.hud.placeClear();
};
}
public function saveStats(){
var _local1:SharedObject;
_local1 = SharedObject.getLocal("zb_stats");
_local1.data.savedValue = stats;
}
public function initGame(){
levels[1] = new Level();
levels[1].itemsAdded = "level1";
levels[1].normalChance = 1;
levels[1].easyChance = 0.7;
levels[1].maxZombies = 3;
levels[1].zombieSpawnTime = 5;
levels[1].timeLimit = 60;
levels[1].neededMoney = 60;
levels[2] = new Level();
levels[2].itemsAdded = "level2";
levels[2].normalChance = 1;
levels[2].easyChance = 0.6;
levels[2].maxZombies = 4;
levels[2].timeLimit = 60;
levels[2].neededMoney = 70;
levels[3] = new Level();
levels[3].normalChance = 1;
levels[3].easyChance = 0.5;
levels[3].maxZombies = 5;
levels[3].timeLimit = 60;
levels[3].neededMoney = 80;
levels[4] = new Level();
levels[4].itemsAdded = "level4";
levels[4].normalChance = 1;
levels[4].easyChance = 0.4;
levels[4].maxZombies = 5;
levels[4].timeLimit = 60;
levels[4].neededMoney = 90;
levels[5] = new Level();
levels[5].normalChance = 1;
levels[5].easyChance = 0.3;
levels[5].maxZombies = 5;
levels[5].timeLimit = 60;
levels[5].neededMoney = 100;
levels[6] = new Level();
levels[6].itemsAdded = "level6";
levels[6].normalChance = 0.95;
levels[6].easyChance = 0.4;
levels[6].maxZombies = 5;
levels[6].timeLimit = 60;
levels[6].neededMoney = 110;
levels[7] = new Level();
levels[7].normalChance = 0.9;
levels[7].easyChance = 0.3;
levels[7].maxZombies = 5;
levels[7].timeLimit = 60;
levels[7].neededMoney = 120;
levels[8] = new Level();
levels[8].itemsAdded = "level8";
levels[8].normalChance = 0.85;
levels[8].easyChance = 0.3;
levels[8].maxZombies = 5;
levels[8].timeLimit = 60;
levels[8].neededMoney = 130;
levels[9] = new Level();
levels[9].maxZombies = 5;
levels[9].timeLimit = 60;
levels[9].neededMoney = 140;
levels[10] = new Level();
levels[10].itemsAdded = "level10";
levels[10].maxZombies = 5;
levels[10].timeLimit = 60;
levels[10].neededMoney = 150;
levels[11] = new Level();
levels[11].maxZombies = 5;
levels[11].timeLimit = 60;
levels[11].neededMoney = 160;
levels[12] = new Level();
levels[12].itemsAdded = "level12";
levels[12].maxZombies = 5;
levels[12].timeLimit = 60;
levels[12].neededMoney = 170;
levels[13] = new Level();
levels[13].maxZombies = 5;
levels[13].timeLimit = 60;
levels[13].neededMoney = 180;
levels[14] = new Level();
levels[14].maxZombies = 5;
levels[14].timeLimit = 60;
levels[14].neededMoney = 190;
levels[15] = new Level();
levels[15].maxZombies = 5;
levels[15].timeLimit = 60;
levels[15].neededMoney = 195;
levels[16] = new Level();
levels[16].maxZombies = 5;
levels[16].timeLimit = 60;
levels[16].neededMoney = 200;
levels[17] = new Level();
levels[17].maxZombies = 5;
levels[17].timeLimit = 60;
levels[17].neededMoney = 205;
levels[18] = new Level();
levels[18].maxZombies = 5;
levels[18].timeLimit = 60;
levels[18].neededMoney = 210;
levels[19] = new Level();
levels[19].maxZombies = 5;
levels[19].timeLimit = 60;
levels[19].neededMoney = 215;
levels[20] = new Level();
levels[20].maxZombies = 5;
levels[20].timeLimit = 60;
levels[20].neededMoney = 220;
levels[21] = new Level();
levels[21].maxZombies = 5;
levels[21].timeLimit = 60;
levels[21].neededMoney = 225;
levels[22] = new Level();
levels[22].maxZombies = 5;
levels[22].timeLimit = 60;
levels[22].neededMoney = 230;
levels[23] = new Level();
levels[23].maxZombies = 5;
levels[23].timeLimit = 60;
levels[23].neededMoney = 235;
levels[24] = new Level();
levels[24].maxZombies = 5;
levels[24].timeLimit = 60;
levels[24].neededMoney = 240;
levels[25] = new Level();
levels[25].maxZombies = 5;
levels[25].timeLimit = 60;
levels[25].neededMoney = 245;
levels[0] = new Level();
levels[0].normalChance = 0.75;
levels[0].easyChance = 0.3;
levels[0].multiChips = true;
levels[0].maxZombies = 5;
levels[0].timeLimit = 120;
levels[0].earnedMoney = 0;
levels[0].neededMoney = 0;
}
public function returnStats():Number{
return (stats[place]);
}
public function updateStats(_arg1:Number){
stats[place] = (stats[place] + _arg1);
}
public function loadStats(){
var _local1:SharedObject;
var _local2:int;
_local1 = SharedObject.getLocal("zb_stats");
if (_local1.data.savedValue){
stats = _local1.data.savedValue;
} else {
_local2 = 0;
while (_local2 < stats.length) {
stats[_local2] = 0;
_local2++;
};
};
}
public function killChildren(){
var _local1:int;
_local1 = 0;
while (numChildren > _local1) {
if (getChildAt(_local1) == null){
_local1++;
} else {
removeChildAt(_local1);
};
};
}
public function goToMenu(){
if (channel){
channel.stop();
};
channel = null;
killChildren();
initGame();
MutebleSound.silencer.dispatchEvent(new Event(MutebleSound.SILENCE));
MainGameClass.getInstance().gotoAndPlay("2Title");
}
public function retryLevel(){
currentLevel.remove();
killChildren();
initGame();
if (gameType == "career"){
startLevel(levelNr);
} else {
startLevel(-1);
};
}
private function mup(_arg1:MouseEvent){
Item.stopDragging(_arg1);
}
public function showSummary(){
currentLevel.pauseLevel();
currentLevel.hud.popups.gotoAndPlay("wellDone");
}
public static function getInstance():Game{
return (instance);
}
}
}//package main
Section 74
//MainGameClass (main.MainGameClass)
package main {
import graphics.*;
import sounds.*;
import flash.display.*;
import flash.net.*;
public class MainGameClass extends MovieClip {
public var menuMusic:MenuMusic;
public var counter:Preloader;
public var morgue:Map_FranchizeHolder_05_Crematory;
public var scores:Array;
public var mute:Boolean;
public var zombieBurger:Game;
public var mortuary:Map_FranchizeHolder_04_Mortuary;
public var playerName:String;
public var gameType;// = "story"
public var places:Array;
public var highScores:MovieClip;
public var currentActivePlace;
public var fabrykaGier:LogoFactory;
public var church:Map_FranchizeHolder_02_Cathedral;
public var cementary:Map_FranchizeHolder_03_Cemetery;
public var list:Array;
public var cityAtNight:Map_FranchizeHolder_01_City;
public var lastScore:Number;
public var sound_mc:TitleMuteButton;
public var addicting:LogoAddicting;
public static var instance:MainGameClass;
public function MainGameClass(){
var _local1:int;
gameType = "story";
addFrameScript(14, frame15, 46, frame47, 99, frame100, 141, frame142, 155, frame156, 170, frame171, 209, frame210, 246, frame247, 874, frame875, 897, frame898, 960, frame961, 1016, frame1017);
super();
list = new Array();
scores = new Array(5);
places = new Array(new Array("cityAtNight", 0), new Array("church", 0), new Array("cementary", 0), new Array("mortuary", 0), new Array("morgue", 0));
_local1 = 0;
while (_local1 < scores.length) {
scores[_local1] = 0;
_local1++;
};
instance = this;
clearScores();
loadScores();
mute = false;
playerName = "Unnamed";
lastScore = -(Infinity);
updateSpeedScores();
tabChildren = false;
}
public function saveScores(){
var _local1:SharedObject;
_local1 = SharedObject.getLocal("zb_stats");
_local1.data.savedValue = places;
}
public function startMusic(){
if (!menuMusic){
menuMusic = new MenuMusic();
};
menuMusic.play(0, int.MAX_VALUE);
}
public function giveLevelNr():int{
var _local1:int;
var _local2:int;
_local1 = 0;
_local2 = 0;
while (_local2 < places.length) {
if (places[_local2][1] != 0){
_local1 = (_local1 + 5);
};
_local2++;
};
return (_local1);
}
function frame961(){
stop();
}
public function stopMusic(){
menuMusic.stop();
}
function frame210(){
stop();
}
function frame15(){
stop();
}
function frame100(){
stop();
}
public function prepareMusic(){
menuMusic = new MenuMusic();
}
public function returnScores():Array{
return (places);
}
public function updatePlaceScore(_arg1:String, _arg2:Number){
var _local3:int;
_local3 = 0;
while (_local3 < scores.length) {
if (places[_local3][0] == _arg1){
places[_local3][1] = _arg2;
saveScores();
break;
};
_local3++;
};
}
function frame171(){
gotoAndPlay("Back2Title");
}
function frame1017(){
stop();
}
function frame875(){
stop();
}
public function loadSpeedScores(){
updateSpeedScores();
highScores.n1.text = list[(list.length - 1)][0];
highScores.s1.text = list[(list.length - 1)][1];
highScores.n2.text = list[(list.length - 2)][0];
highScores.s2.text = list[(list.length - 2)][1];
highScores.n3.text = list[(list.length - 3)][0];
highScores.s3.text = list[(list.length - 3)][1];
highScores.n4.text = list[(list.length - 4)][0];
highScores.s4.text = list[(list.length - 4)][1];
highScores.n5.text = list[(list.length - 5)][0];
highScores.s5.text = list[(list.length - 5)][1];
}
public function setTimeMode(){
gameType = "speed";
}
public function startGame(){
if (gameType == "career"){
gotoAndPlay("Intro");
};
if (gameType == "speed"){
gotoAndPlay("Game");
};
}
function frame247(){
startGame();
}
function frame47(){
startMusic();
}
function frame156(){
stop();
}
public function loadScores(){
var _local1:SharedObject;
var _local2:int;
_local1 = SharedObject.getLocal("zb_stats");
if (_local1.data.savedValue){
places = _local1.data.savedValue;
} else {
_local2 = 0;
while (_local2 < places.length) {
if (!places[_local2][1]){
places[_local2][1] = 0;
};
_local2++;
};
};
}
function frame898(){
zombieBurger.beginGame();
stop();
}
public function updateSpeedScores():Boolean{
var _local1:SharedObject;
var _local2:Boolean;
var _local3:int;
_local1 = SharedObject.getLocal("tempFile");
if (!_local1.data.savedValue){
list.push(new Array("Kenny", 0));
list.push(new Array("Eric", 0));
list.push(new Array("JC", 0));
list.push(new Array("Stan", 0));
list.push(new Array("Mike", 0));
_local1.data.savedValue = list;
_local2 = false;
} else {
_local2 = true;
list = _local1.data.savedValue;
_local3 = (list.length - 1);
while (_local3 >= 0) {
if (list[_local3][1] <= lastScore){
list.splice((_local3 + 1), 0, new Array(playerName, lastScore));
list.splice(0, 1);
_local1.data.savedValue = list;
break;
};
_local3--;
};
};
return (_local2);
}
public function getState(_arg1:PlaceButton){
var _local2:int;
_local2 = 0;
while (_local2 < places.length) {
if ((((places[_local2][0] == _arg1.name)) && (!(currentActivePlace)))){
if (places[_local2][1]){
_arg1.btnState = "visited";
};
if (places[_local2][1] == 0){
currentActivePlace = _arg1.name;
_arg1.btnState = "active";
break;
};
};
_local2++;
};
}
public function clearScores(){
var _local1:int;
_local1 = 0;
while (_local1 < places.length) {
places[_local1][1] = 0;
_local1++;
};
saveScores();
}
public function isGameFinished():Boolean{
var _local1:int;
_local1 = 0;
while (_local1 < places.length) {
if (places[_local1][1] == 0){
return (false);
};
_local1++;
};
return (true);
}
function frame142(){
loadSpeedScores();
}
public function setStoryMode(){
gameType = "career";
}
public static function getInstance():MainGameClass{
return (instance);
}
}
}//package main
Section 75
//Bite1 (sounds.Bite1)
package sounds {
public dynamic class Bite1 extends MutebleSound {
}
}//package sounds
Section 76
//Bite2 (sounds.Bite2)
package sounds {
public dynamic class Bite2 extends MutebleSound {
}
}//package sounds
Section 77
//Bite3 (sounds.Bite3)
package sounds {
public dynamic class Bite3 extends MutebleSound {
}
}//package sounds
Section 78
//Cash1 (sounds.Cash1)
package sounds {
public dynamic class Cash1 extends MutebleSound {
}
}//package sounds
Section 79
//Cash2 (sounds.Cash2)
package sounds {
public dynamic class Cash2 extends MutebleSound {
}
}//package sounds
Section 80
//ChipsOnOil (sounds.ChipsOnOil)
package sounds {
public dynamic class ChipsOnOil extends MutebleSound {
}
}//package sounds
Section 81
//Clock1 (sounds.Clock1)
package sounds {
public dynamic class Clock1 extends MutebleSound {
}
}//package sounds
Section 82
//Drink (sounds.Drink)
package sounds {
public dynamic class Drink extends MutebleSound {
}
}//package sounds
Section 83
//Fire (sounds.Fire)
package sounds {
public dynamic class Fire extends MutebleSound {
}
}//package sounds
Section 84
//FootStep1 (sounds.FootStep1)
package sounds {
public dynamic class FootStep1 extends MutebleSound {
}
}//package sounds
Section 85
//FootStep2 (sounds.FootStep2)
package sounds {
public dynamic class FootStep2 extends MutebleSound {
}
}//package sounds
Section 86
//Frying (sounds.Frying)
package sounds {
public dynamic class Frying extends MutebleSound {
}
}//package sounds
Section 87
//Frying1 (sounds.Frying1)
package sounds {
public dynamic class Frying1 extends MutebleSound {
}
}//package sounds
Section 88
//Frying2 (sounds.Frying2)
package sounds {
public dynamic class Frying2 extends MutebleSound {
}
}//package sounds
Section 89
//GameMusic (sounds.GameMusic)
package sounds {
public dynamic class GameMusic extends MutebleMusic {
}
}//package sounds
Section 90
//Garbage (sounds.Garbage)
package sounds {
public dynamic class Garbage extends MutebleSound {
}
}//package sounds
Section 91
//Grill (sounds.Grill)
package sounds {
public dynamic class Grill extends MutebleSound {
}
}//package sounds
Section 92
//MenuMusic (sounds.MenuMusic)
package sounds {
public dynamic class MenuMusic extends MutebleMusic {
}
}//package sounds
Section 93
//MutebleMusic (sounds.MutebleMusic)
package sounds {
import flash.events.*;
public class MutebleMusic extends MutebleSound {
override public function sndComplete(_arg1:Event){
play(0, l, t);
}
override public function resume(){
}
override public function pause(){
}
}
}//package sounds
Section 94
//MutebleSound (sounds.MutebleSound)
package sounds {
import flash.events.*;
import flash.media.*;
import main.*;
import flash.display.*;
public class MutebleSound extends Sound {
public var t:SoundTransform;
private var psd:Boolean;
private var isPlaying:Boolean;
private var ch:SoundChannel;
private var position:Number;
public var l:int;
public static var silencer:MovieClip;
public static var SILENCE = "silence";
public static var RESUME_ALL_SOUNDS = "resumeAllSounds";
public static var PAUSE_ALL_SOUNDS = "pauseAllSounds";
public function MutebleSound(){
isPlaying = false;
psd = false;
if (!silencer){
silencer = new MovieClip();
};
l = 0;
t = null;
silencer.addEventListener(SILENCE, silence);
silencer.addEventListener(PAUSE_ALL_SOUNDS, pauseAllSounds);
silencer.addEventListener(RESUME_ALL_SOUNDS, resumeAllSounds);
}
public function sndComplete(_arg1:Event){
stop();
}
public function stop(){
isPlaying = false;
position = 0;
if (ch){
ch.removeEventListener(Event.SOUND_COMPLETE, sndComplete);
ch.stop();
ch = null;
};
}
public function silence(_arg1:Event){
stop();
}
public function resumeAllSounds(_arg1:Event){
resume();
}
override public function play(_arg1:Number=0, _arg2:int=0, _arg3:SoundTransform=null):SoundChannel{
l = _arg2;
t = _arg3;
psd = false;
stop();
if (MainGameClass.getInstance()){
if (!MainGameClass.getInstance().mute){
ch = super.play(_arg1, _arg2, _arg3);
if (ch){
ch.addEventListener(Event.SOUND_COMPLETE, sndComplete);
};
isPlaying = true;
return (ch);
} else {
return (null);
};
//unresolved jump
};
ch = super.play(_arg1, _arg2, _arg3);
ch.addEventListener(Event.SOUND_COMPLETE, sndComplete);
isPlaying = true;
return (ch);
}
public function pauseAllSounds(_arg1:Event){
pause();
}
public function resume(){
if (((ch) && (psd))){
ch.stop();
ch = super.play(position, this.l, this.t);
if (ch){
ch.addEventListener(Event.SOUND_COMPLETE, sndComplete);
};
isPlaying = true;
psd = false;
};
}
public function pause(){
if (((((ch) && (!(psd)))) && (isPlaying))){
psd = true;
position = ch.position;
ch.stop();
};
}
}
}//package sounds
Section 95
//Sauce1 (sounds.Sauce1)
package sounds {
public dynamic class Sauce1 extends MutebleSound {
}
}//package sounds
Section 96
//Sauce2 (sounds.Sauce2)
package sounds {
public dynamic class Sauce2 extends MutebleSound {
}
}//package sounds
Section 97
//Sauce3 (sounds.Sauce3)
package sounds {
public dynamic class Sauce3 extends MutebleSound {
}
}//package sounds
Section 98
//Sauce4 (sounds.Sauce4)
package sounds {
public dynamic class Sauce4 extends MutebleSound {
}
}//package sounds
Section 99
//Sauce5 (sounds.Sauce5)
package sounds {
public dynamic class Sauce5 extends MutebleSound {
}
}//package sounds
Section 100
//Sauce6 (sounds.Sauce6)
package sounds {
public dynamic class Sauce6 extends MutebleSound {
}
}//package sounds
Section 101
//SoundContainer (sounds.SoundContainer)
package sounds {
import flash.media.*;
public class SoundContainer {
public var channel:SoundChannel;
public var i:int;
public var inside:Array;
public function SoundContainer(){
inside = new Array();
}
public function playRandSnd(){
var _local1:Number;
_local1 = (Math.random() * (inside.length - 1));
_local1 = Math.round(_local1);
inside[_local1].play();
i = _local1;
}
public function endSound(){
inside[i].stop();
}
}
}//package sounds
Section 102
//ZombieAngry1 (sounds.ZombieAngry1)
package sounds {
public dynamic class ZombieAngry1 extends MutebleSound {
}
}//package sounds
Section 103
//ZombieAngry2 (sounds.ZombieAngry2)
package sounds {
public dynamic class ZombieAngry2 extends MutebleSound {
}
}//package sounds
Section 104
//ZombieAngry4 (sounds.ZombieAngry4)
package sounds {
public dynamic class ZombieAngry4 extends MutebleSound {
}
}//package sounds
Section 105
//ZombieHappy1 (sounds.ZombieHappy1)
package sounds {
public dynamic class ZombieHappy1 extends MutebleSound {
}
}//package sounds
Section 106
//ZombieHappy2 (sounds.ZombieHappy2)
package sounds {
public dynamic class ZombieHappy2 extends MutebleSound {
}
}//package sounds
Section 107
//ZombieIrritated1 (sounds.ZombieIrritated1)
package sounds {
public dynamic class ZombieIrritated1 extends MutebleSound {
}
}//package sounds
Section 108
//ZombieIrritated2 (sounds.ZombieIrritated2)
package sounds {
public dynamic class ZombieIrritated2 extends MutebleSound {
}
}//package sounds
Section 109
//ZombieIrritated3 (sounds.ZombieIrritated3)
package sounds {
public dynamic class ZombieIrritated3 extends MutebleSound {
}
}//package sounds
Section 110
//ZombieSpeaks1 (sounds.ZombieSpeaks1)
package sounds {
public dynamic class ZombieSpeaks1 extends MutebleSound {
}
}//package sounds
Section 111
//_zbedny_emcek_287 (zombie_burger_fla._zbedny_emcek_287)
package zombie_burger_fla {
import flash.display.*;
public dynamic class _zbedny_emcek_287 extends MovieClip {
public function _zbedny_emcek_287(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_burger_fla
Section 112
//Blenda2_113 (zombie_burger_fla.Blenda2_113)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Blenda2_113 extends MovieClip {
public function Blenda2_113(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package zombie_burger_fla
Section 113
//BlendaIn_114 (zombie_burger_fla.BlendaIn_114)
package zombie_burger_fla {
import flash.display.*;
public dynamic class BlendaIn_114 extends MovieClip {
public function BlendaIn_114(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package zombie_burger_fla
Section 114
//breadroll2Graphics_104 (zombie_burger_fla.breadroll2Graphics_104)
package zombie_burger_fla {
import flash.display.*;
public dynamic class breadroll2Graphics_104 extends MovieClip {
public var bloodySauce:MovieClip;
public var nails:MovieClip;
public var greenSauce:MovieClip;
}
}//package zombie_burger_fla
Section 115
//breadrollGraphics_102 (zombie_burger_fla.breadrollGraphics_102)
package zombie_burger_fla {
import flash.display.*;
public dynamic class breadrollGraphics_102 extends MovieClip {
public var bloodySauce:MovieClip;
public var nails:MovieClip;
public var greenSauce:MovieClip;
}
}//package zombie_burger_fla
Section 116
//Button_Menu_87 (zombie_burger_fla.Button_Menu_87)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Button_Menu_87 extends MovieClip {
public function Button_Menu_87(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_burger_fla
Section 117
//Eye_27 (zombie_burger_fla.Eye_27)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Eye_27 extends MovieClip {
public function Eye_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_burger_fla
Section 118
//Food_Hamburger_Tongue_62 (zombie_burger_fla.Food_Hamburger_Tongue_62)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Food_Hamburger_Tongue_62 extends MovieClip {
public function Food_Hamburger_Tongue_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_burger_fla
Section 119
//Game_Certificate_153 (zombie_burger_fla.Game_Certificate_153)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Game_Certificate_153 extends MovieClip {
public var score:MovieClip;
public function Game_Certificate_153(){
addFrameScript(38, frame39);
}
function frame39(){
stop();
}
}
}//package zombie_burger_fla
Section 120
//Game_Certificate_Text_154 (zombie_burger_fla.Game_Certificate_Text_154)
package zombie_burger_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Game_Certificate_Text_154 extends MovieClip {
public var t2:TextField;
public var t3:TextField;
public var t1:TextField;
public var t5:TextField;
public var total:TextField;
public var t4:TextField;
}
}//package zombie_burger_fla
Section 121
//Game_Menu_99 (zombie_burger_fla.Game_Menu_99)
package zombie_burger_fla {
import graphics.*;
import flash.display.*;
public dynamic class Game_Menu_99 extends MovieClip {
public var m3:GameMenuLevel;
public var m1:GameMenuLevel;
public var m2:GameMenuLevel;
public function Game_Menu_99(){
addFrameScript(10, frame11, 16, frame17, 27, frame28, 33, frame34, 44, frame45, 50, frame51, 61, frame62, 67, frame68, 78, frame79, 84, frame85);
}
function frame79(){
stop();
}
function frame85(){
stop();
}
function frame17(){
stop();
}
function frame28(){
stop();
}
function frame34(){
stop();
}
function frame11(){
stop();
}
function frame45(){
stop();
}
function frame51(){
stop();
}
function frame62(){
stop();
}
function frame68(){
stop();
}
}
}//package zombie_burger_fla
Section 122
//Game_Menu_FoodPicture_101 (zombie_burger_fla.Game_Menu_FoodPicture_101)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Game_Menu_FoodPicture_101 extends MovieClip {
public var burger:MovieClip;
public var chips:MovieClip;
public var hotDog:MovieClip;
public var coke:MovieClip;
public var lemonade:MovieClip;
}
}//package zombie_burger_fla
Section 123
//Intro_Photo1_115 (zombie_burger_fla.Intro_Photo1_115)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Intro_Photo1_115 extends MovieClip {
public function Intro_Photo1_115(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package zombie_burger_fla
Section 124
//Intro_Photo2_117 (zombie_burger_fla.Intro_Photo2_117)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Intro_Photo2_117 extends MovieClip {
public function Intro_Photo2_117(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package zombie_burger_fla
Section 125
//Intro_Photo3_119 (zombie_burger_fla.Intro_Photo3_119)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Intro_Photo3_119 extends MovieClip {
public function Intro_Photo3_119(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package zombie_burger_fla
Section 126
//Map_FranchizeHolder_Trolley_290 (zombie_burger_fla.Map_FranchizeHolder_Trolley_290)
package zombie_burger_fla {
import flash.display.*;
public dynamic class Map_FranchizeHolder_Trolley_290 extends MovieClip {
public function Map_FranchizeHolder_Trolley_290(){
addFrameScript(0, frame1);
}
function frame1(){
this.mouseChildren = false;
this.mouseEnabled = false;
}
}
}//package zombie_burger_fla
Section 127
//Money_Amount_286 (zombie_burger_fla.Money_Amount_286)
package zombie_burger_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Money_Amount_286 extends MovieClip {
public var counter:TextField;
}
}//package zombie_burger_fla
Section 128
//Panel_HighscoresA_97 (zombie_burger_fla.Panel_HighscoresA_97)
package zombie_burger_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Panel_HighscoresA_97 extends MovieClip {
public var s1:TextField;
public var s5:TextField;
public var s2:TextField;
public var s4:TextField;
public var s3:TextField;
public var n1:TextField;
public var n2:TextField;
public var n5:TextField;
public var n4:TextField;
public var n3:TextField;
}
}//package zombie_burger_fla
Section 129
//Popup_BadNight2_158 (zombie_burger_fla.Popup_BadNight2_158)
package zombie_burger_fla {
import graphics.*;
import flash.display.*;
public dynamic class Popup_BadNight2_158 extends MovieClip {
public var exitBtn:ExitButton;
public var resumeBtn:ButtonRetry;
}
}//package zombie_burger_fla
Section 130
//Popup_Failure_149 (zombie_burger_fla.Popup_Failure_149)
package zombie_burger_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Popup_Failure_149 extends MovieClip {
public var neededMoney:TextField;
public var earnedMoney:TextField;
}
}//package zombie_burger_fla
Section 131
//Popup_Menu_144 (zombie_burger_fla.Popup_Menu_144)
package zombie_burger_fla {
import graphics.*;
import flash.display.*;
public dynamic class Popup_Menu_144 extends MovieClip {
public var exitBtn:ExitButton;
public var resumeBtn:ResumeBtn;
}
}//package zombie_burger_fla
Section 132
//Popup_Night_145 (zombie_burger_fla.Popup_Night_145)
package zombie_burger_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Popup_Night_145 extends MovieClip {
public var money:TextField;
public function Popup_Night_145(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_burger_fla
Section 133
//Popup_Retry_150 (zombie_burger_fla.Popup_Retry_150)
package zombie_burger_fla {
import graphics.*;
import flash.display.*;
public dynamic class Popup_Retry_150 extends MovieClip {
public var resumeBtn:ButtonRetry;
}
}//package zombie_burger_fla
Section 134
//Popup_TimeComplete_159 (zombie_burger_fla.Popup_TimeComplete_159)
package zombie_burger_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Popup_TimeComplete_159 extends MovieClip {
public var earned:TextField;
}
}//package zombie_burger_fla
Section 135
//Popup_TimeCompleteName_161 (zombie_burger_fla.Popup_TimeCompleteName_161)
package zombie_burger_fla {
import graphics.*;
import flash.display.*;
import flash.text.*;
public dynamic class Popup_TimeCompleteName_161 extends MovieClip {
public var playerName:TextField;
public var exitBtn:SubmitBtn;
}
}//package zombie_burger_fla
Section 136
//Popup_WellDone_151 (zombie_burger_fla.Popup_WellDone_151)
package zombie_burger_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Popup_WellDone_151 extends MovieClip {
public var neededMoney:TextField;
public var total:TextField;
public var earnedMoney:TextField;
}
}//package zombie_burger_fla
Section 137
//Blood (Blood)
package {
import flash.display.*;
public dynamic class Blood extends MovieClip {
public function Blood(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 138
//BrainGraphics (BrainGraphics)
package {
import flash.display.*;
public dynamic class BrainGraphics extends MovieClip {
public function BrainGraphics(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 139
//Burger (Burger)
package {
import gameplay.elements.*;
public dynamic class Burger extends Item {
}
}//package
Section 140
//Button_Go (Button_Go)
package {
import graphics.*;
public dynamic class Button_Go extends ButtonProceed {
public function Button_Go(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 141
//ButtonProceed (ButtonProceed)
package {
import graphics.*;
public dynamic class ButtonProceed extends ButtonProceed {
public function ButtonProceed(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 142
//ExitButton (ExitButton)
package {
import graphics.*;
public dynamic class ExitButton extends ExitBtn {
public function ExitButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 143
//eyesSpawner (eyesSpawner)
package {
import gameplay.elements.*;
public dynamic class eyesSpawner extends ChipsSpawner {
}
}//package
Section 144
//Food_EyeBag (Food_EyeBag)
package {
import gameplay.elements.*;
public dynamic class Food_EyeBag extends Chips {
}
}//package
Section 145
//Map_FranchizeHolder_01_City (Map_FranchizeHolder_01_City)
package {
import graphics.*;
public dynamic class Map_FranchizeHolder_01_City extends PlaceButton {
public function Map_FranchizeHolder_01_City(){
addFrameScript(1, frame2);
}
function frame2(){
mouseEnabled = false;
}
}
}//package
Section 146
//Map_FranchizeHolder_02_Cathedral (Map_FranchizeHolder_02_Cathedral)
package {
import graphics.*;
public dynamic class Map_FranchizeHolder_02_Cathedral extends PlaceButton {
public function Map_FranchizeHolder_02_Cathedral(){
addFrameScript(1, frame2);
}
function frame2(){
mouseEnabled = false;
}
}
}//package
Section 147
//Map_FranchizeHolder_03_Cemetery (Map_FranchizeHolder_03_Cemetery)
package {
import graphics.*;
public dynamic class Map_FranchizeHolder_03_Cemetery extends PlaceButton {
public function Map_FranchizeHolder_03_Cemetery(){
addFrameScript(1, frame2);
}
function frame2(){
mouseEnabled = false;
}
}
}//package
Section 148
//Map_FranchizeHolder_04_Mortuary (Map_FranchizeHolder_04_Mortuary)
package {
import graphics.*;
public dynamic class Map_FranchizeHolder_04_Mortuary extends PlaceButton {
public function Map_FranchizeHolder_04_Mortuary(){
addFrameScript(1, frame2);
}
function frame2(){
mouseEnabled = false;
}
}
}//package
Section 149
//Map_FranchizeHolder_05_Crematory (Map_FranchizeHolder_05_Crematory)
package {
import graphics.*;
public dynamic class Map_FranchizeHolder_05_Crematory extends PlaceButton {
}
}//package
Section 150
//PreloaderContainer (PreloaderContainer)
package {
import flash.display.*;
public dynamic class PreloaderContainer extends MovieClip {
public function PreloaderContainer(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 151
//Symbol7 (Symbol7)
package {
import flash.display.*;
public dynamic class Symbol7 extends MovieClip {
}
}//package
Section 152
//Zombie0 (Zombie0)
package {
import gameplay.elements.*;
public dynamic class Zombie0 extends Customer {
public function Zombie0(){
addFrameScript(30, frame31, 53, frame54, 72, frame73, 99, frame100);
}
function frame73(){
gotoAndPlay("walking_angry");
}
function frame31(){
gotoAndPlay("walking_happy");
}
function frame100(){
gotoAndPlay("walking_neutral");
}
function frame54(){
gotoAndPlay("walking_irritated");
}
}
}//package
Section 153
//Zombie1 (Zombie1)
package {
import gameplay.elements.*;
public dynamic class Zombie1 extends Customer {
public function Zombie1(){
addFrameScript(30, frame31, 53, frame54, 72, frame73, 99, frame100);
}
function frame73(){
gotoAndPlay("walking_angry");
}
function frame31(){
gotoAndPlay("walking_happy");
}
function frame100(){
gotoAndPlay("walking_neutral");
}
function frame54(){
gotoAndPlay("walking_irritated");
}
}
}//package
Section 154
//Zombie2 (Zombie2)
package {
import gameplay.elements.*;
public dynamic class Zombie2 extends Customer {
public function Zombie2(){
addFrameScript(30, frame31, 53, frame54, 72, frame73, 99, frame100);
}
function frame73(){
gotoAndPlay("walking_angry");
}
function frame31(){
gotoAndPlay("walking_happy");
}
function frame100(){
gotoAndPlay("walking_neutral");
}
function frame54(){
gotoAndPlay("walking_irritated");
}
}
}//package
Section 155
//Zombie3 (Zombie3)
package {
import gameplay.elements.*;
public dynamic class Zombie3 extends Customer {
public function Zombie3(){
addFrameScript(30, frame31, 53, frame54, 72, frame73, 99, frame100);
}
function frame73(){
gotoAndPlay("walking_angry");
}
function frame31(){
gotoAndPlay("walking_happy");
}
function frame100(){
gotoAndPlay("walking_neutral");
}
function frame54(){
gotoAndPlay("walking_irritated");
}
}
}//package
Section 156
//Zombie4 (Zombie4)
package {
import gameplay.elements.*;
public dynamic class Zombie4 extends Customer {
public function Zombie4(){
addFrameScript(26, frame27, 45, frame46, 60, frame61, 83, frame84);
}
function frame84(){
gotoAndPlay("walking_neutral");
}
function frame46(){
gotoAndPlay("walking_irritated");
}
function frame27(){
gotoAndPlay("walking_happy");
}
function frame61(){
gotoAndPlay("walking_angry");
}
}
}//package
Section 157
//Zombie5 (Zombie5)
package {
import gameplay.elements.*;
public dynamic class Zombie5 extends Customer {
public function Zombie5(){
addFrameScript(26, frame27, 45, frame46, 60, frame61, 83, frame84);
}
function frame84(){
gotoAndPlay("walking_neutral");
}
function frame46(){
gotoAndPlay("walking_irritated");
}
function frame27(){
gotoAndPlay("walking_happy");
}
function frame61(){
gotoAndPlay("walking_angry");
}
}
}//package
Section 158
//Zombie6 (Zombie6)
package {
import gameplay.elements.*;
public dynamic class Zombie6 extends Customer {
public function Zombie6(){
addFrameScript(26, frame27, 45, frame46, 60, frame61, 83, frame84);
}
function frame84(){
gotoAndPlay("walking_neutral");
}
function frame46(){
gotoAndPlay("walking_irritated");
}
function frame27(){
gotoAndPlay("walking_happy");
}
function frame61(){
gotoAndPlay("walking_angry");
}
}
}//package
Section 159
//Zombie7 (Zombie7)
package {
import gameplay.elements.*;
public dynamic class Zombie7 extends Customer {
public function Zombie7(){
addFrameScript(30, frame31, 49, frame50, 64, frame65, 91, frame92);
}
function frame65(){
gotoAndPlay("walking_angry");
}
function frame92(){
gotoAndPlay("walking_neutral");
}
function frame31(){
gotoAndPlay("walking_happy");
}
function frame50(){
gotoAndPlay("walking_irritated");
}
}
}//package