Section 1
//audio_7 (natatoriun_fla.audio_7)
package natatoriun_fla {
import flash.display.*;
public dynamic class audio_7 extends MovieClip {
public var audioCricle:MovieClip;
}
}//package natatoriun_fla
Section 2
//games2girls_13 (natatoriun_fla.games2girls_13)
package natatoriun_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class games2girls_13 extends MovieClip {
public var games2girls_button:SimpleButton;
public var request;
public function games2girls_13(){
addFrameScript(0, frame1);
}
function frame1(){
request = new URLRequest("http://www.games2girls.com/");
games2girls_button.addEventListener(MouseEvent.MOUSE_DOWN, g2gMouseDownHandler);
}
public function g2gMouseDownHandler(_arg1:MouseEvent):void{
navigateToURL(request, "_blank");
}
}
}//package natatoriun_fla
Section 3
//M_41 (natatoriun_fla.M_41)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_41 extends MovieClip {
public var feedbtn:SimpleButton;
public function M_41(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 4
//M_44 (natatoriun_fla.M_44)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_44 extends MovieClip {
public var surfbtn:SimpleButton;
public function M_44(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 5
//M_47 (natatoriun_fla.M_47)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_47 extends MovieClip {
public var sunbtn:SimpleButton;
public function M_47(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 6
//M_50 (natatoriun_fla.M_50)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_50 extends MovieClip {
public var bootbtn:SimpleButton;
public function M_50(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 7
//M_53 (natatoriun_fla.M_53)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_53 extends MovieClip {
public var divebtn:SimpleButton;
public function M_53(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 8
//M_56 (natatoriun_fla.M_56)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_56 extends MovieClip {
public var sandbtn:SimpleButton;
public function M_56(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 9
//M_59 (natatoriun_fla.M_59)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_59 extends MovieClip {
public var motorbtn:SimpleButton;
public function M_59(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 10
//M_62 (natatoriun_fla.M_62)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_62 extends MovieClip {
public var chairbtn:SimpleButton;
public function M_62(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 11
//M_65 (natatoriun_fla.M_65)
package natatoriun_fla {
import flash.display.*;
public dynamic class M_65 extends MovieClip {
public var swimbtn:SimpleButton;
public function M_65(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 12
//quality_6 (natatoriun_fla.quality_6)
package natatoriun_fla {
import flash.display.*;
public dynamic class quality_6 extends MovieClip {
public function quality_6(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 13
//Timeline_10 (natatoriun_fla.Timeline_10)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_10 extends MovieClip {
public function Timeline_10(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 14
//Timeline_103 (natatoriun_fla.Timeline_103)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_103 extends MovieClip {
public var sand:MovieClip;
}
}//package natatoriun_fla
Section 15
//Timeline_108 (natatoriun_fla.Timeline_108)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_108 extends MovieClip {
public var sand:MovieClip;
}
}//package natatoriun_fla
Section 16
//Timeline_24 (natatoriun_fla.Timeline_24)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_24 extends MovieClip {
public var taiyan:MovieClip;
public function Timeline_24(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 17
//Timeline_25 (natatoriun_fla.Timeline_25)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_25 extends MovieClip {
public function Timeline_25(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 18
//Timeline_254 (natatoriun_fla.Timeline_254)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_254 extends MovieClip {
public var tishi:MovieClip;
public var time:MovieClip;
public function Timeline_254(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package natatoriun_fla
Section 19
//Timeline_255 (natatoriun_fla.Timeline_255)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_255 extends MovieClip {
public var time_flow:MovieClip;
public function Timeline_255(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
time_flow.gotoAndPlay(1);
}
function frame1(){
stop();
}
function frame4(){
stop();
time_flow.gotoAndPlay(1);
}
function frame2(){
stop();
time_flow.gotoAndPlay(1);
MovieClip(this.parent).visible = true;
}
}
}//package natatoriun_fla
Section 20
//Timeline_257 (natatoriun_fla.Timeline_257)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_257 extends MovieClip {
public function Timeline_257(){
addFrameScript(0, frame1, 8, frame9);
}
function frame1(){
play();
trace("-----------------");
}
function frame9(){
stop();
MovieClip(this.parent).gotoAndStop(4);
}
}
}//package natatoriun_fla
Section 21
//Timeline_258 (natatoriun_fla.Timeline_258)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_258 extends MovieClip {
public function Timeline_258(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
trace(this.parent.parent.name);
MovieClip(this.parent.parent).visible = false;
}
}
}//package natatoriun_fla
Section 22
//Timeline_26 (natatoriun_fla.Timeline_26)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_26 extends MovieClip {
public function Timeline_26(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 23
//Timeline_260 (natatoriun_fla.Timeline_260)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_260 extends MovieClip {
public function Timeline_260(){
addFrameScript(342, frame343);
}
function frame343(){
stop();
MovieClip(this.parent).gotoAndStop(3);
}
}
}//package natatoriun_fla
Section 24
//Timeline_261 (natatoriun_fla.Timeline_261)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_261 extends MovieClip {
public function Timeline_261(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 25
//Timeline_262 (natatoriun_fla.Timeline_262)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_262 extends MovieClip {
public function Timeline_262(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 26
//Timeline_263 (natatoriun_fla.Timeline_263)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_263 extends MovieClip {
public function Timeline_263(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 27
//Timeline_264 (natatoriun_fla.Timeline_264)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_264 extends MovieClip {
public function Timeline_264(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 28
//Timeline_265 (natatoriun_fla.Timeline_265)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_265 extends MovieClip {
public function Timeline_265(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 29
//Timeline_266 (natatoriun_fla.Timeline_266)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_266 extends MovieClip {
public function Timeline_266(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 30
//Timeline_267 (natatoriun_fla.Timeline_267)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_267 extends MovieClip {
public function Timeline_267(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 31
//Timeline_268 (natatoriun_fla.Timeline_268)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_268 extends MovieClip {
public function Timeline_268(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 32
//Timeline_269 (natatoriun_fla.Timeline_269)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_269 extends MovieClip {
public function Timeline_269(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 33
//Timeline_271 (natatoriun_fla.Timeline_271)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_271 extends MovieClip {
public function Timeline_271(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 34
//Timeline_30 (natatoriun_fla.Timeline_30)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_30 extends MovieClip {
public function Timeline_30(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 35
//Timeline_31 (natatoriun_fla.Timeline_31)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_31 extends MovieClip {
public function Timeline_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 36
//Timeline_315 (natatoriun_fla.Timeline_315)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_315 extends MovieClip {
public var buoybtn:SimpleButton;
public function Timeline_315(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 37
//Timeline_319 (natatoriun_fla.Timeline_319)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_319 extends MovieClip {
public var motorbtn:SimpleButton;
public function Timeline_319(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 38
//Timeline_321 (natatoriun_fla.Timeline_321)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_321 extends MovieClip {
public var chairbtn:SimpleButton;
public function Timeline_321(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 39
//Timeline_323 (natatoriun_fla.Timeline_323)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_323 extends MovieClip {
public var surfbtn:SimpleButton;
public function Timeline_323(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 40
//Timeline_325 (natatoriun_fla.Timeline_325)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_325 extends MovieClip {
public var banbtn:SimpleButton;
public function Timeline_325(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 41
//Timeline_328 (natatoriun_fla.Timeline_328)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_328 extends MovieClip {
public var palmbtn:SimpleButton;
public function Timeline_328(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 42
//Timeline_331 (natatoriun_fla.Timeline_331)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_331 extends MovieClip {
public var blanketbtn:SimpleButton;
public function Timeline_331(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 43
//Timeline_334 (natatoriun_fla.Timeline_334)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_334 extends MovieClip {
public var beacombtn:SimpleButton;
public function Timeline_334(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package natatoriun_fla
Section 44
//Timeline_35 (natatoriun_fla.Timeline_35)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_35 extends MovieClip {
public var feedbtn:MovieClip;
public var boybtn:MovieClip;
public var bootbtn:MovieClip;
public var btn_shadow2:MovieClip;
public var btn0:SimpleButton;
public var sandbtn:MovieClip;
public var chairbtn:MovieClip;
public var sunbtn:MovieClip;
public var surfbtn:MovieClip;
public var motorbtn:MovieClip;
public var swimbtn:MovieClip;
public var divebtn:MovieClip;
}
}//package natatoriun_fla
Section 45
//Timeline_68 (natatoriun_fla.Timeline_68)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_68 extends MovieClip {
public function Timeline_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 46
//Timeline_72 (natatoriun_fla.Timeline_72)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_72 extends MovieClip {
public var sand:MovieClip;
}
}//package natatoriun_fla
Section 47
//Timeline_89 (natatoriun_fla.Timeline_89)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_89 extends MovieClip {
public function Timeline_89(){
addFrameScript(171, frame172);
}
function frame172(){
stop();
}
}
}//package natatoriun_fla
Section 48
//Timeline_93 (natatoriun_fla.Timeline_93)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_93 extends MovieClip {
public var sand:MovieClip;
}
}//package natatoriun_fla
Section 49
//Timeline_98 (natatoriun_fla.Timeline_98)
package natatoriun_fla {
import flash.display.*;
public dynamic class Timeline_98 extends MovieClip {
public var sand:MovieClip;
}
}//package natatoriun_fla
Section 50
//z_338 (natatoriun_fla.z_338)
package natatoriun_fla {
import flash.display.*;
public dynamic class z_338 extends MovieClip {
public function z_338(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package natatoriun_fla
Section 51
//chair (chair)
package {
import flash.display.*;
public dynamic class chair extends MovieClip {
}
}//package
Section 52
//diving (diving)
package {
import flash.display.*;
public dynamic class diving extends MovieClip {
}
}//package
Section 53
//feed (feed)
package {
import flash.display.*;
public dynamic class feed extends MovieClip {
}
}//package
Section 54
//gameInterFace (gameInterFace)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
public class gameInterFace extends MovieClip {
public var moneyText:TextField;
var doHelpEventFlag;// = false
var gusetTimeNum;// = 0
var dosurfFlag;// = false
var liftGuardBtnFlag;// = false
var leaveEventFlag;// = false
var baseScore;// = 10
var playBtn0Flag;// = false
var guestChildArray2;
var guesTimeEventDoArray:Array;
var LeaveEventNum;// = 0
var guestChildArray9;
var moreScore;// = 10
public var btn_shadow:MovieClip;
var addGuestNum;// = 0
var guardB:leftguard;
var guestColor:int;
var aimscore:int;
public var menuBtn:SimpleButton;
var establishmentArray:Array;
var guestNum;// = 0
var guesTimeNumArray:Array;
var nowMaxScore:int;
var guestChildArray;
var dodchairFlag;// = false
var guessArray:Array;
var menuIF:menu;
public var shu:MovieClip;
var leaveTimeNum;// = 0
public var scoreText:TextField;
var waiter:waiter_girl;
var startguestNum;// = 0
public var ditan:MovieClip;
public var batai:MovieClip;
var dosunFlag;// = false
var dobootFlag;// = false
var dodiveFlag;// = false
var goPlayGameFlag;// = false
var btnClickFlagArray:Array;
var guestLeaveNum;// = 0
var keren1:guest;
var domotorFlag;// = false
var guest1:stand1;
var doHelpNum;// = 0
var nowscore:int;
var level;// = 0
var dosandFlag;// = false
var guestDoArray;
var doswimFlag;// = false
var mouseDis:mouseshow;
var waiterM:waiterMove;
var dofeedFlag;// = false
var leaveEventNumArray;
var guestGoPlayFlag;// = false
var playgameFlagArray;
var boy:waiter_boy;
var parentMC;
public var dengta:MovieClip;
var helpisdo;// = false
var doHelpFlag;// = false
public function gameInterFace(){
guestNum = 0;
level = 0;
baseScore = 10;
moreScore = 10;
doHelpNum = 0;
doHelpEventFlag = false;
gusetTimeNum = 0;
addGuestNum = 0;
startguestNum = 0;
helpisdo = false;
liftGuardBtnFlag = false;
dodiveFlag = false;
dodchairFlag = false;
dosurfFlag = false;
domotorFlag = false;
doswimFlag = false;
doHelpFlag = false;
dosunFlag = false;
dofeedFlag = false;
dosandFlag = false;
dobootFlag = false;
guestGoPlayFlag = false;
goPlayGameFlag = false;
playBtn0Flag = false;
guestLeaveNum = 0;
LeaveEventNum = 0;
leaveEventNumArray = [0, 0, 0, 0, 0, 0, 0, 0, 0];
leaveTimeNum = 0;
leaveEventFlag = false;
super();
menuIF = new menu(this);
aimscore = posArray.levelScoreArray[level];
nowscore = 0;
nowMaxScore = 0;
btnClickFlagArray = [0, 0, 0, 0, 0, 0, 0, 0, 0];
establishmentArray = [1, 1, 0, 1, 1, 0, 0, 0, 0, 1];
guessArray = [0, 0, 0, 0, 0, 0, 0, 0, 0];
playgameFlagArray = [false, false, false, false, false, false, false, false, false];
guesTimeEventDoArray = [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false];
guesTimeNumArray = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
guestChildArray = [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true];
guestChildArray2 = [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true];
guestDoArray = new Array();
mouseDis = new mouseshow();
addChild(mouseDis);
mouseDis.visible = false;
setBtnstage();
setwaiter();
setguest1();
keren1 = new guest();
guestChildArray9 = [keren1.guest2, keren1.guest3, keren1.guest4, keren1.guest5, keren1.guest6, keren1.guest7, keren1.guest8, keren1.guest9, keren1.guest10, keren1.eatguest, keren1.bootguest, keren1.chairguest, keren1.sandguest, keren1.sunguest, keren1.surfguest, keren1.swimguest, keren1.diveguest, keren1.motor_shipguest];
addBtnEvent();
this.addEventListener(Event.ENTER_FRAME, swapguestChild);
this.addEventListener(Event.ENTER_FRAME, swapboyChild);
this.addEventListener(Event.ENTER_FRAME, guestTimeOverEvent);
}
private function doboot(_arg1:Event):void{
if (guest.guestdoArray[2] == true){
keren1.guest3.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[2] = false;
dofeedFlag = false;
if (this.contains(keren1.guest3)){
this.removeChild(keren1.guest3);
this.addChild(keren1.bootguest);
keren1.bootguest.gotoAndStop(keren1.guest3.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[1]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
playgameFlagArray[1] = true;
};
leaveEventNumArray[1] = 0;
keren1.guest3.removeEventListener(Event.ENTER_FRAME, doboot);
};
}
private function playchair(_arg1:MouseEvent):void{
var _local2:*;
if (((((this.contains(keren1.guest4)) && ((btnClickFlagArray[2] == 1)))) && ((dodchairFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest4.timehint.tishi.gotoAndStop(2);
dodchairFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[3][0];
_local2.y = posArray.guestArray1[3][1];
waiterM.move(waiter, _local2, 3);
keren1.guest4.addEventListener(Event.ENTER_FRAME, doChair);
};
}
private function leaveEvent(_arg1:Number):void{
if (guest1.visible == false){
leaveEventFlag = true;
var _local2 = leaveEventNumArray;
var _local3 = _arg1;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
trace((_arg1 + "离开的位置"));
guestLeave(_arg1);
leaveEventNumArray[_arg1] = 0;
};
}
private function leaveTime(_arg1:Event):void{
var _local2:*;
leaveTimeNum++;
if (leaveTimeNum >= 70){
guest1.visible = false;
_local2 = 0;
while (_local2 < playgameFlagArray.length) {
if (guessArray[_local2] == 1){
trace((_local2 + "检查下..."));
break;
} else {
if (_local2 == 8){
leaveTimeNum = 0;
removeEventListener(Event.ENTER_FRAME, leaveTime);
LeaveToll_gate();
};
};
_local2++;
};
};
if (leaveTimeNum >= 85){
leaveEventFlag = false;
trace(("修改离开的标志监听leaveEventFlag" + leaveEventFlag));
leaveTimeNum = 0;
removeEventListener(Event.ENTER_FRAME, leaveTime);
};
}
private function setguest1(){
setguestColor();
guest1 = new stand1();
guest1.gotoAndStop(guestColor);
this.addChild(guest1);
guestNum = 0;
guest1.x = posArray.guestArray1[0][0];
guest1.y = posArray.guestArray1[0][1];
guest1.width = (guest1.width * 0.7);
guest1.height = (guest1.height * 0.7);
guest1.visible = false;
}
private function playBoot(_arg1:MouseEvent):void{
var _local2:*;
if (((((this.contains(keren1.guest3)) && ((btnClickFlagArray[1] == 1)))) && ((dofeedFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest3.timehint.tishi.gotoAndStop(2);
dofeedFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[2][0];
_local2.y = posArray.guestArray1[2][1];
waiterM.move(waiter, _local2, 2);
keren1.guest3.addEventListener(Event.ENTER_FRAME, doboot);
};
}
private function getNum(_arg1):Number{
var _local2:Number;
_local2 = 0;
trace(_arg1.name);
switch (_arg1.name){
case "guest2":
_local2 = 0;
break;
case "eatguest":
_local2 = 0;
break;
case "guest3":
_local2 = 1;
break;
case "bootguest":
_local2 = 1;
break;
case "guest4":
_local2 = 2;
break;
case "chairguest":
_local2 = 2;
break;
case "guest5":
_local2 = 3;
break;
case "sandguest":
_local2 = 3;
break;
case "guest6":
_local2 = 4;
break;
case "sunguest":
_local2 = 4;
break;
case "guest7":
_local2 = 5;
break;
case "surfguest":
_local2 = 5;
break;
case "guest8":
_local2 = 6;
break;
case "swimguest":
_local2 = 6;
break;
case "guest9":
_local2 = 7;
break;
case "diveguest":
_local2 = 7;
break;
case "guest10":
_local2 = 8;
break;
case "motor_shipguest":
_local2 = 8;
break;
};
return (_local2);
}
public function goPlayGame(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
trace(("看下各种状态" + guest1.visible), guestGoPlayFlag, goPlayGameFlag);
if ((((((((guest1.visible == true)) && ((guestGoPlayFlag == true)))) && ((goPlayGameFlag == false)))) && ((playBtn0Flag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
guest1.timehint.tishi.gotoAndStop(2);
goPlayGameFlag = true;
_local2 = new Point();
_local3 = guest1.x;
_local4 = guest1.y;
_local2.x = posArray.guestArray1[0][0];
_local2.y = posArray.guestArray1[0][1];
trace(_local2.x, ((_local2.y + "位置") + waiter.x), waiter.y);
waiterM.move(waiter, _local2, 0);
guest1.addEventListener(Event.ENTER_FRAME, guestdoGame);
};
}
public function start(){
playBtn0Flag = false;
leaveEventFlag = false;
nowMaxScore = 0;
nowscore = 0;
guestNum = 0;
level = parentMC.level;
aimscore = posArray.levelScoreArray[level];
moreScore = (aimscore * 0.1);
trace(("现在的本关的游戏的目标分和当前关数" + aimscore), level);
guesTimeEventDoArray = [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false];
guesTimeNumArray = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
guest1.visible = false;
setguestEvent();
}
private function doHelp(_arg1:Event):void{
doHelpNum++;
if ((((doHelpNum >= 100)) && (this.contains(keren1.swimguest)))){
doHelpEventFlag = false;
doHelpFlag = false;
doHelpNum = 0;
trace(("切换到求救000000000000000000000000000000000000000000000000000000" + keren1.swimguest.currentFrame));
keren1.swimguest.gotoAndStop((keren1.swimguest.currentFrame + 5));
keren1.swimguest.timehint.gotoAndStop(11);
keren1.swimguest.timehint.time.gotoAndStop(2);
trace(keren1.swimguest.currentFrame);
keren1.swimguest.removeEventListener(Event.ENTER_FRAME, doHelp);
keren1.swimguest.addEventListener(Event.ENTER_FRAME, guestIimeOver);
};
}
function getguest(_arg1):Object{
var _local2:*;
switch (_arg1){
case 0:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest2;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.eatguest;
};
};
break;
case 1:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest3;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.bootguest;
};
};
break;
case 2:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest4;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.chairguest;
};
};
break;
case 3:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest5;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.sandguest;
};
};
break;
case 4:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest6;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.sunguest;
};
};
break;
case 5:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest7;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.surfguest;
};
};
break;
case 6:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest8;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.swimguest;
};
};
break;
case 7:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest9;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.diveguest;
};
};
break;
case 8:
if (playgameFlagArray[_arg1] == false){
_local2 = keren1.guest10;
} else {
if (playgameFlagArray[_arg1] == true){
_local2 = keren1.motor_shipguest;
};
};
break;
};
trace(_arg1);
return (_local2);
}
function LeaveToll_gate(){
trace("本关游戏结束");
parentMC.nowgoal = (nowscore * posArray.scoreTogoal);
parentMC.score = nowscore;
this.parentMC.setSuccOrFil();
mouseDis.visible = false;
}
function setguestColor(){
guestColor = Math.round((0 + (Math.random() * 5)));
}
private function playsun(_arg1:MouseEvent):void{
var _local2:*;
if (((((this.contains(keren1.guest6)) && ((btnClickFlagArray[4] == 1)))) && ((dosunFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest6.timehint.tishi.gotoAndStop(2);
dosunFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[5][0];
_local2.y = posArray.guestArray1[5][1];
waiterM.move(waiter, _local2, 5);
keren1.guest6.addEventListener(Event.ENTER_FRAME, dosun);
};
}
public function dopause(){
var _local1:*;
trace("暂停游戏");
this.removeEventListener(Event.ENTER_FRAME, addGuestEvent);
guest1.timehint.time.time_flow.stop();
if ((((keren1.swimguest.currentFrame > 5)) && (this.contains(keren1.swimguest)))){
keren1.swimguest.timehint.time.time_flow.stop();
keren1.swimguest.removeEventListener(Event.ENTER_FRAME, doHelp);
};
trace("-----------------");
_local1 = 0;
while (_local1 < guestChildArray9.length) {
if (this.contains(guestChildArray9[_local1])){
guestChildArray9[_local1].removeEventListener(Event.ENTER_FRAME, guestIimeOver);
};
if ((((_local1 < 9)) && (this.contains(guestChildArray9[_local1])))){
guestChildArray9[_local1].timehint.time.time_flow.stop();
};
_local1++;
};
waiterM.dopause();
guardB.dopause();
}
public function setBtnstage():void{
trace(("按钮的状态" + establishmentArray));
if (establishmentArray[0] == 0){
this.btn_shadow.feedbtn.gotoAndStop(2);
} else {
if (establishmentArray[0] == 1){
this.btn_shadow.feedbtn.gotoAndStop(1);
};
};
if (establishmentArray[1] == 0){
this.btn_shadow.bootbtn.gotoAndStop(2);
} else {
if (establishmentArray[1] == 1){
this.btn_shadow.bootbtn.gotoAndStop(1);
};
};
if (establishmentArray[2] == 0){
this.btn_shadow.chairbtn.gotoAndStop(2);
} else {
if (establishmentArray[2] == 1){
this.btn_shadow.chairbtn.gotoAndStop(1);
};
};
if (establishmentArray[3] == 0){
this.btn_shadow.sandbtn.gotoAndStop(2);
} else {
if (establishmentArray[3] == 1){
this.btn_shadow.sandbtn.gotoAndStop(1);
};
};
if (establishmentArray[4] == 0){
this.btn_shadow.sunbtn.gotoAndStop(2);
} else {
if (establishmentArray[4] == 1){
this.btn_shadow.sunbtn.gotoAndStop(1);
};
};
if (establishmentArray[5] == 0){
this.btn_shadow.surfbtn.gotoAndStop(2);
} else {
if (establishmentArray[5] == 1){
this.btn_shadow.surfbtn.gotoAndStop(1);
};
};
if (establishmentArray[6] == 0){
this.btn_shadow.swimbtn.gotoAndStop(2);
} else {
if (establishmentArray[6] == 1){
this.btn_shadow.swimbtn.gotoAndStop(1);
};
};
if (establishmentArray[7] == 0){
this.btn_shadow.divebtn.gotoAndStop(2);
} else {
if (establishmentArray[7] == 1){
this.btn_shadow.divebtn.gotoAndStop(1);
};
};
if (establishmentArray[8] == 0){
this.btn_shadow.motorbtn.gotoAndStop(2);
} else {
if (establishmentArray[8] == 1){
this.btn_shadow.motorbtn.gotoAndStop(1);
};
};
}
private function dofeed(_arg1:Event):void{
if (guest.guestdoArray[1] == true){
keren1.guest2.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[1] = false;
dofeedFlag = false;
if (this.contains(keren1.guest2)){
playgameFlagArray[0] = true;
this.removeChild(keren1.guest2);
this.addChild(keren1.eatguest);
keren1.eatguest.gotoAndStop(keren1.guest2.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[0]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
};
leaveEventNumArray[0] = 0;
keren1.guest2.removeEventListener(Event.ENTER_FRAME, dofeed);
};
}
private function haveHelp(_arg1:MouseEvent):void{
var _local2:*;
if (((((((this.contains(keren1.swimguest)) && ((liftGuardBtnFlag == true)))) && ((helpisdo == false)))) && ((keren1.swimguest.currentFrame > 5)))){
liftGuardBtnFlag = false;
helpisdo = true;
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.swimguest.timehint.tishi.gotoAndStop(2);
_local2 = new Point();
_local2.x = posArray.guestArray2[7][0];
_local2.y = posArray.guestArray2[7][1];
guardB.move(boy, _local2, 8);
keren1.swimguest.addEventListener(Event.ENTER_FRAME, help);
};
}
private function domotor(_arg1:Event):void{
if (guest.guestdoArray[9] == true){
keren1.guest10.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[9] = false;
leaveEventNumArray[8] = 0;
domotorFlag = false;
if (this.contains(keren1.guest10)){
playgameFlagArray[8] = true;
this.removeChild(keren1.guest10);
this.addChild(keren1.motor_shipguest);
keren1.motor_shipguest.gotoAndStop(keren1.guest10.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[8]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
};
keren1.guest10.removeEventListener(Event.ENTER_FRAME, domotor);
};
}
private function playfeed(_arg1:MouseEvent):void{
var _local2:*;
if (((((this.contains(keren1.guest2)) && ((btnClickFlagArray[0] == 1)))) && ((dofeedFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest2.timehint.tishi.gotoAndStop(2);
dofeedFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[1][0];
_local2.y = posArray.guestArray1[1][1];
waiterM.move(waiter, _local2, 1);
keren1.guest2.addEventListener(Event.ENTER_FRAME, dofeed);
};
}
private function guestTimeOverEvent(_arg1:Event):void{
var _local2:*;
_local2 = 0;
for (;_local2 < guestChildArray9.length;_local2++) {
if (((this.contains(guestChildArray9[_local2])) && ((guesTimeEventDoArray[_local2] == false)))){
if (_local2 == 15){
if ((((doHelpFlag == true)) && ((doHelpEventFlag == false)))){
doHelpEventFlag = true;
guesTimeEventDoArray[_local2] = false;
guesTimeNumArray[_local2] = 0;
guestChildArray9[_local2].removeEventListener(Event.ENTER_FRAME, guestIimeOver);
keren1.swimguest.addEventListener(Event.ENTER_FRAME, doHelp);
continue;
};
if (doHelpFlag == false){
guesTimeEventDoArray[_local2] = true;
guestChildArray9[_local2].addEventListener(Event.ENTER_FRAME, guestIimeOver);
continue;
};
};
guesTimeEventDoArray[_local2] = true;
guestChildArray9[_local2].addEventListener(Event.ENTER_FRAME, guestIimeOver);
};
if ((((_local2 == 15)) && ((doHelpFlag == true)))){
if (((this.contains(guestChildArray9[_local2])) && ((guesTimeEventDoArray[_local2] == true)))){
guesTimeEventDoArray[_local2] = false;
guesTimeNumArray[_local2] = 0;
guestChildArray9[_local2].removeEventListener(Event.ENTER_FRAME, guestIimeOver);
keren1.swimguest.addEventListener(Event.ENTER_FRAME, doHelp);
};
};
if ((((this.contains(guestChildArray9[_local2]) == false)) && ((guesTimeEventDoArray[_local2] == true)))){
trace(("停止换地方的时间" + _local2));
guestChildArray9[_local2].removeEventListener(Event.ENTER_FRAME, guestIimeOver);
guesTimeEventDoArray[_local2] = false;
guesTimeNumArray[_local2] = 0;
};
};
}
function doLeave(){
addEventListener(Event.ENTER_FRAME, leaveTime);
}
public function guestdoGame(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
if (guest.guestdoArray[0] == true){
guest1.timehint.tishi.gotoAndStop(1);
guest1.removeEventListener(Event.ENTER_FRAME, guestdoGame);
guest.guestdoArray[0] = false;
startguestNum = 0;
if (guest1.visible == true){
guest1.visible = false;
guestNum++;
if ((((guestNum == establishmentArray[9])) || ((nowMaxScore >= (aimscore + moreScore))))){
trace("泳衣按钮开始无效");
playBtn0Flag = true;
};
_local2 = Math.round((0 + (Math.random() * 8)));
while ((((guessArray[_local2] == 1)) || ((establishmentArray[_local2] == 0)))) {
_local2 = Math.round((0 + (Math.random() * 8)));
};
_local3 = getguest(_local2);
_local4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
_local4[_local2] = 1;
_local4[9] = _local2;
trace(("看下是否修改成功" + _local4[9]), _local2);
guestDoArray.push(_local4);
guessArray[_local2] = 1;
_local3.gotoAndStop(guestColor);
this.addChild(_local3);
nowscore = (nowscore + baseScore);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
nowMaxScore = (nowMaxScore + posArray.estabScoreArray[_local2]);
_local3.timehint.time.gotoAndStop(2);
_local3.timehint.tishi.gotoAndStop(1);
_local3.timehint.gotoAndStop((_local2 + 2));
};
guestGoPlayFlag = false;
goPlayGameFlag = false;
};
}
private function doChair(_arg1:Event):void{
if (guest.guestdoArray[3] == true){
keren1.guest4.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[3] = false;
leaveEventNumArray[2] = 0;
dodchairFlag = false;
if (this.contains(keren1.guest4)){
playgameFlagArray[2] = true;
this.removeChild(keren1.guest4);
this.addChild(keren1.chairguest);
keren1.chairguest.gotoAndStop(keren1.guest4.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[2]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
};
keren1.guest4.removeEventListener(Event.ENTER_FRAME, doChair);
};
}
private function addGuestEvent(_arg1:Event):void{
if ((((guestNum < establishmentArray[9])) && ((nowMaxScore < (aimscore + moreScore))))){
if (this.contains(guest1)){
if (guest1.visible == false){
addGuestNum++;
if (addGuestNum >= 15){
trace((("客人不存在添加客人" + addGuestNum) + "-----------------------------------------------------------"));
guest1.timehint.time.gotoAndStop(2);
setguestColor();
guest1.gotoAndStop(guestColor);
guest1.visible = true;
if (getChildIndex(waiter) > getChildIndex(guest1)){
swapChildren(waiter, guest1);
};
addGuestNum = 0;
nowMaxScore = (nowMaxScore + baseScore);
goPlayGameFlag = false;
};
};
};
};
if (guest1.visible == true){
startguestNum++;
if (startguestNum >= 375){
trace(("显示的guset消失时候目标分和最大可能分" + aimscore), nowMaxScore);
addGuestNum = 0;
startguestNum = 0;
guest1.visible = false;
if (nowMaxScore >= (aimscore + moreScore)){
trace("移除guest的重复出现");
removeEventListener(Event.ENTER_FRAME, addGuestEvent);
if (guestDoArray.length == 0){
LeaveToll_gate();
};
};
};
};
}
public function doDive(_arg1){
if (guest.guestdoArray[8] == true){
keren1.guest9.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[8] = false;
if (this.contains(keren1.guest9)){
playgameFlagArray[7] = true;
this.removeChild(keren1.guest9);
this.addChild(keren1.diveguest);
keren1.diveguest.gotoAndStop(keren1.guest9.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[7]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
};
dodiveFlag = false;
leaveEventNumArray[7] = 0;
keren1.guest9.removeEventListener(Event.ENTER_FRAME, doDive);
};
}
private function playdive(_arg1:MouseEvent):void{
var _local2:*;
if (((((this.contains(keren1.guest9)) && ((btnClickFlagArray[7] == 1)))) && ((dodiveFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest9.timehint.tishi.gotoAndStop(2);
dodiveFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[8][0];
_local2.y = posArray.guestArray1[8][1];
waiterM.move(waiter, _local2, 8);
keren1.guest9.addEventListener(Event.ENTER_FRAME, doDive);
};
}
private function dosurf(_arg1){
if (guest.guestdoArray[6] == true){
keren1.guest7.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[6] = false;
leaveEventNumArray[5] = 0;
dosurfFlag = false;
if (this.contains(keren1.guest7)){
playgameFlagArray[5] = true;
this.removeChild(keren1.guest7);
this.addChild(keren1.surfguest);
if (getChildIndex(waiter) < getChildIndex(keren1.surfguest)){
swapChildren(waiter, keren1.surfguest);
};
keren1.surfguest.gotoAndStop(keren1.guest7.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[5]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
};
keren1.guest7.removeEventListener(Event.ENTER_FRAME, dosurf);
};
}
function changeclothing(_arg1){
var _local2:*;
guestGoPlayFlag = true;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(1);
mouseDis.startDrag();
_local2 = getChildIndex(mouseDis);
swapChildrenAt(_local2, (numChildren - 1));
}
private function swapboyChild(_arg1:Event):void{
if (this.contains(guest1)){
if (guest1.visible == true){
if (boy.y > guest1.y){
if (getChildIndex(boy) < getChildIndex(guest1)){
swapChildren(boy, guest1);
};
guestChildArray2[0] = false;
} else {
if (boy.y <= guest1.y){
if (getChildIndex(boy) > getChildIndex(guest1)){
swapChildren(boy, guest1);
};
guestChildArray2[0] = true;
};
};
};
};
if (this.contains(keren1.guest2)){
if (boy.y > keren1.guest2.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest2)){
swapChildren(boy, keren1.guest2);
};
guestChildArray2[0] = false;
} else {
if (boy.y <= keren1.guest2.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest2)){
swapChildren(boy, keren1.guest2);
};
guestChildArray2[0] = true;
};
};
};
if (this.contains(keren1.guest3)){
if (boy.y > keren1.guest3.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest3)){
swapChildren(boy, keren1.guest3);
};
guestChildArray2[1] = false;
} else {
if (boy.y <= keren1.guest3.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest3)){
swapChildren(boy, keren1.guest3);
};
guestChildArray2[1] = true;
};
};
};
if (this.contains(keren1.guest4)){
if (boy.y > keren1.guest4.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest4)){
swapChildren(boy, keren1.guest4);
};
guestChildArray2[2] = false;
} else {
if (boy.y <= keren1.guest4.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest4)){
swapChildren(boy, keren1.guest4);
};
guestChildArray2[2] = true;
};
};
};
if (this.contains(keren1.guest5)){
if (boy.y > keren1.guest5.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest5)){
swapChildren(boy, keren1.guest5);
};
guestChildArray2[3] = false;
} else {
if (boy.y <= keren1.guest5.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest5)){
swapChildren(boy, keren1.guest5);
};
guestChildArray2[3] = true;
};
};
};
if (this.contains(keren1.guest6)){
if (boy.y > keren1.guest6.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest6)){
swapChildren(boy, keren1.guest6);
};
guestChildArray2[4] = false;
} else {
if (boy.y <= keren1.guest6.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest6)){
swapChildren(boy, keren1.guest6);
};
guestChildArray2[4] = true;
};
};
};
if (this.contains(keren1.guest7)){
if (boy.y > keren1.guest7.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest7)){
swapChildren(boy, keren1.guest7);
};
guestChildArray2[5] = false;
} else {
if (boy.y <= keren1.guest7.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest7)){
swapChildren(boy, keren1.guest7);
};
guestChildArray2[5] = true;
};
};
};
if (this.contains(keren1.guest8)){
if (boy.y > keren1.guest8.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest8)){
swapChildren(boy, keren1.guest8);
};
guestChildArray2[6] = false;
} else {
if (boy.y <= keren1.guest8.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest8)){
swapChildren(boy, keren1.guest8);
};
guestChildArray2[6] = true;
};
};
};
if (this.contains(keren1.guest9)){
if (boy.y > keren1.guest9.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest9)){
swapChildren(boy, keren1.guest9);
};
guestChildArray2[7] = false;
} else {
if (boy.y <= keren1.guest9.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest9)){
swapChildren(boy, keren1.guest9);
};
guestChildArray2[7] = true;
};
};
};
if (this.contains(keren1.guest10)){
if (boy.y > keren1.guest10.y){
if (getChildIndex(boy) < getChildIndex(keren1.guest10)){
swapChildren(boy, keren1.guest10);
};
guestChildArray2[8] = false;
} else {
if (boy.y <= keren1.guest10.y){
if (getChildIndex(boy) > getChildIndex(keren1.guest10)){
swapChildren(boy, keren1.guest10);
};
guestChildArray2[8] = true;
};
};
};
if (this.contains(keren1.eatguest)){
if (boy.y > keren1.eatguest.y){
if (getChildIndex(boy) < getChildIndex(keren1.eatguest)){
swapChildren(boy, keren1.eatguest);
};
guestChildArray2[9] = false;
} else {
if (boy.y <= keren1.eatguest.y){
if (getChildIndex(boy) > getChildIndex(keren1.eatguest)){
swapChildren(boy, keren1.eatguest);
};
guestChildArray2[9] = true;
};
};
};
if (this.contains(keren1.bootguest)){
if (boy.y > keren1.bootguest.y){
if (getChildIndex(boy) < getChildIndex(keren1.bootguest)){
swapChildren(boy, keren1.bootguest);
};
guestChildArray2[10] = false;
} else {
if (boy.y <= keren1.bootguest.y){
if (getChildIndex(boy) > getChildIndex(keren1.bootguest)){
swapChildren(boy, keren1.bootguest);
};
guestChildArray2[10] = true;
};
};
};
if (this.contains(keren1.sandguest)){
if (boy.y <= keren1.sandguest.y){
if (getChildIndex(boy) < getChildIndex(keren1.sandguest)){
swapChildren(boy, keren1.sandguest);
};
guestChildArray2[11] = false;
} else {
if (boy.y <= keren1.sandguest.y){
if (getChildIndex(boy) > getChildIndex(keren1.sandguest)){
swapChildren(boy, keren1.sandguest);
};
guestChildArray2[11] = true;
};
};
};
if (this.contains(keren1.chairguest)){
if (boy.y > keren1.chairguest.y){
if (getChildIndex(boy) < getChildIndex(keren1.chairguest)){
swapChildren(boy, keren1.chairguest);
};
guestChildArray2[12] = false;
} else {
if (boy.y <= keren1.chairguest.y){
if (getChildIndex(boy) > getChildIndex(keren1.chairguest)){
swapChildren(boy, keren1.chairguest);
};
guestChildArray2[12] = true;
};
};
};
if (this.contains(keren1.sunguest)){
if (boy.y > keren1.sunguest.y){
if (getChildIndex(boy) < getChildIndex(keren1.sunguest)){
swapChildren(boy, keren1.sunguest);
};
guestChildArray2[13] = false;
} else {
if (boy.y <= keren1.sunguest.y){
if (getChildIndex(boy) > getChildIndex(keren1.sunguest)){
swapChildren(boy, keren1.sunguest);
};
guestChildArray2[13] = true;
};
};
};
if (this.contains(keren1.surfguest)){
if (boy.y > keren1.surfguest.y){
if (getChildIndex(boy) < getChildIndex(keren1.surfguest)){
swapChildren(boy, keren1.surfguest);
};
guestChildArray2[14] = false;
} else {
if (boy.y > keren1.surfguest.y){
if (getChildIndex(boy) > getChildIndex(keren1.surfguest)){
swapChildren(boy, keren1.surfguest);
};
guestChildArray2[14] = true;
};
};
};
if (this.contains(keren1.swimguest)){
if (boy.y > keren1.swimguest.y){
if (getChildIndex(boy) < getChildIndex(keren1.swimguest)){
swapChildren(boy, keren1.swimguest);
};
guestChildArray2[15] = false;
} else {
if (boy.y <= keren1.swimguest.y){
if (getChildIndex(boy) > getChildIndex(keren1.swimguest)){
swapChildren(boy, keren1.swimguest);
};
guestChildArray2[15] = true;
};
};
};
if (this.contains(keren1.motor_shipguest)){
if (boy.y > keren1.motor_shipguest.y){
if (getChildIndex(boy) < getChildIndex(keren1.motor_shipguest)){
swapChildren(boy, keren1.motor_shipguest);
};
guestChildArray2[16] = false;
} else {
if (boy.y <= keren1.motor_shipguest.y){
if (getChildIndex(boy) > getChildIndex(keren1.motor_shipguest)){
swapChildren(boy, keren1.motor_shipguest);
};
guestChildArray2[16] = true;
};
};
};
if (this.contains(waiter)){
if (boy.y > waiter.y){
if (getChildIndex(boy) < getChildIndex(waiter)){
swapChildren(boy, waiter);
};
} else {
if (boy.y <= waiter.y){
if (getChildIndex(boy) > getChildIndex(waiter)){
swapChildren(boy, waiter);
};
};
};
};
}
private function help(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (guest.helpdo == true){
keren1.swimguest.timehint.tishi.gotoAndStop(1);
guest.helpdo = false;
if (this.contains(keren1.swimguest)){
playgameFlagArray[6] = false;
this.removeChild(keren1.swimguest);
keren1.swimguest.gotoAndStop((keren1.swimguest.currentFrame - 5));
_local2 = Math.round((0 + (Math.random() * 8)));
while ((((guessArray[_local2] == 1)) || ((establishmentArray[_local2] == 0)))) {
_local2 = Math.round((0 + (Math.random() * 8)));
};
_local3 = getguest(_local2);
_local4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
_local4[_local2] = 1;
_local4[9] = _local2;
trace(("看下是否修改成功" + _local4[9]), _local2);
guestDoArray.push(_local4);
guessArray[6] = 0;
guessArray[_local2] = 1;
_local3.gotoAndStop(guestColor);
nowMaxScore = (nowMaxScore + posArray.estabScoreArray[_local2]);
_local3.timehint.time.gotoAndStop(2);
_local3.timehint.gotoAndStop((_local2 + 2));
this.addChild(_local3);
nowscore = (nowscore + posArray.helpSuccessScore);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
};
helpisdo = false;
leaveEventNumArray[6] = 0;
doHelpNum = 0;
keren1.swimguest.removeEventListener(Event.ENTER_FRAME, help);
};
}
function addBtnEvent(){
this.menuBtn.addEventListener(MouseEvent.CLICK, addMenu);
this.addEventListener(MouseEvent.CLICK, butClick);
this.btn_shadow.btn0.addEventListener(MouseEvent.CLICK, changeclothing);
this.guest1.addEventListener(MouseEvent.CLICK, goPlayGame);
keren1.guest3.addEventListener(MouseEvent.CLICK, playBoot);
keren1.guest5.addEventListener(MouseEvent.CLICK, playsand);
keren1.guest2.addEventListener(MouseEvent.CLICK, playfeed);
keren1.guest6.addEventListener(MouseEvent.CLICK, playsun);
keren1.guest8.addEventListener(MouseEvent.CLICK, playswim);
keren1.guest10.addEventListener(MouseEvent.CLICK, playmotor);
keren1.guest7.addEventListener(MouseEvent.CLICK, playsurf);
keren1.guest4.addEventListener(MouseEvent.CLICK, playchair);
keren1.guest9.addEventListener(MouseEvent.CLICK, playdive);
keren1.swimguest.addEventListener(MouseEvent.CLICK, haveHelp);
}
private function playsurf(_arg1:MouseEvent):void{
var _local2:*;
if (((((this.contains(keren1.guest7)) && ((btnClickFlagArray[5] == 1)))) && ((dosurfFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest7.timehint.tishi.gotoAndStop(2);
dosurfFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[6][0];
_local2.y = posArray.guestArray1[6][1];
waiterM.move(waiter, _local2, 6);
keren1.guest7.addEventListener(Event.ENTER_FRAME, dosurf);
};
}
public function stopAndDoAgain(){
var _local1:*;
trace("中断游戏返回到开始界面");
removeChild(menuIF);
posArray.priceArray = [0, 0, 0, 0, 0, 0, 0, 0];
parentMC.resetAll();
_local1 = 0;
while (_local1 < guestChildArray9.length) {
if (this.contains(guestChildArray9[_local1])){
trace("删除客人_______________________");
this.removeChild(guestChildArray9[_local1]);
};
_local1++;
};
guest1.timehint.tishi.gotoAndStop(1);
_local1 = 0;
while (_local1 < 9) {
if (((this.contains(guestChildArray9[_local1])) && ((_local1 < 9)))){
guestChildArray9[_local1].timehint.tishi.gotoAndStop(1);
guestChildArray9[_local1].timehint.time.time_flow.play();
};
_local1++;
};
guest.helpdo = false;
guest.guestdoArray = [false, false, false, false, false, false, false, false, false, false];
waiterM.move_aimArray = new Array();
waiterM.subArray = new Array();
boy.move_aimArray = new Array();
boy.subArray = new Array();
guessArray = [0, 0, 0, 0, 0, 0, 0, 0, 0];
playgameFlagArray = [false, false, false, false, false, false, false, false, false];
guesTimeEventDoArray = [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false];
btnClickFlagArray = [0, 0, 0, 0, 0, 0, 0, 0, 0];
guesTimeNumArray = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
doHelpNum = 0;
doHelpFlag = false;
doHelpEventFlag = false;
waiterM.moveNum = 1;
guardB.moveNum = 1;
waiter.x = posArray.waiterArray[0][0];
waiter.y = posArray.waiterArray[0][1];
waiter.gotoAndStop("stand");
boy.x = posArray.leftguardArray[0];
boy.y = posArray.leftguardArray[1];
boy.gotoAndStop("stand");
mouseDis.visible = false;
Main.startIF.visible = true;
this.parent.removeChild(this);
revertDate();
}
private function dosand(_arg1:Event):void{
if (guest.guestdoArray[4] == true){
keren1.guest5.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[4] = false;
dosunFlag = false;
if (this.contains(keren1.guest5)){
playgameFlagArray[3] = true;
this.removeChild(keren1.guest5);
this.addChild(keren1.sandguest);
if (getChildIndex(waiter) < getChildIndex(keren1.sandguest)){
swapChildren(waiter, keren1.sandguest);
};
keren1.sandguest.gotoAndStop(keren1.guest5.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[3]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
};
leaveEventNumArray[3] = 0;
keren1.guest5.removeEventListener(Event.ENTER_FRAME, dosand);
};
}
public function doAgain(){
var _local1:*;
trace("继续游戏");
removeChild(menuIF);
if ((((guestNum < establishmentArray[9])) && ((nowMaxScore < (aimscore + moreScore))))){
this.addEventListener(Event.ENTER_FRAME, addGuestEvent);
guest1.timehint.time.time_flow.play();
};
if ((((keren1.swimguest.currentFrame > 5)) && (this.contains(keren1.swimguest)))){
keren1.swimguest.timehint.time.time_flow.play();
keren1.swimguest.addEventListener(Event.ENTER_FRAME, doHelp);
};
_local1 = 0;
for (;_local1 < guestChildArray9.length;_local1++) {
if (this.contains(guestChildArray9[_local1])){
if (_local1 == 15){
if (keren1.swimguest.currentFrame <= 5){
guestChildArray9[_local1].addEventListener(Event.ENTER_FRAME, guestIimeOver);
guestChildArray9[_local1].timehint.time.time_flow.play();
continue;
};
};
guestChildArray9[_local1].addEventListener(Event.ENTER_FRAME, guestIimeOver);
};
if (((this.contains(guestChildArray9[_local1])) && ((_local1 < 9)))){
guestChildArray9[_local1].timehint.time.time_flow.play();
};
};
waiterM.doreturn();
guardB.doreturn();
}
private function doswim(_arg1:Event):void{
if (guest.guestdoArray[7] == true){
keren1.guest8.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[7] = false;
leaveEventNumArray[6] = 0;
doswimFlag = false;
if (this.contains(keren1.guest8)){
playgameFlagArray[6] = true;
this.removeChild(keren1.guest8);
this.addChild(keren1.swimguest);
if (getChildIndex(waiter) < getChildIndex(keren1.swimguest)){
swapChildren(waiter, keren1.swimguest);
};
keren1.swimguest.gotoAndStop(keren1.guest8.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[6]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
if (RandRange.getInt(1, 3) == 3){
doHelpFlag = true;
};
};
keren1.guest8.removeEventListener(Event.ENTER_FRAME, doswim);
};
}
private function setguestEvent():void{
trace(("现在的客人数和现在的最大可能分数" + guestNum), ((nowMaxScore + "最多的客人数") + establishmentArray[9]));
this.addEventListener(Event.ENTER_FRAME, addGuestEvent);
}
private function butClick(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
trace(((_arg1.target.name + " ") + _arg1.target));
switch (_arg1.target.name){
case "boybtn":
liftGuardBtnFlag = true;
trace("按钮按到了救生员了");
mouseDis.visible = false;
mouseDis.stopDrag();
break;
case "bootbtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(3);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[1] = 1;
trace("球");
break;
case "sandbtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(5);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[3] = 1;
trace("沙子");
break;
case "feedbtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(2);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[0] = 1;
trace("吃东西");
break;
case "sunbtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(6);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[4] = 1;
trace("太阳");
break;
case "swimbtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(8);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[6] = 1;
trace("游泳");
break;
case "motorbtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(10);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[8] = 1;
trace("摩托");
break;
case "surfbtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(7);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[5] = 1;
trace("冲浪");
break;
case "chairbtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(4);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[2] = 1;
trace("椅子");
break;
case "divebtn":
_local2 = 0;
while (_local2 < 9) {
btnClickFlagArray[_local2] = 0;
mouseDis.visible = true;
mouseDis.x = mouseX;
mouseDis.y = mouseY;
mouseDis.gotoAndStop(9);
mouseDis.startDrag();
_local3 = getChildIndex(mouseDis);
swapChildrenAt(_local3, (numChildren - 1));
_local2++;
};
btnClickFlagArray[7] = 1;
trace("潜水");
break;
};
}
private function addMenu(_arg1:MouseEvent):void{
addChild(menuIF);
dopause();
}
private function guestIimeOver(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = 0;
while (_local2 < guestChildArray9.length) {
if (guestChildArray9[_local2] == _arg1.target){
break;
};
_local2++;
};
var _local6 = guesTimeNumArray;
var _local7 = _local2;
var _local8 = (_local6[_local7] + 1);
_local6[_local7] = _local8;
if (guesTimeNumArray[_local2] > 375){
if (_local2 == 15){
if (keren1.swimguest.currentFrame > 5){
keren1.swimguest.gotoAndStop((keren1.swimguest.currentFrame - 5));
doHelpFlag = false;
(nowscore == (nowscore - posArray.helpFailingScore));
};
};
if (nowMaxScore < (aimscore + moreScore)){
trace(("可以改变客人的行为了_+_______客人的下标" + _local2));
guesTimeEventDoArray[_local2] = false;
guesTimeNumArray[_local2] = 0;
trace((_arg1.target + "切换的点击对象TARGET"));
guestChildArray9[_local2].removeEventListener(Event.ENTER_FRAME, guestIimeOver);
guestChangeEvent(_local2);
} else {
if ((((((nowMaxScore >= (aimscore + moreScore))) && ((leaveEventFlag == false)))) && ((guest1.visible == false)))){
guestChildArray9[_local2].removeEventListener(Event.ENTER_FRAME, guestIimeOver);
if (_local2 > 8){
_local3 = (_local2 - 9);
} else {
_local3 = _local2;
};
leaveEvent(_local3);
leaveEventFlag = true;
_local4 = 0;
while (_local4 < guestDoArray.length) {
if (guestDoArray[_local4][9] == _local3){
break;
};
_local4++;
};
_local5 = getguest(_local3);
if (this.contains(_local5)){
this.removeChild(_local5);
};
playgameFlagArray[_local3] = false;
guessArray[_local3] = 0;
guestDoArray.splice(_local4);
guesTimeEventDoArray[_local4] = false;
guesTimeNumArray[_local4] = 0;
};
};
};
}
public function getParent(_arg1){
parentMC = _arg1;
}
private function revertDate():void{
liftGuardBtnFlag = false;
dodiveFlag = false;
dodchairFlag = false;
dosurfFlag = false;
domotorFlag = false;
doswimFlag = false;
doHelpFlag = false;
dosunFlag = false;
dofeedFlag = false;
dosandFlag = false;
dobootFlag = false;
guestGoPlayFlag = false;
guestLeaveNum = 0;
LeaveEventNum = 0;
leaveEventNumArray = [0, 0, 0, 0, 0, 0, 0, 0, 0];
leaveTimeNum = 0;
leaveEventFlag = false;
goPlayGameFlag = false;
playBtn0Flag = false;
}
private function playswim(_arg1:MouseEvent):void{
var _local2:*;
trace(("------看下客人是否存在" + this.contains(keren1.guest8)), (doswimFlag == false), (btnClickFlagArray[6] == 1));
if (((((this.contains(keren1.guest8)) && ((btnClickFlagArray[6] == 1)))) && ((doswimFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest8.timehint.tishi.gotoAndStop(2);
doswimFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[7][0];
_local2.y = posArray.guestArray1[7][1];
waiterM.move(waiter, _local2, 7);
keren1.guest8.addEventListener(Event.ENTER_FRAME, doswim);
};
}
private function playmotor(_arg1:MouseEvent):void{
var _local2:*;
if (((((this.contains(keren1.guest10)) && ((btnClickFlagArray[8] == 1)))) && ((domotorFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest10.timehint.tishi.gotoAndStop(2);
domotorFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[9][0];
_local2.y = posArray.guestArray1[9][1];
waiterM.move(waiter, _local2, 9);
keren1.guest10.addEventListener(Event.ENTER_FRAME, domotor);
};
}
function guestChangeEvent(_arg1:Number){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local2 = guestChildArray9[_arg1];
_local4 = (guestDoArray.length - 1);
if (_arg1 > 8){
_local5 = (_arg1 - 9);
} else {
_local5 = _arg1;
};
trace((("想修改的位置的下标" + _local5) + _local2));
_local6 = 0;
while (_local6 < guestDoArray.length) {
if (_local5 == guestDoArray[_local6][9]){
trace(("在数组中有相同的" + _local6));
break;
};
_local6++;
};
_local3 = Math.round((0 + (Math.random() * 8)));
trace(((guessArray + "客人现在的状态") + guestDoArray));
while ((((guessArray[_local3] == 1)) || ((establishmentArray[_local3] == 0)))) {
_local3 = Math.round((0 + (Math.random() * 8)));
};
trace(("现在的最大分" + nowMaxScore), aimscore);
nowMaxScore = (nowMaxScore + posArray.estabScoreArray[_local3]);
trace(((((((_local2 + " 需要删除的...") + _local6) + "修改客人的位置") + _local5) + "修改到的位置") + _local3));
if (this.contains(_local2)){
};
this.removeChild(_local2);
playgameFlagArray[_local5] = false;
guessArray[_local5] = 0;
_local7 = getguest(_local3);
guestDoArray[_local6][_local3] = 1;
guestDoArray[_local6][9] = _local3;
guessArray[_local3] = 1;
_local7.gotoAndStop(_local2.currentFrame);
this.addChild(_local7);
_local7.timehint.time.gotoAndStop(2);
_local7.timehint.gotoAndStop((_local3 + 2));
guestLeaveNum = 0;
}
function guestLeave(_arg1){
var _local2:*;
trace("客人离开");
_local2 = getguest(_arg1);
guest1.visible = true;
guest1.timehint.visible = false;
guest1.gotoAndStop(_local2.currentFrame);
doLeave();
}
private function dosun(_arg1:Event):void{
if (guest.guestdoArray[5] == true){
keren1.guest6.timehint.tishi.gotoAndStop(1);
guest.guestdoArray[5] = false;
dosunFlag = false;
if (this.contains(keren1.guest6)){
playgameFlagArray[4] = true;
this.removeChild(keren1.guest6);
this.addChild(keren1.sunguest);
keren1.sunguest.gotoAndStop(keren1.guest6.currentFrame);
nowscore = (nowscore + posArray.estabScoreArray[4]);
scoreText.text = ((nowscore + "/") + aimscore);
moneyText.text = (((nowscore * posArray.scoreTogoal) + "/") + (aimscore * posArray.scoreTogoal));
if (getChildIndex(waiter) < getChildIndex(keren1.sunguest)){
swapChildren(waiter, keren1.sunguest);
};
};
leaveEventNumArray[4] = 0;
keren1.guest6.removeEventListener(Event.ENTER_FRAME, dosun);
};
}
private function playsand(_arg1:MouseEvent):void{
var _local2:*;
if (((((this.contains(keren1.guest5)) && ((btnClickFlagArray[3] == 1)))) && ((dosunFlag == false)))){
mouseDis.visible = false;
mouseDis.stopDrag();
keren1.guest5.timehint.tishi.gotoAndStop(2);
dosunFlag = true;
_local2 = new Point();
_local2.x = posArray.guestArray1[4][0];
_local2.y = posArray.guestArray1[4][1];
waiterM.move(waiter, _local2, 4);
keren1.guest5.addEventListener(Event.ENTER_FRAME, dosand);
};
}
private function setwaiter(){
waiter = new waiter_girl();
this.addChild(waiter);
waiter.gotoAndStop("stand");
waiter.width = (waiter.width * 0.7);
waiter.height = (waiter.height * 0.7);
waiter.x = posArray.waiterArray[0][0];
waiter.y = posArray.waiterArray[0][1];
waiter.toubiao.visible = false;
waiterM = new waiterMove(this);
boy = new waiter_boy();
this.addChild(boy);
boy.gotoAndStop("stand");
boy.width = (boy.width * 0.7);
boy.height = (boy.height * 0.7);
boy.x = posArray.leftguardArray[0];
boy.y = posArray.leftguardArray[1];
guardB = new leftguard(this);
}
private function swapguestChild(_arg1:Event):void{
if (this.contains(guest1)){
if (guest1.visible == true){
if (waiter.y > guest1.y){
if (getChildIndex(waiter) < getChildIndex(guest1)){
swapChildren(waiter, guest1);
};
guestChildArray2[0] = false;
} else {
if (waiter.y <= guest1.y){
if (getChildIndex(waiter) > getChildIndex(guest1)){
swapChildren(waiter, guest1);
};
guestChildArray2[0] = true;
};
};
};
};
if (this.contains(keren1.guest2)){
if (waiter.y > keren1.guest2.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest2)){
swapChildren(waiter, keren1.guest2);
};
guestChildArray2[0] = false;
} else {
if (waiter.y <= keren1.guest2.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest2)){
swapChildren(waiter, keren1.guest2);
};
guestChildArray2[0] = true;
};
};
};
if (this.contains(keren1.guest3)){
if (waiter.y > keren1.guest3.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest3)){
swapChildren(waiter, keren1.guest3);
};
guestChildArray2[1] = false;
} else {
if (waiter.y <= keren1.guest3.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest3)){
swapChildren(waiter, keren1.guest3);
};
guestChildArray2[1] = true;
};
};
};
if (this.contains(keren1.guest4)){
if (waiter.y > keren1.guest4.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest4)){
swapChildren(waiter, keren1.guest4);
};
guestChildArray2[2] = false;
} else {
if (waiter.y <= keren1.guest4.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest4)){
swapChildren(waiter, keren1.guest4);
};
guestChildArray2[2] = true;
};
};
};
if (this.contains(keren1.guest5)){
if (waiter.y > keren1.guest5.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest5)){
swapChildren(waiter, keren1.guest5);
};
guestChildArray2[3] = false;
} else {
if (waiter.y <= keren1.guest5.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest5)){
swapChildren(waiter, keren1.guest5);
};
guestChildArray2[3] = true;
};
};
};
if (this.contains(keren1.guest6)){
if (waiter.y > keren1.guest6.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest6)){
swapChildren(waiter, keren1.guest6);
};
guestChildArray2[4] = false;
} else {
if (waiter.y <= keren1.guest6.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest6)){
swapChildren(waiter, keren1.guest6);
};
guestChildArray2[4] = true;
};
};
};
if (this.contains(keren1.guest7)){
if (waiter.y > keren1.guest7.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest7)){
swapChildren(waiter, keren1.guest7);
};
guestChildArray2[5] = false;
} else {
if (waiter.y <= keren1.guest7.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest7)){
swapChildren(waiter, keren1.guest7);
};
guestChildArray2[5] = true;
};
};
};
if (this.contains(keren1.guest8)){
if (waiter.y > keren1.guest8.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest8)){
swapChildren(waiter, keren1.guest8);
};
guestChildArray2[6] = false;
} else {
if (waiter.y <= keren1.guest8.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest8)){
swapChildren(waiter, keren1.guest8);
};
guestChildArray2[6] = true;
};
};
};
if (this.contains(keren1.guest9)){
if (waiter.y > keren1.guest9.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest9)){
swapChildren(waiter, keren1.guest9);
};
guestChildArray2[7] = false;
} else {
if (waiter.y <= keren1.guest9.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest9)){
swapChildren(waiter, keren1.guest9);
};
guestChildArray2[7] = true;
};
};
};
if (this.contains(keren1.guest10)){
if (waiter.y > keren1.guest10.y){
if (getChildIndex(waiter) < getChildIndex(keren1.guest10)){
swapChildren(waiter, keren1.guest10);
};
guestChildArray2[8] = false;
} else {
if (waiter.y <= keren1.guest10.y){
if (getChildIndex(waiter) > getChildIndex(keren1.guest10)){
swapChildren(waiter, keren1.guest10);
};
guestChildArray2[8] = true;
};
};
};
if (this.contains(keren1.eatguest)){
if (waiter.y > keren1.eatguest.y){
if (getChildIndex(waiter) < getChildIndex(keren1.eatguest)){
swapChildren(waiter, keren1.eatguest);
};
guestChildArray2[9] = false;
} else {
if (waiter.y <= keren1.eatguest.y){
if (getChildIndex(waiter) > getChildIndex(keren1.eatguest)){
swapChildren(waiter, keren1.eatguest);
};
guestChildArray2[9] = true;
};
};
};
if (this.contains(keren1.bootguest)){
if (waiter.y > keren1.bootguest.y){
if (getChildIndex(waiter) < getChildIndex(keren1.bootguest)){
swapChildren(waiter, keren1.bootguest);
};
guestChildArray2[10] = false;
} else {
if (waiter.y <= keren1.bootguest.y){
if (getChildIndex(waiter) > getChildIndex(keren1.bootguest)){
swapChildren(waiter, keren1.bootguest);
};
guestChildArray2[10] = true;
};
};
};
if (this.contains(keren1.sandguest)){
if (waiter.y <= keren1.sandguest.y){
if (getChildIndex(waiter) < getChildIndex(keren1.sandguest)){
swapChildren(waiter, keren1.sandguest);
};
guestChildArray2[11] = false;
} else {
if (waiter.y <= keren1.sandguest.y){
if (getChildIndex(waiter) > getChildIndex(keren1.sandguest)){
swapChildren(waiter, keren1.sandguest);
};
guestChildArray2[11] = true;
};
};
};
if (this.contains(keren1.chairguest)){
if (waiter.y > keren1.chairguest.y){
if (getChildIndex(waiter) < getChildIndex(keren1.chairguest)){
swapChildren(waiter, keren1.chairguest);
};
guestChildArray2[12] = false;
} else {
if (waiter.y <= keren1.chairguest.y){
if (getChildIndex(waiter) > getChildIndex(keren1.chairguest)){
swapChildren(waiter, keren1.chairguest);
};
guestChildArray2[12] = true;
};
};
};
if (this.contains(keren1.sunguest)){
if (waiter.y > keren1.sunguest.y){
if (getChildIndex(waiter) < getChildIndex(keren1.sunguest)){
swapChildren(waiter, keren1.sunguest);
};
guestChildArray2[13] = false;
} else {
if (waiter.y <= keren1.sunguest.y){
if (getChildIndex(waiter) > getChildIndex(keren1.sunguest)){
swapChildren(waiter, keren1.sunguest);
};
guestChildArray2[13] = true;
};
};
};
if (this.contains(keren1.surfguest)){
if (waiter.y > keren1.surfguest.y){
if (getChildIndex(waiter) < getChildIndex(keren1.surfguest)){
swapChildren(waiter, keren1.surfguest);
};
guestChildArray2[14] = false;
} else {
if (waiter.y > keren1.surfguest.y){
if (getChildIndex(waiter) > getChildIndex(keren1.surfguest)){
swapChildren(waiter, keren1.surfguest);
};
guestChildArray2[14] = true;
};
};
};
if (this.contains(keren1.swimguest)){
if (waiter.y > keren1.swimguest.y){
if (getChildIndex(waiter) < getChildIndex(keren1.swimguest)){
swapChildren(waiter, keren1.swimguest);
};
guestChildArray2[15] = false;
} else {
if (waiter.y <= keren1.swimguest.y){
if (getChildIndex(waiter) > getChildIndex(keren1.swimguest)){
swapChildren(waiter, keren1.swimguest);
};
guestChildArray2[15] = true;
};
};
};
if (this.contains(keren1.motor_shipguest)){
if (waiter.y > keren1.motor_shipguest.y){
if (getChildIndex(waiter) < getChildIndex(keren1.motor_shipguest)){
swapChildren(waiter, keren1.motor_shipguest);
};
guestChildArray2[16] = false;
} else {
if (waiter.y <= keren1.motor_shipguest.y){
if (getChildIndex(waiter) > getChildIndex(keren1.motor_shipguest)){
swapChildren(waiter, keren1.motor_shipguest);
};
guestChildArray2[16] = true;
};
};
};
}
}
}//package
Section 55
//guest (guest)
package {
import flash.events.*;
import flash.display.*;
public class guest extends MovieClip {
var guest10:stand2;
var sunguest:sun;
var bootguest:playboot;
var chairguest:chair;
var swimguest:swim;
var guest3:stand2;
var guest5:stand2;
var guest7:stand2;
var guest4:stand2;
var guest2:stand2;
var diveguest:diving;
var guest6:stand2;
var guest9:stand2;
var eatguest:feed;
var surfguest:surf;
var guest8:stand2;
var colorCurrent:int;// = 1
var motor_shipguest:motor_ship;
var sandguest:sand;
public static var helpdo = false;
public static var guestdoArray:Array;
public function guest(){
var _local1:*;
colorCurrent = 1;
super();
guestdoArray = [false, false, false, false, false, false, false, false, false, false];
eatguest = new feed();
eatguest.gotoAndStop(colorCurrent);
eatguest.x = posArray.guestArray2[1][0];
eatguest.y = posArray.guestArray2[1][1];
bootguest = new playboot();
bootguest.gotoAndStop(colorCurrent);
bootguest.x = posArray.guestArray2[2][0];
bootguest.y = posArray.guestArray2[2][1];
sandguest = new sand();
sandguest.gotoAndStop(colorCurrent);
sandguest.x = posArray.guestArray2[4][0];
sandguest.y = posArray.guestArray2[4][1];
sandguest.sandboy.sand.gotoAndPlay(1);
chairguest = new chair();
chairguest.gotoAndStop(colorCurrent);
chairguest.x = posArray.guestArray2[3][0];
chairguest.y = posArray.guestArray2[3][1];
sunguest = new sun();
sunguest.gotoAndStop(colorCurrent);
sunguest.x = posArray.guestArray2[5][0];
sunguest.y = posArray.guestArray2[5][1];
swimguest = new swim();
swimguest.gotoAndStop(colorCurrent);
swimguest.x = posArray.guestArray2[7][0];
swimguest.y = posArray.guestArray2[7][1];
diveguest = new diving();
diveguest.gotoAndStop(colorCurrent);
diveguest.x = posArray.guestArray2[8][0];
diveguest.y = posArray.guestArray2[8][1];
surfguest = new surf();
surfguest.gotoAndStop(colorCurrent);
surfguest.x = posArray.guestArray2[6][0];
surfguest.y = posArray.guestArray2[6][1];
motor_shipguest = new motor_ship();
motor_shipguest.gotoAndStop(colorCurrent);
motor_shipguest.x = posArray.guestArray2[9][0];
motor_shipguest.y = posArray.guestArray2[9][1];
guest2 = new stand2();
guest3 = new stand2();
guest4 = new stand2();
guest5 = new stand2();
guest6 = new stand2();
guest2.gotoAndStop(1);
guest3.gotoAndStop(2);
guest4.gotoAndStop(3);
guest5.gotoAndStop(4);
guest6.gotoAndStop(5);
guest2.width = (guest2.width * 0.7);
guest2.height = (guest2.height * 0.7);
guest2.x = posArray.guestArray1[1][0];
guest2.y = posArray.guestArray1[1][1];
guest3.width = (guest3.width * 0.7);
guest3.height = (guest3.height * 0.7);
guest3.x = posArray.guestArray1[2][0];
guest3.y = posArray.guestArray1[2][1];
guest4.width = (guest4.width * 0.7);
guest4.height = (guest4.height * 0.7);
guest4.x = posArray.guestArray1[3][0];
guest4.y = posArray.guestArray1[3][1];
guest5.width = (guest5.width * 0.7);
guest5.height = (guest5.height * 0.7);
guest5.x = posArray.guestArray1[4][0];
guest5.y = posArray.guestArray1[4][1];
guest6.width = (guest6.width * 0.7);
guest6.height = (guest6.height * 0.7);
guest6.x = posArray.guestArray1[5][0];
guest6.y = posArray.guestArray1[5][1];
guest7 = new stand2();
guest7.gotoAndStop(1);
guest7.width = (guest7.width * 0.7);
guest7.height = (guest7.height * 0.7);
guest7.x = posArray.guestArray1[6][0];
guest7.y = posArray.guestArray1[6][1];
guest8 = new stand2();
guest8.gotoAndStop(1);
guest8.width = (guest8.width * 0.7);
guest8.height = (guest8.height * 0.7);
guest8.x = posArray.guestArray1[7][0];
guest8.y = posArray.guestArray1[7][1];
guest9 = new stand2();
guest9.gotoAndStop(1);
guest9.width = (guest9.width * 0.7);
guest9.height = (guest9.height * 0.7);
guest9.x = posArray.guestArray1[8][0];
guest9.y = posArray.guestArray1[8][1];
guest10 = new stand2();
guest10.gotoAndStop(1);
guest10.width = (guest10.width * 0.7);
guest10.height = (guest10.height * 0.7);
guest10.x = posArray.guestArray1[9][0];
guest10.y = posArray.guestArray1[9][1];
_local1 = new requiedo();
_local1.actionrequie([1, 1, 1, 1, 1], [0, 0, 0, 0, 0]);
}
}
}//package
Section 56
//leftguard (leftguard)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class leftguard extends MovieClip {
var moveNum;// = 1
var moveSpeed:int;// = 8
var startheight;
var startPoint:Point;
var aimPoint:Point;
var moveOBJ:Object;
public var move_time:int;// = 0
var startwidth;
public var move_aimArray:Array;
var goorbackFlag;// = false
public var parentMC;
public var subArray:Array;
public function leftguard(_arg1){
move_time = 0;
moveNum = 1;
moveSpeed = 8;
goorbackFlag = false;
super();
move_aimArray = new Array();
subArray = new Array();
parentMC = _arg1;
moveOBJ = _arg1.boy;
aimPoint = new Point();
}
public function moveStart(){
if (move_aimArray.length > 0){
aimPoint.x = move_aimArray[0].x;
aimPoint.y = move_aimArray[0].y;
moveOBJ.addEventListener(Event.ENTER_FRAME, moveXGo);
} else {
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveXGo);
};
}
private function moveXBack(_arg1:Event):void{
trace("走回来Y");
if (moveOBJ.x != startPoint.x){
if (aimPoint.x > startPoint.x){
moveOBJ.x = (moveOBJ.x - moveSpeed);
if (moveOBJ.currentLabel != "left"){
moveOBJ.gotoAndStop("left");
};
if (moveOBJ.x < startPoint.x){
moveOBJ.x = startPoint.x;
};
} else {
if (aimPoint.x < startPoint.x){
moveOBJ.x = (moveOBJ.x + moveSpeed);
if (moveOBJ.currentLabel != "right"){
moveOBJ.gotoAndStop("right");
};
if (moveOBJ.x > startPoint.x){
moveOBJ.x = startPoint.x;
};
};
};
} else {
if (moveOBJ.currentLabel != "stand"){
moveOBJ.gotoAndStop("stand");
};
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveXBack);
move_aimArray.shift();
subArray.shift();
moveStart();
};
}
public function dopause(){
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveXGo);
}
public function doreturn(){
if (move_aimArray.length > 0){
moveOBJ.addEventListener(Event.ENTER_FRAME, moveXGo);
};
}
private function moveYBack(_arg1:Event):void{
if (moveOBJ.y != startPoint.y){
if (aimPoint.y > startPoint.y){
if (moveOBJ.currentLabel != "back"){
moveOBJ.gotoAndStop("back");
};
moveOBJ.y = (moveOBJ.y - moveSpeed);
if (moveOBJ.y < startPoint.y){
moveOBJ.y = startPoint.y;
};
} else {
if (aimPoint.y < startPoint.y){
if (moveOBJ.currentLabel != "font"){
moveOBJ.gotoAndStop("font");
};
moveOBJ.y = (moveOBJ.y + moveSpeed);
if (moveOBJ.y > startPoint.y){
moveOBJ.y = startPoint.y;
};
};
};
} else {
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveYBack);
moveOBJ.addEventListener(Event.ENTER_FRAME, moveXBack);
};
}
private function moveYGo(_arg1:Event):void{
if (moveOBJ.y != aimPoint.y){
if (aimPoint.y > startPoint.y){
moveOBJ.y = (moveOBJ.y + moveSpeed);
if (moveOBJ.currentLabel != "font"){
moveOBJ.gotoAndStop("font");
};
if (moveOBJ.y > aimPoint.y){
moveOBJ.y = aimPoint.y;
trace("给救生员Y赋值");
};
} else {
if (aimPoint.y < startPoint.y){
if (moveOBJ.currentLabel != "back"){
moveOBJ.gotoAndStop("back");
};
moveOBJ.y = (moveOBJ.y - moveSpeed);
if (moveOBJ.y < aimPoint.y){
moveOBJ.y = aimPoint.y;
};
};
};
} else {
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveYGo);
moveOBJ.addEventListener(Event.ENTER_FRAME, moveYBack);
guest.helpdo = true;
trace("救生员到达目的地+++++++++++++++++++++++++++++++++++++++++++++++++++");
};
}
public function move(_arg1, _arg2, _arg3){
var _local4:*;
move_time++;
move_aimArray.push(_arg2);
_local4 = 0;
while (_local4 < move_aimArray.length) {
_local4++;
};
subArray.push(_arg3);
startPoint = new Point();
startPoint.x = posArray.leftguardArray[0];
startPoint.y = posArray.leftguardArray[1];
startwidth = _arg1.width;
moveOBJ = _arg1;
if (move_aimArray.length == 1){
moveStart();
};
}
private function moveXGo(_arg1:Event):void{
if (moveNum == 1){
if (moveOBJ.x != aimPoint.x){
if (aimPoint.x > startPoint.x){
if (moveOBJ.currentLabel != "right"){
moveOBJ.gotoAndStop("right");
};
moveOBJ.x = (moveOBJ.x + moveSpeed);
if (moveOBJ.x > aimPoint.x){
moveOBJ.x = aimPoint.x;
};
} else {
if (aimPoint.x < startPoint.x){
if (moveOBJ.currentLabel != "left"){
moveOBJ.gotoAndStop("left");
};
moveOBJ.x = (moveOBJ.x - moveSpeed);
if (moveOBJ.x < aimPoint.x){
moveOBJ.x = aimPoint.x;
};
};
};
} else {
moveNum = 2;
trace("移除X加入Y");
};
};
if (moveNum == 2){
if (moveOBJ.y != aimPoint.y){
if (aimPoint.y > startPoint.y){
moveOBJ.y = (moveOBJ.y + moveSpeed);
if (moveOBJ.currentLabel != "font"){
moveOBJ.gotoAndStop("font");
};
if (moveOBJ.y > aimPoint.y){
moveOBJ.y = aimPoint.y;
};
} else {
if (aimPoint.y < startPoint.y){
if (moveOBJ.currentLabel != "back"){
moveOBJ.gotoAndStop("back");
};
moveOBJ.y = (moveOBJ.y - moveSpeed);
if (moveOBJ.y < aimPoint.y){
moveOBJ.y = aimPoint.y;
};
};
};
} else {
moveNum = 3;
guest.helpdo = true;
};
};
if (moveNum == 3){
if (moveOBJ.y != startPoint.y){
if (aimPoint.y > startPoint.y){
if (moveOBJ.currentLabel != "back"){
moveOBJ.gotoAndStop("back");
};
moveOBJ.y = (moveOBJ.y - moveSpeed);
if (moveOBJ.y < startPoint.y){
moveOBJ.y = startPoint.y;
};
} else {
if (aimPoint.y < startPoint.y){
if (moveOBJ.currentLabel != "font"){
moveOBJ.gotoAndStop("font");
};
moveOBJ.y = (moveOBJ.y + moveSpeed);
if (moveOBJ.y > startPoint.y){
moveOBJ.y = startPoint.y;
};
};
};
} else {
moveNum = 4;
};
};
if (moveNum == 4){
if (moveOBJ.x != startPoint.x){
if (aimPoint.x > startPoint.x){
moveOBJ.x = (moveOBJ.x - moveSpeed);
if (moveOBJ.currentLabel != "left"){
moveOBJ.gotoAndStop("left");
};
if (moveOBJ.x < startPoint.x){
moveOBJ.x = startPoint.x;
};
} else {
if (aimPoint.x < startPoint.x){
moveOBJ.x = (moveOBJ.x + moveSpeed);
if (moveOBJ.currentLabel != "right"){
moveOBJ.gotoAndStop("right");
};
if (moveOBJ.x > startPoint.x){
moveOBJ.x = startPoint.x;
};
};
};
} else {
if (moveOBJ.currentLabel != "stand"){
moveOBJ.gotoAndStop("stand");
};
move_aimArray.shift();
subArray.shift();
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveXGo);
moveStart();
moveNum = 1;
};
};
}
}
}//package
Section 57
//Main (Main)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
public class Main extends MovieClip {
var nowgoal;// = 0
var optIF:optInerFace;
var baseScore;// = 10
var aimscore;// = 1
var allScore;// = 0
var gameBtnArray;
var shopping:shop;
var succorfi:sorFi;
var level;// = 0
var gameStart:gameInterFace;
var score;// = 0
var shopFlag;// = false
var bgSound:Sound;
var bgVolume:SoundTransform;
var bgSoundChannel:SoundChannel;
static var startIF:startInterFace;
public function Main(){
level = 0;
aimscore = 1;
allScore = 0;
score = 0;
nowgoal = 0;
baseScore = 10;
shopFlag = false;
super();
bgSound = new music();
bgSoundChannel = bgSound.play(0, 9999999);
bgVolume = new SoundTransform(posArray.soundVoices);
bgSoundChannel.soundTransform = bgVolume;
gameBtnArray = new Array();
gameBtnArray = [1, 1, 1, 1, 0, 0, 0, 0, 3];
succorfi = new sorFi();
succorfi.parentMC = this;
startIF = new startInterFace();
gameStart = new gameInterFace();
optIF = new optInerFace();
addChild(startIF);
startIF.optBtn.addEventListener(MouseEvent.MOUSE_UP, optBtnEvent);
startIF.playBtn.addEventListener(MouseEvent.MOUSE_UP, playGame);
startIF.moreGameBtn.addEventListener(MouseEvent.MOUSE_UP, playMoreGame);
startIF.soundBtn.addEventListener(MouseEvent.MOUSE_UP, setSound);
shopping = new shop();
shopping.parentMC = this;
setShop();
setGamePar();
}
private function playMoreGame(_arg1:MouseEvent):void{
var request:*;
var e = _arg1;
request = new URLRequest("http://www.games2girls.com");
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
private function setSuccOrFiText():void{
succorfi.goalText.text = nowgoal;
allScore = (allScore + score);
succorfi.levelText.text = score.toString();
succorfi.moueyText.text = posArray.levelScoreArray[level];
succorfi.scoreText.text = allScore.toString();
}
public function playsound():void{
if (posArray.soundFlag){
trace("播放音乐");
bgSoundChannel = bgSound.play(0, 9999999);
bgVolume = new SoundTransform(posArray.soundVoices);
bgSoundChannel.soundTransform = bgVolume;
} else {
trace("停止音乐播放");
bgSoundChannel.stop();
};
}
public function setShop():void{
if (shop.shopArray[0] == 2){
shop.shopArray[0] = 4;
};
if (((!((shop.shopArray[0] == 4))) && (!((shop.shopArray[0] == 2))))){
if (nowgoal < shopping.shopPriceArray[0]){
shop.shopArray[0] = 3;
};
if (nowgoal >= shopping.shopPriceArray[0]){
shop.shopArray[0] = 1;
shopFlag = true;
};
};
if (shop.shopArray[1] == 2){
shop.shopArray[1] = 4;
};
if (((!((shop.shopArray[1] == 4))) && (!((shop.shopArray[1] == 2))))){
if (nowgoal < shopping.shopPriceArray[1]){
shop.shopArray[1] = 3;
};
if (nowgoal >= shopping.shopPriceArray[1]){
shop.shopArray[1] = 1;
shopFlag = true;
};
};
if (shop.shopArray[2] == 2){
shop.shopArray[2] = 4;
};
if (((!((shop.shopArray[2] == 4))) && (!((shop.shopArray[2] == 2))))){
if (nowgoal < shopping.shopPriceArray[2]){
shop.shopArray[2] = 3;
};
if (nowgoal >= shopping.shopPriceArray[2]){
shop.shopArray[2] = 1;
shopFlag = true;
};
};
if (shop.shopArray[3] == 2){
shop.shopArray[3] = 4;
};
if (((!((shop.shopArray[3] == 4))) && (!((shop.shopArray[3] == 2))))){
if (nowgoal < shopping.shopPriceArray[3]){
shop.shopArray[3] = 3;
};
if (nowgoal >= shopping.shopPriceArray[3]){
shop.shopArray[3] = 1;
shopFlag = true;
};
};
if (shop.shopArray[4] == 2){
shop.shopArray[4] = 4;
};
if (((!((shop.shopArray[4] == 4))) && (!((shop.shopArray[4] == 2))))){
if (nowgoal < shopping.shopPriceArray[4]){
shop.shopArray[4] = 3;
};
if (nowgoal >= shopping.shopPriceArray[4]){
shop.shopArray[4] = 1;
shopFlag = true;
};
};
if (shop.shopArray[5] == 2){
shop.shopArray[5] = 4;
};
if (((!((shop.shopArray[5] == 4))) && (!((shop.shopArray[5] == 2))))){
if (nowgoal < shopping.shopPriceArray[5]){
shop.shopArray[5] = 3;
};
if (nowgoal >= shopping.shopPriceArray[5]){
shop.shopArray[5] = 1;
shopFlag = true;
};
};
if (shop.shopArray[6] == 2){
shop.shopArray[6] = 4;
};
if (((!((shop.shopArray[6] == 4))) && (!((shop.shopArray[6] == 2))))){
if (nowgoal < shopping.shopPriceArray[6]){
shop.shopArray[6] = 3;
};
if (nowgoal >= shopping.shopPriceArray[6]){
shop.shopArray[6] = 1;
shopFlag = true;
};
};
if (shop.shopArray[7] == 2){
shop.shopArray[7] = 4;
};
if (((!((shop.shopArray[7] == 4))) && (!((shop.shopArray[7] == 2))))){
if (nowgoal < shopping.shopPriceArray[7]){
shop.shopArray[7] = 3;
};
if (nowgoal >= shopping.shopPriceArray[7]){
shop.shopArray[7] = 1;
shopFlag = true;
};
};
shopping.goldText.text = ((nowgoal + "/") + (posArray.levelScoreArray[level] * posArray.scoreTogoal));
trace(shopping.goldText.text);
setshopArray();
shopping.setshopBtn();
if (shopFlag == false){
shopping.shopDoFlag = true;
};
shopFlag = false;
trace("------");
}
public function setgameInterFace(){
gameStart.moneyText.text = ((nowgoal + "/") + (posArray.levelScoreArray[level] * posArray.scoreTogoal));
gameStart.scoreText.text = ((0 + "/") + posArray.levelScoreArray[level]);
trace(("目标分和当前关数" + posArray.levelGuestNumArray[level]), level);
gameStart.establishmentArray[9] = posArray.levelGuestNumArray[level];
if (posArray.priceArray[6] == 0){
trace("------------------");
gameStart.ditan.gotoAndStop(2);
} else {
if (posArray.priceArray[6] == 1){
trace("--++++++++++++++----------");
gameStart.ditan.gotoAndStop(1);
};
};
if (posArray.priceArray[7] == 0){
gameStart.dengta.gotoAndStop(2);
} else {
if (posArray.priceArray[7] == 1){
gameStart.dengta.gotoAndStop(1);
};
};
if (posArray.priceArray[4] == 0){
gameStart.batai.gotoAndStop(2);
} else {
if (posArray.priceArray[4] == 1){
gameStart.batai.gotoAndStop(1);
};
};
if (posArray.priceArray[5] == 0){
gameStart.shu.gotoAndStop(2);
} else {
if (posArray.priceArray[5] == 1){
gameStart.shu.gotoAndStop(1);
};
};
if (posArray.priceArray[0] == 0){
gameStart.establishmentArray[6] = 0;
} else {
if (posArray.priceArray[0] == 1){
gameStart.establishmentArray[6] = 1;
};
};
if (posArray.priceArray[1] == 0){
gameStart.establishmentArray[8] = 0;
} else {
if (posArray.priceArray[1] == 1){
gameStart.establishmentArray[8] = 1;
};
};
if (posArray.priceArray[2] == 0){
gameStart.establishmentArray[2] = 0;
} else {
if (posArray.priceArray[2] == 1){
gameStart.establishmentArray[2] = 1;
};
};
if (posArray.priceArray[3] == 0){
gameStart.establishmentArray[5] = 0;
} else {
if (posArray.priceArray[3] == 1){
gameStart.establishmentArray[5] = 1;
};
};
if (level >= 4){
gameStart.establishmentArray[7] = 1;
};
gameStart.setBtnstage();
}
public function playGame(_arg1){
startIF.visible = false;
setgameInterFace();
gameStart.parentMC = this;
gameStart.start();
gameStart.baseScore = baseScore;
trace((posArray.priceArray + "商店的状态"));
if (this.contains(gameStart) == false){
addChild(gameStart);
};
}
function setGamePar(){
optIF.getParentMC(this);
shopping.parentMC = this;
}
public function setSuccOrFil(){
var _local1:*;
if (gameStart.nowscore >= gameStart.aimscore){
succorfi.gotoAndStop(1);
setSuccOrFiText();
};
if (gameStart.nowscore < gameStart.aimscore){
succorfi.gotoAndStop(2);
setSuccOrFiText();
};
gameStart.addChild(succorfi);
}
function optBtnEvent(_arg1){
if (this.contains(optIF) == false){
addChild(optIF);
} else {
optIF.visible = true;
};
}
private function setSound(_arg1:MouseEvent):void{
if (posArray.soundFlag == true){
startIF.soundBtn.gotoAndPlay(2);
posArray.soundFlag = false;
} else {
if (posArray.soundFlag == false){
startIF.soundBtn.gotoAndPlay(1);
posArray.soundFlag = true;
};
};
playsound();
}
public function resetAll(){
level = 0;
nowgoal = 0;
allScore = 0;
score = 0;
posArray.levelGuestNumArray = [3, 3, 3, 3, 3, 3];
}
private function setshopArray():void{
}
}
}//package
Section 58
//menu (menu)
package {
import flash.events.*;
import flash.display.*;
public class menu extends MovieClip {
public var backBtn:SimpleButton;
public var playBtn:SimpleButton;
var parentMC;
public function menu(_arg1){
parentMC = _arg1;
this.playBtn.addEventListener(MouseEvent.CLICK, doContinue);
this.backBtn.addEventListener(MouseEvent.CLICK, doReturn);
}
private function doContinue(_arg1:MouseEvent):void{
this.parentMC.doAgain();
}
private function doReturn(_arg1:MouseEvent):void{
this.parentMC.stopAndDoAgain();
}
}
}//package
Section 59
//motor_ship (motor_ship)
package {
import flash.display.*;
public dynamic class motor_ship extends MovieClip {
}
}//package
Section 60
//mouseshow (mouseshow)
package {
import flash.display.*;
public dynamic class mouseshow extends MovieClip {
public function mouseshow(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 61
//music (music)
package {
import flash.media.*;
public dynamic class music extends Sound {
}
}//package
Section 62
//music2 (music2)
package {
import flash.media.*;
public dynamic class music2 extends Sound {
}
}//package
Section 63
//optInerFace (optInerFace)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public class optInerFace extends MovieClip {
public var backBtn:SimpleButton;
public var audio1:MovieClip;
public var playBtn:SimpleButton;
public var quit1:MovieClip;
public var quit2:MovieClip;
public var quit3:MovieClip;
var parentMC;
public function optInerFace(){
addFrameScript(0, frame1);
quit1.gotoAndStop(1);
quit2.gotoAndStop(2);
quit3.gotoAndStop(2);
quit1.addEventListener(MouseEvent.CLICK, quitSet);
quit2.addEventListener(MouseEvent.CLICK, quitSet);
quit3.addEventListener(MouseEvent.CLICK, quitSet);
audio1.addEventListener(MouseEvent.MOUSE_DOWN, setAudio1);
backBtn.addEventListener(MouseEvent.MOUSE_UP, goback);
playBtn.addEventListener(MouseEvent.MOUSE_UP, playGame);
}
function setAudio1(_arg1){
if (_arg1.target.name != "audioCricle"){
_arg1.target.audioCricle.x = (mouseX - _arg1.target.x);
posArray.soundVoices = ((_arg1.target.audioCricle.x + 42) / 84);
parentMC.bgVolume = new SoundTransform(posArray.soundVoices);
parentMC.bgSoundChannel.soundTransform = parentMC.bgVolume;
};
}
public function getParentMC(_arg1){
parentMC = _arg1;
}
function frame1(){
stop();
}
function playGame(_arg1){
this.visible = false;
if (this.parent != null){
if (this.parent.contains(Main.startIF)){
trace("....");
Main.startIF.visible = false;
};
this.parentMC.playGame(null);
};
}
function quitSet(_arg1){
quit1.gotoAndStop(2);
quit2.gotoAndStop(2);
quit3.gotoAndStop(2);
_arg1.target.gotoAndStop(1);
if (_arg1.target == quit1){
stage.quality = StageQuality.HIGH;
};
if (_arg1.target == quit2){
stage.quality = StageQuality.MEDIUM;
};
if (_arg1.target == quit3){
stage.quality = StageQuality.LOW;
};
}
function goback(_arg1){
this.visible = false;
}
}
}//package
Section 64
//playboot (playboot)
package {
import flash.display.*;
public dynamic class playboot extends MovieClip {
}
}//package
Section 65
//posArray (posArray)
package {
public class posArray {
public static var scoreTogoal = 2;
public static var levelGuestNumArray = [3, 3, 3, 3, 3, 3];
public static var levelScoreArray = [100, 150, 200, 250, 300, 400];
public static var helpFailingScore = 30;
public static var priceArray = [0, 0, 0, 0, 0, 0, 0, 0];
public static var waiterArray = [[680, 260]];
public static var soundFlag = true;
public static var estabScoreArray = [6, 15, 6, 6, 6, 15, 6, 9, 15];
public static var guestArray1 = [[650, 350], [300, 360], [180, 360], [105, 205], [280, 250], [430, 250], [580, 130], [390, 150], [345, 150], [170, 150]];
public static var guestArray2 = [[650, 350], [358, 338], [130, 403], [-2, 154], [295, 258], [418, 204], [540, 35], [370.8, 127], [320, 126.8], [73, 56]];
public static var soundVoices = 0.5;
public static var leftguardArray = [800, 300];
public static var helpSuccessScore = 15;
public function waiterArray(){
}
}
}//package
Section 66
//RandRange (RandRange)
package {
public class RandRange {
static function getInt(_arg1:Number, _arg2:Number):Number{
var _local3:*;
_local3 = Math.random();
return (Math.round((_arg1 + (_local3 * (_arg2 - _arg1)))));
}
static function getFloat(_arg1:Number, _arg2:Number):Number{
var _local3:*;
_local3 = Math.random();
return ((_arg1 + (_local3 * (_arg2 - _arg1))));
}
}
}//package
Section 67
//requiedo (requiedo)
package {
class requiedo {
public function actionrequie(_arg1:Array, _arg2:Array){
var _local3:int;
var _local4:*;
_local4 = _arg1.length;
_local3 = Math.round((0 + (Math.random() * (_local4 - 1))));
trace(_local3);
}
}
}//package
Section 68
//sand (sand)
package {
import flash.display.*;
public dynamic class sand extends MovieClip {
public var sandboy:MovieClip;
}
}//package
Section 69
//shop (shop)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class shop extends MovieClip {
public var okbtn:SimpleButton;
var shopPriceArray;
public var t0:TextField;
public var t2:TextField;
public var t3:TextField;
public var t7:TextField;
public var t1:TextField;
var shopDoFlag;// = false
public var t5:TextField;
public var beacombtn:MovieClip;
public var t4:TextField;
var addBaseArray;
public var chairbtn:MovieClip;
public var t6:TextField;
public var blanketbtn:MovieClip;
public var surfbtn:MovieClip;
public var goldText:TextField;
public var buoybtn:MovieClip;
var parentMC;
public var motorbtn:MovieClip;
public var scoreText:TextField;
public var banbtn:MovieClip;
public var palmbtn:MovieClip;
static var shopArray = [1, 1, 1, 1, 1, 1, 1, 1];
public function shop(){
shopPriceArray = [200, 300, 250, 300, 350, 350, 300, 400];
addBaseArray = [3, 3, 2, 4];
shopDoFlag = false;
super();
setshop();
t0.text = shopPriceArray[0];
t1.text = shopPriceArray[1];
t2.text = shopPriceArray[2];
t3.text = shopPriceArray[3];
t4.text = shopPriceArray[4];
t5.text = shopPriceArray[5];
t6.text = shopPriceArray[6];
t7.text = shopPriceArray[7];
}
public function setshopBtn():void{
buoybtn.gotoAndStop(shopArray[0]);
motorbtn.gotoAndStop(shopArray[1]);
chairbtn.gotoAndStop(shopArray[2]);
surfbtn.gotoAndStop(shopArray[3]);
banbtn.gotoAndStop(shopArray[4]);
palmbtn.gotoAndStop(shopArray[5]);
blanketbtn.gotoAndStop(shopArray[6]);
beacombtn.gotoAndStop(shopArray[7]);
}
public function addestablishment(_arg1:Event){
var _local2:*;
trace(((_arg1.target + " ") + _arg1.target.name));
switch (_arg1.target.name){
case "buoybtn":
buoybtn.gotoAndStop(2);
shopArray[0] = 2;
posArray.priceArray[0] = 1;
parentMC.nowgoal = (parentMC.nowgoal - shopPriceArray[0]);
setBtn();
shopDoFlag = true;
_local2 = 0;
while (_local2 < posArray.levelGuestNumArray.length) {
posArray.levelGuestNumArray[_local2] = (posArray.levelGuestNumArray[_local2] + 1);
_local2++;
};
break;
case "motorbtn":
motorbtn.gotoAndStop(2);
trace(_arg1.target.name);
shopArray[1] = 2;
posArray.priceArray[1] = 1;
parentMC.nowgoal = (parentMC.nowgoal - shopPriceArray[1]);
setBtn();
_local2 = 0;
while (_local2 < posArray.levelGuestNumArray.length) {
posArray.levelGuestNumArray[_local2] = (posArray.levelGuestNumArray[_local2] + 1);
_local2++;
};
shopDoFlag = true;
break;
case "chairbtn":
chairbtn.gotoAndStop(2);
shopArray[2] = 2;
posArray.priceArray[2] = 1;
parentMC.nowgoal = (parentMC.nowgoal - shopPriceArray[2]);
shopDoFlag = true;
setBtn();
_local2 = 0;
while (_local2 < posArray.levelGuestNumArray.length) {
posArray.levelGuestNumArray[_local2] = (posArray.levelGuestNumArray[_local2] + 1);
_local2++;
};
trace(_arg1.target.name);
break;
case "surfbtn":
surfbtn.gotoAndStop(2);
shopArray[3] = 2;
posArray.priceArray[3] = 1;
parentMC.nowgoal = (parentMC.nowgoal - shopPriceArray[3]);
shopDoFlag = true;
setBtn();
_local2 = 0;
while (_local2 < posArray.levelGuestNumArray.length) {
posArray.levelGuestNumArray[_local2] = (posArray.levelGuestNumArray[_local2] + 1);
_local2++;
};
trace(_arg1.target.name);
break;
case "banbtn":
banbtn.gotoAndStop(2);
shopArray[4] = 2;
posArray.priceArray[4] = 1;
parentMC.nowgoal = (parentMC.nowgoal - shopPriceArray[4]);
parentMC.baseScore = (parentMC.baseScore + addBaseArray[0]);
shopDoFlag = true;
setBtn();
trace(_arg1.target.name);
break;
case "palmbtn":
palmbtn.gotoAndStop(2);
shopArray[5] = 2;
posArray.priceArray[5] = 1;
parentMC.nowgoal = (parentMC.nowgoal - shopPriceArray[5]);
parentMC.baseScore = (parentMC.baseScore + addBaseArray[1]);
shopDoFlag = true;
setBtn();
trace(_arg1.target.name);
break;
case "blanketbtn":
blanketbtn.gotoAndStop(2);
shopArray[6] = 2;
posArray.priceArray[6] = 1;
parentMC.nowgoal = (parentMC.nowgoal - shopPriceArray[6]);
parentMC.baseScore = (parentMC.baseScore + addBaseArray[2]);
shopDoFlag = true;
setBtn();
trace(_arg1.target.name);
break;
case "beacombtn":
beacombtn.gotoAndStop(2);
shopArray[7] = 2;
posArray.priceArray[7] = 1;
parentMC.nowgoal = (parentMC.nowgoal - shopPriceArray[7]);
parentMC.baseScore = (parentMC.baseScore + addBaseArray[3]);
shopDoFlag = true;
setBtn();
trace(_arg1.target.name);
break;
};
}
public function okAndPlay(_arg1:Event){
if (shopDoFlag == true){
shopDoFlag = false;
this.parent.removeChild(this);
this.parentMC.playGame(null);
parentMC.level++;
};
}
public function setshop(){
buoybtn.addEventListener(MouseEvent.CLICK, addestablishment);
motorbtn.addEventListener(MouseEvent.CLICK, addestablishment);
chairbtn.addEventListener(MouseEvent.CLICK, addestablishment);
surfbtn.addEventListener(MouseEvent.CLICK, addestablishment);
banbtn.addEventListener(MouseEvent.CLICK, addestablishment);
palmbtn.addEventListener(MouseEvent.CLICK, addestablishment);
blanketbtn.addEventListener(MouseEvent.CLICK, addestablishment);
beacombtn.addEventListener(MouseEvent.CLICK, addestablishment);
okbtn.addEventListener(MouseEvent.CLICK, okAndPlay);
}
public function setShop():void{
if (((!((shopArray[0] == 4))) && (!((shopArray[0] == 2))))){
if (parentMC.nowgoal < shopPriceArray[0]){
shopArray[0] = 3;
};
};
if (((!((shopArray[1] == 4))) && (!((shopArray[1] == 2))))){
if (parentMC.nowgoal < shopPriceArray[1]){
shopArray[1] = 3;
};
};
if (((!((shopArray[2] == 4))) && (!((shopArray[2] == 2))))){
if (parentMC.nowgoal < shopPriceArray[2]){
shopArray[2] = 3;
};
};
if (((!((shopArray[3] == 4))) && (!((shopArray[3] == 2))))){
if (parentMC.nowgoal < shopPriceArray[3]){
shopArray[3] = 3;
};
};
if (((!((shopArray[4] == 4))) && (!((shopArray[4] == 2))))){
if (parentMC.nowgoal < shopPriceArray[4]){
shopArray[4] = 3;
};
};
if (((!((shopArray[5] == 4))) && (!((shopArray[5] == 2))))){
if (parentMC.nowgoal < shopPriceArray[5]){
shopArray[5] = 3;
};
};
if (((!((shopArray[6] == 4))) && (!((shopArray[6] == 2))))){
if (parentMC.nowgoal < shopPriceArray[6]){
shopArray[6] = 3;
};
};
if (((!((shopArray[7] == 4))) && (!((shopArray[7] == 2))))){
if (parentMC.nowgoal < shopPriceArray[7]){
shopArray[7] = 3;
};
};
goldText.text = ((parentMC.nowgoal + "/") + (posArray.levelScoreArray[parentMC.level] * posArray.scoreTogoal));
setshopBtn();
trace("------");
}
function setBtn(){
setShop();
}
}
}//package
Section 70
//sorFi (sorFi)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class sorFi extends MovieClip {
public var okbtn:SimpleButton;
public var levelText:TextField;
public var moueyText:TextField;
public var goalText:TextField;
public var scoreText:TextField;
var parentMC;
public function sorFi(){
addFrameScript(0, frame1, 1, frame2);
this.x = 0;
this.y = 0;
this.okbtn.addEventListener(MouseEvent.CLICK, playgame);
}
private function playgame(_arg1:MouseEvent):void{
if (this.currentFrame == 1){
parentMC.level = (parentMC.level + 1);
trace((parentMC.level + "��ǰ�Ĺ�"));
if (parentMC.level < 6){
this.parent.addChild(parentMC.shopping);
parentMC.setShop();
};
this.parent.removeChild(this);
if (parentMC.level >= 6){
Main.startIF.visible = true;
parentMC.level = 0;
parentMC.resetAll();
posArray.levelGuestNumArray = [3, 3, 3, 3, 3, 3];
parentMC.removeChild(parentMC.gameStart);
};
};
if (this.currentFrame == 2){
this.parent.removeChild(this);
parentMC.nowgoal = Math.round((parentMC.nowgoal / 2));
parentMC.playGame(null);
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 71
//stand1 (stand1)
package {
import flash.display.*;
public dynamic class stand1 extends MovieClip {
public var timehint:MovieClip;
}
}//package
Section 72
//stand2 (stand2)
package {
import flash.display.*;
public dynamic class stand2 extends MovieClip {
public var timehint:MovieClip;
}
}//package
Section 73
//startInterFace (startInterFace)
package {
import flash.display.*;
public dynamic class startInterFace extends MovieClip {
public var moreGameBtn:SimpleButton;
public var playBtn:SimpleButton;
public var optBtn:SimpleButton;
public var soundBtn:MovieClip;
}
}//package
Section 74
//sun (sun)
package {
import flash.display.*;
public dynamic class sun extends MovieClip {
}
}//package
Section 75
//surf (surf)
package {
import flash.display.*;
public dynamic class surf extends MovieClip {
}
}//package
Section 76
//swim (swim)
package {
import flash.display.*;
public dynamic class swim extends MovieClip {
public var timehint:MovieClip;
public function swim(){
addFrameScript(0, frame1, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function frame10(){
timehint.visible = true;
}
function frame6(){
timehint.visible = true;
}
function frame7(){
timehint.visible = true;
}
function frame1(){
timehint.visible = false;
}
function frame9(){
timehint.visible = true;
}
function frame8(){
timehint.visible = true;
}
}
}//package
Section 77
//waiter_boy (waiter_boy)
package {
import flash.display.*;
public dynamic class waiter_boy extends MovieClip {
}
}//package
Section 78
//waiter_girl (waiter_girl)
package {
import flash.display.*;
public dynamic class waiter_girl extends MovieClip {
public var toubiao:mouseshow;
}
}//package
Section 79
//waiterMove (waiterMove)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class waiterMove extends MovieClip {
var moveNum;// = 1
var moveSpeed:int;// = 8
var startheight;
var startPoint:Point;
var aimPoint:Point;
var moveOBJ:Object;
public var move_time:int;// = 0
var startwidth;
public var move_aimArray:Array;
var goorbackFlag;// = false
public var parentMC;
public var subArray:Array;
public function waiterMove(_arg1){
move_time = 0;
moveNum = 1;
moveSpeed = 8;
goorbackFlag = false;
super();
move_aimArray = new Array();
subArray = new Array();
parentMC = _arg1;
moveOBJ = _arg1.waiter;
aimPoint = new Point();
}
public function moveStart(){
if (move_aimArray.length > 0){
aimPoint.x = move_aimArray[0].x;
aimPoint.y = move_aimArray[0].y;
trace(((aimPoint + "目标点的位置") + " ---------------------9999999999999"));
moveOBJ.addEventListener(Event.ENTER_FRAME, moveXGo);
} else {
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveXGo);
};
}
public function dopause(){
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveXGo);
}
public function doreturn(){
if (move_aimArray.length > 0){
moveOBJ.addEventListener(Event.ENTER_FRAME, moveXGo);
};
}
public function move(_arg1, _arg2, _arg3){
var _local4:*;
move_time++;
move_aimArray.push(_arg2);
_local4 = 0;
while (_local4 < move_aimArray.length) {
_local4++;
};
subArray.push(_arg3);
startPoint = new Point();
startPoint.x = posArray.waiterArray[0][0];
startPoint.y = posArray.waiterArray[0][1];
startwidth = _arg1.width;
moveOBJ = _arg1;
if (move_aimArray.length == 1){
moveStart();
};
}
private function moveXGo(_arg1:Event):void{
if (moveNum == 1){
if (moveOBJ.x != aimPoint.x){
if (aimPoint.x > startPoint.x){
if (moveOBJ.currentLabel != "right"){
moveOBJ.gotoAndStop("right");
};
moveOBJ.x = (moveOBJ.x + moveSpeed);
if (moveOBJ.x > aimPoint.x){
moveOBJ.x = aimPoint.x;
};
} else {
if (aimPoint.x < startPoint.x){
if (moveOBJ.currentLabel != "left"){
moveOBJ.gotoAndStop("left");
};
moveOBJ.x = (moveOBJ.x - moveSpeed);
if (moveOBJ.x < aimPoint.x){
moveOBJ.x = aimPoint.x;
};
};
};
} else {
moveNum = 2;
trace("移除X加入Y");
};
};
if (moveNum == 2){
if (moveOBJ.y != aimPoint.y){
if (aimPoint.y > startPoint.y){
moveOBJ.y = (moveOBJ.y + moveSpeed);
if (moveOBJ.currentLabel != "font"){
moveOBJ.gotoAndStop("font");
};
if (moveOBJ.y > aimPoint.y){
moveOBJ.y = aimPoint.y;
};
} else {
if (aimPoint.y < startPoint.y){
if (moveOBJ.currentLabel != "back"){
moveOBJ.gotoAndStop("back");
};
moveOBJ.y = (moveOBJ.y - moveSpeed);
if (moveOBJ.y < aimPoint.y){
moveOBJ.y = aimPoint.y;
};
};
};
} else {
moveNum = 3;
guest.guestdoArray[subArray[0]] = true;
};
};
if (moveNum == 3){
if (moveOBJ.y != startPoint.y){
if (aimPoint.y > startPoint.y){
if (moveOBJ.currentLabel != "back"){
moveOBJ.gotoAndStop("back");
};
moveOBJ.y = (moveOBJ.y - moveSpeed);
if (moveOBJ.y < startPoint.y){
moveOBJ.y = startPoint.y;
};
} else {
if (aimPoint.y < startPoint.y){
if (moveOBJ.currentLabel != "font"){
moveOBJ.gotoAndStop("font");
};
moveOBJ.y = (moveOBJ.y + moveSpeed);
if (moveOBJ.y > startPoint.y){
moveOBJ.y = startPoint.y;
};
};
};
} else {
moveNum = 4;
};
};
if (moveNum == 4){
if (moveOBJ.x != startPoint.x){
if (aimPoint.x > startPoint.x){
moveOBJ.x = (moveOBJ.x - moveSpeed);
if (moveOBJ.currentLabel != "left"){
moveOBJ.gotoAndStop("left");
};
if (moveOBJ.x < startPoint.x){
moveOBJ.x = startPoint.x;
};
} else {
if (aimPoint.x < startPoint.x){
moveOBJ.x = (moveOBJ.x + moveSpeed);
if (moveOBJ.currentLabel != "right"){
moveOBJ.gotoAndStop("right");
};
if (moveOBJ.x > startPoint.x){
moveOBJ.x = startPoint.x;
};
};
};
} else {
if (moveOBJ.currentLabel != "stand"){
moveOBJ.gotoAndStop("stand");
};
move_aimArray.shift();
subArray.shift();
moveOBJ.removeEventListener(Event.ENTER_FRAME, moveXGo);
moveStart();
moveNum = 1;
};
};
}
}
}//package