Section 1
//mp3 (beef.mp3)
package beef {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package beef
Section 2
//mp3 (bgSound.mp3)
package bgSound {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package bgSound
Section 3
//mp3 (cheering1.mp3)
package cheering1 {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package cheering1
Section 4
//mp3 (cheering2.mp3)
package cheering2 {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package cheering2
Section 5
//mp3 (chicken.mp3)
package chicken {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package chicken
Section 6
//mp3 (clickingObjects.mp3)
package clickingObjects {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package clickingObjects
Section 7
//mp3 (cookingNoodles.mp3)
package cookingNoodles {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package cookingNoodles
Section 8
//Logo (framework.Logo)
package framework {
import flash.display.*;
public dynamic class Logo extends MovieClip {
}
}//package framework
Section 9
//2cilantroMc_170 (game_fla.2cilantroMc_170)
package game_fla {
import flash.display.*;
public dynamic class 2cilantroMc_170 extends MovieClip {
public var cilantro:MovieClip;
}
}//package game_fla
Section 10
//3porksMc_173 (game_fla.3porksMc_173)
package game_fla {
import flash.display.*;
public dynamic class 3porksMc_173 extends MovieClip {
public var pork:MovieClip;
}
}//package game_fla
Section 11
//3typeMc_164 (game_fla.3typeMc_164)
package game_fla {
import flash.display.*;
public dynamic class 3typeMc_164 extends MovieClip {
public var smallNoodle:MovieClip;
public var bigNoodle:MovieClip;
}
}//package game_fla
Section 12
//A_179 (game_fla.A_179)
package game_fla {
import flash.display.*;
public dynamic class A_179 extends MovieClip {
public var plate:MovieClip;
}
}//package game_fla
Section 13
//A_189 (game_fla.A_189)
package game_fla {
import flash.display.*;
public dynamic class A_189 extends MovieClip {
public function A_189(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 14
//all_mc_13 (game_fla.all_mc_13)
package game_fla {
import flash.display.*;
public dynamic class all_mc_13 extends MovieClip {
public function all_mc_13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 15
//AplateMc_180 (game_fla.AplateMc_180)
package game_fla {
import flash.display.*;
public dynamic class AplateMc_180 extends MovieClip {
public var tea:MovieClip;
public var bigGuy1:MovieClip;
public var bigGuy2:MovieClip;
public var chopsticks1:MovieClip;
public var chopsticks2:MovieClip;
public var chopsticks3:MovieClip;
}
}//package game_fla
Section 16
//B_185 (game_fla.B_185)
package game_fla {
import flash.display.*;
public dynamic class B_185 extends MovieClip {
public var plate:MovieClip;
}
}//package game_fla
Section 17
//bigBowlMc_206 (game_fla.bigBowlMc_206)
package game_fla {
import flash.display.*;
public dynamic class bigBowlMc_206 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 18
//binMc_134 (game_fla.binMc_134)
package game_fla {
import flash.display.*;
public dynamic class binMc_134 extends MovieClip {
public var binInside:MovieClip;
public var num:MovieClip;
}
}//package game_fla
Section 19
//BplateMc_186 (game_fla.BplateMc_186)
package game_fla {
import flash.display.*;
public dynamic class BplateMc_186 extends MovieClip {
public var tea:MovieClip;
public var bigGuy1:MovieClip;
public var bigGuy2:MovieClip;
public var chopsticks1:MovieClip;
public var chopsticks2:MovieClip;
public var chopsticks3:MovieClip;
}
}//package game_fla
Section 20
//C_182 (game_fla.C_182)
package game_fla {
import flash.display.*;
public dynamic class C_182 extends MovieClip {
public var plate:MovieClip;
}
}//package game_fla
Section 21
//chickenMc_142 (game_fla.chickenMc_142)
package game_fla {
import flash.display.*;
public dynamic class chickenMc_142 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 22
//chopsticksMc_199 (game_fla.chopsticksMc_199)
package game_fla {
import flash.display.*;
public dynamic class chopsticksMc_199 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 23
//chopsticksMcsingle_163 (game_fla.chopsticksMcsingle_163)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class chopsticksMcsingle_163 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 24
//cilantroMc_201 (game_fla.cilantroMc_201)
package game_fla {
import flash.display.*;
public dynamic class cilantroMc_201 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 25
//continueBtnMc_293 (game_fla.continueBtnMc_293)
package game_fla {
import flash.display.*;
public dynamic class continueBtnMc_293 extends MovieClip {
public var btn:SimpleButton;
}
}//package game_fla
Section 26
//creditMc_61 (game_fla.creditMc_61)
package game_fla {
import flash.display.*;
public dynamic class creditMc_61 extends MovieClip {
public var backBtn:SimpleButton;
}
}//package game_fla
Section 27
//D_161 (game_fla.D_161)
package game_fla {
import flash.display.*;
public dynamic class D_161 extends MovieClip {
public var plate:MovieClip;
}
}//package game_fla
Section 28
//deskArroundBack_131 (game_fla.deskArroundBack_131)
package game_fla {
import flash.display.*;
public dynamic class deskArroundBack_131 extends MovieClip {
public var bin:MovieClip;
public var pot1:MovieClip;
public var pork:MovieClip;
public var pot2:MovieClip;
public var smallBowl:MovieClip;
public var chicken:MovieClip;
}
}//package game_fla
Section 29
//deskArroundFront_198 (game_fla.deskArroundFront_198)
package game_fla {
import flash.display.*;
public dynamic class deskArroundFront_198 extends MovieClip {
public var bigBowl:MovieClip;
public var tea:MovieClip;
public var guest3:MovieClip;
public var chopsticks:MovieClip;
public var cilantro:MovieClip;
public var guest1:MovieClip;
public var guest2:MovieClip;
public var money2:MovieClip;
public var money3:MovieClip;
public var money1:MovieClip;
public var sauce2:MovieClip;
public var sauce3:MovieClip;
public var sauce1:MovieClip;
public var sauce4:MovieClip;
}
}//package game_fla
Section 30
//deskMc_187 (game_fla.deskMc_187)
package game_fla {
import flash.display.*;
public dynamic class deskMc_187 extends MovieClip {
public var animationPlus:MovieClip;
public var daoDown:MovieClip;
public var rubishPanda:MovieClip;
public var laDown:MovieClip;
public var daoUp:MovieClip;
public var laUp:MovieClip;
}
}//package game_fla
Section 31
//doughMc_197 (game_fla.doughMc_197)
package game_fla {
import flash.display.*;
public dynamic class doughMc_197 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 32
//DplateMc_162 (game_fla.DplateMc_162)
package game_fla {
import flash.display.*;
public dynamic class DplateMc_162 extends MovieClip {
public var tea:MovieClip;
public var bigGuy1:MovieClip;
public var bigGuy2:MovieClip;
public var chopsticks1:MovieClip;
public var chopsticks2:MovieClip;
public var chopsticks3:MovieClip;
}
}//package game_fla
Section 33
//emotMc_223 (game_fla.emotMc_223)
package game_fla {
import flash.display.*;
public dynamic class emotMc_223 extends MovieClip {
public var happy:MovieClip;
}
}//package game_fla
Section 34
//fallthingInsidemc_259 (game_fla.fallthingInsidemc_259)
package game_fla {
import flash.display.*;
public dynamic class fallthingInsidemc_259 extends MovieClip {
public var tea:MovieClip;
public var bigGuy1:MovieClip;
public var chopsticks:MovieClip;
public var bigGuy2:MovieClip;
}
}//package game_fla
Section 35
//fullNoodleMc_165 (game_fla.fullNoodleMc_165)
package game_fla {
import flash.display.*;
public dynamic class fullNoodleMc_165 extends MovieClip {
public var daomian:MovieClip;
public var cilantro:MovieClip;
public var pork:MovieClip;
public var sauce:MovieClip;
public var chicken:MovieClip;
public var lamian:MovieClip;
public var bowl:MovieClip;
}
}//package game_fla
Section 36
//gameover_33 (game_fla.gameover_33)
package game_fla {
import flash.display.*;
public dynamic class gameover_33 extends MovieClip {
public function gameover_33(){
addFrameScript(75, frame76);
}
function frame76(){
stop();
}
}
}//package game_fla
Section 37
//gameOverPadMc_19 (game_fla.gameOverPadMc_19)
package game_fla {
import flash.display.*;
public dynamic class gameOverPadMc_19 extends MovieClip {
public var scorePad:MovieClip;
public var reasonPad:MovieClip;
public var panda:MovieClip;
}
}//package game_fla
Section 38
//guestMc_221 (game_fla.guestMc_221)
package game_fla {
import flash.display.*;
public dynamic class guestMc_221 extends MovieClip {
public var guestInside:MovieClip;
public var emot:MovieClip;
public function guestMc_221(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 39
//guestMoveMc_220 (game_fla.guestMoveMc_220)
package game_fla {
import flash.display.*;
public dynamic class guestMoveMc_220 extends MovieClip {
public var guest:MovieClip;
public var guestRequest:MovieClip;
public function guestMoveMc_220(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
stop();
}
}
}//package game_fla
Section 40
//guestPlate1Mc_207 (game_fla.guestPlate1Mc_207)
package game_fla {
import flash.display.*;
public dynamic class guestPlate1Mc_207 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 41
//guestPlate2mc_208 (game_fla.guestPlate2mc_208)
package game_fla {
import flash.display.*;
public dynamic class guestPlate2mc_208 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 42
//guestPlate3mc_209 (game_fla.guestPlate3mc_209)
package game_fla {
import flash.display.*;
public dynamic class guestPlate3mc_209 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 43
//instructionsMc_287 (game_fla.instructionsMc_287)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class instructionsMc_287 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 44
//itemBigBowlMc_277 (game_fla.itemBigBowlMc_277)
package game_fla {
import flash.display.*;
public dynamic class itemBigBowlMc_277 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 45
//itemChickenMc_272 (game_fla.itemChickenMc_272)
package game_fla {
import flash.display.*;
public dynamic class itemChickenMc_272 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 46
//itemCilantroMc_278 (game_fla.itemCilantroMc_278)
package game_fla {
import flash.display.*;
public dynamic class itemCilantroMc_278 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 47
//itemKnifeMc_279 (game_fla.itemKnifeMc_279)
package game_fla {
import flash.display.*;
public dynamic class itemKnifeMc_279 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 48
//itemMarkMc_269 (game_fla.itemMarkMc_269)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class itemMarkMc_269 extends MovieClip {
public var priceBgPad:MovieClip;
public var pricePad:TextField;
public var soldMark:MovieClip;
}
}//package game_fla
Section 49
//itemPorkMc_268 (game_fla.itemPorkMc_268)
package game_fla {
import flash.display.*;
public dynamic class itemPorkMc_268 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 50
//itemPot2Mc_276 (game_fla.itemPot2Mc_276)
package game_fla {
import flash.display.*;
public dynamic class itemPot2Mc_276 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 51
//itemSauce2Mc_273 (game_fla.itemSauce2Mc_273)
package game_fla {
import flash.display.*;
public dynamic class itemSauce2Mc_273 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 52
//itemSauce3Mc_274 (game_fla.itemSauce3Mc_274)
package game_fla {
import flash.display.*;
public dynamic class itemSauce3Mc_274 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 53
//itemSauce4Mc_275 (game_fla.itemSauce4Mc_275)
package game_fla {
import flash.display.*;
public dynamic class itemSauce4Mc_275 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 54
//itemTeaMc_280 (game_fla.itemTeaMc_280)
package game_fla {
import flash.display.*;
public dynamic class itemTeaMc_280 extends MovieClip {
public var mark:MovieClip;
}
}//package game_fla
Section 55
//knifeMc_196 (game_fla.knifeMc_196)
package game_fla {
import flash.display.*;
public dynamic class knifeMc_196 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 56
//littleRTMc_129 (game_fla.littleRTMc_129)
package game_fla {
import flash.display.*;
public dynamic class littleRTMc_129 extends MovieClip {
public function littleRTMc_129(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 57
//loading_11 (game_fla.loading_11)
package game_fla {
import flash.display.*;
public dynamic class loading_11 extends MovieClip {
public function loading_11(){
addFrameScript(133, frame134);
}
function frame134(){
stop();
(root as MovieClip).play();
}
}
}//package game_fla
Section 58
//loading_3 (game_fla.loading_3)
package game_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import loading.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class loading_3 extends MovieClip {
public var txt:LoadingTxt;
public var loading_text_mc:MovieClip;
public function loading_3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 38, frame39);
}
function frame3(){
this.visible = true;
}
function frame1(){
this.visible = false;
}
function frame2(){
(this.parent as PrevLoader).checkGoNext();
}
function frame39(){
stop();
txt.onLoadComplete = (parent as PrevLoader).goNext;
loading_text_mc.txt.text = "Loading...";
loading_text_mc.txt.autoSize = "center";
}
}
}//package game_fla
Section 59
//loading_8 (game_fla.loading_8)
package game_fla {
import flash.display.*;
public dynamic class loading_8 extends MovieClip {
public var txt:Txt1;
}
}//package game_fla
Section 60
//lotsOfmoneyMc_210 (game_fla.lotsOfmoneyMc_210)
package game_fla {
import flash.display.*;
public dynamic class lotsOfmoneyMc_210 extends MovieClip {
public var part2:MovieClip;
public var part3:MovieClip;
public var part1:MovieClip;
public var scoreAdd:MovieClip;
}
}//package game_fla
Section 61
//MainTimeline (game_fla.MainTimeline)
package game_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import loading.*;
import flash.text.*;
import flash.utils.*;
import menu.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var clock:MovieClip;
public var k34:Number;
public var tutorialControl:tutorial;
public var str2:TextField;
public var k41:Number;
public var qBtn:SimpleButton;
public var photo1:MovieClip;
public var photo2:MovieClip;
public var photo3:MovieClip;
public var photo4:MovieClip;
public var photo5:MovieClip;
public var photo6:MovieClip;
public var photo7:MovieClip;
public var gameOverType:String;
public var levelTxt:Array;
public var objOnlyHand:MovieClip;
public var tutorialPad:MovieClip;
public var soundBanObj:SimpleButton;
public var __setPropDict:Dictionary;
public var timeTxt:Array;
public var i:uint;
public var __id0_:PrevLoader;
public var p:MovieClip;
public var menuBtn:SimpleButton;
public var pWindow:MovieClip;
public var pad:MovieClip;
public var r:Array;
public var fallThings:MovieClip;
public var gameCountTime:uint;
public var pots:Array;
public var submitScorePad:MovieClip;
public var afn:appearFullNoodle;
public var musicBanObj:SimpleButton;
public var obj:MovieClip;
public var lives:rentou;
public var sound:soundControl;
public var soundFlag:Boolean;
public var rSelected:String;
public var rentou1:MovieClip;
public var rentou2:MovieClip;
public var rentou3:MovieClip;
public var rentou4:MovieClip;
public var rentou5:MovieClip;
public var l1:MovieClip;
public var l2:MovieClip;
public var l3:MovieClip;
public var l4:MovieClip;
public var l5:MovieClip;
public var l8:MovieClip;
public var l9:MovieClip;
public var l6:MovieClip;
public var l7:MovieClip;
public var things:Array;
public var guest2:MovieClip;
public var guest3:MovieClip;
public var guestRequestArr:Array;
public var prompt:promptPad;
public var deskArroundFront:MovieClip;
public var guestArr:Array;
public var goalMoney:int;
public var guest1:MovieClip;
public var animationControl:donghua;
public var moneyNeed:Array;
public var moneyArr;
public var guestCountTime:uint;
public var t10:MovieClip;
public var t12:MovieClip;
public var t13:MovieClip;
public var t14:MovieClip;
public var t15:MovieClip;
public var t18:MovieClip;
public var t19:MovieClip;
public var maxGameCountTime:uint;
public var t11:MovieClip;
public var totalScore:int;
public var sellTxt:Array;
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var photosControl:photos;
public var p4:MovieClip;
public var musicBtn:SimpleButton;
public var b12:Number;
public var l101:MovieClip;
public var l102:MovieClip;
public var l103:MovieClip;
public var buyTxt:Array;
public var b23:Number;
public var music:soundControl;
public var deskArroundBack:MovieClip;
public var str:TextField;
public var tutorialGuide:MovieClip;
public var t3:MovieClip;
public var t5:MovieClip;
public var t7:MovieClip;
public var t1:MovieClip;
public var t2:MovieClip;
public var fatPanda:panda;
public var t8:MovieClip;
public var t9:MovieClip;
public var t4:MovieClip;
public var b34:Number;
public var b41:Number;
public var pads:MovieClip;
public var maskObj:MovieClip;
public var t6:MovieClip;
public var promptPadMc:MovieClip;
public var desk:MovieClip;
public var score:int;
public var submitScoreBtn:MovieClip;
public var pauseFlag:Boolean;
public var knife:MovieClip;
public var submitBox:SubmitBox;
public var soundBtn:SimpleButton;
public var itemSelected:String;
public var shop:itemShop;
public var credit:uint;
public var musicFlag:Boolean;
public var shopMc:MovieClip;
public var skipTutorialBtn:SimpleButton;
public var loc:String;
public var l10:MovieClip;
public var l12:MovieClip;
public var l13:MovieClip;
public var l15:MovieClip;
public var l11:MovieClip;
public var l19:MovieClip;
public var shopItemsArr:Array;
public var l18:MovieClip;
public var level:uint;
public var l14:MovieClip;
public var xinyuEmot:MovieClip;
public var dough:MovieClip;
public var qWindow:MovieClip;
public var bgSound:SoundChannel;
public var pBtn:SimpleButton;
public var k12:Number;
public var k23:Number;
public var tutorialFlag:Boolean;
public var status:String;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 2, frame3, 3, frame4, 4, frame5, 1, frame2);
}
public function getKnB(_arg1, _arg2, _arg3, _arg4){
var _local5:Number;
var _local6:Number;
_local5 = ((_arg2 - _arg4) / (_arg1 - _arg3));
_local6 = (((_arg3 * _arg2) - (_arg1 * _arg4)) / (_arg3 - _arg1));
return (new Array(_local5, _local6));
}
public function startBtnEvent(_arg1:MouseEvent){
pads.startPad.panda.stop();
nextFrame();
}
public function gameInit(){
submitBox.visible = false;
pads.startPad.visible = false;
pads.gameOverPad.visible = false;
pads.youWinPad.visible = false;
pads.creditsPad.visible = false;
pads.startPad.panda.stop();
switch (loc){
case "startPad":
if (bgSound){
} else {
bgSound = mkSound("bgSound.mp3", 0.1, 100);
};
pads.startPad.visible = true;
pads.startPad.panda.play();
break;
case "gameOverPad":
pads.gameOverPad.scorePad.str.text = ("YOUR SCORE: " + totalScore.toString());
pads.gameOverPad.scorePad.earnedStr.text = ("MONEY EARNED: " + score.toString());
pads.gameOverPad.scorePad.targetStr.text = ("TARGET earnings: " + goalMoney.toString());
pads.gameOverPad.reasonPad.reasonStr.text = gameOverType;
pads.gameOverPad.visible = true;
break;
case "youWinPad":
pads.youWinPad.scorePad.str.text = ("YOUR SCORE: " + score.toString());
pads.youWinPad.visible = true;
break;
case "creditsPad":
pads.creditsPad.visible = true;
break;
};
}
public function creditsBtnEvent(_arg1:MouseEvent){
loc = "creditsPad";
gameInit();
}
function frame1(){
new smartGuard(this.loaderInfo.url);
}
function frame3(){
levelTxt = new Array();
levelTxt.infomation = [60, 100, 130, 170, 200, 250, 300, 340, 390, 440];
sellTxt = new Array();
sellTxt.infomation = [12, 20, 2.5, 3, 4.5, 4, 8, 12, 15, 20, 1, 2, 1];
buyTxt = new Array();
buyTxt.infomation = [450, 380, 500, 250, 300, 80, 65, 135, 85, 430, 200];
timeTxt = new Array();
timeTxt.infomation = [90];
loc = "startPad";
tutorialFlag = (cookie("tutorialFlag")) ? false : true;
score = 0;
goalMoney = 0;
totalScore = 0;
soundFlag = true;
musicFlag = true;
setCookie("tutorialFlag", true);
}
function frame4(){
submitBox = new SubmitBox();
submitBox.x = (stage.stageWidth / 2);
submitBox.y = (stage.stageHeight / 2);
submitBox.setName("noodleshop");
addChild(submitBox);
stage.quality = StageQuality.MEDIUM;
stop();
pads.startPad.panda.playBtn.addEventListener(MouseEvent.MOUSE_UP, startBtnEvent);
pads.startPad.panda.viewHighScoresBtn.addEventListener(MouseEvent.MOUSE_UP, viewHighScoresBtnEvent);
pads.startPad.panda.instructionsBtn.addEventListener(MouseEvent.MOUSE_UP, instructionsBtnEvent);
pads.startPad.panda.playBoxOfficeBtn.addEventListener(MouseEvent.MOUSE_UP, playBoxOfficeBtnEvent);
pads.gameOverPad.panda.playBoxOfficeBtn.addEventListener(MouseEvent.MOUSE_UP, playBoxOfficeBtnEvent);
pads.youWinPad.panda.playBoxOfficeBtn.addEventListener(MouseEvent.MOUSE_UP, playBoxOfficeBtnEvent);
pads.gameOverPad.panda.playAgainBtn.addEventListener(MouseEvent.MOUSE_UP, playAgainBtnEvent);
pads.youWinPad.panda.playAgainBtn.addEventListener(MouseEvent.MOUSE_UP, playAgainBtnEvent);
pads.gameOverPad.panda.submitScoreBtn.addEventListener(MouseEvent.MOUSE_UP, submitScoreBtnEvent);
pads.youWinPad.panda.submitScoreBtn.addEventListener(MouseEvent.MOUSE_UP, submitScoreBtnEvent);
pads.startPad.homePageBtn.addEventListener(MouseEvent.MOUSE_UP, homePageBtnEvent);
pads.startPad.creditsBtn.addEventListener(MouseEvent.MOUSE_UP, creditsBtnEvent);
pads.creditsPad.backBtn.addEventListener(MouseEvent.MOUSE_UP, backBtnEvent);
gameInit();
}
function frame5(){
level = 1;
prompt = new promptPad(root, promptPadMc);
pauseFlag = false;
moneyNeed = new Array();
score = 0;
totalScore = 0;
i = 0;
while (i < levelTxt.infomation.length) {
moneyNeed[i] = levelTxt.infomation[i];
i++;
};
r = new Array();
shopItemsArr = new Array();
shop = new itemShop(root, shopMc);
credit = 0;
status = "free";
countKnBs();
setGameCountTime(0);
maxGameCountTime = (timeTxt.infomation[0] * 30);
guestCountTime = 0;
things = new Array();
things["guest1"] = ["guest1", deskArroundFront.guest1, [guest1.guest, guest1.guestRequest, t1], l1];
things["guest2"] = ["guest2", deskArroundFront.guest2, [guest2.guest, guest2.guestRequest, t2], l2];
things["guest3"] = ["guest3", deskArroundFront.guest3, [guest3.guest, guest3.guestRequest, t3], l3];
things["chopsticks"] = ["chopsticks", deskArroundFront.chopsticks, [t4], l4];
things["tea"] = ["tea", deskArroundFront.tea, [t5], l5];
things["cilantro"] = ["cilantro", deskArroundFront.cilantro, [t6], l6];
things["sauce1"] = ["sauce1", deskArroundFront.sauce1, [t7], l7];
things["sauce2"] = ["sauce2", deskArroundFront.sauce2, [t8], l8];
things["sauce3"] = ["sauce3", deskArroundFront.sauce3, [t9], l9];
things["sauce4"] = ["sauce4", deskArroundFront.sauce4, [t10], l10];
things["pork"] = ["pork", deskArroundBack.pork, [t11], l11];
things["chicken"] = ["chicken", deskArroundBack.chicken, [t12], l12];
things["bin"] = ["bin", deskArroundBack.bin, [t13], l13];
things["dough"] = ["dough", dough, [t14], l14];
things["knife"] = ["knife", knife, [t15], l15];
things["smallBowl"] = ["smallBowl", deskArroundBack.smallBowl, [t18], l18];
things["bigBowl"] = ["bigBowl", deskArroundFront.bigBowl, [t19], l19];
shopItemsArr["pork"] = new shopItem(root, shopMc.item1, shopMc.item1Btn, "pork", "onSale");
shopItemsArr["chicken"] = new shopItem(root, shopMc.item2, shopMc.item2Btn, "chicken", "onSale");
shopItemsArr["sauce2"] = new shopItem(root, shopMc.item3, shopMc.item3Btn, "sauce2", "onSale");
shopItemsArr["sauce3"] = new shopItem(root, shopMc.item4, shopMc.item4Btn, "sauce3", "onSale");
shopItemsArr["sauce4"] = new shopItem(root, shopMc.item5, shopMc.item5Btn, "sauce4", "onSale");
shopItemsArr["pot2"] = new shopItem(root, shopMc.item6, shopMc.item6Btn, "pot2", "onSale");
shopItemsArr["bigBowl"] = new shopItem(root, shopMc.item7, shopMc.item7Btn, "bigBowl", "onSale");
shopItemsArr["cilantro"] = new shopItem(root, shopMc.item8, shopMc.item8Btn, "cilantro", "onSale");
shopItemsArr["knife"] = new shopItem(root, shopMc.item9, shopMc.item9Btn, "knife", "onSale");
shopItemsArr["tea"] = new shopItem(root, shopMc.item10, shopMc.item10Btn, "tea", "onSale");
moneyArr = new Array();
new Q(stage, root, qWindow, qBtn);
new P(stage, root, pWindow, pBtn);
sound = new soundControl(root, "sound", soundBtn, soundBanObj);
music = new soundControl(root, "music", musicBtn, musicBanObj);
lives = new rentou([rentou1, rentou2, rentou3, rentou4, rentou5]);
photosControl = new photos([photo1, photo2, photo3, photo4, photo5, photo6, photo7]);
animationControl = new donghua(root);
pots = [new cookingPot(deskArroundBack.pot1), new cookingPot(deskArroundBack.pot2)];
afn = new appearFullNoodle(fallThings);
tutorialControl = new tutorial(root, tutorialPad, tutorialGuide, skipTutorialBtn);
guestRequestArr = [new request(root, guest1.guestRequest, 1), new request(root, guest2.guestRequest, 2), new request(root, guest3.guestRequest, 3)];
if (tutorialFlag == true){
tutorialControl.openUp();
};
menuBtn.addEventListener(MouseEvent.MOUSE_UP, menuEvent);
init();
addEventListener(Event.ENTER_FRAME, main);
}
function frame2(){
if ((((__setPropDict[__id0_] == undefined)) || (!((int(__setPropDict[__id0_]) == 2))))){
__setPropDict[__id0_] = currentFrame;
__setProp___id0__loading__2();
};
}
public function menuEvent(_arg1:MouseEvent){
prompt.sendPrompt("Back to main menu?", "", [4, 5]);
}
public function setPad(_arg1, _arg2){
score = _arg1;
level = _arg2;
pad.scorePad.text = ((("$" + score.toString()) + "/$") + goalMoney);
pad.levelPad.text = ("LEVEL " + level.toString());
shopMc.currentMoneyPad.text = score.toString();
}
public function init(){
var _local1:String;
fatPanda = new panda(root, obj);
r["guest1"] = new r1(root, things["guest1"], "a");
r["guest2"] = new r1(root, things["guest2"], "a");
r["guest3"] = new r1(root, things["guest3"], "a");
r["chopsticks"] = new r1(root, things["chopsticks"], "b");
r["tea"] = new r1(root, things["tea"], "b");
r["cilantro"] = new r1(root, things["cilantro"], "b");
r["sauce1"] = new r1(root, things["sauce1"], "b");
r["sauce2"] = new r1(root, things["sauce2"], "b");
r["sauce3"] = new r1(root, things["sauce3"], "b");
r["sauce4"] = new r1(root, things["sauce4"], "b");
r["pork"] = new r1(root, things["pork"], "c");
r["chicken"] = new r1(root, things["chicken"], "c");
r["bigBowl"] = new r1(root, things["bigBowl"], "d");
r["smallBowl"] = new r1(root, things["smallBowl"], "d");
r["knife"] = new r1(root, things["knife"], "c");
r["dough"] = new r1(root, things["dough"], "c");
r["bin"] = new r1(root, things["bin"], "c");
moneyArr[0] = new money(root, deskArroundFront.money1);
moneyArr[1] = new money(root, deskArroundFront.money2);
moneyArr[2] = new money(root, deskArroundFront.money3);
guestArr = [new guest(root, guest1, 1), new guest(root, guest2, 2), new guest(root, guest3, 3)];
pots[0].openUp();
for (_local1 in shopItemsArr) {
if (shopItemsArr[_local1].itemStatus == "onSale"){
if (_local1 == "pot2"){
pots[1].shutDown();
} else {
r[_local1].shutDown();
};
};
if (shopItemsArr[_local1].itemStatus == "sold"){
if (_local1 == "pot2"){
pots[1].openUp();
} else {
r[_local1].openUp();
};
};
};
goalMoney = (score + moneyNeed[(level - 1)]);
if (tutorialFlag == false){
prompt.sendPrompt(((("LEVEL " + level) + "/") + moneyNeed.length), (("you need to earn $" + goalMoney) + " to complete this level!"), [0]);
gameCountTime = 0;
clock.gotoAndStop(1);
};
setPad(score, level);
}
public function submitScoreBtnEvent(_arg1:MouseEvent){
pads.gameOverPad.panda.submitScoreBtn.visible = false;
pads.youWinPad.panda.submitScoreBtn.visible = false;
submitBox.visible = true;
submitBox.scoreMc.text = totalScore.toString();
}
public function addGamesToYourSiteBtnEvent(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.freeworldgroup.com/koalafiles.htm");
navigateToURL(_local2, "_blank");
}
public function setCookie(_arg1, _arg2){
var _local3:SharedObject;
_local3 = SharedObject.getLocal(_arg1);
_local3.data.volume = _arg2;
}
public function killAll(){
var _local1:String;
animationControl.kill();
fatPanda.kill();
for (_local1 in guestArr) {
guestArr[_local1].kill();
};
for (_local1 in moneyArr) {
moneyArr[_local1].kill();
};
for (_local1 in r) {
r[_local1].kill();
};
}
public function sendStr(_arg1){
str.text = _arg1.toString();
}
public function main(_arg1:Event):void{
var _local2:uint;
if ((((((pauseFlag == false)) && ((prompt.visa == false)))) && ((shop.visa == false)))){
_local2 = 0;
while (_local2 < guestArr.length) {
if ((((((moneyArr[_local2].visa == false)) && ((guestArr[_local2].visa == false)))) && (checkIfCanGo()))){
guestArr[_local2].appear(_local2);
} else {
if (shop.visa == true){
guestArr[_local2].hide("", 0);
} else {
if ((((guestArr[_local2].status == "moving")) && ((guestArr[_local2].frameNum == guestArr[_local2].frameSum)))){
guestArr[_local2].stopMove();
};
};
};
_local2++;
};
if (tutorialFlag == false){
if ((((((((((((animationControl.status == "free")) && ((fatPanda.status == "free")))) && ((clock.currentFrame == clock.totalFrames)))) && ((status == "free")))) && ((goalMoney <= score)))) && (((level + 1) > moneyNeed.length)))){
endTheGame("youWinPad");
} else {
if ((((((((((animationControl.status == "free")) && ((fatPanda.status == "free")))) && ((clock.currentFrame == clock.totalFrames)))) && ((status == "free")))) && ((goalMoney <= score)))){
mkSound("levelEnd.mp3");
status = "levelCompleted";
prompt.sendPrompt("LEVEL COMPLETED!", (((("money required: $" + goalMoney) + "\r") + "money earned: $") + score), [3]);
} else {
if ((((((((animationControl.status == "free")) && ((fatPanda.status == "free")))) && ((clock.currentFrame == clock.totalFrames)))) || ((lives.checkAllDead() == true)))){
if (lives.checkAllDead() == true){
gameOverType = "TOO MANY UNHAPPY PEOPLE!\rYOU FAILED!";
} else {
gameOverType = "you did not achieve\rthe target earnings!";
};
mkSound("gameOver.mp3");
endTheGame("gameOverPad");
};
};
};
setGameCountTime((gameCountTime + 1));
};
};
}
function __setProp___id0__loading__2(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.mochi_code = "49167879143b387d";
__id0_.protection = false;
__id0_.skip = false;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function setCredit(_arg1){
var _local2:uint;
var _local3:uint;
credit = _arg1;
photosControl.setCredit(credit);
_local2 = photosControl.maxCredit;
_local3 = (4 * (credit / _local2));
xinyuEmot.gotoAndStop(_local3);
}
public function mkSound(_arg1, _arg2=1, _arg3=0){
var _local4:SoundTransform;
var _local5:Class;
var _local6:Sound;
var _local7:SoundChannel;
if ((((_arg1 == "bgSound.mp3")) || ((soundFlag == true)))){
_local4 = new SoundTransform(_arg2, 1);
_local5 = (getDefinitionByName(_arg1) as Class);
_local6 = new (_local5);
_local7 = _local6.play(0, _arg3);
return (_local7);
};
}
public function playAgainBtnEvent(_arg1:MouseEvent){
loc = "startPad";
gameInit();
}
public function playBoxOfficeBtnEvent(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.freeworldgroup.com/games8/gameindex/boxoffice.htm");
navigateToURL(_local2, "_blank");
}
public function instructionsBtnEvent(_arg1:MouseEvent):void{
tutorialFlag = true;
pads.startPad.panda.stop();
nextFrame();
}
public function cookie(_arg1){
var _local2:SharedObject;
_local2 = SharedObject.getLocal(_arg1);
return (_local2.data.volume);
}
public function viewHighScoresBtnEvent(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.freeworldgroup.com/score/index.asp");
_local2.data = "game=noodleshop";
navigateToURL(_local2, "_blank");
}
public function endTheGame(_arg1){
killAll();
removeEventListener(Event.ENTER_FRAME, main);
loc = _arg1;
obj.visible = false;
objOnlyHand.visible = false;
desk.visible = false;
dough.visible = false;
knife.visible = false;
prevFrame();
}
public function countJD(_arg1, _arg2, _arg3, _arg4){
var _local5:int;
var _local6:int;
_local5 = ((_arg2 - _arg4) / (_arg3 - _arg1));
_local6 = ((((_arg1 * _arg2) - (_arg1 * _arg4)) / (_arg3 - _arg1)) + _arg2);
return (new Array(_local5, _local6));
}
public function countKnBs(){
var _local1:*;
_local1 = new Array();
_local1 = getKnB(p1.x, p1.y, p2.x, p2.y);
k12 = _local1[0];
b12 = _local1[1];
_local1 = getKnB(p2.x, p2.y, p3.x, p3.y);
k23 = _local1[0];
b23 = _local1[1];
_local1 = getKnB(p3.x, p3.y, p4.x, p4.y);
k34 = _local1[0];
b34 = _local1[1];
_local1 = getKnB(p4.x, p4.y, p1.x, p1.y);
k41 = _local1[0];
b41 = _local1[1];
}
public function pauseGame(){
if (pauseFlag == false){
sendStr("你按了暂停键");
} else {
sendStr("你取消了暂停");
};
pauseFlag = !(pauseFlag);
}
public function setGameCountTime(_arg1){
var _local2:int;
gameCountTime = _arg1;
_local2 = ((clock.totalFrames * gameCountTime) / maxGameCountTime);
if ((((_local2 > 0)) && (!((_local2 == clock.currentFrame))))){
};
clock.gotoAndStop(_local2);
}
public function checkIfCanGo(){
var _local1:uint;
var _local2:Boolean;
var _local3:uint;
_local2 = true;
_local3 = 0;
_local1 = 0;
while (_local1 < guestArr.length) {
if ((((guestArr[_local1].visa == true)) && (!((guestArr[_local1].frameNum == guestArr[_local1].frameSum))))){
_local2 = false;
};
if (guestArr[_local1].visa == true){
_local3++;
};
_local1++;
};
if ((((tutorialFlag == true)) && (!((((tutorialControl.page == 1)) || ((tutorialControl.page == 9))))))){
_local2 = false;
};
if (guestCountTime > (((15 * 30) * _local3) + (((Math.random() * 15) * 30) * _local3))){
guestCountTime = 0;
};
if ((((_local3 > 0)) && ((guestCountTime > 0)))){
_local2 = false;
};
if ((((level == 1)) && ((_local3 > 0)))){
_local2 = false;
};
if ((((((level == 2)) || ((level == 3)))) && ((_local3 > 1)))){
_local2 = false;
};
guestCountTime++;
if (shop.visa == true){
_local2 = false;
};
return (_local2);
}
public function backBtnEvent(_arg1:MouseEvent){
loc = "startPad";
gameInit();
}
public function homePageBtnEvent(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.freeworldgroup.com");
navigateToURL(_local2, "_blank");
}
}
}//package game_fla
Section 62
//noBtnMc_289 (game_fla.noBtnMc_289)
package game_fla {
import flash.display.*;
public dynamic class noBtnMc_289 extends MovieClip {
public var btn:SimpleButton;
}
}//package game_fla
Section 63
//okBtnMc_292 (game_fla.okBtnMc_292)
package game_fla {
import flash.display.*;
public dynamic class okBtnMc_292 extends MovieClip {
public var btn:SimpleButton;
}
}//package game_fla
Section 64
//P_305 (game_fla.P_305)
package game_fla {
import flash.display.*;
public dynamic class P_305 extends MovieClip {
public var pBtn:SimpleButton;
}
}//package game_fla
Section 65
//padsMc_18 (game_fla.padsMc_18)
package game_fla {
import flash.display.*;
public dynamic class padsMc_18 extends MovieClip {
public var youWinPad:MovieClip;
public var creditsPad:MovieClip;
public var gameOverPad:MovieClip;
public var startPad:MovieClip;
}
}//package game_fla
Section 66
//pandaAcBack_157 (game_fla.pandaAcBack_157)
package game_fla {
import flash.display.*;
public dynamic class pandaAcBack_157 extends MovieClip {
public var panda:MovieClip;
}
}//package game_fla
Section 67
//pandaAcBackOnlyHand_184 (game_fla.pandaAcBackOnlyHand_184)
package game_fla {
import flash.display.*;
public dynamic class pandaAcBackOnlyHand_184 extends MovieClip {
public var panda:MovieClip;
}
}//package game_fla
Section 68
//pandaAcFront_155 (game_fla.pandaAcFront_155)
package game_fla {
import flash.display.*;
public dynamic class pandaAcFront_155 extends MovieClip {
public var panda:MovieClip;
}
}//package game_fla
Section 69
//pandaAcFrontOnlyHand_181 (game_fla.pandaAcFrontOnlyHand_181)
package game_fla {
import flash.display.*;
public dynamic class pandaAcFrontOnlyHand_181 extends MovieClip {
public var panda:MovieClip;
}
}//package game_fla
Section 70
//pandaBdBack_153 (game_fla.pandaBdBack_153)
package game_fla {
import flash.display.*;
public dynamic class pandaBdBack_153 extends MovieClip {
public var panda:MovieClip;
}
}//package game_fla
Section 71
//pandaBdBackOnlyHand_178 (game_fla.pandaBdBackOnlyHand_178)
package game_fla {
import flash.display.*;
public dynamic class pandaBdBackOnlyHand_178 extends MovieClip {
public var panda:MovieClip;
}
}//package game_fla
Section 72
//pandaBdFront_150 (game_fla.pandaBdFront_150)
package game_fla {
import flash.display.*;
public dynamic class pandaBdFront_150 extends MovieClip {
public var panda:MovieClip;
}
}//package game_fla
Section 73
//pandaBdFrontOnlyHand_160 (game_fla.pandaBdFrontOnlyHand_160)
package game_fla {
import flash.display.*;
public dynamic class pandaBdFrontOnlyHand_160 extends MovieClip {
public var panda:MovieClip;
}
}//package game_fla
Section 74
//plateMc_183 (game_fla.plateMc_183)
package game_fla {
import flash.display.*;
public dynamic class plateMc_183 extends MovieClip {
public var tea:MovieClip;
public var bigGuy1:MovieClip;
public var bigGuy2:MovieClip;
public var chopsticks1:MovieClip;
public var chopsticks2:MovieClip;
public var chopsticks3:MovieClip;
}
}//package game_fla
Section 75
//porkMc_132 (game_fla.porkMc_132)
package game_fla {
import flash.display.*;
public dynamic class porkMc_132 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 76
//Q_294 (game_fla.Q_294)
package game_fla {
import flash.display.*;
public dynamic class Q_294 extends MovieClip {
public var mediumButton:SimpleButton;
public var bestButton:SimpleButton;
public var closeButton:SimpleButton;
public var highButton:SimpleButton;
public var lowButton:SimpleButton;
public var selectMc:MovieClip;
}
}//package game_fla
Section 77
//requestMc_256 (game_fla.requestMc_256)
package game_fla {
import flash.display.*;
public dynamic class requestMc_256 extends MovieClip {
public var clock:MovieClip;
public var tea:MovieClip;
public var bgPad:MovieClip;
public var bigGuy1:MovieClip;
public var chopsticks:MovieClip;
public var bigGuy2:MovieClip;
}
}//package game_fla
Section 78
//sauce1Mc_202 (game_fla.sauce1Mc_202)
package game_fla {
import flash.display.*;
public dynamic class sauce1Mc_202 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 79
//sauce2Mc_203 (game_fla.sauce2Mc_203)
package game_fla {
import flash.display.*;
public dynamic class sauce2Mc_203 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 80
//sauce3Mc_204 (game_fla.sauce3Mc_204)
package game_fla {
import flash.display.*;
public dynamic class sauce3Mc_204 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 81
//sauce4Mc_205 (game_fla.sauce4Mc_205)
package game_fla {
import flash.display.*;
public dynamic class sauce4Mc_205 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 82
//sauceMcSingle_169 (game_fla.sauceMcSingle_169)
package game_fla {
import flash.display.*;
public dynamic class sauceMcSingle_169 extends MovieClip {
public function sauceMcSingle_169(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 83
//scoreAddInsidemc_219 (game_fla.scoreAddInsidemc_219)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class scoreAddInsidemc_219 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 84
//scoreAddMc_218 (game_fla.scoreAddMc_218)
package game_fla {
import flash.display.*;
public dynamic class scoreAddMc_218 extends MovieClip {
public var scoreAddInside:MovieClip;
}
}//package game_fla
Section 85
//scorePadMc_113 (game_fla.scorePadMc_113)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class scorePadMc_113 extends MovieClip {
public var levelPad:TextField;
public var scorePad:TextField;
}
}//package game_fla
Section 86
//shopPromptMc_282 (game_fla.shopPromptMc_282)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class shopPromptMc_282 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 87
//smallBowlMc_136 (game_fla.smallBowlMc_136)
package game_fla {
import flash.display.*;
public dynamic class smallBowlMc_136 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 88
//smallNoodleMc_175 (game_fla.smallNoodleMc_175)
package game_fla {
import flash.display.*;
public dynamic class smallNoodleMc_175 extends MovieClip {
public var daomian:MovieClip;
public var cilantro:MovieClip;
public var pork:MovieClip;
public var sauce:MovieClip;
public var chicken:MovieClip;
public var lamian:MovieClip;
public var bowl:MovieClip;
}
}//package game_fla
Section 89
//teaMc_200 (game_fla.teaMc_200)
package game_fla {
import flash.display.*;
public dynamic class teaMc_200 extends MovieClip {
public var num:MovieClip;
}
}//package game_fla
Section 90
//Timeline_104 (game_fla.Timeline_104)
package game_fla {
import flash.display.*;
public dynamic class Timeline_104 extends MovieClip {
public function Timeline_104(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 91
//Timeline_133 (game_fla.Timeline_133)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_133 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 92
//Timeline_135 (game_fla.Timeline_135)
package game_fla {
import flash.display.*;
public dynamic class Timeline_135 extends MovieClip {
public function Timeline_135(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 93
//Timeline_137 (game_fla.Timeline_137)
package game_fla {
import flash.display.*;
public dynamic class Timeline_137 extends MovieClip {
public var water:MovieClip;
public var dough:MovieClip;
public var wave:MovieClip;
}
}//package game_fla
Section 94
//Timeline_149 (game_fla.Timeline_149)
package game_fla {
import flash.display.*;
public dynamic class Timeline_149 extends MovieClip {
public var pandaAcBack:MovieClip;
public var pandaBdBack:MovieClip;
public var pandaBdFront:MovieClip;
public var pandaAcFront:MovieClip;
public function Timeline_149(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
stop();
}
}
}//package game_fla
Section 95
//Timeline_159 (game_fla.Timeline_159)
package game_fla {
import flash.display.*;
public dynamic class Timeline_159 extends MovieClip {
public var pandaAcBack:MovieClip;
public var pandaBdBack:MovieClip;
public var pandaBdFront:MovieClip;
public var pandaAcFront:MovieClip;
public function Timeline_159(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
stop();
}
}
}//package game_fla
Section 96
//Timeline_20 (game_fla.Timeline_20)
package game_fla {
import flash.display.*;
public dynamic class Timeline_20 extends MovieClip {
public var playAgainBtn:SimpleButton;
public var submitScoreBtn:SimpleButton;
public var playBoxOfficeBtn:SimpleButton;
public function Timeline_20(){
addFrameScript(122, frame123);
}
function frame123(){
stop();
}
}
}//package game_fla
Section 97
//Timeline_211 (game_fla.Timeline_211)
package game_fla {
import flash.display.*;
public dynamic class Timeline_211 extends MovieClip {
public function Timeline_211(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
}
}//package game_fla
Section 98
//Timeline_213 (game_fla.Timeline_213)
package game_fla {
import flash.display.*;
public dynamic class Timeline_213 extends MovieClip {
public function Timeline_213(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package game_fla
Section 99
//Timeline_216 (game_fla.Timeline_216)
package game_fla {
import flash.display.*;
public dynamic class Timeline_216 extends MovieClip {
public function Timeline_216(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package game_fla
Section 100
//Timeline_222 (game_fla.Timeline_222)
package game_fla {
import flash.display.*;
public dynamic class Timeline_222 extends MovieClip {
public var stoped;
public function Timeline_222(){
addFrameScript(0, frame1, 10, frame11, 21, frame22);
}
function frame1(){
stoped = false;
}
function frame22(){
if (stoped == true){
gotoAndStop(1);
};
}
function frame11(){
if (stoped == true){
gotoAndStop(1);
};
}
}
}//package game_fla
Section 101
//Timeline_224 (game_fla.Timeline_224)
package game_fla {
import flash.display.*;
public dynamic class Timeline_224 extends MovieClip {
public function Timeline_224(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package game_fla
Section 102
//Timeline_246 (game_fla.Timeline_246)
package game_fla {
import flash.display.*;
public dynamic class Timeline_246 extends MovieClip {
public var stoped;
public function Timeline_246(){
addFrameScript(0, frame1);
}
function frame1(){
stoped = false;
}
}
}//package game_fla
Section 103
//Timeline_261 (game_fla.Timeline_261)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_261 extends MovieClip {
public var bgPad:MovieClip;
public var str:TextField;
public var btn:SimpleButton;
}
}//package game_fla
Section 104
//Timeline_285 (game_fla.Timeline_285)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_285 extends MovieClip {
public var bgPad:MovieClip;
public var str:TextField;
public var buttonsPad:MovieClip;
public var instructions:MovieClip;
}
}//package game_fla
Section 105
//Timeline_288 (game_fla.Timeline_288)
package game_fla {
import flash.display.*;
public dynamic class Timeline_288 extends MovieClip {
public var menuYes:MovieClip;
public var ok:MovieClip;
public var continueBtn:MovieClip;
public var menuNo:MovieClip;
public var Yes:MovieClip;
public var No:MovieClip;
}
}//package game_fla
Section 106
//Timeline_35 (game_fla.Timeline_35)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_35 extends MovieClip {
public var str:TextField;
public var earnedStr:TextField;
public var targetStr:TextField;
}
}//package game_fla
Section 107
//Timeline_37 (game_fla.Timeline_37)
package game_fla {
import flash.display.*;
public dynamic class Timeline_37 extends MovieClip {
public var title:MovieClip;
public var creditsBtn:SimpleButton;
public var homePageBtn:SimpleButton;
public var panda:MovieClip;
}
}//package game_fla
Section 108
//Timeline_43 (game_fla.Timeline_43)
package game_fla {
import flash.display.*;
public dynamic class Timeline_43 extends MovieClip {
public function Timeline_43(){
addFrameScript(159, frame160);
}
function frame160(){
stop();
}
}
}//package game_fla
Section 109
//Timeline_46 (game_fla.Timeline_46)
package game_fla {
import flash.display.*;
public dynamic class Timeline_46 extends MovieClip {
public var viewHighScoresBtn:SimpleButton;
public var instructionsBtn:SimpleButton;
public var playBtn:SimpleButton;
public var playBoxOfficeBtn:SimpleButton;
public function Timeline_46(){
addFrameScript(159, frame160);
}
function frame160(){
stop();
}
}
}//package game_fla
Section 110
//toolShopMc_266 (game_fla.toolShopMc_266)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class toolShopMc_266 extends MovieClip {
public var shopPrompt:MovieClip;
public var item1Btn:SimpleButton;
public var backBtn:SimpleButton;
public var item4Btn:SimpleButton;
public var item7Btn:SimpleButton;
public var currentMoneyPad:TextField;
public var item2Btn:SimpleButton;
public var item6:MovieClip;
public var item7:MovieClip;
public var item3:MovieClip;
public var item10:MovieClip;
public var item4:MovieClip;
public var item5:MovieClip;
public var item9:MovieClip;
public var item2:MovieClip;
public var item10Btn:SimpleButton;
public var item8:MovieClip;
public var item8Btn:SimpleButton;
public var item5Btn:SimpleButton;
public var item1:MovieClip;
public var item3Btn:SimpleButton;
public var item6Btn:SimpleButton;
public var item9Btn:SimpleButton;
}
}//package game_fla
Section 111
//xinyuEmot_105 (game_fla.xinyuEmot_105)
package game_fla {
import flash.display.*;
public dynamic class xinyuEmot_105 extends MovieClip {
public function xinyuEmot_105(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 112
//yesBtnMc_291 (game_fla.yesBtnMc_291)
package game_fla {
import flash.display.*;
public dynamic class yesBtnMc_291 extends MovieClip {
public var btn:SimpleButton;
}
}//package game_fla
Section 113
//youfail_36 (game_fla.youfail_36)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class youfail_36 extends MovieClip {
public var reasonStr:TextField;
}
}//package game_fla
Section 114
//yourscoreYouWin_100 (game_fla.yourscoreYouWin_100)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class yourscoreYouWin_100 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 115
//youWinBtnsMc_91 (game_fla.youWinBtnsMc_91)
package game_fla {
import flash.display.*;
public dynamic class youWinBtnsMc_91 extends MovieClip {
public var playAgainBtn:SimpleButton;
public var submitScoreBtn:SimpleButton;
public var playBoxOfficeBtn:SimpleButton;
}
}//package game_fla
Section 116
//youWinPadMc_75 (game_fla.youWinPadMc_75)
package game_fla {
import flash.display.*;
public dynamic class youWinPadMc_75 extends MovieClip {
public var scorePad:MovieClip;
public var panda:MovieClip;
}
}//package game_fla
Section 117
//z5_143 (game_fla.z5_143)
package game_fla {
import flash.display.*;
public dynamic class z5_143 extends MovieClip {
public var bgPad:MovieClip;
public var submitBtn:MovieClip;
public var closeBtn:MovieClip;
public var scorePad:MovieClip;
public var promptPad:MovieClip;
public var userNamePad:MovieClip;
}
}//package game_fla
Section 118
//z7_145 (game_fla.z7_145)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class z7_145 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 119
//z8_146 (game_fla.z8_146)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class z8_146 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 120
//z9_147 (game_fla.z9_147)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class z9_147 extends MovieClip {
public var str:TextField;
}
}//package game_fla
Section 121
//mp3 (gameOver.mp3)
package gameOver {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package gameOver
Section 122
//mp3 (incorrectOrders.mp3)
package incorrectOrders {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package incorrectOrders
Section 123
//mp3 (levelEnd.mp3)
package levelEnd {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package levelEnd
Section 124
//LoadingTxt (loading.LoadingTxt)
package loading {
import flash.display.*;
import flash.events.*;
import ui.*;
public class LoadingTxt extends Sprite {
private var txt:Txt;
public var onLoadComplete:Function;
public function LoadingTxt(){
onLoadComplete = function ():void{
};
super();
this.addEventListener(Event.ADDED_TO_STAGE, added);
}
private function added(_arg1:Event):void{
txt = (this.getChildAt(0) as Txt);
txt.autoSize = "center";
this.removeEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
txt.text = "100%";
}
private function onProgress(_arg1:ProgressEvent):void{
var _local2:int;
_local2 = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100);
txt.text = (_local2 + "%");
if (_local2 == 100){
if (onLoadComplete == null){
trace("你小子忘记设置 onLoadComplete 了!");
} else {
onLoadComplete();
};
};
}
private function removed(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
txt = null;
onLoadComplete = null;
}
}
}//package loading
Section 125
//PrevLoader (loading.PrevLoader)
package loading {
import flash.display.*;
import flash.events.*;
import ui.*;
import mochi.as3.*;
import flash.utils.*;
public class PrevLoader extends MovieClip {
public var mochi_container:MovieClip;
public var mochi_code:String;
public var protection:Boolean;// = true
public var maskRect:MaskRect;
public function PrevLoader(){
protection = true;
super();
addFrameScript(1, frame2);
stage.showDefaultContextMenu = false;
(root as MovieClip).stop();
__setProp_maskRect_loading_1();
}
public function set skip(_arg1:Boolean):void{
if (_arg1){
this.stop();
stopAll(this);
(root as MovieClip).play();
this.visible = false;
};
}
private function isInUrlFront(_arg1:String):Boolean{
var _local2:String;
_local2 = this.loaderInfo.url;
_local2.toLowerCase();
_arg1.toLowerCase();
return ((_local2.indexOf(_arg1) == 0));
}
public function init():void{
stop();
MaskRect.setPos(maskRect, setPos);
}
public function checkGoNext():void{
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
goNext();
};
}
public function goNext():void{
if ((mochi_container._mochiad is MovieClip)){
} else {
goNext2();
};
}
function frame2(){
init();
}
private function setPos(_arg1:int, _arg2:int):void{
this.x = (_arg1 / 2);
this.y = (_arg2 / 2);
mochi_container.x = (-(_arg1) / 2);
mochi_container.y = (-(_arg2) / 2);
if (mochi_code){
MochiAd.showPreGameAd({clip:mochi_container, ad_failed:goNext2, ad_skipped:goNext2, ad_finished:goNext2, id:mochi_code, res:((_arg1 + "x") + _arg2)});
} else {
trace("未设置mochi_code");
};
}
public function goNext2():void{
try {
MochiAd.unload(mochi_container);
} catch(e) {
trace(("mochiad e=" + e));
};
if (protection){
if (((isIn("freeworldgroup.com")) || (isIn("ifungames.com")))){
this.gotoAndStop(4);
} else {
this.gotoAndStop(3);
};
} else {
this.gotoAndStop(4);
};
}
function __setProp_maskRect_loading_1(){
try {
maskRect["componentInspectorSetting"] = true;
} catch(e:Error) {
};
maskRect.align = "center-middle";
try {
maskRect["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function isIn(_arg1:String):Boolean{
return (((((((isInUrlFront(_arg1)) || (isInUrlFront(("http://" + _arg1))))) || (isInUrlFront(("http://www." + _arg1))))) || (isInUrlFront(("www." + _arg1)))));
}
public static function stopAll(_arg1:DisplayObject){
var _local2:DisplayObjectContainer;
var _local3:int;
if ((_arg1 is DisplayObjectContainer)){
_local2 = (_arg1 as DisplayObjectContainer);
_local3 = _local2.numChildren;
while (--_local3 >= 0) {
stopAll(_local2.getChildAt(_local3));
};
if ((_arg1 is MovieClip)){
(_arg1 as MovieClip).stop();
};
};
}
}
}//package loading
Section 126
//mp3 (makingNoodles.mp3)
package makingNoodles {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package makingNoodles
Section 127
//SubmitBox (menu.SubmitBox)
package menu {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public class SubmitBox extends MovieClip {
public var userNameMc:TextField;
private var submit;
public var viewScoreMc:SimpleButton;
private var send:URLLoader;
private var score:TextField;
private var gameName:String;
public var closeMc:SimpleButton;
public var submitMc:SimpleButton;
public var scoreMc:TextField;
private var viewScore;
private var userName:TextField;
private var close;
public static const SEND_FINISH:String = " send finish.";
public function SubmitBox(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
super();
this.init();
this.addEventListener(Event.ADDED, added);
}
private function added(_arg1:Event):void{
if (_arg1.target == _arg1.currentTarget){
this.submit.addEventListener(MouseEvent.CLICK, submitEvent);
this.close.addEventListener(MouseEvent.CLICK, closeEvent);
this.viewScore.addEventListener(MouseEvent.CLICK, viewEvent);
this.hideViewScore();
this.send.addEventListener(Event.COMPLETE, sendEvent);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
};
}
public function hideSubmit():void{
this.submit.visible = false;
}
private function viewEvent(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.freeworldgroup.com/score/index.asp");
_local2.data = ("game=" + this.gameName);
navigateToURL(_local2, "_blank");
}
private function init():void{
this.submit = this.submitMc;
this.viewScore = this.viewScoreMc;
this.close = this.closeMc;
this.userName = this.userNameMc;
this.score = this.scoreMc;
this.send = new URLLoader();
}
public function setName(_arg1:String):void{
this.gameName = _arg1;
}
public function show():void{
this.visible = true;
}
public function setScore(_arg1:int):void{
this.score.text = _arg1.toString();
}
function frame3(){
stop();
}
private function submitEvent(_arg1:MouseEvent):void{
this.submitScore();
}
function frame1(){
stop();
}
public function showViewScore():void{
this.viewScore.visible = true;
}
public function showSubmit():void{
this.submit.visible = true;
}
public function hide():void{
this.visible = false;
}
public function submitScore():void{
var _local1:URLRequest;
var _local2:URLVariables;
if (this.userName.text != ""){
_local1 = new URLRequest("http://www.freeworldgroup.com/score/score.asp");
_local2 = new URLVariables();
_local2.game = this.gameName;
_local2.score = this.score.text;
_local2.name = this.userName.text;
_local1.method = URLRequestMethod.POST;
_local1.data = _local2;
this.send.load(_local1);
this.gotoAndStop(2);
this.hideSubmit();
};
}
function frame2(){
stop();
}
private function closeEvent(_arg1:MouseEvent):void{
this.gotoAndStop(1);
this.showSubmit();
this.hideViewScore();
this.hide();
}
private function removed(_arg1:Event):void{
if (_arg1.target == _arg1.currentTarget){
this.submit.removeEventListener(MouseEvent.CLICK, submitEvent);
this.close.removeEventListener(MouseEvent.CLICK, closeEvent);
this.viewScore.removeEventListener(MouseEvent.CLICK, viewEvent);
this.send.removeEventListener(Event.COMPLETE, sendEvent);
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
};
}
public function hideViewScore():void{
this.viewScore.visible = false;
}
private function sendEvent(_arg1:Event):void{
this.gotoAndStop(3);
this.showViewScore();
this.dispatchEvent(new Event(SubmitBox.SEND_FINISH));
}
}
}//package menu
Section 128
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("3.02 as3");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 129
//mp3 (openBin.mp3)
package openBin {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package openBin
Section 130
//mp3 (takingMoney.mp3)
package takingMoney {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package takingMoney
Section 131
//mp3 (tea.mp3)
package tea {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package tea
Section 132
//MaskRect (ui.MaskRect)
package ui {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class MaskRect extends Sprite {
public var onSetWH:Function;
private var __align:String;// = "left-top"
public static var wid:int = 0;
public static var hei0:int;
public static var hei:int = 0;
public static var wid0:int;
public function MaskRect(){
__align = "left-top";
super();
if ((((wid > 0)) && ((hei > 0)))){
setWH();
} else {
this.addEventListener(Event.ADDED_TO_STAGE, added);
};
}
private function added(_arg1:Event):void{
var event = _arg1;
this.removeEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
try {
getStageWH();
} catch(e:Error) {
this.loaderInfo.addEventListener(Event.INIT, loadInit);
};
}
private function getStageWH():void{
var _local1:*;
_local1 = this.getChildAt(0);
wid0 = _local1.width;
hei0 = _local1.height;
wid = this.loaderInfo.width;
hei = this.loaderInfo.height;
setWH();
}
public function set align(_arg1:String):void{
var _local2:*;
var _local3:Rectangle;
__align = _arg1;
if ((((wid > 0)) && ((hei > 0)))){
_local2 = this.getChildAt(0);
_local3 = _local2.getBounds(this);
switch (__align.charAt(0).toLowerCase()){
case "c":
case "m":
_local2.x = (_local2.x + (((wid0 - wid) / 2) - _local3.x));
_local2.y = (_local2.y + (((hei0 - hei) / 2) - _local3.y));
break;
case "r":
case "b":
_local2.x = (_local2.x + ((wid0 - wid) - _local3.x));
_local2.y = (_local2.y + ((hei0 - hei) - _local3.y));
break;
default:
_local2.x = (_local2.x + -(_local3.x));
_local2.y = (_local2.y + -(_local3.y));
break;
};
};
}
private function loadInit(_arg1:Event):void{
this.loaderInfo.removeEventListener(Event.INIT, loadInit);
getStageWH();
}
private function removed(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
onSetWH = null;
}
private function setWH():void{
var _local1:*;
_local1 = this.getChildAt(0);
_local1.width = wid;
_local1.height = hei;
if (onSetWH != null){
onSetWH(wid, hei);
};
if (__align){
align = __align;
};
}
public static function setPos(_arg1:MaskRect, _arg2:Function):void{
if ((((wid > 0)) && ((hei > 0)))){
_arg2(wid, hei);
} else {
_arg1.onSetWH = _arg2;
};
}
}
}//package ui
Section 133
//Txt (ui.Txt)
package ui {
import flash.display.*;
import flash.text.*;
public class Txt extends Sprite {
private var __text:String;
public var txt:TextField;
public function Txt(){
__text = "";
autoSize = "left";
}
public function get text(){
if (txt.selectable){
__text = txt.text;
};
return (__text);
}
public function get type():String{
return (txt.type);
}
public function get autoSize():String{
return (txt.autoSize);
}
public function get selectable():Boolean{
return (txt.selectable);
}
public function set text(_arg1):void{
txt.text = (__text = _arg1);
}
public function set type(_arg1:String):void{
txt.type = _arg1;
}
public function set autoSize(_arg1:String):void{
txt.autoSize = _arg1;
}
public function set selectable(_arg1:Boolean):void{
txt.selectable = _arg1;
}
public function set maxChars(_arg1:int):void{
txt.maxChars = _arg1;
}
public function get maxChars():int{
return (txt.maxChars);
}
}
}//package ui
Section 134
//appearFullNoodle (appearFullNoodle)
package {
import flash.display.*;
public class appearFullNoodle extends Sprite {
private var obj:MovieClip;
public function appearFullNoodle(_arg1){
obj = _arg1;
obj.visible = false;
}
private function hideAllThings(_arg1){
_arg1.tea.visible = false;
_arg1.chopsticks.visible = false;
_arg1.bigGuy1.bigNoodle.visible = false;
_arg1.bigGuy1.bigNoodle.bowl.visible = false;
_arg1.bigGuy1.bigNoodle.daomian.visible = false;
_arg1.bigGuy1.bigNoodle.lamian.visible = false;
_arg1.bigGuy1.bigNoodle.cilantro.visible = false;
_arg1.bigGuy1.bigNoodle.chicken.visible = false;
_arg1.bigGuy1.bigNoodle.pork.visible = false;
_arg1.bigGuy1.bigNoodle.sauce.visible = false;
_arg1.bigGuy1.smallNoodle.visible = false;
_arg1.bigGuy1.smallNoodle.bowl.visible = false;
_arg1.bigGuy1.smallNoodle.daomian.visible = false;
_arg1.bigGuy1.smallNoodle.lamian.visible = false;
_arg1.bigGuy1.smallNoodle.cilantro.visible = false;
_arg1.bigGuy1.smallNoodle.chicken.visible = false;
_arg1.bigGuy1.smallNoodle.pork.visible = false;
_arg1.bigGuy1.smallNoodle.sauce.visible = false;
_arg1.bigGuy2.bigNoodle.visible = false;
_arg1.bigGuy2.bigNoodle.bowl.visible = false;
_arg1.bigGuy2.bigNoodle.daomian.visible = false;
_arg1.bigGuy2.bigNoodle.lamian.visible = false;
_arg1.bigGuy2.bigNoodle.cilantro.visible = false;
_arg1.bigGuy2.bigNoodle.chicken.visible = false;
_arg1.bigGuy2.bigNoodle.pork.visible = false;
_arg1.bigGuy2.bigNoodle.sauce.visible = false;
_arg1.bigGuy2.smallNoodle.visible = false;
_arg1.bigGuy2.smallNoodle.bowl.visible = false;
_arg1.bigGuy2.smallNoodle.daomian.visible = false;
_arg1.bigGuy2.smallNoodle.lamian.visible = false;
_arg1.bigGuy2.smallNoodle.cilantro.visible = false;
_arg1.bigGuy2.smallNoodle.chicken.visible = false;
_arg1.bigGuy2.smallNoodle.pork.visible = false;
_arg1.bigGuy2.smallNoodle.sauce.visible = false;
}
public function start(_arg1){
var _local2:uint;
var _local3:uint;
var _local4:Array;
var _local5:uint;
var _local6:MovieClip;
obj.visible = true;
hideAllThings(obj);
_local4 = [obj.bigGuy1, obj.bigGuy2];
_local5 = 0;
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local3][0] == "tea"){
obj.tea.visible = true;
} else {
_local6 = ((_arg1[_local3][0])=="smallBowl") ? _local4[_local3].smallNoodle : _local4[_local3].bigNoodle;
_local2 = 0;
while (_local2 < _arg1[_local3].length) {
switch (_arg1[_local3][_local2]){
case "smallBowl":
case "bigBowl":
_local6.visible = true;
_local6.bowl.visible = true;
break;
case "chopsticks":
_local5++;
break;
case "dough":
_local6.lamian.visible = true;
break;
case "knife":
_local6.daomian.visible = true;
break;
case "cilantro":
_local6.cilantro.visible = true;
break;
case "chicken":
_local6.chicken.visible = true;
break;
case "pork":
_local6.pork.visible = true;
break;
case "sauce1":
case "sauce2":
case "sauce3":
case "sauce4":
_local6.sauce.visible = true;
_local6.sauce.gotoAndStop(_arg1[_local3][_local2].split("sauce")[1]);
break;
};
_local2++;
};
};
_local3++;
};
if (_local5 > 0){
obj.chopsticks.visible = true;
obj.chopsticks.str.text = ("x" + _local5.toString());
};
}
public function set visa(_arg1){
obj.visible = _arg1;
}
}
}//package
Section 135
//cookingPot (cookingPot)
package {
import flash.display.*;
public class cookingPot extends Sprite {
var obj:MovieClip;
var status:String;
public function cookingPot(_arg1){
obj = _arg1;
}
public function waiting(){
status = "waiting";
obj.water.visible = false;
obj.dough.visible = true;
}
public function shutDown(){
status = "shutDown";
obj.visible = false;
}
public function cooking(_arg1){
status = "cooking";
obj.water.visible = true;
}
public function openUp(){
status = "free";
obj.visible = true;
obj.dough.visible = false;
obj.water.visible = false;
}
public function finish(_arg1){
if (_arg1 == true){
waiting();
} else {
status = "free";
obj.water.visible = false;
obj.dough.visible = false;
};
}
}
}//package
Section 136
//donghua (donghua)
package {
import flash.display.*;
import flash.events.*;
public class donghua extends Sprite {
private var thingsType:String;
private var type:String;
private var p:Object;
private var countTime:uint;
private var num:uint;
private var ori:Number;
private var objArr:Array;
public var status:String;
public function donghua(_arg1){
p = _arg1;
status = "free";
objArr = [p.desk.daoDown, p.desk.daoUp, p.desk.laDown, p.desk.laUp, p.desk.animationPlus, p.desk.rubishPanda];
hideAll();
}
private function dropLitter(_arg1:Event){
if (p.pauseFlag == false){
if (p.desk.rubishPanda.currentFrame > (p.desk.rubishPanda.totalFrames - 1)){
status = "end";
removeEventListener(Event.ENTER_FRAME, dropLitter);
};
};
}
private function hideAll(){
var _local1:uint;
_local1 = 0;
while (_local1 < objArr.length) {
objArr[_local1].visible = false;
objArr[_local1].gotoAndStop(1);
_local1++;
};
}
public function play(_arg1, _arg2){
num = _arg1;
type = _arg2;
status = "play";
addEventListener(Event.ENTER_FRAME, playAnimation);
}
public function kill(){
removeEventListener(Event.ENTER_FRAME, playAnimation);
removeEventListener(Event.ENTER_FRAME, plateThrow);
removeEventListener(Event.ENTER_FRAME, dropLitter);
}
private function plateThrow(_arg1:Event){
var _local2:Number;
if (p.pauseFlag == false){
_local2 = (5 - ((0.02 * countTime) * countTime));
if ((((_local2 < 0)) && ((Math.abs((p.objOnlyHand.y - ori)) < Math.abs(_local2))))){
p.objOnlyHand.y = ori;
status = "end";
removeEventListener(Event.ENTER_FRAME, plateThrow);
p.fatPanda.addThingsOnThePlate(thingsType);
} else {
p.objOnlyHand.y = (p.objOnlyHand.y - _local2);
};
countTime++;
};
}
private function playAnimation(_arg1:Event){
var _local2:uint;
var _local3:uint;
var _local4:uint;
if (p.pauseFlag == false){
if (status == "play"){
status = "playing";
switch (num){
case 1:
ori = p.objOnlyHand.y;
_local3 = 0;
while (_local3 < p.pots.length) {
if (p.pots[_local3].status == "free"){
_local4 = _local3;
p.pots[_local3].cooking(((type)=="noBowl") ? true : false);
break;
};
_local3++;
};
countTime = 0;
thingsType = "knifeAfterAnimation";
addEventListener(Event.ENTER_FRAME, plateThrow);
p.obj.visible = false;
p.knife.visible = false;
objArr[(0 + _local4)].visible = true;
objArr[(0 + _local4)].play();
objArr[4].visible = true;
break;
case 2:
ori = p.objOnlyHand.y;
_local3 = 0;
while (_local3 < p.pots.length) {
if (p.pots[_local3].status == "free"){
_local4 = _local3;
p.pots[_local3].cooking(((type)=="noBowl") ? true : false);
break;
};
_local3++;
};
countTime = 0;
thingsType = "doughAfterAnimation";
addEventListener(Event.ENTER_FRAME, plateThrow);
p.obj.visible = false;
p.dough.visible = false;
objArr[(2 + _local4)].visible = true;
objArr[(2 + _local4)].play();
objArr[4].visible = true;
break;
case 3:
p.obj.visible = false;
objArr[5].visible = true;
objArr[5].play();
p.deskArroundBack.bin.binInside.play();
addEventListener(Event.ENTER_FRAME, dropLitter);
break;
};
};
if (status == "end"){
if (num == 1){
p.knife.visible = true;
};
if (num == 2){
p.dough.visible = true;
};
p.obj.visible = true;
if ((((num == 1)) || ((num == 2)))){
p.objOnlyHand.visible = true;
_local3 = 0;
while (_local3 < p.pots.length) {
if (p.pots[_local3].status == "cooking"){
p.pots[_local3].finish(((type)=="noBowl") ? true : false);
if (type == "noBowl"){
p.mkSound("cookingNoodles.mp3");
};
break;
};
_local3++;
};
};
hideAll();
status = "free";
removeEventListener(Event.ENTER_FRAME, playAnimation);
};
};
}
}
}//package
Section 137
//fallDown (fallDown)
package {
import flash.display.*;
import flash.events.*;
public class fallDown extends Sprite {
private var ori:Number;
private var obj:MovieClip;
public var status:String;
public function fallDown(_arg1){
obj = _arg1;
status = "free";
}
public function start(){
ori = obj.y;
obj.visible = true;
status = "busy";
addEventListener(Event.ENTER_FRAME, fallDownMotion);
}
private function fallDownMotion(_arg1:Event){
if (obj.alpha <= 0){
obj.visible = false;
obj.alpha = 1;
status = "free";
removeEventListener(Event.ENTER_FRAME, fallDownMotion);
} else {
if ((obj.y - ori) > 25){
obj.alpha = (obj.alpha - 0.3);
} else {
obj.y = (obj.y + 2.5);
};
};
}
}
}//package
Section 138
//guest (guest)
package {
import flash.display.*;
import flash.events.*;
public class guest extends Sprite {
public var maxExistTime:uint;// = 1350
public var existTime:uint;
private var p:Object;
private var happyFlag:Boolean;
private var moneyValue:Number;
private var guestNum:uint;
private var guestStyle:uint;
public var obj:MovieClip;
public var status:String;
public function guest(_arg1, _arg2, _arg3){
maxExistTime = (45 * 30);
super();
p = _arg1;
obj = _arg2;
obj.visible = false;
obj.alpha = 1;
obj.gotoAndStop(1);
guestNum = _arg3;
}
public function stopMove(){
status = "stopMove";
obj.guest.guestInside.gotoAndStop(1);
}
private function showHappyEmot(_arg1:Event){
if (p.pauseFlag == false){
if (obj.guest.emot.happy.currentFrame == 20){
removeEventListener(Event.ENTER_FRAME, showHappyEmot);
addEventListener(Event.ENTER_FRAME, hideMotion);
obj.guest.emot.happy.gotoAndStop(1);
obj.guest.gotoAndStop((guestStyle + 10));
p.moneyArr[(guestNum - 1)].appear(moneyValue);
} else {
stopMove();
obj.guest.emot.happy.play();
};
};
}
public function get visa(){
return (obj.visible);
}
public function hide(_arg1, _arg2){
happyFlag = false;
removeEventListener(Event.ENTER_FRAME, m1);
if (_arg1 == "happy"){
happyFlag = true;
moneyValue = _arg2;
p.mkSound((("cheering" + (int((Math.random() * 2)) + 1)) + ".mp3"));
addEventListener(Event.ENTER_FRAME, showHappyEmot);
} else {
addEventListener(Event.ENTER_FRAME, hideMotion);
};
}
public function kill(){
removeEventListener(Event.ENTER_FRAME, m1);
removeEventListener(Event.ENTER_FRAME, showHappyEmot);
removeEventListener(Event.ENTER_FRAME, hideMotion);
removeEventListener(Event.ENTER_FRAME, addRequest);
}
private function m1(_arg1:Event){
var _local2:Number;
if (p.pauseFlag == false){
if (existTime <= 0){
hide("", 0);
_local2 = (p.credit - (p.photosControl.maxCredit / p.photosControl.multipleCredit));
p.setCredit(((_local2 > 0)) ? _local2 : 0);
p.lives.oneManDie();
p.guestRequestArr[(guestNum - 1)].destroy();
} else {
if (existTime == (maxExistTime / 5)){
obj.guest.gotoAndStop((guestStyle + 5));
};
};
obj.guestRequest.clock.gotoAndStop(int(((60 * (maxExistTime - existTime)) / maxExistTime)));
if (p.tutorialFlag == false){
existTime--;
};
};
}
private function hideMotion(_arg1:Event){
if (p.pauseFlag == false){
if (obj.alpha <= 0){
obj.visible = false;
obj.alpha = 1;
obj.gotoAndStop(1);
obj.guest.guestInside.gotoAndPlay(1);
removeEventListener(Event.ENTER_FRAME, hideMotion);
} else {
if ((((happyFlag == false)) || ((obj.guest.guestInside.currentFrame > 15)))){
obj.alpha = (obj.alpha - 0.1);
};
};
};
}
public function appear(_arg1){
status = "moving";
p.guestRequestArr[(guestNum - 1)].visa = false;
obj.visible = true;
obj.alpha = 1;
obj.gotoAndPlay(1);
guestStyle = (int((Math.random() * ((_arg1 == 0)) ? 5 : 4)) + 1);
if (p.tutorialFlag == true){
guestStyle = 1;
};
obj.guest.gotoAndStop(guestStyle);
addEventListener(Event.ENTER_FRAME, addRequest);
}
public function get frameSum(){
return (obj.totalFrames);
}
public function get touming(){
return (obj.alpha);
}
private function addRequest(_arg1:Event){
if (p.pauseFlag == false){
if (obj.currentFrame > 25){
p.guestRequestArr[(guestNum - 1)].visa = true;
p.guestRequestArr[(guestNum - 1)].formANoodle();
existTime = maxExistTime;
obj.guest.guestInside.play();
addEventListener(Event.ENTER_FRAME, m1);
removeEventListener(Event.ENTER_FRAME, hideMotion);
removeEventListener(Event.ENTER_FRAME, addRequest);
};
};
}
public function get frameNum(){
return (obj.currentFrame);
}
}
}//package
Section 139
//hideAllThingsOnThePlate (hideAllThingsOnThePlate)
package {
import flash.display.*;
public class hideAllThingsOnThePlate extends Sprite {
public function hideAllThingsOnThePlate(_arg1){
var _local2:uint;
super();
_local2 = 0;
while (_local2 < _arg1.length) {
_arg1[_local2].panda.plate.chopsticks1.visible = false;
_arg1[_local2].panda.plate.chopsticks2.visible = false;
_arg1[_local2].panda.plate.chopsticks3.visible = false;
_arg1[_local2].panda.plate.tea.visible = false;
_arg1[_local2].panda.plate.bigGuy1.bigNoodle.visible = false;
_arg1[_local2].panda.plate.bigGuy1.bigNoodle.bowl.visible = false;
_arg1[_local2].panda.plate.bigGuy1.bigNoodle.daomian.visible = false;
_arg1[_local2].panda.plate.bigGuy1.bigNoodle.lamian.visible = false;
_arg1[_local2].panda.plate.bigGuy1.bigNoodle.cilantro.visible = false;
_arg1[_local2].panda.plate.bigGuy1.bigNoodle.chicken.visible = false;
_arg1[_local2].panda.plate.bigGuy1.bigNoodle.pork.visible = false;
_arg1[_local2].panda.plate.bigGuy1.bigNoodle.sauce.visible = false;
_arg1[_local2].panda.plate.bigGuy1.smallNoodle.visible = false;
_arg1[_local2].panda.plate.bigGuy1.smallNoodle.bowl.visible = false;
_arg1[_local2].panda.plate.bigGuy1.smallNoodle.daomian.visible = false;
_arg1[_local2].panda.plate.bigGuy1.smallNoodle.lamian.visible = false;
_arg1[_local2].panda.plate.bigGuy1.smallNoodle.cilantro.visible = false;
_arg1[_local2].panda.plate.bigGuy1.smallNoodle.chicken.visible = false;
_arg1[_local2].panda.plate.bigGuy1.smallNoodle.pork.visible = false;
_arg1[_local2].panda.plate.bigGuy1.smallNoodle.sauce.visible = false;
_arg1[_local2].panda.plate.bigGuy2.bigNoodle.visible = false;
_arg1[_local2].panda.plate.bigGuy2.bigNoodle.bowl.visible = false;
_arg1[_local2].panda.plate.bigGuy2.bigNoodle.daomian.visible = false;
_arg1[_local2].panda.plate.bigGuy2.bigNoodle.lamian.visible = false;
_arg1[_local2].panda.plate.bigGuy2.bigNoodle.cilantro.visible = false;
_arg1[_local2].panda.plate.bigGuy2.bigNoodle.chicken.visible = false;
_arg1[_local2].panda.plate.bigGuy2.bigNoodle.pork.visible = false;
_arg1[_local2].panda.plate.bigGuy2.bigNoodle.sauce.visible = false;
_arg1[_local2].panda.plate.bigGuy2.smallNoodle.visible = false;
_arg1[_local2].panda.plate.bigGuy2.smallNoodle.bowl.visible = false;
_arg1[_local2].panda.plate.bigGuy2.smallNoodle.daomian.visible = false;
_arg1[_local2].panda.plate.bigGuy2.smallNoodle.lamian.visible = false;
_arg1[_local2].panda.plate.bigGuy2.smallNoodle.cilantro.visible = false;
_arg1[_local2].panda.plate.bigGuy2.smallNoodle.chicken.visible = false;
_arg1[_local2].panda.plate.bigGuy2.smallNoodle.pork.visible = false;
_arg1[_local2].panda.plate.bigGuy2.smallNoodle.sauce.visible = false;
_local2++;
};
}
}
}//package
Section 140
//itemShop (itemShop)
package {
import flash.display.*;
import flash.events.*;
public class itemShop extends Sprite {
private var p:Object;
private var obj:MovieClip;
public function itemShop(_arg1, _arg2){
p = _arg1;
obj = _arg2;
obj.visible = false;
obj.backBtn.addEventListener(MouseEvent.MOUSE_UP, backBtnEvent);
}
public function get visa(){
return (obj.visible);
}
public function openUp(){
obj.x = 0;
obj.y = 0;
obj.visible = true;
p.shopMc.shopPrompt.visible = false;
p.killAll();
}
private function backBtnEvent(_arg1:MouseEvent):void{
p.setPad(p.score, (p.level + 1));
p.status = "free";
p.init();
obj.visible = false;
}
}
}//package
Section 141
//money (money)
package {
import flash.display.*;
import flash.events.*;
public class money extends Sprite {
private var oriMoneyValue:Number;
private var p:Object;
public var moneyValue:Number;
public var statusStr:String;
private var parts:Array;
private var obj:MovieClip;
public function money(_arg1, _arg2){
p = _arg1;
obj = _arg2;
obj.visible = false;
statusStr = "free";
parts = [obj.part1, obj.part2, obj.part3, obj.scoreAdd];
}
public function getMoney(){
var _local1:uint;
if (moneyValue == 0){
obj.visible = false;
} else {
if (statusStr == "free"){
statusStr = "flying";
_local1 = 0;
while (_local1 < parts.length) {
parts[_local1].play();
_local1++;
};
obj.scoreAdd.scoreAddInside.str.text = ("+$" + int(moneyValue).toString());
p.mkSound("takingMoney.mp3");
addEventListener(Event.ENTER_FRAME, fly);
removeEventListener(Event.ENTER_FRAME, moneyReducing);
};
};
}
public function get visa(){
return (obj.visible);
}
public function hide(){
obj.visible = false;
removeEventListener(Event.ENTER_FRAME, moneyReducing);
}
public function kill(){
removeEventListener(Event.ENTER_FRAME, fly);
removeEventListener(Event.ENTER_FRAME, moneyReducing);
}
private function fly(_arg1:Event){
if (p.pauseFlag == false){
if (parts[0].currentFrame > 25){
if (p.tutorialFlag == false){
p.setPad((p.score + moneyValue), p.level);
};
p.totalScore = (p.totalScore + (moneyValue * ((p.credit / ((p.photosControl.maxCredit / p.photosControl.multipleCredit) * 10)) + 1)));
statusStr = "gone";
moneyValue = 0;
hide();
removeEventListener(Event.ENTER_FRAME, fly);
};
};
}
private function moneyReducing(_arg1:Event){
var _local2:Number;
var _local3:uint;
if (p.pauseFlag == false){
_local2 = (-1 / 30);
if ((moneyValue + _local2) <= 0){
moneyValue = 0;
hide();
removeEventListener(Event.ENTER_FRAME, moneyReducing);
} else {
moneyValue = (moneyValue + _local2);
_local3 = 0;
while (_local3 < 3) {
if (_local3 < (3 * (moneyValue / oriMoneyValue))){
parts[_local3].visible = true;
} else {
parts[_local3].visible = false;
};
_local3++;
};
};
};
}
public function appear(_arg1){
var _local2:uint;
statusStr = "free";
moneyValue = _arg1;
oriMoneyValue = moneyValue;
obj.visible = true;
_local2 = 0;
while (_local2 < parts.length) {
parts[_local2].visible = true;
parts[_local2].gotoAndStop(1);
_local2++;
};
if (p.tutorialFlag == false){
addEventListener(Event.ENTER_FRAME, moneyReducing);
};
}
}
}//package
Section 142
//P (P)
package {
import flash.display.*;
import flash.events.*;
public class P extends Sprite {
private var SI:slideOut;
private var SU:slideIn;
private var p:Object;
private var obj:MovieClip;
public function P(_arg1, _arg2, _arg3, _arg4){
p = _arg2;
p.maskObj.visible = false;
obj = _arg3;
obj.y = 578;
obj.visible = false;
_arg4.addEventListener(MouseEvent.MOUSE_UP, openUp);
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, kd);
obj.pBtn.addEventListener(MouseEvent.MOUSE_UP, pBtnDown);
SI = new slideOut(obj, 578);
SU = new slideIn(obj, 180);
}
public function get visa(){
return (obj.visible);
}
private function kd(_arg1:KeyboardEvent){
if (_arg1.keyCode == 80){
moveMotion();
};
}
private function pBtnDown(_arg1:MouseEvent){
moveMotion();
}
private function openUp(_arg1:MouseEvent){
openUpMotion();
}
private function openUpMotion(){
p.pauseFlag = true;
p.maskObj.visible = true;
SU.start();
}
private function moveMotion(){
if (obj.y == 578){
openUpMotion();
};
if (obj.y == 180){
p.pauseFlag = false;
p.maskObj.visible = false;
SI.start();
};
}
}
}//package
Section 143
//panda (panda)
package {
import flash.display.*;
import flash.events.*;
public class panda extends Sprite {
private var thingsFallDown:fallDown;
private var jobsArr:Array;
private var oriX:Number;
private var oriY:Number;
private var pandasOnlyHand:Array;
private var targetRotation:Number;
private var targetPandaOnlyHand:MovieClip;
private var thingsOnThePlate:Array;
private var loc:String;
private var p:Object;
private var sp:Array;
private var targetStatusStr:String;
private var oriRotation:Number;
private var stopPoints:Array;
private var pointI:uint;
private var pandas:Array;
private var targetPanda:MovieClip;
private var statusStr:String;
private var targetY:Number;
private var obj:MovieClip;
private var targetI:uint;
private var targetPandaNum:uint;
private var targetX:Number;
public function panda(_arg1, _arg2){
stopPoints = new Array();
super();
p = _arg1;
obj = _arg2;
obj.x = 412;
obj.y = 298;
p.objOnlyHand.x = obj.x;
p.objOnlyHand.y = obj.y;
loc = getLoc(obj.x, obj.y);
resetChildIndex(loc, 2);
statusStr = "free";
jobsArr = new Array();
sp = [null, p.p1, p.p2, p.p3, p.p4];
pandas = [obj.pandaAcFront, obj.pandaAcBack, obj.pandaBdFront, obj.pandaBdBack];
pandasOnlyHand = [p.objOnlyHand.pandaAcFront, p.objOnlyHand.pandaAcBack, p.objOnlyHand.pandaBdFront, p.objOnlyHand.pandaBdBack];
thingsOnThePlate = new Array();
hideAllPandas();
new hideAllThingsOnThePlate(pandasOnlyHand);
targetPanda = pandas[2];
targetPandaOnlyHand = pandasOnlyHand[2];
targetPanda.visible = true;
targetPandaOnlyHand.visible = true;
addEventListener(Event.ENTER_FRAME, doJobs);
thingsFallDown = new fallDown(p.fallThings);
}
private function getNoodlePrice(_arg1){
var _local2:uint;
var _local3:uint;
var _local4:Array;
_local4 = new Array(0, 0);
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = 0;
while (_local3 < _arg1[_local2].length) {
if (_arg1[_local2][_local3] == "dough"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[0]);
};
if (_arg1[_local2][_local3] == "knife"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[1]);
};
if (_arg1[_local2][_local3] == "sauce1"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[2]);
};
if (_arg1[_local2][_local3] == "sauce2"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[3]);
};
if (_arg1[_local2][_local3] == "sauce3"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[4]);
};
if (_arg1[_local2][_local3] == "sauce4"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[5]);
};
if (_arg1[_local2][_local3] == "cilantro"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[6]);
};
if (_arg1[_local2][_local3] == "chicken"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[7]);
};
if (_arg1[_local2][_local3] == "pork"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[8]);
};
if (_arg1[_local2][_local3] == "tea"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[9]);
};
if (_arg1[_local2][_local3] == "chopsticks"){
_local4[_local2] = (_local4[_local2] + p.sellTxt.infomation[10]);
};
_local3++;
};
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local2][_local3] == "bigBowl"){
_local4[_local2] = (_local4[_local2] * p.sellTxt.infomation[11]);
};
if (_arg1[_local2][_local3] == "smallBowl"){
_local4[_local2] = (_local4[_local2] * p.sellTxt.infomation[12]);
};
_local3++;
};
_local2++;
};
return ((_local4[0] + _local4[1]));
}
private function resetArr(_arg1){
var _local2:Array;
var _local3:uint;
_local2 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
if (((!((_arg1[_local3] == ""))) && (!((_arg1[_local3] == null))))){
_local2[_local2.length] = _arg1[_local3];
};
_local3++;
};
return (_local2);
}
private function deleteFromArrByI(_arg1, _arg2){
var _local3:uint;
var _local4:Array;
_local4 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
_local4[_local3] = _arg1[_local3];
_local3++;
};
_local4[_arg2] = "";
return (resetArr(_local4));
}
private function specialCompare(_arg1, _arg2){
if (_arg1 == _arg2){
return (true);
};
if (((((!((_arg1 == _arg2))) && ((_arg1.substr(0, 5) == "sauce")))) && ((_arg2.substr(0, 5) == "sauce")))){
return (true);
};
if (((!((_arg1 == _arg2))) && ((((((_arg1 == "chicken")) && ((_arg2 == "pork")))) || ((((_arg1 == "pork")) && ((_arg2 == "chicken")))))))){
return (true);
};
return (false);
}
private function getChopsticksOnThePlate(_arg1){
return ([_arg1.chopsticks1, _arg1.chopsticks2, _arg1.chopsticks3]);
}
private function countVisiblePandas(){
var _local1:uint;
var _local2:uint;
_local1 = 0;
_local2 = 0;
while (_local2 < pandas.length) {
if (pandas[_local2].visible == true){
_local1++;
};
_local2++;
};
return (_local1);
}
private function getXx(_arg1, _arg2){
var _local3:uint;
if ((((_arg2 > 0)) && ((_arg1 > 0)))){
_local3 = 1;
};
if ((((_arg2 > 0)) && ((_arg1 < 0)))){
_local3 = 2;
};
if ((((_arg2 < 0)) && ((_arg1 < 0)))){
_local3 = 3;
};
if ((((_arg2 < 0)) && ((_arg1 > 0)))){
_local3 = 4;
};
return (_local3);
}
private function checkEmpty(){
var _local1:uint;
var _local2:uint;
_local1 = 0;
_local2 = 0;
while (_local1 < jobsArr.length) {
if (jobsArr[_local1]["statusStr"] != "done"){
_local2++;
};
_local1++;
};
if (_local2 == 0){
jobsArr = [];
targetI = 0;
};
}
public function addThingsOnThePlate(_arg1){
var _local2:uint;
var _local3:uint;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
if (_arg1 == "bin"){
_local5 = false;
_local4 = 0;
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if ((((((thingsOnThePlate[_local2] == "bigBowl")) || ((thingsOnThePlate[_local2] == "smallBowl")))) || ((thingsOnThePlate[_local2] == "tea")))){
_local4++;
};
_local2++;
};
if (_local4 > 0){
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if ((((thingsOnThePlate[_local2] == "dough")) || ((thingsOnThePlate[_local2] == "knife")))){
_local4--;
};
if (((!((thingsOnThePlate[_local2] == "chopsticks"))) && ((_local4 >= 0)))){
thingsOnThePlate[_local2] = "";
};
_local2++;
};
thingsOnThePlate = resetArr(thingsOnThePlate);
p.animationControl.play(3, "");
p.mkSound("openBin.mp3");
};
};
new hideAllThingsOnThePlate(pandasOnlyHand);
_local2 = 0;
_local4 = 0;
while (_local2 < thingsOnThePlate.length) {
if (thingsOnThePlate[_local2] == _arg1){
_local4++;
};
_local2++;
};
switch (_arg1){
case "guest1":
case "guest2":
case "guest3":
_local15 = (_arg1.split("guest")[1] - 1);
_local16 = [p.l101, p.l102, p.l103];
if (p.moneyArr[_local15].visa == true){
p.moneyArr[_local15].getMoney();
} else {
if ((((((p.guestArr[_local15].visa == true)) && ((p.guestArr[_local15].touming == 1)))) && ((p.guestArr[_local15].frameNum == p.guestArr[_local15].frameSum)))){
_local7 = checkGuestRequest(thingsOnThePlate, p.guestRequestArr[_local15].fullNoodle);
if (_local7[0] == true){
p.afn.start(p.guestRequestArr[_local15].fullNoodle);
p.fallThings.x = _local16[(_arg1.split("guest")[1] - 1)].x;
p.fallThings.y = _local16[(_arg1.split("guest")[1] - 1)].y;
if (thingsFallDown.status == "free"){
thingsFallDown.start();
};
p.guestRequestArr[_local15].hide(getNoodlePrice(p.guestRequestArr[_local15].fullNoodle));
thingsOnThePlate = _local7[1];
} else {
p.mkSound("incorrectOrders.mp3");
};
};
};
break;
case "chopsticks":
thingsOnThePlate = insertArr(thingsOnThePlate, -1, _arg1);
break;
case "knife":
case "dough":
if (_arg1 == "knife"){
p.animationControl.play(1, ((((((((thingsOnThePlate[(thingsOnThePlate.length - 1)] == "bigBowl")) || ((thingsOnThePlate[(thingsOnThePlate.length - 1)] == "smallBowl")))) && (!((thingsOnThePlate[(thingsOnThePlate.length - 2)] == "dough"))))) && (!((thingsOnThePlate[(thingsOnThePlate.length - 2)] == "knife"))))) ? "" : "noBowl");
} else {
p.animationControl.play(2, ((((((((thingsOnThePlate[(thingsOnThePlate.length - 1)] == "bigBowl")) || ((thingsOnThePlate[(thingsOnThePlate.length - 1)] == "smallBowl")))) && (!((thingsOnThePlate[(thingsOnThePlate.length - 2)] == "dough"))))) && (!((thingsOnThePlate[(thingsOnThePlate.length - 2)] == "knife"))))) ? "" : "noBowl");
};
break;
case "knifeAfterAnimation":
case "doughAfterAnimation":
_arg1 = _arg1.split("AfterAnimation")[0];
_local6 = true;
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if ((((((((thingsOnThePlate[_local2] == "bigBowl")) || ((thingsOnThePlate[_local2] == "smallBowl")))) && (!((thingsOnThePlate[(_local2 - 1)] == "dough"))))) && (!((thingsOnThePlate[(_local2 - 1)] == "knife"))))){
thingsOnThePlate = insertArr(thingsOnThePlate, (_local2 - 1), _arg1);
_local6 = false;
break;
};
_local2++;
};
if (_local6 == true){
thingsOnThePlate[thingsOnThePlate.length] = _arg1;
};
break;
case "tea":
thingsOnThePlate[thingsOnThePlate.length] = _arg1;
break;
case "sauce1":
case "sauce2":
case "sauce3":
case "sauce4":
case "cilantro":
case "pork":
case "chicken":
_local17 = new Array();
_local18 = new Array();
_local19 = [-1, -1];
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if ((((((thingsOnThePlate[_local2] == "bigBowl")) || ((thingsOnThePlate[_local2] == "smallBowl")))) && ((((thingsOnThePlate[(_local2 - 1)] == "dough")) || ((thingsOnThePlate[(_local2 - 1)] == "knife")))))){
_local17[_local17.length] = new Array();
_local18[_local18.length] = _local2;
} else {
if (_local17.length > 0){
if (specialCompare(thingsOnThePlate[_local2], _arg1) == true){
_local19[(_local17.length - 1)] = _local2;
};
_local17[(_local17.length - 1)][_local17[(_local17.length - 1)].length] = thingsOnThePlate[_local2];
};
};
_local2++;
};
if (_local17.length == 1){
if (_local19[0] > -1){
_local20 = 2;
} else {
_local20 = 0;
};
};
if (_local17.length == 2){
if ((((_local19[0] == -1)) && ((_local19[1] == -1)))){
_local20 = 0;
};
if ((((_local19[0] > -1)) && ((_local19[1] == -1)))){
_local20 = 1;
};
if ((((_local19[0] == -1)) && ((_local19[1] > -1)))){
if (thingsOnThePlate[_local19[1]] == _arg1){
_local20 = 3;
};
if (thingsOnThePlate[_local19[1]] != _arg1){
_local20 = 0;
};
};
if ((((_local19[0] > -1)) && ((_local19[1] > -1)))){
if (thingsOnThePlate[_local19[0]] == _arg1){
_local20 = 2;
};
if (((!((thingsOnThePlate[_local19[0]] == _arg1))) && ((thingsOnThePlate[_local19[1]] == _arg1)))){
_local20 = 3;
};
};
};
switch (_local20){
case 0:
thingsOnThePlate = insertArr(thingsOnThePlate, _local18[0], _arg1);
break;
case 1:
thingsOnThePlate = insertArr(thingsOnThePlate, _local18[1], _arg1);
break;
case 2:
thingsOnThePlate = deleteFromArrByI(thingsOnThePlate, _local19[0]);
break;
case 3:
thingsOnThePlate = deleteFromArrByI(thingsOnThePlate, _local19[1]);
break;
};
break;
case "smallBowl":
case "bigBowl":
_local6 = true;
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if ((((((((((thingsOnThePlate[_local2] == "dough")) || ((thingsOnThePlate[_local2] == "knife")))) && (!((thingsOnThePlate[(_local2 + 1)] == "bigBowl"))))) && (!((thingsOnThePlate[(_local2 + 1)] == "smallBowl"))))) && (!((thingsOnThePlate[(_local2 + 1)] == "bigBowl"))))){
thingsOnThePlate = insertArr(thingsOnThePlate, _local2, _arg1);
_local6 = false;
_local3 = 0;
while (_local3 < p.pots.length) {
if (p.pots[_local3].status == "waiting"){
p.pots[_local3].finish(false);
break;
};
_local3++;
};
break;
};
_local2++;
};
if (_local6 == true){
thingsOnThePlate[thingsOnThePlate.length] = _arg1;
};
break;
};
_local8 = new Array();
_local9 = new Array();
_local9["chopsticks"] = 0;
_local9["tea"] = 0;
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
switch (thingsOnThePlate[_local2]){
case "chopsticks":
var _local22 = _local9;
var _local23 = "chopsticks";
var _local24 = (_local22[_local23] + 1);
_local22[_local23] = _local24;
break;
case "tea":
_local22 = _local9;
_local23 = "tea";
_local24 = (_local22[_local23] + 1);
_local22[_local23] = _local24;
break;
case "knife":
case "dough":
case "cilantro":
case "sauce1":
case "sauce2":
case "sauce3":
case "sauce4":
case "pork":
case "chicken":
_local8[_local8.length] = thingsOnThePlate[_local2];
break;
case "smallBowl":
case "bigBowl":
_local8[_local8.length] = thingsOnThePlate[_local2];
break;
};
_local2++;
};
_local2 = 0;
while (_local2 < _local9["tea"]) {
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
pandasOnlyHand[_local3].panda.plate.tea.visible = true;
_local3++;
};
_local2++;
};
_local2 = 0;
while (_local2 < _local9["chopsticks"]) {
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
getChopsticksOnThePlate(pandasOnlyHand[_local3].panda.plate)[_local2].visible = true;
_local3++;
};
_local2++;
};
_local2 = 0;
_local14 = 0;
while (_local2 < _local8.length) {
if ((((_local8[_local2] == "bigBowl")) || ((_local8[_local2] == "smallBowl")))){
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
_local12 = ((_local8[_local2])=="bigBowl") ? "big" : "small";
getNoodle(pandasOnlyHand[_local3].panda.plate, _local12, (_local14 + 1)).visible = true;
getNoodle(pandasOnlyHand[_local3].panda.plate, _local12, (_local14 + 1)).bowl.visible = true;
_local3++;
};
_local14++;
};
_local2++;
};
_local10 = new Array();
_local2 = 0;
while (_local2 < _local8.length) {
if ((((_local8[_local2] == "dough")) || ((_local8[_local2] == "knife")))){
_local10[_local10.length] = new Array();
};
if (_local10.length > 0){
_local10[(_local10.length - 1)][_local10[(_local10.length - 1)].length] = _local8[_local2];
};
_local2++;
};
_local13 = 0;
while (_local13 < _local10.length) {
_local2 = 0;
while (_local2 < _local10[_local13].length) {
if ((((_local10[_local13][_local2] == "bigBowl")) || ((_local10[_local13][_local2] == "smallBowl")))){
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
_local12 = ((_local10[_local13][_local2])=="bigBowl") ? "big" : "small";
_local3++;
};
break;
};
_local2++;
};
if (_local12 == null){
} else {
_local2 = 0;
while (_local2 < _local10[_local13].length) {
if (_local10[_local13][_local2] == "cilantro"){
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
_local11 = getNoodle(pandasOnlyHand[_local3].panda.plate, _local12, (_local13 + 1));
_local11.cilantro.visible = true;
_local3++;
};
};
if (_local10[_local13][_local2] == "knife"){
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
_local11 = getNoodle(pandasOnlyHand[_local3].panda.plate, _local12, (_local13 + 1));
_local11.daomian.visible = true;
_local3++;
};
};
if (_local10[_local13][_local2] == "dough"){
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
_local11 = getNoodle(pandasOnlyHand[_local3].panda.plate, _local12, (_local13 + 1));
_local11.lamian.visible = true;
_local3++;
};
};
if ((((((((_local10[_local13][_local2] == "sauce1")) || ((_local10[_local13][_local2] == "sauce2")))) || ((_local10[_local13][_local2] == "sauce3")))) || ((_local10[_local13][_local2] == "sauce4")))){
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
_local11 = getNoodle(pandasOnlyHand[_local3].panda.plate, _local12, (_local13 + 1));
_local11.sauce.visible = true;
_local21 = _local10[_local13][_local2].split("sauce");
_local11.sauce.gotoAndStop(_local21[1]);
_local3++;
};
};
if (_local10[_local13][_local2] == "pork"){
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
_local11 = getNoodle(pandasOnlyHand[_local3].panda.plate, _local12, (_local13 + 1));
_local11.pork.visible = true;
_local3++;
};
};
if (_local10[_local13][_local2] == "chicken"){
_local3 = 0;
while (_local3 < pandasOnlyHand.length) {
_local11 = getNoodle(pandasOnlyHand[_local3].panda.plate, _local12, (_local13 + 1));
_local11.chicken.visible = true;
_local3++;
};
};
_local2++;
};
};
_local13++;
};
}
private function getRotation(_arg1, _arg2){
var _local3:Number;
if ((((_arg1 == obj.x)) && ((_arg2 == obj.y)))){
_local3 = obj.rotation;
} else {
_local3 = ((180 * Math.atan(((_arg2 - obj.y) / (_arg1 - obj.x)))) / Math.PI);
if (getXx((_arg1 - obj.x), (_arg2 - obj.y)) == 3){
_local3 = (_local3 - 180);
};
if (getXx((_arg1 - obj.x), (_arg2 - obj.y)) == 2){
_local3 = (_local3 + 180);
};
};
return (_local3);
}
private function getLoc(_arg1, _arg2){
var _local3:String;
if ((((((((_arg1 > p.p1.x)) && ((_arg1 < p.p2.x)))) && ((_arg2 > p.p1.y)))) && ((_arg2 < p.p2.y)))){
_local3 = "a";
};
if ((((((((_arg1 > p.p2.x)) && ((_arg1 < p.p3.x)))) && ((_arg2 > p.p3.y)))) && ((_arg2 < p.p2.y)))){
_local3 = "b";
};
if ((((((((_arg1 > p.p4.x)) && ((_arg1 < p.p3.x)))) && ((_arg2 > p.p4.y)))) && ((_arg2 < p.p3.y)))){
_local3 = "c";
};
if ((((((((_arg1 > p.p1.x)) && ((_arg1 < p.p4.x)))) && ((_arg2 > p.p4.y)))) && ((_arg2 < p.p1.y)))){
_local3 = "d";
};
return (_local3);
}
private function compareArr(_arg1, _arg2){
var _local3:Array;
var _local4:Array;
var _local5:uint;
var _local6:uint;
var _local7:Boolean;
_local3 = new Array();
_local4 = new Array();
_local7 = true;
_local5 = 0;
while (_local5 < _arg1.length) {
_local3[_local5] = _arg1[_local5];
_local5++;
};
_local5 = 0;
while (_local5 < _arg2.length) {
_local4[_local5] = _arg2[_local5];
_local5++;
};
_local5 = 0;
while (_local5 < _local3.length) {
if (_local7 == false){
break;
};
_local7 = false;
_local6 = 0;
while (_local6 < _local4.length) {
if (_local3[_local5] == _local4[_local6]){
_local7 = true;
};
_local6++;
};
_local5++;
};
if (_local3.length != _local4.length){
_local7 = false;
};
return (_local7);
}
public function setRNum(){
var _local1:uint;
var _local2:uint;
_local1 = 1;
_local2 = 0;
while (_local2 < jobsArr.length) {
if ((((((((jobsArr[_local2]["statusStr"] == "waiting")) || ((jobsArr[_local2]["statusStr"] == "loadingMoving")))) || ((jobsArr[_local2]["statusStr"] == "prevMoving")))) || ((jobsArr[_local2]["statusStr"] == "moving")))){
jobsArr[_local2]["obj"].num.visible = true;
jobsArr[_local2]["obj"].num.str.text = _local1.toString();
_local1++;
} else {
jobsArr[_local2]["obj"].num.visible = false;
};
_local2++;
};
}
private function getNoodle(_arg1, _arg2, _arg3){
var _local4:MovieClip;
if (_arg2 == "big"){
if (_arg3 == 1){
_local4 = _arg1.bigGuy1.bigNoodle;
};
if (_arg3 == 2){
_local4 = _arg1.bigGuy2.bigNoodle;
};
};
if (_arg2 == "small"){
if (_arg3 == 1){
_local4 = _arg1.bigGuy1.smallNoodle;
};
if (_arg3 == 2){
_local4 = _arg1.bigGuy2.smallNoodle;
};
};
return (_local4);
}
private function getLockSort(_arg1){
var _local2:String;
if ((((_arg1 == "a")) || ((_arg1 == "b")))){
_local2 = "bottom";
};
if ((((_arg1 == "c")) || ((_arg1 == "d")))){
_local2 = "top";
};
return (_local2);
}
public function addJob(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local7:Boolean;
_local7 = true;
if (_local7 == true){
checkEmpty();
p.p.x = _arg3;
p.p.y = _arg4;
jobsArr[jobsArr.length] = new Array();
jobsArr[(jobsArr.length - 1)]["statusStr"] = "waiting";
jobsArr[(jobsArr.length - 1)]["x"] = _arg3;
jobsArr[(jobsArr.length - 1)]["y"] = _arg4;
jobsArr[(jobsArr.length - 1)]["obj"] = _arg1;
jobsArr[(jobsArr.length - 1)]["locObj"] = _arg2;
jobsArr[(jobsArr.length - 1)]["rName"] = _arg6;
setRNum();
};
}
private function print_r(_arg1){
var _local2:String;
var _local3:uint;
var _local4:uint;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + (("[" + _local3) + "]"));
_local4 = 0;
while (_local4 < _arg1[_local3].length) {
_local2 = (_local2 + (_arg1[_local3][_local4] + ","));
_local4++;
};
_local3++;
};
p.str2.text = _local2;
}
private function getTargetPandaAndPandaOnlyHand(_arg1, _arg2){
var _local3:int;
var _local4:MovieClip;
var _local5:MovieClip;
_local3 = -1;
_local4 = targetPanda;
_local5 = targetPandaOnlyHand;
if ((((_arg1 == "a")) || ((_arg1 == "c")))){
if (obj.y < _arg2){
_local3 = 0;
} else {
_local3 = 1;
};
};
if ((((_arg1 == "b")) || ((_arg1 == "d")))){
if (obj.y < _arg2){
_local3 = 2;
} else {
_local3 = 3;
};
};
if (_local3 != -1){
_local4 = pandas[_local3];
_local5 = pandasOnlyHand[_local3];
};
return ([_local4, _local5, _local3]);
}
private function countS(_arg1, _arg2, _arg3, _arg4){
var _local5:Number;
_local5 = (Math.pow((_arg1 - _arg3), 2) + Math.pow((_arg2 - _arg4), 2));
return (Math.pow(_local5, 0.5));
}
private function checkThings(_arg1){
var _local2:*;
var _local3:*;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:Boolean;
_local3 = false;
if ((((_arg1 == "bigBowl")) || ((_arg1 == "smallBowl")))){
_local3 = false;
_local10 = false;
_local5 = 0;
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if ((((thingsOnThePlate[_local2] == "smallBowl")) || ((thingsOnThePlate[_local2] == "bigBowl")))){
_local5++;
};
if (thingsOnThePlate[_local2] == "tea"){
_local10 = true;
};
_local2++;
};
if ((((((_local5 < 2)) && ((_local10 == false)))) || ((((_local5 < 1)) && ((_local10 == true)))))){
_local3 = true;
};
};
if ((((_arg1 == "dough")) || ((_arg1 == "knife")))){
_local3 = false;
_local6 = 0;
_local5 = 0;
_local10 = false;
_local2 = 0;
while (_local2 < p.pots.length) {
if (p.pots[_local2].status == "free"){
_local3 = true;
};
_local2++;
};
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if ((((thingsOnThePlate[_local2] == "knife")) || ((thingsOnThePlate[_local2] == "dough")))){
_local6++;
};
if (thingsOnThePlate[_local2] == "tea"){
_local10 = true;
};
_local2++;
};
if (_local6 >= 2){
_local3 = false;
};
if ((((_local6 == 1)) && ((_local10 == true)))){
_local3 = false;
};
};
if (_arg1 == "chopsticks"){
_local3 = false;
_local4 = 0;
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if (thingsOnThePlate[_local2] == _arg1){
_local4++;
};
_local2++;
};
if (_local4 < 3){
_local3 = true;
};
};
if (_arg1 == "tea"){
_local3 = false;
_local4 = 0;
_local5 = 0;
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if (thingsOnThePlate[_local2] == _arg1){
_local4++;
};
if ((((thingsOnThePlate[_local2] == "bigBowl")) || ((thingsOnThePlate[_local2] == "smallBowl")))){
_local5++;
};
_local2++;
};
if ((((_local4 == 0)) && ((_local5 < 2)))){
_local3 = true;
};
};
if ((((((((((((((_arg1 == "cilantro")) || ((_arg1 == "chicken")))) || ((_arg1 == "pork")))) || ((_arg1 == "sauce1")))) || ((_arg1 == "sauce2")))) || ((_arg1 == "sauce3")))) || ((_arg1 == "sauce4")))){
_local3 = false;
_local2 = 0;
while (_local2 < thingsOnThePlate.length) {
if ((((thingsOnThePlate[_local2] == "bigBowl")) || ((thingsOnThePlate[_local2] == "smallBowl")))){
_local4 = 0;
};
_local2++;
};
if (_local4 == 0){
_local3 = true;
};
};
if ((((((((_arg1 == "bin")) || ((_arg1 == "guest1")))) || ((_arg1 == "guest2")))) || ((_arg1 == "guest3")))){
_local3 = true;
};
return (_local3);
}
private function doJobs(_arg1:Event){
var _local2:uint;
if (p.pauseFlag == false){
_local2 = 0;
while (_local2 < jobsArr.length) {
if ((((((jobsArr[_local2]["statusStr"] == "moving")) || ((jobsArr[_local2]["statusStr"] == "loadingMoving")))) || ((jobsArr[_local2]["statusStr"] == "prevDone")))){
break;
};
if (jobsArr[_local2]["statusStr"] == "prevMoving"){
statusStr = "moving";
addEventListener(Event.ENTER_FRAME, moving);
jobsArr[_local2]["statusStr"] = "moving";
break;
};
if (jobsArr[_local2]["statusStr"] == "waiting"){
if (stopPoints.length == 0){
stopPoints = getMiddlePoint(jobsArr[_local2]["x"], jobsArr[_local2]["y"]);
pointI = 0;
};
if ((((stopPoints.length > 0)) && ((stopPoints.length > pointI)))){
targetX = getNxs(sp[stopPoints[pointI]].x, 1);
targetY = getNxs(sp[stopPoints[pointI]].y, 1);
} else {
stopPoints = new Array();
pointI = 0;
targetX = getNxs(jobsArr[_local2]["x"], 1);
targetY = getNxs(jobsArr[_local2]["y"], 1);
};
oriX = obj.x;
oriY = obj.y;
targetI = _local2;
jobsArr[_local2]["statusStr"] = "prevMoving";
break;
};
_local2++;
};
};
}
private function deleteFromArrByValue(_arg1, _arg2){
var _local3:uint;
var _local4:Array;
_local4 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
_local4[_local3] = _arg1[_local3];
_local3++;
};
_local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3] == _arg2){
_local4[_local3] = "";
};
_local3++;
};
return (resetArr(_local4));
}
public function kill(){
removeEventListener(Event.ENTER_FRAME, doJobs);
removeEventListener(Event.ENTER_FRAME, moving);
}
private function getS1nS2(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local7:Number;
var _local8:Number;
_local7 = ((countS(obj.x, obj.y, sp[_arg1].x, sp[_arg1].y) + countS(sp[_arg1].x, sp[_arg1].y, sp[_arg2].x, sp[_arg2].y)) + countS(sp[_arg2].x, sp[_arg2].y, _arg5, _arg6));
_local8 = ((countS(obj.x, obj.y, sp[_arg3].x, sp[_arg3].y) + countS(sp[_arg3].x, sp[_arg3].y, sp[_arg4].x, sp[_arg4].y)) + countS(sp[_arg4].x, sp[_arg4].y, _arg5, _arg6));
return ([_local7, _local8]);
}
private function moving(_arg1:Event){
var _local2:Array;
var _local3:uint;
var _local4:Number;
var _local5:Number;
var _local6:String;
var _local7:uint;
if (p.pauseFlag == false){
_local3 = 4;
_local4 = (Math.cos(((Math.PI * getRotation(targetX, targetY)) / 180)) * _local3);
_local5 = (Math.sin(((Math.PI * getRotation(targetX, targetY)) / 180)) * _local3);
_local6 = loc;
_local7 = targetPandaNum;
loc = getLoc(obj.x, obj.y);
if ((countS(oriX, oriY, (obj.x + _local4), (obj.y + _local5)) - countS(oriX, oriY, targetX, targetY)) > 0){
if (p.animationControl.status == "free"){
obj.x = targetX;
obj.y = targetY;
p.objOnlyHand.x = targetX;
p.objOnlyHand.y = targetY;
if (stopPoints.length > 0){
jobsArr[targetI]["statusStr"] = "waiting";
pointI++;
} else {
if (targetI == (jobsArr.length - 1)){
statusStr = "free";
};
jobsArr[targetI]["statusStr"] = "done";
jobsArr[targetI]["obj"].num.visible = false;
setRNum();
_local2 = getTargetPandaAndPandaOnlyHand(((((loc == "a")) || ((loc == "c")))) ? "b" : "a", jobsArr[targetI]["locObj"].y);
targetPanda = _local2[0];
targetPandaOnlyHand = _local2[1];
targetPandaNum = _local2[2];
if (checkThings(jobsArr[targetI]["rName"]) == true){
addThingsOnThePlate(jobsArr[targetI]["rName"]);
switch (jobsArr[targetI]["rName"]){
case "chicken":
p.mkSound("chicken.mp3");
break;
case "tea":
p.mkSound("tea.mp3");
break;
case "dough":
case "knife":
p.mkSound("makingNoodles.mp3");
break;
case "pork":
p.mkSound("beef.mp3");
break;
case "sauce1":
case "sauce2":
case "sauce3":
case "sauce4":
break;
};
};
if ((((p.tutorialFlag == true)) && ((((((((((((((jobsArr[targetI]["rName"] == "smallBowl")) && ((((((p.tutorialControl.page == 2)) || ((p.tutorialControl.page == 9)))) || ((p.tutorialControl.page == 10)))))) || ((((jobsArr[targetI]["rName"] == "dough")) && ((((((p.tutorialControl.page == 3)) || ((p.tutorialControl.page == 11)))) || ((p.tutorialControl.page == 12)))))))) || ((((jobsArr[targetI]["rName"] == "sauce1")) && ((((((((p.tutorialControl.page == 5)) || ((p.tutorialControl.page == 14)))) || ((p.tutorialControl.page == 15)))) || ((p.tutorialControl.page == 16)))))))) || ((((jobsArr[targetI]["rName"] == "chopsticks")) && ((p.tutorialControl.page == 6)))))) || ((((jobsArr[targetI]["rName"] == "guest1")) && ((((p.tutorialControl.page == 7)) || ((p.tutorialControl.page == 8)))))))) || ((((jobsArr[targetI]["rName"] == "bin")) && ((p.tutorialControl.page == 19)))))))){
p.tutorialControl.nextPageMotion();
};
};
targetPanda.visible = true;
targetPandaOnlyHand.visible = true;
targetPanda.panda.gotoAndStop(1);
targetPandaOnlyHand.panda.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, moving);
};
} else {
if (p.animationControl.status == "free"){
_local2 = getTargetPandaAndPandaOnlyHand(loc, targetY);
targetPanda = _local2[0];
targetPandaOnlyHand = _local2[1];
targetPandaNum = _local2[2];
targetPanda.visible = true;
targetPanda.panda.play();
targetPandaOnlyHand.visible = true;
targetPandaOnlyHand.panda.play();
obj.x = (obj.x + _local4);
obj.y = (obj.y + _local5);
p.objOnlyHand.x = (p.objOnlyHand.x + _local4);
p.objOnlyHand.y = (p.objOnlyHand.y + _local5);
};
};
if (countVisiblePandas() > 1){
hideAllPandas(targetPanda);
};
if (((!((getLockSort(_local6) == getLockSort(loc)))) || (!((_local7 == targetPandaNum))))){
resetChildIndex(loc, targetPandaNum);
};
};
}
private function getNxs(_arg1, _arg2){
return ((int(((_arg1 * _arg2) * 10)) / 10));
}
private function getMiddlePoint(_arg1, _arg2){
var _local3:String;
var _local4:Array;
var _local5:Array;
_local3 = getLoc(_arg1, _arg2);
_local4 = new Array();
switch (loc){
case "a":
switch (_local3){
case "b":
_local4 = [2];
break;
case "c":
_local5 = getS1nS2(2, 3, 1, 4, _arg1, _arg2);
if (_local5[0] < _local5[1]){
_local4 = [2, 3];
} else {
_local4 = [1, 4];
};
break;
case "d":
_local4 = [1];
break;
};
break;
case "b":
switch (_local3){
case "c":
_local4 = [3];
break;
case "d":
_local5 = getS1nS2(3, 4, 2, 1, _arg1, _arg2);
if (_local5[0] < _local5[1]){
_local4 = [3, 4];
} else {
_local4 = [2, 1];
};
break;
case "a":
_local4 = [2];
break;
};
break;
case "c":
switch (_local3){
case "d":
_local4 = [4];
break;
case "a":
_local5 = getS1nS2(4, 1, 3, 2, _arg1, _arg2);
if (_local5[0] < _local5[1]){
_local4 = [4, 1];
} else {
_local4 = [3, 2];
};
break;
case "b":
_local4 = [3];
break;
};
break;
case "d":
switch (_local3){
case "a":
_local4 = [1];
break;
case "b":
_local5 = getS1nS2(1, 2, 4, 3, _arg1, _arg2);
if (_local5[0] < _local5[1]){
_local4 = [1, 2];
} else {
_local4 = [4, 3];
};
break;
case "c":
_local4 = [4];
break;
};
break;
};
return (_local4);
}
private function hideAllPandas(_arg1=null){
var _local2:uint;
_local2 = 0;
while (_local2 < pandas.length) {
if (_arg1 == pandas[_local2]){
} else {
pandas[_local2].visible = false;
pandas[_local2].panda.stop();
pandasOnlyHand[_local2].visible = false;
pandasOnlyHand[_local2].panda.stop();
};
_local2++;
};
}
private function resetChildIndex(_arg1, _arg2){
if ((((_arg1 == "a")) || ((_arg1 == "b")))){
if ((((_arg2 == 1)) || ((_arg2 == 2)))){
p.setChildIndex(p.desk, ((p.numChildren - 5) - 29));
p.setChildIndex(p.knife, ((p.numChildren - 4) - 29));
p.setChildIndex(p.dough, ((p.numChildren - 3) - 29));
p.setChildIndex(p.objOnlyHand, (p.numChildren - 29));
p.setChildIndex(obj, ((p.numChildren - 2) - 29));
} else {
p.setChildIndex(p.desk, ((p.numChildren - 5) - 29));
p.setChildIndex(p.knife, ((p.numChildren - 4) - 29));
p.setChildIndex(p.dough, ((p.numChildren - 3) - 29));
p.setChildIndex(p.objOnlyHand, ((p.numChildren - 2) - 29));
p.setChildIndex(obj, ((p.numChildren - 1) - 29));
};
};
if ((((_arg1 == "c")) || ((_arg1 == "d")))){
if ((((_arg2 == 1)) || ((_arg2 == 2)))){
p.setChildIndex(p.desk, ((p.numChildren - 4) - 29));
p.setChildIndex(p.knife, ((p.numChildren - 3) - 29));
p.setChildIndex(p.dough, ((p.numChildren - 2) - 29));
p.setChildIndex(p.objOnlyHand, (p.numChildren - 29));
p.setChildIndex(obj, ((p.numChildren - 5) - 29));
} else {
p.setChildIndex(p.desk, ((p.numChildren - 3) - 29));
p.setChildIndex(p.knife, ((p.numChildren - 2) - 29));
p.setChildIndex(p.dough, ((p.numChildren - 1) - 29));
p.setChildIndex(p.objOnlyHand, ((p.numChildren - 5) - 29));
p.setChildIndex(obj, ((p.numChildren - 4) - 29));
};
};
}
private function putChild(_arg1, _arg2){
_arg1.removeChild(_arg2);
_arg1.addChild(_arg2);
}
private function checkGuestRequest(_arg1, _arg2){
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:int;
var _local8:uint;
var _local9:uint;
var _local10:Array;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Array;
var _local14:Boolean;
var _local15:Array;
var _local16:Boolean;
var _local17:Array;
var _local18:Boolean;
_local10 = new Array();
_local11 = false;
_local12 = false;
_local13 = new Array();
_local14 = true;
_local3 = 0;
while (_local3 < _arg1.length) {
if ((((((((_arg1[_local3] == "dough")) || ((_arg1[_local3] == "knife")))) || ((_arg1[_local3] == "tea")))) || ((((((((_arg1[_local3] == "bigBowl")) || ((_arg1[_local3] == "smallBowl")))) && (!((_arg1[(_local3 - 1)] == "dough"))))) && (!((_arg1[(_local3 - 1)] == "knife"))))))){
_local13[_local13.length] = _local3;
_local10[_local10.length] = new Array();
};
if (_local10.length > 0){
_local10[(_local10.length - 1)][_local10[(_local10.length - 1)].length] = _arg1[_local3];
};
if (_arg1[_local3] == "chopsticks"){
_local8++;
};
if (_arg1[_local3] == "tea"){
_local12 = true;
};
_local3++;
};
_local3 = 0;
_local9 = 0;
while (_local3 < _arg2.length) {
_local4 = 0;
while (_local4 < _arg2[_local3].length) {
if (_arg2[_local3][_local4] == "chopsticks"){
_local9++;
};
_local4++;
};
_local3++;
};
_local15 = new Array();
_local3 = 0;
while (_local3 < _arg2.length) {
_local4 = 0;
while (_local4 < _local10.length) {
if (compareArr(deleteFromArrByValue(_arg2[_local3], "chopsticks"), _local10[_local4]) == true){
_local16 = true;
_local5 = 0;
while (_local5 < _local15.length) {
if ((((_local15[_local5][0] == _local3)) || ((_local15[_local5][1] == _local4)))){
_local16 = false;
};
_local5++;
};
if (_local16 == true){
_local15[_local15.length] = [_local3, _local4];
};
};
_local4++;
};
_local3++;
};
if (_arg2.length <= _local15.length){
_local11 = true;
};
if (_local8 < _local9){
_local11 = false;
};
if (_local11 == true){
_local17 = new Array();
_local3 = 0;
while (_local3 < (_local8 - _local9)) {
_local17[_local3] = "chopsticks";
_local3++;
};
_local7 = -1;
_local3 = 0;
while (_local3 < _arg1.length) {
if ((((((((_arg1[_local3] == "dough")) || ((_arg1[_local3] == "knife")))) || ((_arg1[_local3] == "tea")))) || ((((((((_arg1[_local3] == "bigBowl")) || ((_arg1[_local3] == "smallBowl")))) && (!((_arg1[(_local3 - 1)] == "dough"))))) && (!((_arg1[(_local3 - 1)] == "knife"))))))){
_local7++;
};
_local18 = true;
_local4 = 0;
while (_local4 < _local15.length) {
if (_local15[_local4][1] == _local7){
_local18 = false;
break;
};
_local4++;
};
if ((((_local7 > -1)) && ((_local18 == true)))){
_local17[_local17.length] = _arg1[_local3];
};
_local3++;
};
};
return ([_local11, _local17]);
}
private function checkSequence(_arg1){
var _local2:Array;
var _local3:uint;
_local2 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
if ((((((((_arg1[_local3] == "sauce1")) || ((_arg1[_local3] == "sauce2")))) || ((_arg1[_local3] == "sauce3")))) || ((_arg1[_local3] == "sauce4")))){
_local2[_local2.length] = 1;
};
if (_arg1[_local3] == "pork"){
_local2[_local2.length] = 2;
};
if (_arg1[_local3] == "chicken"){
_local2[_local2.length] = 2;
};
if (_arg1[_local3] == "cilantro"){
_local2[_local2.length] = 3;
};
_local3++;
};
return (_local2);
}
private function insertArr(_arg1, _arg2, _arg3){
var _local4:Array;
var _local5:uint;
_local4 = new Array();
_local5 = _arg1.length;
while (_local5 > (_arg2 + 1)) {
_arg1[_local5] = _arg1[(_local5 - 1)];
_local5--;
};
_arg1[(_arg2 + 1)] = _arg3;
return (_arg1);
}
public function get status(){
return (statusStr);
}
}
}//package
Section 144
//photos (photos)
package {
import flash.display.*;
public class photos extends Sprite {
public var multipleCredit:Number;// = 25
public var maxCredit:Number;// = 1000
private var objArr:Array;
private var credit:Number;
public function photos(_arg1){
maxCredit = 1000;
multipleCredit = 25;
super();
objArr = _arg1;
init();
}
private function init(){
var _local1:int;
var _local2:uint;
_local1 = (7 * (credit / maxCredit));
_local2 = 0;
while (_local2 < objArr.length) {
if (_local2 < _local1){
objArr[_local2].visible = true;
} else {
objArr[_local2].visible = false;
};
_local2++;
};
}
public function setCredit(_arg1){
credit = ((_arg1)>maxCredit) ? maxCredit : _arg1;
init();
}
}
}//package
Section 145
//promptPad (promptPad)
package {
import flash.display.*;
import flash.events.*;
public class promptPad extends Sprite {
private var SI:slideIn;
private var SU:slideOut;
private var p:Object;
private var num2button:Array;
private var obj:MovieClip;
public function promptPad(_arg1, _arg2){
p = _arg1;
obj = _arg2;
obj.visible = false;
p.maskObj.visible = false;
num2button = [obj.buttonsPad.ok, obj.buttonsPad.Yes, obj.buttonsPad.No, obj.buttonsPad.continueBtn, obj.buttonsPad.menuYes, obj.buttonsPad.menuNo];
obj.buttonsPad.ok.btn.addEventListener(MouseEvent.MOUSE_UP, buttonsPadOkEvent);
obj.buttonsPad.Yes.btn.addEventListener(MouseEvent.MOUSE_UP, buttonsPadYesEvent);
obj.buttonsPad.No.btn.addEventListener(MouseEvent.MOUSE_UP, buttonsPadNoEvent);
obj.buttonsPad.continueBtn.btn.addEventListener(MouseEvent.MOUSE_UP, levelComplete);
obj.buttonsPad.menuNo.btn.addEventListener(MouseEvent.MOUSE_UP, buttonsPadOkEvent);
obj.buttonsPad.menuYes.btn.addEventListener(MouseEvent.MOUSE_UP, backToIndex);
SI = new slideIn(obj, 160);
SU = new slideOut(obj, 578);
}
public function sendPrompt(_arg1, _arg2, _arg3){
var _local4:uint;
if (p.prompt.visa == false){
p.maskObj.visible = true;
SI.start();
};
initButtonsPad();
if (_arg2 == ""){
obj.str.y = ((21 + 59) / 2);
} else {
obj.str.y = 21;
obj.instructions.y = 59;
};
obj.str.text = _arg1;
obj.instructions.str.text = _arg2.toString();
_local4 = 0;
while (_local4 < _arg3.length) {
num2button[_arg3[_local4]].visible = true;
_local4++;
};
}
private function backToIndex(_arg1:MouseEvent){
p.endTheGame("startPad");
}
public function get visa(){
return (obj.visible);
}
private function buttonsPadYesEvent(_arg1:MouseEvent):void{
p.shopItemsArr[p.itemSelected].buyItem();
closePromptPad();
}
private function closePromptPad(){
p.maskObj.visible = false;
SU.start();
}
private function buttonsPadOkEvent(_arg1:MouseEvent):void{
closePromptPad();
}
private function initButtonsPad(){
var _local1:uint;
_local1 = 0;
while (_local1 < num2button.length) {
num2button[_local1].visible = false;
_local1++;
};
}
private function buttonsPadNoEvent(_arg1:MouseEvent):void{
closePromptPad();
}
private function levelComplete(_arg1:MouseEvent){
p.shop.openUp();
closePromptPad();
}
}
}//package
Section 146
//Q (Q)
package {
import flash.display.*;
import flash.events.*;
public class Q extends Sprite {
private var SI:slideIn;
private var SU:slideOut;
private var p:Object;
private var s:Object;
private var obj:MovieClip;
public function Q(_arg1, _arg2, _arg3, _arg4){
s = _arg1;
p = _arg2;
p.maskObj.visible = false;
obj = _arg3;
obj.y = 678;
obj.visible = false;
_arg4.addEventListener(MouseEvent.MOUSE_UP, openUp);
obj.closeButton.addEventListener(MouseEvent.MOUSE_UP, closeButtonEvent);
obj.lowButton.addEventListener(MouseEvent.MOUSE_UP, lowButtonEvent);
obj.mediumButton.addEventListener(MouseEvent.MOUSE_UP, mediumButtonEvent);
obj.highButton.addEventListener(MouseEvent.MOUSE_UP, highButtonEvent);
obj.bestButton.addEventListener(MouseEvent.MOUSE_UP, bestButtonEvent);
init();
SI = new slideIn(obj, 260);
SU = new slideOut(obj, 678);
}
private function bestButtonEvent(_arg1:MouseEvent){
obj.selectMc.y = obj.bestButton.y;
s.quality = StageQuality.BEST;
}
private function init(){
switch (s.quality.toString()){
case "LOW":
obj.selectMc.y = obj.lowButton.y;
break;
case "MEDIUM":
obj.selectMc.y = obj.mediumButton.y;
break;
case "HIGH":
obj.selectMc.y = obj.highButton.y;
break;
case "BEST":
obj.selectMc.y = obj.bestButton.y;
break;
};
}
public function get visa(){
return (obj.visible);
}
private function closeButtonEvent(_arg1:MouseEvent){
p.maskObj.visible = false;
SU.start();
}
private function highButtonEvent(_arg1:MouseEvent){
obj.selectMc.y = obj.highButton.y;
s.quality = StageQuality.HIGH;
}
private function openUp(_arg1:MouseEvent){
p.maskObj.visible = true;
SI.start();
}
private function lowButtonEvent(_arg1:MouseEvent){
obj.selectMc.y = obj.lowButton.y;
s.quality = StageQuality.LOW;
}
private function mediumButtonEvent(_arg1:MouseEvent){
obj.selectMc.y = obj.mediumButton.y;
s.quality = StageQuality.MEDIUM;
}
}
}//package
Section 147
//r1 (r1)
package {
import flash.display.*;
import flash.events.*;
public class r1 extends Sprite {
private var rName:String;
private var touchObj:Array;
private var loc:String;
private var p:Object;
private var locObj:MovieClip;
public var statusStr:String;
private var obj:MovieClip;
public function r1(_arg1, _arg2, _arg3){
p = _arg1;
rName = _arg2[0];
obj = _arg2[1];
touchObj = _arg2[2];
locObj = _arg2[3];
loc = _arg3;
statusStr = "free";
obj.num.visible = false;
openUp();
}
private function kdMotion(){
var _local1:Boolean;
_local1 = true;
if (p.tutorialFlag == true){
_local1 = false;
if ((((((((((((((rName == "smallBowl")) && ((((((p.tutorialControl.page == 2)) || ((p.tutorialControl.page == 9)))) || ((p.tutorialControl.page == 10)))))) || ((((rName == "dough")) && ((((((p.tutorialControl.page == 3)) || ((p.tutorialControl.page == 11)))) || ((p.tutorialControl.page == 12)))))))) || ((((rName == "sauce1")) && ((((((((((((p.tutorialControl.page == 5)) || ((p.tutorialControl.page == 14)))) || ((p.tutorialControl.page == 15)))) || ((p.tutorialControl.page == 16)))) || ((p.tutorialControl.page == 17)))) || ((p.tutorialControl.page == 18)))))))) || ((((rName == "chopsticks")) && ((p.tutorialControl.page == 6)))))) || ((((rName == "guest1")) && ((((p.tutorialControl.page == 7)) || ((p.tutorialControl.page == 8)))))))) || ((((rName == "bin")) && ((p.tutorialControl.page == 19)))))){
_local1 = true;
};
};
if (_local1 == true){
startDoJob();
};
}
private function kd(_arg1:MouseEvent){
if ((((((((p.pauseFlag == false)) && ((p.prompt.visa == false)))) && ((p.shop.visa == false)))) && (!((p.clock.currentFrame == p.clock.totalFrames))))){
kdMotion();
};
}
public function shutDown(){
var _local1:uint;
obj.visible = false;
touchObj.visible = false;
locObj.visible = false;
_local1 = 0;
while (_local1 < touchObj.length) {
touchObj[_local1].removeEventListener(MouseEvent.MOUSE_DOWN, kd);
_local1++;
};
}
public function openUp(){
var _local1:uint;
obj.visible = true;
if (((!((rName == "pot1"))) && (!((rName == "pot2"))))){
touchObj.visible = true;
locObj.visible = true;
_local1 = 0;
while (_local1 < touchObj.length) {
touchObj[_local1].addEventListener(MouseEvent.MOUSE_DOWN, kd);
_local1++;
};
};
}
public function kill(){
var _local1:uint;
_local1 = 0;
while (_local1 < touchObj.length) {
touchObj[_local1].removeEventListener(MouseEvent.MOUSE_DOWN, kd);
_local1++;
};
}
public function startDoJob(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
_local7 = new Array();
p.rSelected = rName;
_local5 = locObj.x;
_local6 = locObj.y;
switch (loc){
case "a":
_local2 = p.k12;
_local4 = p.b12;
break;
case "b":
_local2 = p.k23;
_local4 = p.b23;
break;
case "c":
_local2 = p.k34;
_local4 = p.b34;
break;
case "d":
_local2 = p.k41;
_local4 = p.b41;
break;
};
_local1 = (-1 / _local2);
_local3 = (_local6 - (_local1 * _local5));
_local7 = p.countJD(_local1, _local3, _local2, _local4);
p.fatPanda.addJob(obj, locObj, _local7[0], _local7[1], loc, rName);
}
}
}//package
Section 148
//rentou (rentou)
package {
import flash.display.*;
public class rentou extends Sprite {
private var statusArr:Array;
private var objArr:Array;
public function rentou(_arg1){
objArr = _arg1;
resetStatus();
init();
}
private function init(){
var _local1:uint;
_local1 = 0;
while (_local1 < objArr.length) {
objArr[_local1].gotoAndStop(statusArr[_local1]);
_local1++;
};
}
private function resetStatus(){
var _local1:uint;
statusArr = [];
_local1 = 0;
while (_local1 < objArr.length) {
statusArr[_local1] = 1;
_local1++;
};
}
public function checkAllDead(){
var _local1:uint;
var _local2:Boolean;
_local2 = true;
_local1 = 0;
while (_local1 < statusArr.length) {
if (statusArr[_local1] == 1){
_local2 = false;
break;
};
_local1++;
};
return (_local2);
}
public function oneManDie(){
var _local1:uint;
_local1 = 0;
while (_local1 < statusArr.length) {
if (statusArr[_local1] == 1){
statusArr[_local1] = 2;
break;
};
_local1++;
};
init();
}
}
}//package
Section 149
//request (request)
package {
import flash.display.*;
public class request extends Sprite {
private var p:Object;
private var guestNum:uint;
public var fullNoodle:Array;
private var afn:appearFullNoodle;
private var obj:MovieClip;
public function request(_arg1, _arg2, _arg3){
p = _arg1;
obj = _arg2;
guestNum = _arg3;
afn = new appearFullNoodle(obj);
}
public function hide(_arg1){
var _local2:Number;
_local2 = (p.credit + ((p.photosControl.maxCredit * (p.guestArr[(guestNum - 1)].existTime / p.guestArr[(guestNum - 1)].maxExistTime)) / p.photosControl.multipleCredit));
p.setCredit(_local2);
p.guestArr[(guestNum - 1)].hide("happy", _arg1);
}
public function set visa(_arg1){
obj.visible = _arg1;
}
public function formANoodle(){
var _local1:Array;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Array;
var _local6:Array;
var _local7:Array;
var _local8:Array;
var _local9:Boolean;
var _local10:Boolean;
var _local11:uint;
var _local12:uint;
var _local13:Boolean;
_local1 = [obj.bigGuy1, obj.bigGuy2];
_local9 = false;
_local10 = false;
_local8 = new Array();
_local5 = ["smallBowl"];
_local6 = ["dough"];
_local7 = [1];
if (p.shopItemsArr["bigBowl"].itemStatus == "sold"){
_local5[_local5.length] = "bigBowl";
};
if (p.shopItemsArr["knife"].itemStatus == "sold"){
_local6[_local6.length] = "knife";
};
if (p.shopItemsArr["sauce2"].itemStatus == "sold"){
_local7[_local7.length] = 2;
};
if (p.shopItemsArr["sauce3"].itemStatus == "sold"){
_local7[_local7.length] = 3;
};
if (p.shopItemsArr["sauce4"].itemStatus == "sold"){
_local7[_local7.length] = 4;
};
if (p.shopItemsArr["chicken"].itemStatus == "sold"){
_local8[_local8.length] = "chicken";
};
if (p.shopItemsArr["pork"].itemStatus == "sold"){
_local8[_local8.length] = "pork";
};
if (p.shopItemsArr["cilantro"].itemStatus == "sold"){
_local10 = true;
};
_local11 = 1;
if (Math.random() < 0.5){
_local11 = 2;
};
if ((((_local11 == 1)) && ((p.shopItemsArr["tea"].itemStatus == "sold")))){
_local9 = true;
};
fullNoodle = new Array();
_local2 = int((Math.random() * _local7.length));
_local12 = _local7[_local2];
_local4 = 0;
while (_local4 < _local11) {
_local13 = false;
fullNoodle[_local4] = new Array();
fullNoodle[_local4][fullNoodle[_local4].length] = _local5[int((Math.random() * _local5.length))];
fullNoodle[_local4][fullNoodle[_local4].length] = _local6[int((Math.random() * _local6.length))];
if ((((_local8.length > 0)) && ((Math.random() < 0.8)))){
fullNoodle[_local4][fullNoodle[_local4].length] = _local8[int((Math.random() * _local8.length))];
_local13 = true;
};
if ((((_local10 == true)) && ((Math.random() < 0.8)))){
fullNoodle[_local4][fullNoodle[_local4].length] = "cilantro";
_local13 = true;
};
if (Math.random() < 0.8){
if (_local13 == false){
_local12 = _local7[int((Math.random() * _local7.length))];
};
fullNoodle[_local4][fullNoodle[_local4].length] = ("sauce" + _local12.toString());
};
if (Math.random() < 0.8){
fullNoodle[_local4][fullNoodle[_local4].length] = "chopsticks";
};
_local4++;
};
if ((((_local9 == true)) && ((Math.random() < 0.8)))){
fullNoodle[fullNoodle.length] = new Array();
fullNoodle[(fullNoodle.length - 1)][fullNoodle[(fullNoodle.length - 1)].length] = "tea";
};
if ((((p.tutorialFlag == true)) && ((guestNum == 1)))){
fullNoodle = new Array();
fullNoodle[0] = ["smallBowl", "dough", "sauce1", "chopsticks"];
};
if ((((p.tutorialFlag == true)) && ((guestNum == 2)))){
fullNoodle = new Array();
fullNoodle = [["smallBowl", "dough", "sauce1"], ["smallBowl", "dough"]];
};
afn.start(fullNoodle);
}
public function destroy(){
fullNoodle = new Array();
}
}
}//package
Section 150
//shopItem (shopItem)
package {
import flash.display.*;
import flash.events.*;
public class shopItem extends Sprite {
private var itemName:String;
private var btn:SimpleButton;
private var p:Object;
public var itemStatus:String;
private var obj:MovieClip;
private var itemPrice:Number;
public function shopItem(_arg1, _arg2, _arg3, _arg4, _arg5="onSale"){
p = _arg1;
obj = _arg2;
btn = _arg3;
itemName = _arg4;
itemPrice = getItemPrice(itemName);
setItemPrice(itemPrice);
itemStatus = _arg5;
if (itemStatus == "onSale"){
obj.mark.soldMark.visible = false;
btn.addEventListener(MouseEvent.MOUSE_DOWN, md);
btn.addEventListener(MouseEvent.MOUSE_OVER, mOver);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
} else {
obj.mark.soldMark.visible = true;
};
}
private function promptFollow(_arg1:Event){
if (p.shopMc.mouseX < 60){
p.shopMc.shopPrompt.x = 60;
} else {
if (p.shopMc.mouseX > 520){
p.shopMc.shopPrompt.x = 520;
} else {
p.shopMc.shopPrompt.x = p.shopMc.mouseX;
};
};
p.shopMc.shopPrompt.y = p.shopMc.mouseY;
}
private function getItemPrice(_arg1){
var _local2:Number;
var _local3:Number;
switch (_arg1){
case "pot2":
_local2 = p.buyTxt.infomation[0];
break;
case "knife":
_local2 = p.buyTxt.infomation[1];
break;
case "bigBowl":
_local2 = p.buyTxt.infomation[2];
break;
case "chicken":
_local2 = p.buyTxt.infomation[3];
break;
case "pork":
_local2 = p.buyTxt.infomation[4];
break;
case "sauce1":
_local2 = p.buyTxt.infomation[5];
break;
case "sauce2":
_local2 = p.buyTxt.infomation[6];
break;
case "sauce3":
_local2 = p.buyTxt.infomation[7];
break;
case "sauce4":
_local2 = p.buyTxt.infomation[8];
break;
case "tea":
_local2 = p.buyTxt.infomation[9];
break;
case "cilantro":
_local2 = p.buyTxt.infomation[10];
break;
};
_local3 = (_local2 / 10);
_local2 = ((_local2 + (Math.random() * _local3)) - (Math.random() * _local3));
return (int(_local2));
}
private function getRealItemName(_arg1){
var _local2:String;
switch (_arg1){
case "pot2":
_local2 = "cooking pot";
break;
case "knife":
_local2 = "dagger noodles";
break;
case "bigBowl":
_local2 = "big bowl";
break;
case "chicken":
_local2 = "chicken";
break;
case "pork":
_local2 = "beaf";
break;
case "sauce1":
_local2 = "cilli sauce";
break;
case "sauce2":
_local2 = "pickle sauce";
break;
case "sauce3":
_local2 = "pepper sauce";
break;
case "sauce4":
_local2 = "tomato sauce";
break;
case "tea":
_local2 = "tea";
break;
case "cilantro":
_local2 = "bok choy";
break;
};
return (_local2);
}
private function md(_arg1:MouseEvent){
if ((((itemStatus == "onSale")) && ((obj.currentFrame == 1)))){
p.itemSelected = itemName;
p.mkSound("clickingObjects.mp3");
if (p.score < itemPrice){
p.prompt.sendPrompt("Not Enough Money!", ((("you have: $" + p.score) + "\ryou require: $") + itemPrice), [0]);
} else {
p.prompt.sendPrompt("Buy It!\rAre You Sure?", " ", [1, 2]);
};
};
}
private function mOut(_arg1:MouseEvent){
removeEventListener(Event.ENTER_FRAME, promptFollow);
p.shopMc.shopPrompt.visible = false;
}
public function buyItem(){
obj.mark.soldMark.visible = true;
obj.mark.pricePad.visible = false;
obj.mark.priceBgPad.visible = false;
itemStatus = "sold";
p.setPad((p.score - itemPrice), p.level);
obj.removeEventListener(MouseEvent.MOUSE_DOWN, md);
}
private function setItemPrice(_arg1){
itemPrice = _arg1;
obj.mark.pricePad.text = ("$" + itemPrice.toString());
obj.mark.pricePad.visible = true;
}
private function mOver(_arg1:MouseEvent){
if (itemStatus == "onSale"){
p.shopMc.shopPrompt.visible = true;
p.shopMc.shopPrompt.str.text = ("Item On Sale:\r" + getRealItemName(itemName));
addEventListener(Event.ENTER_FRAME, promptFollow);
};
}
}
}//package
Section 151
//slideIn (slideIn)
package {
import flash.display.*;
import flash.events.*;
public class slideIn extends Sprite {
private var speed:Number;
private var countTime:uint;
private var targetY:Number;
private var obj:MovieClip;
public function slideIn(_arg1, _arg2){
obj = _arg1;
obj.visible = false;
targetY = _arg2;
speed = 5;
}
public function start(){
obj.visible = true;
addEventListener(Event.ENTER_FRAME, showUp);
}
private function afterShowUp(_arg1:Event){
if (obj.y >= targetY){
obj.y = targetY;
removeEventListener(Event.ENTER_FRAME, afterShowUp);
} else {
obj.y = (obj.y + (speed * speed));
speed = (speed - 0.5);
};
}
private function showUp(_arg1:Event){
if (obj.y <= (targetY - 10)){
obj.y = (targetY - 10);
speed = 5;
removeEventListener(Event.ENTER_FRAME, showUp);
addEventListener(Event.ENTER_FRAME, afterShowUp);
} else {
obj.y = (obj.y - (speed * speed));
speed = (speed + 0.25);
};
}
}
}//package
Section 152
//slideOut (slideOut)
package {
import flash.display.*;
import flash.events.*;
public class slideOut extends Sprite {
private var oriY:Number;
private var speed:Number;
private var countTime:uint;
private var targetY:Number;
private var obj:MovieClip;
public function slideOut(_arg1, _arg2){
obj = _arg1;
targetY = _arg2;
speed = 5;
obj.visible = false;
}
public function start(){
oriY = obj.y;
obj.visible = true;
addEventListener(Event.ENTER_FRAME, prevShutDown);
}
private function shutDown(_arg1:Event){
if (obj.y >= targetY){
obj.y = targetY;
obj.visible = false;
removeEventListener(Event.ENTER_FRAME, shutDown);
} else {
obj.y = (obj.y + (speed * speed));
speed = (speed + 0.5);
};
}
private function prevShutDown(_arg1:Event){
if (obj.y <= (oriY - 10)){
obj.y = (oriY - 10);
speed = 5;
removeEventListener(Event.ENTER_FRAME, prevShutDown);
addEventListener(Event.ENTER_FRAME, shutDown);
} else {
obj.y = (obj.y - (speed * speed));
speed = (speed - 0.5);
};
}
}
}//package
Section 153
//smartGuard (smartGuard)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.errors.*;
public class smartGuard extends MovieClip {
private var loader:URLLoader;
private var selfURL:String;
public function smartGuard(_arg1:String):void{
var url = _arg1;
super();
stop();
selfURL = url;
if (selfURL.substr(0, 7) != "file://"){
try {
loader = new URLLoader();
loader.load(new URLRequest("http://www.freeworldgroup.com/sites.xml"));
loader.addEventListener(Event.COMPLETE, loading);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
} catch(e:IOError) {
trace(e);
} catch(e:SecurityError) {
trace(e);
};
} else {
play();
};
}
function loading(_arg1:Event):void{
var _local2:Boolean;
var _local3:XML;
var _local4:String;
_local2 = false;
_local3 = new XML();
_local3.ignoreWhite = true;
_local3 = XML(loader.data);
for (_local4 in _local3.url) {
if (isIn(_local3.url[_local4].toString()) == true){
go2HomePage();
_local2 = true;
break;
};
};
if (_local2 == false){
play();
};
}
private function getRequest(){
var _local1:String;
var _local2:URLRequest;
var _local3:URLVariables;
_local1 = "http://www.freeworldgroup.com";
_local2 = new URLRequest(_local1);
_local3 = new URLVariables();
_local3.url = selfURL;
_local2.data = _local3;
return (_local2);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
trace(("ioErrorHandler: " + _arg1));
}
private function go2HomePage():void{
try {
navigateToURL(getRequest(), "_self");
} catch(e:SecurityError) {
navigateToURL(getRequest(), "_blank");
} catch(e:IOError) {
trace(e);
};
}
private function isIn(_arg1:String):Boolean{
var _local2:Boolean;
var _local3:uint;
_local2 = false;
_local3 = 0;
while (_local3 < (selfURL.length - _arg1.length)) {
if (selfURL.substr(_local3, _arg1.length) == _arg1){
_local2 = true;
};
_local3++;
};
return (_local2);
}
}
}//package
Section 154
//soundControl (soundControl)
package {
import flash.display.*;
import flash.events.*;
public class soundControl extends Sprite {
private var type:String;
private var banObj:SimpleButton;
private var p:Object;
private var obj:SimpleButton;
public function soundControl(_arg1, _arg2, _arg3, _arg4){
p = _arg1;
type = _arg2;
obj = _arg3;
banObj = _arg4;
banObj.visible = false;
obj.addEventListener(MouseEvent.MOUSE_UP, btnControl);
banObj.addEventListener(MouseEvent.MOUSE_UP, btnControl);
}
public function get flag(){
return (!(banObj.visible));
}
private function btnControl(_arg1:MouseEvent){
if (type == "sound"){
p.soundFlag = !(p.soundFlag);
};
if (type == "music"){
p.musicFlag = !(p.musicFlag);
if (p.musicFlag == false){
p.bgSound.stop();
} else {
if (p.bgSound){
p.bgSound = p.mkSound("bgSound.mp3", 0.1, 100);
};
};
};
banObj.visible = !(banObj.visible);
}
}
}//package
Section 155
//tutorial (tutorial)
package {
import flash.display.*;
import flash.events.*;
public class tutorial extends Sprite {
private var skipTutorialBtn:SimpleButton;
private var guideObj:MovieClip;
private var padObj:MovieClip;
private var p:Object;
public var page:uint;
public function tutorial(_arg1, _arg2, _arg3, _arg4){
skipTutorialBtn = _arg4;
p = _arg1;
padObj = _arg2;
guideObj = _arg3;
padObj.visible = false;
guideObj.visible = false;
skipTutorialBtn.visible = false;
page = 0;
initPad(page);
padObj.btn.addEventListener(MouseEvent.MOUSE_UP, nextPage);
skipTutorialBtn.addEventListener(MouseEvent.MOUSE_UP, skipTutorial);
}
private function nextPage(_arg1:MouseEvent){
nextPageMotion();
}
private function initPad(_arg1){
padObj.str.text = tutorialText(_arg1)[0];
switch (tutorialText(_arg1)[1]){
case 2:
padObj.bgPad.height = 78;
break;
case 3:
padObj.bgPad.height = 100;
break;
case 4:
padObj.bgPad.height = 120;
break;
case 5:
padObj.bgPad.height = 140;
break;
case 6:
padObj.bgPad.height = 165;
break;
};
padObj.btn.y = ((padObj.bgPad.height - 25.6) - (tutorialText(_arg1)[1] * 2));
switch (_arg1){
case 2:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 160;
guideObj.y = 158;
break;
case 3:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 360;
guideObj.y = 238;
break;
case 5:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 490;
guideObj.y = 280;
break;
case 6:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 345;
guideObj.y = 320;
break;
case 7:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 80;
guideObj.y = 230;
break;
case 8:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 135;
guideObj.y = 200;
break;
case 9:
case 10:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 160;
guideObj.y = 158;
break;
case 11:
case 12:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 360;
guideObj.y = 238;
break;
case 14:
case 15:
case 16:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 490;
guideObj.y = 280;
break;
case 18:
padObj.btn.visible = true;
p.r["chopsticks"].startDoJob();
break;
case 19:
padObj.btn.visible = false;
guideObj.visible = true;
guideObj.x = 453;
guideObj.y = 202;
break;
default:
padObj.btn.visible = true;
guideObj.visible = false;
break;
};
}
private function endTutorial(){
shutDown();
p.tutorialFlag = false;
p.killAll();
p.init();
}
public function shutDown(){
skipTutorialBtn.visible = false;
padObj.visible = false;
guideObj.visible = false;
}
public function nextPageMotion(){
if (page < 22){
page++;
initPad(page);
} else {
endTutorial();
};
}
public function openUp(){
skipTutorialBtn.visible = true;
padObj.visible = true;
}
private function tutorialText(_arg1){
var _local2:String;
var _local3:uint;
switch (_arg1){
case 0:
_local2 = "Welcome to the Panda Noodle Shop!\r\rLet's take you through the basics of running a noodle shop!";
_local3 = 6;
break;
case 1:
_local2 = "Customers will come in and ask for different noodle dishes.";
_local3 = 3;
break;
case 2:
_local2 = "First click on the bowl for the dish.";
_local3 = 2;
break;
case 3:
_local2 = "Now click on the noodles the customer wants.";
_local3 = 2;
break;
case 4:
_local2 = "Great, you've just cooked the noodles for your first customer.";
_local3 = 3;
break;
case 5:
_local2 = "The customer wants a chilli sauce, so click on the sauce to add it to the dish.";
_local3 = 4;
break;
case 6:
_local2 = "Great! The customer needs 1 set of chopsticks, click on them now!";
_local3 = 4;
break;
case 7:
_local2 = "Done! Now click on the customer to complete the order!";
_local3 = 3;
break;
case 8:
_local2 = "Fantastic! Click on the money to collect it!";
_local3 = 2;
break;
case 9:
case 10:
_local2 = "We'll now try filling an order with 2 bowls.\r\rClick the bowls twice!";
_local3 = 4;
break;
case 11:
case 12:
_local2 = "Now cook the noodles for both bowls (click noodles twice).";
_local3 = 3;
break;
case 13:
_local2 = "Great going! OK, time to add the sauce - only one bowl requires sauce.";
_local3 = 3;
break;
case 14:
case 15:
case 16:
_local2 = "By clicking the sauce several times, it will appear and disappear from each bowl.\r\rDo that now.";
_local3 = 6;
break;
case 17:
_local2 = "This will allow you to get the sauce in the right bowl.";
_local3 = 3;
break;
case 18:
_local2 = "You can do this for any other ingredient added to your noodles!";
_local3 = 3;
break;
case 19:
_local2 = "Great going! If you make a mistake you can dump any items on your tray in the trash.";
_local3 = 4;
break;
case 20:
_local2 = "As the game progresses, you can buy new items to sell and upgrade existing things.";
_local3 = 4;
break;
case 21:
_local2 = "Serve your customers well, as your reputation will be affected if too many customers get upset.";
_local3 = 5;
break;
case 22:
_local2 = "The better you serve, the more money you will make!\r\rGood luck and happy noodling!";
_local3 = 6;
break;
};
return ([_local2, _local3]);
}
private function skipTutorial(_arg1:MouseEvent){
endTutorial();
}
}
}//package
Section 156
//Txt1 (Txt1)
package {
import ui.*;
public dynamic class Txt1 extends Txt {
}
}//package