Section 1
//acc_87 (PlazaMall_fla.acc_87)
package PlazaMall_fla {
import flash.display.*;
public dynamic class acc_87 extends MovieClip {
public function acc_87(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package PlazaMall_fla
Section 2
//acc_88 (PlazaMall_fla.acc_88)
package PlazaMall_fla {
import flash.display.*;
public dynamic class acc_88 extends MovieClip {
public function acc_88(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package PlazaMall_fla
Section 3
//acc_89 (PlazaMall_fla.acc_89)
package PlazaMall_fla {
import flash.display.*;
public dynamic class acc_89 extends MovieClip {
public var speed;
public function acc_89(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package PlazaMall_fla
Section 4
//Achievement_79 (PlazaMall_fla.Achievement_79)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Achievement_79 extends MovieClip {
public var notice:MovieClip;
public var iconClip:MovieClip;
public var iconPosition;
public function Achievement_79(){
addFrameScript(0, frame1);
}
function frame1(){
iconClip.gotoAndStop(iconPosition);
notice.gotoAndStop(iconPosition);
}
}
}//package PlazaMall_fla
Section 5
//AddGame_456 (PlazaMall_fla.AddGame_456)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class AddGame_456 extends MovieClip {
public function AddGame_456(){
addFrameScript(0, frame1);
}
public function link(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gamesfree.com/games/exclusive.html");
navigateToURL(_local2, "_blank");
}
function frame1(){
buttonMode = true;
addEventListener(MouseEvent.CLICK, link);
}
}
}//package PlazaMall_fla
Section 6
//Broken_213 (PlazaMall_fla.Broken_213)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Broken_213 extends MovieClip {
public var isBroken;
public function Broken_213(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package PlazaMall_fla
Section 7
//BrokenLight_289 (PlazaMall_fla.BrokenLight_289)
package PlazaMall_fla {
import flash.display.*;
public dynamic class BrokenLight_289 extends MovieClip {
public var isBroken;
public function BrokenLight_289(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package PlazaMall_fla
Section 8
//Closed_244 (PlazaMall_fla.Closed_244)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Closed_244 extends MovieClip {
public function Closed_244(){
addFrameScript(10, frame11, 21, frame22);
}
function frame22(){
stop();
}
function frame11(){
stop();
}
}
}//package PlazaMall_fla
Section 9
//ClosedDoor_234 (PlazaMall_fla.ClosedDoor_234)
package PlazaMall_fla {
import flash.display.*;
public dynamic class ClosedDoor_234 extends MovieClip {
public function ClosedDoor_234(){
addFrameScript(10, frame11, 21, frame22);
}
function frame22(){
stop();
}
function frame11(){
stop();
}
}
}//package PlazaMall_fla
Section 10
//ClosedDoor_267 (PlazaMall_fla.ClosedDoor_267)
package PlazaMall_fla {
import flash.display.*;
public dynamic class ClosedDoor_267 extends MovieClip {
public function ClosedDoor_267(){
addFrameScript(10, frame11, 21, frame22);
}
function frame22(){
stop();
}
function frame11(){
stop();
}
}
}//package PlazaMall_fla
Section 11
//ClosedDoor_273 (PlazaMall_fla.ClosedDoor_273)
package PlazaMall_fla {
import flash.display.*;
public dynamic class ClosedDoor_273 extends MovieClip {
public function ClosedDoor_273(){
addFrameScript(10, frame11, 21, frame22);
}
function frame22(){
stop();
}
function frame11(){
stop();
}
}
}//package PlazaMall_fla
Section 12
//Condition_109 (PlazaMall_fla.Condition_109)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Condition_109 extends MovieClip {
public function Condition_109(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package PlazaMall_fla
Section 13
//Credit_476 (PlazaMall_fla.Credit_476)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Credit_476 extends MovieClip {
public var btnBack:SimpleButton;
public function Credit_476(){
addFrameScript(0, frame1);
}
function frame1(){
btnBack.addEventListener(MouseEvent.CLICK, BackToMainMenu);
}
public function BackToMainMenu(_arg1:MouseEvent):void{
var _local2:*;
_local2 = this.parent;
_local2.gotoAndPlay("Exit Credit");
}
}
}//package PlazaMall_fla
Section 14
//crewBANDITarrested_339 (PlazaMall_fla.crewBANDITarrested_339)
package PlazaMall_fla {
import flash.display.*;
public dynamic class crewBANDITarrested_339 extends MovieClip {
public function crewBANDITarrested_339(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package PlazaMall_fla
Section 15
//crewBANDITBarrested_403 (PlazaMall_fla.crewBANDITBarrested_403)
package PlazaMall_fla {
import flash.display.*;
public dynamic class crewBANDITBarrested_403 extends MovieClip {
public function crewBANDITBarrested_403(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package PlazaMall_fla
Section 16
//crewBANDITCarrested_399 (PlazaMall_fla.crewBANDITCarrested_399)
package PlazaMall_fla {
import flash.display.*;
public dynamic class crewBANDITCarrested_399 extends MovieClip {
public function crewBANDITCarrested_399(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package PlazaMall_fla
Section 17
//Elevator_280 (PlazaMall_fla.Elevator_280)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Elevator_280 extends MovieClip {
public var myParent;
public function Elevator_280(){
addFrameScript(24, frame25);
}
function frame25(){
myParent = this.parent.parent;
myParent.isOpen = false;
}
}
}//package PlazaMall_fla
Section 18
//elgi_jalan_442 (PlazaMall_fla.elgi_jalan_442)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class elgi_jalan_442 extends MovieClip {
public var myParent;
public var newSE;
public function elgi_jalan_442(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
newSE = new SE_Intro_Walk();
newSE.play(0, 0, myParent.seTrans);
}
function frame1(){
myParent = this.parent;
newSE = new SE_Intro_Walk();
newSE.play(0, 0, myParent.seTrans);
}
}
}//package PlazaMall_fla
Section 19
//Game_500 (PlazaMall_fla.Game_500)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_500 extends MovieClip {
public const btnArr:Array;
public const objBtnArr:Array;
public const hireArr:Array;
public const btnEmployeeArr:Array;
public var pauseScreen:MovieClip;
public var crewNumber:TextField;
public var legend;
public var spdButton3x:SimpleButton;
public var vHappy;
public var BtnVisitorActive:MovieClip;
public var tipsHistory:MovieClip;
public var dayNightToggle:MovieClip;
public var btnStatistic:MovieClip;
public var nowBlur;
public var BoothActive:MovieClip;
public var food;
public var gameMenu:MovieClip;
public var employeeList:MovieClip;
public var boothParam:MovieClip;
public var employeeParam:MovieClip;
public var BtnBoothActive:MovieClip;
public var cashInfo:TextField;
public var spdOffPause:MovieClip;
public var tcNum;
public var btnMailBox:MovieClip;
public var tenantNumber:TextField;
public var btnEntertainment:MovieClip;
public var dayTime:Number;
public var spdOffResume:MovieClip;
public var btnSelect:MovieClip;
public var i;
public var BtnEmployeeActive:MovieClip;
public var addBlur;
public var visitorParam:MovieClip;
public var btnParameter;
public var vAngry;
public var dayMinute:Number;
public var tempSpeed:Number;
public var btnFood:MovieClip;
public var legendHelp:MovieClip;
public var general;
public var isPause;
public var csNum;
public var vNormal;
public var buttonList;
public var VisitorActive:MovieClip;
public var sectorConnection;
public var entertainmentSector:MovieClip;
public var playerName:TextField;
public var autoSavePosition:MovieClip;
public var scNum;
public var vUpset;
public var btnEmployee:MovieClip;
public var sectorList;
public var pauseSymbol:MovieClip;
public var btnAchievement:MovieClip;
public var allButtonDisable:Boolean;
public var objective:MovieClip;
public var parameterShown;
public var spdButtonResume:SimpleButton;
public var btnRestRoom:MovieClip;
public var visitorNumber:TextField;
public var foodSector:MovieClip;
public var btnElevator:MovieClip;
public var btnShop:MovieClip;
public var myParent;
public var EmployeeActive:MovieClip;
public var btnNextCity:SimpleButton;
public var btnLegend:MovieClip;
public var entertainment;
public var commentList;
public var speedActive1:MovieClip;
public var speedActive3:MovieClip;
public var speedActive2:MovieClip;
public var btnDrag:MovieClip;
public var employeeSector:MovieClip;
public var nextTownWarning:MovieClip;
public var btnHelp:SimpleButton;
public var spdButtonPause:SimpleButton;
public var dayPass:TextField;
public var btnMenu:MovieClip;
public var spdButton1x:SimpleButton;
public var parameterList;
public var shopSector:MovieClip;
public var spdButton2x:SimpleButton;
public function Game_500(){
btnArr = ["btnDrugStore", "btnBabyShop", "btnBookStore", "btnBoutiqueA", "btnBoutiqueB", "btnToyStore", "btnBarberShop", "btnJewelry", "btnSupermarket", "btnCake", "btnIceCream", "btnBurger", "btnSteak", "btnSushi", "btnCafe", "btnCinema", "btnGameCenter"];
objBtnArr = [BuildDrugStore, BuildBabyShop, BuildBookStore, BuildBoutiqueA, BuildBoutiqueB, BuildToyStore, BuildSalon, BuildJewelry, BuildSupermarket, BuildCake, BuildIceCream, BuildBurger, BuildSteak, BuildSushi, BuildCafe, BuildCinema, BuildGameCenter];
btnEmployeeArr = ["btnCleaningService", "btnTechnician", "btnSecurity"];
hireArr = [HireCleaningService, HireTechnician, HireSecurity];
super();
addFrameScript(0, frame1);
}
public function buttonMouseOver(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = _arg1.currentTarget;
if (_local2.btnDefault.buttonMode){
_local3 = buttonList.indexOf(_local2);
legend = new LegendWideBox();
legend.alignment = "Left";
if (_local3 >= 0){
legend.commentText = commentList[_local3];
};
myParent.noticeParent.addChild(legend);
};
}
public function sectorBtnClick(_arg1:MouseEvent):void{
var target:*;
var bParent:*;
var sIndex:*;
var newSE:*;
var temp:*;
var index:*;
var eIndex:*;
var event = _arg1;
target = event.currentTarget;
disableBuilding();
bParent = target.parent;
sIndex = bParent.btnList.indexOf(target);
if ((((myParent.cash - myParent.purchase) + myParent.recive) + myParent.recive) >= bParent.priceList[sIndex]){
var _local3 = target;
with (_local3) {
if (btnTog.canClick){
newSE = new SE_Select();
newSE.play(0, 0, myParent.seTransform);
if (name == "btnHall"){
temp = new BuildHall();
temp.x = (event.stageX - (temp.width / 2));
temp.y = (event.stageY - (temp.height / 2));
temp.alpha = 0.3;
myParent.buildParent.addChild(temp);
} else {
index = btnArr.indexOf(name);
if (index >= 0){
if (target.btnTog.tog){
temp = new (objBtnArr[index]);
temp.name = btnArr[index];
temp.x = (event.stageX - (temp.width / 2));
temp.y = (event.stageY - (temp.height / 2));
temp.alpha = 0.3;
myParent.buildParent.addChild(temp);
};
} else {
eIndex = btnEmployeeArr.indexOf(name);
if (eIndex >= 0){
if (target.btnTog.tog){
temp = new (hireArr[eIndex]);
temp.stat = btnEmployeeArr[eIndex];
temp.x = event.stageX;
temp.y = (event.stageY + (temp.height / 2));
temp.alpha = 0.3;
myParent.buildParent.addChild(temp);
};
};
};
};
} else {
newSE = new SE_SelectUnable();
newSE.play(0, 0, myParent.seTransform);
};
};
} else {
if (target.btnTog.canClick){
target.btnTog.tog = false;
myParent.addNotification("Not enough cash");
};
};
}
public function countBooth():void{
var _local1:*;
var _local2:*;
var _local3:*;
general = 0;
food = 0;
entertainment = 0;
_local1 = 0;
while (_local1 < myParent.tenantList.length) {
_local2 = myParent.tenantList[_local1];
_local3 = btnArr.indexOf(_local2.name);
if (_local3 > 14){
entertainment++;
} else {
if (_local3 > 8){
food++;
} else {
if (_local3 >= 0){
general++;
} else {
if ((_local2 is TenantHall)){
entertainment++;
};
};
};
};
_local1++;
};
}
public function LegendAppear(_arg1:MouseEvent):void{
legendHelp.visible = !(legendHelp.visible);
}
public function editFilter(_arg1:Event):void{
var _local2:GlowFilter;
if (btnMailBox.filters.length > 0){
if ((btnMailBox.filters[0] is GlowFilter)){
_local2 = btnMailBox.filters[0];
_local2.blurX = nowBlur;
_local2.blurY = nowBlur;
btnMailBox.filters = [_local2];
if (nowBlur >= 15){
addBlur = -2;
} else {
if (nowBlur < 3){
addBlur = 1;
};
};
nowBlur = (nowBlur + addBlur);
};
};
if (btnMailBox.btnDefault.tog){
if (tipsHistory.currentLabel == "all hide"){
tipsHistory.gotoAndPlay("begin reveal");
};
} else {
if (tipsHistory.currentLabel == "reveal"){
tipsHistory.removeEventListener(Event.ENTER_FRAME, tipsHistory.UpdatePosition);
tipsHistory.gotoAndPlay("begin hide");
};
};
}
public function CreateElevator(_arg1:MouseEvent):void{
var _local2:*;
disableBuilding();
if (((myParent.cash - myParent.purchase) + myParent.recive) >= myParent.SUPPORT_PRICE[0]){
if (btnElevator.btnDefault.tog){
_local2 = new BuildElevator();
_local2.name = "btnElevator";
_local2.x = (_arg1.stageX - (_local2.width / 2));
_local2.y = _arg1.stageY;
_local2.alpha = 0.3;
myParent.buildParent.addChild(_local2);
};
} else {
btnElevator.btnDefault.tog = false;
myParent.addNotification("Not enough cash");
};
}
public function removeAllListener():void{
removeEventListener(Event.ENTER_FRAME, changeDayTime);
removeEventListener(Event.ENTER_FRAME, sectorUpdate);
removeEventListener(Event.ENTER_FRAME, buttonUpdate);
removeEventListener(Event.ENTER_FRAME, CheckParameter);
tipsHistory.removeEventListener(Event.ENTER_FRAME, tipsHistory.UpdatePosition);
}
public function disableAllSector():void{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
while (_local1 < sectorList.length) {
_local2 = sectorList[_local1].sectorList;
_local3 = 0;
while (_local3 < _local2.btnList.length) {
_local2.btnList[_local3].btnTog.tog = false;
_local3++;
};
_local1++;
};
}
public function HideParameter(_arg1:Number=-1):void{
var _local2:*;
_local2 = 0;
while (_local2 < parameterList.length) {
if (_local2 != _arg1){
parameterList[_local2].visible = false;
} else {
parameterList[_local2].visible = !(parameterList[_local2].visible);
};
_local2++;
};
}
function frame1(){
isPause = false;
dayPass.autoSize = TextFieldAutoSize.CENTER;
myParent = root;
parameterList = new Array();
parameterList.push(VisitorActive);
parameterList.push(EmployeeActive);
parameterList.push(BoothActive);
HideParameter();
gameMenu.visible = false;
allButtonDisable = true;
addEventListener(Event.ENTER_FRAME, changeDayTime);
buttonList = new Array();
buttonList.push(btnDrag);
buttonList.push(btnShop);
buttonList.push(btnFood);
buttonList.push(btnEntertainment);
buttonList.push(btnRestRoom);
buttonList.push(btnElevator);
buttonList.push(btnEmployee);
buttonList.push(btnStatistic);
commentList = new Array();
commentList.push("Use for scroll screen with mouse");
commentList.push("Build Shop Center");
commentList.push("Build Food Center");
commentList.push("Build Entertainment");
commentList.push((("Restroom ($ " + myParent.MoneySplit(myParent.SUPPORT_PRICE[1])) + ".-)"));
commentList.push((("Elevator ($ " + myParent.MoneySplit(myParent.SUPPORT_PRICE[0])) + ".-)"));
commentList.push("Hire Employee");
commentList.push("View the Statistic");
btnRestRoom.addEventListener(MouseEvent.CLICK, CreateRestroom);
btnElevator.addEventListener(MouseEvent.CLICK, CreateElevator);
btnStatistic.addEventListener(MouseEvent.CLICK, ShowStatistic);
sectorList = new Array();
sectorList.push(shopSector);
sectorList.push(foodSector);
sectorList.push(entertainmentSector);
sectorList.push(employeeSector);
sectorConnection = new Array();
sectorConnection.push(btnShop);
sectorConnection.push(btnFood);
sectorConnection.push(btnEntertainment);
sectorConnection.push(btnEmployee);
i = 0;
while (i < buttonList.length) {
buttonList[i].addEventListener(MouseEvent.CLICK, deactiveAll);
buttonList[i].addEventListener(MouseEvent.MOUSE_OVER, buttonMouseOver);
buttonList[i].addEventListener(MouseEvent.MOUSE_OUT, btnCommentDisappear);
i++;
};
i = 0;
while (i < sectorList.length) {
sectorList[i].visible = false;
i++;
};
addEventListener(Event.ENTER_FRAME, sectorUpdate);
addEventListener(Event.ENTER_FRAME, buttonUpdate);
SectorButtonActive();
tempSpeed = -1;
btnMenu.addEventListener(MouseEvent.CLICK, MenuAppear);
btnLegend.addEventListener(MouseEvent.CLICK, LegendAppear);
btnAchievement.addEventListener(MouseEvent.CLICK, AchievementAppear);
btnSelect.addEventListener(MouseEvent.CLICK, btnSelectClicked);
btnSelect.addEventListener(MouseEvent.MOUSE_OVER, btnCommentAppear);
btnSelect.addEventListener(MouseEvent.MOUSE_OUT, btnCommentDisappear);
spdButtonPause.addEventListener(MouseEvent.CLICK, frezze);
spdButtonResume.addEventListener(MouseEvent.CLICK, normalSpeed);
spdButton1x.addEventListener(MouseEvent.CLICK, normalSpeed);
spdButton2x.addEventListener(MouseEvent.CLICK, fastSpeed);
spdButton3x.addEventListener(MouseEvent.CLICK, topSpeed);
btnParameter = new Array();
btnParameter.push(BtnVisitorActive);
btnParameter.push(BtnEmployeeActive);
btnParameter.push(BtnBoothActive);
i = 0;
while (i < btnParameter.length) {
btnParameter[i].buttonMode = true;
btnParameter[i].addEventListener(MouseEvent.CLICK, ParameterOnClick);
i++;
};
employeeList.visible = false;
parameterShown = null;
visitorParam.visible = false;
employeeParam.visible = false;
boothParam.visible = false;
addEventListener(Event.ENTER_FRAME, CheckParameter);
tipsHistory.visible = false;
btnMailBox.addEventListener(MouseEvent.CLICK, showHideTips);
btnMailBox.addEventListener(MouseEvent.CLICK, deactiveAll);
nowBlur = 2;
addBlur = 10;
addEventListener(Event.ENTER_FRAME, editFilter);
myParent.tutorialShow.visible = false;
myParent.tutorialShow.mouseChildren = false;
myParent.tutorialShow.mouseEnabled = false;
btnHelp.addEventListener(MouseEvent.CLICK, ToggleHelp);
}
public function btnSelectClicked(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
disableAllSector();
_local3 = 0;
while (_local3 < buttonList.length) {
buttonList[_local3].btnDefault.tog = false;
_local3++;
};
btnMailBox.btnDefault.tog = false;
disableBuilding();
}
public function btnCommentDisappear(_arg1:MouseEvent):void{
var event = _arg1;
try {
myParent.noticeParent.removeChild(legend);
} catch(e:Error) {
};
}
public function ShowStatistic(_arg1:MouseEvent):void{
disableBuilding();
if (btnStatistic.btnDefault.tog){
myParent.budget.appear = true;
};
}
public function changeDayTime(_arg1:Event):void{
if ((((dayTime >= 6)) && ((dayTime < 18)))){
dayNightToggle.gotoAndPlay("Day");
} else {
dayNightToggle.gotoAndPlay("Night");
};
dayNightToggle.longClock.rotation = (dayMinute * 6);
dayNightToggle.shortClock.rotation = (((dayTime % 12) * 30) + (dayMinute / 2));
spdButtonPause.visible = ((!(gameMenu.visible)) && ((myParent.gameSpeed > 0)));
spdButtonResume.visible = ((!(gameMenu.visible)) && ((myParent.gameSpeed == 0)));
spdButton1x.visible = !(((gameMenu.visible) || ((myParent.gameSpeed == 1))));
spdButton2x.visible = !(((gameMenu.visible) || ((myParent.gameSpeed == 2))));
spdButton3x.visible = !(((gameMenu.visible) || ((myParent.gameSpeed == 3))));
speedActive1.visible = !((myParent.gameSpeed == 0));
speedActive2.visible = !((myParent.gameSpeed == 0));
speedActive3.visible = !((myParent.gameSpeed == 0));
spdOffPause.visible = (tempSpeed > 0);
spdOffResume.visible = (tempSpeed == 0);
pauseScreen.visible = (myParent.gameSpeed <= 0);
pauseSymbol.visible = isPause;
}
public function buttonUpdate(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = false;
_local3 = 0;
while (_local3 < buttonList.length) {
if (buttonList[_local3].btnDefault.tog){
_local2 = true;
};
_local3++;
};
allButtonDisable = ((!(_local2)) && (!(btnMailBox.btnDefault.tog)));
if (allButtonDisable){
btnSelect.btnDefault.tog = true;
} else {
btnSelect.btnDefault.tog = false;
};
}
public function ToggleHelp(_arg1:MouseEvent):void{
var _local2:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
myParent.tutorialShow.visible = !(myParent.tutorialShow.visible);
}
public function deactiveButton():void{
var _local1:*;
btnSelect.btnDefault.buttonMode = false;
btnSelect.removeEventListener(MouseEvent.CLICK, btnSelectClicked);
_local1 = 0;
while (_local1 < buttonList.length) {
buttonList[_local1].btnDefault.buttonMode = false;
buttonList[_local1].removeEventListener(MouseEvent.CLICK, deactiveAll);
_local1++;
};
SectorButtonDeactive();
}
public function countEmployee():void{
var _local1:*;
var _local2:*;
csNum = 0;
tcNum = 0;
scNum = 0;
_local1 = 0;
while (_local1 < myParent.crewList.length) {
_local2 = myParent.crewList[_local1];
if ((((((_local2 is CrewCleaningServicelv1)) || ((_local2 is CrewCleaningServicelv2)))) || ((_local2 is CrewCleaningServicelv3)))){
csNum++;
} else {
if ((((((_local2 is CrewTechnicianlv1)) || ((_local2 is CrewTechnicianlv2)))) || ((_local2 is CrewTechnicianlv3)))){
tcNum++;
} else {
if ((((((_local2 is CrewSecuritylv1)) || ((_local2 is CrewSecuritylv2)))) || ((_local2 is CrewSecuritylv3)))){
scNum++;
};
};
};
_local1++;
};
}
public function ParameterOnClick(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
_local3 = _arg1.currentTarget;
if (_local3.name != "BtnEmployeeActive"){
HideParameter(btnParameter.indexOf(_local3));
employeeList.visible = false;
} else {
HideParameter();
employeeList.visible = !(employeeList.visible);
if (employeeList.visible){
employeeList.setCrewList();
};
};
}
public function deactiveAllButton():void{
var _local2 = btnMenu;
with (_local2) {
buttonMode = false;
gotoAndStop(2);
removeEventListener(MouseEvent.MOUSE_OVER, mouseOverEvent);
removeEventListener(MouseEvent.MOUSE_OUT, mouseOutEvent);
removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownEvent);
removeEventListener(MouseEvent.MOUSE_UP, mouseUpEvent);
};
deactiveButton();
}
public function SectorButtonDeactive():void{
var _local1:*;
var _local2:*;
i = 0;
while (i < sectorList.length) {
_local1 = sectorList[i].sectorList;
_local2 = 0;
while (_local2 < _local1.btnList.length) {
_local1.btnList[_local2].btnTog.buttonMode = false;
_local1.btnList[_local2].removeEventListener(MouseEvent.CLICK, sectorBtnClick);
_local2++;
};
i++;
};
}
public function getButtonActive():Number{
var _local1:*;
var _local2:*;
_local1 = -1;
_local2 = 0;
while (_local2 < buttonList.length) {
if (buttonList[_local2].btnDefault.tog){
_local1 = _local2;
};
_local2++;
};
return (_local1);
}
public function deactiveAll(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
_local3 = 0;
while (_local3 < buttonList.length) {
if (buttonList[_local3] != _arg1.currentTarget){
buttonList[_local3].btnDefault.tog = false;
};
_local3++;
};
if (((!((_arg1.currentTarget.name == "btnRestRoom"))) && (!((_arg1.currentTarget.name == "btnElevator"))))){
disableBuilding();
};
if (_arg1.currentTarget.name != "btnMailBox"){
btnMailBox.btnDefault.tog = false;
};
}
public function fastSpeed(_arg1:MouseEvent):void{
myParent.gameSpeed = 2;
isPause = false;
}
public function frezze(_arg1:MouseEvent):void{
myParent.gameSpeed = 0;
isPause = true;
}
public function AchievementAppear(_arg1:MouseEvent):void{
var _local2:*;
_local2 = new AchievementList();
_local2.name = "AchievementScreen";
this.addChild(_local2);
}
public function updateSector():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = 0;
while (_local1 < sectorList.length) {
_local2 = sectorList[_local1].sectorList;
_local3 = 0;
while (_local3 < _local2.amtList.length) {
_local4 = _local2.amtList[_local3];
if (sectorList[_local1].name == "employeeSector"){
_local4.amount.text = myParent.countEmployee(_local3);
} else {
_local4.amount.text = myParent.checkBuildLevel(_local4.relation.name);
};
_local3++;
};
_local1++;
};
}
public function normalSpeed(_arg1:MouseEvent):void{
myParent.gameSpeed = 1;
isPause = false;
}
public function CheckParameter(_arg1:Event):void{
if (VisitorActive.visible){
if (((!(visitorParam.visible)) && ((parameterShown == null)))){
visitorParam.gotoAndPlay("appear");
visitorParam.visible = true;
parameterShown = visitorParam;
};
} else {
if (visitorParam.currentLabel == "shown"){
visitorParam.gotoAndPlay("disappear");
};
};
EmployeeActive.visible = employeeList.visible;
if (BoothActive.visible){
if (((!(boothParam.visible)) && ((parameterShown == null)))){
boothParam.gotoAndPlay("appear");
boothParam.visible = true;
parameterShown = boothParam;
};
} else {
if (boothParam.currentLabel == "shown"){
boothParam.gotoAndPlay("disappear");
};
};
if (parameterShown == visitorParam){
countVisitorMood();
if (visitorParam.statisfied != null){
visitorParam.statisfied.Amount.text = vHappy;
};
if (visitorParam.normal != null){
visitorParam.normal.Amount.text = vNormal;
};
if (visitorParam.upset != null){
visitorParam.upset.Amount.text = vUpset;
};
if (visitorParam.angry != null){
visitorParam.angry.Amount.text = vAngry;
};
} else {
if (parameterShown == employeeParam){
countEmployee();
if (employeeParam.clnService != null){
employeeParam.clnService.Amount.text = csNum;
};
if (employeeParam.technician != null){
employeeParam.technician.Amount.text = tcNum;
};
if (employeeParam.security != null){
employeeParam.security.Amount.text = scNum;
};
} else {
if (parameterShown == boothParam){
countBooth();
if (boothParam.general != null){
boothParam.general.Amount.text = general;
};
if (boothParam.food != null){
boothParam.food.Amount.text = food;
};
if (boothParam.entertainment != null){
boothParam.entertainment.Amount.text = entertainment;
};
};
};
};
if (((!((parameterShown == null))) && ((parameterShown.currentLabel == "hide")))){
parameterShown = null;
};
}
public function disableBuilding():void{
var _local2 = myParent;
with (_local2) {
if (buildParent.numChildren > 0){
buildParent.removeChild(buildParent.getChildAt(0));
};
canBuild = false;
if (!btnStatistic.btnDefault.tog){
budget.appear = false;
};
};
}
public function showHideTips(_arg1:MouseEvent):void{
btnMailBox.filters = [];
}
public function sectorUpdate(_arg1:Event):void{
var _local2:*;
_local2 = 0;
while (_local2 < sectorList.length) {
if (!sectorList[_local2].visible){
sectorList[_local2].gotoAndPlay(0);
};
if (sectorList[_local2].currentFrame <= 1){
sectorList[_local2].visible = sectorConnection[_local2].btnDefault.tog;
} else {
if (((!(sectorConnection[_local2].btnDefault.tog)) && ((sectorList[_local2].currentFrame == 6)))){
sectorList[_local2].gotoAndPlay((sectorList[_local2].currentFrame + 1));
};
};
_local2++;
};
if (myParent.hall != null){
entertainmentSector.sectorList.btnHall.btnTog.deactiveButton();
} else {
entertainmentSector.sectorList.btnHall.btnTog.activeButton();
};
}
public function SectorButtonActive():void{
var _local1:*;
var _local2:*;
i = 0;
while (i < sectorList.length) {
_local1 = sectorList[i].sectorList;
_local2 = 0;
while (_local2 < _local1.btnList.length) {
_local1.btnList[_local2].btnTog.buttonMode = true;
_local1.btnList[_local2].addEventListener(MouseEvent.CLICK, sectorBtnClick);
_local2++;
};
i++;
};
}
public function activeAllButton():void{
var _local2 = btnMenu;
with (_local2) {
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, mouseOverEvent);
addEventListener(MouseEvent.MOUSE_OUT, mouseOutEvent);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownEvent);
addEventListener(MouseEvent.MOUSE_UP, mouseUpEvent);
};
activeButton();
}
public function CreateRestroom(_arg1:MouseEvent):void{
var _local2:*;
disableBuilding();
if (((myParent.cash - myParent.purchase) + myParent.recive) >= myParent.SUPPORT_PRICE[1]){
if (btnRestRoom.btnDefault.tog){
_local2 = new BuildRestroom();
_local2.name = "btnRestRoom";
_local2.x = (_arg1.stageX - (_local2.width / 2));
_local2.y = (_arg1.stageY - (_local2.height / 2));
_local2.alpha = 0.3;
myParent.buildParent.addChild(_local2);
};
} else {
btnRestRoom.btnDefault.tog = false;
myParent.addNotification("Not enough cash");
};
}
public function activeButton():void{
var _local1:*;
btnSelect.btnDefault.buttonMode = true;
btnSelect.addEventListener(MouseEvent.CLICK, btnSelectClicked);
_local1 = 0;
while (_local1 < buttonList.length) {
buttonList[_local1].btnDefault.buttonMode = true;
buttonList[_local1].addEventListener(MouseEvent.CLICK, deactiveAll);
_local1++;
};
SectorButtonActive();
}
public function topSpeed(_arg1:MouseEvent):void{
myParent.gameSpeed = 3;
isPause = false;
}
public function MenuAppear(_arg1:MouseEvent):void{
if (tempSpeed == -1){
tempSpeed = myParent.gameSpeed;
myParent.gameSpeed = 0;
gameMenu.visible = true;
deactiveAllButton();
};
}
public function btnCommentAppear(_arg1:MouseEvent):void{
if (btnSelect.btnDefault.buttonMode){
legend = new LegendWideBox();
legend.alignment = "Left";
legend.commentText = "Select arrow";
myParent.noticeParent.addChild(legend);
};
}
public function countVisitorMood():void{
var _local1:*;
var _local2:*;
vHappy = 0;
vNormal = 0;
vUpset = 0;
vAngry = 0;
_local1 = 0;
while (_local1 < myParent.visitorList.length) {
_local2 = myParent.visitorList[_local1];
if (_local2.mood > 75){
vHappy++;
} else {
if (_local2.mood > 50){
vNormal++;
} else {
if (_local2.mood > 25){
vUpset++;
} else {
vAngry++;
};
};
};
_local1++;
};
}
}
}//package PlazaMall_fla
Section 20
//Game_501 (PlazaMall_fla.Game_501)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_501 extends MovieClip {
public var sectorList:MovieClip;
public function Game_501(){
addFrameScript(5, frame6, 10, frame11);
}
function frame6(){
stop();
}
function frame11(){
this.visible = false;
sectorList.disableAllButton();
}
}
}//package PlazaMall_fla
Section 21
//Game_502 (PlazaMall_fla.Game_502)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_502 extends MovieClip {
public var btnList;
public var btnSushi:MovieClip;
public var amtSushi:MovieClip;
public var btnIceCream:MovieClip;
public var amtCake:MovieClip;
public var btnCafe:MovieClip;
public var amtBurger:MovieClip;
public var i;
public var btnSteak:MovieClip;
public var amtSteak:MovieClip;
public var myParent;
public var priceList;
public var amtList;
public var amtCafe:MovieClip;
public var amtIceCream:MovieClip;
public var commentList;
public var btnCake:MovieClip;
public var head;
public var btnBurger:MovieClip;
public function Game_502(){
addFrameScript(0, frame1);
}
public function btnCommentAppear(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = _arg1.currentTarget;
if (_local2.btnTog.buttonMode){
_local3 = this.parent.parent;
_local4 = btnList.indexOf(_arg1.currentTarget);
_local3.legend = new LegendWideBox();
_local3.legend.alignment = "Left";
if (_local4 >= 0){
_local5 = _local3.myParent.MoneySplit(priceList[_local4]);
_local3.legend.commentText = (((commentList[_local4] + " ($ ") + _local5) + ".-)");
};
head.noticeParent.addChild(_local3.legend);
};
}
public function DisableButton(_arg1:MouseEvent):void{
var _local2:*;
_local2 = 0;
while (_local2 < btnList.length) {
if (btnList[_local2] != _arg1.currentTarget){
btnList[_local2].btnTog.tog = false;
};
_local2++;
};
}
public function disableAllButton():void{
var _local1:*;
_local1 = 0;
while (_local1 < btnList.length) {
btnList[_local1].btnTog.tog = false;
_local1++;
};
}
function frame1(){
head = root;
btnList = new Array();
btnList.push(btnCake);
btnList.push(btnIceCream);
btnList.push(btnBurger);
btnList.push(btnSteak);
btnList.push(btnSushi);
btnList.push(btnCafe);
amtList = new Array();
amtList.push(amtCake);
amtList.push(amtIceCream);
amtList.push(amtBurger);
amtList.push(amtSteak);
amtList.push(amtSushi);
amtList.push(amtCafe);
commentList = new Array();
commentList.push("Build Cake Shop");
commentList.push("Build Ice Cream Counter");
commentList.push("Build Burger Store");
commentList.push("Build Steak 'n' Grill");
commentList.push("Build Sushi Bar");
commentList.push("Build Cafe");
priceList = new Array();
i = 0;
while (i < head.FOOD_PRICE.length) {
priceList.push(head.FOOD_PRICE[i]);
i++;
};
i = 0;
while (i < btnList.length) {
myParent = this.parent.parent;
btnList[i].addEventListener(MouseEvent.CLICK, DisableButton);
btnList[i].addEventListener(MouseEvent.MOUSE_OVER, btnCommentAppear);
btnList[i].addEventListener(MouseEvent.MOUSE_OUT, myParent.btnCommentDisappear);
i++;
};
InitButton();
}
public function InitButton():void{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
while (_local1 < btnList.length) {
_local2 = btnList[_local1];
amtList[_local1].relation = btnList[_local1];
_local3 = false;
_local3 = (head.totalTenantCanBuild.indexOf(_local2.name) >= 0);
if (!_local3){
_local2.visible = false;
amtList[_local1].visible = false;
} else {
amtList[_local1].amount.text = (head.checkBuildLevel(_local2.name) + "");
};
_local1++;
};
}
}
}//package PlazaMall_fla
Section 22
//Game_503 (PlazaMall_fla.Game_503)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_503 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 23
//Game_504 (PlazaMall_fla.Game_504)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_504 extends MovieClip {
public var tog;
public var canClick;
public function Game_504(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function activeButton():void{
var _local1:*;
if (!canClick){
addEventListener(MouseEvent.CLICK, onMouseClick);
canClick = true;
_local1 = this.parent;
_local1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
}
public function onMouseClick(_arg1:MouseEvent):void{
if (buttonMode){
tog = !(tog);
};
}
function frame3(){
stop();
}
function frame1(){
canClick = true;
tog = false;
stop();
this.buttonMode = true;
addEventListener(MouseEvent.CLICK, onMouseClick);
addEventListener(Event.ENTER_FRAME, buttonAnimation);
}
function frame2(){
stop();
}
public function buttonAnimation(_arg1:Event):void{
if (tog){
gotoAndPlay(3);
} else {
gotoAndPlay(2);
};
}
public function deactiveButton():void{
var _local1:*;
if (canClick){
removeEventListener(MouseEvent.CLICK, onMouseClick);
canClick = false;
_local1 = this.parent;
_local1.transform.colorTransform = new ColorTransform(0.5, 0.5, 0.5, 1, 0, 0, 0, 0);
};
}
}
}//package PlazaMall_fla
Section 24
//Game_505 (PlazaMall_fla.Game_505)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_505 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 25
//Game_506 (PlazaMall_fla.Game_506)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_506 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 26
//Game_507 (PlazaMall_fla.Game_507)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_507 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 27
//Game_508 (PlazaMall_fla.Game_508)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_508 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 28
//Game_509 (PlazaMall_fla.Game_509)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_509 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 29
//Game_510 (PlazaMall_fla.Game_510)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Game_510 extends MovieClip {
public var relation;
public var amount:TextField;
public function Game_510(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package PlazaMall_fla
Section 30
//Game_511 (PlazaMall_fla.Game_511)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_511 extends MovieClip {
public var sectorList:MovieClip;
public function Game_511(){
addFrameScript(5, frame6, 10, frame11);
}
function frame6(){
stop();
}
function frame11(){
this.visible = false;
sectorList.disableAllButton();
}
}
}//package PlazaMall_fla
Section 31
//Game_512 (PlazaMall_fla.Game_512)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_512 extends MovieClip {
public var amtToyStore:MovieClip;
public var btnList;
public var btnDrugStore:MovieClip;
public var btnBarberShop:MovieClip;
public var amtDrugStore:MovieClip;
public var amtBoutique:MovieClip;
public var btnBoutiqueB:MovieClip;
public var amtSalon:MovieClip;
public var btnBoutiqueA:MovieClip;
public var myParent;
public var btnBabyShop:MovieClip;
public var btnSupermarket:MovieClip;
public var btnBookStore:MovieClip;
public var priceList;
public var amtBookStore:MovieClip;
public var amtList;
public var amtClothingStore:MovieClip;
public var commentList;
public var btnToyStore:MovieClip;
public var amtSupermarket:MovieClip;
public var i;
public var btnJewelry:MovieClip;
public var amtBabyShop:MovieClip;
public var head;
public var amtJewelry:MovieClip;
public function Game_512(){
addFrameScript(0, frame1);
}
public function btnCommentAppear(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = _arg1.currentTarget;
if (_local2.btnTog.buttonMode){
_local3 = this.parent.parent;
_local4 = btnList.indexOf(_arg1.currentTarget);
_local3.legend = new LegendWideBox();
_local3.legend.alignment = "Left";
if (_local4 >= 0){
_local5 = _local3.myParent.MoneySplit(priceList[_local4]);
_local3.legend.commentText = (((commentList[_local4] + " ($ ") + _local5) + ".-)");
};
head.noticeParent.addChild(_local3.legend);
};
}
public function DisableButton(_arg1:MouseEvent):void{
var _local2:*;
_local2 = 0;
while (_local2 < btnList.length) {
if (btnList[_local2] != _arg1.currentTarget){
btnList[_local2].btnTog.tog = false;
};
_local2++;
};
}
public function disableAllButton():void{
var _local1:*;
_local1 = 0;
while (_local1 < btnList.length) {
btnList[_local1].btnTog.tog = false;
_local1++;
};
}
function frame1(){
head = root;
btnList = new Array();
btnList.push(btnDrugStore);
btnList.push(btnBabyShop);
btnList.push(btnBookStore);
btnList.push(btnBoutiqueA);
btnList.push(btnBoutiqueB);
btnList.push(btnToyStore);
btnList.push(btnBarberShop);
btnList.push(btnJewelry);
btnList.push(btnSupermarket);
amtList = new Array();
amtList.push(amtDrugStore);
amtList.push(amtBabyShop);
amtList.push(amtBookStore);
amtList.push(amtBoutique);
amtList.push(amtClothingStore);
amtList.push(amtToyStore);
amtList.push(amtSalon);
amtList.push(amtJewelry);
amtList.push(amtSupermarket);
commentList = new Array();
commentList.push("Build Drug Store");
commentList.push("Build Baby Shop");
commentList.push("Build Book Store");
commentList.push("Build Boutique");
commentList.push("Build Clothing Store");
commentList.push("Build Toy Store");
commentList.push("Build Beauty Salon");
commentList.push("Build Jewelry");
commentList.push("Build Supermarket");
priceList = new Array();
i = 0;
while (i < head.GENERAL_PRICE.length) {
priceList.push(head.GENERAL_PRICE[i]);
i++;
};
i = 0;
while (i < btnList.length) {
myParent = this.parent.parent;
btnList[i].addEventListener(MouseEvent.CLICK, DisableButton);
btnList[i].addEventListener(MouseEvent.MOUSE_OVER, btnCommentAppear);
btnList[i].addEventListener(MouseEvent.MOUSE_OUT, myParent.btnCommentDisappear);
i++;
};
InitButton();
}
public function InitButton():void{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
while (_local1 < btnList.length) {
_local2 = btnList[_local1];
amtList[_local1].relation = btnList[_local1];
_local3 = false;
_local3 = (head.totalTenantCanBuild.indexOf(_local2.name) >= 0);
if (!_local3){
_local2.visible = false;
amtList[_local1].visible = false;
} else {
amtList[_local1].amount.text = (head.checkBuildLevel(_local2.name) + "");
};
_local1++;
};
}
}
}//package PlazaMall_fla
Section 32
//Game_513 (PlazaMall_fla.Game_513)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_513 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 33
//Game_514 (PlazaMall_fla.Game_514)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_514 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 34
//Game_515 (PlazaMall_fla.Game_515)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_515 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 35
//Game_516 (PlazaMall_fla.Game_516)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_516 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 36
//Game_517 (PlazaMall_fla.Game_517)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_517 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 37
//Game_518 (PlazaMall_fla.Game_518)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_518 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 38
//Game_519 (PlazaMall_fla.Game_519)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_519 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 39
//Game_520 (PlazaMall_fla.Game_520)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_520 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 40
//Game_521 (PlazaMall_fla.Game_521)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_521 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 41
//Game_522 (PlazaMall_fla.Game_522)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_522 extends MovieClip {
public var securityList:MovieClip;
public var technicianList:MovieClip;
public var cleaningList:MovieClip;
public var crewList;
public var head;
public function Game_522(){
addFrameScript(0, frame1);
}
public function setButtonMode():void{
var i:*;
var temp:*;
var j:*;
i = 0;
while (i < numChildren) {
temp = getChildAt(i);
if (i < (numChildren - 1)){
temp.buttonMode = true;
temp.deactiveBar.visible = true;
j = 0;
while (j < 8) {
var _local2 = temp;
with (_local2) {
disableFloor[j].visible = false;
crewList[j].visible = false;
crewList[j].removeEventListener(Event.ENTER_FRAME, crewUpdate);
lvSymbol[j].visible = false;
btnPromote[j].visible = false;
disablePromote[j].visible = false;
promoteCost[j].visible = false;
workStatus[j].visible = false;
floorChange[j].visible = false;
};
j = (j + 1);
};
} else {
temp.buttonMode = false;
temp.deactiveBar.visible = false;
j = 0;
while (j < temp.crewList.length) {
temp.crewList[j].addEventListener(Event.ENTER_FRAME, temp.crewUpdate);
j = (j + 1);
};
};
i = (i + 1);
};
}
public function setCrewList():void{
var temp:*;
var i:*;
var pgNum:*;
crewList = new Array();
temp = getChildAt((numChildren - 1));
if (temp.name == "cleaningList"){
crewList = getCleaningList();
} else {
if (temp.name == "technicianList"){
crewList = getTechnicianList();
} else {
if (temp.name == "securityList"){
crewList = getSecurityList();
};
};
};
try {
pgNum = Math.ceil((crewList.length / 8));
if (pgNum < 1){
pgNum = 1;
};
if (temp.page > pgNum){
temp.page = 1;
};
if (temp.page < 1){
temp.page = pgNum;
};
temp.btnPrevPage.visible = (pgNum > 1);
temp.btnNextPage.visible = (pgNum > 1);
temp.pageNumber.text = ((temp.page + "/") + pgNum);
} catch(e:Error) {
};
i = 0;
while (i < temp.crewList.length) {
temp.crewList[i].relation = crewList[(i + ((temp.page - 1) * 8))];
if (temp.crewList[i].relation != null){
temp.crewList[i].visible = true;
temp.disableBar[i].alpha = 0;
temp.disableBar[i].buttonMode = true;
temp.disableFloor[i].visible = false;
temp.lvSymbol[i].visible = true;
temp.lvSymbol[i].updateLevel(temp.crewList[i].relation.cLevel);
temp.workStatus[i].visible = true;
temp.promoteCost[i].visible = true;
if (temp.crewList[i].relation.nextUpgrade){
temp.btnPromote[i].visible = true;
temp.disablePromote[i].visible = false;
temp.promoteCost[i].text = ("Promote: $" + head.MoneySplit(temp.crewList[i].relation.UPGRADE_COST));
} else {
temp.btnPromote[i].visible = false;
temp.disablePromote[i].visible = true;
temp.promoteCost[i].text = "Max Promotion";
};
temp.floorChange[i].visible = true;
if (temp.crewList[i].relation.shiftFloor == -1){
temp.floorChange[i].floorList.text = "All";
} else {
if (temp.crewList[i].relation.shiftFloor == 0){
temp.floorChange[i].floorList.text = "Ground";
} else {
temp.floorChange[i].floorList.text = ("Floor " + temp.crewList[i].relation.shiftFloor);
};
};
} else {
temp.crewList[i].visible = false;
temp.lvSymbol[i].visible = false;
temp.workStatus[i].visible = false;
temp.promoteCost[i].visible = false;
temp.disableBar[i].alpha = 1;
temp.disableBar[i].buttonMode = false;
temp.disableFloor[i].visible = true;
temp.btnPromote[i].visible = false;
temp.disablePromote[i].visible = false;
temp.floorChange[i].visible = false;
};
i = (i + 1);
};
}
function frame1(){
crewList = new Array();
head = root;
this.addChildAt(cleaningList, (numChildren - 1));
cleaningList.addEventListener(MouseEvent.CLICK, listClicked);
technicianList.addEventListener(MouseEvent.CLICK, listClicked);
securityList.addEventListener(MouseEvent.CLICK, listClicked);
setButtonMode();
}
public function getTechnicianList():Array{
var _local1:*;
var _local2:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < head.crewList.length) {
if ((((((head.crewList[_local2] is CrewTechnicianlv1)) || ((head.crewList[_local2] is CrewTechnicianlv2)))) || ((head.crewList[_local2] is CrewTechnicianlv3)))){
_local1.push(head.crewList[_local2]);
};
_local2++;
};
return (_local1);
}
public function getSecurityList():Array{
var _local1:*;
var _local2:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < head.crewList.length) {
if ((((((head.crewList[_local2] is CrewSecuritylv1)) || ((head.crewList[_local2] is CrewSecuritylv2)))) || ((head.crewList[_local2] is CrewSecuritylv3)))){
_local1.push(head.crewList[_local2]);
};
_local2++;
};
return (_local1);
}
public function promoteEmployee(_arg1:Event):void{
var target:*;
var clip:*;
var rgbR:*;
var rgbG:*;
var rgbB:*;
var ancestor:*;
var temp:*;
var cIndex:*;
var tParent:*;
var pIndex:*;
var elevatorTemp:*;
var eIndex:*;
var event = _arg1;
target = event.currentTarget;
clip = target.getChildByName("upgrade");
if (clip != null){
rgbR = (target.transform.colorTransform.redOffset / 0xFF);
rgbG = (target.transform.colorTransform.greenOffset / 0xFF);
rgbB = (target.transform.colorTransform.blueOffset / 0xFF);
if (clip.currentFrame <= 5){
rgbR = (rgbR + (1 / 5));
rgbG = (rgbG + (1 / 5));
rgbB = (rgbB + (1 / 5));
} else {
rgbR = (rgbR - (1 / 10));
rgbG = (rgbG - (1 / 10));
rgbB = (rgbB - (1 / 10));
};
if (rgbR < 0){
rgbR = 0;
};
if (rgbG < 0){
rgbG = 0;
};
if (rgbB < 0){
rgbB = 0;
};
if (clip.currentFrame == 5){
ancestor = target;
temp = new target.nextUpgrade();
temp.ancestor = ancestor;
temp.shiftFloor = ancestor.shiftFloor;
temp.alpha = ancestor.alpha;
temp.scaleX = ancestor.scaleX;
temp.filters = ancestor.filters;
temp.addChild(clip);
clip.gotoAndPlay((clip.currentFrame + 1));
temp.x = ancestor.x;
temp.y = ancestor.y;
cIndex = head.crewList.indexOf(ancestor);
head.crewList[cIndex] = temp;
if (ancestor.elevatorTarget != null){
elevatorTemp = ancestor.elevatorTarget;
eIndex = elevatorTemp.visitorWaiting.indexOf(ancestor);
if (eIndex >= 0){
elevatorTemp.visitorWaiting[eIndex] = temp;
};
eIndex = elevatorTemp.visitorList.indexOf(ancestor);
if (eIndex >= 0){
elevatorTemp.visitorList[eIndex] = temp;
};
};
try {
if (((!((ancestor.destination == null))) && ((ancestor.destination.worker == ancestor)))){
ancestor.destination.worker = temp;
};
} catch(e:Error) {
};
checkAllBandit(temp, ancestor);
ancestor.removeEventListener(Event.ENTER_FRAME, ancestor.Animation);
ancestor.removeEventListener(Event.ENTER_FRAME, ancestor.Behavior);
ancestor.removeEventListener(Event.ENTER_FRAME, ancestor.BackToWork);
ancestor.removeEventListener(MouseEvent.CLICK, head.EmployeeOnClick);
ancestor.removeEventListener(MouseEvent.MOUSE_OVER, head.VisitorOnOver);
ancestor.removeEventListener(MouseEvent.MOUSE_OUT, head.VisitorOnOut);
temp.addEventListener(MouseEvent.CLICK, head.EmployeeOnClick);
temp.addEventListener(MouseEvent.MOUSE_OVER, head.VisitorOnOver);
temp.addEventListener(MouseEvent.MOUSE_OUT, head.VisitorOnOut);
tParent = ancestor.parent;
pIndex = tParent.getChildIndex(ancestor);
tParent.addChildAt(temp, pIndex);
tParent.removeChild(ancestor);
target.removeEventListener(Event.ENTER_FRAME, promoteEmployee);
target = temp;
target.addEventListener(Event.ENTER_FRAME, promoteEmployee);
setCrewList();
};
target.transform.colorTransform = new ColorTransform(1, 1, 1, 1, (rgbR * 0xFF), (rgbG * 0xFF), (rgbB * 0xFF));
} else {
setCrewList();
target.removeEventListener(Event.ENTER_FRAME, promoteEmployee);
};
}
public function listClicked(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = _arg1.currentTarget;
if (_local2.buttonMode){
_local3 = new SE_Select();
_local3.play(0, 0, head.seTransform);
this.addChild(_local2);
setButtonMode();
setCrewList();
};
}
public function getCleaningList():Array{
var _local1:*;
var _local2:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < head.crewList.length) {
if ((((((head.crewList[_local2] is CrewCleaningServicelv1)) || ((head.crewList[_local2] is CrewCleaningServicelv2)))) || ((head.crewList[_local2] is CrewCleaningServicelv3)))){
_local1.push(head.crewList[_local2]);
};
_local2++;
};
return (_local1);
}
public function checkAllBandit(_arg1:MovieClip, _arg2:MovieClip):void{
var _local3:*;
var _local4:*;
var _local5:*;
_local3 = 0;
while (_local3 < head.banditList.length) {
_local4 = head.banditList[_local3];
_local5 = 0;
while (_local5 < _local4.securityDetected.length) {
if (_local4.securityDetected[_local5] == _arg2){
_local4.securityDetected[_local5] = _arg1;
};
_local5++;
};
_local5 = 0;
while (_local5 < _local4.pursuer.length) {
if (_local4.pursuer[_local5] == _arg2){
_local4.pursuer[_local5] = _arg1;
};
_local5++;
};
_local3++;
};
}
}
}//package PlazaMall_fla
Section 42
//Game_523 (PlazaMall_fla.Game_523)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_523 extends MovieClip {
public var disableFloor;
public var disableBar;
public var promoteCost1:TextField;
public var promoteCost2:TextField;
public var promoteCost3:TextField;
public var promoteCost4:TextField;
public var promoteCost5:TextField;
public var promoteCost6:TextField;
public var promoteCost8:TextField;
public var workStatus1:TextField;
public var workStatus3:TextField;
public var workStatus4:TextField;
public var workStatus5:TextField;
public var workStatus6:TextField;
public var workStatus7:TextField;
public var workStatus8:TextField;
public var workStatus2:TextField;
public var promoteCost7:TextField;
public var i;
public var workStatus;
public var page;
public var btnNextPage:SimpleButton;
public var disableFloor1:MovieClip;
public var disableFloor2:MovieClip;
public var lvSymbol1:MovieClip;
public var lvSymbol2:MovieClip;
public var lvSymbol3:MovieClip;
public var disableFloor7:MovieClip;
public var lvSymbol7:MovieClip;
public var disableFloor4:MovieClip;
public var pageNumber:TextField;
public var disableFloor6:MovieClip;
public var lvSymbol5:MovieClip;
public var lvSymbol6:MovieClip;
public var lvSymbol8:MovieClip;
public var disableFloor3:MovieClip;
public var lvSymbol4:MovieClip;
public var disableFloor8:MovieClip;
public var disableFloor5:MovieClip;
public var floorChange1:MovieClip;
public var floorChange2:MovieClip;
public var floorChange3:MovieClip;
public var floorChange4:MovieClip;
public var floorChange5:MovieClip;
public var floorChange6:MovieClip;
public var floorChange7:MovieClip;
public var floorChange8:MovieClip;
public var btnPromote1:SimpleButton;
public var btnPromote2:SimpleButton;
public var btnPromote3:SimpleButton;
public var btnPromote5:SimpleButton;
public var btnPromote7:SimpleButton;
public var btnPromote4:SimpleButton;
public var btnPromote8:SimpleButton;
public var btnClose:SimpleButton;
public var btnPromote6:SimpleButton;
public var floorChange;
public var disablePromote1:MovieClip;
public var disablePromote2:MovieClip;
public var disablePromote3:MovieClip;
public var disablePromote4:MovieClip;
public var disablePromote5:MovieClip;
public var disablePromote7:MovieClip;
public var disablePromote6:MovieClip;
public var disablePromote8:MovieClip;
public var disableBar4:MovieClip;
public var disableBar6:MovieClip;
public var disableBar5:MovieClip;
public var disableBar1:MovieClip;
public var disableBar3:MovieClip;
public var disableBar7:MovieClip;
public var disableBar8:MovieClip;
public var disableBar2:MovieClip;
public var crewList;
public var promoteCost;
public var cs1:MovieClip;
public var cs2:MovieClip;
public var cs3:MovieClip;
public var cs5:MovieClip;
public var cs8:MovieClip;
public var lvSymbol;
public var deactiveBar:MovieClip;
public var cs6:MovieClip;
public var cs7:MovieClip;
public var cs4:MovieClip;
public var btnPrevPage:SimpleButton;
public var head;
public var btnPromote;
public var disablePromote;
public function Game_523(){
addFrameScript(0, frame1);
}
public function nextPage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Close();
_local2.play(0, 0, head.seTransform);
_local3 = this.parent;
page++;
_local3.setCrewList();
}
public function changeFloor(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = _arg1.currentTarget;
_local3 = _local2.parent;
_local4 = floorChange.indexOf(_local3);
_local5 = this.parent;
_local6 = new SE_Select();
_local6.play(0, 0, head.seTransform);
if (_local2.name == "btnUpFloor"){
crewList[_local4].relation.shiftFloor++;
if (crewList[_local4].relation.shiftFloor >= (head.floorList.length - 1)){
crewList[_local4].relation.shiftFloor = -1;
};
} else {
if (_local2.name == "btnDownFloor"){
crewList[_local4].relation.shiftFloor--;
if (crewList[_local4].relation.shiftFloor < -1){
crewList[_local4].relation.shiftFloor = (head.floorList.length - 2);
};
};
};
_local5.setCrewList();
}
function frame1(){
head = root;
deactiveBar.jobDesk.text = "Technician";
page = 1;
disableBar = new Array();
disableBar.push(disableBar1);
disableBar.push(disableBar2);
disableBar.push(disableBar3);
disableBar.push(disableBar4);
disableBar.push(disableBar5);
disableBar.push(disableBar6);
disableBar.push(disableBar7);
disableBar.push(disableBar8);
disableFloor = new Array();
disableFloor.push(disableFloor1);
disableFloor.push(disableFloor2);
disableFloor.push(disableFloor3);
disableFloor.push(disableFloor4);
disableFloor.push(disableFloor5);
disableFloor.push(disableFloor6);
disableFloor.push(disableFloor7);
disableFloor.push(disableFloor8);
crewList = new Array();
crewList.push(cs1);
crewList.push(cs2);
crewList.push(cs3);
crewList.push(cs4);
crewList.push(cs5);
crewList.push(cs6);
crewList.push(cs7);
crewList.push(cs8);
lvSymbol = new Array();
lvSymbol.push(lvSymbol1);
lvSymbol.push(lvSymbol2);
lvSymbol.push(lvSymbol3);
lvSymbol.push(lvSymbol4);
lvSymbol.push(lvSymbol5);
lvSymbol.push(lvSymbol6);
lvSymbol.push(lvSymbol7);
lvSymbol.push(lvSymbol8);
btnPromote = new Array();
btnPromote.push(btnPromote1);
btnPromote.push(btnPromote2);
btnPromote.push(btnPromote3);
btnPromote.push(btnPromote4);
btnPromote.push(btnPromote5);
btnPromote.push(btnPromote6);
btnPromote.push(btnPromote7);
btnPromote.push(btnPromote8);
disablePromote = new Array();
disablePromote.push(disablePromote1);
disablePromote.push(disablePromote2);
disablePromote.push(disablePromote3);
disablePromote.push(disablePromote4);
disablePromote.push(disablePromote5);
disablePromote.push(disablePromote6);
disablePromote.push(disablePromote7);
disablePromote.push(disablePromote8);
promoteCost = new Array();
promoteCost.push(promoteCost1);
promoteCost.push(promoteCost2);
promoteCost.push(promoteCost3);
promoteCost.push(promoteCost4);
promoteCost.push(promoteCost5);
promoteCost.push(promoteCost6);
promoteCost.push(promoteCost7);
promoteCost.push(promoteCost8);
workStatus = new Array();
workStatus.push(workStatus1);
workStatus.push(workStatus2);
workStatus.push(workStatus3);
workStatus.push(workStatus4);
workStatus.push(workStatus5);
workStatus.push(workStatus6);
workStatus.push(workStatus7);
workStatus.push(workStatus8);
floorChange = new Array();
floorChange.push(floorChange1);
floorChange.push(floorChange2);
floorChange.push(floorChange3);
floorChange.push(floorChange4);
floorChange.push(floorChange5);
floorChange.push(floorChange6);
floorChange.push(floorChange7);
floorChange.push(floorChange8);
i = 0;
while (i < crewList.length) {
crewList[i].colorMod = -1;
i++;
};
i = 0;
while (i < btnPromote.length) {
btnPromote[i].addEventListener(MouseEvent.CLICK, promoteEmployee);
i++;
};
i = 0;
while (i < disableBar.length) {
disableBar[i].addEventListener(MouseEvent.CLICK, searchEmployee);
i++;
};
i = 0;
while (i < floorChange.length) {
floorChange[i].btnUpFloor.addEventListener(MouseEvent.CLICK, changeFloor);
floorChange[i].btnDownFloor.addEventListener(MouseEvent.CLICK, changeFloor);
i++;
};
btnPrevPage.addEventListener(MouseEvent.CLICK, prevPage);
btnNextPage.addEventListener(MouseEvent.CLICK, nextPage);
btnClose.addEventListener(MouseEvent.CLICK, closeList);
}
public function searchEmployee(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:BitmapFilter;
var _local7:*;
var _local8:*;
_local2 = _arg1.currentTarget;
if (_local2.buttonMode){
_local3 = new SE_Select();
_local3.play(0, 0, head.seTransform);
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local8 = head.menuParent.getChildAt(0);
_local8.closeMenu();
};
_local4 = new UI_EmployeeInformation();
_local4.x = head.menuX;
_local4.y = head.menuY;
head.menuParent.addChild(_local4);
_local5 = disableBar.indexOf(_local2);
head.visitorFocus = crewList[_local5].relation;
_local6 = new GlowFilter(0xFF8800, 0.9, 5, 5, 2);
_local7 = new Array();
_local7.push(_local6);
head.visitorFocus.filters = _local7;
this.parent.visible = false;
};
}
public function promoteEmployee(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local2 = _arg1.currentTarget;
_local3 = btnPromote.indexOf(_local2);
if (((head.cash - head.purchase) + head.recive) >= crewList[_local3].relation.UPGRADE_COST){
_local4 = new SE_Popularity();
_local4.play(0, 0, head.seTransform);
_local5 = 0;
while (_local5 < disableBar.length) {
disableBar[_local5].buttonMode = false;
_local5++;
};
_local6 = this.parent;
_local7 = new fx_upgrade_crew();
_local7.name = "upgrade";
btnPromote[_local3].visible = false;
disablePromote[_local3].visible = true;
crewList[_local3].relation.addChild(_local7);
crewList[_local3].relation.addEventListener(Event.ENTER_FRAME, _local6.promoteEmployee);
head.addCashUpdate(crewList[_local3].relation.UPGRADE_COST, crewList[_local3].relation.worldX, (crewList[_local3].relation.worldY - crewList[_local3].relation.height), false);
} else {
head.addNotification("Not enough cash");
};
}
public function closeList(_arg1:MouseEvent):void{
this.parent.visible = false;
}
public function prevPage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Close();
_local2.play(0, 0, head.seTransform);
_local3 = this.parent;
page--;
_local3.setCrewList();
}
public function crewUpdate(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = _arg1.currentTarget;
_local3 = crewList.indexOf(_local2);
if (((_local2.visible) && (!((_local2.relation == null))))){
_local2.work.visible = _local2.relation.isRepairing;
_local2.workSymbol.visible = _local2.relation.isRepairing;
_local2.walk.visible = ((!(_local2.relation.isRepairing)) && (!((_local2.relation.dx == 0))));
_local2.stanby.visible = (((_local2.relation.dx == 0)) || (_local2.relation.isRepairing));
_local2.scaleX = _local2.relation.scaleX;
if (_local2.relation.getChildByName("upgrade") != null){
_local4 = _local2.relation.getChildByName("upgrade");
if (_local2.getChildByName("upgrade") == null){
_local5 = new fx_upgrade_crew();
_local5.name = "upgrade";
_local5.gotoAndPlay(_local4.currentFrame);
_local2.addChild(_local5);
};
};
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, _local2.relation.transform.colorTransform.redOffset, _local2.relation.transform.colorTransform.greenOffset, _local2.relation.transform.colorTransform.blueOffset, 0);
if (_local2.relation.goHome){
if ((((_local2.relation.worldX >= 0)) && ((_local2.relation.worldX <= head.MAX_WIDTH)))){
if (workStatus[_local3].text.toUpperCase() != "Leaving".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF8800;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Leaving";
};
} else {
if (workStatus[_local3].text.toUpperCase() != "Out of duty".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF0000;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Out of duty";
};
};
} else {
if (workStatus[_local3].text.toUpperCase() != "Working".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF00;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Working";
};
};
if (_local2.currentFrame != _local2.relation.cLevel){
_local2.gotoAndStop(_local2.relation.cLevel);
};
};
}
}
}//package PlazaMall_fla
Section 43
//Game_524 (PlazaMall_fla.Game_524)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Game_524 extends MovieClip {
public var jobDesk:TextField;
public function Game_524(){
addFrameScript(0, frame1);
}
function frame1(){
jobDesk.autoSize = TextFieldAutoSize.CENTER;
}
}
}//package PlazaMall_fla
Section 44
//Game_525 (PlazaMall_fla.Game_525)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_525 extends MovieClip {
public var workSymbol:legendunderconstruction;
public var relation;
public var stanby:MovieClip;
public var work:MovieClip;
public var colorMod;
public var walk:MovieClip;
public function Game_525(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
function frame1(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
function frame2(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
}
}//package PlazaMall_fla
Section 45
//Game_528 (PlazaMall_fla.Game_528)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Game_528 extends MovieClip {
public var btnUpFloor:SimpleButton;
public var btnDownFloor:SimpleButton;
public var floorList:TextField;
public function Game_528(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PlazaMall_fla
Section 46
//Game_531 (PlazaMall_fla.Game_531)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_531 extends MovieClip {
public var lvSymbol;
public var lv2:MovieClip;
public var lv3:MovieClip;
public var lv1:MovieClip;
public function Game_531(){
addFrameScript(0, frame1);
}
public function updateLevel(_arg1:Number):void{
var _local2:*;
_local2 = 0;
while (_local2 < lvSymbol.length) {
if (_local2 < _arg1){
lvSymbol[_local2].gotoAndStop(2);
} else {
lvSymbol[_local2].gotoAndStop(1);
};
_local2++;
};
}
function frame1(){
lvSymbol = new Array();
lvSymbol.push(lv1);
lvSymbol.push(lv2);
lvSymbol.push(lv3);
}
}
}//package PlazaMall_fla
Section 47
//Game_536 (PlazaMall_fla.Game_536)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_536 extends MovieClip {
public var disableFloor;
public var disableBar;
public var promoteCost1:TextField;
public var promoteCost2:TextField;
public var promoteCost3:TextField;
public var promoteCost4:TextField;
public var promoteCost5:TextField;
public var promoteCost6:TextField;
public var promoteCost8:TextField;
public var workStatus1:TextField;
public var workStatus3:TextField;
public var workStatus4:TextField;
public var workStatus5:TextField;
public var workStatus6:TextField;
public var workStatus7:TextField;
public var workStatus8:TextField;
public var workStatus2:TextField;
public var promoteCost7:TextField;
public var i;
public var workStatus;
public var page;
public var btnNextPage:SimpleButton;
public var disableFloor1:MovieClip;
public var disableFloor2:MovieClip;
public var lvSymbol1:MovieClip;
public var lvSymbol2:MovieClip;
public var lvSymbol3:MovieClip;
public var disableFloor7:MovieClip;
public var lvSymbol7:MovieClip;
public var disableFloor4:MovieClip;
public var pageNumber:TextField;
public var disableFloor6:MovieClip;
public var lvSymbol5:MovieClip;
public var lvSymbol6:MovieClip;
public var lvSymbol8:MovieClip;
public var disableFloor3:MovieClip;
public var lvSymbol4:MovieClip;
public var disableFloor8:MovieClip;
public var disableFloor5:MovieClip;
public var floorChange1:MovieClip;
public var floorChange2:MovieClip;
public var floorChange3:MovieClip;
public var floorChange4:MovieClip;
public var floorChange5:MovieClip;
public var floorChange6:MovieClip;
public var floorChange7:MovieClip;
public var floorChange8:MovieClip;
public var btnPromote1:SimpleButton;
public var btnPromote2:SimpleButton;
public var btnPromote3:SimpleButton;
public var btnPromote5:SimpleButton;
public var btnPromote7:SimpleButton;
public var btnPromote4:SimpleButton;
public var btnPromote8:SimpleButton;
public var btnClose:SimpleButton;
public var btnPromote6:SimpleButton;
public var floorChange;
public var disablePromote1:MovieClip;
public var disablePromote2:MovieClip;
public var disablePromote3:MovieClip;
public var disablePromote4:MovieClip;
public var disablePromote5:MovieClip;
public var disablePromote7:MovieClip;
public var disablePromote6:MovieClip;
public var disablePromote8:MovieClip;
public var disableBar4:MovieClip;
public var disableBar6:MovieClip;
public var disableBar5:MovieClip;
public var disableBar1:MovieClip;
public var disableBar3:MovieClip;
public var disableBar7:MovieClip;
public var disableBar8:MovieClip;
public var disableBar2:MovieClip;
public var crewList;
public var promoteCost;
public var cs1:MovieClip;
public var cs2:MovieClip;
public var cs3:MovieClip;
public var cs5:MovieClip;
public var cs8:MovieClip;
public var lvSymbol;
public var deactiveBar:MovieClip;
public var cs6:MovieClip;
public var cs7:MovieClip;
public var cs4:MovieClip;
public var btnPrevPage:SimpleButton;
public var head;
public var btnPromote;
public var disablePromote;
public function Game_536(){
addFrameScript(0, frame1);
}
public function nextPage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Close();
_local2.play(0, 0, head.seTransform);
_local3 = this.parent;
page++;
_local3.setCrewList();
}
public function changeFloor(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = _arg1.currentTarget;
_local3 = _local2.parent;
_local4 = floorChange.indexOf(_local3);
_local5 = this.parent;
_local6 = new SE_Select();
_local6.play(0, 0, head.seTransform);
if (_local2.name == "btnUpFloor"){
crewList[_local4].relation.shiftFloor++;
if (crewList[_local4].relation.shiftFloor >= (head.floorList.length - 1)){
crewList[_local4].relation.shiftFloor = -1;
};
} else {
if (_local2.name == "btnDownFloor"){
crewList[_local4].relation.shiftFloor--;
if (crewList[_local4].relation.shiftFloor < -1){
crewList[_local4].relation.shiftFloor = (head.floorList.length - 2);
};
};
};
_local5.setCrewList();
}
function frame1(){
head = root;
deactiveBar.jobDesk.text = "Security Agent";
page = 1;
disableBar = new Array();
disableBar.push(disableBar1);
disableBar.push(disableBar2);
disableBar.push(disableBar3);
disableBar.push(disableBar4);
disableBar.push(disableBar5);
disableBar.push(disableBar6);
disableBar.push(disableBar7);
disableBar.push(disableBar8);
disableFloor = new Array();
disableFloor.push(disableFloor1);
disableFloor.push(disableFloor2);
disableFloor.push(disableFloor3);
disableFloor.push(disableFloor4);
disableFloor.push(disableFloor5);
disableFloor.push(disableFloor6);
disableFloor.push(disableFloor7);
disableFloor.push(disableFloor8);
crewList = new Array();
crewList.push(cs1);
crewList.push(cs2);
crewList.push(cs3);
crewList.push(cs4);
crewList.push(cs5);
crewList.push(cs6);
crewList.push(cs7);
crewList.push(cs8);
lvSymbol = new Array();
lvSymbol.push(lvSymbol1);
lvSymbol.push(lvSymbol2);
lvSymbol.push(lvSymbol3);
lvSymbol.push(lvSymbol4);
lvSymbol.push(lvSymbol5);
lvSymbol.push(lvSymbol6);
lvSymbol.push(lvSymbol7);
lvSymbol.push(lvSymbol8);
btnPromote = new Array();
btnPromote.push(btnPromote1);
btnPromote.push(btnPromote2);
btnPromote.push(btnPromote3);
btnPromote.push(btnPromote4);
btnPromote.push(btnPromote5);
btnPromote.push(btnPromote6);
btnPromote.push(btnPromote7);
btnPromote.push(btnPromote8);
disablePromote = new Array();
disablePromote.push(disablePromote1);
disablePromote.push(disablePromote2);
disablePromote.push(disablePromote3);
disablePromote.push(disablePromote4);
disablePromote.push(disablePromote5);
disablePromote.push(disablePromote6);
disablePromote.push(disablePromote7);
disablePromote.push(disablePromote8);
promoteCost = new Array();
promoteCost.push(promoteCost1);
promoteCost.push(promoteCost2);
promoteCost.push(promoteCost3);
promoteCost.push(promoteCost4);
promoteCost.push(promoteCost5);
promoteCost.push(promoteCost6);
promoteCost.push(promoteCost7);
promoteCost.push(promoteCost8);
workStatus = new Array();
workStatus.push(workStatus1);
workStatus.push(workStatus2);
workStatus.push(workStatus3);
workStatus.push(workStatus4);
workStatus.push(workStatus5);
workStatus.push(workStatus6);
workStatus.push(workStatus7);
workStatus.push(workStatus8);
floorChange = new Array();
floorChange.push(floorChange1);
floorChange.push(floorChange2);
floorChange.push(floorChange3);
floorChange.push(floorChange4);
floorChange.push(floorChange5);
floorChange.push(floorChange6);
floorChange.push(floorChange7);
floorChange.push(floorChange8);
i = 0;
while (i < crewList.length) {
crewList[i].colorMod = -1;
i++;
};
i = 0;
while (i < btnPromote.length) {
btnPromote[i].addEventListener(MouseEvent.CLICK, promoteEmployee);
i++;
};
i = 0;
while (i < disableBar.length) {
disableBar[i].addEventListener(MouseEvent.CLICK, searchEmployee);
i++;
};
i = 0;
while (i < floorChange.length) {
floorChange[i].btnUpFloor.addEventListener(MouseEvent.CLICK, changeFloor);
floorChange[i].btnDownFloor.addEventListener(MouseEvent.CLICK, changeFloor);
i++;
};
btnPrevPage.addEventListener(MouseEvent.CLICK, prevPage);
btnNextPage.addEventListener(MouseEvent.CLICK, nextPage);
btnClose.addEventListener(MouseEvent.CLICK, closeList);
}
public function searchEmployee(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:BitmapFilter;
var _local7:*;
var _local8:*;
_local2 = _arg1.currentTarget;
if (_local2.buttonMode){
_local3 = new SE_Select();
_local3.play(0, 0, head.seTransform);
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local8 = head.menuParent.getChildAt(0);
_local8.closeMenu();
};
_local4 = new UI_EmployeeInformation();
_local4.x = head.menuX;
_local4.y = head.menuY;
head.menuParent.addChild(_local4);
_local5 = disableBar.indexOf(_local2);
head.visitorFocus = crewList[_local5].relation;
_local6 = new GlowFilter(0xFF8800, 0.9, 5, 5, 2);
_local7 = new Array();
_local7.push(_local6);
head.visitorFocus.filters = _local7;
this.parent.visible = false;
};
}
public function promoteEmployee(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local2 = _arg1.currentTarget;
_local3 = btnPromote.indexOf(_local2);
if (((head.cash - head.purchase) + head.recive) >= crewList[_local3].relation.UPGRADE_COST){
_local4 = new SE_Popularity();
_local4.play(0, 0, head.seTransform);
_local5 = 0;
while (_local5 < disableBar.length) {
disableBar[_local5].buttonMode = false;
_local5++;
};
_local6 = this.parent;
_local7 = new fx_upgrade_crew();
_local7.name = "upgrade";
btnPromote[_local3].visible = false;
disablePromote[_local3].visible = true;
crewList[_local3].relation.addChild(_local7);
crewList[_local3].relation.addEventListener(Event.ENTER_FRAME, _local6.promoteEmployee);
head.addCashUpdate(crewList[_local3].relation.UPGRADE_COST, crewList[_local3].relation.worldX, (crewList[_local3].relation.worldY - crewList[_local3].relation.height), false);
} else {
head.addNotification("Not enough cash");
};
}
public function closeList(_arg1:MouseEvent):void{
this.parent.visible = false;
}
public function prevPage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Close();
_local2.play(0, 0, head.seTransform);
_local3 = this.parent;
page--;
_local3.setCrewList();
}
public function crewUpdate(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = _arg1.currentTarget;
_local3 = crewList.indexOf(_local2);
if (((_local2.visible) && (!((_local2.relation == null))))){
_local2.work.visible = _local2.relation.isAction;
_local2.walk.visible = ((!(_local2.relation.isAction)) && (!((_local2.relation.dx == 0))));
_local2.stanby.visible = ((!(_local2.relation.isAction)) && ((_local2.relation.dx == 0)));
_local2.pursue.visible = ((!((_local2.relation.banditTarget == null))) || (!((head.banditTrigger == null))));
_local2.pursueSymbol.visible = ((!((_local2.relation.banditTarget == null))) || (!((head.banditTrigger == null))));
_local2.scaleX = _local2.relation.scaleX;
if (_local2.relation.getChildByName("upgrade") != null){
_local4 = _local2.relation.getChildByName("upgrade");
if (_local2.getChildByName("upgrade") == null){
_local5 = new fx_upgrade_crew();
_local5.name = "upgrade";
_local5.gotoAndPlay(_local4.currentFrame);
_local2.addChild(_local5);
};
};
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, _local2.relation.transform.colorTransform.redOffset, _local2.relation.transform.colorTransform.greenOffset, _local2.relation.transform.colorTransform.blueOffset, 0);
if (_local2.relation.goHome){
if ((((_local2.relation.worldX >= 0)) && ((_local2.relation.worldX <= head.MAX_WIDTH)))){
if (workStatus[_local3].text.toUpperCase() != "Leaving".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF8800;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Leaving";
};
} else {
if (workStatus[_local3].text.toUpperCase() != "Out of duty".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF0000;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Out of duty";
};
};
} else {
if (workStatus[_local3].text.toUpperCase() != "Working".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF00;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Working";
};
};
if (_local2.currentFrame != _local2.relation.cLevel){
_local2.gotoAndStop(_local2.relation.cLevel);
};
};
}
}
}//package PlazaMall_fla
Section 48
//Game_537 (PlazaMall_fla.Game_537)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_537 extends MovieClip {
public var relation;
public var pursue:MovieClip;
public var work:MovieClip;
public var pursueSymbol:legendstolen;
public var stanby:MovieClip;
public var colorMod;
public var walk:MovieClip;
public function Game_537(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
function frame1(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
function frame2(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
}
}//package PlazaMall_fla
Section 49
//Game_538 (PlazaMall_fla.Game_538)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_538 extends MovieClip {
public var disableFloor;
public var disableBar;
public var promoteCost1:TextField;
public var promoteCost2:TextField;
public var promoteCost3:TextField;
public var promoteCost4:TextField;
public var promoteCost5:TextField;
public var promoteCost6:TextField;
public var promoteCost8:TextField;
public var workStatus1:TextField;
public var workStatus3:TextField;
public var workStatus4:TextField;
public var workStatus5:TextField;
public var workStatus6:TextField;
public var workStatus7:TextField;
public var workStatus8:TextField;
public var workStatus2:TextField;
public var promoteCost7:TextField;
public var i;
public var workStatus;
public var page;
public var btnNextPage:SimpleButton;
public var disableFloor1:MovieClip;
public var disableFloor2:MovieClip;
public var lvSymbol1:MovieClip;
public var lvSymbol2:MovieClip;
public var lvSymbol3:MovieClip;
public var disableFloor7:MovieClip;
public var lvSymbol7:MovieClip;
public var disableFloor4:MovieClip;
public var pageNumber:TextField;
public var disableFloor6:MovieClip;
public var lvSymbol5:MovieClip;
public var lvSymbol6:MovieClip;
public var lvSymbol8:MovieClip;
public var disableFloor3:MovieClip;
public var lvSymbol4:MovieClip;
public var disableFloor8:MovieClip;
public var disableFloor5:MovieClip;
public var floorChange1:MovieClip;
public var floorChange2:MovieClip;
public var floorChange3:MovieClip;
public var floorChange4:MovieClip;
public var floorChange5:MovieClip;
public var floorChange6:MovieClip;
public var floorChange7:MovieClip;
public var floorChange8:MovieClip;
public var btnPromote1:SimpleButton;
public var btnPromote2:SimpleButton;
public var btnPromote3:SimpleButton;
public var btnPromote5:SimpleButton;
public var btnPromote7:SimpleButton;
public var btnPromote4:SimpleButton;
public var btnPromote8:SimpleButton;
public var btnClose:SimpleButton;
public var btnPromote6:SimpleButton;
public var floorChange;
public var disablePromote1:MovieClip;
public var disablePromote2:MovieClip;
public var disablePromote3:MovieClip;
public var disablePromote4:MovieClip;
public var disablePromote5:MovieClip;
public var disablePromote7:MovieClip;
public var disablePromote6:MovieClip;
public var disablePromote8:MovieClip;
public var disableBar4:MovieClip;
public var disableBar6:MovieClip;
public var disableBar5:MovieClip;
public var disableBar1:MovieClip;
public var disableBar3:MovieClip;
public var disableBar7:MovieClip;
public var disableBar8:MovieClip;
public var disableBar2:MovieClip;
public var crewList;
public var promoteCost;
public var cs1:MovieClip;
public var cs2:MovieClip;
public var cs3:MovieClip;
public var cs5:MovieClip;
public var cs8:MovieClip;
public var lvSymbol;
public var deactiveBar:MovieClip;
public var cs6:MovieClip;
public var cs7:MovieClip;
public var cs4:MovieClip;
public var btnPrevPage:SimpleButton;
public var head;
public var btnPromote;
public var disablePromote;
public function Game_538(){
addFrameScript(0, frame1);
}
public function nextPage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Close();
_local2.play(0, 0, head.seTransform);
_local3 = this.parent;
page++;
_local3.setCrewList();
}
public function changeFloor(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = _arg1.currentTarget;
_local3 = _local2.parent;
_local4 = floorChange.indexOf(_local3);
_local5 = this.parent;
_local6 = new SE_Select();
_local6.play(0, 0, head.seTransform);
if (_local2.name == "btnUpFloor"){
crewList[_local4].relation.shiftFloor++;
if (crewList[_local4].relation.shiftFloor >= (head.floorList.length - 1)){
crewList[_local4].relation.shiftFloor = -1;
};
} else {
if (_local2.name == "btnDownFloor"){
crewList[_local4].relation.shiftFloor--;
if (crewList[_local4].relation.shiftFloor < -1){
crewList[_local4].relation.shiftFloor = (head.floorList.length - 2);
};
};
};
_local5.setCrewList();
}
function frame1(){
head = root;
deactiveBar.jobDesk.text = "Cleaning Staff";
page = 1;
disableBar = new Array();
disableBar.push(disableBar1);
disableBar.push(disableBar2);
disableBar.push(disableBar3);
disableBar.push(disableBar4);
disableBar.push(disableBar5);
disableBar.push(disableBar6);
disableBar.push(disableBar7);
disableBar.push(disableBar8);
disableFloor = new Array();
disableFloor.push(disableFloor1);
disableFloor.push(disableFloor2);
disableFloor.push(disableFloor3);
disableFloor.push(disableFloor4);
disableFloor.push(disableFloor5);
disableFloor.push(disableFloor6);
disableFloor.push(disableFloor7);
disableFloor.push(disableFloor8);
crewList = new Array();
crewList.push(cs1);
crewList.push(cs2);
crewList.push(cs3);
crewList.push(cs4);
crewList.push(cs5);
crewList.push(cs6);
crewList.push(cs7);
crewList.push(cs8);
lvSymbol = new Array();
lvSymbol.push(lvSymbol1);
lvSymbol.push(lvSymbol2);
lvSymbol.push(lvSymbol3);
lvSymbol.push(lvSymbol4);
lvSymbol.push(lvSymbol5);
lvSymbol.push(lvSymbol6);
lvSymbol.push(lvSymbol7);
lvSymbol.push(lvSymbol8);
btnPromote = new Array();
btnPromote.push(btnPromote1);
btnPromote.push(btnPromote2);
btnPromote.push(btnPromote3);
btnPromote.push(btnPromote4);
btnPromote.push(btnPromote5);
btnPromote.push(btnPromote6);
btnPromote.push(btnPromote7);
btnPromote.push(btnPromote8);
disablePromote = new Array();
disablePromote.push(disablePromote1);
disablePromote.push(disablePromote2);
disablePromote.push(disablePromote3);
disablePromote.push(disablePromote4);
disablePromote.push(disablePromote5);
disablePromote.push(disablePromote6);
disablePromote.push(disablePromote7);
disablePromote.push(disablePromote8);
promoteCost = new Array();
promoteCost.push(promoteCost1);
promoteCost.push(promoteCost2);
promoteCost.push(promoteCost3);
promoteCost.push(promoteCost4);
promoteCost.push(promoteCost5);
promoteCost.push(promoteCost6);
promoteCost.push(promoteCost7);
promoteCost.push(promoteCost8);
workStatus = new Array();
workStatus.push(workStatus1);
workStatus.push(workStatus2);
workStatus.push(workStatus3);
workStatus.push(workStatus4);
workStatus.push(workStatus5);
workStatus.push(workStatus6);
workStatus.push(workStatus7);
workStatus.push(workStatus8);
floorChange = new Array();
floorChange.push(floorChange1);
floorChange.push(floorChange2);
floorChange.push(floorChange3);
floorChange.push(floorChange4);
floorChange.push(floorChange5);
floorChange.push(floorChange6);
floorChange.push(floorChange7);
floorChange.push(floorChange8);
i = 0;
while (i < crewList.length) {
crewList[i].colorMod = -1;
i++;
};
i = 0;
while (i < btnPromote.length) {
btnPromote[i].addEventListener(MouseEvent.CLICK, promoteEmployee);
i++;
};
i = 0;
while (i < disableBar.length) {
disableBar[i].addEventListener(MouseEvent.CLICK, searchEmployee);
i++;
};
i = 0;
while (i < floorChange.length) {
floorChange[i].btnUpFloor.addEventListener(MouseEvent.CLICK, changeFloor);
floorChange[i].btnDownFloor.addEventListener(MouseEvent.CLICK, changeFloor);
i++;
};
btnPrevPage.addEventListener(MouseEvent.CLICK, prevPage);
btnNextPage.addEventListener(MouseEvent.CLICK, nextPage);
btnClose.addEventListener(MouseEvent.CLICK, closeList);
}
public function searchEmployee(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:BitmapFilter;
var _local7:*;
var _local8:*;
_local2 = _arg1.currentTarget;
if (_local2.buttonMode){
_local3 = new SE_Select();
_local3.play(0, 0, head.seTransform);
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local8 = head.menuParent.getChildAt(0);
_local8.closeMenu();
};
_local4 = new UI_EmployeeInformation();
_local4.x = head.menuX;
_local4.y = head.menuY;
head.menuParent.addChild(_local4);
_local5 = disableBar.indexOf(_local2);
head.visitorFocus = crewList[_local5].relation;
_local6 = new GlowFilter(0xFF8800, 0.9, 5, 5, 2);
_local7 = new Array();
_local7.push(_local6);
head.visitorFocus.filters = _local7;
this.parent.visible = false;
};
}
public function promoteEmployee(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local2 = _arg1.currentTarget;
_local3 = btnPromote.indexOf(_local2);
if (((head.cash - head.purchase) + head.recive) >= crewList[_local3].relation.UPGRADE_COST){
_local4 = new SE_Popularity();
_local4.play(0, 0, head.seTransform);
_local5 = 0;
while (_local5 < disableBar.length) {
disableBar[_local5].buttonMode = false;
_local5++;
};
_local6 = this.parent;
_local7 = new fx_upgrade_crew();
_local7.name = "upgrade";
btnPromote[_local3].visible = false;
disablePromote[_local3].visible = true;
crewList[_local3].relation.addChild(_local7);
crewList[_local3].relation.addEventListener(Event.ENTER_FRAME, _local6.promoteEmployee);
head.addCashUpdate(crewList[_local3].relation.UPGRADE_COST, crewList[_local3].relation.worldX, (crewList[_local3].relation.worldY - crewList[_local3].relation.height), false);
} else {
head.addNotification("Not enough cash");
};
}
public function closeList(_arg1:MouseEvent):void{
this.parent.visible = false;
}
public function prevPage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Close();
_local2.play(0, 0, head.seTransform);
_local3 = this.parent;
page--;
_local3.setCrewList();
}
public function crewUpdate(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = _arg1.currentTarget;
_local3 = crewList.indexOf(_local2);
if (((_local2.visible) && (!((_local2.relation == null))))){
_local2.work.visible = _local2.relation.isCleaning;
_local2.walk.visible = ((!(_local2.relation.isCleaning)) && (!((_local2.relation.dx == 0))));
_local2.stanby.visible = ((!(_local2.relation.isCleaning)) && ((_local2.relation.dx == 0)));
_local2.scaleX = _local2.relation.scaleX;
if (_local2.relation.getChildByName("upgrade") != null){
_local4 = _local2.relation.getChildByName("upgrade");
if (_local2.getChildByName("upgrade") == null){
_local5 = new fx_upgrade_crew();
_local5.name = "upgrade";
_local5.gotoAndPlay(_local4.currentFrame);
_local2.addChild(_local5);
};
};
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, _local2.relation.transform.colorTransform.redOffset, _local2.relation.transform.colorTransform.greenOffset, _local2.relation.transform.colorTransform.blueOffset, 0);
if (_local2.relation.goHome){
if ((((_local2.relation.worldX >= 0)) && ((_local2.relation.worldX <= head.MAX_WIDTH)))){
if (workStatus[_local3].text.toUpperCase() != "Leaving".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF8800;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Leaving";
};
} else {
if (workStatus[_local3].text.toUpperCase() != "Out of duty".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF0000;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Out of duty";
};
};
} else {
if (workStatus[_local3].text.toUpperCase() != "Working".toUpperCase()){
_local6 = workStatus[_local3].defaultTextFormat;
_local6.color = 0xFF00;
workStatus[_local3].defaultTextFormat = _local6;
workStatus[_local3].text = "Working";
};
};
if (_local2.currentFrame != _local2.relation.cLevel){
_local2.gotoAndStop(_local2.relation.cLevel);
};
};
}
}
}//package PlazaMall_fla
Section 50
//Game_539 (PlazaMall_fla.Game_539)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_539 extends MovieClip {
public var relation;
public var stanby:MovieClip;
public var work:MovieClip;
public var colorMod;
public var walk:MovieClip;
public function Game_539(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
function frame1(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
function frame2(){
work.visible = false;
stanby.visible = false;
walk.visible = false;
stop();
}
}
}//package PlazaMall_fla
Section 51
//Game_546 (PlazaMall_fla.Game_546)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_546 extends MovieClip {
public var sectorList:MovieClip;
public function Game_546(){
addFrameScript(5, frame6, 10, frame11);
}
function frame6(){
stop();
}
function frame11(){
this.visible = false;
sectorList.disableAllButton();
}
}
}//package PlazaMall_fla
Section 52
//Game_547 (PlazaMall_fla.Game_547)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_547 extends MovieClip {
public var btnList;
public var amtTechnician:MovieClip;
public var i;
public var myParent;
public var amtSecurity:MovieClip;
public var btnCleaningService:MovieClip;
public var amtList;
public var commentList;
public var priceList;
public var amtCService:MovieClip;
public var btnSecurity:MovieClip;
public var btnTechnician:MovieClip;
public var head;
public function Game_547(){
addFrameScript(0, frame1);
}
public function btnCommentAppear(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = _arg1.currentTarget;
if (_local2.btnTog.buttonMode){
_local3 = this.parent.parent;
_local4 = btnList.indexOf(_arg1.currentTarget);
_local3.legend = new LegendWideBox();
_local3.legend.alignment = "Left";
if (_local4 >= 0){
_local5 = _local3.myParent.MoneySplit(priceList[_local4]);
_local3.legend.commentText = (((commentList[_local4] + " ($ ") + _local5) + ".-)");
};
head.noticeParent.addChild(_local3.legend);
};
}
public function DisableButton(_arg1:MouseEvent):void{
var _local2:*;
_local2 = 0;
while (_local2 < btnList.length) {
if (btnList[_local2] != _arg1.currentTarget){
btnList[_local2].btnTog.tog = false;
};
_local2++;
};
}
public function disableAllButton():void{
var _local1:*;
_local1 = 0;
while (_local1 < btnList.length) {
btnList[_local1].btnTog.tog = false;
_local1++;
};
}
function frame1(){
head = root;
btnList = new Array();
btnList.push(btnCleaningService);
btnList.push(btnTechnician);
btnList.push(btnSecurity);
amtList = new Array();
amtList.push(amtCService);
amtList.push(amtTechnician);
amtList.push(amtSecurity);
commentList = new Array();
commentList.push("Hire Cleaning staff");
commentList.push("Hire Technician");
commentList.push("Hire Security agent");
priceList = new Array();
i = 0;
while (i < head.EMPLOYEE_PRICE.length) {
priceList.push(head.EMPLOYEE_PRICE[i]);
i++;
};
i = 0;
while (i < btnList.length) {
myParent = this.parent.parent;
btnList[i].addEventListener(MouseEvent.CLICK, DisableButton);
btnList[i].addEventListener(MouseEvent.MOUSE_OVER, btnCommentAppear);
btnList[i].addEventListener(MouseEvent.MOUSE_OUT, myParent.btnCommentDisappear);
i++;
};
InitButton();
}
public function InitButton():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < btnList.length) {
_local2 = btnList[_local1];
amtList[_local1].relation = _local2;
amtList[_local1].amount.text = head.countEmployee(_local1);
_local1++;
};
}
}
}//package PlazaMall_fla
Section 53
//Game_548 (PlazaMall_fla.Game_548)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_548 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 54
//Game_549 (PlazaMall_fla.Game_549)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_549 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 55
//Game_550 (PlazaMall_fla.Game_550)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_550 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 56
//Game_551 (PlazaMall_fla.Game_551)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_551 extends MovieClip {
public var sectorList:MovieClip;
public function Game_551(){
addFrameScript(5, frame6, 10, frame11);
}
function frame6(){
stop();
}
function frame11(){
this.visible = false;
sectorList.disableAllButton();
}
}
}//package PlazaMall_fla
Section 57
//Game_552 (PlazaMall_fla.Game_552)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Game_552 extends MovieClip {
public var btnList;
public var btnGameCenter:MovieClip;
public var i;
public var btnCinema:MovieClip;
public var myParent;
public var priceList;
public var amtList;
public var commentList;
public var btnHall:MovieClip;
public var amtGameCenter:MovieClip;
public var amtCinema:MovieClip;
public var head;
public function Game_552(){
addFrameScript(0, frame1);
}
public function btnCommentAppear(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = _arg1.currentTarget;
_local3 = this.parent.parent;
if (_local2.btnTog.buttonMode){
if (_local2.btnTog.canClick){
_local4 = btnList.indexOf(_arg1.currentTarget);
_local3.legend = new LegendWideBox();
_local3.legend.alignment = "Left";
if (_local4 >= 0){
_local5 = _local3.myParent.MoneySplit(priceList[_local4]);
_local3.legend.commentText = (((commentList[_local4] + " ($ ") + _local5) + ".-)");
};
head.noticeParent.addChild(_local3.legend);
} else {
if (_local2.name == "btnHall"){
_local3.legend = new LegendWideBox();
_local3.legend.alignment = "Left";
_local3.legend.commentText = "Booth already exist";
head.noticeParent.addChild(_local3.legend);
};
};
};
}
public function DisableButton(_arg1:MouseEvent):void{
var _local2:*;
_local2 = 0;
while (_local2 < btnList.length) {
if (btnList[_local2] != _arg1.currentTarget){
btnList[_local2].btnTog.tog = false;
};
_local2++;
};
}
public function disableAllButton():void{
var _local1:*;
_local1 = 0;
while (_local1 < btnList.length) {
btnList[_local1].btnTog.tog = false;
_local1++;
};
}
function frame1(){
head = root;
btnList = new Array();
btnList.push(btnCinema);
btnList.push(btnGameCenter);
btnList.push(btnHall);
amtList = new Array();
amtList.push(amtCinema);
amtList.push(amtGameCenter);
commentList = new Array();
commentList.push("Build Movie Cinema");
commentList.push("Build Game Center");
commentList.push("Build Hall. Limited one");
priceList = new Array();
i = 0;
while (i < head.ENTERTAINMENT_PRICE.length) {
priceList.push(head.ENTERTAINMENT_PRICE[i]);
i++;
};
i = 0;
while (i < btnList.length) {
myParent = this.parent.parent;
btnList[i].addEventListener(MouseEvent.CLICK, DisableButton);
btnList[i].addEventListener(MouseEvent.MOUSE_OVER, btnCommentAppear);
btnList[i].addEventListener(MouseEvent.MOUSE_OUT, myParent.btnCommentDisappear);
i++;
};
InitButton();
}
public function InitButton():void{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
while (_local1 < btnList.length) {
_local2 = btnList[_local1];
_local3 = false;
_local3 = (head.totalTenantCanBuild.indexOf(_local2.name) >= 0);
if (!_local3){
_local2.visible = false;
};
if ((_local1 in amtList)){
if (!_local3){
amtList[_local1].visible = false;
} else {
amtList[_local1].amount.text = (head.checkBuildLevel(_local2.name) + "");
};
amtList[_local1].relation = btnList[_local1];
};
_local1++;
};
}
}
}//package PlazaMall_fla
Section 58
//Game_553 (PlazaMall_fla.Game_553)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_553 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 59
//Game_554 (PlazaMall_fla.Game_554)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_554 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 60
//Game_555 (PlazaMall_fla.Game_555)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_555 extends MovieClip {
public var btnTog:MovieClip;
}
}//package PlazaMall_fla
Section 61
//Game_556 (PlazaMall_fla.Game_556)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_556 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 62
//Game_557 (PlazaMall_fla.Game_557)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_557 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 63
//Game_558 (PlazaMall_fla.Game_558)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_558 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 64
//Game_559 (PlazaMall_fla.Game_559)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_559 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 65
//Game_560 (PlazaMall_fla.Game_560)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_560 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 66
//Game_561 (PlazaMall_fla.Game_561)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_561 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 67
//Game_562 (PlazaMall_fla.Game_562)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Game_562 extends MovieClip {
public function Game_562(){
addFrameScript(0, frame1);
}
public function mouseOverEvent(_arg1:MouseEvent):void{
gotoAndStop(3);
}
public function mouseDownEvent(_arg1:MouseEvent):void{
gotoAndStop(4);
}
public function mouseUpEvent(_arg1:MouseEvent):void{
gotoAndStop(3);
}
function frame1(){
buttonMode = true;
gotoAndStop(2);
stop();
addEventListener(MouseEvent.MOUSE_OVER, mouseOverEvent);
addEventListener(MouseEvent.MOUSE_OUT, mouseOutEvent);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownEvent);
addEventListener(MouseEvent.MOUSE_UP, mouseUpEvent);
}
public function mouseOutEvent(_arg1:MouseEvent):void{
gotoAndStop(2);
}
}
}//package PlazaMall_fla
Section 68
//Game_563 (PlazaMall_fla.Game_563)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Game_563 extends MovieClip {
public function Game_563(){
addFrameScript(0, frame1);
}
public function mouseOverEvent(_arg1:MouseEvent):void{
gotoAndStop(3);
}
public function mouseDownEvent(_arg1:MouseEvent):void{
gotoAndStop(4);
}
public function mouseUpEvent(_arg1:MouseEvent):void{
gotoAndStop(3);
}
function frame1(){
buttonMode = true;
gotoAndStop(2);
stop();
addEventListener(MouseEvent.MOUSE_OVER, mouseOverEvent);
addEventListener(MouseEvent.MOUSE_OUT, mouseOutEvent);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownEvent);
addEventListener(MouseEvent.MOUSE_UP, mouseUpEvent);
}
public function mouseOutEvent(_arg1:MouseEvent):void{
gotoAndStop(2);
}
}
}//package PlazaMall_fla
Section 69
//Game_564 (PlazaMall_fla.Game_564)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Game_564 extends MovieClip {
public function Game_564(){
addFrameScript(0, frame1);
}
public function mouseOverEvent(_arg1:MouseEvent):void{
gotoAndStop(3);
}
public function mouseDownEvent(_arg1:MouseEvent):void{
gotoAndStop(4);
}
public function mouseUpEvent(_arg1:MouseEvent):void{
gotoAndStop(3);
}
function frame1(){
buttonMode = true;
gotoAndStop(2);
stop();
addEventListener(MouseEvent.MOUSE_OVER, mouseOverEvent);
addEventListener(MouseEvent.MOUSE_OUT, mouseOutEvent);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownEvent);
addEventListener(MouseEvent.MOUSE_UP, mouseUpEvent);
}
public function mouseOutEvent(_arg1:MouseEvent):void{
gotoAndStop(2);
}
}
}//package PlazaMall_fla
Section 70
//Game_565 (PlazaMall_fla.Game_565)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_565 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 71
//Game_566 (PlazaMall_fla.Game_566)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_566 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 72
//Game_567 (PlazaMall_fla.Game_567)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_567 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 73
//Game_589 (PlazaMall_fla.Game_589)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Game_589 extends MovieClip {
public var btnDefault:MovieClip;
}
}//package PlazaMall_fla
Section 74
//gamesfre_pre_dragon_animation_423 (PlazaMall_fla.gamesfre_pre_dragon_animation_423)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class gamesfre_pre_dragon_animation_423 extends MovieClip {
public var head;
public function gamesfre_pre_dragon_animation_423(){
addFrameScript(86, frame87);
}
function frame87(){
head = root;
head.play();
stop();
}
}
}//package PlazaMall_fla
Section 75
//gamesfre_pre_mendengus_431 (PlazaMall_fla.gamesfre_pre_mendengus_431)
package PlazaMall_fla {
import flash.display.*;
public dynamic class gamesfre_pre_mendengus_431 extends MovieClip {
public function gamesfre_pre_mendengus_431(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package PlazaMall_fla
Section 76
//gamesfre_pre_preloader_gamesfree_422 (PlazaMall_fla.gamesfre_pre_preloader_gamesfree_422)
package PlazaMall_fla {
import flash.display.*;
public dynamic class gamesfre_pre_preloader_gamesfree_422 extends MovieClip {
public var dragonIcon:MovieClip;
}
}//package PlazaMall_fla
Section 77
//Help_495 (PlazaMall_fla.Help_495)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Help_495 extends MovieClip {
public var worldY:Number;
public var toiletList;
public var tenantList;
public function Help_495(){
addFrameScript(0, frame1);
}
function frame1(){
tenantList = new Array();
toiletList = new Array();
}
}
}//package PlazaMall_fla
Section 78
//Help_496 (PlazaMall_fla.Help_496)
package PlazaMall_fla {
import flash.display.*;
public dynamic class Help_496 extends MovieClip {
public var worldY:Number;
public function Help_496(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package PlazaMall_fla
Section 79
//IntroLittleGiant_440 (PlazaMall_fla.IntroLittleGiant_440)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class IntroLittleGiant_440 extends MovieClip {
public var seTrans;
public var vol;
public var head;
public var newSE;
public function IntroLittleGiant_440(){
addFrameScript(0, frame1, 1, frame2, 97, frame98, 142, frame143);
}
function frame143(){
head = root;
head.play();
stop();
}
function frame98(){
newSE = new SE_Intro_Explode();
newSE.play(0, 0, seTrans);
}
function frame1(){
seTrans = new SoundTransform();
}
function frame2(){
if (((!(vol)) && (!((vol == 0))))){
vol = 1;
};
seTrans.volume = vol;
}
}
}//package PlazaMall_fla
Section 80
//LoaderBox_17 (PlazaMall_fla.LoaderBox_17)
package PlazaMall_fla {
import flash.display.*;
public dynamic class LoaderBox_17 extends MovieClip {
public function LoaderBox_17(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PlazaMall_fla
Section 81
//MainTimeline (PlazaMall_fla.MainTimeline)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public const CAMERA_WIDTH = 640;
public const TipsList:Array;
public const MAX_Y_POSITION = 100;
public const SCROLL_SPEED = 15;
public const EMPLOYEE_PRICE:Array;
public const MAX_VISITOR = 250;
public const MAX_HEIGHT = 1500;
public const SUPPORT_PRICE:Array;
public const BANDIT_APPEAR = 15;
public const employeeArr:Array;
public const MAX_POPULARITY = 100;
public const tenantArr:Array;
public const ENTERTAINMENT_PRICE:Array;
public const MIN_BUILD_X = 100;
public const BGM_LIST:Array;
public const VISITOR_LIST:Array;
public const FOOD_PRICE:Array;
public const cityName:Array;
public const VISITOR_APPEAR = 10;
public const GENERAL_PRICE:Array;
public const EVENT_LIST:Array;
public const BANDIT_LIST:Array;
public const CAMERA_HEIGHT = 440;
public const TENANT_TEXT:Array;
public const SPECIAL_VISITOR_LIST:Array;
public var seVolume;
public var eventSelection;
public var night:MovieClip;
public var mallWidth;
public var alarmTransform;
public var aT;
public var banditCaptured;
public var flyingTextParent;
public var bgmEnvironment;
public var cleaningServiceOutcome;
public var achivementPosition:MovieClip;
public var lastPosX:Number;
public var lastPosY:Number;
public var hall;
public var mallLeft;
public var sch;
public var tipsRegion:MovieClip;
public var emptyParent:MovieClip;
public var tenantList;
public var i;
public var floorAverage:Number;
public var cloudList;
public var pillarParent:MovieClip;
public var canBuild:Boolean;
public var eventTime;
public var dayTime:Number;
public var backroundLayer:MovieClip;
public var handCursor:MovieClip;
public var mouse;
public var gameDelay;
public var visitorCanAppear;
public var buildParent:MovieClip;
public var eventCommentList;
public var mouseInUI:Boolean;
public var fi;
public var bgm:Sound;
public var dayMinute:Number;
public var dirtyDelay;
public var otherIncome;
public var numberVisitor;
public var startCity;
public var firstBandit;
public var robedBooth;
public var purchase;
public var scrollDown1;
public var finishMissionNotification;
public var visitorFocus;
public var playerName:String;
public var scrollDown2;
public var lastDayTime;
public var sky:MovieClip;
public var popularityModifier;
public var seTransform:SoundTransform;
public var firstBanditStealing;
public var technicianOutcome;
public var bgParent:MovieClip;
public var nowEvent;
public var city;
public var gamesfreeSplash:MovieClip;
public var specialVisitor;
public var finishMission;
public var ground:MovieClip;
public var dayTemp:Number;
public var mission;
public var noteRegion:MovieClip;
public var variables2:URLVariables;
public var crewList:Array;
public var noticeParent:MovieClip;
public var lastNumberUpset;
public var tutorialParent;
public var visitorDelay:Number;
public var lastEarning;
public var dayPass:Number;
public var userinterface:MovieClip;
public var cameraY:Number;
public var bgAccParent:MovieClip;
public var cameraX:Number;
public var mouseIsDown:Boolean;
public var tenantParent:MovieClip;
public var AutoSaveGame:SharedObject;
public var bgmVolume;
public var preloaderIcon:MovieClip;
public var numberUpset;
public var tutorialMode;
public var otherOutcome;
public var alarmTrigger;
public var bottom;
public var visitorList;
public var bookedEvent;
public var securityStep;
public var tipsHistory:Array;
public var scrollLeft2;
public var recive;
public var scrollLeft1;
public var seChannel:SoundChannel;
public var visitorOver;
public var maxVisitor:Number;
public var expandElevatorTutor;
public var loader2:URLLoader;
public var shiftKey;
public var defaultCityY;
public var sunset:MovieClip;
public var gameLoaded;
public var MAX_BUILD_X:Number;
public var elevatorList;
public var brokenDelay;
public var visitorParent:MovieClip;
public var scrollRight1;
public var scrollRight2;
public var floorList:Array;
public var menuOver;
public var menuX;
public var menuY;
public var banditList;
public var bgCity2:MovieClip;
public var menuParent:MovieClip;
public var MAX_WIDTH:Number;
public var mainMenuBGM;
public var mass:Number;
public var scrollUp1;
public var Achivement:SharedObject;
public var drawParent:MovieClip;
public var legendParent:MovieClip;
public var bgmChannel:SoundChannel;
public var dirtyParent:MovieClip;
public var scrollUp2;
public var cash;
public var popularity;
public var landmark:MovieClip;
public var noteParent;
public var budget:MovieClip;
public var tenantCanBuild;
public var bgCity:MovieClip;
public var banditDelay;
public var tutorialStep;
public var lastSpeed;
public var gameSpeed:Number;
public var SaveGameData:Array;
public var tutorialShow:MovieClip;
public var customContextMenu:ContextMenu;
public var banditTrigger;
public var request2:URLRequest;
public var bgmTransform:SoundTransform;
public var supportComment;
public var canClick;
public var commentList;
public var alarmTimer;
public var missionActive;
public var totalTenantCanBuild;
public var tBgm;
public var swapDelay;
public var IntroClip:MovieClip;
public var nextDayPopularity;
public var tutorialArrowParent;
public var canGameOver;
public var securityTutor;
public var restroomList;
public var drawArea:MovieClip;
public var securityOutcome;
public var mainMenuBGMChannel:SoundChannel;
public function MainTimeline(){
GENERAL_PRICE = [4000, 4000, 7500, 9000, 10000, 15000, 10000, 20000, 35000];
FOOD_PRICE = [5000, 5000, 8000, 20000, 15000, 20000];
ENTERTAINMENT_PRICE = [40000, 37500, 75000];
SUPPORT_PRICE = [4000, 2000];
EMPLOYEE_PRICE = [800, 1000, 1200];
EVENT_LIST = ["Art Exhibition", "Electronic Expo", "Live Concert"];
BGM_LIST = [BGMParis, BGMTokyo, BGMNewYork];
cityName = ["Paris", "Tokyo", "New York"];
tenantArr = [TenantDrugStore, TenantBabyShop, TenantBookStore, TenantBoutiqueA, TenantBoutiqueB, TenantToyStore, TenantSalon, TenantJewelry, TenantSupermarket, TenantCake, TenantIceCream, TenantBurger, TenantSteak, TenantSushi, TenantCafe, TenantCinema, TenantGameCenter];
TENANT_TEXT = ["Drug Store", "Baby Shop", "Book Store", "Boutique", "Clothing Store", "Toy Store", "Beauty Salon", "Jewelry", "Supermarket", "Cake Shop", "Ice Cream", "Burger Store", "Steak 'n' Grill", "Sushi Bar", "Cafe", "Movie Cinema", "Game Center"];
employeeArr = [CrewCleaningServicelv1, CrewTechnicianlv1, CrewSecuritylv1];
VISITOR_LIST = [VisitorBlondie, VisitorStranger, VisitorBeard, VisitorAfro, VisitorNiggaFemale, VisitorNerd, VisitorMacho, VisitorWenart, VisitorReggae, VisitorCheer, VisitorNiggaMale, VisitorPunk];
SPECIAL_VISITOR_LIST = [VisitorJustinBieber, VisitorLadyGaga, VisitorParisHilton, VisitorRihana, VisitorJustinBieber, VisitorLadyGaga, VisitorParisHilton, VisitorRihana, VisitorObama];
BANDIT_LIST = [Bandit, Ninja, FlyingBandit];
TipsList = ["Promoting your employees are better than hire a new one.", "Use A, S, W, D keys or arrow keys to scroll the screen", "Click on your employees and pinpoint their work area.", "Click on visitors to see what they want", "Increase your income by upgrading the booth.", "Special visitors increase your popularity.", "Hire employees, Hold down CTRL key to set a specific floor as work area.", "Arranging events in the hall increase popularity and improves the mood of your customers.", "Hold SHIFT key when building or hiring staff to quickly duplicate repeat the action.", "Not every booth is compatible with another. Carefully plan your layout to gain the best popularity for your shopping mall.", "Save your cash to pay your employees every night.", "Pay attention and fulfill the missions to earn extra cash.", "You will lose the game, if your stays below zero for two days on a row.", "Press the ESC key to close build and hire mode. ESC will also close certain popup windows"];
super();
addFrameScript(0, frame1, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
public function FloorDetection(_arg1:Event):void{
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.ground.tenantList.push(_local2);
_local2.removeEventListener(Event.ENTER_FRAME, FloorDetection);
}
public function MouseDownEvent(_arg1:MouseEvent):void{
if (!mouseInUI){
mouseIsDown = true;
lastPosX = _arg1.stageX;
lastPosY = _arg1.stageY;
};
}
public function countHappyVisitor():Number{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
_local2 = 0;
while (_local2 < visitorList.length) {
_local3 = visitorList[_local2];
if (_local3.mood > 75){
_local1++;
};
_local2++;
};
return (_local1);
}
public function createStreet():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < 5) {
_local2 = new BGStreet();
_local2.worldX = (_local1 * _local2.width);
_local2.worldY = MAX_HEIGHT;
_local2.x = (_local2.worldX - cameraX);
_local2.y = (_local2.worldY - cameraY);
if (city == 1){
_local2.removeChild(_local2.tree1);
_local2.removeChild(_local2.tree2);
} else {
_local2.removeChild(_local2.sakura1);
_local2.removeChild(_local2.sakura2);
};
bgParent.addChild(_local2);
_local1++;
};
MAX_WIDTH = (_local1 * _local2.width);
MAX_BUILD_X = (MAX_WIDTH - 100);
cameraX = ((MAX_WIDTH / 2) - (CAMERA_WIDTH / 2));
ground.worldY = MAX_HEIGHT;
sky.worldY = 0;
mallLeft = MAX_WIDTH;
}
public function ScrollingWithKey(_arg1:Event):void{
var _local2:*;
_local2 = SCROLL_SPEED;
if (shiftKey){
_local2 = 1;
};
if (scrollLeft1){
cameraX = (cameraX - _local2);
};
if (scrollLeft2){
cameraX = (cameraX - _local2);
};
if (scrollRight1){
cameraX = (cameraX + _local2);
};
if (scrollRight2){
cameraX = (cameraX + _local2);
};
if (cameraX <= 0){
cameraX = 0;
};
if ((cameraX + CAMERA_WIDTH) >= MAX_WIDTH){
cameraX = (MAX_WIDTH - CAMERA_WIDTH);
};
if (scrollUp1){
cameraY = (cameraY - _local2);
};
if (scrollUp2){
cameraY = (cameraY - _local2);
};
if (scrollDown1){
cameraY = (cameraY + _local2);
};
if (scrollDown2){
cameraY = (cameraY + _local2);
};
if (cameraY <= 0){
cameraY = 0;
};
if ((cameraY + CAMERA_HEIGHT) >= MAX_HEIGHT){
cameraY = (MAX_HEIGHT - CAMERA_HEIGHT);
};
}
public function EmployeeOnClick(_arg1:MouseEvent):void{
var _local2:*;
var _local3:BitmapFilter;
var _local4:*;
var _local5:*;
if (((((!((userinterface.getButtonActive() == 0))) && ((canClick < 7)))) && (!((_arg1.currentTarget == visitorFocus))))){
if (visitorFocus != null){
visitorFocus.filters = [];
};
if (menuParent.numChildren > 0){
_local5 = menuParent.getChildAt(0);
_local5.closeMenu();
};
_local2 = new UI_EmployeeInformation();
_local2.x = menuX;
_local2.y = menuY;
menuParent.addChild(_local2);
visitorFocus = _arg1.currentTarget;
_local3 = new GlowFilter(0xFF8800, 0.9, 5, 5, 2);
_local4 = new Array();
_local4.push(_local3);
visitorFocus.filters = _local4;
};
}
public function addNotification(_arg1:String, _arg2:Number=1):void{
var _local3:*;
var _local4:*;
_local3 = new UI_Notification();
_local3.note.info.text = _arg1;
_local3.x = noteRegion.x;
_local3.y = noteRegion.y;
_local3.alpha = _arg2;
noteParent.addChild(_local3);
_local4 = new SE_Notification();
_local4.play(0, 0, seTransform);
}
public function TenantClicking(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
if (((!((userinterface.getButtonActive() == 0))) && ((canClick < 7)))){
if (menuParent.numChildren > 0){
_local2 = menuParent.getChildAt(0);
_local2.closeMenu();
};
if ((_arg1.currentTarget is TenantHall)){
_local3 = new UI_HallInformation();
} else {
_local3 = new UI_TenantInformation();
};
_local3.x = menuX;
_local3.y = menuY;
_local3.buildingRelation = _arg1.currentTarget;
_arg1.currentTarget.transform.colorTransform = new ColorTransform(0.7, 0.7, 0, 1, 0, 0, 0, 0);
menuParent.addChild(_local3);
};
}
public function UpdateMission(_arg1:Event):void{
var _local2:*;
if ((missionActive in mission[city])){
if (!userinterface.objective.declareMission){
userinterface.objective.objectiveInfo.text = mission[city][missionActive];
userinterface.objective.declareMission = true;
};
} else {
if (!userinterface.objective.declareMission){
if (missionActive >= mission[city].length){
if (city < 2){
userinterface.objective.objectiveInfo.text = "Go to next city";
} else {
userinterface.objective.objectiveInfo.text = "Thank you for playing";
};
};
userinterface.objective.declareMission = true;
};
if (!finishMissionNotification){
if (missionActive >= mission[city].length){
_local2 = (("Well Done!\nYou have completed all mission in <font color='#007A03'>" + cityName[city]) + "</font>\n");
if (((city + 1) in cityName)){
_local2 = (_local2 + (("Let's go to <font color='#007A03'>" + cityName[(city + 1)]) + "</font> and\n build your mall there."));
};
addTutorialNotification(_local2, true);
lastSpeed = gameSpeed;
gameSpeed = 0;
userinterface.deactiveAllButton();
finishMissionNotification = true;
};
} else {
if (tutorialParent.numChildren > 0){
gameSpeed = 0;
} else {
if (!finishMission){
finishMission = true;
userinterface.activeAllButton();
gameSpeed = lastSpeed;
if (((city + 1) in cityName)){
userinterface.btnNextCity.visible = true;
userinterface.btnNextCity.addEventListener(MouseEvent.CLICK, ChangeCity);
};
};
};
};
};
}
public function MouseClickEvent(_arg1:MouseEvent):void{
var temp:*;
var event = _arg1;
if (((((!(visitorOver)) && (!(menuOver)))) && (!((visitorFocus == null))))){
if (menuParent.numChildren > 0){
try {
temp = menuParent.getChildAt(0);
temp.closeMenu();
} catch(e:Error) {
};
};
};
}
function frame1(){
stop();
if (!bgmVolume){
bgmVolume = 1;
};
if (!seVolume){
seVolume = 1;
};
customContextMenu = new ContextMenu();
playerName = "";
customContextMenu.hideBuiltInItems();
contextMenu = customContextMenu;
stage.showDefaultContextMenu = false;
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
this.loaderInfo.addEventListener(Event.COMPLETE, completes);
if (loaderInfo.url.substring(0, 4) != "file"){
Security.allowDomain("*");
Security.loadPolicyFile("http://track.g-bot.net/crossdomain.xml");
variables2 = new URLVariables();
variables2.id = "shopempire";
variables2.ui = loaderInfo.url;
request2 = new URLRequest("http://track.g-bot.net/track.php");
request2.method = "POST";
request2.data = variables2;
loader2 = new URLLoader();
loader2.load(request2);
};
}
public function savingTrash():void{
var _local1:*;
var _local2:*;
AutoSaveGame.data.trashWorldX = new Array();
AutoSaveGame.data.trashWorldY = new Array();
AutoSaveGame.data.trashLevel = new Array();
AutoSaveGame.data.trashGround = new Array();
_local1 = 0;
while (_local1 < dirtyParent.numChildren) {
_local2 = dirtyParent.getChildAt(_local1);
AutoSaveGame.data.trashWorldX.push(_local2.worldX);
AutoSaveGame.data.trashWorldY.push(_local2.worldY);
AutoSaveGame.data.trashLevel.push(_local2.trashLevel);
AutoSaveGame.data.trashGround.push(floorList.indexOf(_local2.ground));
_local1++;
};
}
public function RemoveTutorialText(_arg1:MovieClip):void{
var _local2:*;
if (_arg1.numChildren > 0){
_local2 = _arg1.getChildAt(0);
stage.removeEventListener(MouseEvent.CLICK, _local2.SkipTextAnimation);
stage.removeEventListener(KeyboardEvent.KEY_UP, _local2.SkipTextWithKey);
_local2.removeEventListener(Event.ENTER_FRAME, _local2.TextAnimation);
_local2.removeEventListener(MouseEvent.MOUSE_OVER, _local2.MouseOverEvent);
_local2.removeEventListener(MouseEvent.MOUSE_OUT, _local2.MouseOutEvent);
_arg1.removeChild(_local2);
};
}
public function createFloor(_arg1:Number, _arg2:Number, _arg3):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
_local4 = new Floor();
_local4.worldX = _arg1;
_local4.worldY = _arg2;
_local4.center.width = _arg3;
_local4.rightSide.x = _local4.center.width;
_local5 = false;
_local4.x = (_local4.worldX - cameraX);
_local4.y = (_local4.worldY - cameraY);
_local7 = false;
_local8 = 0;
while (_local8 < pillarParent.numChildren) {
_local10 = pillarParent.getChildAt(_local8);
if ((((_local10 is Floor)) && ((_local10.y == _local4.y)))){
_local5 = true;
_local6 = _local10;
if (!_local10.hitTestObject(_local4)){
_local7 = true;
};
};
_local8++;
};
if (!_local5){
_local11 = floorList.pop();
if (_local11.worldY > _local4.worldY){
floorList.push(_local11);
floorList.push(_local4);
} else {
floorList.push(_local4);
floorList.push(_local11);
};
if (mallWidth < _local4.width){
mallWidth = _local4.width;
};
if (mallLeft > _local4.worldX){
mallLeft = _local4.worldX;
};
pillarParent.addChild(_local4);
} else {
_local12 = _arg3;
if (_local7){
_local13 = 0;
_local14 = 0;
if (_local6.worldX > _arg1){
_local13 = Math.round(((_local6.worldX - (_arg1 + _local12)) / 12));
_local14 = (_arg1 + _local12);
} else {
_local13 = Math.round(((_arg1 - (_local6.worldX + _local6.center.width)) / 12));
_local14 = (_local6.worldX + _local6.center.width);
};
_local8 = 0;
while (_local8 < _local13) {
_local15 = new TenantEmptySpace();
_local15.worldX = (_local14 + (_local8 * 12));
_local15.worldY = (_arg2 + 12);
emptyParent.addChild(_local15);
_local8++;
};
};
if (_local6.worldX > _arg1){
_local12 = ((_local6.worldX - _arg1) + _local6.center.width);
_local6.worldX = _arg1;
if (_local12 < _local4.center.width){
_local12 = _local4.center.width;
};
} else {
_local12 = ((_arg1 - _local6.worldX) + _local12);
};
if (_local6.center.width < _local12){
_local6.center.width = _local12;
_local6.rightSide.x = _local6.center.width;
};
_local6.x = (_local6.worldX - cameraX);
_local6.y = (_local6.worldY - cameraY);
if (mallWidth < _local6.width){
mallWidth = _local6.width;
};
if (mallLeft > _local6.worldX){
mallLeft = _local6.worldX;
};
pillarParent.addChild(_local6);
};
_local9 = 0;
_local8 = 0;
while (_local8 < floorList.length) {
if ((floorList[_local8] is Floor)){
_local9 = (_local9 + Math.floor((floorList[_local8].width / 60)));
};
_local8++;
};
if ((floorList.length - 1) > 0){
floorAverage = Math.floor((_local9 / (floorList.length - 1)));
} else {
floorAverage = 0;
};
}
public function AlarmLoop(_arg1:Event):void{
var _local2:*;
_local2 = new SEAlarm();
seChannel = _local2.play(0, 0, seTransform);
seChannel.addEventListener(Event.SOUND_COMPLETE, AlarmLoop);
}
function frame5(){
bgmTransform = new SoundTransform(bgmVolume);
seTransform = new SoundTransform(seVolume);
Achivement = SharedObject.getLocal("Achivement");
AutoSaveGame = SharedObject.getLocal("AutoSave");
SaveGameData = new Array(3);
gameLoaded = -1;
startCity = 0;
i = 0;
while (i < SaveGameData.length) {
SaveGameData[i] = SharedObject.getLocal(("SaveData" + i));
i++;
};
if (!Achivement.data.trophyList){
Achivement.data.trophyList = new Array(21);
i = 0;
while (i < Achivement.data.trophyList.length) {
Achivement.data.trophyList[i] = false;
i++;
};
};
mainMenuBGM = new BGMMenu();
mainMenuBGMChannel = mainMenuBGM.play(0, 0, bgmTransform);
mainMenuBGMChannel.addEventListener(Event.SOUND_COMPLETE, BGMMenuLoop);
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
function frame3(){
gamesfreeSplash.stop();
gamesfreeSplash.buttonMode = true;
gamesfreeSplash.addEventListener(MouseEvent.CLICK, GamesFreeURL);
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
public function MouseUpEvent(_arg1:MouseEvent):void{
mouseIsDown = false;
}
public function addTutorialArrow(_arg1:Number, _arg2:Number, _arg3:Number=0):void{
var _local4:*;
_local4 = new TutorialArrow();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.rotation = _arg3;
tutorialArrowParent.addChild(_local4);
}
public function getArrowPosition(_arg1:MovieClip):Number{
var _local2:*;
_local2 = _arg1.currentFrame;
return (_local2);
}
function frame4(){
IntroClip.vol = seVolume;
IntroClip.buttonMode = true;
stop();
IntroClip.addEventListener(MouseEvent.CLICK, LittleGiantURL);
}
function frame10(){
stop();
mouse = Mouse;
handCursor.visible = false;
userinterface.btnNextCity.visible = false;
userinterface.nextTownWarning.visible = false;
userinterface.legendHelp.visible = false;
gameSpeed = 1;
floorAverage = 0;
dayPass = 1;
cameraX = 0;
cameraY = 1060;
drawParent = new MovieClip();
bgParent = new MovieClip();
defaultCityY = bgCity.y;
landmark = null;
bgAccParent = new MovieClip();
mouseIsDown = false;
mouseInUI = false;
emptyParent = new MovieClip();
buildParent = new MovieClip();
pillarParent = new MovieClip();
tenantParent = new MovieClip();
tenantList = new Array();
floorList = new Array();
alarmTrigger = false;
elevatorList = new Array();
restroomList = new Array();
hall = null;
menuParent = new MovieClip();
menuX = (stage.stageWidth / 2);
menuY = (stage.stageHeight / 2);
menuOver = false;
maxVisitor = 0;
visitorParent = new MovieClip();
banditTrigger = null;
legendParent = new MovieClip();
visitorFocus = null;
visitorList = new Array();
specialVisitor = new Array();
crewList = new Array();
dirtyParent = new MovieClip();
noticeParent = new MovieClip();
eventSelection = 0;
nowEvent = -1;
bookedEvent = -1;
eventTime = 0;
numberVisitor = 0;
mallWidth = 0;
popularity = 0;
canClick = 0;
popularityModifier = 0;
nextDayPopularity = 0;
noteParent = new MovieClip();
flyingTextParent = new MovieClip();
banditCaptured = 0;
numberUpset = 0;
canGameOver = false;
firstBanditStealing = false;
cash = 20000;
sch = 0;
while (sch < startCity) {
cash = (cash + (10000 * (sch + 1)));
sch++;
};
purchase = 0;
recive = 0;
otherIncome = 0;
otherOutcome = 0;
cleaningServiceOutcome = 0;
technicianOutcome = 0;
securityOutcome = 0;
lastEarning = 0;
bgmEnvironment = 1;
tenantCanBuild = new Array(3);
tenantCanBuild[0] = new Array("btnBarberShop", "btnJewelry", "btnBoutiqueA", "btnBoutiqueB", "btnDrugStore", "btnBurger", "btnCafe", "btnBabyShop", "btnIceCream", "btnBookStore", "btnHall");
tenantCanBuild[1] = new Array("btnSushi", "btnGameCenter", "btnToyStore", "btnCake");
tenantCanBuild[2] = new Array("btnCinema", "btnSupermarket", "btnSteak");
visitorCanAppear = new Array(3);
visitorCanAppear[0] = new Array(0, 1, 2, 8);
visitorCanAppear[1] = new Array(0, 1, 2, 5, 6, 7, 8, 11);
visitorCanAppear[2] = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
mission = new Array(3);
mission[0] = new Array("Build the first booth", "Earn your first profit", "Hire a cleaning staff member", "Build a restroom", "Have at least 3 visitors visit your mall", "Hire a technician", "Build 4 booths", "Build an elevator", "Build at least one booth at 2nd floor", "Hire a security agent", "Catch a bandit", "Make 10 visitor happy for a day", "Promote 1 cleaning staff member", "Promote 1 technician", "Promote 1 security", "Upgrade 1 booth", "Earn $15,000 profits for a day", "Upgrade 4 booths", "Have more than 50 visitors visit your mall", "Build mall with 4 floors", "Earn $25,000 profits for a day", "Build a hall", "Run Event Art Exhibition at least one day", "Earn $100,000 profits for a day");
mission[1] = new Array("Build a Toy Store", "Hire 2 employees", "Build 4 booths", "Have at least 20 visitors visit your mall", "Build a sushi bar", "Hire 4 employees", "Upgrade an elevator to level 3", "Build a game center", "Build mall with 3 floors", "Hire 8 employees", "Have more than 50 visitors visit your mall", "Catch 5 bandits in a day", "Make 20 visitors happy for a day", "Promote at least 10 employees to level 2", "Run Event Electronic Expo at least one day", "Have more than 70 visitors visit your mall", "Build mall with 6 floors", "Build 5 restroom", "Make 50 visitors happy for a day", "Earn $50,000 profits for a day", "Hire 20 employee", "Earn $100,000 profits for a day", "Earn $200,000 profits for a day", "Your cash reach $750,000");
mission[2] = new Array("Build a Steak n Grill", "Have at least 10 visitors visit your mall", "Hire 4 employees", "Build 5 booths", "Build 2 restroom", "Build mall with 3 floors", "Build 2 elevators", "Hire 10 employees", "Hire 4 security agents", "Build 12 booths", "Upgrade 5 booths", "Hire 8 cleaning staff members", "Upgrade 8 booths", "Build a supermarket", "Build a cinema", "Build mall with 6 floors", "Hire 8 security agents", "Hire 20 employees", "Have more than 50 visitors visit your mall", "Catch 5 bandits in a day", "Make 25 visitors happy for a day", "Make 50 visitors happy for a day", "Promote at least 12 employees to max level", "Promote at least 20 employees to max level", "Run Event Live Concert at least one day", "Have more than 100 visitors visit your mall", "Upgrade 10 buildings to max level", "Have full upgrade hall", "Make 75 visitors happy for a day", "Upgrade 2 elevators to max level", "Catch 10 bandits in a day", "Earn $150,000 profits for a day", "Earn $250,000 profits for a day", "Your cash reach $1,500,000");
finishMission = false;
finishMissionNotification = false;
missionActive = -1;
city = startCity;
totalTenantCanBuild = new Array();
tutorialMode = true;
tutorialStep = 0;
tutorialParent = new MovieClip();
tutorialArrowParent = new MovieClip();
cloudList = new Array();
expandElevatorTutor = false;
securityTutor = false;
securityStep = 0;
firstBandit = null;
lastSpeed = 0;
commentList = new Array(TENANT_TEXT.length);
fi = 0;
while (fi < commentList.length) {
commentList[fi] = new Array();
fi++;
};
commentList[0] = ["I think I got cold", "I need lots of pills", "I have to buy antibiotics for my niece", "*coughing*", "*sneezing*"];
commentList[1] = ["New cloth for my chlid will be nice", "I want to buy pacifier", "My baby diapers are running out"];
commentList[2] = ["Going to be a book-o-holic today", "On the mood of reading romance story", "Got to buy cooking magazines"];
commentList[3] = ["Need gown for tonight", "Victoria's dress looks beautiful", "My suit have just torn"];
commentList[4] = ["I need new shirt", "Where can I get jeans?", "I plan to buy a cap"];
commentList[5] = ["My daughter wants a teddy bear", "Need new toys for my son", "New robot models have been launched"];
commentList[6] = ["Need a haircut immediately!", "My nails need some treatment", "Desperately want to dye my hair"];
commentList[7] = ["I want to buy a golden necklace", "I'm searching for a pair of earrings for her gift", "Need a diamond ring to propose her", "New bracelet will look good on me"];
commentList[8] = ["Where's the market?", "I want to buy fruits", "I need spices", "Today's menu is salad"];
commentList[9] = ["Strawberry cupcake sounds yummy", "My sister loves cupcakes"];
commentList[10] = ["I want a cup of vanilla sundae", "Gelato ice cream...hmm", "Where can I get ice cream?"];
commentList[11] = ["A bite of delicious burger..hmmm", "Cheese burger wanted!", "I miss american hotdog", "I want french fries"];
commentList[12] = ["Need to satisfy my stomach with some meat", "grill ribs sounds good", "Black pepper steak wanted!", "Steak..steak..steak..."];
commentList[13] = ["Japanese food sounds good", "I want a sushi!!!", "Salmon sushi looks tasty"];
commentList[14] = ["Hmm..suddenly want some caramel macchiato", "Time to hang out..and a cup of capuccino", "I'll just enjoy a glass of frapuccino"];
commentList[15] = ["Tom Crush is starring on James Blonde", "Hairy Potter is on the cinema", "Where's the movie theatre?"];
commentList[16] = ["I want to play all day", "Play a shooting game sounds great", "Heard that they've opened a new arcade machine"];
supportComment = new Array(2);
supportComment[0] = new Array();
supportComment[1] = new Array();
supportComment[0] = ["I need to wash my hand", "Where's the restroom?"];
supportComment[1] = ["Oh,c'mon..can't this mall build more elevators?", "I think the elevator will arrive in this floor by tomorrow"];
eventCommentList = new Array(3);
eventCommentList[0] = ["I want to see inspirational pieces of art", "I heard that Da Cinvi's work were being displayed today"];
eventCommentList[1] = ["I heard that there is electronic sale here", "The New Oh Pad5 has been released. We should check it on the exhibition"];
eventCommentList[2] = ["I hope I can make it to the live concert", "\"30 Centuries to Venus\" is on stage, man!"];
swapDelay = 72;
visitorDelay = 0;
visitorOver = false;
banditDelay = 0;
banditList = new Array();
tipsHistory = new Array();
gameDelay = 0;
addEventListener(Event.ENTER_FRAME, ClosingProgress);
brokenDelay = 6;
dirtyDelay = 48;
scrollLeft1 = false;
scrollLeft2 = false;
scrollRight1 = false;
scrollRight2 = false;
scrollUp1 = false;
scrollUp2 = false;
scrollDown1 = false;
scrollDown2 = false;
shiftKey = false;
alarmTransform = 1;
aT = -0.1;
alarmTimer = 168;
robedBooth = null;
Initialize();
}
public function countAllBooth(_arg1:Number=0):Number{
var _local2:*;
var _local3:*;
_local2 = 0;
_local3 = 0;
while (_local3 < tenantList.length) {
if (tenantList[_local3].tLevel >= _arg1){
_local2++;
};
_local3++;
};
return (_local2);
}
public function CancelToNextCity(_arg1:MouseEvent):void{
userinterface.btnNextCity.visible = true;
userinterface.btnNextCity.addEventListener(MouseEvent.CLICK, ChangeCity);
userinterface.nextTownWarning.visible = false;
userinterface.nextTownWarning.btnYes.removeEventListener(MouseEvent.CLICK, GoToNextCity);
userinterface.nextTownWarning.btnNo.removeEventListener(MouseEvent.CLICK, CancelToNextCity);
gameSpeed = lastSpeed;
}
public function countEmployee(_arg1:Number):Number{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
_local3 = 0;
while (_local3 < crewList.length) {
_local4 = crewList[_local3];
if (_arg1 == 0){
if ((((((_local4 is CrewCleaningServicelv1)) || ((_local4 is CrewCleaningServicelv2)))) || ((_local4 is CrewCleaningServicelv3)))){
_local2++;
};
} else {
if (_arg1 == 1){
if ((((((_local4 is CrewTechnicianlv1)) || ((_local4 is CrewTechnicianlv2)))) || ((_local4 is CrewTechnicianlv3)))){
_local2++;
};
} else {
if (_arg1 == 2){
if ((((((_local4 is CrewSecuritylv1)) || ((_local4 is CrewSecuritylv2)))) || ((_local4 is CrewSecuritylv3)))){
_local2++;
};
} else {
if (_arg1 == 3){
if ((((_local4 is CrewCleaningServicelv2)) || ((_local4 is CrewCleaningServicelv3)))){
_local2++;
};
} else {
if (_arg1 == 4){
if ((((_local4 is CrewTechnicianlv2)) || ((_local4 is CrewTechnicianlv3)))){
_local2++;
};
} else {
if (_arg1 == 5){
if ((((_local4 is CrewSecuritylv2)) || ((_local4 is CrewSecuritylv3)))){
_local2++;
};
};
};
};
};
};
};
_local3++;
};
return (_local2);
}
public function checkBuildLevel(_arg1:String=null, _arg2:Number=0):Number{
var _local3:*;
var _local4:*;
var _local5:*;
_local3 = 0;
_local4 = 0;
while (_local4 < tenantParent.numChildren) {
_local5 = tenantParent.getChildAt(_local4);
if ((((_arg1 == null)) || ((_local5.name == _arg1)))){
if (_local5.tLevel >= _arg2){
_local3++;
};
};
_local4++;
};
return (_local3);
}
public function AccsoryManagement(_arg1:Event):void{
var _local2:*;
if (cloudList.length < 10){
_local2 = new cloudGame();
_local2.speed = ((Math.random() * 2) + 0.5);
_local2.normal.gotoAndStop(Math.ceil((Math.random() * _local2.normal.totalFrames)));
_local2.sunset.gotoAndStop(_local2.normal.currentFrame);
_local2.x = (stage.stageWidth + _local2.width);
_local2.y = (Math.random() * stage.stageHeight);
_local2.normal.alpha = (1 - sunset.alpha);
_local2.sunset.alpha = sunset.alpha;
_local2.alpha = (1 - night.alpha);
bgAccParent.addChild(_local2);
cloudList.push(_local2);
_local2.addEventListener(Event.ENTER_FRAME, CloudMove);
};
}
public function updatePopularity(_arg1:MovieClip):void{
var adding:*;
var newFText:*;
var newTenant = _arg1;
if (((!((newTenant is SupportElevator))) && (!((newTenant is SupportRestroom))))){
popularity = (popularity + 5);
};
adding = 0;
try {
adding = (adding + newTenant.testBuildRelation());
} catch(e:Error) {
};
popularity = (popularity + adding);
if (adding > 0){
newFText = new suitabilityplus();
newFText.worldX = (newTenant.worldX + (newTenant.width / 2));
newFText.worldY = (newTenant.worldY + (newTenant.height / 2));
flyingTextParent.addChild(newFText);
} else {
if (adding < 0){
newFText = new suitabilityminus();
newFText.worldX = (newTenant.worldX + (newTenant.width / 2));
newFText.worldY = (newTenant.worldY + (newTenant.height / 2));
flyingTextParent.addChild(newFText);
};
};
}
public function StartBuilding(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
if (!mouseInUI){
if (buildParent.numChildren > 0){
canClick = 7;
_local2 = buildParent.getChildAt(0);
canBuild = checkCollition(_local2);
if (!canBuild){
addNotification("Cannot build here");
};
if (canBuild){
if (((cash - purchase) + recive) >= _local2.price){
_local3 = false;
_local4 = 0;
while (_local4 < userinterface.hireArr.length) {
if ((_local2 is userinterface.hireArr[_local4])){
_local3 = true;
};
_local4++;
};
if (!_local3){
_local5 = false;
_local6 = false;
if ((_local2 is BuildHall)){
_local5 = true;
_local7 = new TenantHall();
_local7.worldX = (_local2.x + cameraX);
_local7.worldY = (_local2.y + cameraY);
_local7.x = _local2.x;
_local7.y = _local2.y;
_local7.name = "Hall";
_local7.ground = bottom;
_local7.addEventListener(MouseEvent.CLICK, TenantClicking);
tenantParent.addChild(_local7);
tenantList.push(_local7);
_local7.ground.tenantList.push(_local7);
updatePopularity(_local7);
hall = _local7;
_local7.tLevel = 1;
_local7.income = 0;
_local7.outcome = _local2.price;
_local7.visitorCome = 0;
} else {
if (((!((_local2 is BuildElevator))) && (!((_local2 is BuildRestroom))))){
_local8 = userinterface.btnArr.indexOf(_local2.name);
if (_local8 >= 0){
_local5 = true;
_local7 = new (tenantArr[_local8]);
_local7.worldX = (_local2.x + cameraX);
_local7.worldY = (_local2.y + cameraY);
_local7.x = _local2.x;
_local7.y = _local2.y;
_local7.name = _local2.name;
_local7.ground = bottom;
_local7.addEventListener(MouseEvent.CLICK, TenantClicking);
tenantParent.addChild(_local7);
tenantList.push(_local7);
_local7.ground.tenantList.push(_local7);
updatePopularity(_local7);
_local7.tLevel = 1;
_local7.brokenLevel = 0;
_local7.income = 0;
_local7.outcome = _local2.price;
_local7.visitorCome = 0;
};
} else {
if ((_local2 is BuildElevator)){
_local5 = true;
_local6 = true;
_local7 = new SupportElevator();
_local7.worldX = (_local2.x + cameraX);
_local7.worldY = (_local2.y + cameraY);
_local7.x = _local2.x;
_local7.y = _local2.y;
_local7.name = _local2.name;
_local7.floorList = new Array();
_local7.elevatorList = new Array();
_local7.tLevel = 1;
_local9 = new ElevatorBody();
_local9.y = -84;
_local7.addChild(_local9);
_local7.addEventListener(MouseEvent.CLICK, TenantClicking);
tenantParent.addChild(_local7);
elevatorList.push(_local7);
otherOutcome = (otherOutcome + _local2.price);
} else {
_local5 = true;
_local7 = new SupportRestroom();
_local7.worldX = (_local2.x + cameraX);
_local7.worldY = (_local2.y + cameraY);
_local7.x = _local2.x;
_local7.y = _local2.y;
_local7.name = _local2.name;
_local7.ground = bottom;
_local7.tLevel = 1;
_local7.addEventListener(MouseEvent.CLICK, TenantClicking);
_local7.ground.toiletList.push(_local7);
tenantParent.addChild(_local7);
restroomList.push(_local7);
updatePopularity(_local7);
otherOutcome = (otherOutcome + _local2.price);
};
};
};
if (_local5){
_local10 = 0;
while (_local10 < emptyParent.numChildren) {
_local11 = emptyParent.getChildAt(_local10);
if (_local11.hitTestObject(_local7)){
emptyParent.removeChild(_local11);
_local10--;
};
_local10++;
};
_local10 = 0;
while (_local10 < pillarParent.numChildren) {
_local12 = pillarParent.getChildAt(_local10);
if ((((_local12 is Pillar)) && (_local12.hitTestObject(_local7)))){
pillarParent.removeChild(_local12);
_local10--;
};
_local10++;
};
if (((!(_arg1.shiftKey)) || ((_local2 is BuildHall)))){
buildParent.removeChild(_local2);
_local10 = 0;
while (_local10 < userinterface.buttonList.length) {
userinterface.buttonList[_local10].btnDefault.tog = false;
_local10++;
};
userinterface.disableAllSector();
};
if (_local6){
createPillar((_local7.worldX - 12), (_local7.worldY - 86));
createPillar(((_local7.worldX + _local7.width) - (_local7.width % 12)), (_local7.worldY - 86));
createFloor((_local7.worldX - 12), (_local7.worldY - 96), ((_local7.width - (_local7.width % 12)) + 24));
};
createPillar((_local7.worldX - 12), (_local7.worldY - 2));
createPillar(((_local7.worldX + _local7.width) - (_local7.width % 12)), (_local7.worldY - 2));
createFloor((_local7.worldX - 12), (_local7.worldY - 12), ((_local7.width - (_local7.width % 12)) + 24));
};
if (_local6){
_local10 = 0;
while (_local10 < _local7.numChildren) {
_local9 = _local7.getChildAt(_local10);
if ((_local9 is ElevatorBody)){
_local13 = 0;
while (_local13 < floorList.length) {
_local14 = floorList[_local13];
if ((_local14 is Floor)){
if (((_local9.hitTestObject(_local14)) && (((_local7.y + _local9.y) < _local14.y)))){
_local7.elevatorList.push(_local9);
_local7.floorList.push(_local14);
};
} else {
if (((_local9.hitTestObject(_local14)) && (((_local7.y + _local9.y) <= (_local14.y - _local14.height))))){
_local7.elevatorList.push(_local9);
_local7.floorList.push(_local14);
};
};
_local13++;
};
};
_local10++;
};
};
} else {
_local8 = userinterface.btnEmployeeArr.indexOf(_local2.stat);
_local15 = new (employeeArr[_local8]);
_local15.worldX = (_local2.x + cameraX);
_local15.worldY = (_local2.y + cameraY);
_local15.x = (_local15.worldX - cameraX);
_local15.y = (_local15.worldY - cameraY);
_local15.floorPos = bottom;
_local15.homePos = (Math.floor((Math.random() * 2)) * MAX_WIDTH);
crewList.push(_local15);
visitorParent.addChild(_local15);
_local15.addEventListener(MouseEvent.CLICK, EmployeeOnClick);
_local15.addEventListener(MouseEvent.MOUSE_OVER, VisitorOnOver);
_local15.addEventListener(MouseEvent.MOUSE_OUT, VisitorOnOut);
if ((_local2 is HireCleaningService)){
cleaningServiceOutcome = (cleaningServiceOutcome + _local2.price);
} else {
if ((_local2 is HireTechnician)){
technicianOutcome = (technicianOutcome + _local2.price);
} else {
if ((_local2 is HireSecurity)){
securityOutcome = (securityOutcome + _local2.price);
};
};
};
if (!_arg1.shiftKey){
buildParent.removeChild(_local2);
_local10 = 0;
while (_local10 < userinterface.buttonList.length) {
userinterface.buttonList[_local10].btnDefault.tog = false;
_local10++;
};
userinterface.disableAllSector();
};
if (_arg1.ctrlKey){
_local15.shiftFloor = floorList.indexOf(_local15.floorPos);
} else {
_local15.shiftFloor = -1;
};
if (userinterface.employeeList.visible){
userinterface.employeeList.setCrewList();
};
};
if (_local3){
addCashUpdate(_local2.price, (_local2.x + cameraX), (_local2.y + cameraY), false);
} else {
if (_local6){
addCashUpdate(_local2.price, ((_local2.x + cameraX) + (_local2.width / 2)), (_local2.y + cameraY), false);
if (!expandElevatorTutor){
addEventListener(Event.ENTER_FRAME, ExpandElevatorTutor);
};
} else {
addCashUpdate(_local2.price, ((_local2.x + cameraX) + (_local2.width / 2)), ((_local2.y + cameraY) + (_local2.height / 2)), false);
};
};
userinterface.updateSector();
} else {
addNotification("Not enough cash");
};
};
};
};
}
public function loadTenant(_arg1:SharedObject):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
while (_local2 < _arg1.data.tenantName.length) {
_local3 = userinterface.btnArr.indexOf(_arg1.data.tenantName[_local2]);
if (_local3 >= 0){
_local4 = new (tenantArr[_local3]);
_local4.worldX = _arg1.data.tenantWorldX[_local2];
_local4.worldY = _arg1.data.tenantWorldY[_local2];
_local4.x = (_local4.worldX - cameraX);
_local4.y = (_local4.worldY - cameraY);
_local4.name = _arg1.data.tenantName[_local2];
_local4.ground = floorList[_arg1.data.tenantGround[_local2]];
_local4.addEventListener(MouseEvent.CLICK, TenantClicking);
tenantParent.addChild(_local4);
tenantList.push(_local4);
_local4.addEventListener(Event.ENTER_FRAME, FloorDetection);
_local4.tLevel = _arg1.data.tenantLevel[_local2];
_local4.brokenLevel = _arg1.data.tenantBrokenLevel[_local2];
_local4.income = _arg1.data.tenantIncome[_local2];
_local4.outcome = _arg1.data.tenantOutcome[_local2];
_local4.visitorCome = 0;
} else {
if (_arg1.data.tenantName[_local2] == "Hall"){
_local4 = new TenantHall();
_local4.worldX = _arg1.data.tenantWorldX[_local2];
_local4.worldY = _arg1.data.tenantWorldY[_local2];
_local4.x = (_local4.worldX - cameraX);
_local4.y = (_local4.worldY - cameraY);
_local4.name = _arg1.data.tenantName[_local2];
_local4.ground = floorList[_arg1.data.tenantGround[_local2]];
_local4.addEventListener(MouseEvent.CLICK, TenantClicking);
tenantParent.addChild(_local4);
tenantList.push(_local4);
_local4.addEventListener(Event.ENTER_FRAME, FloorDetection);
_local4.tLevel = _arg1.data.tenantLevel[_local2];
_local4.income = _arg1.data.tenantIncome[_local2];
_local4.outcome = _arg1.data.tenantOutcome[_local2];
_local4.visitorCome = 0;
hall = _local4;
};
};
_local2++;
};
}
public function savingFloor():void{
var _local1:*;
AutoSaveGame.data.floorWorldX = new Array();
AutoSaveGame.data.floorWorldY = new Array();
AutoSaveGame.data.floorWidth = new Array();
_local1 = 0;
while (_local1 < floorList.length) {
if ((floorList[_local1] is Floor)){
AutoSaveGame.data.floorWorldX.push(floorList[_local1].worldX);
AutoSaveGame.data.floorWorldY.push(floorList[_local1].worldY);
AutoSaveGame.data.floorWidth.push(floorList[_local1].width);
};
_local1++;
};
}
public function loading(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.bytesLoaded;
_local3 = _arg1.bytesTotal;
_local4 = ((_local2 / _local3) * 100);
preloaderIcon.done = _local4;
}
public function loadEmptySpace(_arg1:SharedObject):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < _arg1.data.emptyWorldX.length) {
_local3 = new TenantEmptySpace();
_local3.worldX = _arg1.data.emptyWorldX[_local2];
_local3.worldY = _arg1.data.emptyWorldY[_local2];
emptyParent.addChild(_local3);
_local2++;
};
}
public function VisitorOnOver(_arg1:MouseEvent):void{
visitorOver = true;
}
public function BrokenProgress(_arg1:Event):void{
var sp:*;
var i:*;
var temp:*;
var rndBroken:*;
var j:*;
var brokenAgain:*;
var event = _arg1;
sp = 0;
while (sp < gameSpeed) {
if (brokenDelay > 0){
brokenDelay--;
} else {
i = 0;
while (i < tenantList.length) {
try {
temp = tenantList[i];
if (((!((temp is TenantHall))) && (!(temp.isClose)))){
if (temp.brokenLevel <= 100){
rndBroken = (Math.random() * 15);
if (rndBroken > 7){
temp.brokenLevel = (temp.brokenLevel + ((rndBroken / 100) / temp.tLevel));
j = 0;
while (j < temp.visitorList.length) {
brokenAgain = ((Math.random() * 5) / 100);
temp.brokenLevel = (temp.brokenLevel + (brokenAgain / temp.tLevel));
j = (j + 1);
};
};
};
if (temp.brokenLevel < 80){
temp.isBroken = false;
} else {
temp.isBroken = true;
};
};
} catch(e:Error) {
};
i = (i + 1);
};
brokenDelay = 6;
};
sp = (sp + 1);
};
}
public function VisitorOnOut(_arg1:MouseEvent):void{
visitorOver = false;
}
public function ChangeCity(_arg1:MouseEvent):void{
userinterface.btnNextCity.visible = false;
userinterface.btnNextCity.removeEventListener(MouseEvent.CLICK, ChangeCity);
userinterface.nextTownWarning.visible = true;
userinterface.nextTownWarning.btnYes.addEventListener(MouseEvent.CLICK, GoToNextCity);
userinterface.nextTownWarning.btnNo.addEventListener(MouseEvent.CLICK, CancelToNextCity);
lastSpeed = gameSpeed;
gameSpeed = 0;
}
public function addCashUpdate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Number=0, _arg6:Boolean=false):void{
var _local7:*;
var _local8:*;
if (_arg4){
recive = (recive + (_arg1 + _arg5));
_local8 = new UI_CashUpdateRecive();
_local8.clip.cashList.text = ("+$" + MoneySplit(_arg1));
if (_arg5 > 0){
_local8.clip.cashList.text = (_local8.clip.cashList.text + ("+$" + MoneySplit(_arg5)));
};
_local8.worldX = _arg2;
_local8.worldY = _arg3;
_local8.staticPosition = _arg6;
if (_arg6){
addChild(_local8);
} else {
flyingTextParent.addChild(_local8);
};
} else {
purchase = (purchase + _arg1);
_local8 = new UI_CashUpdatePurchase();
_local8.clip.cashList.text = ("-$" + MoneySplit(_arg1));
_local8.worldX = _arg2;
_local8.worldY = _arg3;
flyingTextParent.addChild(_local8);
};
_local7 = new SE_Coin();
_local7.play(0, 0, seTransform);
}
public function BGMMenuLoop(_arg1:Event):void{
mainMenuBGMChannel = mainMenuBGM.play(0, 0, bgmTransform);
mainMenuBGMChannel.addEventListener(Event.SOUND_COMPLETE, BGMMenuLoop);
}
public function updateBudget():void{
var tList:*;
var iList:*;
var oList:*;
var vList:*;
var i:*;
var discription:*;
var incomeList:*;
var outcomeList:*;
var visitorComeList:*;
var gainList:*;
var gList:*;
var totalEarning:*;
var difference:*;
var tIndex:*;
var tString:*;
var j:*;
var temp:*;
var gainWord:*;
tList = new Array();
iList = new Array();
oList = new Array();
vList = new Array();
i = 0;
while (i < tenantList.length) {
if ((tenantList[i] is TenantHall)){
tList.push("Hall");
iList.push(tenantList[i].income);
oList.push(tenantList[i].outcome);
vList.push(tenantList[i].visitorCome);
} else {
tIndex = userinterface.btnArr.indexOf(tenantList[i].name);
tString = TENANT_TEXT[tIndex];
tList.push(tString);
iList.push(tenantList[i].income);
oList.push(tenantList[i].outcome);
vList.push(tenantList[i].visitorCome);
};
tenantList[i].income = 0;
tenantList[i].outcome = 0;
tenantList[i].visitorCome = 0;
i = (i + 1);
};
i = 0;
while (i < tList.length) {
j = (i + 1);
while (j < tList.length) {
if (tList[i] > tList[j]){
temp = tList[i];
tList[i] = tList[j];
tList[j] = temp;
temp = iList[i];
iList[i] = iList[j];
iList[j] = temp;
temp = oList[i];
oList[i] = oList[j];
oList[j] = temp;
temp = vList[i];
vList[i] = vList[j];
vList[j] = temp;
};
j = (j + 1);
};
i = (i + 1);
};
tList.push("C.Service");
iList.push(0);
oList.push(cleaningServiceOutcome);
vList.push("-");
tList.push("Technician");
iList.push(0);
oList.push(technicianOutcome);
vList.push("-");
tList.push("Security");
iList.push(0);
oList.push(securityOutcome);
vList.push("-");
tList.push("Misc");
iList.push(otherIncome);
oList.push(otherOutcome);
vList.push("-");
cleaningServiceOutcome = 0;
technicianOutcome = 0;
securityOutcome = 0;
otherIncome = 0;
otherOutcome = 0;
discription = "";
incomeList = "";
outcomeList = "";
visitorComeList = "";
gainList = "";
totalEarning = 0;
i = 0;
while (i < tList.length) {
gList = (iList[i] - oList[i]);
totalEarning = (totalEarning + gList);
gainWord = ("$" + MoneySplit(Math.abs(gList)));
if (gList < 0){
gainWord = (("<font color='#FF0000'>-" + gainWord) + "</font>");
} else {
gainWord = (("<font color='#007A03'>+" + gainWord) + "</font>");
};
if (i == 0){
discription = tList[i];
visitorComeList = vList[i];
if (iList[i] != 0){
incomeList = ("$" + MoneySplit(iList[i]));
} else {
incomeList = "-";
};
if (oList[i] != 0){
outcomeList = ("$" + MoneySplit(oList[i]));
} else {
outcomeList = "-";
};
if (gList != 0){
gainList = gainWord;
} else {
gainList = "-";
};
} else {
discription = (discription + ("\n" + tList[i]));
visitorComeList = (visitorComeList + ("\n" + vList[i]));
if (iList[i] != 0){
incomeList = (incomeList + ("\n$" + MoneySplit(iList[i])));
} else {
incomeList = (incomeList + "\n-");
};
if (oList[i] != 0){
outcomeList = (outcomeList + ("\n$" + MoneySplit(oList[i])));
} else {
outcomeList = (outcomeList + "\n-");
};
if (gList != 0){
gainList = (gainList + ("\n" + gainWord));
} else {
gainList = (gainList + "\n-");
};
};
i = (i + 1);
};
budget.discription.textList.text = discription;
budget.incomeList.textList.text = incomeList;
budget.outcomeList.textList.text = outcomeList;
budget.visitorComeList.textList.text = visitorComeList;
budget.gainList.textList.htmlText = gainList;
if (totalEarning < 0){
budget.totalEarning.htmlText = (("<font color='#FF0000'>-$" + MoneySplit(Math.abs(totalEarning))) + "</font>");
} else {
if (totalEarning > 0){
budget.totalEarning.htmlText = (("<font color='#007A03'>+$" + MoneySplit(Math.abs(totalEarning))) + "</font>");
} else {
budget.totalEarning.htmlText = ("+$" + MoneySplit(Math.abs(totalEarning)));
};
};
difference = (totalEarning - lastEarning);
if (difference < 0){
budget.difference.htmlText = (("<font color='#FF0000'>Your profit decrease $" + MoneySplit(Math.abs(difference))) + " from last day</font>");
} else {
if (difference > 0){
budget.difference.htmlText = (("<font color='#007A03'>Your profit increase $" + MoneySplit(Math.abs(difference))) + " from last day</font>");
} else {
budget.difference.htmlText = "Earning rate has no change from last day";
};
};
lastEarning = totalEarning;
budget.checkHeight();
i = 0;
while (i < userinterface.buttonList.length) {
userinterface.buttonList[i].btnDefault.tog = false;
i = (i + 1);
};
if (!budget.appear){
var _local2 = userinterface;
with (_local2) {
disableAllSector();
disableBuilding();
};
budget.statisticTimer = 240;
};
}
public function GamesFreeURL(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
public function DayTimeChange(_arg1:Event):void{
var _local2:*;
var _local3:*;
stage.focus = stage;
this.userinterface.dayTime = dayTime;
this.userinterface.dayMinute = dayMinute;
if (gameSpeed > 0){
if (gameDelay > (3 + gameSpeed)){
gameDelay = (gameDelay - gameSpeed);
} else {
gameDelay = 9;
dayMinute++;
if (dayMinute >= 60){
dayTime++;
dayMinute = (dayMinute - 60);
if (dayTime >= 24){
dayTime = 0;
};
};
if ((((dayTime >= 10)) && ((dayTime < 21)))){
if ((((dayTime >= 12)) && ((dayTime < 3)))){
mass = 3;
} else {
if ((((dayTime >= 18)) && ((dayTime < 19)))){
mass = 4;
} else {
if ((((dayTime >= 19)) && ((dayTime < 21)))){
mass = 2;
} else {
mass = 1;
};
};
};
} else {
mass = 0;
};
};
} else {
gameDelay = 0;
};
if ((((dayTime >= 19)) || ((dayTime < 4)))){
night.alpha = 1;
} else {
if (dayTime >= 18){
night.alpha = (0.5 + (dayMinute / 120));
} else {
if (dayTime >= 17){
night.alpha = (dayMinute / 120);
} else {
if (dayTime < 5){
night.alpha = (1 - (dayMinute / 120));
} else {
if (dayTime < 6){
night.alpha = (0.5 - (dayMinute / 120));
} else {
night.alpha = 0;
};
};
};
};
};
if ((((dayTime >= 16)) && ((dayTime < 19)))){
sunset.alpha = 1;
} else {
if (dayTime >= 15){
sunset.alpha = (dayMinute / 60);
} else {
if (dayTime >= 18){
sunset.alpha = (1 - (dayMinute / 60));
} else {
sunset.alpha = 0;
};
};
};
if ((((dayTime == 0)) && (!((lastDayTime == dayTime))))){
dayPass++;
payAllEmployee();
updateBudget();
lastNumberUpset = numberUpset;
numberUpset = 0;
popularityModifier = (popularityModifier + nextDayPopularity);
nextDayPopularity = 0;
if (nowEvent >= 0){
eventTime--;
if (eventTime <= 0){
nowEvent = -1;
};
} else {
nowEvent = bookedEvent;
bookedEvent = -1;
};
};
userinterface.dayPass.text = ("DAY " + dayPass);
if (!tutorialMode){
if ((((((((((((((dayTime == 9)) || ((dayTime == 12)))) || ((dayTime == 15)))) || ((dayTime == 18)))) || ((dayTime == 21)))) || ((dayTime == 3)))) && (!((lastDayTime == dayTime))))){
_local2 = Math.floor((Math.random() * TipsList.length));
addTips(("Tips:\n" + TipsList[_local2]));
if (tipsHistory.indexOf(TipsList[_local2]) < 0){
tipsHistory.unshift(TipsList[_local2]);
userinterface.tipsHistory.updateText(tipsHistory);
if (!userinterface.tipsHistory.visible){
_local3 = new GlowFilter(0xFF8800);
userinterface.btnMailBox.filters = [_local3];
if (userinterface.currentLabel == "reveal"){
userinterface.tipsHistory.checkHeight();
};
};
};
};
if ((((dayTime == 9)) && (!((lastDayTime == dayTime))))){
banditCaptured = 0;
autoSaveData();
};
lastDayTime = dayTime;
};
}
public function savingTenant():void{
var _local1:*;
AutoSaveGame.data.tenantName = new Array();
AutoSaveGame.data.tenantWorldX = new Array();
AutoSaveGame.data.tenantWorldY = new Array();
AutoSaveGame.data.tenantBrokenLevel = new Array();
AutoSaveGame.data.tenantLevel = new Array();
AutoSaveGame.data.tenantGround = new Array();
AutoSaveGame.data.tenantIncome = new Array();
AutoSaveGame.data.tenantOutcome = new Array();
_local1 = 0;
while (_local1 < tenantList.length) {
AutoSaveGame.data.tenantName.push(tenantList[_local1].name);
AutoSaveGame.data.tenantWorldX.push(tenantList[_local1].worldX);
AutoSaveGame.data.tenantWorldY.push(tenantList[_local1].worldY);
AutoSaveGame.data.tenantBrokenLevel.push(tenantList[_local1].brokenLevel);
AutoSaveGame.data.tenantLevel.push(tenantList[_local1].tLevel);
AutoSaveGame.data.tenantGround.push(floorList.indexOf(tenantList[_local1].ground));
AutoSaveGame.data.tenantIncome.push(tenantList[_local1].income);
AutoSaveGame.data.tenantOutcome.push(tenantList[_local1].outcome);
_local1++;
};
}
public function addNewAchivement(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (getChildByName("Achivement") == null){
_local2 = new SE_Achievement();
_local2.play(0, 0, seTransform);
_local3 = new AchivementNotification();
_local3.x = achivementPosition.x;
_local3.y = achivementPosition.y;
_local3.name = "Achivement";
_local3.body.iconPosition = (_arg1 + 1);
addChild(_local3);
Achivement.data.trophyList[_arg1] = true;
_local4 = getChildByName("userinterface");
if (_local4 != null){
_local5 = _local4.getChildByName("AchievementScreen");
if (_local5 != null){
_local5.UpdateAchievement(_arg1);
};
};
};
}
public function autoSaveData():void{
var _local1:*;
AutoSaveGame.data.playerName = playerName;
savingPillar();
savingEmptySpace();
savingFloor();
savingTenant();
savingRestroom();
savingElevator();
savingEmployee();
savingTrash();
AutoSaveGame.data.discription = budget.discription.textList.htmlText;
AutoSaveGame.data.visitorComeList = budget.visitorComeList.textList.htmlText;
AutoSaveGame.data.incomeList = budget.incomeList.textList.htmlText;
AutoSaveGame.data.outcomeList = budget.outcomeList.textList.htmlText;
AutoSaveGame.data.gainList = budget.gainList.textList.htmlText;
AutoSaveGame.data.totalEarning = budget.totalEarning.htmlText;
AutoSaveGame.data.difference = budget.difference.htmlText;
AutoSaveGame.data.lastEarning = lastEarning;
AutoSaveGame.data.dayPass = dayPass;
AutoSaveGame.data.currentCash = ((cash - purchase) + recive);
AutoSaveGame.data.popularity = popularity;
AutoSaveGame.data.popularityModifier = popularityModifier;
AutoSaveGame.data.nextDayPopularity = nextDayPopularity;
AutoSaveGame.data.otherIncome = otherIncome;
AutoSaveGame.data.otherOutcome = otherOutcome;
AutoSaveGame.data.cleaningServiceOutcome = cleaningServiceOutcome;
AutoSaveGame.data.technicianOutcome = technicianOutcome;
AutoSaveGame.data.securityOutcome = securityOutcome;
AutoSaveGame.data.nowEvent = nowEvent;
AutoSaveGame.data.bookedEvent = bookedEvent;
AutoSaveGame.data.eventTime = eventTime;
AutoSaveGame.data.city = city;
AutoSaveGame.data.missionActive = missionActive;
AutoSaveGame.data.expandElevatorTutor = expandElevatorTutor;
AutoSaveGame.data.securityTutor = securityTutor;
AutoSaveGame.data.canGameOver = canGameOver;
AutoSaveGame.flush();
_local1 = new UI_GameSavedAnimation();
_local1.x = userinterface.autoSavePosition.x;
_local1.y = userinterface.autoSavePosition.y;
addChild(_local1);
}
public function KeyUpEvent(_arg1:KeyboardEvent):void{
var _local2:*;
_local2 = _arg1.keyCode;
if (_local2 == 65){
scrollLeft1 = false;
};
if (_local2 == Keyboard.LEFT){
scrollLeft2 = false;
};
if (_local2 == 68){
scrollRight1 = false;
};
if (_local2 == Keyboard.RIGHT){
scrollRight2 = false;
};
if (_local2 == 87){
scrollUp1 = false;
};
if (_local2 == Keyboard.UP){
scrollUp2 = false;
};
if (_local2 == 83){
scrollDown1 = false;
};
if (_local2 == Keyboard.DOWN){
scrollDown2 = false;
};
if (_local2 == Keyboard.SHIFT){
shiftKey = false;
};
if (_local2 == Keyboard.ESCAPE){
userinterface.disableAllSector();
userinterface.disableBuilding();
};
}
public function payAllEmployee():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < crewList.length) {
_local2 = crewList[_local1];
if ((((((_local2 is CrewCleaningServicelv1)) || ((_local2 is CrewCleaningServicelv2)))) || ((_local2 is CrewCleaningServicelv3)))){
cleaningServiceOutcome = (cleaningServiceOutcome + _local2.salary);
} else {
if ((((((_local2 is CrewTechnicianlv1)) || ((_local2 is CrewTechnicianlv2)))) || ((_local2 is CrewTechnicianlv3)))){
technicianOutcome = (technicianOutcome + _local2.salary);
} else {
if ((((((_local2 is CrewSecuritylv1)) || ((_local2 is CrewSecuritylv2)))) || ((_local2 is CrewSecuritylv3)))){
securityOutcome = (securityOutcome + _local2.salary);
};
};
};
addCashUpdate(_local2.salary, _local2.worldX, (_local2.worldY - _local2.height), false);
_local1++;
};
if (((cash - purchase) + recive) < 0){
if (!canGameOver){
addNotification("Your cash is run out. Do not let your cash below zero at the next day");
canGameOver = true;
} else {
gameSpeed = 0;
userinterface.deactiveAllButton();
addEventListener(MouseEvent.CLICK, GameOverSkip);
addEventListener(KeyboardEvent.KEY_UP, GameOverSkip);
};
} else {
canGameOver = false;
};
}
public function addTutorialNotification(_arg1:String, _arg2:Boolean=false, _arg3:Point=null):void{
var _local4:*;
_local4 = new TutorialNotification();
_local4.noteText.htmlText = _arg1;
if (_arg3 == null){
_local4.x = (stage.stageWidth / 2);
_local4.y = (stage.stageHeight / 2);
} else {
_local4.x = _arg3.x;
_local4.y = _arg3.y;
};
_local4.hasNextButton = _arg2;
tutorialParent.addChild(_local4);
}
public function loadEmployee(_arg1:SharedObject):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = 0;
while (_local2 < _arg1.data.employeeName.length) {
if (_arg1.data.employeeName[_local2] == "CleaningService"){
_local4 = new CrewCleaningServicelv1();
} else {
if (_arg1.data.employeeName[_local2] == "Technician"){
_local4 = new CrewTechnicianlv1();
} else {
if (_arg1.data.employeeName[_local2] == "Security"){
_local4 = new CrewSecuritylv1();
};
};
};
_local4.worldX = _arg1.data.employeeWorldX[_local2];
_local4.worldY = _arg1.data.employeeWorldY[_local2];
_local4.shiftFloor = _arg1.data.employeeShiftFloor[_local2];
_local4.floorPos = floorList[_arg1.data.employeeFloorPos[_local2]];
_local4.homePos = _arg1.data.employeeHome[_local2];
_local4.goHome = _arg1.data.employeeGoHome[_local2];
_local3 = 0;
while (_local3 < (_arg1.data.employeeLevel[_local2] - 1)) {
_local5 = _local4;
_local4 = new _local5.nextUpgrade();
_local4.ancestor = _local5;
_local3++;
};
_local4.addEventListener(MouseEvent.CLICK, EmployeeOnClick);
_local4.addEventListener(MouseEvent.MOUSE_OVER, VisitorOnOver);
_local4.addEventListener(MouseEvent.MOUSE_OUT, VisitorOnOut);
visitorParent.addChild(_local4);
crewList.push(_local4);
_local2++;
};
}
public function clearArrow():void{
var _local1:*;
while (tutorialArrowParent.numChildren > 0) {
_local1 = tutorialArrowParent.getChildAt(0);
tutorialArrowParent.removeChild(_local1);
};
}
public function BanditTutorial(_arg1:Event):void{
if (((!(securityTutor)) && (!((firstBandit == null))))){
if (securityStep == 0){
if ((((firstBandit.worldX >= 200)) && ((firstBandit.worldX <= (MAX_WIDTH - 200))))){
userinterface.deactiveAllButton();
lastSpeed = gameSpeed;
gameSpeed = 0;
cameraX = (firstBandit.worldX - (CAMERA_WIDTH / 2));
cameraY = ((firstBandit.worldY - CAMERA_HEIGHT) + 120);
addTutorialNotification("Look at the bandit, he's going to\n<font color='#FF0000'>rob your mall and take your money.</font>\nThey often hang around at night.", true);
securityStep++;
};
} else {
if (securityStep == 1){
if (tutorialParent.numChildren > 0){
gameSpeed = 0;
} else {
addTutorialNotification("You have to <font color='#007A03'>hire security</font> to catch those bandits\nbut only when they stay visible.", true);
securityStep++;
};
} else {
if (tutorialParent.numChildren > 0){
gameSpeed = 0;
} else {
gameSpeed = lastSpeed;
securityTutor = true;
userinterface.activeAllButton();
removeEventListener(Event.ENTER_FRAME, BanditTutorial);
};
};
};
};
}
public function GoToNextCity(_arg1:MouseEvent):void{
userinterface.nextTownWarning.visible = false;
userinterface.nextTownWarning.btnYes.removeEventListener(MouseEvent.CLICK, GoToNextCity);
userinterface.nextTownWarning.btnNo.removeEventListener(MouseEvent.CLICK, CancelToNextCity);
cleanAllObject();
if (city == 0){
bgm = new BGMTransition();
bgm.play(0, 0, bgmTransform);
gotoAndPlay("Transition Tokyo");
} else {
if (city == 1){
bgm = new BGMTransition();
bgm.play(0, 0, bgmTransform);
gotoAndPlay("Transition New York");
};
};
}
public function loadRestroom(_arg1:SharedObject):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < _arg1.data.restroomName.length) {
_local3 = new SupportRestroom();
_local3.worldX = _arg1.data.restroomWorldX[_local2];
_local3.worldY = _arg1.data.restroomWorldY[_local2];
_local3.x = (_local3.worldX - cameraX);
_local3.y = (_local3.worldY - cameraY);
_local3.name = _arg1.data.restroomName[_local2];
_local3.ground = floorList[_arg1.data.restroomGround[_local2]];
_local3.addEventListener(MouseEvent.CLICK, TenantClicking);
tenantParent.addChild(_local3);
restroomList.push(_local3);
_local3.tLevel = _arg1.data.restroomLevel[_local2];
_local2++;
};
}
public function DrawObject(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < _arg1.numChildren) {
_local3 = _arg1.getChildAt(_local2);
_local3.x = (_local3.worldX - cameraX);
_local3.y = (_local3.worldY - cameraY);
_local3.visible = ((drawArea.hitTestObject(_local3)) && ((_local3.alpha > 0)));
_local2++;
};
}
public function LoadFromAutoSave():void{
lastDayTime = 9;
tutorialMode = false;
if (AutoSaveGame.data.playerName){
playerName = AutoSaveGame.data.playerName;
loadPillar(AutoSaveGame);
loadEmptySpace(AutoSaveGame);
loadFloor(AutoSaveGame);
loadTenant(AutoSaveGame);
loadRestroom(AutoSaveGame);
loadElevator(AutoSaveGame);
loadEmployee(AutoSaveGame);
loadTrash(AutoSaveGame);
budget.discription.textList.htmlText = AutoSaveGame.data.discription;
budget.visitorComeList.textList.htmlText = AutoSaveGame.data.visitorComeList;
budget.incomeList.textList.htmlText = AutoSaveGame.data.incomeList;
budget.outcomeList.textList.htmlText = AutoSaveGame.data.outcomeList;
budget.gainList.textList.htmlText = AutoSaveGame.data.gainList;
budget.totalEarning.htmlText = AutoSaveGame.data.totalEarning;
budget.difference.htmlText = AutoSaveGame.data.difference;
lastEarning = AutoSaveGame.data.lastEarning;
budget.checkHeight();
dayPass = AutoSaveGame.data.dayPass;
cash = AutoSaveGame.data.currentCash;
popularity = AutoSaveGame.data.popularity;
popularityModifier = AutoSaveGame.data.popularityModifier;
nextDayPopularity = AutoSaveGame.data.nextDayPopularity;
otherIncome = AutoSaveGame.data.otherIncome;
otherOutcome = AutoSaveGame.data.otherOutcome;
cleaningServiceOutcome = AutoSaveGame.data.cleaningServiceOutcome;
technicianOutcome = AutoSaveGame.data.technicianOutcome;
securityOutcome = AutoSaveGame.data.securityOutcome;
nowEvent = AutoSaveGame.data.nowEvent;
bookedEvent = AutoSaveGame.data.bookedEvent;
eventTime = AutoSaveGame.data.eventTime;
city = AutoSaveGame.data.city;
missionActive = AutoSaveGame.data.missionActive;
expandElevatorTutor = AutoSaveGame.data.expandElevatorTutor;
securityTutor = AutoSaveGame.data.securityTutor;
if (AutoSaveGame.data.canGameOver){
canGameOver = AutoSaveGame.data.canGameOver;
};
};
}
public function ClosingProgress(_arg1:Event):void{
var i:*;
var temp:*;
var rnd:*;
var rndChance:*;
var event = _arg1;
i = 0;
while (i < tenantParent.numChildren) {
temp = tenantParent.getChildAt(i);
try {
if (((((!((temp is SupportElevator))) && (!((temp is SupportRestroom))))) && (!((temp is TenantHall))))){
if ((((dayTime >= 10)) && ((dayTime < 22)))){
temp.isClose = false;
} else {
if ((((dayTime >= 9)) && ((dayTime < 22)))){
if (dayTime >= 9){
if (temp.isClose){
if (gameDelay >= 9){
rnd = (Math.random() * 100);
rndChance = (Math.random() * 20);
temp.isClose = !((rnd < rndChance));
};
};
};
} else {
temp.isClose = !((temp.visitorList.length > 0));
};
};
};
} catch(e:Error) {
};
i = (i + 1);
};
}
public function UIOverEvent(_arg1:MouseEvent):void{
if (!mouseIsDown){
mouseInUI = true;
};
}
public function loadGame():void{
if (gameLoaded >= 0){
if (gameLoaded < SaveGameData.length){
LoadFromSlot(gameLoaded);
} else {
LoadFromAutoSave();
};
};
}
public function loadTrash(_arg1:SharedObject):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < _arg1.data.trashWorldX.length) {
_local3 = new fx_trash();
_local3.worldX = _arg1.data.trashWorldX[_local2];
_local3.worldY = _arg1.data.trashWorldY[_local2];
_local3.trashLevel = _arg1.data.trashLevel[_local2];
_local3.ground = floorList[_arg1.data.trashGround[_local2]];
_local2++;
};
}
public function soundInitialize():void{
bgm = new (BGM_LIST[city]);
bgmChannel = bgm.play(0, 0, bgmTransform);
}
public function addBandit():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if ((((((dayTime >= 22)) || ((dayTime < 5)))) && (!(alarmTrigger)))){
banditDelay++;
if (banditDelay >= BANDIT_APPEAR){
banditDelay = 0;
_local1 = (Math.random() * 100);
if (_local1 < (30 + (city * 20))){
_local2 = Math.floor((Math.random() * (city + 1)));
_local3 = new (BANDIT_LIST[_local2]);
if ((((_local3 is Bandit)) || ((_local3 is Ninja)))){
_local3.floorPos = ground;
} else {
_local4 = Math.floor(((Math.random() * floorList.length) - 1));
_local3.floorPos = floorList[_local4];
};
_local3.homePos = (Math.floor((Math.random() * 2)) * MAX_WIDTH);
_local3.worldX = _local3.homePos;
banditList.push(_local3);
visitorParent.addChild(_local3);
if (((!(securityTutor)) && ((firstBandit == null)))){
firstBandit = _local3;
addEventListener(Event.ENTER_FRAME, BanditTutorial);
};
};
};
};
}
public function savingElevator():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
AutoSaveGame.data.elevatorName = new Array();
AutoSaveGame.data.elevatorWorldX = new Array();
AutoSaveGame.data.elevatorWorldY = new Array();
AutoSaveGame.data.elevatorLevel = new Array();
AutoSaveGame.data.elevatorBodyListY = new Array();
AutoSaveGame.data.elevatorFloorList = new Array();
_local1 = 0;
while (_local1 < elevatorList.length) {
AutoSaveGame.data.elevatorName.push(elevatorList[_local1].name);
AutoSaveGame.data.elevatorWorldX.push(elevatorList[_local1].worldX);
AutoSaveGame.data.elevatorWorldY.push(elevatorList[_local1].worldY);
AutoSaveGame.data.elevatorLevel.push(elevatorList[_local1].tLevel);
_local2 = new Array();
_local3 = new Array();
_local4 = 0;
while (_local4 < elevatorList[_local1].elevatorList.length) {
_local2.push(elevatorList[_local1].elevatorList[_local4].y);
_local3.push(floorList.indexOf(elevatorList[_local1].floorList[_local4]));
_local4++;
};
AutoSaveGame.data.elevatorBodyListY.push(_local2);
AutoSaveGame.data.elevatorFloorList.push(_local3);
_local1++;
};
}
public function MouseMoveEvent(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (((mouseIsDown) && ((userinterface.getButtonActive() == 0)))){
_local2 = _arg1.stageX;
_local3 = _arg1.stageY;
_local4 = (_local2 - lastPosX);
lastPosX = _local2;
cameraX = (cameraX - _local4);
if (cameraX <= 0){
cameraX = 0;
};
if ((cameraX + CAMERA_WIDTH) >= MAX_WIDTH){
cameraX = (MAX_WIDTH - CAMERA_WIDTH);
};
_local5 = (_local3 - lastPosY);
lastPosY = _local3;
cameraY = (cameraY - _local5);
if (cameraY <= 0){
cameraY = 0;
};
if ((cameraY + CAMERA_HEIGHT) >= MAX_HEIGHT){
cameraY = (MAX_HEIGHT - CAMERA_HEIGHT);
};
if (((((tutorialMode) && ((tutorialStep == 4)))) && ((((_local4 >= 5)) || ((_local5 >= 5)))))){
RemoveTutorialText(tutorialParent);
};
};
if (((!(mouseInUI)) && ((userinterface.getButtonActive() == 0)))){
mouse.hide();
handCursor.visible = true;
handCursor.x = mouseX;
handCursor.y = mouseY;
} else {
mouse.show();
handCursor.visible = false;
};
noticeParent.x = mouseX;
noticeParent.y = mouseY;
}
public function savingEmptySpace():void{
var _local1:*;
var _local2:*;
AutoSaveGame.data.emptyWorldX = new Array();
AutoSaveGame.data.emptyWorldY = new Array();
_local1 = 0;
while (_local1 < emptyParent.numChildren) {
_local2 = emptyParent.getChildAt(_local1);
AutoSaveGame.data.emptyWorldX.push(_local2.worldX);
AutoSaveGame.data.emptyWorldY.push(_local2.worldY);
_local1++;
};
}
public function ExpandElevatorTutor(_arg1:Event):void{
if (((!(expandElevatorTutor)) && ((elevatorList.length > 0)))){
lastSpeed = gameSpeed;
cameraX = ((elevatorList[0].worldX + (elevatorList[0].width / 2)) - (CAMERA_WIDTH / 2));
cameraY = (((elevatorList[0].worldY + elevatorList[0].height) - CAMERA_HEIGHT) + 120);
addTutorialNotification("Elevator can be expanded to reach higher floor.\nTo expand elevator <font color='#007A03'>hold left mouse button</font> then\ndrag it as high as you want. But remember,\nexpanding elevator will <font color='#FF0000'>take some cost</font>.", true);
userinterface.deactiveAllButton();
expandElevatorTutor = true;
} else {
if (tutorialParent.numChildren > 0){
gameSpeed = 0;
} else {
gameSpeed = lastSpeed;
userinterface.activeAllButton();
removeEventListener(Event.ENTER_FRAME, ExpandElevatorTutor);
};
};
}
public function completes(_arg1:Event):void{
gotoAndPlay("Gamesfree");
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loading);
this.loaderInfo.removeEventListener(Event.COMPLETE, completes);
}
public function tutorialArrowRelation(_arg1:MovieClip, _arg2:MovieClip, _arg3=1, _arg4=0):void{
var _local5:*;
var _local6:*;
var _local7:*;
_local5 = ((_arg2.rotation * Math.PI) / 180);
_local6 = (_arg2.x - (_arg2.height * Math.sin(_local5)));
_local7 = (_arg2.y + (_arg2.height * Math.cos(_local5)));
_arg1.x = (_local6 + ((_arg1.width / 2) * _arg3));
_arg1.y = (_local7 + ((_arg1.height / 2) * _arg4));
}
public function MoneySplit(_arg1:Number):String{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = "";
if (Math.abs(_arg1) >= 1000){
_local3 = Math.floor((_arg1 / 1000));
_local4 = (Math.abs(_arg1) % 1000);
_local5 = MoneySplit(_local3);
_local6 = (_local4 + "");
while (_local6.length < 3) {
_local6 = ("0" + _local6);
};
_local2 = ((_local5 + ",") + _local6);
} else {
_local2 = (_arg1 + "");
};
return (_local2);
}
public function moneyToNumber(_arg1:String):Number{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
while (_arg1.length > 0) {
_local3 = _arg1.charAt(0);
_arg1 = _arg1.substring(1);
if ((((_local3 >= "0")) && ((_local3 <= "9")))){
_local4 = Number(_local3);
_local2 = ((_local2 * 10) + _local4);
};
};
return (_local2);
}
public function DrawStreet(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
while (_local2 < bgParent.numChildren) {
_local4 = bgParent.getChildAt(_local2);
bgParent.getChildAt(_local2).x = (_local4.worldX - cameraX);
_local4.y = (_local4.worldY - cameraY);
_local4.visible = drawArea.hitTestObject(_local4);
_local2++;
};
_local3 = (bgCity.width / MAX_WIDTH);
bgCity.x = (-(cameraX) * _local3);
bgCity2.x = (bgCity.width - (cameraX * _local3));
bgCity.y = (defaultCityY + (MAX_HEIGHT - (cameraY + CAMERA_HEIGHT)));
bgCity2.y = (defaultCityY + (MAX_HEIGHT - (cameraY + CAMERA_HEIGHT)));
if (landmark != null){
landmark.x = ((stage.stageWidth / 2) + (((MAX_WIDTH / 2) - (cameraX + (CAMERA_WIDTH / 2))) * _local3));
landmark.y = ((defaultCityY - 100) + (MAX_HEIGHT - (cameraY + CAMERA_HEIGHT)));
};
ground.y = (ground.worldY - cameraY);
sky.y = (sky.worldY - cameraY);
}
public function SoundManagement(_arg1:Event):void{
var _local2:*;
if ((((dayTime >= 22)) || ((dayTime < 9)))){
if (!(((bgm is BGMNight)) || ((bgm is BGMSpoted)))){
if (bgmEnvironment > 0){
bgmEnvironment = (bgmEnvironment - 0.01);
bgmTransform.volume = (bgmEnvironment * bgmVolume);
} else {
if (bgmChannel != null){
bgmChannel.stop();
};
bgm = new BGMNight();
bgmEnvironment = 1;
bgmTransform.volume = (bgmEnvironment * bgmVolume);
bgmChannel = bgm.play(0, 0, bgmTransform);
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
};
if (bgmChannel != null){
bgmChannel.soundTransform = bgmTransform;
};
};
} else {
if ((bgm is BGMNight)){
if (bgmEnvironment > 0){
bgmEnvironment = (bgmEnvironment - 0.01);
bgmTransform.volume = (bgmEnvironment * bgmVolume);
} else {
if (bgmChannel != null){
bgmChannel.stop();
};
bgm = new (BGM_LIST[city]);
bgmEnvironment = 1;
bgmTransform.volume = (bgmEnvironment * bgmVolume);
bgmChannel = bgm.play(0, 0, bgmTransform);
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
};
if (bgmChannel != null){
bgmChannel.soundTransform = bgmTransform;
};
};
if ((((dayTime >= 12)) && ((dayTime < 22)))){
if (nowEvent == 0){
if (!(bgm is BGM_Event_Art)){
if (bgmEnvironment > 0){
bgmEnvironment = (bgmEnvironment - 0.01);
bgmTransform.volume = (bgmEnvironment * bgmVolume);
} else {
if (bgmChannel != null){
bgmChannel.stop();
};
bgm = new BGM_Event_Art();
bgmEnvironment = 1;
bgmTransform.volume = (bgmEnvironment * bgmVolume);
bgmChannel = bgm.play(0, 0, bgmTransform);
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
};
if (bgmChannel != null){
bgmChannel.soundTransform = bgmTransform;
};
};
} else {
if (nowEvent == 1){
if (!(bgm is BGM_Event_Electro)){
if (bgmEnvironment > 0){
bgmEnvironment = (bgmEnvironment - 0.01);
bgmTransform.volume = (bgmEnvironment * bgmVolume);
} else {
if (bgmChannel != null){
bgmChannel.stop();
};
bgm = new BGM_Event_Electro();
bgmEnvironment = 1;
bgmTransform.volume = (bgmEnvironment * bgmVolume);
bgmChannel = bgm.play(0, 0, bgmTransform);
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
};
if (bgmChannel != null){
bgmChannel.soundTransform = bgmTransform;
};
};
} else {
if (nowEvent == 2){
if (!(bgm is BGM_Event_Concert)){
if (bgmEnvironment > 0){
bgmEnvironment = (bgmEnvironment - 0.1);
bgmTransform.volume = (bgmEnvironment * bgmVolume);
} else {
if (bgmChannel != null){
bgmChannel.stop();
};
bgm = new BGM_Event_Concert();
bgmEnvironment = 1;
bgmTransform.volume = (bgmEnvironment * bgmVolume);
bgmChannel = bgm.play(0, 0, bgmTransform);
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
};
if (bgmChannel != null){
bgmChannel.soundTransform = bgmTransform;
};
} else {
if ((((dayTime >= 21)) && ((dayMinute >= 30)))){
if (bgmEnvironment > 0){
bgmEnvironment = (bgmEnvironment - 0.01);
bgmTransform.volume = (bgmEnvironment * bgmVolume);
};
bgmChannel.soundTransform = bgmTransform;
};
};
};
};
};
};
};
if (alarmTrigger){
if (!(bgm is BGMSpoted)){
bgmChannel.stop();
tBgm = bgm;
bgm = new BGMSpoted();
bgmChannel = bgm.play(0, 0, bgmTransform);
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
};
if (seChannel == null){
_local2 = new SEAlarm();
seChannel = _local2.play(0, 0, seTransform);
seChannel.addEventListener(Event.SOUND_COMPLETE, AlarmLoop);
};
} else {
if ((bgm is BGMSpoted)){
bgmChannel.stop();
bgm = tBgm;
bgm = new BGMNight();
bgmChannel = bgm.play(0, 0, bgmTransform);
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
};
if (seChannel != null){
seChannel.stop();
seChannel = null;
};
};
}
public function GameOverSkip(_arg1:Event):void{
var _local2:*;
_local2 = new GameOverScreen();
this.addChild(_local2);
removeEventListener(MouseEvent.CLICK, GameOverSkip);
removeEventListener(KeyboardEvent.KEY_UP, GameOverSkip);
}
public function BuildingMode(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (buildParent.numChildren > 0){
_local2 = buildParent.getChildAt(0);
_local3 = false;
_local4 = 0;
while (_local4 < userinterface.hireArr.length) {
if ((_local2 is userinterface.hireArr[_local4])){
_local3 = true;
};
_local4++;
};
if (!_local3){
_local7 = (_arg1.stageX - (_local2.width / 2));
if ((_local2 is BuildElevator)){
_local8 = _arg1.stageY;
} else {
_local8 = (_arg1.stageY - (_local2.height / 2));
};
} else {
_local7 = _arg1.stageX;
_local8 = _local2.y;
};
_local5 = (_local7 + cameraX);
_local6 = (_local8 + cameraY);
_local5 = (Math.round((_local5 / 12)) * 12);
_local6 = (Math.round((_local6 / 12)) * 12);
_local2.x = (_local5 - cameraX);
_local2.y = (_local6 - cameraY);
};
}
public function LittleGiantURL(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.littlegiantworld.com");
navigateToURL(_local2, "_blank");
}
public function UIOutEvent(_arg1:MouseEvent):void{
mouseInUI = false;
}
public function VisitorUpdate(_arg1:Event):void{
var _local2:*;
DrawObject(visitorParent);
if (gameDelay >= 9){
maxVisitor = ((floorAverage * (floorList.length - 1)) * mass);
if (maxVisitor > MAX_VISITOR){
maxVisitor = MAX_VISITOR;
};
addRandomVisitor();
addBandit();
swapDelay--;
if (swapDelay <= 0){
if (visitorParent.numChildren > 0){
_local2 = visitorParent.getChildAt(0);
visitorParent.addChild(_local2);
};
swapDelay = 72;
};
};
userinterface.visitorNumber.text = visitorList.length;
userinterface.crewNumber.text = crewList.length;
userinterface.tenantNumber.text = tenantList.length;
}
public function BackToMainMenu():void{
cleanAllObject();
gotoAndPlay("Main Menu");
}
public function VisitorOnClick(_arg1:MouseEvent):void{
var _local2:*;
var _local3:BitmapFilter;
var _local4:*;
var _local5:*;
if (((((!((userinterface.getButtonActive() == 0))) && ((canClick < 7)))) && (!((_arg1.currentTarget == visitorFocus))))){
if (visitorFocus != null){
visitorFocus.filters = [];
};
if (menuParent.numChildren > 0){
_local5 = menuParent.getChildAt(0);
_local5.closeMenu();
};
_local2 = new UI_VisitorInformation();
_local2.x = menuX;
_local2.y = menuY;
menuParent.addChild(_local2);
visitorFocus = _arg1.currentTarget;
_local3 = new GlowFilter(0xFF8800, 0.9, 5, 5, 2);
_local4 = new Array();
_local4.push(_local3);
visitorFocus.filters = _local4;
};
}
public function savingPillar():void{
var _local1:*;
var _local2:*;
AutoSaveGame.data.pillarWorldX = new Array();
AutoSaveGame.data.pillarWorldY = new Array();
_local1 = 0;
while (_local1 < pillarParent.numChildren) {
_local2 = pillarParent.getChildAt(_local1);
if ((_local2 is Pillar)){
AutoSaveGame.data.pillarWorldX.push(_local2.worldX);
AutoSaveGame.data.pillarWorldY.push(_local2.worldY);
};
_local1++;
};
}
public function loadFloor(_arg1:SharedObject):void{
var _local2:*;
_local2 = 0;
while (_local2 < _arg1.data.floorWorldX.length) {
createFloor(_arg1.data.floorWorldX[_local2], _arg1.data.floorWorldY[_local2], _arg1.data.floorWidth[_local2]);
_local2++;
};
}
public function countAllEmployee(_arg1:Number=0):Number{
var _local2:*;
var _local3:*;
_local2 = 0;
_local3 = 0;
while (_local3 < crewList.length) {
if (crewList[_local3].cLevel >= _arg1){
_local2++;
};
_local3++;
};
return (_local2);
}
public function InitCloud():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < 5) {
_local2 = new cloudGame();
_local2.speed = ((Math.random() * 2) + 1);
_local2.normal.gotoAndStop(Math.ceil((Math.random() * _local2.normal.totalFrames)));
_local2.sunset.gotoAndStop(_local2.normal.currentFrame);
_local2.x = (Math.random() * stage.stageWidth);
_local2.y = (Math.random() * stage.stageHeight);
_local2.normal.alpha = (1 - sunset.alpha);
_local2.sunset.alpha = sunset.alpha;
_local2.alpha = (1 - night.alpha);
cloudList.push(_local2);
bgAccParent.addChild(_local2);
_local2.addEventListener(Event.ENTER_FRAME, CloudMove);
_local1++;
};
}
public function addRandomVisitor():void{
var isSpecial:*;
var appearance:*;
var chanceOut:*;
var rnd:*;
var si:*;
var sRnd:*;
var newVisitor:*;
var i:*;
var randomAppear:*;
var rndIndex:*;
var vIndex:*;
visitorDelay++;
if (visitorDelay > VISITOR_APPEAR){
visitorDelay = 0;
if (visitorList.length < maxVisitor){
if (popularity < 10){
appearance = 1;
} else {
appearance = Math.round((popularity / 10));
};
if (tenantList.length > 0){
chanceOut = (popularity + (popularityModifier / 2));
if (((((!((hall == null))) && ((nowEvent >= 0)))) && (!(hall.isClose)))){
chanceOut = (chanceOut + (chanceOut * (hall.tLevel * (0.1 * (nowEvent + 1)))));
};
if (chanceOut < 5){
chanceOut = 5;
};
} else {
chanceOut = 0;
};
isSpecial = false;
if (chanceOut > (80 + (40 * specialVisitor.length))){
try {
rnd = (Math.random() * 100);
if (rnd < (chanceOut - (80 + (40 * specialVisitor.length)))){
if (city < 2){
sRnd = Math.floor(((Math.random() * SPECIAL_VISITOR_LIST.length) - 1));
} else {
sRnd = Math.floor((Math.random() * SPECIAL_VISITOR_LIST.length));
};
isSpecial = true;
si = 0;
while (si < specialVisitor.length) {
if ((specialVisitor[si] is SPECIAL_VISITOR_LIST[sRnd])){
isSpecial = false;
break;
};
si = (si + 1);
};
};
} catch(e:Error) {
isSpecial = false;
};
};
if (isSpecial){
newVisitor = new (SPECIAL_VISITOR_LIST[sRnd]);
newVisitor.floorPos = ground;
newVisitor.homePos = (Math.floor((Math.random() * 2)) * MAX_WIDTH);
newVisitor.worldX = newVisitor.homePos;
newVisitor.worldY = (ground.worldY - ground.height);
visitorList.push(newVisitor);
visitorParent.addChild(newVisitor);
newVisitor.addEventListener(MouseEvent.MOUSE_OVER, VisitorOnOver);
newVisitor.addEventListener(MouseEvent.MOUSE_OUT, VisitorOnOut);
newVisitor.addEventListener(MouseEvent.CLICK, VisitorOnClick);
specialVisitor.push(newVisitor);
addNotification((newVisitor.visitorName + " is coming"));
if ((newVisitor is VisitorObama)){
if (!Achivement.data.trophyList[18]){
addNewAchivement(18);
};
};
} else {
i = 0;
while (i < appearance) {
randomAppear = (Math.random() * 100);
if (randomAppear <= (chanceOut + (2 * specialVisitor.length))){
rndIndex = Math.floor((Math.random() * visitorCanAppear[city].length));
vIndex = visitorCanAppear[city][rndIndex];
newVisitor = new (VISITOR_LIST[vIndex]);
newVisitor.floorPos = ground;
newVisitor.homePos = (Math.floor((Math.random() * 2)) * MAX_WIDTH);
newVisitor.worldX = newVisitor.homePos;
newVisitor.speedX = Math.ceil((Math.random() * 3));
visitorList.push(newVisitor);
visitorParent.addChild(newVisitor);
newVisitor.addEventListener(MouseEvent.MOUSE_OVER, VisitorOnOver);
newVisitor.addEventListener(MouseEvent.MOUSE_OUT, VisitorOnOut);
newVisitor.addEventListener(MouseEvent.CLICK, VisitorOnClick);
};
i = (i + 1);
};
};
};
};
}
public function saveGame(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = true;
if (_local2){
SaveGameData[_arg1].data.playerName = AutoSaveGame.data.playerName;
SaveGameData[_arg1].data.saveDate = new Date();
SaveGameData[_arg1].data.pillarWorldX = AutoSaveGame.data.pillarWorldX.concat();
SaveGameData[_arg1].data.pillarWorldY = AutoSaveGame.data.pillarWorldY.concat();
SaveGameData[_arg1].data.emptyWorldX = AutoSaveGame.data.emptyWorldX.concat();
SaveGameData[_arg1].data.emptyWorldY = AutoSaveGame.data.emptyWorldY.concat();
SaveGameData[_arg1].data.floorWorldX = AutoSaveGame.data.floorWorldX.concat();
SaveGameData[_arg1].data.floorWorldY = AutoSaveGame.data.floorWorldY.concat();
SaveGameData[_arg1].data.floorWidth = AutoSaveGame.data.floorWidth.concat();
SaveGameData[_arg1].data.tenantName = AutoSaveGame.data.tenantName.concat();
SaveGameData[_arg1].data.tenantWorldX = AutoSaveGame.data.tenantWorldX.concat();
SaveGameData[_arg1].data.tenantWorldY = AutoSaveGame.data.tenantWorldY.concat();
SaveGameData[_arg1].data.tenantBrokenLevel = AutoSaveGame.data.tenantBrokenLevel.concat();
SaveGameData[_arg1].data.tenantLevel = AutoSaveGame.data.tenantLevel.concat();
SaveGameData[_arg1].data.tenantGround = AutoSaveGame.data.tenantGround.concat();
SaveGameData[_arg1].data.tenantIncome = AutoSaveGame.data.tenantIncome.concat();
SaveGameData[_arg1].data.tenantOutcome = AutoSaveGame.data.tenantOutcome.concat();
SaveGameData[_arg1].data.restroomName = AutoSaveGame.data.restroomName.concat();
SaveGameData[_arg1].data.restroomWorldX = AutoSaveGame.data.restroomWorldX.concat();
SaveGameData[_arg1].data.restroomWorldY = AutoSaveGame.data.restroomWorldY.concat();
SaveGameData[_arg1].data.restroomLevel = AutoSaveGame.data.restroomLevel.concat();
SaveGameData[_arg1].data.restroomGround = AutoSaveGame.data.restroomGround.concat();
SaveGameData[_arg1].data.elevatorName = AutoSaveGame.data.elevatorName.concat();
SaveGameData[_arg1].data.elevatorWorldX = AutoSaveGame.data.elevatorWorldX.concat();
SaveGameData[_arg1].data.elevatorWorldY = AutoSaveGame.data.elevatorWorldY.concat();
SaveGameData[_arg1].data.elevatorLevel = AutoSaveGame.data.elevatorLevel.concat();
SaveGameData[_arg1].data.elevatorBodyListY = new Array(AutoSaveGame.data.elevatorBodyListY);
SaveGameData[_arg1].data.elevatorFloorList = new Array(AutoSaveGame.data.elevatorFloorList);
_local3 = 0;
while (_local3 < AutoSaveGame.data.elevatorBodyListY.length) {
SaveGameData[_arg1].data.elevatorBodyListY[_local3] = AutoSaveGame.data.elevatorBodyListY[_local3].concat();
SaveGameData[_arg1].data.elevatorFloorList[_local3] = AutoSaveGame.data.elevatorFloorList[_local3].concat();
_local3++;
};
SaveGameData[_arg1].data.employeeName = AutoSaveGame.data.employeeName.concat();
SaveGameData[_arg1].data.employeeWorldX = AutoSaveGame.data.employeeWorldX.concat();
SaveGameData[_arg1].data.employeeWorldY = AutoSaveGame.data.employeeWorldY.concat();
SaveGameData[_arg1].data.employeeLevel = AutoSaveGame.data.employeeLevel.concat();
SaveGameData[_arg1].data.employeeShiftFloor = AutoSaveGame.data.employeeShiftFloor.concat();
SaveGameData[_arg1].data.employeeFloorPos = AutoSaveGame.data.employeeFloorPos.concat();
SaveGameData[_arg1].data.employeeHome = AutoSaveGame.data.employeeHome.concat();
SaveGameData[_arg1].data.employeeGoHome = AutoSaveGame.data.employeeGoHome.concat();
SaveGameData[_arg1].data.trashWorldX = AutoSaveGame.data.trashWorldX.concat();
SaveGameData[_arg1].data.trashWorldY = AutoSaveGame.data.trashWorldY.concat();
SaveGameData[_arg1].data.trashLevel = AutoSaveGame.data.trashLevel.concat();
SaveGameData[_arg1].data.trashGround = AutoSaveGame.data.trashGround.concat();
SaveGameData[_arg1].data.discription = AutoSaveGame.data.discription;
SaveGameData[_arg1].data.visitorComeList = AutoSaveGame.data.visitorComeList;
SaveGameData[_arg1].data.incomeList = AutoSaveGame.data.incomeList;
SaveGameData[_arg1].data.outcomeList = AutoSaveGame.data.outcomeList;
SaveGameData[_arg1].data.gainList = AutoSaveGame.data.gainList;
SaveGameData[_arg1].data.totalEarning = AutoSaveGame.data.totalEarning;
SaveGameData[_arg1].data.difference = AutoSaveGame.data.difference;
SaveGameData[_arg1].data.lastEarning = AutoSaveGame.data.lastEarning;
SaveGameData[_arg1].data.dayPass = AutoSaveGame.data.dayPass;
SaveGameData[_arg1].data.currentCash = AutoSaveGame.data.currentCash;
SaveGameData[_arg1].data.popularity = AutoSaveGame.data.popularity;
SaveGameData[_arg1].data.popularityModifier = AutoSaveGame.data.popularityModifier;
SaveGameData[_arg1].data.nextDayPopularity = AutoSaveGame.data.nextDayPopularity;
SaveGameData[_arg1].data.otherIncome = AutoSaveGame.data.otherIncome;
SaveGameData[_arg1].data.otherOutcome = AutoSaveGame.data.otherOutcome;
SaveGameData[_arg1].data.cleaningServiceOutcome = AutoSaveGame.data.cleaningServiceOutcome;
SaveGameData[_arg1].data.technicianOutcome = AutoSaveGame.data.technicianOutcome;
SaveGameData[_arg1].data.securityOutcome = AutoSaveGame.data.securityOutcome;
SaveGameData[_arg1].data.nowEvent = AutoSaveGame.data.nowEvent;
SaveGameData[_arg1].data.bookedEvent = AutoSaveGame.data.bookedEvent;
SaveGameData[_arg1].data.eventTime = AutoSaveGame.data.eventTime;
SaveGameData[_arg1].data.city = AutoSaveGame.data.city;
SaveGameData[_arg1].data.missionActive = AutoSaveGame.data.missionActive;
SaveGameData[_arg1].data.expandElevatorTutor = AutoSaveGame.data.expandElevatorTutor;
SaveGameData[_arg1].data.securityTutor = AutoSaveGame.data.securityTutor;
SaveGameData[_arg1].data.canGameOver = AutoSaveGame.data.canGameOver;
SaveGameData[_arg1].flush();
_local4 = new UI_ManualGameSavedAnimation();
_local4.x = userinterface.autoSavePosition.x;
_local4.y = userinterface.autoSavePosition.y;
addChild(_local4);
};
}
public function BuildingCollition(_arg1:Event):void{
var _local2:*;
if (buildParent.numChildren > 0){
_local2 = buildParent.getChildAt(0);
canBuild = checkCollition(_local2);
if (canBuild){
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 0.3, 0, 0, 0, 0);
} else {
_local2.transform.colorTransform = new ColorTransform(1, 0, 0, 0.3, 0, 0, 0, 0);
};
};
}
public function DrawTenant(_arg1:Event):void{
var _local2:*;
var _local3:*;
DrawObject(tenantParent);
DrawObject(pillarParent);
DrawObject(emptyParent);
DrawObject(legendParent);
_local2 = 0;
while (_local2 < dirtyParent.numChildren) {
_local3 = dirtyParent.getChildAt(_local2);
_local3.x = (_local3.worldX - cameraX);
_local3.y = (_local3.worldY - cameraY);
_local3.visible = ((drawArea.hitTestObject(_local3)) && (_local3.bundle));
_local2++;
};
}
public function setArrowPosition(_arg1:MovieClip, _arg2:Number):void{
if (_arg2 > _arg1.totalFrames){
_arg1.gotoAndPlay(1);
} else {
_arg1.gotoAndPlay(_arg2);
};
}
public function createPillar(_arg1:Number, _arg2:Number):void{
var _local3:*;
_local3 = new Pillar();
_local3.worldX = _arg1;
_local3.worldY = _arg2;
_local3.x = (_local3.worldX - cameraX);
_local3.y = (_local3.worldY - cameraY);
pillarParent.addChild(_local3);
}
public function StartGame(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
gameSpeed = 1;
tutorialMode = false;
missionActive++;
userinterface.activeAllButton();
addEventListener(Event.ENTER_FRAME, VisitorUpdate);
stage.addEventListener(MouseEvent.MOUSE_MOVE, BuildingMode);
addEventListener(Event.ENTER_FRAME, BuildingCollition);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUpEvent);
stage.addEventListener(MouseEvent.CLICK, MouseClickEvent);
stage.addEventListener(MouseEvent.MOUSE_MOVE, MouseMoveEvent);
stage.addEventListener(MouseEvent.MOUSE_UP, StartBuilding);
stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyDownEvent);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyUpEvent);
stage.addEventListener(Event.ENTER_FRAME, ScrollingWithKey);
addEventListener(Event.ENTER_FRAME, TriggerAlarm);
addEventListener(Event.ENTER_FRAME, UpdateMission);
addEventListener(Event.ENTER_FRAME, CheckMission);
removeEventListener(Event.ENTER_FRAME, OtherCheck);
addEventListener(Event.ENTER_FRAME, OtherCheck);
_local2.removeEventListener(MouseEvent.CLICK, StartGame);
}
public function checkCollition(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
_local2 = false;
_local3 = false;
_local4 = 0;
while (_local4 < userinterface.hireArr.length) {
if ((_arg1 is userinterface.hireArr[_local4])){
_local3 = true;
};
_local4++;
};
_local5 = (_arg1.x + cameraX);
_local6 = (_arg1.y + cameraY);
if ((((((_local5 < MIN_BUILD_X)) || (((_local5 + _arg1.width) > MAX_BUILD_X)))) || (_arg1.hitTestObject(sky)))){
_local2 = false;
} else {
_local7 = false;
if (!_local3){
_local8 = 0;
while (_local8 < tenantParent.numChildren) {
_local9 = tenantParent.getChildAt(_local8);
if (_local9.body != null){
if (!(_local9 is SupportElevator)){
_local10 = _local9.body;
} else {
_local10 = _local9;
};
} else {
_local10 = _local9;
};
if (_arg1.body.hitTestObject(_local10)){
_local7 = true;
};
if ((((_arg1 is BuildElevator)) && (_arg1.body2.hitTestObject(_local10)))){
_local7 = true;
};
_local8++;
};
} else {
_local8 = 0;
while (_local8 < floorList.length) {
_local11 = floorList[_local8];
if (!(_local11 is Floor)){
_arg1.y = (_local11.y - _local11.height);
} else {
if ((((((((_arg1.y > _local11.y)) && ((((_arg1.x > _local11.x)) && ((_arg1.x < (_local11.x + _local11.width))))))) && ((mouseY <= _local11.y)))) && (!((_local8 == (floorList.length - 1)))))){
_arg1.y = _local11.y;
};
};
_local8++;
};
};
if (_local7){
_local2 = false;
} else {
_local12 = false;
_local8 = 0;
while (_local8 < floorList.length) {
_local9 = floorList[_local8];
if ((((_local9 is Floor)) && (_arg1.body.hitTestObject(_local9)))){
if (_arg1.y <= _local9.y){
_local12 = true;
_local13 = _local9;
};
};
_local8++;
};
if (_local12){
if (!_local3){
_local2 = (((((((_arg1.y + _arg1.body.height) - 2) == _local13.y)) && (((_arg1.x - 12) >= _local13.x)))) && ((((_arg1.x + _arg1.width) - 12) <= (_local13.x + _local13.width))));
} else {
_local2 = (((((_arg1.y == _local13.y)) && (((_arg1.x - (_arg1.width / 2)) >= _local13.x)))) && (((_arg1.x + (_arg1.width / 2)) <= (_local13.x + _local13.width))));
};
bottom = _local13;
} else {
if (_arg1.body.hitTestObject(ground)){
if (_local3){
if (_arg1.y == (ground.y - ground.height)){
_local2 = true;
bottom = ground;
} else {
_local2 = false;
};
} else {
if (((_arg1.y + _arg1.body.height) - 2) == (ground.y - ground.height)){
_local2 = true;
bottom = ground;
} else {
_local2 = false;
};
};
} else {
_local2 = false;
};
};
};
};
return (_local2);
}
public function tutorialNext(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
if (tutorialParent.numChildren > 0){
clearArrow();
RemoveTutorialText(tutorialParent);
_local2.removeEventListener(MouseEvent.CLICK, tutorialNext);
};
}
public function BGMLoop(_arg1:Event):void{
bgmChannel = bgm.play(0, 0, bgmTransform);
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
}
public function addTips(_arg1:String):void{
var _local2:*;
_local2 = new TipsNote();
_local2.note.infoList.text = _arg1;
_local2.x = tipsRegion.x;
_local2.y = tipsRegion.y;
addChild(_local2);
}
public function CloudMove(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = _arg1.currentTarget;
_local2.alpha = (1 - night.alpha);
_local2.normal.alpha = (1 - sunset.alpha);
_local2.sunset.alpha = sunset.alpha;
_local2.x = (_local2.x - _local2.speed);
_local3 = cloudList.indexOf(_local2);
if ((((_local3 >= 0)) && ((_local2.x <= 0)))){
cloudList.splice(_local3, 1);
};
if ((_local2.x + _local2.width) <= 0){
_local2.removeEventListener(Event.ENTER_FRAME, CloudMove);
bgAccParent.removeChild(_local2);
};
}
public function CheckMission(_arg1:Event):void{
var missionString:*;
var floorWithBooth:*;
var i:*;
var floorAmount:*;
var buildAmount:*;
var buildType:*;
var buildNum:*;
var upgradeAmount:*;
var upgradeType:*;
var upgradeModeLast:*;
var buildList:*;
var upgradeNum:*;
var upgradeMode:*;
var upgradeLevel:*;
var numUpgraded:*;
var upgradeLevelNum:*;
var earningAmount:*;
var earningNum:*;
var employeeAmount:*;
var employeeType:*;
var employeeNum:*;
var promoteAmount:*;
var promoteType:*;
var promoteNum:*;
var numPromoted:*;
var promoteModeLast:*;
var promoteLevel:*;
var promoteLevelNum:*;
var visitorAmount:*;
var visitorCondition:*;
var visitorNum:*;
var banditAmount:*;
var banditNum:*;
var cashAmount:*;
var cashNum:*;
var event = _arg1;
if (userinterface.objective.objectiveInfo.text == mission[city][missionActive]){
missionString = mission[city][missionActive];
if (missionString == "Build the first booth"){
if (tenantList.length >= 1){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString == "Build at least one booth at 2nd floor"){
if ((floorList.length - 1) >= 2){
floorWithBooth = 0;
i = 0;
while (i < floorList.length) {
if (floorList[i].tenantList.length >= 1){
floorWithBooth = (floorWithBooth + 1);
};
i = (i + 1);
};
if (floorWithBooth >= 2){
userinterface.objective.success = true;
missionActive++;
};
};
} else {
if (missionString.toUpperCase() == "Build a hall".toUpperCase()){
if (hall != null){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.toUpperCase() == "Have full upgrade hall".toUpperCase()){
if (((!((hall == null))) && ((hall.tLevel >= hall.MAX_LEVEL)))){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.substr(0, "Build mall with".length) == "Build mall with"){
floorAmount = Number(getSubstring(missionString, "Build mall with"));
try {
if ((floorList.length - 1) >= floorAmount){
floorWithBooth = 0;
i = 0;
while (i < floorList.length) {
if ((floorList[i].tenantList.length + floorList[i].toiletList.length) >= 1){
floorWithBooth = (floorWithBooth + 1);
};
i = (i + 1);
};
if (floorWithBooth >= floorAmount){
userinterface.objective.success = true;
missionActive++;
};
};
} catch(e:Error) {
};
} else {
if (missionString.substr(0, "Build".length) == "Build"){
buildAmount = getSubstring(missionString, "Build");
buildType = missionString.substr((("Build " + buildAmount).length + 1));
if ((((buildAmount.toUpperCase() == "A")) || ((buildAmount.toUpperCase() == "AN")))){
buildNum = 1;
} else {
buildNum = Number(buildAmount);
};
if ((((buildType.toUpperCase() == "BOOTH")) || ((buildType.toUpperCase() == "BOOTHS")))){
if (tenantList.length >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if ((((buildType.toUpperCase() == "RESTROOM")) || ((buildType.toUpperCase() == "RESTROOMS")))){
if (restroomList.length >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if ((((buildType.toUpperCase() == "ELEVATOR")) || ((buildType.toUpperCase() == "ELEVATORS")))){
if (elevatorList.length >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (buildType.toUpperCase() == "Toy Store".toUpperCase()){
if (checkBuildLevel("btnToyStore") >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (buildType.toUpperCase() == "Sushi Bar".toUpperCase()){
if (checkBuildLevel("btnSushi") >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (buildType.toUpperCase() == "Game Center".toUpperCase()){
if (checkBuildLevel("btnGameCenter") >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (buildType.toUpperCase() == "Steak n Grill".toUpperCase()){
if (checkBuildLevel("btnSteak") >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (buildType.toUpperCase() == "Supermarket".toUpperCase()){
if (checkBuildLevel("btnSupermarket") >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (buildType.toUpperCase() == "Cinema".toUpperCase()){
if (checkBuildLevel("btnCinema") >= buildNum){
userinterface.objective.success = true;
missionActive++;
};
};
};
};
};
};
};
};
};
};
} else {
if (missionString.substr(0, "Upgrade".length) == "Upgrade"){
upgradeAmount = getSubstring(missionString, "Upgrade");
upgradeType = missionString.substr((("Upgrade " + upgradeAmount).length + 1));
if ((((upgradeAmount.toUpperCase() == "A")) || ((upgradeAmount.toUpperCase() == "AN")))){
upgradeNum = 1;
} else {
upgradeNum = Number(upgradeAmount);
};
upgradeModeLast = upgradeType.indexOf(" ");
if (upgradeModeLast < 0){
upgradeMode = upgradeType;
upgradeLevel = "";
} else {
upgradeMode = upgradeType.substring(0, upgradeModeLast);
upgradeLevel = upgradeType.substring((upgradeModeLast + 1));
};
buildList = new Array();
if ((((upgradeMode.toUpperCase() == "BOOTH")) || ((upgradeMode.toUpperCase() == "BOOTHS")))){
buildList = tenantList;
} else {
if ((((upgradeMode.toUpperCase() == "ELEVATOR")) || ((upgradeMode.toUpperCase() == "ELEVATORS")))){
buildList = elevatorList;
} else {
if ((((upgradeMode.toUpperCase() == "BUILDING")) || ((upgradeMode.toUpperCase() == "BUILDINGS")))){
i = 0;
while (i < tenantParent.numChildren) {
buildList.push(tenantParent.getChildAt(i));
i = (i + 1);
};
};
};
};
if (upgradeLevel.toUpperCase() == "TO MAX LEVEL"){
numUpgraded = 0;
i = 0;
while (i < buildList.length) {
if (buildList[i].tLevel >= buildList[i].MAX_LEVEL){
numUpgraded = (numUpgraded + 1);
};
i = (i + 1);
};
if (numUpgraded >= upgradeNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (upgradeLevel == ""){
upgradeLevelNum = 2;
} else {
upgradeLevelNum = Number(upgradeLevel.substring(("to level".length + 1)));
};
if (buildList.length >= upgradeNum){
numUpgraded = 0;
i = 0;
while (i < buildList.length) {
if (buildList[i].tLevel >= upgradeLevelNum){
numUpgraded = (numUpgraded + 1);
};
i = (i + 1);
};
if (numUpgraded >= upgradeNum){
userinterface.objective.success = true;
missionActive++;
};
};
};
} else {
if (missionString == "Earn your first profit"){
if (recive > 0){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.substr(0, "Earn".length) == "Earn"){
earningAmount = getSubstring(missionString, "Earn");
earningNum = moneyToNumber(earningAmount);
if (lastEarning >= earningNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.substr(0, "Hire".length) == "Hire"){
employeeAmount = getSubstring(missionString, "Hire");
employeeType = missionString.substr((("Hire " + employeeAmount).length + 1));
if ((((employeeAmount.toUpperCase() == "A")) || ((employeeAmount.toUpperCase() == "AN")))){
employeeNum = 1;
} else {
employeeNum = Number(employeeAmount);
};
if ((((employeeType.toUpperCase() == "CLEANING STAFF MEMBER")) || ((employeeType.toUpperCase() == "CLEANING STAFF MEMBERS")))){
if (countEmployee(0) >= employeeNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if ((((employeeType.toUpperCase() == "TECHNICIAN")) || ((employeeType.toUpperCase() == "TECHNICIANS")))){
if (countEmployee(1) >= employeeNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if ((((employeeType.toUpperCase() == "SECURITY AGENT")) || ((employeeType.toUpperCase() == "SECURITY AGENTS")))){
if (countEmployee(2) >= employeeNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if ((((employeeType.toUpperCase() == "EMPLOYEE")) || ((employeeType.toUpperCase() == "EMPLOYEES")))){
if (crewList.length >= employeeNum){
userinterface.objective.success = true;
missionActive++;
};
};
};
};
};
} else {
if (missionString.toUpperCase() == "Promote 1 Cleaning Staff Member".toUpperCase()){
if (countEmployee(3) >= 1){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.toUpperCase() == "Promote 1 Technician".toUpperCase()){
if (countEmployee(4) >= 1){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.toUpperCase() == "Promote 1 Security".toUpperCase()){
if (countEmployee(5) >= 1){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.substr(0, "Promote at least".length).toUpperCase() == "Promote at least".toUpperCase()){
promoteAmount = getSubstring(missionString, "Promote at least");
promoteType = missionString.substr((("Promote at least " + promoteAmount).length + 1));
promoteNum = Number(promoteAmount);
if (promoteType.toUpperCase() == "Employees to max level".toUpperCase()){
numPromoted = 0;
i = 0;
while (i < crewList.length) {
if (!crewList[i].nextUpgrade){
numPromoted = (numPromoted + 1);
};
i = (i + 1);
};
if (numPromoted >= promoteNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
promoteModeLast = promoteType.indexOf(" ");
promoteLevel = promoteType.substring((promoteModeLast + 1));
if (promoteLevel == ""){
promoteLevelNum = 2;
} else {
promoteLevelNum = Number(promoteLevel.substring(("to level".length + 1)));
};
if (crewList.length >= promoteNum){
numPromoted = 0;
i = 0;
while (i < crewList.length) {
if (crewList[i].cLevel >= promoteLevelNum){
numPromoted = (numPromoted + 1);
};
i = (i + 1);
};
if (numPromoted >= promoteNum){
userinterface.objective.success = true;
missionActive++;
};
};
};
} else {
if (missionString.substr(0, "Have at least".length) == "Have at least"){
visitorAmount = getSubstring(missionString, "Have at least");
visitorCondition = missionString.substr(((("Have at least " + visitorAmount) + " visitors").length + 1));
visitorNum = Number(visitorAmount);
if (visitorCondition.toUpperCase() == "VISIT YOUR MALL"){
if (visitorList.length >= visitorNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (visitorCondition.toUpperCase() == "HAPPY FOR A DAY"){
};
};
if (countHappyVisitor() >= visitorNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.substr(0, "Make".length) == "Make"){
visitorAmount = getSubstring(missionString, "Make");
visitorCondition = missionString.substr(((("Make " + visitorAmount) + " visitors").length + 1));
visitorNum = Number(visitorAmount);
if (visitorCondition.toUpperCase() == "VISIT YOUR MALL"){
if (visitorList.length >= visitorNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (visitorCondition.toUpperCase() == "HAPPY FOR A DAY"){
};
};
if (countHappyVisitor() >= visitorNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.substr(0, "Have more than".length) == "Have more than"){
visitorNum = Number(getSubstring(missionString, "Have more than"));
if (visitorList.length > visitorNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.substr(0, "Catch".length) == "Catch"){
banditAmount = getSubstring(missionString, "Catch");
if (banditAmount.toUpperCase() == "A"){
banditNum = 1;
} else {
banditNum = Number(banditAmount);
};
if (banditCaptured >= banditNum){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.toUpperCase() == "Run Event Art Exhibition at least one day".toUpperCase()){
if ((((nowEvent == 0)) && (!(hall.isClose)))){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.toUpperCase() == "Run Event Electronic Expo at least one day".toUpperCase()){
if ((((nowEvent == 1)) && (!(hall.isClose)))){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.toUpperCase() == "Run Event Live Concert at least one day".toUpperCase()){
if ((((nowEvent == 2)) && (!(hall.isClose)))){
userinterface.objective.success = true;
missionActive++;
};
} else {
if (missionString.substr(0, "Your cash reach".length).toUpperCase() == "Your cash reach".toUpperCase()){
cashAmount = getSubstring(missionString, "Your cash reach");
cashNum = moneyToNumber(cashAmount);
if (((cash + recive) - purchase) >= cashNum){
userinterface.objective.success = true;
missionActive++;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function KeyDownEvent(_arg1:KeyboardEvent):void{
var _local2:*;
_local2 = _arg1.keyCode;
if (_local2 == 65){
scrollLeft1 = true;
};
if (_local2 == Keyboard.LEFT){
scrollLeft2 = true;
};
if (_local2 == 68){
scrollRight1 = true;
};
if (_local2 == Keyboard.RIGHT){
scrollRight2 = true;
};
if (_local2 == 87){
scrollUp1 = true;
};
if (_local2 == Keyboard.UP){
scrollUp2 = true;
};
if (_local2 == 83){
scrollDown1 = true;
};
if (_local2 == Keyboard.DOWN){
scrollDown2 = true;
};
if (_local2 == Keyboard.SHIFT){
shiftKey = true;
};
}
public function getSubstring(_arg1:Object, _arg2):String{
var _local3:*;
var _local4:*;
var _local5:*;
_local3 = (_arg2.length + 1);
_local4 = _arg1.indexOf(" ", _local3);
if (_local4 >= 0){
_local5 = _arg1.substring(_local3, _local4);
} else {
_local5 = _arg1.substring(_local3);
};
return (_local5);
}
public function TriggerAlarm(_arg1:Event):void{
if (robedBooth != null){
robedBooth.transform.colorTransform = new ColorTransform(1, alarmTransform, alarmTransform, 1, 0, 0, 0, 0);
};
if (alarmTrigger){
if (alarmTimer > 0){
alarmTimer = (alarmTimer - gameSpeed);
};
if (alarmTransform >= 1){
aT = -0.1;
};
if (alarmTransform <= 0.5){
aT = 0.1;
};
alarmTransform = (alarmTransform + aT);
alarmTrigger = (((banditList.length > 0)) && ((alarmTimer > 0)));
if ((((banditTrigger == null)) && ((banditList.length > 0)))){
banditTrigger = banditList[0];
};
} else {
banditTrigger = null;
if (robedBooth != null){
robedBooth.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
robedBooth = null;
};
alarmTransform = 1;
alarmTimer = 168;
};
}
public function Initialize():void{
var _local1:*;
var _local2:*;
var _local3:*;
budget.visible = false;
dayTime = 9;
dayMinute = 0;
createStreet();
if (city == 0){
landmark = new LandmarkParis();
} else {
if (city == 2){
landmark = new LandmarkNewYork();
};
};
_local1 = 0;
while (_local1 < (city + 1)) {
_local2 = 0;
while (_local2 < tenantCanBuild[_local1].length) {
totalTenantCanBuild.push(tenantCanBuild[_local1][_local2]);
_local2++;
};
_local1++;
};
addChild(drawParent);
drawParent.mask = drawArea;
drawParent.addChild(bgAccParent);
if (landmark != null){
drawParent.addChild(landmark);
};
drawParent.addChild(bgCity);
drawParent.addChild(bgCity2);
drawParent.addChild(bgParent);
drawParent.addChild(emptyParent);
drawParent.addChild(tenantParent);
drawParent.addChild(pillarParent);
drawParent.addChild(dirtyParent);
drawParent.addChild(visitorParent);
drawParent.addChild(legendParent);
drawParent.addChild(buildParent);
drawParent.addChild(flyingTextParent);
drawParent.addChild(noteParent);
addChild(userinterface);
addChild(menuParent);
addChild(budget);
addChild(noticeParent);
addChild(tutorialParent);
addChild(tutorialArrowParent);
addChild(tutorialShow);
addChild(handCursor);
handCursor.mouseChildren = false;
handCursor.mouseEnabled = false;
floorList.push(ground);
InitCloud();
loadGame();
if (playerName.toLocaleUpperCase().charAt((playerName.length - 1)) == "S"){
userinterface.playerName.text = (playerName + "' Mall");
} else {
userinterface.playerName.text = (playerName + "'s Mall");
};
addEventListener(Event.ENTER_FRAME, DrawStreet);
addEventListener(Event.ENTER_FRAME, DayTimeChange);
userinterface.addEventListener(MouseEvent.MOUSE_OVER, UIOverEvent);
userinterface.addEventListener(MouseEvent.MOUSE_OUT, UIOutEvent);
addEventListener(Event.ENTER_FRAME, DrawTenant);
addEventListener(Event.ENTER_FRAME, DirtyProgress);
addEventListener(Event.ENTER_FRAME, BrokenProgress);
addEventListener(Event.ENTER_FRAME, AchivementUpdate);
addEventListener(Event.ENTER_FRAME, AccsoryManagement);
if (!tutorialMode){
gameSpeed = 1;
addEventListener(Event.ENTER_FRAME, VisitorUpdate);
stage.addEventListener(MouseEvent.MOUSE_MOVE, BuildingMode);
addEventListener(Event.ENTER_FRAME, BuildingCollition);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUpEvent);
stage.addEventListener(MouseEvent.CLICK, MouseClickEvent);
stage.addEventListener(MouseEvent.MOUSE_MOVE, MouseMoveEvent);
stage.addEventListener(MouseEvent.MOUSE_UP, StartBuilding);
stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyDownEvent);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyUpEvent);
stage.addEventListener(Event.ENTER_FRAME, ScrollingWithKey);
addEventListener(Event.ENTER_FRAME, TriggerAlarm);
addEventListener(Event.ENTER_FRAME, UpdateMission);
addEventListener(Event.ENTER_FRAME, CheckMission);
} else {
if (city == 0){
_local3 = new BeginingTutorial();
addChild(_local3);
} else {
if (city == 1){
_local3 = new TokyoBoothAvailable();
securityTutor = true;
expandElevatorTutor = true;
addChild(_local3);
} else {
_local3 = new NewYorkBoothAvailable();
securityTutor = true;
expandElevatorTutor = true;
addChild(_local3);
};
};
gameSpeed = 0;
};
addEventListener(Event.ENTER_FRAME, OtherCheck);
addEventListener(Event.ENTER_FRAME, SoundManagement);
soundInitialize();
bgmChannel.addEventListener(Event.SOUND_COMPLETE, BGMLoop);
}
public function loadPillar(_arg1:SharedObject):void{
var _local2:*;
_local2 = 0;
while (_local2 < _arg1.data.pillarWorldX.length) {
createPillar(_arg1.data.pillarWorldX[_local2], _arg1.data.pillarWorldY[_local2]);
_local2++;
};
}
public function savingEmployee():void{
var _local1:*;
AutoSaveGame.data.employeeName = new Array();
AutoSaveGame.data.employeeWorldX = new Array();
AutoSaveGame.data.employeeWorldY = new Array();
AutoSaveGame.data.employeeLevel = new Array();
AutoSaveGame.data.employeeShiftFloor = new Array();
AutoSaveGame.data.employeeFloorPos = new Array();
AutoSaveGame.data.employeeHome = new Array();
AutoSaveGame.data.employeeGoHome = new Array();
_local1 = 0;
while (_local1 < crewList.length) {
if ((((((crewList[_local1] is CrewCleaningServicelv1)) || ((crewList[_local1] is CrewCleaningServicelv2)))) || ((crewList[_local1] is CrewCleaningServicelv3)))){
AutoSaveGame.data.employeeName.push("CleaningService");
} else {
if ((((((crewList[_local1] is CrewTechnicianlv1)) || ((crewList[_local1] is CrewTechnicianlv2)))) || ((crewList[_local1] is CrewTechnicianlv3)))){
AutoSaveGame.data.employeeName.push("Technician");
} else {
if ((((((crewList[_local1] is CrewSecuritylv1)) || ((crewList[_local1] is CrewSecuritylv2)))) || ((crewList[_local1] is CrewSecuritylv3)))){
AutoSaveGame.data.employeeName.push("Security");
};
};
};
AutoSaveGame.data.employeeWorldX.push(crewList[_local1].worldX);
AutoSaveGame.data.employeeWorldY.push(crewList[_local1].worldY);
AutoSaveGame.data.employeeLevel.push(crewList[_local1].cLevel);
AutoSaveGame.data.employeeShiftFloor.push(crewList[_local1].shiftFloor);
AutoSaveGame.data.employeeFloorPos.push(floorList.indexOf(crewList[_local1].floorPos));
AutoSaveGame.data.employeeHome.push(crewList[_local1].homePos);
AutoSaveGame.data.employeeGoHome.push(crewList[_local1].goHome);
_local1++;
};
}
public function savingRestroom():void{
var _local1:*;
AutoSaveGame.data.restroomName = new Array();
AutoSaveGame.data.restroomWorldX = new Array();
AutoSaveGame.data.restroomWorldY = new Array();
AutoSaveGame.data.restroomLevel = new Array();
AutoSaveGame.data.restroomGround = new Array();
_local1 = 0;
while (_local1 < restroomList.length) {
AutoSaveGame.data.restroomName.push(restroomList[_local1].name);
AutoSaveGame.data.restroomWorldX.push(restroomList[_local1].worldX);
AutoSaveGame.data.restroomWorldY.push(restroomList[_local1].worldY);
AutoSaveGame.data.restroomLevel.push(restroomList[_local1].tLevel);
AutoSaveGame.data.restroomGround.push(floorList.indexOf(restroomList[_local1].ground));
_local1++;
};
}
public function addFlyingText(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false):void{
var _local5:*;
if (!_arg4){
_local5 = new UI_GoodNote();
_local5.clip.cashList.text = _arg1;
_local5.worldX = _arg2;
_local5.worldY = _arg3;
flyingTextParent.addChild(_local5);
};
}
public function LoadFromSlot(_arg1:Number):void{
tutorialMode = false;
lastDayTime = 9;
if (SaveGameData[_arg1].data.playerName){
playerName = SaveGameData[_arg1].data.playerName;
loadPillar(SaveGameData[_arg1]);
loadEmptySpace(SaveGameData[_arg1]);
loadFloor(SaveGameData[_arg1]);
loadTenant(SaveGameData[_arg1]);
loadRestroom(SaveGameData[_arg1]);
loadElevator(SaveGameData[_arg1]);
loadEmployee(SaveGameData[_arg1]);
loadTrash(SaveGameData[_arg1]);
budget.discription.textList.htmlText = SaveGameData[_arg1].data.discription;
budget.visitorComeList.textList.htmlText = SaveGameData[_arg1].data.visitorComeList;
budget.incomeList.textList.htmlText = SaveGameData[_arg1].data.incomeList;
budget.outcomeList.textList.htmlText = SaveGameData[_arg1].data.outcomeList;
budget.gainList.textList.htmlText = SaveGameData[_arg1].data.gainList;
budget.totalEarning.htmlText = SaveGameData[_arg1].data.totalEarning;
budget.difference.htmlText = SaveGameData[_arg1].data.difference;
lastEarning = SaveGameData[_arg1].data.lastEarning;
budget.checkHeight();
dayPass = SaveGameData[_arg1].data.dayPass;
cash = SaveGameData[_arg1].data.currentCash;
popularity = SaveGameData[_arg1].data.popularity;
popularityModifier = SaveGameData[_arg1].data.popularityModifier;
nextDayPopularity = SaveGameData[_arg1].data.nextDayPopularity;
otherIncome = SaveGameData[_arg1].data.otherIncome;
otherOutcome = SaveGameData[_arg1].data.otherOutcome;
cleaningServiceOutcome = SaveGameData[_arg1].data.cleaningServiceOutcome;
technicianOutcome = SaveGameData[_arg1].data.technicianOutcome;
securityOutcome = SaveGameData[_arg1].data.securityOutcome;
nowEvent = SaveGameData[_arg1].data.nowEvent;
bookedEvent = SaveGameData[_arg1].data.bookedEvent;
eventTime = SaveGameData[_arg1].data.eventTime;
city = SaveGameData[_arg1].data.city;
missionActive = SaveGameData[_arg1].data.missionActive;
expandElevatorTutor = SaveGameData[_arg1].data.expandElevatorTutor;
securityTutor = SaveGameData[_arg1].data.securityTutor;
if (SaveGameData[_arg1].data.canGameOver){
canGameOver = SaveGameData[_arg1].data.canGameOver;
};
};
}
public function loadElevator(_arg1:SharedObject):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = 0;
while (_local2 < _arg1.data.elevatorName.length) {
_local3 = new SupportElevator();
_local3.worldX = _arg1.data.elevatorWorldX[_local2];
_local3.worldY = _arg1.data.elevatorWorldY[_local2];
_local3.x = (_local3.worldX - cameraX);
_local3.y = (_local3.worldY - cameraY);
_local3.name = _arg1.data.elevatorName[_local2];
_local3.tLevel = _arg1.data.elevatorLevel[_local2];
_local3.floorList = new Array();
_local3.elevatorList = new Array();
_local3.addEventListener(MouseEvent.CLICK, TenantClicking);
tenantParent.addChild(_local3);
elevatorList.push(_local3);
_local4 = 0;
while (_local4 < _arg1.data.elevatorBodyListY[_local2].length) {
if (_local3.tLevel < 3){
_local5 = new ElevatorBody();
} else {
_local5 = new ElevatorUpgrade();
};
_local5.y = _arg1.data.elevatorBodyListY[_local2][_local4];
_local3.elevatorList.push(_local5);
_local3.floorList.push(floorList[_arg1.data.elevatorFloorList[_local2][_local4]]);
_local3.addChild(_local5);
_local4++;
};
_local3.body.door.stop();
_local3.removeChild(_local3.getChildByName("body"));
_local2++;
};
}
public function cleanAllObject():void{
var _local1:*;
if (bgmChannel != null){
bgmChannel.stop();
};
if (seChannel != null){
bgmChannel.stop();
};
lastDayTime = 8;
i = 0;
while (i < tenantList.length) {
tenantList[i].removeEventListener(Event.ENTER_FRAME, tenantList[i].Animate);
if ((tenantList[i] is TenantIceCream)){
tenantList[i].removeEventListener(Event.ENTER_FRAME, tenantList[i].VisitorQueue);
};
i++;
};
i = 0;
while (i < restroomList.length) {
restroomList[i].removeEventListener(Event.ENTER_FRAME, restroomList[i].Animate);
i++;
};
i = 0;
while (i < elevatorList.length) {
elevatorList[i].removeEventListener(Event.ENTER_FRAME, elevatorList[i].Animate);
elevatorList[i].removeEventListener(MouseEvent.MOUSE_DOWN, elevatorList[i].HoldElevator);
elevatorList[i].removeEventListener(MouseEvent.MOUSE_OVER, elevatorList[i].NoticeToExpand);
elevatorList[i].removeEventListener(MouseEvent.MOUSE_OUT, elevatorList[i].NoticeDisappear);
i++;
};
i = 0;
while (i < visitorList.length) {
visitorList[i].removeAllListener();
i++;
};
i = 0;
while (i < crewList.length) {
crewList[i].removeEventListener(Event.ENTER_FRAME, crewList[i].Animation);
crewList[i].removeEventListener(Event.ENTER_FRAME, crewList[i].Behavior);
crewList[i].removeEventListener(Event.ENTER_FRAME, crewList[i].BackToWork);
i++;
};
i = 0;
while (i < banditList.length) {
banditList[i].removeEventListener(Event.ENTER_FRAME, banditList[i].Animation);
banditList[i].removeEventListener(Event.ENTER_FRAME, banditList[i].Behavior);
banditList[i].removeEventListener(Event.ENTER_FRAME, banditList[i].Arrested);
i++;
};
i = 0;
while (i < cloudList.length) {
cloudList[i].removeEventListener(Event.ENTER_FRAME, CloudMove);
cloudList[i].parent.removeChild(cloudList[i]);
i++;
};
while (visitorParent.numChildren > 0) {
visitorParent.removeChild(visitorParent.getChildAt(0));
};
removeEventListener(Event.ENTER_FRAME, DrawStreet);
removeEventListener(Event.ENTER_FRAME, DayTimeChange);
userinterface.removeEventListener(MouseEvent.MOUSE_OVER, UIOverEvent);
userinterface.removeEventListener(MouseEvent.MOUSE_OUT, UIOutEvent);
userinterface.removeAllListener();
removeEventListener(Event.ENTER_FRAME, DrawTenant);
removeEventListener(Event.ENTER_FRAME, VisitorUpdate);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, BuildingMode);
removeEventListener(Event.ENTER_FRAME, BuildingCollition);
removeEventListener(Event.ENTER_FRAME, DirtyProgress);
removeEventListener(Event.ENTER_FRAME, BrokenProgress);
removeEventListener(Event.ENTER_FRAME, AchivementUpdate);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUpEvent);
stage.removeEventListener(MouseEvent.CLICK, MouseClickEvent);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, MouseMoveEvent);
stage.removeEventListener(MouseEvent.MOUSE_UP, StartBuilding);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, KeyDownEvent);
stage.removeEventListener(KeyboardEvent.KEY_UP, KeyUpEvent);
stage.removeEventListener(Event.ENTER_FRAME, ScrollingWithKey);
removeEventListener(Event.ENTER_FRAME, TriggerAlarm);
removeEventListener(Event.ENTER_FRAME, UpdateMission);
removeEventListener(Event.ENTER_FRAME, CheckMission);
removeEventListener(Event.ENTER_FRAME, OtherCheck);
removeEventListener(Event.ENTER_FRAME, SoundManagement);
removeEventListener(Event.ENTER_FRAME, AccsoryManagement);
i = 0;
while (i < legendParent.numChildren) {
_local1 = legendParent.getChildAt(i);
_local1.stop();
_local1.removeEventListener(Event.ENTER_FRAME, _local1.ChangePosition);
i++;
};
while (drawParent.numChildren > 0) {
drawParent.removeChild(drawParent.getChildAt(0));
};
handCursor.visible = false;
removeChild(drawParent);
removeChild(handCursor);
removeChild(userinterface);
removeChild(menuParent);
removeChild(budget);
removeChild(noticeParent);
removeChild(tutorialParent);
removeChild(tutorialArrowParent);
hall = null;
while (numChildren > 0) {
_local1 = getChildAt(0);
_local1.stop();
removeChild(_local1);
};
}
public function OtherCheck(_arg1:Event):void{
var event = _arg1;
if (tutorialMode){
userinterface.deactiveAllButton();
};
if (mouseIsDown){
if (canClick < 7){
canClick++;
};
} else {
canClick = 0;
};
if (visitorFocus != null){
if (!visitorFocus.rideElevator){
cameraX = (visitorFocus.worldX - (CAMERA_WIDTH / 2));
cameraY = ((visitorFocus.worldY - CAMERA_HEIGHT) + 120);
} else {
var _local3 = visitorFocus.elevatorTarget;
with (_local3) {
cameraX = (((worldX + eRoom.x) + visitorFocus.x) - (CAMERA_WIDTH / 2));
cameraY = ((((worldY + eRoom.y) + visitorFocus.y) - CAMERA_HEIGHT) + 120);
};
};
};
if (purchase > 1000){
cash = (cash - 1000);
purchase = (purchase - 1000);
};
if (purchase > 100){
cash = (cash - 100);
purchase = (purchase - 100);
};
if (purchase > 10){
cash = (cash - 10);
purchase = (purchase - 10);
};
if (purchase > 0){
cash--;
purchase--;
};
if (recive > 1000){
cash = (cash + 1000);
recive = (recive - 1000);
};
if (recive > 100){
cash = (cash + 100);
recive = (recive - 100);
};
if (recive > 10){
cash = (cash + 10);
recive = (recive - 10);
};
if (recive > 0){
cash++;
recive--;
};
userinterface.cashInfo.text = (MoneySplit(cash) + ".-");
if (userinterface.nextTownWarning.visible){
gameSpeed = 0;
};
}
public function AchivementUpdate(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
if (Achivement.data.trophyList){
if (!Achivement.data.trophyList[0]){
if (countHappyVisitor() >= 25){
addNewAchivement(0);
};
};
if (!Achivement.data.trophyList[1]){
if (countHappyVisitor() >= 50){
addNewAchivement(1);
};
};
if (!Achivement.data.trophyList[2]){
if (countHappyVisitor() >= 75){
addNewAchivement(2);
};
};
if (!Achivement.data.trophyList[4]){
if (lastEarning >= 50000){
addNewAchivement(4);
};
};
if (!Achivement.data.trophyList[5]){
if (lastEarning >= 100000){
addNewAchivement(5);
};
};
if (!Achivement.data.trophyList[6]){
if (lastEarning >= 200000){
addNewAchivement(6);
};
};
if (!Achivement.data.trophyList[7]){
if (lastEarning >= 300000){
addNewAchivement(7);
};
};
if (!Achivement.data.trophyList[8]){
if (tenantParent.numChildren >= 10){
_local2 = true;
_local3 = 0;
while (_local3 < tenantParent.numChildren) {
_local4 = tenantParent.getChildAt(_local3);
if (_local4.tLevel <= 1){
_local2 = false;
};
_local3++;
};
if (_local2){
addNewAchivement(8);
};
};
};
if (!Achivement.data.trophyList[9]){
if (tenantParent.numChildren >= 10){
_local2 = true;
_local3 = 0;
while (_local3 < tenantParent.numChildren) {
_local4 = tenantParent.getChildAt(_local3);
if (_local4.tLevel < _local4.MAX_LEVEL){
_local2 = false;
};
_local3++;
};
if (_local2){
addNewAchivement(9);
};
};
};
if (!Achivement.data.trophyList[10]){
_local5 = true;
_local6 = 0;
_local3 = 0;
while (_local3 < crewList.length) {
if ((((crewList[_local3] is CrewSecuritylv1)) || ((crewList[_local3] is CrewSecuritylv2)))){
_local5 = false;
break;
} else {
if ((crewList[_local3] is CrewSecuritylv3)){
_local6++;
};
};
_local3++;
};
if ((((_local6 >= 5)) && (_local5))){
addNewAchivement(10);
};
};
if (!Achivement.data.trophyList[11]){
_local5 = true;
_local6 = 0;
_local3 = 0;
while (_local3 < crewList.length) {
if ((((crewList[_local3] is CrewTechnicianlv1)) || ((crewList[_local3] is CrewTechnicianlv2)))){
_local5 = false;
break;
} else {
if ((crewList[_local3] is CrewTechnicianlv3)){
_local6++;
};
};
_local3++;
};
if ((((_local6 >= 5)) && (_local5))){
addNewAchivement(11);
};
};
if (!Achivement.data.trophyList[12]){
_local5 = true;
_local6 = 0;
_local3 = 0;
while (_local3 < crewList.length) {
if ((((crewList[_local3] is CrewCleaningServicelv1)) || ((crewList[_local3] is CrewCleaningServicelv2)))){
_local5 = false;
break;
} else {
if ((crewList[_local3] is CrewCleaningServicelv3)){
_local6++;
};
};
_local3++;
};
if ((((_local6 >= 5)) && (_local5))){
addNewAchivement(12);
};
};
if (!Achivement.data.trophyList[13]){
if (crewList.length >= 12){
_local5 = true;
_local3 = 0;
while (_local3 < crewList.length) {
if (crewList[_local3].nextUpgrade){
_local5 = false;
break;
};
_local3++;
};
if (_local5){
addNewAchivement(13);
};
};
};
if (!Achivement.data.trophyList[14]){
_local7 = 0;
_local3 = 0;
while (_local3 < tenantList.length) {
if ((((userinterface.btnArr.indexOf(tenantList[_local3].name) >= 0)) && ((userinterface.btnArr.indexOf(tenantList[_local3].name) < 9)))){
_local7++;
};
_local3++;
};
if (_local7 >= 5){
addNewAchivement(14);
};
};
if (!Achivement.data.trophyList[15]){
if (restroomList.length >= 5){
addNewAchivement(15);
};
};
if (!Achivement.data.trophyList[16]){
_local7 = 0;
_local3 = 0;
while (_local3 < tenantList.length) {
if ((((userinterface.btnArr.indexOf(tenantList[_local3].name) >= 9)) && ((userinterface.btnArr.indexOf(tenantList[_local3].name) < 15)))){
_local7++;
};
_local3++;
};
if (_local7 >= 5){
addNewAchivement(16);
};
};
if (!Achivement.data.trophyList[17]){
_local8 = new Array();
_local3 = 0;
while (_local3 < tenantList.length) {
if (userinterface.btnArr.indexOf(tenantList[_local3].name) >= 0){
if (_local8.indexOf(tenantList[_local3].name) < 0){
_local8.push(tenantList[_local3].name);
};
};
_local3++;
};
if (((!((hall == null))) && ((_local8.length >= userinterface.btnArr.length)))){
addNewAchivement(17);
};
};
if (!Achivement.data.trophyList[19]){
if (numberUpset >= 10){
addNewAchivement(19);
};
};
if (!Achivement.data.trophyList[20]){
_local9 = 0;
_local3 = 0;
while (_local3 < tenantList.length) {
if (tenantList[_local3].isBroken){
_local9++;
};
_local3++;
};
if (_local9 >= 3){
addNewAchivement(20);
};
};
};
}
public function DirtyProgress(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
_local2 = 0;
while (_local2 < gameSpeed) {
dirtyDelay--;
if (dirtyDelay <= 0){
dirtyDelay = 24;
_local3 = 0;
while (_local3 < visitorParent.numChildren) {
_local4 = visitorParent.getChildAt(_local3);
if ((((((crewList.indexOf(_local4) < 0)) && ((banditList.indexOf(_local4) < 0)))) && (!(_local4.visiting)))){
if ((((((((_local4.floorPos == ground)) && ((_local4.worldX > (mallLeft + 35))))) && ((_local4.worldX < ((mallLeft + mallWidth) - 35))))) || (!((_local4.floorPos == ground))))){
_local5 = (Math.random() * 10);
_local6 = (Math.random() * 100);
if (_local6 < _local5){
_local7 = new fx_trash();
_local7.trashLevel = ((Math.random() * 2) + 2);
_local7.ground = _local4.floorPos;
_local7.worldX = _local4.worldX;
if (_local7.ground == ground){
_local7.worldY = (_local7.ground.worldY - _local7.ground.height);
} else {
_local7.worldY = _local7.ground.worldY;
};
_local7.x = (_local7.worldX - cameraX);
_local7.y = (_local7.worldY - cameraY);
dirtyParent.addChild(_local7);
_local8 = 0;
_local9 = false;
while ((((_local8 < dirtyParent.numChildren)) && (!(_local9)))) {
_local10 = dirtyParent.getChildAt(_local8);
if (_local10 != _local7){
if (_local7.hitTestObject(_local10)){
if (_local10.trashLevel < 100){
_local10.trashLevel = (_local10.trashLevel + _local7.trashLevel);
};
if (_local10.trashLevel > 100){
_local10.trashLevel = 100;
};
_local9 = true;
};
};
_local8++;
};
if (_local9){
dirtyParent.removeChild(_local7);
};
};
};
};
_local3++;
};
};
_local2++;
};
}
}
}//package PlazaMall_fla
Section 82
//Menu_448 (PlazaMall_fla.Menu_448)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Menu_448 extends MovieClip {
public var loadSlot;
public var btnAchive:SimpleButton;
public var btnCredit:SimpleButton;
public var emptySlot1:MovieClip;
public var emptySlot2:MovieClip;
public var emptySlot3:MovieClip;
public var loadSlot1:MovieClip;
public var loadSlot2:MovieClip;
public var loadSlot3:MovieClip;
public var saveDate;
public var bgm;
public var yearText;
public var btnContinue:SimpleButton;
public var ampm;
public var hourText;
public var subMenuLoad;
public var btnLoad:SimpleButton;
public var btnLoadBack:SimpleButton;
public var btnBack:SimpleButton;
public var enterOption;
public var btnMoreGames:SimpleButton;
public var inputName:MovieClip;
public var myParent;
public var minuteText;
public var buttonClick;
public var subMenuPlay;
public var backgroundMenu:MovieClip;
public var btnPlay:SimpleButton;
public var btnNewGame:SimpleButton;
public var monthText;
public var btnOption:SimpleButton;
public var dateText;
public function Menu_448(){
addFrameScript(0, frame1, 40, frame41, 51, frame52, 59, frame60, 60, frame61, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 78, frame79, 79, frame80, 87, frame88, 92, frame93, 96, frame97, 101, frame102, 105, frame106, 117, frame118);
}
public function btnBackOnClick(_arg1:MouseEvent):void{
removeAllSubPlayButtonListener();
gotoAndPlay("Sub Play Out");
subMenuPlay = 3;
}
public function LoadGame(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = _arg1.currentTarget;
_local3 = loadSlot.indexOf(_local2);
myParent.gameLoaded = _local3;
subMenuLoad = 1;
gotoAndPlay("Load Game Out");
}
public function removeAllSubPlayButtonListener():void{
this.btnNewGame.removeEventListener(MouseEvent.CLICK, btnNewGameOnClick);
this.btnLoad.removeEventListener(MouseEvent.CLICK, btnLoadOnClick);
this.btnBack.removeEventListener(MouseEvent.CLICK, btnBackOnClick);
}
public function btnNewGameOnClick(_arg1:MouseEvent):void{
inputName.visible = true;
inputName.nameInput.text = myParent.playerName;
stage.focus = inputName.nameInput;
inputName.nameInput.setSelection(0, myParent.playerName.length);
btnNewGame.visible = false;
btnLoad.visible = false;
btnBack.visible = false;
}
public function removeLoadListener(){
var _local1:*;
_local1 = 0;
while (_local1 < loadSlot.length) {
if (myParent.SaveGameData[_local1].data.playerName){
loadSlot[_local1].removeEventListener(MouseEvent.CLICK, LoadGame);
};
_local1++;
};
}
function frame1(){
inputName.visible = false;
myParent = root;
}
public function removeAllSubLoadButtonListener():void{
this.btnLoadBack.removeEventListener(MouseEvent.CLICK, BacktoPlayMenu);
}
public function BacktoPlayMenu(_arg1:MouseEvent):void{
removeAllSubLoadButtonListener();
gotoAndPlay("Load Game Out");
}
function frame41(){
this.btnMoreGames.addEventListener(MouseEvent.CLICK, btnMoreGamesOnClick);
this.btnCredit.addEventListener(MouseEvent.CLICK, btnCreditOnClick);
this.btnOption.addEventListener(MouseEvent.CLICK, btnOptionOnClick);
this.btnAchive.addEventListener(MouseEvent.CLICK, btnAchiveOnClick);
this.btnPlay.addEventListener(MouseEvent.CLICK, btnPlayOnClick);
stop();
buttonClick = 0;
}
public function btnCreditOnClick(_arg1:MouseEvent):void{
removeAllMainButtonListener();
gotoAndPlay("Main Button Out");
buttonClick = 4;
}
function frame52(){
stop();
if (buttonClick == 1){
gotoAndPlay("Play Button Enter");
} else {
if (buttonClick == 2){
gotoAndPlay("Play Game");
} else {
if (buttonClick == 3){
gotoAndPlay("Option");
} else {
if (buttonClick == 4){
gotoAndPlay("Credit Frame");
};
};
};
};
}
function frame60(){
this.btnBack.addEventListener(MouseEvent.CLICK, btnBackOnClick);
this.btnLoad.addEventListener(MouseEvent.CLICK, btnLoadOnClick);
this.btnNewGame.addEventListener(MouseEvent.CLICK, btnNewGameOnClick);
stop();
subMenuPlay = 0;
}
function frame61(){
this.btnNewGame.removeEventListener(MouseEvent.CLICK, btnNewGameOnClick);
this.btnLoad.removeEventListener(MouseEvent.CLICK, btnLoadOnClick);
this.btnBack.removeEventListener(MouseEvent.CLICK, btnBackOnClick);
}
function frame69(){
stop();
switch (subMenuPlay){
case 1:
gotoAndPlay("Play Game");
break;
case 2:
gotoAndPlay("Load Game");
break;
default:
gotoAndPlay("Main Button Back");
};
}
public function addLoadListener():void{
var _local1:*;
_local1 = 0;
while (_local1 < loadSlot.length) {
if (myParent.SaveGameData[_local1].data.playerName){
loadSlot[_local1].addEventListener(MouseEvent.CLICK, LoadGame);
};
_local1++;
};
}
function frame70(){
if (myParent.AutoSaveGame.data.playerName){
btnContinue.visible = true;
} else {
btnContinue.visible = false;
};
}
function frame72(){
if (myParent.SaveGameData[1].data.playerName){
loadSlot2.body.playerName.text = myParent.SaveGameData[1].data.playerName;
saveDate = myParent.SaveGameData[1].data.saveDate;
monthText = (saveDate.month + 1);
if (saveDate.month < 10){
monthText = ("0" + monthText);
};
dateText = saveDate.date;
if (saveDate.date < 10){
dateText = ("0" + dateText);
};
yearText = (saveDate.fullYear % 100);
if ((saveDate.fullYear % 100) < 10){
yearText = ("0" + dateText);
};
loadSlot2.body.dateSave.text = ((((monthText + "/") + dateText) + "/") + yearText);
ampm = "am";
hourText = (saveDate.hours + "");
if (saveDate.hours > 12){
hourText = ((saveDate.hours - 12) + "");
ampm = "pm";
};
if (hourText.length <= 1){
hourText = ("0" + hourText);
};
minuteText = saveDate.minutes;
if (saveDate.minutes < 10){
minuteText = ("0" + minuteText);
};
loadSlot2.body.timeSave.text = (((hourText + ":") + minuteText) + ampm);
loadSlot2.visible = true;
emptySlot2.visible = false;
} else {
loadSlot2.visible = false;
emptySlot2.visible = true;
};
}
function frame73(){
if (myParent.SaveGameData[2].data.playerName){
loadSlot3.body.playerName.text = myParent.SaveGameData[2].data.playerName;
saveDate = myParent.SaveGameData[2].data.saveDate;
monthText = (saveDate.month + 1);
if (saveDate.month < 10){
monthText = ("0" + monthText);
};
dateText = saveDate.date;
if (saveDate.date < 10){
dateText = ("0" + dateText);
};
yearText = (saveDate.fullYear % 100);
if ((saveDate.fullYear % 100) < 10){
yearText = ("0" + dateText);
};
loadSlot3.body.dateSave.text = ((((monthText + "/") + dateText) + "/") + yearText);
ampm = "am";
hourText = (saveDate.hours + "");
if (saveDate.hours > 12){
hourText = ((saveDate.hours - 12) + "");
ampm = "pm";
};
if (hourText.length <= 1){
hourText = ("0" + hourText);
};
minuteText = saveDate.minutes;
if (saveDate.minutes < 10){
minuteText = ("0" + minuteText);
};
loadSlot3.body.timeSave.text = (((hourText + ":") + minuteText) + ampm);
loadSlot3.visible = true;
emptySlot3.visible = false;
} else {
loadSlot3.visible = false;
emptySlot3.visible = true;
};
}
function frame71(){
if (myParent.SaveGameData[0].data.playerName){
loadSlot1.body.playerName.text = myParent.SaveGameData[0].data.playerName;
saveDate = myParent.SaveGameData[0].data.saveDate;
monthText = (saveDate.month + 1);
if (saveDate.month < 10){
monthText = ("0" + monthText);
};
dateText = saveDate.date;
if (saveDate.date < 10){
dateText = ("0" + dateText);
};
yearText = (saveDate.fullYear % 100);
if ((saveDate.fullYear % 100) < 10){
yearText = ("0" + dateText);
};
loadSlot1.body.dateSave.text = ((((monthText + "/") + dateText) + "/") + yearText);
ampm = "am";
hourText = (saveDate.hours + "");
if (saveDate.hours > 12){
hourText = ((saveDate.hours - 12) + "");
ampm = "pm";
};
if (hourText.length <= 1){
hourText = ("0" + hourText);
};
minuteText = saveDate.minutes;
if (saveDate.minutes < 10){
minuteText = ("0" + minuteText);
};
loadSlot1.body.timeSave.text = (((hourText + ":") + minuteText) + ampm);
loadSlot1.visible = true;
emptySlot1.visible = false;
} else {
loadSlot1.visible = false;
emptySlot1.visible = true;
};
}
public function btnAchiveOnClick(_arg1:MouseEvent):void{
removeAllMainButtonListener();
gotoAndPlay("Main Button Out");
buttonClick = 2;
}
function frame79(){
btnLoadBack.addEventListener(MouseEvent.CLICK, BacktoPlayMenu);
loadSlot = new Array();
loadSlot.push(loadSlot1);
loadSlot.push(loadSlot2);
loadSlot.push(loadSlot3);
addLoadListener();
if (myParent.AutoSaveGame.data.playerName){
btnContinue.addEventListener(MouseEvent.CLICK, ContinueGame);
};
stop();
subMenuLoad = 0;
}
public function btnPlayOnClick(_arg1:MouseEvent):void{
removeAllMainButtonListener();
gotoAndPlay("Main Button Out");
buttonClick = 1;
}
function frame80(){
removeLoadListener();
btnContinue.removeEventListener(MouseEvent.CLICK, ContinueGame);
}
function frame88(){
stop();
switch (subMenuLoad){
case 1:
gotoAndPlay("Play Game");
break;
default:
gotoAndPlay("Play Button Enter");
};
}
public function btnLoadOnClick(_arg1:MouseEvent):void{
removeAllSubPlayButtonListener();
gotoAndPlay("Sub Play Out");
subMenuPlay = 2;
}
function frame93(){
enterOption = true;
stop();
}
function frame97(){
gotoAndPlay("Main Button Back");
}
function frame102(){
stop();
if (!myParent.Achivement.data.trophyList[3]){
myParent.addNewAchivement(3);
};
}
public function btnMoreGamesOnClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
public function ContinueGame(_arg1:MouseEvent):void{
myParent.gameLoaded = 3;
subMenuLoad = 1;
gotoAndPlay("Load Game Out");
}
public function removeAllMainButtonListener():void{
this.btnPlay.removeEventListener(MouseEvent.CLICK, btnPlayOnClick);
this.btnAchive.removeEventListener(MouseEvent.CLICK, btnAchiveOnClick);
this.btnOption.removeEventListener(MouseEvent.CLICK, btnOptionOnClick);
this.btnCredit.removeEventListener(MouseEvent.CLICK, btnCreditOnClick);
this.btnMoreGames.removeEventListener(MouseEvent.CLICK, btnMoreGamesOnClick);
}
function frame106(){
gotoAndPlay("Main Button Back");
}
function frame118(){
myParent.mainMenuBGMChannel.stop();
if (buttonClick == 1){
if (myParent.gameLoaded < 0){
bgm = new BGMTransition();
bgm.play(0, 0, myParent.bgmTransform);
myParent.gotoAndPlay("Transition Paris");
} else {
if (myParent.gameLoaded < 3){
myParent.startCity = myParent.SaveGameData[myParent.gameLoaded].data.city;
} else {
myParent.startCity = myParent.AutoSaveGame.data.city;
};
myParent.gotoAndPlay("Main Program");
};
} else {
if (buttonClick == 2){
myParent.gotoAndPlay("Trophy Screen");
};
};
}
public function btnOptionOnClick(_arg1:MouseEvent):void{
removeAllMainButtonListener();
gotoAndPlay("Main Button Out");
buttonClick = 3;
}
}
}//package PlazaMall_fla
Section 83
//Menu_449 (PlazaMall_fla.Menu_449)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Menu_449 extends MovieClip {
public var peopleParent;
public var stair:MovieClip;
public var road:MovieClip;
public var i;
public var a;
public var cloudList;
public var cloud2:MovieClip;
public var cloud4:MovieClip;
public var cloud5:MovieClip;
public var cloud1:MovieClip;
public var temp;
public var cloud3:MovieClip;
public var gamesfreeLogo:SimpleButton;
public function Menu_449(){
addFrameScript(0, frame1);
}
public function cloudMoving(_arg1:Event):void{
var i:*;
var event = _arg1;
i = 0;
while (i < cloudList.length) {
var _local3 = cloudList[i];
with (_local3) {
x = (x - speed);
if (x < -(width)){
gotoAndPlay(Math.ceil((Math.random() * 5)));
x = (stage.stageWidth + width);
y = ((Math.random() * stage.stageHeight) / 3);
speed = (Math.random() * 2);
};
};
i = (i + 1);
};
}
function frame1(){
peopleParent = new MovieClip();
addChild(peopleParent);
a = 0;
while (a < 10) {
temp = new MenuAccPeople();
temp.x = (Math.random() * road.width);
temp.y = road.y;
temp.dx = ((Math.floor((Math.random() * 2)) * 2) - 1);
temp.enterMall = false;
temp.exitMall = false;
peopleParent.addChild(temp);
a++;
};
addEventListener(Event.ENTER_FRAME, peopleAnimation);
addEventListener(Event.ENTER_FRAME, createPeople);
addEventListener(Event.ENTER_FRAME, MallEntering);
this.gamesfreeLogo.addEventListener(MouseEvent.CLICK, gamesfreeURL);
cloudList = new Array();
cloudList.unshift(cloud1);
cloudList.unshift(cloud2);
cloudList.unshift(cloud3);
cloudList.unshift(cloud4);
cloudList.unshift(cloud5);
i = 0;
while (i < cloudList.length) {
cloudList[i].x = (Math.random() * stage.stageWidth);
cloudList[i].y = (Math.random() * (stage.stageHeight / 3));
cloudList[i].gotoAndPlay(Math.ceil((Math.random() * 5)));
cloudList[i].speed = (Math.random() * 2);
i++;
};
addEventListener(Event.ENTER_FRAME, cloudMoving);
}
public function MallEntering(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
while (_local2 < peopleParent.numChildren) {
_local3 = peopleParent.getChildAt(_local2);
if (!_local3.enterMall){
if (_local3.hitTestObject(stair)){
_local4 = (Math.random() * 100);
if (_local4 > 90){
_local3.enterMall = true;
};
};
};
_local2++;
};
}
public function gamesfreeURL(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
public function peopleAnimation(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < peopleParent.numChildren) {
_local3 = peopleParent.getChildAt(_local2);
if (!_local3.exitMall){
if (!_local3.enterMall){
_local3.x = (_local3.x + _local3.dx);
if ((((_local3.x < 0)) || ((_local3.x > stage.stageWidth)))){
peopleParent.removeChild(_local3);
_local2--;
};
} else {
_local3.y--;
if (!_local3.hitTestObject(stair)){
peopleParent.removeChild(_local3);
_local2--;
};
};
} else {
if (_local3.hitTestObject(road)){
_local3.x = (_local3.x + _local3.dx);
if ((((_local3.x < 0)) || ((_local3.x > stage.stageWidth)))){
peopleParent.removeChild(_local3);
_local2--;
};
} else {
_local3.y++;
};
};
_local2++;
};
}
public function createPeople(_arg1:Event):void{
var _local2:*;
var _local3:*;
if (peopleParent.numChildren < 50){
_local2 = (Math.random() * 100);
if (_local2 > 90){
_local3 = new MenuAccPeople();
_local3.exitMall = ((Math.random() * 10) > 5);
if (_local3.exitMall){
_local3.x = ((Math.random() * stair.width) + stair.x);
_local3.y = stair.y;
_local3.dx = ((Math.floor((Math.random() * 2)) * 2) - 1);
_local3.enterMall = false;
} else {
_local3.x = (Math.floor((Math.random() * 2)) * stage.stageWidth);
_local3.y = road.y;
if (_local3.x >= stage.stageWidth){
_local3.dx = -1;
} else {
_local3.dx = 1;
};
};
peopleParent.addChild(_local3);
};
};
}
}
}//package PlazaMall_fla
Section 84
//Menu_453 (PlazaMall_fla.Menu_453)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Menu_453 extends MovieClip {
public var btnOK:SimpleButton;
public var btnCancel:SimpleButton;
public var nameInput:TextField;
public function Menu_453(){
addFrameScript(0, frame1);
}
public function btnCancelClicked(_arg1:MouseEvent):void{
cancelGame();
}
function frame1(){
btnOK.addEventListener(MouseEvent.CLICK, btnOKClicked);
btnCancel.addEventListener(MouseEvent.CLICK, btnCancelClicked);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyUpProgress);
}
public function playGame():void{
var _local1:*;
var _local2:*;
if (nameInput.text != ""){
_local1 = this.parent;
_local2 = _local1.parent;
_local2.playerName = nameInput.text;
this.visible = false;
_local1.btnNewGame.visible = true;
_local1.btnLoad.visible = true;
_local1.btnBack.visible = true;
stage.removeEventListener(KeyboardEvent.KEY_UP, KeyUpProgress);
_local1.gotoAndPlay("Sub Play Out");
_local1.subMenuPlay = 1;
};
}
public function KeyUpProgress(_arg1:KeyboardEvent):void{
var _local2:*;
_local2 = _arg1.keyCode;
if (_local2 == Keyboard.ENTER){
playGame();
};
if (_local2 == Keyboard.ESCAPE){
cancelGame();
};
}
public function cancelGame():void{
var _local1:*;
var _local2:*;
if (this.visible){
_local1 = this.parent;
_local1.btnNewGame.visible = true;
_local1.btnLoad.visible = true;
_local1.btnBack.visible = true;
_local2 = _local1.parent;
_local2.playerName = nameInput.text;
this.visible = false;
};
}
public function btnOKClicked(_arg1:MouseEvent):void{
playGame();
}
}
}//package PlazaMall_fla
Section 85
//Menu_468 (PlazaMall_fla.Menu_468)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Menu_468 extends MovieClip {
public var body:MovieClip;
public function Menu_468(){
addFrameScript(0, frame1);
}
public function MouseDownEvent(_arg1:MouseEvent):void{
gotoAndStop("DOWN");
}
public function MouseOverEvent(_arg1:MouseEvent):void{
gotoAndStop("OVER");
}
function frame1(){
this.buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, MouseOverEvent);
addEventListener(MouseEvent.MOUSE_OUT, MouseOutEvent);
addEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
addEventListener(MouseEvent.MOUSE_UP, MouseUpEvent);
gotoAndStop("NEUTRAL");
}
public function MouseOutEvent(_arg1:MouseEvent):void{
gotoAndStop("NEUTRAL");
}
public function MouseUpEvent(_arg1:MouseEvent):void{
gotoAndStop("OVER");
}
}
}//package PlazaMall_fla
Section 86
//Menu_469 (PlazaMall_fla.Menu_469)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Menu_469 extends MovieClip {
public var playerName:TextField;
public var dateSave:TextField;
public var timeSave:TextField;
}
}//package PlazaMall_fla
Section 87
//Option_471 (PlazaMall_fla.Option_471)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Option_471 extends MovieClip {
public var btnBack:SimpleButton;
public function Option_471(){
addFrameScript(0, frame1);
}
function frame1(){
btnBack.addEventListener(MouseEvent.CLICK, BackToMainMenu);
}
public function BackToMainMenu(_arg1:MouseEvent):void{
var _local2:*;
_local2 = this.parent;
_local2.gotoAndPlay("Exit Option");
}
}
}//package PlazaMall_fla
Section 88
//Preloader_4 (PlazaMall_fla.Preloader_4)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Preloader_4 extends MovieClip {
public function Preloader_4(){
addFrameScript(0, frame1);
}
function frame1(){
buttonMode = true;
addEventListener(MouseEvent.CLICK, GamesfreeURL);
}
public function GamesfreeURL(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
}
}//package PlazaMall_fla
Section 89
//PreloaderScreen_2 (PlazaMall_fla.PreloaderScreen_2)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class PreloaderScreen_2 extends MovieClip {
public var dialog4:MovieClip;
public var dialog3:MovieClip;
public var Mood;
public var obj1:MovieClip;
public var obj2:MovieClip;
public var obj3:MovieClip;
public var obj5:MovieClip;
public var legend;
public var obj4:MovieClip;
public var i;
public var blinkDelay;
public var done;
public var ObjectArr;
public var RealHeight;
public var DialogArr;
public var dialog1:MovieClip;
public var dialog5:MovieClip;
public var dialog2:MovieClip;
public function PreloaderScreen_2(){
addFrameScript(0, frame1);
}
public function Animation(_arg1:Event):void{
var _local2:*;
if (blinkDelay > 0){
blinkDelay--;
} else {
blinkDelay = 24;
};
_local2 = 0;
while (_local2 < ObjectArr.length) {
DialogArr[_local2].y = ((ObjectArr[_local2].y + (RealHeight[_local2] - ObjectArr[_local2].height)) - DialogArr[_local2].height);
if ((((blinkDelay >= ((4 - _local2) * 3))) && ((blinkDelay <= (((4 - _local2) * 3) + 12))))){
DialogArr[_local2].visible = false;
} else {
DialogArr[_local2].visible = true;
};
if (!DialogArr[_local2].visible){
if (Math.floor((done / 12.5)) > ((Mood[_local2] + _local2) + 1)){
if (!(legend[_local2] is legendmoodhappy)){
DialogArr[_local2].removeChild(legend[_local2]);
if ((legend[_local2] is legendmoodveryupset)){
legend[_local2] = new legendmoodupset();
} else {
if ((legend[_local2] is legendmoodupset)){
legend[_local2] = new legendmoodnormal();
} else {
legend[_local2] = new legendmoodhappy();
};
};
legend[_local2].x = (DialogArr[_local2].width / 2);
legend[_local2].y = (DialogArr[_local2].height / 2);
DialogArr[_local2].addChild(legend[_local2]);
var _local3 = Mood;
var _local4 = _local2;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
};
};
};
_local2++;
};
}
function frame1(){
done = 0;
ObjectArr = new Array();
ObjectArr.push(obj1);
ObjectArr.push(obj2);
ObjectArr.push(obj3);
ObjectArr.push(obj4);
ObjectArr.push(obj5);
DialogArr = new Array();
DialogArr.push(dialog1);
DialogArr.push(dialog2);
DialogArr.push(dialog3);
DialogArr.push(dialog4);
DialogArr.push(dialog5);
RealHeight = new Array(ObjectArr.length);
legend = new Array(DialogArr.length);
Mood = new Array(ObjectArr.length);
i = 0;
while (i < ObjectArr.length) {
RealHeight[i] = ObjectArr[i].height;
ObjectArr[i].gotoAndPlay(Math.floor((Math.random() * ObjectArr[i].totalFrames)));
legend[i] = new legendmoodveryupset();
legend[i].x = (DialogArr[i].width / 2);
legend[i].y = (DialogArr[i].height / 2);
DialogArr[i].addChild(legend[i]);
Mood[i] = 0;
i++;
};
blinkDelay = 24;
addEventListener(Event.ENTER_FRAME, Animation);
}
}
}//package PlazaMall_fla
Section 90
//shop_295 (PlazaMall_fla.shop_295)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class shop_295 extends MovieClip {
public var pillarLamp:MovieClip;
public var artistMale:MovieClip;
public var tParent;
public var lamp3:MovieClip;
public var lamp5:MovieClip;
public var lamp7:MovieClip;
public var lamp4:MovieClip;
public var lamp2:MovieClip;
public var lamp6:MovieClip;
public var lamp9:MovieClip;
public var lamp1:MovieClip;
public var objectList;
public var artistFemale:MovieClip;
public var lamp8:MovieClip;
public var i;
public function shop_295(){
addFrameScript(0, frame1);
}
public function CheckCondition(_arg1:Event):void{
var _local2:*;
if (tParent.isClose){
_local2 = 0;
while (_local2 < objectList.length) {
if (objectList[_local2].alpha > 0){
objectList[_local2].alpha = (objectList[_local2].alpha - 0.1);
} else {
objectList[_local2].visible = false;
};
_local2++;
};
} else {
_local2 = 0;
while (_local2 < objectList.length) {
objectList[_local2].visible = true;
if (objectList[_local2].alpha < 1){
objectList[_local2].alpha = (objectList[_local2].alpha + 0.1);
};
_local2++;
};
};
}
function frame1(){
tParent = this.parent;
objectList = new Array();
objectList.push(lamp1);
objectList.push(lamp2);
objectList.push(lamp3);
objectList.push(lamp4);
objectList.push(lamp5);
objectList.push(lamp6);
objectList.push(lamp7);
objectList.push(lamp8);
objectList.push(lamp9);
objectList.push(pillarLamp);
objectList.push(artistMale);
objectList.push(artistFemale);
i = 0;
while (i < objectList.length) {
objectList[i].visible = false;
objectList[i].alpha = 0;
i++;
};
addEventListener(Event.ENTER_FRAME, CheckCondition);
}
}
}//package PlazaMall_fla
Section 91
//shop_302 (PlazaMall_fla.shop_302)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class shop_302 extends MovieClip {
public var tParent;
public var pillarLamp2:MovieClip;
public var monitor:MovieClip;
public var i;
public var pillarLamp1:MovieClip;
public var objectList;
public function shop_302(){
addFrameScript(0, frame1);
}
public function CheckCondition(_arg1:Event):void{
var _local2:*;
if (tParent.isClose){
_local2 = 0;
while (_local2 < objectList.length) {
if (objectList[_local2].alpha > 0){
objectList[_local2].alpha = (objectList[_local2].alpha - 0.1);
} else {
objectList[_local2].visible = false;
};
_local2++;
};
} else {
_local2 = 0;
while (_local2 < objectList.length) {
objectList[_local2].visible = true;
if (objectList[_local2].alpha < 1){
objectList[_local2].alpha = (objectList[_local2].alpha + 0.1);
};
_local2++;
};
};
}
function frame1(){
tParent = this.parent;
objectList = new Array();
objectList.push(pillarLamp1);
objectList.push(pillarLamp2);
objectList.push(monitor);
i = 0;
while (i < objectList.length) {
objectList[i].visible = false;
objectList[i].alpha = 0;
i++;
};
addEventListener(Event.ENTER_FRAME, CheckCondition);
}
}
}//package PlazaMall_fla
Section 92
//shop_305 (PlazaMall_fla.shop_305)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class shop_305 extends MovieClip {
public var vocalist:MovieClip;
public var speaker1:MovieClip;
public var speaker6:MovieClip;
public var speaker2:MovieClip;
public var speaker3:MovieClip;
public var speaker4:MovieClip;
public var light:MovieClip;
public var speaker7:MovieClip;
public var speaker5:MovieClip;
public var tParent;
public var flipDelay;
public var bassist:MovieClip;
public var i;
public var drummer:MovieClip;
public var objectList;
public var guitarist:MovieClip;
public function shop_305(){
addFrameScript(0, frame1);
}
public function CheckCondition(_arg1:Event):void{
var _local2:*;
var _local3:*;
if (tParent.isClose){
_local2 = 0;
while (_local2 < objectList.length) {
if (objectList[_local2].alpha > 0){
objectList[_local2].alpha = (objectList[_local2].alpha - 0.1);
} else {
objectList[_local2].visible = false;
};
_local2++;
};
} else {
_local2 = 0;
while (_local2 < objectList.length) {
objectList[_local2].visible = true;
if (objectList[_local2].alpha < 1){
objectList[_local2].alpha = (objectList[_local2].alpha + 0.1);
};
_local2++;
};
if (flipDelay > 0){
flipDelay--;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 30){
vocalist.scaleX = -(vocalist.scaleX);
};
flipDelay = 50;
};
};
}
function frame1(){
tParent = this.parent;
objectList = new Array();
objectList.push(light);
objectList.push(speaker1);
objectList.push(speaker2);
objectList.push(speaker3);
objectList.push(speaker4);
objectList.push(speaker5);
objectList.push(speaker6);
objectList.push(speaker7);
objectList.push(guitarist);
objectList.push(drummer);
objectList.push(bassist);
objectList.push(vocalist);
i = 0;
while (i < objectList.length) {
objectList[i].visible = false;
objectList[i].alpha = 0;
i++;
};
flipDelay = 0;
addEventListener(Event.ENTER_FRAME, CheckCondition);
}
}
}//package PlazaMall_fla
Section 93
//Tips_592 (PlazaMall_fla.Tips_592)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Tips_592 extends MovieClip {
public var diff;
public var scrollBar:MovieClip;
public var tips:MovieClip;
public var head;
public function Tips_592(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 11, frame12, 22, frame23);
}
public function UpdatePosition(_arg1:Event):void{
if (scrollBar.visible){
tips.tipsList.y = (5 - (diff * scrollBar.getPosition()));
};
}
function frame12(){
checkHeight();
stop();
}
function frame1(){
stop();
}
public function checkHeight():void{
if (tips.tipsList.height > (tips.writeArea.height - 10)){
scrollBar.visible = true;
diff = (tips.tipsList.height - (tips.writeArea.height - 10));
} else {
scrollBar.visible = false;
diff = 0;
};
scrollBar.btnScroll.y = scrollBar.line.y;
}
function frame23(){
this.visible = false;
}
function frame2(){
this.visible = true;
}
public function updateText(_arg1:Array):void{
var _local2:*;
var _local3:*;
if (currentLabel == "reveal"){
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
if (_local3 == 0){
_local2 = ("-" + _arg1[_local3]);
} else {
_local2 = (_local2 + ("\n\n-" + _arg1[_local3]));
};
_local3++;
};
if (_local2 == ""){
tips.tipsList.text = "Tips not found";
} else {
tips.tipsList.text = _local2;
};
checkHeight();
};
}
function frame11(){
diff = 0;
head = root;
updateText(head.tipsHistory);
addEventListener(Event.ENTER_FRAME, UpdatePosition);
}
}
}//package PlazaMall_fla
Section 94
//Tips_597 (PlazaMall_fla.Tips_597)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Tips_597 extends MovieClip {
public var writeArea:MovieClip;
public var tipsList:TextField;
public function Tips_597(){
addFrameScript(0, frame1);
}
function frame1(){
tipsList.autoSize = TextFieldAutoSize.LEFT;
tipsList.mouseEnabled = false;
}
}
}//package PlazaMall_fla
Section 95
//Tips_92 (PlazaMall_fla.Tips_92)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Tips_92 extends MovieClip {
public var bottomRightCor:MovieClip;
public var topRightCor:MovieClip;
public var lowerBody:MovieClip;
public var leftBody:MovieClip;
public var bottomLeftCor:MovieClip;
public var upperBody:MovieClip;
public var infoList:TextField;
public var body:MovieClip;
public var textHeight;
public var rightBody:MovieClip;
public var topLeftCor:MovieClip;
public function Tips_92(){
addFrameScript(0, frame1);
}
function frame1(){
infoList.autoSize = TextFieldAutoSize.LEFT;
infoList.mouseEnabled = false;
textHeight = infoList.height;
body.height = textHeight;
leftBody.height = body.height;
rightBody.height = body.height;
bottomLeftCor.y = body.height;
bottomRightCor.y = body.height;
lowerBody.y = body.height;
}
}
}//package PlazaMall_fla
Section 96
//Transation_487 (PlazaMall_fla.Transation_487)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Transation_487 extends MovieClip {
public function Transation_487(){
addFrameScript(0, frame1);
}
public function link(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
function frame1(){
buttonMode = true;
this.addEventListener(MouseEvent.CLICK, link);
}
}
}//package PlazaMall_fla
Section 97
//Transition_479 (PlazaMall_fla.Transition_479)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Transition_479 extends MovieClip {
public var btnContinue:SimpleButton;
public var head;
public function Transition_479(){
addFrameScript(54, frame55, 80, frame81);
}
public function BeginGame(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.removeEventListener(MouseEvent.CLICK, BeginGame);
gotoAndPlay("Next Frame");
}
function frame81(){
head.gotoAndPlay("Main Program");
}
function frame55(){
stop();
head = root;
head.startCity = 0;
head.gameLoaded = -1;
btnContinue.addEventListener(MouseEvent.CLICK, BeginGame);
}
}
}//package PlazaMall_fla
Section 98
//Transition_484 (PlazaMall_fla.Transition_484)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Transition_484 extends MovieClip {
public var btnContinue:SimpleButton;
public var head;
public function Transition_484(){
addFrameScript(54, frame55, 80, frame81);
}
public function BeginGame(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.removeEventListener(MouseEvent.CLICK, BeginGame);
gotoAndPlay("Next Frame");
}
function frame81(){
head.gotoAndPlay("Main Program");
}
function frame55(){
stop();
head = root;
head.startCity = 1;
head.gameLoaded = -1;
btnContinue.addEventListener(MouseEvent.CLICK, BeginGame);
}
}
}//package PlazaMall_fla
Section 99
//Transition_489 (PlazaMall_fla.Transition_489)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Transition_489 extends MovieClip {
public var btnContinue:SimpleButton;
public var gliderIcon:MovieClip;
public var head;
public function Transition_489(){
addFrameScript(34, frame35, 54, frame55, 80, frame81);
}
public function BeginGame(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.removeEventListener(MouseEvent.CLICK, BeginGame);
gotoAndPlay("Next Frame");
}
function frame81(){
head.gotoAndPlay("Main Program");
}
function frame35(){
gliderIcon.gotoAndStop("landing");
}
function frame55(){
stop();
head = root;
head.startCity = 2;
head.gameLoaded = -1;
btnContinue.addEventListener(MouseEvent.CLICK, BeginGame);
}
}
}//package PlazaMall_fla
Section 100
//UI_100 (PlazaMall_fla.UI_100)
package PlazaMall_fla {
import flash.display.*;
public dynamic class UI_100 extends MovieClip {
public function UI_100(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package PlazaMall_fla
Section 101
//UI_101 (PlazaMall_fla.UI_101)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_101 extends MovieClip {
public var upgradeCost:TextField;
public var priceOrTicket:TextField;
public var upgradePrice:TextField;
public var upgradeCapacity:TextField;
public function UI_101(){
addFrameScript(0, frame1);
}
function frame1(){
upgradeCapacity.autoSize = TextFieldAutoSize.LEFT;
priceOrTicket.autoSize = TextFieldAutoSize.LEFT;
upgradePrice.autoSize = TextFieldAutoSize.LEFT;
upgradeCost.autoSize = TextFieldAutoSize.LEFT;
}
}
}//package PlazaMall_fla
Section 102
//UI_102 (PlazaMall_fla.UI_102)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_102 extends MovieClip {
public var upgradeCost:TextField;
public var otherNote:TextField;
public var upgradeCapacity:TextField;
public function UI_102(){
addFrameScript(0, frame1);
}
function frame1(){
upgradeCapacity.autoSize = TextFieldAutoSize.LEFT;
upgradeCost.autoSize = TextFieldAutoSize.LEFT;
otherNote.autoSize = TextFieldAutoSize.LEFT;
}
}
}//package PlazaMall_fla
Section 103
//UI_104 (PlazaMall_fla.UI_104)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_104 extends MovieClip {
public var priceOrTicket:TextField;
public var price:TextField;
public var capacity:TextField;
public function UI_104(){
addFrameScript(0, frame1);
}
function frame1(){
capacity.autoSize = TextFieldAutoSize.LEFT;
priceOrTicket.autoSize = TextFieldAutoSize.LEFT;
price.autoSize = TextFieldAutoSize.LEFT;
}
}
}//package PlazaMall_fla
Section 104
//UI_105 (PlazaMall_fla.UI_105)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_105 extends MovieClip {
public var capacity:TextField;
public function UI_105(){
addFrameScript(0, frame1);
}
function frame1(){
capacity.autoSize = TextFieldAutoSize.LEFT;
}
}
}//package PlazaMall_fla
Section 105
//UI_121 (PlazaMall_fla.UI_121)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_121 extends MovieClip {
public var upgradeSalary:TextField;
public var upgradeCost:TextField;
public var otherNote:TextField;
public function UI_121(){
addFrameScript(0, frame1);
}
function frame1(){
upgradeSalary.autoSize = TextFieldAutoSize.LEFT;
otherNote.autoSize = TextFieldAutoSize.LEFT;
upgradeCost.autoSize = TextFieldAutoSize.LEFT;
}
}
}//package PlazaMall_fla
Section 106
//UI_127 (PlazaMall_fla.UI_127)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_127 extends MovieClip {
public var upgradeCost:TextField;
public var ticketPrice:TextField;
public var eventPrice:TextField;
public function UI_127(){
addFrameScript(0, frame1);
}
function frame1(){
ticketPrice.autoSize = TextFieldAutoSize.LEFT;
eventPrice.autoSize = TextFieldAutoSize.LEFT;
upgradeCost.autoSize = TextFieldAutoSize.LEFT;
}
}
}//package PlazaMall_fla
Section 107
//UI_129 (PlazaMall_fla.UI_129)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_129 extends MovieClip {
public var diff;
public var noteSymbol:MovieClip;
public var topRightCor:MovieClip;
public var lowerBody:MovieClip;
public var leftBody:MovieClip;
public var bottomLeftCor:MovieClip;
public var upperBody:MovieClip;
public var body:MovieClip;
public var bottomRight:MovieClip;
public var info:TextField;
public var textHeight;
public var rightBody:MovieClip;
public var topLeftCor:MovieClip;
public function UI_129(){
addFrameScript(0, frame1);
}
function frame1(){
info.autoSize = TextFieldAutoSize.CENTER;
info.mouseEnabled = false;
textHeight = (info.numLines * 18);
diff = (textHeight - info.height);
info.y = -((textHeight - (diff / 2)));
body.height = (textHeight - (upperBody.height + lowerBody.height));
body.y = -((textHeight - upperBody.height));
leftBody.height = body.height;
leftBody.y = body.y;
rightBody.height = body.height;
rightBody.y = body.y;
upperBody.y = -(textHeight);
topLeftCor.y = upperBody.y;
topRightCor.y = upperBody.y;
noteSymbol.y = ((-(textHeight) / 2) - (noteSymbol.height / 2));
}
}
}//package PlazaMall_fla
Section 108
//UI_472 (PlazaMall_fla.UI_472)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_472 extends MovieClip {
public var helpBar:MovieClip;
public var myParent;
public var slideBar:SimpleButton;
public function UI_472(){
addFrameScript(0, frame1);
}
public function MouseDownEvent(_arg1:MouseEvent):void{
slideBar.x = mouseX;
UpdateSound();
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUpEvent);
stage.addEventListener(MouseEvent.MOUSE_MOVE, MouseMoveEvent);
}
public function MouseMoveEvent(_arg1:MouseEvent):void{
slideBar.x = mouseX;
if (slideBar.x < helpBar.x){
slideBar.x = helpBar.x;
};
if (slideBar.x > (helpBar.x + helpBar.width)){
slideBar.x = (helpBar.x + helpBar.width);
};
UpdateSound();
}
function frame1(){
buttonMode = true;
myParent = root;
slideBar.x = (helpBar.x + (helpBar.width * myParent.bgmVolume));
addEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
}
public function UpdateSound():void{
myParent.bgmVolume = ((slideBar.x - helpBar.x) / helpBar.width);
if (myParent.currentLabel == "Main Program"){
var _local2 = myParent;
with (_local2) {
bgmTransform.volume = (bgmVolume * bgmEnvironment);
bgmChannel.soundTransform = bgmTransform;
};
} else {
if (myParent.currentLabel == "Main Menu"){
_local2 = myParent;
with (_local2) {
bgmTransform.volume = bgmVolume;
mainMenuBGMChannel.soundTransform = bgmTransform;
};
};
};
}
public function MouseUpEvent(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUpEvent);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, MouseMoveEvent);
}
}
}//package PlazaMall_fla
Section 109
//UI_474 (PlazaMall_fla.UI_474)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_474 extends MovieClip {
public var helpBar:MovieClip;
public var myParent;
public var slideBar:SimpleButton;
public function UI_474(){
addFrameScript(0, frame1);
}
public function MouseDownEvent(_arg1:MouseEvent):void{
slideBar.x = mouseX;
UpdateSound();
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUpEvent);
stage.addEventListener(MouseEvent.MOUSE_MOVE, MouseMoveEvent);
}
public function MouseMoveEvent(_arg1:MouseEvent):void{
slideBar.x = mouseX;
if (slideBar.x < helpBar.x){
slideBar.x = helpBar.x;
};
if (slideBar.x > (helpBar.x + helpBar.width)){
slideBar.x = (helpBar.x + helpBar.width);
};
UpdateSound();
}
function frame1(){
buttonMode = true;
myParent = root;
slideBar.x = (helpBar.x + (helpBar.width * myParent.seVolume));
addEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
}
public function UpdateSound():void{
myParent.seVolume = ((slideBar.x - helpBar.x) / helpBar.width);
var _local2 = myParent;
with (_local2) {
seTransform.volume = seVolume;
try {
seChannel.soundTransform = seTransform;
} catch(e:Error) {
};
};
}
public function MouseUpEvent(_arg1:MouseEvent):void{
var _local2:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUpEvent);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, MouseMoveEvent);
}
}
}//package PlazaMall_fla
Section 110
//UI_50 (PlazaMall_fla.UI_50)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_50 extends MovieClip {
public var cashList:TextField;
public function UI_50(){
addFrameScript(0, frame1);
}
function frame1(){
cashList.autoSize = TextFieldAutoSize.CENTER;
}
}
}//package PlazaMall_fla
Section 111
//UI_52 (PlazaMall_fla.UI_52)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_52 extends MovieClip {
public var cashList:TextField;
public function UI_52(){
addFrameScript(0, frame1);
}
function frame1(){
cashList.autoSize = TextFieldAutoSize.CENTER;
}
}
}//package PlazaMall_fla
Section 112
//UI_570 (PlazaMall_fla.UI_570)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_570 extends MovieClip {
public var toggleMusic:MovieClip;
public var myParent;
public var toggleSFX:MovieClip;
public var bgmSlider:MovieClip;
public var sfxSlider:MovieClip;
public function UI_570(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = this.parent.parent;
toggleMusic.buttonMode = true;
toggleSFX.buttonMode = true;
toggleMusic.addEventListener(MouseEvent.CLICK, ToggleBGM);
toggleSFX.addEventListener(MouseEvent.CLICK, ToggleSE);
}
public function ToggleBGM(_arg1:MouseEvent):void{
var event = _arg1;
if (myParent.bgmVolume > 0){
myParent.bgmVolume = 0;
} else {
myParent.bgmVolume = 1;
};
var _local3 = bgmSlider;
with (_local3) {
slideBar.x = (helpBar.x + (helpBar.width * myParent.bgmVolume));
};
_local3 = myParent;
with (_local3) {
bgmTransform.volume = (bgmVolume * bgmEnvironment);
bgmChannel.soundTransform = bgmTransform;
};
}
public function ToggleSE(_arg1:MouseEvent):void{
var event = _arg1;
if (myParent.seVolume > 0){
myParent.seVolume = 0;
} else {
myParent.seVolume = 1;
};
var _local3 = sfxSlider;
with (_local3) {
slideBar.x = (helpBar.x + (helpBar.width * myParent.seVolume));
};
_local3 = myParent;
with (_local3) {
seTransform.volume = seVolume;
try {
seChannel.soundTransform = seTransform;
} catch(e:Error) {
};
};
}
}
}//package PlazaMall_fla
Section 113
//UI_572 (PlazaMall_fla.UI_572)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_572 extends MovieClip {
public var success;
public var objectiveInfo:TextField;
public var maskBar:MovieClip;
public var objectiveMark:MovieClip;
public var declareMission;
public var changeMission;
public var inPlace;
public function UI_572(){
addFrameScript(0, frame1);
}
public function Animation(_arg1:Event):void{
var _local2:*;
if (!declareMission){
objectiveInfo.x = (maskBar.x - (objectiveInfo.width / 2));
} else {
if (!inPlace){
if (objectiveInfo.x < ((maskBar.x + (maskBar.width / 2)) - (objectiveInfo.width / 2))){
objectiveInfo.x = (objectiveInfo.x + 32);
} else {
objectiveInfo.x = ((maskBar.x + (maskBar.width / 2)) - (objectiveInfo.width / 2));
objectiveMark.x = (objectiveInfo.x - 10);
inPlace = true;
};
} else {
if (success){
if (!changeMission){
if (!objectiveMark.visible){
objectiveMark.gotoAndPlay(1);
objectiveMark.visible = true;
_local2 = root;
_local2.addCashUpdate((1000 * (_local2.missionActive + _local2.city)), (_local2.userinterface.cashInfo.x + (_local2.userinterface.cashInfo.width / 2)), (_local2.userinterface.cashInfo.y + (_local2.userinterface.cashInfo.height / 2)), true, 0, true);
_local2.otherIncome = (_local2.otherIncome + (1000 * (_local2.missionActive + _local2.city)));
} else {
if (objectiveMark.currentLabel == "changeMission"){
changeMission = true;
} else {
if (objectiveMark.currentFrame <= 20){
if (objectiveMark.currentFrame <= 10){
if (objectiveInfo.alpha > 0){
objectiveInfo.alpha = (objectiveInfo.alpha - 0.1);
};
} else {
if (objectiveInfo.alpha < 1){
objectiveInfo.alpha = (objectiveInfo.alpha + 0.1);
};
};
//unresolved jump
};
};
};
} else {
objectiveInfo.x = (objectiveInfo.x + 32);
if (objectiveInfo.x > (maskBar.x + maskBar.width)){
declareMission = false;
inPlace = false;
success = false;
changeMission = false;
objectiveInfo.x = (maskBar.x - (objectiveInfo.width / 2));
};
};
};
};
};
}
function frame1(){
objectiveInfo.autoSize = TextFieldAutoSize.CENTER;
objectiveMark.visible = false;
objectiveMark.y = (maskBar.height / 2);
declareMission = false;
inPlace = false;
success = false;
changeMission = false;
addEventListener(Event.ENTER_FRAME, Animation);
}
}
}//package PlazaMall_fla
Section 114
//UI_573 (PlazaMall_fla.UI_573)
package PlazaMall_fla {
import flash.display.*;
public dynamic class UI_573 extends MovieClip {
public function UI_573(){
addFrameScript(67, frame68);
}
function frame68(){
stop();
this.visible = false;
}
}
}//package PlazaMall_fla
Section 115
//UI_575 (PlazaMall_fla.UI_575)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_575 extends MovieClip {
public var statisfied:MovieClip;
public var angry:MovieClip;
public var head;
public var normal:MovieClip;
public var upset:MovieClip;
public function UI_575(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 10, frame11, 11, frame12, 20, frame21);
}
public function SearchHappyVisitor(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if ((((head.visitorFocus == null)) || ((head.visitorList.indexOf(head.visitorFocus) < 0)))){
if (head.visitorList.length > 0){
_local2 = Math.floor((Math.random() * head.visitorList.length));
_local3 = -1;
_local4 = head.visitorList[_local2];
while ((((_local4.mood <= 75)) && (!((_local2 == _local3))))) {
if (_local3 == -1){
_local3 = _local2;
};
_local2++;
if (_local2 >= head.visitorList.length){
_local2 = 0;
};
_local4 = head.visitorList[_local2];
};
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (_local2 != _local3){
selectVisitor(_local4);
} else {
head.addNotification("No happy visitor found");
};
} else {
head.addNotification("No visitor found");
};
} else {
_local6 = head.visitorList.indexOf(head.visitorFocus);
_local7 = (head.visitorFocus.mood > 75);
_local3 = _local6;
++_local6;
if (_local6 >= head.visitorList.length){
_local6 = 0;
};
_local4 = head.visitorList[_local6];
while ((((_local4.mood <= 75)) && (!((_local6 == _local3))))) {
++_local6;
if (_local6 >= head.visitorList.length){
_local6 = 0;
};
_local4 = head.visitorList[_local6];
};
head.visitorFocus.filters = [];
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (((!((_local6 == _local3))) || (_local7))){
selectVisitor(_local4);
} else {
head.addNotification("No happy visitor found");
};
};
}
function frame3(){
normal.iconSymbol.gotoAndStop("normal");
normal.Note.text = "Neutral visitor";
}
function frame1(){
angry.iconSymbol.gotoAndStop("angry");
angry.Note.text = "Very angry visitor";
}
function frame12(){
statisfied.removeEventListener(MouseEvent.CLICK, SearchHappyVisitor);
normal.removeEventListener(MouseEvent.CLICK, SearchNeutralVisitor);
upset.removeEventListener(MouseEvent.CLICK, SearchUpsetVisitor);
angry.removeEventListener(MouseEvent.CLICK, SearchAngryVisitor);
}
public function SearchAngryVisitor(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if ((((head.visitorFocus == null)) || ((head.visitorList.indexOf(head.visitorFocus) < 0)))){
if (head.visitorList.length > 0){
_local2 = Math.floor((Math.random() * head.visitorList.length));
_local3 = -1;
_local4 = head.visitorList[_local2];
while ((((_local4.mood > 25)) && (!((_local2 == _local3))))) {
if (_local3 == -1){
_local3 = _local2;
};
_local2++;
if (_local2 >= head.visitorList.length){
_local2 = 0;
};
_local4 = head.visitorList[_local2];
};
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (_local2 != _local3){
selectVisitor(_local4);
} else {
head.addNotification("No angry visitor found");
};
} else {
head.addNotification("No visitor found");
};
} else {
_local6 = head.visitorList.indexOf(head.visitorFocus);
_local7 = (head.visitorFocus.mood <= 25);
_local3 = _local6;
++_local6;
if (_local6 >= head.visitorList.length){
_local6 = 0;
};
_local4 = head.visitorList[_local6];
while ((((_local4.mood > 25)) && (!((_local6 == _local3))))) {
++_local6;
if (_local6 >= head.visitorList.length){
_local6 = 0;
};
_local4 = head.visitorList[_local6];
};
head.visitorFocus.filters = [];
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (((!((_local6 == _local3))) || (_local7))){
selectVisitor(_local4);
} else {
head.addNotification("No angry visitor found");
};
};
}
public function SearchUpsetVisitor(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if ((((head.visitorFocus == null)) || ((head.visitorList.indexOf(head.visitorFocus) < 0)))){
if (head.visitorList.length > 0){
_local2 = Math.floor((Math.random() * head.visitorList.length));
_local3 = -1;
_local4 = head.visitorList[_local2];
while ((((((_local4.mood <= 25)) || ((_local4.mood > 50)))) && (!((_local2 == _local3))))) {
if (_local3 == -1){
_local3 = _local2;
};
_local2++;
if (_local2 >= head.visitorList.length){
_local2 = 0;
};
_local4 = head.visitorList[_local2];
};
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (_local2 != _local3){
selectVisitor(_local4);
} else {
head.addNotification("No upset visitor found");
};
} else {
head.addNotification("No visitor found");
};
} else {
_local6 = head.visitorList.indexOf(head.visitorFocus);
_local7 = (((head.visitorFocus.mood > 25)) && ((head.visitorFocus.mood <= 50)));
_local3 = _local6;
++_local6;
if (_local6 >= head.visitorList.length){
_local6 = 0;
};
_local4 = head.visitorList[_local6];
while ((((((_local4.mood <= 25)) || ((_local4.mood > 50)))) && (!((_local6 == _local3))))) {
++_local6;
if (_local6 >= head.visitorList.length){
_local6 = 0;
};
_local4 = head.visitorList[_local6];
};
head.visitorFocus.filters = [];
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (((!((_local6 == _local3))) || (_local7))){
selectVisitor(_local4);
} else {
head.addNotification("No upset visitor found");
};
};
}
function frame4(){
statisfied.iconSymbol.gotoAndStop("happy");
statisfied.Note.text = "Happy visitor";
}
function frame21(){
this.visible = false;
}
function frame2(){
upset.iconSymbol.gotoAndStop("upset");
upset.Note.text = "Upset visitor";
}
public function SearchNeutralVisitor(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if ((((head.visitorFocus == null)) || ((head.visitorList.indexOf(head.visitorFocus) < 0)))){
if (head.visitorList.length > 0){
_local2 = Math.floor((Math.random() * head.visitorList.length));
_local3 = -1;
_local4 = head.visitorList[_local2];
while ((((((_local4.mood <= 50)) || ((_local4.mood > 75)))) && (!((_local2 == _local3))))) {
if (_local3 == -1){
_local3 = _local2;
};
_local2++;
if (_local2 >= head.visitorList.length){
_local2 = 0;
};
_local4 = head.visitorList[_local2];
};
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (_local2 != _local3){
selectVisitor(_local4);
} else {
head.addNotification("No neutral visitor found");
};
} else {
head.addNotification("No visitor found");
};
} else {
_local6 = head.visitorList.indexOf(head.visitorFocus);
_local7 = (((head.visitorFocus.mood > 50)) && ((head.visitorFocus.mood <= 75)));
_local3 = _local6;
++_local6;
if (_local6 >= head.visitorList.length){
_local6 = 0;
};
_local4 = head.visitorList[_local6];
while ((((((_local4.mood <= 50)) || ((_local4.mood > 75)))) && (!((_local6 == _local3))))) {
++_local6;
if (_local6 >= head.visitorList.length){
_local6 = 0;
};
_local4 = head.visitorList[_local6];
};
head.visitorFocus.filters = [];
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (((!((_local6 == _local3))) || (_local7))){
selectVisitor(_local4);
} else {
head.addNotification("No neutral visitor found");
};
};
}
function frame11(){
head = root;
statisfied.addEventListener(MouseEvent.CLICK, SearchHappyVisitor);
normal.addEventListener(MouseEvent.CLICK, SearchNeutralVisitor);
upset.addEventListener(MouseEvent.CLICK, SearchUpsetVisitor);
angry.addEventListener(MouseEvent.CLICK, SearchAngryVisitor);
stop();
}
public function selectVisitor(_arg1:MovieClip):void{
var _local2:*;
var _local3:BitmapFilter;
var _local4:*;
_local2 = new UI_VisitorInformation();
_local2.x = head.menuX;
_local2.y = head.menuY;
head.menuParent.addChild(_local2);
head.visitorFocus = _arg1;
_local3 = new GlowFilter(0xFF8800, 0.9, 5, 5, 2);
_local4 = new Array();
_local4.push(_local3);
head.visitorFocus.filters = _local4;
}
}
}//package PlazaMall_fla
Section 116
//UI_576 (PlazaMall_fla.UI_576)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_576 extends MovieClip {
public var hightlighted:MovieClip;
public var Note:TextField;
public var btnTemp:MovieClip;
public var iconSymbol:MovieClip;
public var Amount:TextField;
public function UI_576(){
addFrameScript(0, frame1);
}
public function Hightlighted(_arg1:MouseEvent):void{
var _local2:*;
hightlighted.visible = true;
_local2 = root;
_local2.menuOver = true;
}
public function Unhightlighted(_arg1:MouseEvent):void{
var _local2:*;
hightlighted.visible = false;
_local2 = root;
_local2.menuOver = false;
}
function frame1(){
btnTemp.buttonMode = true;
hightlighted.visible = false;
addEventListener(MouseEvent.MOUSE_OVER, Hightlighted);
addEventListener(MouseEvent.MOUSE_OUT, Unhightlighted);
}
}
}//package PlazaMall_fla
Section 117
//UI_577 (PlazaMall_fla.UI_577)
package PlazaMall_fla {
import flash.display.*;
public dynamic class UI_577 extends MovieClip {
public function UI_577(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11);
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
function frame11(){
stop();
}
}
}//package PlazaMall_fla
Section 118
//UI_582 (PlazaMall_fla.UI_582)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_582 extends MovieClip {
public var technician:MovieClip;
public var security:MovieClip;
public var clnService:MovieClip;
public var head;
public function UI_582(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 8, frame9, 9, frame10, 18, frame19);
}
public function SearchTechnician(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if ((((head.visitorFocus == null)) || ((head.crewList.indexOf(head.visitorFocus) < 0)))){
if (head.crewList.length > 0){
_local2 = Math.floor((Math.random() * head.crewList.length));
_local3 = -1;
_local4 = head.crewList[_local2];
while (((!((((((_local4 is CrewTechnicianlv1)) || ((_local4 is CrewTechnicianlv2)))) || ((_local4 is CrewTechnicianlv3))))) && (!((_local2 == _local3))))) {
if (_local3 == -1){
_local3 = _local2;
};
_local2++;
if (_local2 >= head.crewList.length){
_local2 = 0;
};
_local4 = head.crewList[_local2];
};
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (_local2 != _local3){
selectCrew(_local4);
} else {
head.addNotification("No technician found");
};
} else {
head.addNotification("Crew not found");
};
} else {
_local6 = head.crewList.indexOf(head.visitorFocus);
_local7 = (((((head.visitorFocus is CrewTechnicianlv1)) || ((head.visitorFocus is CrewTechnicianlv2)))) || ((head.visitorFocus is CrewTechnicianlv3)));
_local3 = _local6;
++_local6;
if (_local6 >= head.crewList.length){
_local6 = 0;
};
_local4 = head.crewList[_local6];
while (((!((((((_local4 is CrewTechnicianlv1)) || ((_local4 is CrewTechnicianlv2)))) || ((_local4 is CrewTechnicianlv3))))) && (!((_local6 == _local3))))) {
++_local6;
if (_local6 >= head.crewList.length){
_local6 = 0;
};
_local4 = head.crewList[_local6];
};
head.visitorFocus.filters = [];
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (((!((_local6 == _local3))) || (_local7))){
selectCrew(_local4);
} else {
head.addNotification("No technician found");
};
};
}
function frame10(){
clnService.removeEventListener(MouseEvent.CLICK, SearchCleaningService);
technician.removeEventListener(MouseEvent.CLICK, SearchTechnician);
security.removeEventListener(MouseEvent.CLICK, SearchSecurity);
}
function frame3(){
clnService.iconSymbol.gotoAndStop("c.service");
clnService.Note.text = "Cleaning Service";
}
function frame19(){
this.visible = false;
}
function frame9(){
head = root;
clnService.addEventListener(MouseEvent.CLICK, SearchCleaningService);
technician.addEventListener(MouseEvent.CLICK, SearchTechnician);
security.addEventListener(MouseEvent.CLICK, SearchSecurity);
stop();
}
public function SearchSecurity(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if ((((head.visitorFocus == null)) || ((head.crewList.indexOf(head.visitorFocus) < 0)))){
if (head.crewList.length > 0){
_local2 = Math.floor((Math.random() * head.crewList.length));
_local3 = -1;
_local4 = head.crewList[_local2];
while (((!((((((_local4 is CrewSecuritylv1)) || ((_local4 is CrewSecuritylv2)))) || ((_local4 is CrewSecuritylv3))))) && (!((_local2 == _local3))))) {
if (_local3 == -1){
_local3 = _local2;
};
_local2++;
if (_local2 >= head.crewList.length){
_local2 = 0;
};
_local4 = head.crewList[_local2];
};
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (_local2 != _local3){
selectCrew(_local4);
} else {
head.addNotification("No security found");
};
} else {
head.addNotification("Crew not found");
};
} else {
_local6 = head.crewList.indexOf(head.visitorFocus);
_local7 = (((((head.visitorFocus is CrewSecuritylv1)) || ((head.visitorFocus is CrewSecuritylv2)))) || ((head.visitorFocus is CrewSecuritylv3)));
_local3 = _local6;
++_local6;
if (_local6 >= head.crewList.length){
_local6 = 0;
};
_local4 = head.crewList[_local6];
while (((!((((((_local4 is CrewSecuritylv1)) || ((_local4 is CrewSecuritylv2)))) || ((_local4 is CrewSecuritylv3))))) && (!((_local6 == _local3))))) {
++_local6;
if (_local6 >= head.crewList.length){
_local6 = 0;
};
_local4 = head.crewList[_local6];
};
head.visitorFocus.filters = [];
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (((!((_local6 == _local3))) || (_local7))){
selectCrew(_local4);
} else {
head.addNotification("No security found");
};
};
}
public function selectCrew(_arg1:MovieClip):void{
var _local2:*;
var _local3:BitmapFilter;
var _local4:*;
_local2 = new UI_EmployeeInformation();
_local2.x = head.menuX;
_local2.y = head.menuY;
head.menuParent.addChild(_local2);
head.visitorFocus = _arg1;
_local3 = new GlowFilter(0xFF8800, 0.9, 5, 5, 2);
_local4 = new Array();
_local4.push(_local3);
head.visitorFocus.filters = _local4;
}
function frame1(){
security.iconSymbol.gotoAndStop("security");
security.Note.text = "Security";
}
public function SearchCleaningService(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if ((((head.visitorFocus == null)) || ((head.crewList.indexOf(head.visitorFocus) < 0)))){
if (head.crewList.length > 0){
_local2 = Math.floor((Math.random() * head.crewList.length));
_local3 = -1;
_local4 = head.crewList[_local2];
while (((!((((((_local4 is CrewCleaningServicelv1)) || ((_local4 is CrewCleaningServicelv2)))) || ((_local4 is CrewCleaningServicelv3))))) && (!((_local2 == _local3))))) {
if (_local3 == -1){
_local3 = _local2;
};
_local2++;
if (_local2 >= head.crewList.length){
_local2 = 0;
};
_local4 = head.crewList[_local2];
};
if (head.visitorFocus != null){
head.visitorFocus.filters = [];
};
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (_local2 != _local3){
selectCrew(_local4);
} else {
head.addNotification("No cleaning service found");
};
} else {
head.addNotification("Crew not found");
};
} else {
_local6 = head.crewList.indexOf(head.visitorFocus);
_local7 = (((((head.visitorFocus is CrewCleaningServicelv1)) || ((head.visitorFocus is CrewCleaningServicelv2)))) || ((head.visitorFocus is CrewCleaningServicelv3)));
_local3 = _local6;
++_local6;
if (_local6 >= head.crewList.length){
_local6 = 0;
};
_local4 = head.crewList[_local6];
while (((!((((((_local4 is CrewCleaningServicelv1)) || ((_local4 is CrewCleaningServicelv2)))) || ((_local4 is CrewCleaningServicelv3))))) && (!((_local6 == _local3))))) {
++_local6;
if (_local6 >= head.crewList.length){
_local6 = 0;
};
_local4 = head.crewList[_local6];
};
head.visitorFocus.filters = [];
if (head.menuParent.numChildren > 0){
_local5 = head.menuParent.getChildAt(0);
_local5.closeMenu();
};
if (((!((_local6 == _local3))) || (_local7))){
selectCrew(_local4);
} else {
head.addNotification("No cleaning service found");
};
};
}
function frame2(){
technician.iconSymbol.gotoAndStop("technician");
technician.Note.text = "Technician";
}
}
}//package PlazaMall_fla
Section 119
//UI_583 (PlazaMall_fla.UI_583)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_583 extends MovieClip {
public var food:MovieClip;
public var entertainment:MovieClip;
public var head;
public var general:MovieClip;
public function UI_583(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 8, frame9, 9, frame10, 18, frame19);
}
public function SearchFoodCenter(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (head.menuParent.numChildren <= 0){
_local2 = null;
} else {
_local2 = head.menuParent.getChildAt(0);
};
if ((((_local2 == null)) || ((_local2.buildingRelation == null)))){
if (head.tenantList.length > 0){
_local3 = Math.floor((Math.random() * head.tenantList.length));
_local4 = -1;
_local5 = head.tenantList[_local3];
_local6 = head.userinterface.btnArr;
while ((((((_local6.indexOf(_local5.name) < 9)) || ((_local6.indexOf(_local5.name) > 14)))) && (!((_local3 == _local4))))) {
if (_local4 == -1){
_local4 = _local3;
};
_local3++;
if (_local3 >= head.tenantList.length){
_local3 = 0;
};
_local5 = head.tenantList[_local3];
};
if (_local2 != null){
_local2.closeMenu();
};
if (_local3 != _local4){
selectTenant(_local5);
} else {
head.addNotification("No food center found");
};
} else {
head.addNotification("Booth not found");
};
} else {
_local7 = head.tenantList.indexOf(_local2.buildingRelation);
_local6 = head.userinterface.btnArr;
_local8 = (((_local6.indexOf(_local2.buildingRelation.name) >= 9)) && ((_local6.indexOf(_local2.buildingRelation.name) <= 14)));
_local4 = _local7;
++_local7;
if (_local7 >= head.tenantList.length){
_local7 = 0;
};
_local5 = head.tenantList[_local7];
while ((((((_local6.indexOf(_local5.name) < 9)) || ((_local6.indexOf(_local5.name) > 14)))) && (!((_local7 == _local4))))) {
++_local7;
if (_local7 >= head.tenantList.length){
_local7 = 0;
};
_local5 = head.tenantList[_local7];
};
_local2.closeMenu();
if (((!((_local7 == _local4))) || (_local8))){
selectTenant(_local5);
} else {
head.addNotification("No food center found");
};
};
}
function frame10(){
general.removeEventListener(MouseEvent.CLICK, SearchGeneralStore);
food.removeEventListener(MouseEvent.CLICK, SearchFoodCenter);
entertainment.removeEventListener(MouseEvent.CLICK, SearchEntertainment);
}
function frame3(){
general.iconSymbol.gotoAndStop("general");
general.Note.text = "General Store";
}
function frame1(){
entertainment.iconSymbol.gotoAndStop("entertainment");
entertainment.Note.text = "Entertainment";
}
function frame19(){
this.visible = false;
}
function frame9(){
head = root;
general.addEventListener(MouseEvent.CLICK, SearchGeneralStore);
food.addEventListener(MouseEvent.CLICK, SearchFoodCenter);
entertainment.addEventListener(MouseEvent.CLICK, SearchEntertainment);
stop();
}
function frame2(){
food.iconSymbol.gotoAndStop("food");
food.Note.text = "Food and Beverages";
}
public function SearchEntertainment(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (head.menuParent.numChildren <= 0){
_local2 = null;
} else {
_local2 = head.menuParent.getChildAt(0);
};
if ((((_local2 == null)) || ((_local2.buildingRelation == null)))){
if (head.tenantList.length > 0){
_local3 = Math.floor((Math.random() * head.tenantList.length));
_local4 = -1;
_local5 = head.tenantList[_local3];
_local6 = head.userinterface.btnArr;
while ((((((_local6.indexOf(_local5.name) < 15)) && (!((_local5 is TenantHall))))) && (!((_local3 == _local4))))) {
if (_local4 == -1){
_local4 = _local3;
};
_local3++;
if (_local3 >= head.tenantList.length){
_local3 = 0;
};
_local5 = head.tenantList[_local3];
};
if (_local2 != null){
_local2.closeMenu();
};
if (_local3 != _local4){
selectTenant(_local5);
} else {
head.addNotification("No entertainment found");
};
} else {
head.addNotification("Booth not found");
};
} else {
_local7 = head.tenantList.indexOf(_local2.buildingRelation);
_local6 = head.userinterface.btnArr;
_local8 = (((_local6.indexOf(_local2.buildingRelation.name) >= 15)) || ((_local2.buildingRelation is TenantHall)));
_local4 = _local7;
++_local7;
if (_local7 >= head.tenantList.length){
_local7 = 0;
};
_local5 = head.tenantList[_local7];
while ((((((_local6.indexOf(_local5.name) < 15)) && (!((_local5 is TenantHall))))) && (!((_local7 == _local4))))) {
++_local7;
if (_local7 >= head.tenantList.length){
_local7 = 0;
};
_local5 = head.tenantList[_local7];
};
_local2.closeMenu();
if (((!((_local7 == _local4))) || (_local8))){
selectTenant(_local5);
} else {
head.addNotification("No entertainment found");
};
};
}
public function SearchGeneralStore(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (head.menuParent.numChildren <= 0){
_local2 = null;
} else {
_local2 = head.menuParent.getChildAt(0);
};
if ((((_local2 == null)) || ((_local2.buildingRelation == null)))){
if (head.tenantList.length > 0){
_local3 = Math.floor((Math.random() * head.tenantList.length));
_local4 = -1;
_local5 = head.tenantList[_local3];
_local6 = head.userinterface.btnArr;
while ((((((_local6.indexOf(_local5.name) < 0)) || ((_local6.indexOf(_local5.name) > 8)))) && (!((_local3 == _local4))))) {
if (_local4 == -1){
_local4 = _local3;
};
_local3++;
if (_local3 >= head.tenantList.length){
_local3 = 0;
};
_local5 = head.tenantList[_local3];
};
if (_local2 != null){
_local2.closeMenu();
};
if (_local3 != _local4){
selectTenant(_local5);
} else {
head.addNotification("No general store found");
};
} else {
head.addNotification("Booth not found");
};
} else {
_local7 = head.tenantList.indexOf(_local2.buildingRelation);
_local6 = head.userinterface.btnArr;
_local8 = (((_local6.indexOf(_local2.buildingRelation.name) >= 0)) && ((_local6.indexOf(_local2.buildingRelation.name) <= 8)));
_local4 = _local7;
++_local7;
if (_local7 >= head.tenantList.length){
_local7 = 0;
};
_local5 = head.tenantList[_local7];
while ((((((_local6.indexOf(_local5.name) < 0)) || ((_local6.indexOf(_local5.name) > 8)))) && (!((_local7 == _local4))))) {
++_local7;
if (_local7 >= head.tenantList.length){
_local7 = 0;
};
_local5 = head.tenantList[_local7];
};
_local2.closeMenu();
if (((!((_local7 == _local4))) || (_local8))){
selectTenant(_local5);
} else {
head.addNotification("No general store found");
};
};
}
public function selectTenant(_arg1:MovieClip):void{
var _local2:*;
if ((_arg1 is TenantHall)){
_local2 = new UI_HallInformation();
} else {
_local2 = new UI_TenantInformation();
};
_local2.x = head.menuX;
_local2.y = head.menuY;
_local2.buildingRelation = _arg1;
_arg1.transform.colorTransform = new ColorTransform(0.7, 0.7, 0, 1, 0, 0, 0, 0);
head.menuParent.addChild(_local2);
head.cameraX = ((_arg1.worldX + (_arg1.width / 2)) - (head.CAMERA_WIDTH / 2));
head.cameraY = (((_arg1.worldY + (_arg1.height / 2)) - head.CAMERA_HEIGHT) + 120);
}
}
}//package PlazaMall_fla
Section 120
//UI_599 (PlazaMall_fla.UI_599)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_599 extends MovieClip {
public var emptySlot;
public var cancelSave:SimpleButton;
public var saveSlot;
public var border:MovieClip;
public var fillSlot;
public var qualityControl:MovieClip;
public var saveSlot1:MovieClip;
public var saveSlot2:MovieClip;
public var saveSlot3:MovieClip;
public var btnExit:SimpleButton;
public var emptySlot1:SimpleButton;
public var emptySlot2:SimpleButton;
public var emptySlot3:SimpleButton;
public var backToMainMenuWarning:MovieClip;
public var btnResume:SimpleButton;
public var saveNotice:MovieClip;
public var menuHeader:TextField;
public var warningIndex;
public var warningMessage:MovieClip;
public var btnSave:SimpleButton;
public function UI_599(){
addFrameScript(0, frame1);
}
public function SaveData(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
if (!warningMessage.visible){
_local2 = _arg1.currentTarget;
_local3 = saveSlot.indexOf(_local2);
_local4 = root;
if (_local4.SaveGameData[_local3].data.playerName){
warningIndex = _local3;
warningMessage.visible = true;
warningMessage.btnYes.addEventListener(MouseEvent.CLICK, AcceptSave);
warningMessage.btnNo.addEventListener(MouseEvent.CLICK, DeclineSave);
} else {
_local4.saveGame(_local3);
if (_local4.SaveGameData[_local3].data.playerName){
if (saveSlot[_local3] == emptySlot[_local3]){
saveSlot[_local3].visible = false;
};
fillSlot[_local3].body.playerName.text = _local4.SaveGameData[_local3].data.playerName;
_local5 = _local4.SaveGameData[_local3].data.saveDate;
_local6 = (_local5.month + 1);
if (_local5.month < 10){
_local6 = ("0" + _local6);
};
_local7 = _local5.date;
if (_local5.date < 10){
_local7 = ("0" + _local7);
};
_local8 = (_local5.fullYear % 100);
if ((_local5.fullYear % 100) < 10){
_local8 = ("0" + _local7);
};
fillSlot[_local3].body.dateSave.text = ((((_local6 + "/") + _local7) + "/") + _local8);
_local9 = "am";
_local10 = (_local5.hours + "");
if (_local5.hours > 12){
_local10 = ((_local5.hours - 12) + "");
_local9 = "pm";
};
if (_local10.length <= 1){
_local10 = ("0" + _local10);
};
_local11 = _local5.minutes;
if (_local5.minutes < 10){
_local11 = ("0" + _local11);
};
fillSlot[_local3].body.timeSave.text = (((_local10 + ":") + _local11) + _local9);
saveSlot[_local3] = fillSlot[_local3];
saveSlot[_local3].visible = true;
};
};
};
}
public function DeclineExit(_arg1:MouseEvent):void{
backToMainMenuWarning.visible = false;
backToMainMenuWarning.btnYes.removeEventListener(MouseEvent.CLICK, AcceptExit);
backToMainMenuWarning.btnNo.removeEventListener(MouseEvent.CLICK, DeclineExit);
}
public function SaveGame(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
if (!backToMainMenuWarning.visible){
_local2 = root;
btnResume.visible = false;
btnSave.visible = false;
btnExit.visible = false;
qualityControl.visible = false;
menuHeader.text = "SAVE GAME";
_local3 = 0;
while (_local3 < emptySlot.length) {
if (_local2.SaveGameData[_local3].data.playerName){
fillSlot[_local3].body.playerName.text = _local2.SaveGameData[_local3].data.playerName;
_local4 = _local2.SaveGameData[_local3].data.saveDate;
_local5 = (_local4.month + 1);
if (_local4.month < 10){
_local5 = ("0" + _local5);
};
_local6 = _local4.date;
if (_local4.date < 10){
_local6 = ("0" + _local6);
};
_local7 = (_local4.fullYear % 100);
if ((_local4.fullYear % 100) < 10){
_local7 = ("0" + _local6);
};
fillSlot[_local3].body.dateSave.text = ((((_local5 + "/") + _local6) + "/") + _local7);
_local8 = "am";
_local9 = (_local4.hours + "");
if (_local4.hours > 12){
_local9 = ((_local4.hours - 12) + "");
_local8 = "pm";
};
if (_local9.length <= 1){
_local9 = ("0" + _local9);
};
_local10 = _local4.minutes;
if (_local4.minutes < 10){
_local10 = ("0" + _local10);
};
fillSlot[_local3].body.timeSave.text = (((_local9 + ":") + _local10) + _local8);
saveSlot.push(fillSlot[_local3]);
} else {
saveSlot.push(emptySlot[_local3]);
};
saveSlot[_local3].visible = true;
saveSlot[_local3].addEventListener(MouseEvent.CLICK, SaveData);
_local3++;
};
cancelSave.visible = true;
saveNotice.visible = true;
};
}
public function ExitGame(_arg1:MouseEvent):void{
if (!backToMainMenuWarning.visible){
backToMainMenuWarning.visible = true;
backToMainMenuWarning.btnYes.addEventListener(MouseEvent.CLICK, AcceptExit);
backToMainMenuWarning.btnNo.addEventListener(MouseEvent.CLICK, DeclineExit);
};
}
public function AcceptExit(_arg1:MouseEvent):void{
var _local2:*;
_local2 = root;
_local2.BackToMainMenu();
if (_local2.bgmChannel != null){
_local2.bgmChannel.stop();
};
if (_local2.seChannel != null){
_local2.seChannel.stop();
};
backToMainMenuWarning.visible = false;
backToMainMenuWarning.btnYes.removeEventListener(MouseEvent.CLICK, AcceptExit);
backToMainMenuWarning.btnNo.removeEventListener(MouseEvent.CLICK, DeclineExit);
}
function frame1(){
warningMessage.visible = false;
backToMainMenuWarning.visible = false;
saveSlot = new Array();
emptySlot = new Array();
emptySlot.push(emptySlot1);
emptySlot.push(emptySlot2);
emptySlot.push(emptySlot3);
fillSlot = new Array();
fillSlot.push(saveSlot1);
fillSlot.push(saveSlot2);
fillSlot.push(saveSlot3);
emptySlot1.visible = false;
emptySlot2.visible = false;
emptySlot3.visible = false;
saveSlot1.visible = false;
saveSlot2.visible = false;
saveSlot3.visible = false;
cancelSave.visible = false;
saveNotice.visible = false;
btnResume.addEventListener(MouseEvent.CLICK, ResumeGame);
btnExit.addEventListener(MouseEvent.CLICK, ExitGame);
btnSave.addEventListener(MouseEvent.CLICK, SaveGame);
cancelSave.addEventListener(MouseEvent.CLICK, CancelSaveGame);
warningIndex = -1;
}
public function DeclineSave(_arg1:MouseEvent):void{
warningMessage.visible = false;
warningMessage.btnYes.removeEventListener(MouseEvent.CLICK, AcceptSave);
warningMessage.btnNo.removeEventListener(MouseEvent.CLICK, DeclineSave);
}
public function CancelSaveGame(_arg1:MouseEvent):void{
if (!warningMessage.visible){
while (saveSlot.length > 0) {
saveSlot[0].visible = false;
saveSlot.shift();
};
cancelSave.visible = false;
saveNotice.visible = false;
btnResume.visible = true;
btnSave.visible = true;
btnExit.visible = true;
qualityControl.visible = true;
menuHeader.text = "GAME MENU";
};
}
public function AcceptSave(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
_local2 = root;
_local2.saveGame(warningIndex);
fillSlot[warningIndex].body.playerName.text = _local2.SaveGameData[warningIndex].data.playerName;
_local3 = _local2.SaveGameData[warningIndex].data.saveDate;
_local4 = (_local3.month + 1);
if (_local3.month < 10){
_local4 = ("0" + _local4);
};
_local5 = _local3.date;
if (_local3.date < 10){
_local5 = ("0" + _local5);
};
_local6 = (_local3.fullYear % 100);
if ((_local3.fullYear % 100) < 10){
_local6 = ("0" + _local5);
};
fillSlot[warningIndex].body.dateSave.text = ((((_local4 + "/") + _local5) + "/") + _local6);
_local7 = "am";
_local8 = (_local3.hours + "");
if (_local3.hours > 12){
_local8 = ((_local3.hours - 12) + "");
_local7 = "pm";
};
if (_local8.length <= 1){
_local8 = ("0" + _local8);
};
_local9 = _local3.minutes;
if (_local3.minutes < 10){
_local9 = ("0" + _local9);
};
fillSlot[warningIndex].body.timeSave.text = (((_local8 + ":") + _local9) + _local7);
saveSlot[warningIndex] = fillSlot[warningIndex];
saveSlot[warningIndex].visible = true;
warningMessage.visible = false;
warningIndex = -1;
}
public function ResumeGame(_arg1:MouseEvent):void{
var myParent:*;
var oldParent:*;
var event = _arg1;
if (!backToMainMenuWarning.visible){
myParent = this.parent;
var _local3 = myParent;
with (_local3) {
oldParent = myParent.parent;
oldParent.gameSpeed = tempSpeed;
tempSpeed = -1;
gameMenu.visible = false;
activeAllButton();
};
};
}
}
}//package PlazaMall_fla
Section 121
//UI_607 (PlazaMall_fla.UI_607)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_607 extends MovieClip {
public var btnHighQuality:SimpleButton;
public var highlightedLow:MovieClip;
public var btnLowQuality:SimpleButton;
public var highlightedHigh:MovieClip;
public var highlightedMedium:MovieClip;
public var btnMediumQuality:SimpleButton;
public function UI_607(){
addFrameScript(0, frame1);
}
function frame1(){
highlightedHigh.visible = (stage.quality.toUpperCase() == StageQuality.HIGH.toUpperCase());
highlightedMedium.visible = (stage.quality.toUpperCase() == StageQuality.MEDIUM.toUpperCase());
highlightedLow.visible = (stage.quality.toUpperCase() == StageQuality.LOW.toUpperCase());
btnHighQuality.addEventListener(MouseEvent.CLICK, UpdateQuality);
btnMediumQuality.addEventListener(MouseEvent.CLICK, UpdateQuality);
btnLowQuality.addEventListener(MouseEvent.CLICK, UpdateQuality);
}
public function UpdateQuality(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
highlightedHigh.visible = (_local2.name == "btnHighQuality");
highlightedMedium.visible = (_local2.name == "btnMediumQuality");
highlightedLow.visible = (_local2.name == "btnLowQuality");
if (highlightedHigh.visible){
stage.quality = StageQuality.HIGH;
} else {
if (highlightedMedium.visible){
stage.quality = StageQuality.MEDIUM;
} else {
if (highlightedLow.visible){
stage.quality = StageQuality.LOW;
};
};
};
}
}
}//package PlazaMall_fla
Section 122
//UI_616 (PlazaMall_fla.UI_616)
package PlazaMall_fla {
import flash.display.*;
public dynamic class UI_616 extends MovieClip {
public var btnYes:SimpleButton;
public var btnNo:SimpleButton;
}
}//package PlazaMall_fla
Section 123
//UI_619 (PlazaMall_fla.UI_619)
package PlazaMall_fla {
import flash.display.*;
public dynamic class UI_619 extends MovieClip {
public var btnYes:SimpleButton;
public var btnNo:SimpleButton;
}
}//package PlazaMall_fla
Section 124
//UI_620 (PlazaMall_fla.UI_620)
package PlazaMall_fla {
import flash.display.*;
public dynamic class UI_620 extends MovieClip {
public var btnYes:SimpleButton;
public var btnNo:SimpleButton;
}
}//package PlazaMall_fla
Section 125
//UI_621 (PlazaMall_fla.UI_621)
package PlazaMall_fla {
import flash.display.*;
public dynamic class UI_621 extends MovieClip {
public var longClock:MovieClip;
public var shortClock:MovieClip;
}
}//package PlazaMall_fla
Section 126
//UIbudgetDiscription_632 (PlazaMall_fla.UIbudgetDiscription_632)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UIbudgetDiscription_632 extends MovieClip {
public var writeArea:MovieClip;
public var textList:TextField;
public function UIbudgetDiscription_632(){
addFrameScript(0, frame1);
}
function frame1(){
textList.autoSize = TextFieldAutoSize.LEFT;
textList.mouseEnabled = false;
}
}
}//package PlazaMall_fla
Section 127
//UIbudgetIncomeOutCome_630 (PlazaMall_fla.UIbudgetIncomeOutCome_630)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UIbudgetIncomeOutCome_630 extends MovieClip {
public var textList:TextField;
public function UIbudgetIncomeOutCome_630(){
addFrameScript(0, frame1);
}
function frame1(){
textList.autoSize = TextFieldAutoSize.RIGHT;
textList.mouseEnabled = false;
}
}
}//package PlazaMall_fla
Section 128
//UIbudgetNumberGain_629 (PlazaMall_fla.UIbudgetNumberGain_629)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UIbudgetNumberGain_629 extends MovieClip {
public var textList:TextField;
public function UIbudgetNumberGain_629(){
addFrameScript(0, frame1);
}
function frame1(){
textList.autoSize = TextFieldAutoSize.RIGHT;
textList.mouseEnabled = false;
}
}
}//package PlazaMall_fla
Section 129
//UIbudgetpage_626 (PlazaMall_fla.UIbudgetpage_626)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UIbudgetpage_626 extends MovieClip {
public var diff;
public var scrollBar:MovieClip;
public var outcomeList:MovieClip;
public var totalEarning:TextField;
public var difference:TextField;
public var visitorComeList:MovieClip;
public var closeBtn:SimpleButton;
public var discription:MovieClip;
public var appear;
public var gainList:MovieClip;
public var statisticTimer;
public var incomeList:MovieClip;
public function UIbudgetpage_626(){
addFrameScript(0, frame1);
}
public function UpdatePosition(_arg1:Event):void{
if (scrollBar.visible){
discription.textList.y = (5 - (diff * scrollBar.getPosition()));
visitorComeList.textList.y = (5 - (diff * scrollBar.getPosition()));
incomeList.textList.y = (5 - (diff * scrollBar.getPosition()));
outcomeList.textList.y = (5 - (diff * scrollBar.getPosition()));
gainList.textList.y = (5 - (diff * scrollBar.getPosition()));
};
}
public function CloseMenu(_arg1:MouseEvent):void{
var _local2:*;
this.appear = false;
statisticTimer = 0;
_local2 = root;
_local2.userinterface.btnStatistic.btnDefault.tog = false;
}
function frame1(){
appear = false;
statisticTimer = 0;
alpha = 0;
diff = 0;
checkHeight();
closeBtn.addEventListener(MouseEvent.CLICK, CloseMenu);
addEventListener(Event.ENTER_FRAME, Appearance);
addEventListener(Event.ENTER_FRAME, UpdatePosition);
}
public function checkHeight():void{
if (discription.textList.height > (discription.writeArea.height - 10)){
scrollBar.visible = true;
diff = (discription.textList.height - (discription.writeArea.height - 10));
} else {
scrollBar.visible = false;
diff = 0;
};
scrollBar.btnScroll.y = scrollBar.line.y;
}
public function Appearance(_arg1:Event):void{
if (alpha <= 0){
this.visible = false;
} else {
this.visible = true;
};
if (((appear) || ((statisticTimer > 0)))){
if (alpha < 1){
alpha = (alpha + 0.1);
};
} else {
if (alpha > 0){
alpha = (alpha - 0.1);
};
};
if (statisticTimer > 0){
statisticTimer--;
};
}
}
}//package PlazaMall_fla
Section 130
//UIbudgetpagescrollbar_594 (PlazaMall_fla.UIbudgetpagescrollbar_594)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
public dynamic class UIbudgetpagescrollbar_594 extends MovieClip {
public var line:MovieClip;
public var btnScroll:SimpleButton;
public function UIbudgetpagescrollbar_594(){
addFrameScript(0, frame1);
}
public function MouseDownEvent(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, Dragging);
stage.addEventListener(MouseEvent.MOUSE_UP, StopDragging);
}
function frame1(){
btnScroll.y = line.y;
btnScroll.x = (line.x + (line.width / 2));
btnScroll.addEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
}
public function Dragging(_arg1:MouseEvent):void{
btnScroll.y = mouseY;
if (btnScroll.y < line.y){
btnScroll.y = line.y;
};
if (btnScroll.y > (line.y + line.height)){
btnScroll.y = (line.y + line.height);
};
}
public function StopDragging(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, Dragging);
stage.removeEventListener(MouseEvent.MOUSE_UP, StopDragging);
}
public function getPosition():Number{
var _local1:*;
_local1 = ((btnScroll.y - line.y) / line.height);
return (_local1);
}
}
}//package PlazaMall_fla
Section 131
//UIbudgetVisitor_631 (PlazaMall_fla.UIbudgetVisitor_631)
package PlazaMall_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UIbudgetVisitor_631 extends MovieClip {
public var textList:TextField;
public function UIbudgetVisitor_631(){
addFrameScript(0, frame1);
}
function frame1(){
textList.autoSize = TextFieldAutoSize.CENTER;
textList.mouseEnabled = false;
}
}
}//package PlazaMall_fla
Section 132
//UIlegendbackground_541 (PlazaMall_fla.UIlegendbackground_541)
package PlazaMall_fla {
import flash.events.*;
import flash.display.*;
public dynamic class UIlegendbackground_541 extends MovieClip {
public var btnExit:SimpleButton;
public function UIlegendbackground_541(){
addFrameScript(0, frame1);
}
function frame1(){
btnExit.addEventListener(MouseEvent.CLICK, Closing);
}
public function Closing(_arg1:MouseEvent):void{
this.visible = false;
}
}
}//package PlazaMall_fla
Section 133
//accArrow (accArrow)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class accArrow extends MovieClip {
public var worldX;
public var worldY;
public var visitor;
public function accArrow(){
addFrameScript(0, frame1, 56, frame57);
}
public function ChangePosition(_arg1:Event):void{
if (visitor != null){
worldX = visitor.worldX;
worldY = (visitor.worldY - visitor.height);
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, ChangePosition);
}
function frame57(){
this.parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, ChangePosition);
stop();
}
}
}//package
Section 134
//AchievementList (AchievementList)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class AchievementList extends MovieClip {
public var trophy0:MovieClip;
public var trophy1:MovieClip;
public var trophy5:MovieClip;
public var trophy4:MovieClip;
public var trophy6:MovieClip;
public var trophy7:MovieClip;
public var trophy3:MovieClip;
public var trophy8:MovieClip;
public var AchivementNote:TextField;
public var trophy9:MovieClip;
public var trophy2:MovieClip;
public var trophy11:MovieClip;
public var trophy18:MovieClip;
public var trophy15:MovieClip;
public var trophy17:MovieClip;
public var trophy19:MovieClip;
public var btnBack:SimpleButton;
public var trophy12:MovieClip;
public var trophy13:MovieClip;
public var trophy14:MovieClip;
public var trophy16:MovieClip;
public var trophy10:MovieClip;
public var trophy20:MovieClip;
public var NoticeList;
public var head;
public var trophyList;
public function AchievementList(){
addFrameScript(0, frame1);
}
public function checkAchivement():void{
var _local1:*;
_local1 = 0;
while (_local1 < trophyList.length) {
if (head.Achivement.data.trophyList[_local1]){
trophyList[_local1].gotoAndStop(2);
} else {
trophyList[_local1].gotoAndStop(1);
};
trophyList[_local1].addEventListener(MouseEvent.MOUSE_OVER, TrophyMouseOver);
trophyList[_local1].addEventListener(MouseEvent.MOUSE_OUT, TrophyMouseOut);
_local1++;
};
}
function frame1(){
head = root;
trophyList = new Array();
trophyList.push(trophy0);
trophyList.push(trophy1);
trophyList.push(trophy2);
trophyList.push(trophy3);
trophyList.push(trophy4);
trophyList.push(trophy5);
trophyList.push(trophy6);
trophyList.push(trophy7);
trophyList.push(trophy8);
trophyList.push(trophy9);
trophyList.push(trophy10);
trophyList.push(trophy11);
trophyList.push(trophy12);
trophyList.push(trophy13);
trophyList.push(trophy14);
trophyList.push(trophy15);
trophyList.push(trophy16);
trophyList.push(trophy17);
trophyList.push(trophy18);
trophyList.push(trophy19);
trophyList.push(trophy20);
NoticeList = new Array("25 visitors satisfied", "50 visitors satisfied", "75 visitors satisfied", "Enter the credit", "Earn $50,000 profits", "Earn $100,000 profits", "Earn $200,000 profits", "Earn $300,000 profits", "Upgrade all buildings (at least 10)", "Upgrade all buildings to max (at least 10)", "Promote all securities staffs to max (at least 5)", "Promote all technicians staffs to max (at least 5)", "Promote all cleaning services staffs to max (at least 5)", "Promote all staffs to the max (at least 12)", "Have 5 general stores in your mall", "Have 5 restrooms in your mall", "Have 5 restaurants in your mall", "Have all kind of booths in your mall", "Secret achievement, find it", "Lost 10 visitors (They're go home unhappy)", "3 booths have electricity problems at same time");
btnBack.addEventListener(MouseEvent.CLICK, BackToMainMenu);
checkAchivement();
}
public function UpdateAchievement(_arg1:Number):void{
if (head.Achivement.data.trophyList[_arg1]){
trophyList[_arg1].gotoAndStop(2);
} else {
trophyList[_arg1].gotoAndStop(1);
};
}
public function BackToMainMenu(_arg1:MouseEvent):void{
var _local2:*;
_local2 = 0;
while (_local2 < trophyList.length) {
trophyList[_local2].removeEventListener(MouseEvent.MOUSE_OVER, TrophyMouseOver);
trophyList[_local2].removeEventListener(MouseEvent.MOUSE_OUT, TrophyMouseOut);
_local2++;
};
btnBack.removeEventListener(MouseEvent.CLICK, BackToMainMenu);
if (this.parent != head.userinterface){
head.gotoAndPlay("Main Menu");
} else {
this.parent.removeChild(this);
};
}
public function TrophyMouseOver(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = _arg1.currentTarget;
_local3 = trophyList.indexOf(_local2);
_local4 = NoticeList[_local3];
if (_local2.currentFrame == 2){
if (_local4 != "Secret achievement, find it"){
_local4 = (_local4 + " (Unlocked)");
} else {
_local4 = "I see Eagle One Coming";
};
};
AchivementNote.text = _local4;
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 50, 100, 0);
}
public function TrophyMouseOut(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
AchivementNote.text = "";
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
}
}//package
Section 135
//AchivementNotification (AchivementNotification)
package {
import flash.display.*;
public dynamic class AchivementNotification extends MovieClip {
public var body:MovieClip;
public function AchivementNotification(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 136
//Bandit (Bandit)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Bandit extends MovieClip {
public var rideElevator;
public var pursue;
public var destination;
public var elevatorTarget;
public var stolenProfit;
public var waiting;
public var dirrection;
public var dx;
public var floorPos;
public var catcher;
public var elevatorChecked;
public var tryToEnter;
public var arrested:MovieClip;
public var speedX;
public var homePos;
public var worldX;
public var worldY;
public var pursuer;
public var arrestDelay;
public var swapingDelay;
public var myParent;
public var isStealing;
public var hiding;
public var delay;
public var blinkDelay;
public var lastDestination;
public var stealingTime;
public var stealingRate;
public var elevatorFloor;
public var runDelay;
public var firstCome;
public var captured;
public var securityDetected;
public var goHome;
public var stealSomething;
public var openLockDelay;
public var initialBlinkDelay;
public var toiletTarget;
public function Bandit(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame4(){
stop();
}
public function checkSecurity(_arg1:MovieClip):MovieClip{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
_local3 = null;
while ((((_local2 < _arg1.visitorList.length)) && ((_local3 == null)))) {
_local4 = _arg1.visitorList[_local2];
if ((((((_local4 is CrewSecuritylv1)) || ((_local4 is CrewSecuritylv2)))) || ((_local4 is CrewSecuritylv3)))){
_local3 = _local4;
};
_local2++;
};
if (_local3 != null){
captured = true;
};
return (_local3);
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local11 = Math.floor((Math.random() * _local8.length));
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
public function scanTarget():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < myParent.tenantParent.numChildren) {
_local5 = myParent.tenantParent.getChildAt(_local2);
if (((((!((((((_local5 is SupportElevator)) || ((_local5 is SupportRestroom)))) || ((_local5 is TenantHall))))) && (_local5.isClose))) && ((lastDestination.indexOf(_local5) < 0)))){
_local1.push(_local5);
};
_local2++;
};
_local3 = Math.floor((Math.random() * _local1.length));
_local4 = _local1[_local3];
return (_local4);
}
function frame1(){
dx = 0;
speedX = 3;
stealSomething = false;
hiding = 0;
myParent = root;
isStealing = false;
elevatorChecked = null;
securityDetected = new Array();
pursuer = new Array();
captured = false;
goHome = false;
catcher = null;
rideElevator = false;
waiting = 0;
stolenProfit = 0;
addEventListener(Event.ENTER_FRAME, Animation);
delay = 100;
openLockDelay = 0;
tryToEnter = false;
stealingTime = 0;
stealingRate = 0;
firstCome = true;
lastDestination = new Array();
addEventListener(Event.ENTER_FRAME, Behavior);
runDelay = 0;
swapingDelay = 0;
}
function frame2(){
stop();
}
public function Behavior(_arg1:Event):void{
var sp:*;
var rate:*;
var rAlrmTrigger:*;
var profit:*;
var tipsText:*;
var temp:*;
var glowFilter:*;
var rnd:*;
var stealArea:*;
var test:*;
var bi:*;
var vi:*;
var bonusProfit:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (((stealSomething) && (!(pursue)))){
if (hiding > 0){
hiding--;
} else {
stealSomething = false;
};
};
if (!captured){
scanSecurity();
runAwayFromSecurity();
if ((floorPos is Floor)){
if ((this.worldX + dx) < floorPos.worldX){
this.worldX = (floorPos.worldX - dx);
if (!pursue){
dx = speedX;
} else {
dx = (speedX * 2);
runDelay = 5;
};
};
if ((this.worldX + dx) > (floorPos.worldX + floorPos.width)){
this.worldX = ((floorPos.worldX + floorPos.width) - dx);
if (!pursue){
dx = -(speedX);
} else {
dx = (-(speedX) * 2);
runDelay = 5;
};
};
};
if (isStealing){
dx = 0;
if (destination != null){
if ((((stealingTime > 0)) && (!(myParent.alarmTrigger)))){
stealingTime--;
stealingRate--;
if (stealingRate <= 0){
stealingRate = 20;
rate = ((Math.random() * 10) - 5);
if (rate > 0){
rAlrmTrigger = (Math.random() * 100);
if (rAlrmTrigger < (destination.tLevel * 30)){
myParent.banditTrigger = this;
myParent.robedBooth = destination;
myParent.alarmTrigger = true;
};
};
if (!myParent.alarmTrigger){
profit = ((Math.floor((Math.random() * 30)) + 10) * 10);
stolenProfit = (stolenProfit + profit);
myParent.otherOutcome = (myParent.otherOutcome + profit);
};
stealingTime = (stealingTime + rate);
stealSomething = true;
hiding = 72;
};
} else {
if (!destination.isOpen){
destination.isOpen = true;
};
if (lastDestination.indexOf(destination) < 0){
lastDestination.push(destination);
};
destination.finishStealing(this);
if (!isStealing){
myParent.addCashUpdate(stolenProfit, worldX, (worldY - height), false);
if (!myParent.firstBanditStealing){
if (myParent.menuParent.numChildren > 0){
try {
temp = myParent.menuParent.getChildAt(0);
temp.closeMenu();
} catch(e:Error) {
};
};
myParent.cameraX = (worldX - (myParent.CAMERA_WIDTH / 2));
myParent.cameraY = ((worldY - myParent.CAMERA_HEIGHT) + 120);
tipsText = "If there is a flashing red color on your booths it means there is theft. Try to add more security on your mall, it will prevent theft.";
myParent.addTips(("Tips:\n" + tipsText));
if (myParent.tipsHistory.indexOf(tipsText) < 0){
myParent.tipsHistory.unshift(tipsText);
myParent.userinterface.tipsHistory.updateText(myParent.tipsHistory);
if (!myParent.userinterface.tipsHistory.visible){
glowFilter = new GlowFilter(0xFF8800);
myParent.userinterface.btnMailBox.filters = [glowFilter];
if (myParent.userinterface.currentLabel == "reveal"){
myParent.userinterface.tipsHistory.checkHeight();
};
};
};
myParent.firstBanditStealing = true;
};
};
};
if (destination != null){
try {
myParent.tenantParent.getChildIndex(destination);
} catch(e:Error) {
destination.finishStealing(this);
};
};
};
};
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
};
if ((((myParent.dayTime >= 5)) && ((myParent.dayTime < 22)))){
goHome = true;
if (isStealing){
destination.finishStealing(this);
};
};
if (((!(goHome)) && (!(myParent.alarmTrigger)))){
if ((((((destination == null)) || ((destination is SupportElevator)))) || ((destination is SupportRestroom)))){
if (firstCome){
destination = scanTarget();
firstCome = false;
} else {
rnd = (Math.random() * 100);
if (rnd < 50){
destination = scanTarget();
if (destination == null){
goHome = true;
};
} else {
goHome = true;
};
};
} else {
if (destination.ground != floorPos){
if (!pursue){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
} else {
if (!pursue){
if (!isStealing){
if (destination.enterance != null){
stealArea = destination.enterance;
} else {
stealArea = destination.door;
};
if (worldX < (destination.worldX + stealArea.x)){
dx = speedX;
} else {
if (worldX > ((destination.worldX + stealArea.x) + stealArea.width)){
dx = -(speedX);
} else {
if (stealArea.hitTestObject(this)){
if (destination.Visited(this)){
dx = 0;
if (!tryToEnter){
openLockDelay = 50;
tryToEnter = true;
stealingTime = 100;
stealingRate = 20;
} else {
if (openLockDelay > 0){
openLockDelay--;
} else {
if (!destination.isOpen){
destination.isOpen = true;
};
};
};
destination.stolen(this);
};
};
};
};
};
};
};
};
};
if (((((!((elevatorTarget == null))) && (!(pursue)))) && (!(captured)))){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
test = null;
if ((((elevatorFloor.door.currentFrame < 10)) && (((elevatorFloor.door.currentFrame + myParent.gameSpeed) >= 10)))){
test = checkSecurity(elevatorTarget);
if (test != null){
catcher = test;
};
};
if (test == null){
elevatorTarget.Visited(this);
};
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
if (!myParent.alarmTrigger){
dx = -(speedX);
} else {
dx = (-(speedX) * 2);
};
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
if (!myParent.alarmTrigger){
dx = speedX;
} else {
dx = (speedX * 2);
};
} else {
dx = 0;
};
};
};
};
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
if (rideElevator){
dx = 0;
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (((((((goHome) || (myParent.alarmTrigger))) && (!(isStealing)))) && (!(pursue)))){
if (destination != null){
destination = null;
};
if ((((floorPos == myParent.ground)) && (!(rideElevator)))){
if (elevatorTarget != null){
elevatorFloor = null;
vi = elevatorTarget.visitorWaiting.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorWaiting.splice(vi, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 11))) && ((homePos > 0)))){
if (!myParent.alarmTrigger){
dx = speedX;
} else {
dx = (speedX * 2);
};
} else {
if ((((worldX > (homePos - 11))) && ((homePos <= 0)))){
if (!myParent.alarmTrigger){
dx = -(speedX);
} else {
dx = (-(speedX) * 2);
};
};
};
} else {
if (!pursue){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -10)) || ((this.worldX > (myParent.MAX_WIDTH + 10))))){
bi = myParent.banditList.indexOf(this);
myParent.banditList.splice(bi, 1);
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Behavior);
this.parent.removeChild(this);
break;
};
} else {
dx = 0;
if (elevatorTarget != null){
vi = elevatorTarget.visitorList.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorList.splice(vi, 1);
elevatorTarget.elevatorTargetList.splice(vi, 1);
myParent.visitorParent.addChild(this);
};
vi = elevatorTarget.visitorWaiting.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorWaiting.splice(vi, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
if (catcher != null){
if (!catcher.isAction){
catcher.isAction = true;
catcher = null;
};
};
if (arrested != null){
if (arrested.currentLabel == "Arrest Label"){
sp = myParent.gameSpeed;
arrestDelay = 60;
initialBlinkDelay = 7;
blinkDelay = 7;
bi = myParent.banditList.indexOf(this);
myParent.banditList.splice(bi, 1);
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
bonusProfit = Math.round((stolenProfit / 10));
if (bonusProfit < 50){
bonusProfit = 50;
};
myParent.otherOutcome = (myParent.otherOutcome - stolenProfit);
if (myParent.otherOutcome < 0){
myParent.otherIncome = (myParent.otherIncome + Math.abs(myParent.otherOutcome));
myParent.otherOutcome = 0;
};
myParent.otherIncome = (myParent.otherIncome + bonusProfit);
myParent.addCashUpdate(stolenProfit, this.worldX, this.worldY, true, bonusProfit);
myParent.banditCaptured++;
stolenProfit = 0;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, Arrested);
break;
} else {
this.alpha = 1;
};
};
};
sp = (sp + 1);
};
}
public function scanSecurity():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.crewList.length) {
_local3 = myParent.crewList[_local2];
if ((((((_local3 is CrewSecuritylv1)) || ((_local3 is CrewSecuritylv2)))) || ((_local3 is CrewSecuritylv3)))){
_local4 = securityDetected.indexOf(_local3);
if (_local3.floorPos == floorPos){
if (_local4 < 0){
if (Math.abs((_local3.worldX - worldX)) <= 200){
if (dirrection == 1){
if (_local3.worldX > worldX){
_local1 = _local3;
};
} else {
if (_local3.worldX < worldX){
_local1 = _local3;
};
};
securityDetected.push(_local1);
};
};
} else {
if (_local4 >= 0){
securityDetected.splice(_local4, 1);
};
};
};
_local2++;
};
}
public function Arrested(_arg1:Event):void{
arrestDelay--;
if (arrestDelay < 28){
blinkDelay--;
if (blinkDelay <= 0){
initialBlinkDelay--;
blinkDelay = initialBlinkDelay;
if (this.alpha == 1){
this.alpha = 0;
} else {
this.alpha = 1;
};
};
};
if (arrestDelay <= 0){
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Arrested);
this.parent.removeChild(this);
};
}
public function Animation(_arg1:Event):void{
if (!isStealing){
if (((((((((!(stealSomething)) && (!(myParent.alarmTrigger)))) && (!(captured)))) && (!(rideElevator)))) && (!(pursue)))){
if (this.alpha > 0.6){
this.alpha = (this.alpha - 0.1);
};
} else {
if (!captured){
this.alpha = 1;
};
};
};
if (captured){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function runAwayFromSecurity():void{
var _local1:*;
var _local2:*;
if (runDelay > 0){
runDelay--;
} else {
pursue = (((pursuer.length > 0)) && ((securityDetected.indexOf(pursuer[0]) >= 0)));
if (pursue){
if (elevatorTarget != null){
_local2 = elevatorTarget.visitorWaiting.indexOf(this);
if (_local2 >= 0){
elevatorTarget.visitorWaiting.splice(_local2, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
_local1 = pursuer[0];
if (_local1.worldX > worldX){
dx = -((speedX * 2));
} else {
if (_local1.worldX < worldX){
dx = (speedX * 2);
};
};
};
};
if (swapingDelay > 0){
swapingDelay--;
} else {
if (pursuer.length > 0){
_local1 = pursuer.shift();
pursuer.push(_local1);
};
swapingDelay = 5;
};
}
}
}//package
Section 137
//BeginingTutorial (BeginingTutorial)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BeginingTutorial extends MovieClip {
public var btnStartGame:MovieClip;
public var head;
public function BeginingTutorial(){
addFrameScript(0, frame1, 11, frame12);
}
public function RemoveThisObject(_arg1:MouseEvent):void{
this.parent.removeChild(this);
}
function frame12(){
gotoAndPlay("BlinkStart");
}
function frame1(){
head = root;
btnStartGame.buttonMode = true;
btnStartGame.addEventListener(MouseEvent.CLICK, head.StartGame);
btnStartGame.addEventListener(MouseEvent.CLICK, RemoveThisObject);
}
}
}//package
Section 138
//BGM_Event_Art (BGM_Event_Art)
package {
import flash.media.*;
public dynamic class BGM_Event_Art extends Sound {
}
}//package
Section 139
//BGM_Event_Concert (BGM_Event_Concert)
package {
import flash.media.*;
public dynamic class BGM_Event_Concert extends Sound {
}
}//package
Section 140
//BGM_Event_Electro (BGM_Event_Electro)
package {
import flash.media.*;
public dynamic class BGM_Event_Electro extends Sound {
}
}//package
Section 141
//BGMMenu (BGMMenu)
package {
import flash.media.*;
public dynamic class BGMMenu extends Sound {
}
}//package
Section 142
//BGMNewYork (BGMNewYork)
package {
import flash.media.*;
public dynamic class BGMNewYork extends Sound {
}
}//package
Section 143
//BGMNight (BGMNight)
package {
import flash.media.*;
public dynamic class BGMNight extends Sound {
}
}//package
Section 144
//BGMParis (BGMParis)
package {
import flash.media.*;
public dynamic class BGMParis extends Sound {
}
}//package
Section 145
//BGMSpoted (BGMSpoted)
package {
import flash.media.*;
public dynamic class BGMSpoted extends Sound {
}
}//package
Section 146
//BGMTokyo (BGMTokyo)
package {
import flash.media.*;
public dynamic class BGMTokyo extends Sound {
}
}//package
Section 147
//BGMTransition (BGMTransition)
package {
import flash.media.*;
public dynamic class BGMTransition extends Sound {
}
}//package
Section 148
//BGStreet (BGStreet)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BGStreet extends MovieClip {
public var worldX:Number;
public var worldY:Number;
public var light:MovieClip;
public var tree2:MovieClip;
public var tree1:MovieClip;
public var myParent;
public var sakura1:MovieClip;
public var sakura2:MovieClip;
public function BGStreet(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
addEventListener(Event.ENTER_FRAME, LightChange);
}
public function LightChange(_arg1:Event):void{
light.alpha = myParent.night.alpha;
}
}
}//package
Section 149
//BuildBabyShop (BuildBabyShop)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildBabyShop extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildBabyShop(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[1];
}
}
}//package
Section 150
//BuildBookStore (BuildBookStore)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildBookStore extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildBookStore(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[2];
}
}
}//package
Section 151
//BuildBoutiqueA (BuildBoutiqueA)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildBoutiqueA extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildBoutiqueA(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[3];
}
}
}//package
Section 152
//BuildBoutiqueB (BuildBoutiqueB)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildBoutiqueB extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildBoutiqueB(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[4];
}
}
}//package
Section 153
//BuildBurger (BuildBurger)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildBurger extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildBurger(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.FOOD_PRICE[2];
}
}
}//package
Section 154
//BuildCafe (BuildCafe)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildCafe extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildCafe(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.FOOD_PRICE[5];
}
}
}//package
Section 155
//BuildCake (BuildCake)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildCake extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildCake(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.FOOD_PRICE[0];
}
}
}//package
Section 156
//BuildCinema (BuildCinema)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildCinema extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildCinema(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.ENTERTAINMENT_PRICE[0];
}
}
}//package
Section 157
//BuildDrugStore (BuildDrugStore)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildDrugStore extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildDrugStore(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[0];
}
}
}//package
Section 158
//BuildElevator (BuildElevator)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildElevator extends MovieClip {
public var price;
public var myParent;
public var body:ElevatorMain;
public var body2:ElevatorMain;
public function BuildElevator(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.SUPPORT_PRICE[0];
}
}
}//package
Section 159
//BuildGameCenter (BuildGameCenter)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildGameCenter extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildGameCenter(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.ENTERTAINMENT_PRICE[1];
}
}
}//package
Section 160
//BuildHall (BuildHall)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildHall extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildHall(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.ENTERTAINMENT_PRICE[2];
}
}
}//package
Section 161
//BuildIceCream (BuildIceCream)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildIceCream extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildIceCream(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.FOOD_PRICE[1];
}
}
}//package
Section 162
//BuildJewelry (BuildJewelry)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildJewelry extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildJewelry(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[7];
}
}
}//package
Section 163
//BuildRestroom (BuildRestroom)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildRestroom extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildRestroom(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.SUPPORT_PRICE[1];
}
}
}//package
Section 164
//BuildSalon (BuildSalon)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildSalon extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildSalon(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[6];
}
}
}//package
Section 165
//BuildSteak (BuildSteak)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildSteak extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildSteak(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.FOOD_PRICE[3];
}
}
}//package
Section 166
//BuildSupermarket (BuildSupermarket)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildSupermarket extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildSupermarket(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[8];
}
}
}//package
Section 167
//BuildSushi (BuildSushi)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildSushi extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildSushi(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.FOOD_PRICE[4];
}
}
}//package
Section 168
//BuildToyStore (BuildToyStore)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BuildToyStore extends MovieClip {
public var price;
public var myParent;
public var body:MovieClip;
public function BuildToyStore(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.GENERAL_PRICE[5];
}
}
}//package
Section 169
//cloudGame (cloudGame)
package {
import flash.display.*;
public dynamic class cloudGame extends MovieClip {
public var speed;
public var sunset:MovieClip;
public var normal:MovieClip;
public function cloudGame(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 170
//CrewCleaningServicelv1 (CrewCleaningServicelv1)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewCleaningServicelv1 extends MovieClip {
public const UPGRADE_COST = 500;
public const nextUpgrade;
public var toiletTarget;
public var upgradeSalary;
public var backDelay;
public var crewNote;
public var worldX;
public var worldY;
public var homePos;
public var rideElevator;
public var isCleaning;
public var elevatorTarget;
public var destination;
public var myParent;
public var dirrection;
public var nameType;
public var delay;
public var waiting;
public var floorPos;
public var shiftFloor;
public var elevatorFloor;
public var dx;
public var upgradeEffect;
public var salary;
public var elevatorChecked;
public var cLevel;
public var speedX;
public var goHome;
public function CrewCleaningServicelv1(){
nextUpgrade = CrewCleaningServicelv2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 8){
if (myParent.dayTime >= 9){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame2(){
stop();
}
public function minValue(_arg1:Array):Number{
var _local2:*;
var _local3:*;
_local2 = Math.floor((Math.random() * _arg1.length));
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local2] > _arg1[_local3]){
_local2 = _local3;
};
_local3++;
};
return (_local2);
}
function frame3(){
stop();
}
public function Animation(_arg1:Event):void{
if (isCleaning){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function scanTarget():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.dirtyParent.numChildren) {
_local3 = myParent.dirtyParent.getChildAt(_local2);
if (_local3.bundle){
if (_local1 == null){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
if (_local3.ground == floorPos){
if (_local1.ground != floorPos){
_local1 = _local3;
} else {
if (Math.abs((_local3.worldX - this.worldX)) < Math.abs((_local1.worldX - this.worldX))){
_local1 = _local3;
};
};
};
};
};
};
_local2++;
};
if (_local1 != null){
if (_local1.worker == null){
_local1.worker = this;
} else {
if (!_local1.worker.isCleaning){
if (_local1.ground == floorPos){
if (_local1.worker.floorPos != _local1.ground){
_local1.worker.destination = null;
_local1.worker = this;
} else {
if (Math.abs((_local1.worker.worldX - _local1.worldX)) > Math.abs((worldX - _local1.worldX))){
_local1.worker.destination = null;
_local1.worker = this;
} else {
_local1 = null;
};
};
} else {
_local1 = null;
};
} else {
_local1 = null;
};
};
};
return (_local1);
}
function frame4(){
stop();
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local13 = new Array(_local8.length);
_local5 = 0;
while (_local5 < _local8.length) {
_local13[_local5] = 0;
_local14 = 0;
while (_local14 < _local8[_local5].visitorWaiting.length) {
if (_local8[_local5].visitorWaiting[_local14].floorPos == this.floorPos){
var _local15 = _local13;
var _local16 = _local5;
var _local17 = (_local15[_local16] + 1);
_local15[_local16] = _local17;
};
_local14++;
};
_local5++;
};
_local11 = minValue(_local13);
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
function frame1(){
nameType = "Cleaning Service";
cLevel = 1;
salary = 300;
crewNote = "Solution for dirty mall and trash on the floor";
upgradeSalary = 400;
upgradeEffect = "Increase cleaning efficiency";
dx = 0;
speedX = 2;
myParent = root;
isCleaning = false;
elevatorChecked = null;
goHome = false;
rideElevator = false;
waiting = 0;
if (this.parent != null){
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
};
delay = 100;
backDelay = 50;
}
public function Behavior(_arg1:Event):void{
var sp:*;
var indexFloor:*;
var tFloor:*;
var des:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (isCleaning){
dx = 0;
if (destination != null){
destination.trashLevel = (destination.trashLevel - 0.1);
if (destination.trashLevel <= 0){
myParent.dirtyParent.removeChild(destination);
destination = null;
isCleaning = false;
};
};
};
if (myParent.dayTime < 8){
goHome = true;
} else {
goHome = false;
};
indexFloor = myParent.floorList.indexOf(floorPos);
if ((indexFloor + 1) >= myParent.floorList.length){
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
} else {
tFloor = myParent.floorList[(indexFloor + 1)];
if (this.worldX < tFloor.worldX){
dx = speedX;
};
if (this.worldX > (tFloor.worldX + tFloor.width)){
dx = -(speedX);
};
};
if (((((((!(isCleaning)) && ((elevatorTarget == null)))) && ((destination == null)))) && (!(goHome)))){
destination = scanTarget();
if ((((dx == 0)) && ((elevatorTarget == null)))){
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
delay--;
if (delay <= 0){
if (shiftFloor < 0){
des = Math.floor((Math.random() * 4));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
des = Math.floor((Math.random() * 3));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
delay = 100;
};
};
if (((!((destination == null))) && (!(goHome)))){
if (destination.ground != floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if (!isCleaning){
if (this.hitTestObject(destination)){
isCleaning = true;
} else {
if (worldX > destination.worldX){
dx = -(speedX);
} else {
if (worldX < destination.worldX){
dx = speedX;
};
};
};
};
};
};
if (elevatorTarget != null){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
elevatorTarget.Visited(this);
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
dx = -(speedX);
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
dx = speedX;
} else {
dx = 0;
};
};
};
};
if ((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (rideElevator){
dx = 0;
};
if (((goHome) && (!(isCleaning)))){
if (destination != null){
destination.worker = null;
destination = null;
};
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
}
}//package
Section 171
//CrewCleaningServicelv2 (CrewCleaningServicelv2)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewCleaningServicelv2 extends MovieClip {
public const UPGRADE_COST = 700;
public const nextUpgrade;
public var toiletTarget;
public var upgradeSalary;
public var backDelay;
public var crewNote;
public var worldX;
public var worldY;
public var homePos;
public var rideElevator;
public var isCleaning;
public var elevatorTarget;
public var destination;
public var myParent;
public var dirrection;
public var nameType;
public var delay;
public var waiting;
public var floorPos;
public var shiftFloor;
public var elevatorFloor;
public var dx;
public var upgradeEffect;
public var salary;
public var ancestor:MovieClip;
public var elevatorChecked;
public var cLevel;
public var speedX;
public var goHome;
public function CrewCleaningServicelv2(){
nextUpgrade = CrewCleaningServicelv3;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 8){
if (myParent.dayTime >= 9){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame2(){
stop();
}
public function minValue(_arg1:Array):Number{
var _local2:*;
var _local3:*;
_local2 = Math.floor((Math.random() * _arg1.length));
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local2] > _arg1[_local3]){
_local2 = _local3;
};
_local3++;
};
return (_local2);
}
function frame3(){
stop();
}
public function Animation(_arg1:Event):void{
if (isCleaning){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function scanTarget():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.dirtyParent.numChildren) {
_local3 = myParent.dirtyParent.getChildAt(_local2);
if (_local3.bundle){
if (_local1 == null){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
if (_local3.ground == floorPos){
if (_local1.ground != floorPos){
_local1 = _local3;
} else {
if (Math.abs((_local3.worldX - this.worldX)) < Math.abs((_local1.worldX - this.worldX))){
_local1 = _local3;
};
};
};
};
};
};
_local2++;
};
if (_local1 != null){
if (_local1.worker == null){
_local1.worker = this;
} else {
if (!_local1.worker.isCleaning){
if (_local1.ground == floorPos){
if (_local1.worker.floorPos != _local1.ground){
_local1.worker.destination = null;
_local1.worker = this;
} else {
if (Math.abs((_local1.worker.worldX - _local1.worldX)) > Math.abs((worldX - _local1.worldX))){
_local1.worker.destination = null;
_local1.worker = this;
} else {
_local1 = null;
};
};
} else {
_local1 = null;
};
} else {
_local1 = null;
};
};
};
return (_local1);
}
function frame4(){
stop();
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local13 = new Array(_local8.length);
_local5 = 0;
while (_local5 < _local8.length) {
_local13[_local5] = 0;
_local14 = 0;
while (_local14 < _local8[_local5].visitorWaiting.length) {
if (_local8[_local5].visitorWaiting[_local14].floorPos == this.floorPos){
var _local15 = _local13;
var _local16 = _local5;
var _local17 = (_local15[_local16] + 1);
_local15[_local16] = _local17;
};
_local14++;
};
_local5++;
};
_local11 = minValue(_local13);
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
function frame1(){
nameType = "Cleaning Service";
cLevel = 2;
shiftFloor = ancestor.shiftFloor;
salary = ancestor.upgradeSalary;
upgradeSalary = 500;
upgradeEffect = "Increase cleaning efficiency\nIncrease movement speed";
speedX = 2;
crewNote = ancestor.crewNote;
worldX = ancestor.worldX;
worldY = ancestor.worldY;
dx = ancestor.dx;
dirrection = ancestor.dirrection;
floorPos = ancestor.floorPos;
myParent = root;
isCleaning = ancestor.isCleaning;
elevatorChecked = ancestor.elevatorChecked;
elevatorTarget = ancestor.elevatorTarget;
elevatorFloor = ancestor.elevatorFloor;
toiletTarget = ancestor.toiletTarget;
destination = ancestor.destination;
goHome = ancestor.goHome;
homePos = ancestor.homePos;
rideElevator = ancestor.rideElevator;
waiting = ancestor.waiting;
if (this.parent != null){
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
};
delay = ancestor.delay;
backDelay = ancestor.backDelay;
}
public function Behavior(_arg1:Event):void{
var sp:*;
var indexFloor:*;
var tFloor:*;
var des:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (isCleaning){
dx = 0;
if (destination != null){
destination.trashLevel = (destination.trashLevel - 0.5);
if (destination.trashLevel <= 0){
myParent.dirtyParent.removeChild(destination);
destination = null;
isCleaning = false;
};
};
};
if (myParent.dayTime < 8){
goHome = true;
} else {
goHome = false;
};
indexFloor = myParent.floorList.indexOf(floorPos);
if ((indexFloor + 1) >= myParent.floorList.length){
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
} else {
tFloor = myParent.floorList[(indexFloor + 1)];
if (this.worldX < tFloor.worldX){
dx = speedX;
};
if (this.worldX > (tFloor.worldX + tFloor.width)){
dx = -(speedX);
};
};
if (((((((!(isCleaning)) && ((elevatorTarget == null)))) && ((destination == null)))) && (!(goHome)))){
destination = scanTarget();
if ((((dx == 0)) && ((elevatorTarget == null)))){
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
delay--;
if (delay <= 0){
if (shiftFloor < 0){
des = Math.floor((Math.random() * 4));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
des = Math.floor((Math.random() * 3));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
delay = 100;
};
};
if (((!((destination == null))) && (!(goHome)))){
if (destination.ground != floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if (!isCleaning){
if (this.hitTestObject(destination)){
isCleaning = true;
} else {
if (worldX > destination.worldX){
dx = -(speedX);
} else {
if (worldX < destination.worldX){
dx = speedX;
};
};
};
};
};
};
if (elevatorTarget != null){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
elevatorTarget.Visited(this);
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
dx = -(speedX);
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
dx = speedX;
} else {
dx = 0;
};
};
};
};
if ((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (rideElevator){
dx = 0;
};
if (((goHome) && (!(isCleaning)))){
if (destination != null){
destination.worker = null;
destination = null;
};
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
}
}//package
Section 172
//CrewCleaningServicelv3 (CrewCleaningServicelv3)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewCleaningServicelv3 extends MovieClip {
public var toiletTarget;
public var worldX;
public var backDelay;
public var crewNote;
public var homePos;
public var worldY;
public var elevatorTarget;
public var rideElevator;
public var destination;
public var isCleaning;
public var myParent;
public var dirrection;
public var nameType;
public var delay;
public var waiting;
public var floorPos;
public var shiftFloor;
public var elevatorFloor;
public var dx;
public var salary;
public var ancestor:MovieClip;
public var elevatorChecked;
public var cLevel;
public var speedX;
public var goHome;
public function CrewCleaningServicelv3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 8){
if (myParent.dayTime >= 9){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame2(){
stop();
}
public function minValue(_arg1:Array):Number{
var _local2:*;
var _local3:*;
_local2 = Math.floor((Math.random() * _arg1.length));
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local2] > _arg1[_local3]){
_local2 = _local3;
};
_local3++;
};
return (_local2);
}
function frame3(){
stop();
}
public function Animation(_arg1:Event):void{
if (isCleaning){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function scanTarget():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.dirtyParent.numChildren) {
_local3 = myParent.dirtyParent.getChildAt(_local2);
if (_local3.bundle){
if (_local1 == null){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
if (_local3.ground == floorPos){
if (_local1.ground != floorPos){
_local1 = _local3;
} else {
if (Math.abs((_local3.worldX - this.worldX)) < Math.abs((_local1.worldX - this.worldX))){
_local1 = _local3;
};
};
};
};
};
};
_local2++;
};
if (_local1 != null){
if (_local1.worker == null){
_local1.worker = this;
} else {
if (!_local1.worker.isCleaning){
if (_local1.ground == floorPos){
if (_local1.worker.floorPos != _local1.ground){
_local1.worker.destination = null;
_local1.worker = this;
} else {
if (Math.abs((_local1.worker.worldX - _local1.worldX)) > Math.abs((worldX - _local1.worldX))){
_local1.worker.destination = null;
_local1.worker = this;
} else {
_local1 = null;
};
};
} else {
_local1 = null;
};
} else {
_local1 = null;
};
};
};
return (_local1);
}
function frame4(){
stop();
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local13 = new Array(_local8.length);
_local5 = 0;
while (_local5 < _local8.length) {
_local13[_local5] = 0;
_local14 = 0;
while (_local14 < _local8[_local5].visitorWaiting.length) {
if (_local8[_local5].visitorWaiting[_local14].floorPos == this.floorPos){
var _local15 = _local13;
var _local16 = _local5;
var _local17 = (_local15[_local16] + 1);
_local15[_local16] = _local17;
};
_local14++;
};
_local5++;
};
_local11 = minValue(_local13);
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
function frame1(){
nameType = "Cleaning Service";
cLevel = 3;
shiftFloor = ancestor.shiftFloor;
salary = ancestor.upgradeSalary;
crewNote = ancestor.crewNote;
worldX = ancestor.worldX;
worldY = ancestor.worldY;
dx = ancestor.dx;
speedX = 3;
dirrection = ancestor.dirrection;
floorPos = ancestor.floorPos;
myParent = root;
isCleaning = ancestor.isCleaning;
elevatorChecked = ancestor.elevatorChecked;
elevatorTarget = ancestor.elevatorTarget;
elevatorFloor = ancestor.elevatorFloor;
toiletTarget = ancestor.toiletTarget;
destination = ancestor.destination;
goHome = ancestor.goHome;
homePos = ancestor.homePos;
rideElevator = ancestor.rideElevator;
waiting = ancestor.waiting;
if (this.parent != null){
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
};
delay = ancestor.delay;
backDelay = ancestor.backDelay;
}
public function Behavior(_arg1:Event):void{
var sp:*;
var indexFloor:*;
var tFloor:*;
var des:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (isCleaning){
dx = 0;
if (destination != null){
destination.trashLevel = (destination.trashLevel - 1.2);
if (destination.trashLevel <= 0){
myParent.dirtyParent.removeChild(destination);
destination = null;
isCleaning = false;
};
};
};
if (myParent.dayTime < 8){
goHome = true;
} else {
goHome = false;
};
indexFloor = myParent.floorList.indexOf(floorPos);
if ((indexFloor + 1) >= myParent.floorList.length){
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
} else {
tFloor = myParent.floorList[(indexFloor + 1)];
if (this.worldX < tFloor.worldX){
dx = speedX;
};
if (this.worldX > (tFloor.worldX + tFloor.width)){
dx = -(speedX);
};
};
if (((((((!(isCleaning)) && ((elevatorTarget == null)))) && ((destination == null)))) && (!(goHome)))){
destination = scanTarget();
if ((((dx == 0)) && ((elevatorTarget == null)))){
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
delay--;
if (delay <= 0){
if (shiftFloor < 0){
des = Math.floor((Math.random() * 4));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
des = Math.floor((Math.random() * 3));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
delay = 100;
};
};
if (((!((destination == null))) && (!(goHome)))){
if (destination.ground != floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if (!isCleaning){
if (this.hitTestObject(destination)){
isCleaning = true;
} else {
if (worldX > destination.worldX){
dx = -(speedX);
} else {
if (worldX < destination.worldX){
dx = speedX;
};
};
};
};
};
};
if (elevatorTarget != null){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
elevatorTarget.Visited(this);
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
dx = -(speedX);
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
dx = speedX;
} else {
dx = 0;
};
};
};
};
if ((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (rideElevator){
dx = 0;
};
if (((goHome) && (!(isCleaning)))){
if (destination != null){
destination.worker = null;
destination = null;
};
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
}
}//package
Section 173
//CrewSecuritylv1 (CrewSecuritylv1)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewSecuritylv1 extends MovieClip {
public const UPGRADE_COST = 700;
public const nextUpgrade;
public var isAction;
public var rideElevator;
public var destination;
public var elevatorTarget;
public var action:MovieClip;
public var lastTrigger;
public var nameType;
public var waiting;
public var dirrection;
public var dx;
public var floorPos;
public var shiftFloor;
public var upgradeEffect;
public var elevatorChecked;
public var backDelay;
public var cLevel;
public var speedX;
public var crewNote;
public var homePos;
public var upgradeSalary;
public var worldX;
public var worldY;
public var myParent;
public var delay;
public var elevatorFloor;
public var salary;
public var banditTarget;
public var hasALegend;
public var goHome;
public var toiletTarget;
public function CrewSecuritylv1(){
nextUpgrade = CrewSecuritylv2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 21){
if (myParent.dayTime >= 22){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame3(){
stop();
}
function frame4(){
stop();
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (((!((myParent.banditTrigger == null))) && (!(myParent.rideElevator)))){
_local11 = _local6[_local5].floorList.indexOf(myParent.banditTrigger.floorPos);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local11 = Math.floor((Math.random() * _local8.length));
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
public function scanTarget():MovieClip{
var found:*;
var i:*;
var temp:*;
var legend:*;
found = null;
if (!rideElevator){
try {
i = 0;
while (i < myParent.banditList.length) {
temp = myParent.banditList[i];
if ((((((((((temp.floorPos == floorPos)) && (!(temp.rideElevator)))) && ((temp.pursuer.length < 3)))) && (!(temp.captured)))) && ((temp.alpha == 1)))){
if (found == null){
if (Math.abs((temp.worldX - worldX)) <= 200){
if (dirrection > 0){
if (temp.worldX > worldX){
found = temp;
};
} else {
if (temp.worldX < worldX){
found = temp;
};
};
};
} else {
if (Math.abs((temp.worldX - worldX)) <= Math.abs((found.worldX - worldX))){
if (dirrection > 0){
if (temp.worldX > worldX){
found = temp;
};
} else {
if (temp.worldX < worldX){
found = temp;
};
};
};
};
};
i = (i + 1);
};
if (found != null){
found.pursuer.push(this);
};
} catch(e:Error) {
};
};
if (found != null){
if (!hasALegend){
legend = new Legend();
legend.moodType = false;
legend.visitor = this;
legend.typeCode = "BANDIT";
myParent.legendParent.addChild(legend);
};
};
return (found);
}
function frame2(){
stop();
}
function frame1(){
nameType = "Security";
cLevel = 1;
salary = 600;
upgradeSalary = 700;
crewNote = "Solution for bandits and theft";
upgradeEffect = "Increase sight distance\nIncrease movement speed";
dx = 0;
speedX = 2;
dirrection = 1;
myParent = root;
isAction = false;
elevatorChecked = null;
goHome = false;
hasALegend = false;
rideElevator = false;
waiting = 0;
banditTarget = null;
if (this.parent != null){
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
};
delay = 100;
backDelay = 50;
}
public function Behavior(_arg1:Event):void{
var sp:*;
var des:*;
var bi:*;
var si:*;
var test:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
if (myParent.alarmTrigger){
dx = (speedX * 2);
} else {
dx = speedX;
};
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
if (myParent.alarmTrigger){
dx = (-(speedX) * 2);
} else {
dx = -(speedX);
};
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
if ((((((((banditTarget == null)) && (!(myParent.alarmTrigger)))) && ((myParent.dayTime > 8)))) && ((myParent.dayTime < 21)))){
goHome = true;
} else {
goHome = false;
};
if (banditTarget == null){
banditTarget = scanTarget();
};
if (((((((((!(isAction)) && ((elevatorTarget == null)))) && ((banditTarget == null)))) && (!(goHome)))) && ((myParent.banditTrigger == null)))){
if ((((dx == 0)) && ((elevatorTarget == null)))){
if (myParent.alarmTrigger){
dx = ((speedX * 2) * ((Math.floor((Math.random() * 2)) * 2) - 1));
} else {
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
};
delay--;
if (delay <= 0){
des = Math.floor((Math.random() * 4));
delay = 100;
if (myParent.alarmTrigger){
switch (des){
case 1:
dx = (-(speedX) * 2);
break;
case 2:
dx = (speedX * 2);
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (shiftFloor < 0){
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
};
};
};
if (((!((myParent.banditTrigger == null))) && (!(isAction)))){
if (floorPos != myParent.banditTrigger.floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if ((myParent.banditTrigger.worldX + (myParent.banditTrigger.width / 2)) < (worldX - (this.width / 2))){
dx = (-(speedX) * 2);
} else {
if ((myParent.banditTrigger.worldX - (myParent.banditTrigger.width / 2)) > (worldX + (this.width / 2))){
dx = (speedX * 2);
} else {
dx = 0;
myParent.banditTrigger.captured = true;
isAction = true;
};
};
};
};
if (((!((banditTarget == null))) && (!(isAction)))){
if (((!(banditTarget.rideElevator)) && ((banditTarget.floorPos == floorPos)))){
if (!banditTarget.captured){
if ((banditTarget.worldX + (banditTarget.width / 2)) < (worldX - (this.width / 2))){
dx = (-(speedX) * 2);
} else {
if ((banditTarget.worldX - (banditTarget.width / 2)) > (worldX + (this.width / 2))){
dx = (speedX * 2);
} else {
dx = 0;
banditTarget.captured = true;
isAction = true;
};
};
if ((((((myParent.banditList.indexOf(banditTarget) < 0)) || ((((Math.abs((banditTarget.worldX - worldX)) >= 500)) && (!(myParent.alarmTrigger)))))) || (banditTarget.rideElevator))){
bi = banditTarget.pursuer.indexOf(this);
banditTarget.pursuer.splice(bi, 1);
bi = banditTarget.securityDetected.indexOf(this);
banditTarget.securityDetected.splice(bi, 1);
banditTarget = null;
};
} else {
banditTarget = null;
};
} else {
si = banditTarget.pursuer.indexOf(this);
if (si >= 0){
banditTarget.pursuer.splice(si, 1);
};
banditTarget = null;
};
};
banditCollition();
if (((((!((elevatorTarget == null))) && ((banditTarget == null)))) && (!(isAction)))){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
test = false;
if (elevatorFloor.door.currentFrame >= 9){
test = checkAllVisitor(elevatorTarget);
};
if (!test){
elevatorTarget.Visited(this);
};
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
if (myParent.alarmTrigger){
dx = (-(speedX) * 2);
} else {
dx = -(speedX);
};
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
if (myParent.alarmTrigger){
dx = (speedX * 2);
} else {
dx = speedX;
};
} else {
dx = 0;
};
};
};
};
if ((((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(myParent.alarmTrigger)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (rideElevator){
dx = 0;
};
if (((goHome) && (!(isAction)))){
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
if (isAction){
dx = 0;
if (action != null){
if (action.currentFrame >= action.totalFrames){
isAction = false;
};
};
};
this.worldX = (this.worldX + dx);
if (lastTrigger != myParent.alarmTrigger){
delay = 0;
};
lastTrigger = myParent.alarmTrigger;
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
public function checkAllVisitor(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = false;
_local3 = 0;
while (_local3 < _arg1.visitorList.length) {
_local4 = _arg1.visitorList[_local3];
if ((((myParent.banditList.indexOf(_local4) >= 0)) && ((_local4.alpha >= 1)))){
_local4.worldX = (worldX + (10 * _local4.dirrection));
_local4.worldY = worldY;
_local4.floorPos = floorPos;
_local4.x = (_local4.worldX - myParent.cameraX);
_local4.y = (_local4.worldY - myParent.cameraY);
_local4.elevatorTarget = null;
_local4.elevatorChecked = null;
_local4.captured = true;
_local5 = _arg1.visitorList.indexOf(_local4);
_arg1.visitorList.splice(_local5, 1);
_arg1.elevatorTargetList.splice(_local5, 1);
this.isAction = true;
if (elevatorTarget != null){
_local6 = elevatorTarget.visitorWaiting.indexOf(this);
if (_local6 >= 0){
elevatorTarget.visitorWaiting.splice(_local6, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
};
this.elevatorTarget = null;
this.parent.addChild(_local4);
_local2 = true;
_local3--;
};
_local3++;
};
return (_local2);
}
public function banditCollition():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < myParent.banditList.length) {
_local2 = myParent.banditList[_local1];
if (((((((this.hitTestObject(_local2)) && ((_local2.alpha >= 1)))) && ((_local2.rideElevator == rideElevator)))) && (!(_local2.flying)))){
this.isAction = true;
if (_local2.worldX < worldX){
dirrection = -1;
scaleX = dirrection;
} else {
dirrection = 1;
scaleX = dirrection;
};
_local2.captured = true;
};
_local1++;
};
}
public function Animation(_arg1:Event):void{
if (isAction){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
}
}//package
Section 174
//CrewSecuritylv2 (CrewSecuritylv2)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewSecuritylv2 extends MovieClip {
public const UPGRADE_COST = 1000;
public const nextUpgrade;
public var isAction;
public var rideElevator;
public var destination;
public var elevatorTarget;
public var action:MovieClip;
public var lastTrigger;
public var nameType;
public var waiting;
public var dirrection;
public var dx;
public var floorPos;
public var shiftFloor;
public var upgradeEffect;
public var elevatorChecked;
public var backDelay;
public var cLevel;
public var speedX;
public var crewNote;
public var homePos;
public var upgradeSalary;
public var worldX;
public var worldY;
public var myParent;
public var delay;
public var elevatorFloor;
public var salary;
public var banditTarget;
public var ancestor;
public var hasALegend;
public var goHome;
public var toiletTarget;
public function CrewSecuritylv2(){
nextUpgrade = CrewSecuritylv3;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 21){
if (myParent.dayTime >= 22){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame3(){
stop();
}
function frame4(){
stop();
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (((!((myParent.banditTrigger == null))) && (!(myParent.rideElevator)))){
_local11 = _local6[_local5].floorList.indexOf(myParent.banditTrigger.floorPos);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local11 = Math.floor((Math.random() * _local8.length));
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
public function scanTarget():MovieClip{
var found:*;
var i:*;
var temp:*;
var legend:*;
found = null;
if (!rideElevator){
try {
i = 0;
while (i < myParent.banditList.length) {
temp = myParent.banditList[i];
if ((((((((((temp.floorPos == floorPos)) && (!(temp.rideElevator)))) && ((temp.pursuer.length < 3)))) && (!(temp.captured)))) && ((temp.alpha == 1)))){
if (found == null){
if (Math.abs((temp.worldX - worldX)) <= 250){
if (dirrection > 0){
if (temp.worldX > worldX){
found = temp;
};
} else {
if (temp.worldX < worldX){
found = temp;
};
};
};
} else {
if (Math.abs((temp.worldX - worldX)) <= Math.abs((found.worldX - worldX))){
if (dirrection > 0){
if (temp.worldX > worldX){
found = temp;
};
} else {
if (temp.worldX < worldX){
found = temp;
};
};
};
};
};
i = (i + 1);
};
if (found != null){
found.pursuer.push(this);
};
} catch(e:Error) {
};
};
if (found != null){
if (!hasALegend){
legend = new Legend();
legend.moodType = false;
legend.visitor = this;
legend.typeCode = "BANDIT";
myParent.legendParent.addChild(legend);
};
};
return (found);
}
function frame2(){
stop();
}
function frame1(){
nameType = "Security";
cLevel = 2;
shiftFloor = ancestor.shiftFloor;
salary = ancestor.upgradeSalary;
upgradeSalary = 800;
crewNote = ancestor.crewNote;
upgradeEffect = "Increase sight distance\nIncrease movement speed";
worldX = ancestor.worldX;
worldY = ancestor.worldY;
dx = ancestor.dx;
speedX = 3;
dirrection = ancestor.dirrection;
floorPos = ancestor.floorPos;
myParent = root;
isAction = ancestor.isAction;
elevatorChecked = ancestor.elevatorChecked;
elevatorTarget = ancestor.elevatorTarget;
elevatorFloor = ancestor.elevatorFloor;
toiletTarget = ancestor.toiletTarget;
destination = ancestor.destination;
goHome = ancestor.goHome;
homePos = ancestor.homePos;
rideElevator = ancestor.rideElevator;
waiting = ancestor.waiting;
hasALegend = ancestor.hasALegend;
banditTarget = ancestor.banditTarget;
lastTrigger = ancestor.lastTrigger;
if (this.parent != null){
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
};
delay = ancestor.delay;
backDelay = ancestor.backDelay;
}
public function Behavior(_arg1:Event):void{
var sp:*;
var des:*;
var bi:*;
var si:*;
var test:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
if (myParent.alarmTrigger){
dx = (speedX * 2);
} else {
dx = speedX;
};
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
if (myParent.alarmTrigger){
dx = (-(speedX) * 2);
} else {
dx = -(speedX);
};
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
if ((((((((banditTarget == null)) && (!(myParent.alarmTrigger)))) && ((myParent.dayTime > 8)))) && ((myParent.dayTime < 21)))){
goHome = true;
} else {
goHome = false;
};
if (banditTarget == null){
banditTarget = scanTarget();
};
if (((((((((!(isAction)) && ((elevatorTarget == null)))) && ((banditTarget == null)))) && (!(goHome)))) && ((myParent.banditTrigger == null)))){
if ((((dx == 0)) && ((elevatorTarget == null)))){
if (myParent.alarmTrigger){
dx = ((speedX * 2) * ((Math.floor((Math.random() * 2)) * 2) - 1));
} else {
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
};
delay--;
if (delay <= 0){
des = Math.floor((Math.random() * 4));
delay = 100;
if (myParent.alarmTrigger){
switch (des){
case 1:
dx = (-(speedX) * 2);
break;
case 2:
dx = (speedX * 2);
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (shiftFloor < 0){
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
};
};
};
if (((!((myParent.banditTrigger == null))) && (!(isAction)))){
if (floorPos != myParent.banditTrigger.floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if ((myParent.banditTrigger.worldX + (myParent.banditTrigger.width / 2)) < (worldX - (this.width / 2))){
dx = (-(speedX) * 2);
} else {
if ((myParent.banditTrigger.worldX - (myParent.banditTrigger.width / 2)) > (worldX + (this.width / 2))){
dx = (speedX * 2);
} else {
dx = 0;
myParent.banditTrigger.captured = true;
isAction = true;
};
};
};
};
if (((!((banditTarget == null))) && (!(isAction)))){
if (((!(banditTarget.rideElevator)) && ((banditTarget.floorPos == floorPos)))){
if (!banditTarget.captured){
if ((banditTarget.worldX + (banditTarget.width / 2)) < (worldX - (this.width / 2))){
dx = (-(speedX) * 2);
} else {
if ((banditTarget.worldX - (banditTarget.width / 2)) > (worldX + (this.width / 2))){
dx = (speedX * 2);
} else {
dx = 0;
banditTarget.captured = true;
isAction = true;
};
};
if ((((((myParent.banditList.indexOf(banditTarget) < 0)) || ((((Math.abs((banditTarget.worldX - worldX)) >= 500)) && (!(myParent.alarmTrigger)))))) || (banditTarget.rideElevator))){
bi = banditTarget.pursuer.indexOf(this);
banditTarget.pursuer.splice(bi, 1);
banditTarget = null;
};
} else {
banditTarget = null;
};
} else {
si = banditTarget.pursuer.indexOf(this);
if (si >= 0){
banditTarget.pursuer.splice(si, 1);
};
banditTarget = null;
};
};
banditCollition();
if (((((!((elevatorTarget == null))) && ((banditTarget == null)))) && (!(isAction)))){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
test = false;
if (elevatorFloor.door.currentFrame >= 9){
test = checkAllVisitor(elevatorTarget);
};
if (!test){
elevatorTarget.Visited(this);
};
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
if (myParent.alarmTrigger){
dx = (-(speedX) * 2);
} else {
dx = -(speedX);
};
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
if (myParent.alarmTrigger){
dx = (speedX * 2);
} else {
dx = speedX;
};
} else {
dx = 0;
};
};
};
};
if ((((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(myParent.alarmTrigger)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (rideElevator){
dx = 0;
};
if (((goHome) && (!(isAction)))){
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
if (isAction){
dx = 0;
if (action != null){
if (action.currentFrame >= action.totalFrames){
isAction = false;
};
};
};
this.worldX = (this.worldX + dx);
if (lastTrigger != myParent.alarmTrigger){
delay = 0;
};
lastTrigger = myParent.alarmTrigger;
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
public function checkAllVisitor(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = false;
_local3 = 0;
while (_local3 < _arg1.visitorList.length) {
_local4 = _arg1.visitorList[_local3];
if ((((_local4 is Bandit)) && ((_local4.alpha == 1)))){
_local4.worldX = (worldX + (10 * _local4.dirrection));
_local4.worldY = worldY;
_local4.floorPos = floorPos;
_local4.x = (_local4.worldX - myParent.cameraX);
_local4.y = (_local4.worldY - myParent.cameraY);
_local4.elevatorTarget = null;
_local4.elevatorChecked = null;
_local4.captured = true;
_local5 = _arg1.visitorList.indexOf(_local4);
_arg1.visitorList.splice(_local5, 1);
_arg1.elevatorTargetList.splice(_local5, 1);
this.isAction = true;
if (elevatorTarget != null){
_local6 = elevatorTarget.visitorWaiting.indexOf(this);
if (_local6 >= 0){
elevatorTarget.visitorWaiting.splice(_local6, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
};
this.elevatorTarget = null;
this.parent.addChild(_local4);
_local2 = true;
_local3--;
};
_local3++;
};
return (_local2);
}
public function banditCollition():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < myParent.banditList.length) {
_local2 = myParent.banditList[_local1];
if (((((((this.hitTestObject(_local2)) && ((_local2.alpha >= 1)))) && ((_local2.rideElevator == rideElevator)))) && (!(_local2.flying)))){
this.isAction = true;
if (_local2.worldX < worldX){
dirrection = -1;
scaleX = dirrection;
} else {
dirrection = 1;
scaleX = dirrection;
};
_local2.captured = true;
};
_local1++;
};
}
public function Animation(_arg1:Event):void{
if (isAction){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
}
}//package
Section 175
//CrewSecuritylv3 (CrewSecuritylv3)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewSecuritylv3 extends MovieClip {
public var isAction;
public var toiletTarget;
public var worldX;
public var backDelay;
public var crewNote;
public var homePos;
public var worldY;
public var elevatorTarget;
public var rideElevator;
public var action:MovieClip;
public var destination;
public var myParent;
public var dirrection;
public var nameType;
public var delay;
public var waiting;
public var floorPos;
public var shiftFloor;
public var lastTrigger;
public var elevatorFloor;
public var dx;
public var salary;
public var ancestor;
public var hasALegend;
public var elevatorChecked;
public var banditTarget;
public var cLevel;
public var speedX;
public var goHome;
public function CrewSecuritylv3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 21){
if (myParent.dayTime >= 22){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame3(){
stop();
}
public function banditCollition():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < myParent.banditList.length) {
_local2 = myParent.banditList[_local1];
if (((((((this.hitTestObject(_local2)) && ((_local2.alpha >= 1)))) && ((_local2.rideElevator == rideElevator)))) && (!(_local2.flying)))){
this.isAction = true;
if (_local2.worldX < worldX){
dirrection = -1;
scaleX = dirrection;
} else {
dirrection = 1;
scaleX = dirrection;
};
_local2.captured = true;
};
_local1++;
};
}
public function Animation(_arg1:Event):void{
if (isAction){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function scanTarget():MovieClip{
var found:*;
var i:*;
var temp:*;
var legend:*;
found = null;
if (!rideElevator){
try {
i = 0;
while (i < myParent.banditList.length) {
temp = myParent.banditList[i];
if ((((((((((temp.floorPos == floorPos)) && (!(temp.rideElevator)))) && ((temp.pursuer.length < 3)))) && (!(temp.captured)))) && ((temp.alpha == 1)))){
if (found == null){
if (Math.abs((temp.worldX - worldX)) <= 300){
if (dirrection > 0){
if (temp.worldX > worldX){
found = temp;
};
} else {
if (temp.worldX < worldX){
found = temp;
};
};
};
} else {
if (Math.abs((temp.worldX - worldX)) <= Math.abs((found.worldX - worldX))){
if (dirrection > 0){
if (temp.worldX > worldX){
found = temp;
};
} else {
if (temp.worldX < worldX){
found = temp;
};
};
};
};
};
i = (i + 1);
};
if (found != null){
found.pursuer.push(this);
};
} catch(e:Error) {
};
};
if (found != null){
if (!hasALegend){
legend = new Legend();
legend.moodType = false;
legend.visitor = this;
legend.typeCode = "BANDIT";
myParent.legendParent.addChild(legend);
};
};
return (found);
}
function frame4(){
stop();
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (((!((myParent.banditTrigger == null))) && (!(myParent.rideElevator)))){
_local11 = _local6[_local5].floorList.indexOf(myParent.banditTrigger.floorPos);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local11 = Math.floor((Math.random() * _local8.length));
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
function frame2(){
stop();
}
function frame1(){
nameType = "Security";
cLevel = 3;
shiftFloor = ancestor.shiftFloor;
salary = ancestor.upgradeSalary;
crewNote = ancestor.crewNote;
worldX = ancestor.worldX;
worldY = ancestor.worldY;
dx = ancestor.dx;
speedX = 4;
dirrection = ancestor.dirrection;
floorPos = ancestor.floorPos;
myParent = root;
isAction = ancestor.isAction;
elevatorChecked = ancestor.elevatorChecked;
elevatorTarget = ancestor.elevatorTarget;
elevatorFloor = ancestor.elevatorFloor;
toiletTarget = ancestor.toiletTarget;
destination = ancestor.destination;
goHome = ancestor.goHome;
homePos = ancestor.homePos;
rideElevator = ancestor.rideElevator;
waiting = ancestor.waiting;
hasALegend = ancestor.hasALegend;
banditTarget = ancestor.banditTarget;
lastTrigger = ancestor.lastTrigger;
if (this.parent != null){
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
};
delay = ancestor.delay;
backDelay = ancestor.backDelay;
}
public function Behavior(_arg1:Event):void{
var sp:*;
var des:*;
var bi:*;
var si:*;
var test:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
if (myParent.alarmTrigger){
dx = (speedX * 2);
} else {
dx = speedX;
};
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
if (myParent.alarmTrigger){
dx = (-(speedX) * 2);
} else {
dx = -(speedX);
};
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
if ((((((((banditTarget == null)) && (!(myParent.alarmTrigger)))) && ((myParent.dayTime > 8)))) && ((myParent.dayTime < 21)))){
goHome = true;
} else {
goHome = false;
};
if (banditTarget == null){
banditTarget = scanTarget();
};
if (((((((((!(isAction)) && ((elevatorTarget == null)))) && ((banditTarget == null)))) && (!(goHome)))) && ((myParent.banditTrigger == null)))){
if ((((dx == 0)) && ((elevatorTarget == null)))){
if (myParent.alarmTrigger){
dx = ((speedX * 2) * ((Math.floor((Math.random() * 2)) * 2) - 1));
} else {
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
};
delay--;
if (delay <= 0){
des = Math.floor((Math.random() * 4));
delay = 100;
if (myParent.alarmTrigger){
switch (des){
case 1:
dx = (-(speedX) * 2);
break;
case 2:
dx = (speedX * 2);
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (shiftFloor < 0){
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
};
};
};
if (((!((myParent.banditTrigger == null))) && (!(isAction)))){
if (floorPos != myParent.banditTrigger.floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if ((myParent.banditTrigger.worldX + (myParent.banditTrigger.width / 2)) < (worldX - (this.width / 2))){
dx = (-(speedX) * 2);
} else {
if ((myParent.banditTrigger.worldX - (myParent.banditTrigger.width / 2)) > (worldX + (this.width / 2))){
dx = (speedX * 2);
} else {
dx = 0;
myParent.banditTrigger.captured = true;
isAction = true;
};
};
};
};
if (((!((banditTarget == null))) && (!(isAction)))){
if (((!(banditTarget.rideElevator)) && ((banditTarget.floorPos == floorPos)))){
if (!banditTarget.captured){
if ((banditTarget.worldX + (banditTarget.width / 2)) < (worldX - (this.width / 2))){
dx = (-(speedX) * 2);
} else {
if ((banditTarget.worldX - (banditTarget.width / 2)) > (worldX + (this.width / 2))){
dx = (speedX * 2);
} else {
dx = 0;
banditTarget.captured = true;
isAction = true;
};
};
if ((((((myParent.banditList.indexOf(banditTarget) < 0)) || ((((Math.abs((banditTarget.worldX - worldX)) >= 500)) && (!(myParent.alarmTrigger)))))) || (banditTarget.rideElevator))){
bi = banditTarget.pursuer.indexOf(this);
banditTarget.pursuer.splice(bi, 1);
banditTarget = null;
};
} else {
banditTarget = null;
};
} else {
si = banditTarget.pursuer.indexOf(this);
if (si >= 0){
banditTarget.pursuer.splice(si, 1);
};
banditTarget = null;
};
};
banditCollition();
if (((((!((elevatorTarget == null))) && ((banditTarget == null)))) && (!(isAction)))){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
test = false;
if (elevatorFloor.door.currentFrame >= 9){
test = checkAllVisitor(elevatorTarget);
};
if (!test){
elevatorTarget.Visited(this);
};
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
if (myParent.alarmTrigger){
dx = (-(speedX) * 2);
} else {
dx = -(speedX);
};
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
if (myParent.alarmTrigger){
dx = (speedX * 2);
} else {
dx = speedX;
};
} else {
dx = 0;
};
};
};
};
if ((((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(myParent.alarmTrigger)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (rideElevator){
dx = 0;
};
if (((goHome) && (!(isAction)))){
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
if (isAction){
dx = 0;
if (action != null){
if (action.currentFrame >= action.totalFrames){
isAction = false;
};
};
};
this.worldX = (this.worldX + dx);
if (lastTrigger != myParent.alarmTrigger){
delay = 0;
};
lastTrigger = myParent.alarmTrigger;
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
public function checkAllVisitor(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = false;
_local3 = 0;
while (_local3 < _arg1.visitorList.length) {
_local4 = _arg1.visitorList[_local3];
if ((((_local4 is Bandit)) && ((_local4.alpha == 1)))){
_local4.worldX = (worldX + (10 * _local4.dirrection));
_local4.worldY = worldY;
_local4.floorPos = floorPos;
_local4.x = (_local4.worldX - myParent.cameraX);
_local4.y = (_local4.worldY - myParent.cameraY);
_local4.elevatorTarget = null;
_local4.elevatorChecked = null;
_local4.captured = true;
_local5 = _arg1.visitorList.indexOf(_local4);
_arg1.visitorList.splice(_local5, 1);
_arg1.elevatorTargetList.splice(_local5, 1);
this.isAction = true;
if (elevatorTarget != null){
_local6 = elevatorTarget.visitorWaiting.indexOf(this);
if (_local6 >= 0){
elevatorTarget.visitorWaiting.splice(_local6, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
};
this.elevatorTarget = null;
this.parent.addChild(_local4);
_local2 = true;
_local3--;
};
_local3++;
};
return (_local2);
}
}
}//package
Section 176
//CrewTechnicianlv1 (CrewTechnicianlv1)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewTechnicianlv1 extends MovieClip {
public const UPGRADE_COST = 650;
public const nextUpgrade;
public var toiletTarget;
public var upgradeSalary;
public var backDelay;
public var crewNote;
public var worldX;
public var worldY;
public var homePos;
public var isRepairing;
public var rideElevator;
public var elevatorTarget;
public var destination;
public var myParent;
public var dirrection;
public var nameType;
public var delay;
public var waiting;
public var floorPos;
public var shiftFloor;
public var repairingTime;
public var elevatorFloor;
public var dx;
public var upgradeEffect;
public var salary;
public var hasALegend;
public var elevatorChecked;
public var cLevel;
public var speedX;
public var goHome;
public function CrewTechnicianlv1(){
nextUpgrade = CrewTechnicianlv2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 8){
if (myParent.dayTime >= 9){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame2(){
stop();
}
public function minValue(_arg1:Array):Number{
var _local2:*;
var _local3:*;
_local2 = Math.floor((Math.random() * _arg1.length));
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local2] > _arg1[_local3]){
_local2 = _local3;
};
_local3++;
};
return (_local2);
}
function frame3(){
stop();
}
public function Animation(_arg1:Event):void{
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function scanTarget():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.tenantParent.numChildren) {
_local3 = myParent.tenantParent.getChildAt(_local2);
if (((((((!((_local3 is SupportElevator))) && (!((_local3 is SupportRestroom))))) && (_local3.isBroken))) && (!(_local3.isClose)))){
if (_local1 == null){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (_local3.hitTestObject(this)){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (_local3.ground == floorPos){
if (_local1.ground != floorPos){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (Math.abs((_local3.worldX - this.worldX)) < Math.abs((_local1.worldX - this.worldX))){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
};
};
};
};
};
};
_local2++;
};
if (_local1 != null){
if (_local1.worker == null){
_local1.worker = this;
} else {
if (!_local1.worker.isRepairing){
if (_local1.ground == floorPos){
if (_local1.worker.floorPos != _local1.ground){
_local1.worker.destination = null;
_local1.worker = this;
} else {
if (Math.abs((_local1.worker.worldX - _local1.worldX)) > Math.abs((worldX - _local1.worldX))){
_local1.worker.destination = null;
_local1.worker = this;
} else {
_local1 = null;
};
};
} else {
_local1 = null;
};
} else {
_local1 = null;
};
};
};
return (_local1);
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local13 = new Array(_local8.length);
_local5 = 0;
while (_local5 < _local8.length) {
_local13[_local5] = 0;
_local14 = 0;
while (_local14 < _local8[_local5].visitorWaiting.length) {
if (_local8[_local5].visitorWaiting[_local14].floorPos == this.floorPos){
var _local15 = _local13;
var _local16 = _local5;
var _local17 = (_local15[_local16] + 1);
_local15[_local16] = _local17;
};
_local14++;
};
_local5++;
};
_local11 = minValue(_local13);
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
function frame1(){
nameType = "Technician";
cLevel = 1;
salary = 450;
upgradeSalary = 550;
crewNote = "Solution for electricity problems";
upgradeEffect = "Increase repair efficiency";
dx = 0;
speedX = 2;
dirrection = 1;
myParent = root;
isRepairing = false;
elevatorChecked = null;
elevatorTarget = null;
elevatorFloor = null;
toiletTarget = null;
destination = null;
goHome = false;
hasALegend = false;
rideElevator = false;
waiting = 0;
delay = 100;
repairingTime = 0;
backDelay = 50;
if (this.parent != null){
Initialize();
};
}
public function Behavior(_arg1:Event):void{
var sp:*;
var indexFloor:*;
var legend:*;
var tFloor:*;
var des:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (isRepairing){
if (!hasALegend){
legend = new Legend();
legend.moodType = false;
legend.visitor = this;
legend.typeCode = "REPAIR";
myParent.legendParent.addChild(legend);
};
dx = 0;
if (destination != null){
if (repairingTime > 0){
repairingTime = (repairingTime - 0.5);
} else {
if (destination.isBroken){
destination.brokenLevel = 0;
destination.isBroken = false;
} else {
if (((!((destination is TenantSupermarket))) && (!(destination.isOpen)))){
destination.isOpen = true;
};
if (destination != null){
destination.FinishRepaired(this);
};
};
};
if (destination != null){
try {
myParent.tenantParent.getChildIndex(destination);
} catch(e:Error) {
destination.FinishRepaired(this);
};
};
};
};
if (myParent.dayTime < 8){
goHome = true;
} else {
goHome = false;
};
indexFloor = myParent.floorList.indexOf(floorPos);
if ((indexFloor + 1) >= myParent.floorList.length){
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
} else {
tFloor = myParent.floorList[(indexFloor + 1)];
if (this.worldX < tFloor.worldX){
dx = speedX;
};
if (this.worldX > (tFloor.worldX + tFloor.width)){
dx = -(speedX);
};
};
if (((((((!(isRepairing)) && ((elevatorTarget == null)))) && ((destination == null)))) && (!(goHome)))){
destination = scanTarget();
if ((((dx == 0)) && ((elevatorTarget == null)))){
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
delay--;
if (delay <= 0){
if (shiftFloor < 0){
des = Math.floor((Math.random() * 4));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
des = Math.floor((Math.random() * 3));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
delay = 100;
};
};
if (((!((destination == null))) && (!(goHome)))){
if (destination.isClosed){
destination.isOpen = false;
destination.worker = null;
destination = null;
};
if (!isRepairing){
if (destination.ground != floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if (worldX < (destination.worldX + destination.door.x)){
dx = speedX;
} else {
if (worldX > ((destination.worldX + destination.door.x) + destination.door.width)){
dx = -(speedX);
};
};
if (destination.door != null){
if (destination.door.hitTestObject(this)){
if (destination.Visited(this)){
dx = 0;
if (!destination.isOpen){
destination.isOpen = true;
};
destination.RepairShop(this);
if (isRepairing){
repairingTime = destination.brokenLevel;
};
};
} else {
try {
destination.pass = false;
} catch(e:Error) {
};
};
};
};
};
};
if (elevatorTarget != null){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
elevatorTarget.Visited(this);
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
dx = -(speedX);
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
dx = speedX;
} else {
dx = 0;
};
};
};
};
if ((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (rideElevator){
dx = 0;
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (((goHome) && (!(isRepairing)))){
if (destination != null){
destination.worker = null;
destination = null;
};
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
public function Initialize():void{
destination = scanTarget();
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
}
}
}//package
Section 177
//CrewTechnicianlv2 (CrewTechnicianlv2)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewTechnicianlv2 extends MovieClip {
public const UPGRADE_COST = 850;
public const nextUpgrade;
public var toiletTarget;
public var upgradeSalary;
public var backDelay;
public var crewNote;
public var worldX;
public var worldY;
public var homePos;
public var isRepairing;
public var rideElevator;
public var elevatorTarget;
public var destination;
public var myParent;
public var dirrection;
public var nameType;
public var delay;
public var waiting;
public var floorPos;
public var shiftFloor;
public var repairingTime;
public var elevatorFloor;
public var dx;
public var upgradeEffect;
public var salary;
public var ancestor:MovieClip;
public var hasALegend;
public var elevatorChecked;
public var cLevel;
public var speedX;
public var goHome;
public function CrewTechnicianlv2(){
nextUpgrade = CrewTechnicianlv3;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 8){
if (myParent.dayTime >= 9){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame2(){
stop();
}
public function minValue(_arg1:Array):Number{
var _local2:*;
var _local3:*;
_local2 = Math.floor((Math.random() * _arg1.length));
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local2] > _arg1[_local3]){
_local2 = _local3;
};
_local3++;
};
return (_local2);
}
function frame3(){
stop();
}
public function Animation(_arg1:Event):void{
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function scanTarget():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.tenantParent.numChildren) {
_local3 = myParent.tenantParent.getChildAt(_local2);
if (((((((!((_local3 is SupportElevator))) && (!((_local3 is SupportRestroom))))) && (_local3.isBroken))) && (!(_local3.isClose)))){
if (_local1 == null){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (_local3.hitTestObject(this)){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (_local3.ground == floorPos){
if (_local1.ground != floorPos){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (Math.abs((_local3.worldX - this.worldX)) < Math.abs((_local1.worldX - this.worldX))){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
};
};
};
};
};
};
_local2++;
};
if (_local1 != null){
if (_local1.worker == null){
_local1.worker = this;
} else {
if (!_local1.worker.isRepairing){
if (_local1.ground == floorPos){
if (_local1.worker.floorPos != _local1.ground){
_local1.worker.destination = null;
_local1.worker = this;
} else {
if (Math.abs((_local1.worker.worldX - _local1.worldX)) > Math.abs((worldX - _local1.worldX))){
_local1.worker.destination = null;
_local1.worker = this;
} else {
_local1 = null;
};
};
} else {
_local1 = null;
};
} else {
_local1 = null;
};
};
};
return (_local1);
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local13 = new Array(_local8.length);
_local5 = 0;
while (_local5 < _local8.length) {
_local13[_local5] = 0;
_local14 = 0;
while (_local14 < _local8[_local5].visitorWaiting.length) {
if (_local8[_local5].visitorWaiting[_local14].floorPos == this.floorPos){
var _local15 = _local13;
var _local16 = _local5;
var _local17 = (_local15[_local16] + 1);
_local15[_local16] = _local17;
};
_local14++;
};
_local5++;
};
_local11 = minValue(_local13);
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
function frame1(){
nameType = "Technician";
cLevel = 2;
shiftFloor = ancestor.shiftFloor;
salary = ancestor.upgradeSalary;
upgradeSalary = 650;
crewNote = ancestor.crewNote;
upgradeEffect = "Increase repair efficiency\nIncrease movement speed";
worldX = ancestor.worldX;
worldY = ancestor.worldY;
dx = ancestor.dx;
speedX = 2;
dirrection = ancestor.dirrection;
floorPos = ancestor.floorPos;
myParent = root;
isRepairing = ancestor.isRepairing;
elevatorChecked = ancestor.elevatorChecked;
elevatorTarget = ancestor.elevatorTarget;
elevatorFloor = ancestor.elevatorFloor;
toiletTarget = ancestor.toiletTarget;
destination = ancestor.destination;
goHome = ancestor.goHome;
hasALegend = ancestor.hasALegend;
homePos = ancestor.homePos;
rideElevator = ancestor.rideElevator;
waiting = ancestor.waiting;
delay = ancestor.delay;
repairingTime = ancestor.repairingTime;
backDelay = ancestor.backDelay;
if (this.parent != null){
Initialize();
};
}
public function Behavior(_arg1:Event):void{
var sp:*;
var indexFloor:*;
var legend:*;
var tFloor:*;
var des:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (isRepairing){
if (!hasALegend){
legend = new Legend();
legend.moodType = false;
legend.visitor = this;
legend.typeCode = "REPAIR";
myParent.legendParent.addChild(legend);
};
dx = 0;
if (destination != null){
if (repairingTime > 0){
repairingTime = (repairingTime - 1);
} else {
if (destination.isBroken){
destination.brokenLevel = 0;
destination.isBroken = false;
} else {
if (((!((destination is TenantSupermarket))) && (!(destination.isOpen)))){
destination.isOpen = true;
};
if (destination != null){
destination.FinishRepaired(this);
};
};
};
if (destination != null){
try {
myParent.tenantParent.getChildIndex(destination);
} catch(e:Error) {
destination.FinishRepaired(this);
};
};
};
};
if (myParent.dayTime < 8){
goHome = true;
} else {
goHome = false;
};
indexFloor = myParent.floorList.indexOf(floorPos);
if ((indexFloor + 1) >= myParent.floorList.length){
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
} else {
tFloor = myParent.floorList[(indexFloor + 1)];
if (this.worldX < tFloor.worldX){
dx = speedX;
};
if (this.worldX > (tFloor.worldX + tFloor.width)){
dx = -(speedX);
};
};
if (((((((!(isRepairing)) && ((elevatorTarget == null)))) && ((destination == null)))) && (!(goHome)))){
destination = scanTarget();
if ((((dx == 0)) && ((elevatorTarget == null)))){
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
delay--;
if (delay <= 0){
if (shiftFloor < 0){
des = Math.floor((Math.random() * 4));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
des = Math.floor((Math.random() * 3));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
delay = 100;
};
};
if (((!((destination == null))) && (!(goHome)))){
if (destination.isClosed){
destination.isOpen = false;
destination.worker = null;
destination = null;
};
if (!isRepairing){
if (destination.ground != floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if (worldX < (destination.worldX + destination.door.x)){
dx = speedX;
} else {
if (worldX > ((destination.worldX + destination.door.x) + destination.door.width)){
dx = -(speedX);
};
};
if (destination.door != null){
if (destination.door.hitTestObject(this)){
if (destination.Visited(this)){
dx = 0;
if (!destination.isOpen){
destination.isOpen = true;
};
destination.RepairShop(this);
if (isRepairing){
repairingTime = destination.brokenLevel;
};
};
} else {
try {
destination.pass = false;
} catch(e:Error) {
};
};
};
};
};
};
if (elevatorTarget != null){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
elevatorTarget.Visited(this);
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
dx = -(speedX);
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
dx = speedX;
} else {
dx = 0;
};
};
};
};
if ((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (rideElevator){
dx = 0;
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (((goHome) && (!(isRepairing)))){
if (destination != null){
destination.worker = null;
destination = null;
};
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
public function Initialize():void{
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
}
}
}//package
Section 178
//CrewTechnicianlv3 (CrewTechnicianlv3)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CrewTechnicianlv3 extends MovieClip {
public var toiletTarget;
public var worldX;
public var backDelay;
public var crewNote;
public var homePos;
public var worldY;
public var isRepairing;
public var elevatorTarget;
public var rideElevator;
public var destination;
public var myParent;
public var dirrection;
public var nameType;
public var delay;
public var waiting;
public var floorPos;
public var repairingTime;
public var shiftFloor;
public var elevatorFloor;
public var dx;
public var salary;
public var ancestor:MovieClip;
public var hasALegend;
public var elevatorChecked;
public var cLevel;
public var speedX;
public var goHome;
public function CrewTechnicianlv3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function BackToWork(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if (goHome){
dx = 0;
backDelay--;
if (backDelay <= 0){
backDelay = 50;
if (myParent.dayTime >= 8){
if (myParent.dayTime >= 9){
goHome = false;
} else {
_local3 = (Math.random() * 100);
if (_local3 < 60){
goHome = false;
};
};
};
};
} else {
if (worldX < myParent.mallLeft){
dx = speedX;
};
if (worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
worldX = (worldX + dx);
};
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
_local2 = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, BackToWork);
addEventListener(Event.ENTER_FRAME, Behavior);
};
_local2++;
};
}
function frame2(){
stop();
}
public function minValue(_arg1:Array):Number{
var _local2:*;
var _local3:*;
_local2 = Math.floor((Math.random() * _arg1.length));
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local2] > _arg1[_local3]){
_local2 = _local3;
};
_local3++;
};
return (_local2);
}
function frame3(){
stop();
}
public function Animation(_arg1:Event):void{
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function scanTarget():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.tenantParent.numChildren) {
_local3 = myParent.tenantParent.getChildAt(_local2);
if (((((((!((_local3 is SupportElevator))) && (!((_local3 is SupportRestroom))))) && (_local3.isBroken))) && (!(_local3.isClose)))){
if (_local1 == null){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (_local3.hitTestObject(this)){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (_local3.ground == floorPos){
if (_local1.ground != floorPos){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
} else {
if (Math.abs((_local3.worldX - this.worldX)) < Math.abs((_local1.worldX - this.worldX))){
if ((((shiftFloor < 0)) || ((myParent.floorList[shiftFloor] == _local3.ground)))){
_local1 = _local3;
};
};
};
};
};
};
};
_local2++;
};
if (_local1 != null){
if (_local1.worker == null){
_local1.worker = this;
} else {
if (!_local1.worker.isRepairing){
if (_local1.ground == floorPos){
if (_local1.worker.floorPos != _local1.ground){
_local1.worker.destination = null;
_local1.worker = this;
} else {
if (Math.abs((_local1.worker.worldX - _local1.worldX)) > Math.abs((worldX - _local1.worldX))){
_local1.worker.destination = null;
_local1.worker = this;
} else {
_local1 = null;
};
};
} else {
_local1 = null;
};
} else {
_local1 = null;
};
};
};
return (_local1);
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local13 = new Array(_local8.length);
_local5 = 0;
while (_local5 < _local8.length) {
_local13[_local5] = 0;
_local14 = 0;
while (_local14 < _local8[_local5].visitorWaiting.length) {
if (_local8[_local5].visitorWaiting[_local14].floorPos == this.floorPos){
var _local15 = _local13;
var _local16 = _local5;
var _local17 = (_local15[_local16] + 1);
_local15[_local16] = _local17;
};
_local14++;
};
_local5++;
};
_local11 = minValue(_local13);
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
function frame1(){
nameType = "Technician";
cLevel = 3;
shiftFloor = ancestor.shiftFloor;
salary = ancestor.upgradeSalary;
crewNote = ancestor.crewNote;
worldX = ancestor.worldX;
worldY = ancestor.worldY;
dx = ancestor.dx;
speedX = 3;
dirrection = ancestor.dirrection;
floorPos = ancestor.floorPos;
myParent = root;
isRepairing = ancestor.isRepairing;
elevatorChecked = ancestor.elevatorChecked;
elevatorTarget = ancestor.elevatorTarget;
elevatorFloor = ancestor.elevatorFloor;
toiletTarget = ancestor.toiletTarget;
destination = ancestor.destination;
goHome = ancestor.goHome;
hasALegend = ancestor.hasALegend;
homePos = ancestor.homePos;
rideElevator = ancestor.rideElevator;
waiting = ancestor.waiting;
delay = ancestor.delay;
repairingTime = ancestor.repairingTime;
backDelay = ancestor.backDelay;
if (this.parent != null){
Initialize();
};
}
public function Behavior(_arg1:Event):void{
var sp:*;
var indexFloor:*;
var legend:*;
var tFloor:*;
var des:*;
var ci:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (isRepairing){
if (!hasALegend){
legend = new Legend();
legend.moodType = false;
legend.visitor = this;
legend.typeCode = "REPAIR";
myParent.legendParent.addChild(legend);
};
dx = 0;
if (destination != null){
if (repairingTime > 0){
repairingTime = (repairingTime - 1);
} else {
if (destination.isBroken){
destination.brokenLevel = 0;
destination.isBroken = false;
} else {
if (((!((destination is TenantSupermarket))) && (!(destination.isOpen)))){
destination.isOpen = true;
};
if (destination != null){
destination.FinishRepaired(this);
};
};
};
if (destination != null){
try {
myParent.tenantParent.getChildIndex(destination);
} catch(e:Error) {
destination.FinishRepaired(this);
};
};
};
};
if (myParent.dayTime < 8){
goHome = true;
} else {
goHome = false;
};
indexFloor = myParent.floorList.indexOf(floorPos);
if ((indexFloor + 1) >= myParent.floorList.length){
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
} else {
tFloor = myParent.floorList[(indexFloor + 1)];
if (this.worldX < tFloor.worldX){
dx = speedX;
};
if (this.worldX > (tFloor.worldX + tFloor.width)){
dx = -(speedX);
};
};
if (((((((!(isRepairing)) && ((elevatorTarget == null)))) && ((destination == null)))) && (!(goHome)))){
destination = scanTarget();
if ((((dx == 0)) && ((elevatorTarget == null)))){
dx = (speedX * ((Math.floor((Math.random() * 2)) * 2) - 1));
};
delay--;
if (delay <= 0){
if (shiftFloor < 0){
des = Math.floor((Math.random() * 4));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = -(dx);
};
} else {
if (floorPos != myParent.floorList[shiftFloor]){
elevatorTarget = getElevator();
} else {
des = Math.floor((Math.random() * 3));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
default:
dx = -(dx);
};
};
};
delay = 100;
};
};
if (((!((destination == null))) && (!(goHome)))){
if (destination.isClosed){
destination.isOpen = false;
destination.worker = null;
destination = null;
};
if (!isRepairing){
if (destination.ground != floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if (worldX < (destination.worldX + destination.door.x)){
dx = speedX;
} else {
if (worldX > ((destination.worldX + destination.door.x) + destination.door.width)){
dx = -(speedX);
};
};
if (destination.door != null){
if (destination.door.hitTestObject(this)){
if (destination.Visited(this)){
dx = 0;
if (!destination.isOpen){
destination.isOpen = true;
};
destination.RepairShop(this);
if (isRepairing){
repairingTime = destination.brokenLevel;
};
};
} else {
try {
destination.pass = false;
} catch(e:Error) {
};
};
};
};
};
};
if (elevatorTarget != null){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
elevatorTarget.Visited(this);
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
dx = -(speedX);
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
dx = speedX;
} else {
dx = 0;
};
};
};
};
if ((((((((shiftFloor >= 0)) && ((floorPos == myParent.floorList[shiftFloor])))) && (!(rideElevator)))) && (!(goHome)))){
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if (elevatorTarget != null){
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
};
if (rideElevator){
dx = 0;
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (((goHome) && (!(isRepairing)))){
if (destination != null){
destination.worker = null;
destination = null;
};
if (floorPos == myParent.ground){
if (elevatorTarget != null){
elevatorFloor = null;
ci = elevatorTarget.visitorWaiting.indexOf(this);
if (ci >= 0){
elevatorTarget.visitorWaiting.splice(ci, 1);
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 16))) && ((homePos > 0)))){
dx = speedX;
} else {
if ((((worldX > (homePos - 16))) && ((homePos <= 0)))){
dx = -(speedX);
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -15)) || ((this.worldX > (myParent.MAX_WIDTH + 15))))){
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, BackToWork);
};
sp = (sp + 1);
};
}
public function Initialize():void{
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
}
}
}//package
Section 179
//ElevatorBody (ElevatorBody)
package {
import flash.display.*;
public dynamic class ElevatorBody extends MovieClip {
public var door:MovieClip;
}
}//package
Section 180
//ElevatorExpand (ElevatorExpand)
package {
import flash.display.*;
public dynamic class ElevatorExpand extends MovieClip {
}
}//package
Section 181
//ElevatorMain (ElevatorMain)
package {
import flash.display.*;
public dynamic class ElevatorMain extends MovieClip {
}
}//package
Section 182
//ElevatorUpgrade (ElevatorUpgrade)
package {
import flash.display.*;
public dynamic class ElevatorUpgrade extends MovieClip {
public var door:MovieClip;
}
}//package
Section 183
//ExpandElevatorSymbol (ExpandElevatorSymbol)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public dynamic class ExpandElevatorSymbol extends MovieClip {
public var body:ElevatorMain;
public var canBuild;
public function ExpandElevatorSymbol(){
addFrameScript(0, frame1);
}
public function clean(_arg1:Event):void{
removeEventListener(Event.REMOVED, clean);
removeEventListener(Event.ENTER_FRAME, animate);
}
function frame1(){
addEventListener(Event.REMOVED, clean);
addEventListener(Event.ENTER_FRAME, animate);
}
public function animate(_arg1:Event):void{
if (canBuild){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 0.3, 0, 0, 0, 0);
} else {
this.transform.colorTransform = new ColorTransform(1, 0, 0, 0.3, 0, 0, 0, 0);
};
}
}
}//package
Section 184
//ExpandElevatorUpgraded (ExpandElevatorUpgraded)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public dynamic class ExpandElevatorUpgraded extends MovieClip {
public var body:MovieClip;
public var canBuild;
public function ExpandElevatorUpgraded(){
addFrameScript(0, frame1);
}
public function clean(_arg1:Event):void{
removeEventListener(Event.REMOVED, clean);
removeEventListener(Event.ENTER_FRAME, animate);
}
function frame1(){
addEventListener(Event.REMOVED, clean);
addEventListener(Event.ENTER_FRAME, animate);
}
public function animate(_arg1:Event):void{
if (canBuild){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 0.3, 0, 0, 0, 0);
} else {
this.transform.colorTransform = new ColorTransform(1, 0, 0, 0.3, 0, 0, 0, 0);
};
}
}
}//package
Section 185
//ExplosionSmall (ExplosionSmall)
package {
import flash.display.*;
public dynamic class ExplosionSmall extends MovieClip {
}
}//package
Section 186
//Floor (Floor)
package {
import flash.display.*;
public dynamic class Floor extends MovieClip {
public var worldX:Number;
public var worldY:Number;
public var toiletList;
public var center:MovieClip;
public var tenantList;
public var rightSide:MovieClip;
public function Floor(){
addFrameScript(0, frame1);
}
function frame1(){
tenantList = new Array();
toiletList = new Array();
}
}
}//package
Section 187
//FlyingBandit (FlyingBandit)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class FlyingBandit extends MovieClip {
public var rideElevator;
public var pursue;
public var destination;
public var elevatorTarget;
public var stolenProfit;
public var landingMode;
public var waiting;
public var flight:MovieClip;
public var dirrection;
public var flyingPreparation;
public var dx;
public var flying;
public var floorPos;
public var catcher;
public var elevatorChecked;
public var tryToEnter;
public var arrested:MovieClip;
public var speedX;
public var homePos;
public var worldX;
public var worldY;
public var pursuer;
public var arrestDelay;
public var swapingDelay;
public var myParent;
public var isStealing;
public var hiding;
public var delay;
public var blinkDelay;
public var lastDestination;
public var stealingTime;
public var stealingRate;
public var elevatorFloor;
public var tryToFlying;
public var runDelay;
public var firstCome;
public var captured;
public var securityDetected;
public var goHome;
public var stealSomething;
public var openLockDelay;
public var initialBlinkDelay;
public var toiletTarget;
public function FlyingBandit(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame4(){
stop();
}
public function checkSecurity(_arg1:MovieClip):MovieClip{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
_local3 = null;
while ((((_local2 < _arg1.visitorList.length)) && ((_local3 == null)))) {
_local4 = _arg1.visitorList[_local2];
if ((((((_local4 is CrewSecuritylv1)) || ((_local4 is CrewSecuritylv2)))) || ((_local4 is CrewSecuritylv3)))){
_local3 = _local4;
};
_local2++;
};
if (_local3 != null){
captured = true;
};
return (_local3);
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local11 = Math.floor((Math.random() * _local8.length));
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
public function scanTarget(_arg1=null):MovieClip{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = new Array();
if (_arg1 == null){
_local5 = 0;
while (_local5 < myParent.tenantParent.numChildren) {
_local6 = myParent.tenantParent.getChildAt(_local5);
if (((((!((((((_local6 is SupportElevator)) || ((_local6 is SupportRestroom)))) || ((_local6 is TenantHall))))) && (_local6.isClose))) && ((lastDestination.indexOf(_local6) < 0)))){
_local2.push(_local6);
};
_local5++;
};
} else {
_local5 = 0;
while (_local5 < _arg1.tenantList.length) {
_local6 = _arg1.tenantList[_local5];
if (((((!((_local6 is TenantHall))) && (_local6.isClose))) && ((lastDestination.indexOf(_local6) < 0)))){
_local2.push(_local6);
};
_local5++;
};
};
_local3 = Math.floor((Math.random() * _local2.length));
_local4 = _local2[_local3];
return (_local4);
}
function frame5(){
stop();
}
function frame1(){
dx = 0;
speedX = 3;
stealSomething = false;
hiding = 0;
myParent = root;
isStealing = false;
elevatorChecked = null;
securityDetected = new Array();
pursuer = new Array();
captured = false;
goHome = false;
catcher = null;
rideElevator = false;
waiting = 0;
flying = (floorPos is Floor);
tryToFlying = false;
flyingPreparation = 0;
stolenProfit = 0;
addEventListener(Event.ENTER_FRAME, Animation);
delay = 100;
openLockDelay = 0;
tryToEnter = false;
stealingTime = 0;
stealingRate = 0;
firstCome = true;
lastDestination = new Array();
addEventListener(Event.ENTER_FRAME, Behavior);
runDelay = 0;
swapingDelay = 0;
}
function frame2(){
stop();
}
public function Behavior(_arg1:Event):void{
var sp:*;
var rate:*;
var rAlrmTrigger:*;
var profit:*;
var tipsText:*;
var temp:*;
var glowFilter:*;
var rnd:*;
var stealArea:*;
var test:*;
var dis:*;
var bi:*;
var vi:*;
var bonusProfit:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (((stealSomething) && (!(pursue)))){
if (hiding > 0){
hiding--;
} else {
stealSomething = false;
};
};
if (!captured){
scanSecurity();
runAwayFromSecurity();
if ((floorPos is Floor)){
if (this.worldX <= floorPos.worldX){
if (!flying){
this.worldX = floorPos.worldX;
if (flyingPreparation > 0){
tryToFlying = true;
flyingPreparation--;
} else {
if (tryToFlying){
goHome = true;
tryToFlying = false;
flying = true;
};
};
};
} else {
if (this.worldX < (floorPos.worldX + floorPos.width)){
if (flying){
flyingPreparation = 96;
flying = false;
};
};
};
if (this.worldX >= (floorPos.worldX + floorPos.width)){
if (!flying){
this.worldX = (floorPos.worldX + floorPos.width);
if (flyingPreparation > 0){
goHome = true;
tryToFlying = true;
flyingPreparation--;
} else {
if (tryToFlying){
tryToFlying = false;
flying = true;
};
};
};
} else {
if (this.worldX > floorPos.worldX){
if (flying){
flyingPreparation = 96;
flying = false;
};
};
};
};
if (isStealing){
dx = 0;
if (destination != null){
if ((((stealingTime > 0)) && (!(myParent.alarmTrigger)))){
stealingTime--;
stealingRate--;
if (stealingRate <= 0){
stealingRate = 20;
rate = ((Math.random() * 10) - 5);
if (rate > 0){
rAlrmTrigger = (Math.random() * 100);
if (rAlrmTrigger < (destination.tLevel * 30)){
myParent.banditTrigger = this;
myParent.robedBooth = destination;
myParent.alarmTrigger = true;
};
};
if (!myParent.alarmTrigger){
profit = ((Math.floor((Math.random() * 30)) + 15) * 10);
stolenProfit = (stolenProfit + profit);
myParent.otherOutcome = (myParent.otherOutcome + profit);
};
stealingTime = (stealingTime + rate);
stealSomething = true;
hiding = 72;
};
} else {
if (!destination.isOpen){
destination.isOpen = true;
};
if (lastDestination.indexOf(destination) < 0){
lastDestination.push(destination);
};
destination.finishStealing(this);
if (!isStealing){
myParent.addCashUpdate(stolenProfit, worldX, (worldY - height), false);
if (!myParent.firstBanditStealing){
if (myParent.menuParent.numChildren > 0){
try {
temp = myParent.menuParent.getChildAt(0);
temp.closeMenu();
} catch(e:Error) {
};
};
myParent.cameraX = (worldX - (myParent.CAMERA_WIDTH / 2));
myParent.cameraY = ((worldY - myParent.CAMERA_HEIGHT) + 120);
tipsText = "If there is a flashing red color on your booths it means there is theft. Try to add more security on your mall, it will prevent theft.";
myParent.addTips(("Tips:\n" + tipsText));
if (myParent.tipsHistory.indexOf(tipsText) < 0){
myParent.tipsHistory.unshift(tipsText);
myParent.userinterface.tipsHistory.updateText(myParent.tipsHistory);
if (!myParent.userinterface.tipsHistory.visible){
glowFilter = new GlowFilter(0xFF8800);
myParent.userinterface.btnMailBox.filters = [glowFilter];
if (myParent.userinterface.currentLabel == "reveal"){
myParent.userinterface.tipsHistory.checkHeight();
};
};
};
myParent.firstBanditStealing = true;
};
};
};
if (destination != null){
try {
myParent.tenantParent.getChildIndex(destination);
} catch(e:Error) {
destination.finishStealing(this);
};
};
};
};
if ((((myParent.dayTime >= 5)) && ((myParent.dayTime < 22)))){
if (!flying){
goHome = true;
};
if (isStealing){
destination.finishStealing(this);
};
};
if (((!(goHome)) && (!(myParent.alarmTrigger)))){
if ((((((destination == null)) || ((destination is SupportElevator)))) || ((destination is SupportRestroom)))){
if (firstCome){
destination = scanTarget(floorPos);
firstCome = false;
} else {
rnd = (Math.random() * 100);
if (rnd < 50){
destination = scanTarget();
if (destination == null){
goHome = true;
};
} else {
goHome = true;
};
};
} else {
if (destination.ground != floorPos){
if (!pursue){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
} else {
if (!pursue){
if (!isStealing){
if (destination.enterance != null){
stealArea = destination.enterance;
} else {
stealArea = destination.door;
};
if (worldX < (destination.worldX + stealArea.x)){
dx = speedX;
} else {
if (worldX > ((destination.worldX + stealArea.x) + stealArea.width)){
dx = -(speedX);
} else {
if (stealArea.hitTestObject(this)){
if (destination.Visited(this)){
dx = 0;
if (!tryToEnter){
openLockDelay = 50;
tryToEnter = true;
stealingTime = 100;
stealingRate = 20;
} else {
if (openLockDelay > 0){
openLockDelay--;
} else {
if (!destination.isOpen){
destination.isOpen = true;
};
};
};
destination.stolen(this);
};
};
};
};
};
};
};
};
};
if (((((!((elevatorTarget == null))) && (!(pursue)))) && (!(captured)))){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
test = null;
if ((((elevatorFloor.door.currentFrame < 10)) && (((elevatorFloor.door.currentFrame + myParent.gameSpeed) >= 10)))){
test = checkSecurity(elevatorTarget);
if (test != null){
catcher = test;
};
};
if (test == null){
elevatorTarget.Visited(this);
};
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
if (!myParent.alarmTrigger){
dx = -(speedX);
} else {
dx = -(((speedX * 2) - 1));
};
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
if (!myParent.alarmTrigger){
dx = speedX;
} else {
dx = ((speedX * 2) - 1);
};
} else {
dx = 0;
};
};
};
};
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
if (floorPos != null){
if (!(floorPos is Floor)){
this.worldY = (floorPos.worldY - floorPos.height);
} else {
if (!flying){
this.worldY = floorPos.worldY;
} else {
dis = 0;
if (this.worldX < floorPos.worldX){
dis = (floorPos.worldX - this.worldX);
if ((((dis < 30)) && ((dirrection == 1)))){
landingMode = true;
} else {
landingMode = false;
};
} else {
if (this.worldX > (floorPos.worldX + floorPos.width)){
dis = (this.worldX - (floorPos.worldX + floorPos.width));
if ((((dis < 30)) && ((dirrection == -1)))){
landingMode = true;
} else {
landingMode = false;
};
};
};
this.worldY = (floorPos.worldY - (dis / 5));
};
};
};
if (((((((goHome) || (myParent.alarmTrigger))) && (!(isStealing)))) && (!(pursue)))){
if (destination != null){
destination = null;
};
if (((!((elevatorTarget == null))) && (!(rideElevator)))){
elevatorFloor = null;
vi = elevatorTarget.visitorWaiting.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorWaiting.splice(vi, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 11))) && ((homePos > 0)))){
if (!myParent.alarmTrigger){
dx = speedX;
} else {
if (flying){
dx = speedX;
} else {
dx = ((speedX * 2) - 1);
};
};
} else {
if ((((worldX > (homePos - 11))) && ((homePos <= 0)))){
if (!myParent.alarmTrigger){
dx = -(speedX);
} else {
if (flying){
dx = -(speedX);
} else {
dx = -(((speedX * 2) - 1));
};
};
};
};
};
if (((rideElevator) || (tryToFlying))){
dx = 0;
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -10)) || ((this.worldX > (myParent.MAX_WIDTH + 10))))){
bi = myParent.banditList.indexOf(this);
myParent.banditList.splice(bi, 1);
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Behavior);
this.parent.removeChild(this);
break;
};
} else {
dx = 0;
flying = false;
if (elevatorTarget != null){
vi = elevatorTarget.visitorList.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorList.splice(vi, 1);
elevatorTarget.elevatorTargetList.splice(vi, 1);
myParent.visitorParent.addChild(this);
};
vi = elevatorTarget.visitorWaiting.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorWaiting.splice(vi, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
if (catcher != null){
if (!catcher.isAction){
catcher.isAction = true;
catcher = null;
};
};
if (arrested != null){
if (arrested.currentLabel == "Arrest Label"){
sp = myParent.gameSpeed;
arrestDelay = 60;
initialBlinkDelay = 7;
blinkDelay = 7;
bi = myParent.banditList.indexOf(this);
myParent.banditList.splice(bi, 1);
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
bonusProfit = Math.round((stolenProfit / 5));
if (bonusProfit < 100){
bonusProfit = 100;
};
myParent.otherOutcome = (myParent.otherOutcome - stolenProfit);
if (myParent.otherOutcome < 0){
myParent.otherIncome = (myParent.otherIncome + Math.abs(myParent.otherOutcome));
myParent.otherOutcome = 0;
};
myParent.otherIncome = (myParent.otherIncome + bonusProfit);
myParent.addCashUpdate(stolenProfit, this.worldX, this.worldY, true, bonusProfit);
myParent.banditCaptured++;
stolenProfit = 0;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, Arrested);
break;
} else {
this.alpha = 1;
};
};
};
sp = (sp + 1);
};
}
public function scanSecurity():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.crewList.length) {
_local3 = myParent.crewList[_local2];
if ((((((_local3 is CrewSecuritylv1)) || ((_local3 is CrewSecuritylv2)))) || ((_local3 is CrewSecuritylv3)))){
_local4 = securityDetected.indexOf(_local3);
if (_local3.floorPos == floorPos){
if (_local4 < 0){
if (Math.abs((_local3.worldX - worldX)) <= 200){
if (dirrection == 1){
if (_local3.worldX > worldX){
_local1 = _local3;
};
} else {
if (_local3.worldX < worldX){
_local1 = _local3;
};
};
securityDetected.push(_local1);
};
};
} else {
if (_local4 >= 0){
securityDetected.splice(_local4, 1);
};
};
};
_local2++;
};
}
public function Arrested(_arg1:Event):void{
arrestDelay--;
if (arrestDelay < 28){
blinkDelay--;
if (blinkDelay <= 0){
initialBlinkDelay--;
blinkDelay = initialBlinkDelay;
if (this.alpha == 1){
this.alpha = 0;
} else {
this.alpha = 1;
};
};
};
if (arrestDelay <= 0){
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Arrested);
this.parent.removeChild(this);
};
}
public function Animation(_arg1:Event):void{
if (!isStealing){
if (((((((((!(stealSomething)) && (!(myParent.alarmTrigger)))) && (!(captured)))) && (!(rideElevator)))) && (!(pursue)))){
if (this.alpha > 0.6){
this.alpha = (this.alpha - 0.1);
};
} else {
if (!captured){
this.alpha = 1;
};
};
};
if (captured){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (!flying){
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
} else {
if (this.currentLabel != "flying"){
gotoAndPlay("flying");
};
if (flight != null){
if (landingMode){
this.flight.gotoAndStop("landing");
} else {
this.flight.gotoAndStop("flying");
};
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function runAwayFromSecurity():void{
var _local1:*;
var _local2:*;
if (!tryToFlying){
pursue = (((pursuer.length > 0)) && ((securityDetected.indexOf(pursuer[0]) >= 0)));
if (pursue){
if (elevatorTarget != null){
_local2 = elevatorTarget.visitorWaiting.indexOf(this);
if (_local2 >= 0){
elevatorTarget.visitorWaiting.splice(_local2, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
_local1 = pursuer[0];
if (flying){
if (_local1.worldX > worldX){
dx = -(speedX);
} else {
if (_local1.worldX < worldX){
dx = speedX;
};
};
} else {
if (_local1.worldX > worldX){
dx = -(((speedX * 2) - 1));
} else {
if (_local1.worldX < worldX){
dx = ((speedX * 2) - 1);
};
};
};
};
};
if (swapingDelay > 0){
swapingDelay--;
} else {
if (pursuer.length > 0){
_local1 = pursuer.shift();
pursuer.push(_local1);
};
swapingDelay = 5;
};
}
}
}//package
Section 188
//fx_smoke (fx_smoke)
package {
import flash.display.*;
public dynamic class fx_smoke extends MovieClip {
public var worldX;
public var worldY;
public function fx_smoke(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
}
function frame8(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 189
//fx_trash (fx_trash)
package {
import flash.events.*;
import flash.display.*;
public dynamic class fx_trash extends MovieClip {
public var worldX;
public var worldY;
public var trashLevel;
public var ground;
public var bundle;
public var worker;
public function fx_trash(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
addEventListener(Event.ENTER_FRAME, UpdateTrash);
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
public function UpdateTrash(_arg1:Event):void{
if (trashLevel > 80){
if (currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (trashLevel > 40){
if (currentFrame != 3){
gotoAndPlay(3);
};
} else {
if (currentFrame != 2){
gotoAndPlay(2);
};
};
};
bundle = (trashLevel >= 10);
}
}
}//package
Section 190
//fx_upgrade_crew (fx_upgrade_crew)
package {
import flash.display.*;
public dynamic class fx_upgrade_crew extends MovieClip {
public function fx_upgrade_crew(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 191
//fx_upgrade_large (fx_upgrade_large)
package {
import flash.display.*;
public dynamic class fx_upgrade_large extends MovieClip {
public function fx_upgrade_large(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 192
//fx_upgrade_medium (fx_upgrade_medium)
package {
import flash.display.*;
public dynamic class fx_upgrade_medium extends MovieClip {
public function fx_upgrade_medium(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
parent.removeChild(this);
}
}
}//package
Section 193
//fx_upgrade_small (fx_upgrade_small)
package {
import flash.display.*;
public dynamic class fx_upgrade_small extends MovieClip {
public function fx_upgrade_small(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 194
//GameOverScreen (GameOverScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class GameOverScreen extends MovieClip {
public function GameOverScreen(){
addFrameScript(0, frame1, 48, frame49, 59, frame60);
}
function frame1(){
stage.addEventListener(KeyboardEvent.KEY_UP, SkipAnimation);
stage.addEventListener(MouseEvent.CLICK, SkipAnimation);
}
public function SkipAnimation(_arg1:Event):void{
gotoAndPlay("startBlink");
}
function frame49(){
stage.removeEventListener(KeyboardEvent.KEY_UP, SkipAnimation);
stage.removeEventListener(MouseEvent.CLICK, SkipAnimation);
stage.addEventListener(KeyboardEvent.KEY_UP, BackToMainMenu);
stage.addEventListener(MouseEvent.CLICK, BackToMainMenu);
}
public function BackToMainMenu(_arg1:Event):void{
var _local2:*;
_local2 = root;
stage.removeEventListener(KeyboardEvent.KEY_UP, BackToMainMenu);
stage.removeEventListener(MouseEvent.CLICK, BackToMainMenu);
this.parent.removeChild(this);
_local2.BackToMainMenu();
}
function frame60(){
gotoAndPlay("blink");
}
}
}//package
Section 195
//HelpExpandElevator (HelpExpandElevator)
package {
import flash.display.*;
public dynamic class HelpExpandElevator extends MovieClip {
}
}//package
Section 196
//HireCleaningService (HireCleaningService)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class HireCleaningService extends MovieClip {
public var price;
public var stat;
public var myParent;
public var body:MovieClip;
public function HireCleaningService(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.EMPLOYEE_PRICE[0];
}
}
}//package
Section 197
//HireSecurity (HireSecurity)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class HireSecurity extends MovieClip {
public var price;
public var stat;
public var myParent;
public var body:MovieClip;
public function HireSecurity(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.EMPLOYEE_PRICE[2];
}
}
}//package
Section 198
//HireTechnician (HireTechnician)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class HireTechnician extends MovieClip {
public var price;
public var stat;
public var myParent;
public var body:MovieClip;
public function HireTechnician(){
addFrameScript(0, frame1);
}
function frame1(){
myParent = root;
price = myParent.EMPLOYEE_PRICE[1];
}
}
}//package
Section 199
//LandmarkNewYork (LandmarkNewYork)
package {
import flash.display.*;
public dynamic class LandmarkNewYork extends MovieClip {
}
}//package
Section 200
//LandmarkParis (LandmarkParis)
package {
import flash.display.*;
public dynamic class LandmarkParis extends MovieClip {
}
}//package
Section 201
//Legend (Legend)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Legend extends MovieClip {
public const ShopList:Array;
public var worldX;
public var worldY;
public var newIcon;
public var typeCode;
public var visitor;
public var myParent;
public var tnt;
public var iconPosition:MovieClip;
public var moodType;
public function Legend(){
ShopList = ["btnDrugStore", "btnBabyShop", "btnBookStore", "btnBoutiqueA", "btnBoutiqueB", "btnToyStore", "btnBarberShop", "btnJewelry", "btnSupermarket", "btnCinema", "btnGameCenter"];
super();
addFrameScript(0, frame1, 29, frame30);
}
public function ChangePosition(_arg1:Event):void{
if (visitor != null){
worldX = visitor.worldX;
worldY = (visitor.worldY - visitor.height);
};
}
function frame1(){
myParent = root;
if (moodType){
if (visitor.mood > 75){
newIcon = new legendmoodhappy();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
if (visitor.mood > 50){
newIcon = new legendmoodnormal();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
if (visitor.mood > 25){
newIcon = new legendmoodupset();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
newIcon = new legendelectricityproblem();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
};
};
};
} else {
if (typeCode == "ELECTRICITY"){
newIcon = new legendelectricityproblem();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
if (typeCode == "TENANT"){
tnt = myParent.userinterface.btnArr[visitor.interest];
if (ShopList.indexOf(tnt) >= 0){
newIcon = new legendneedmoreshop();
} else {
newIcon = new legendhungry();
};
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
if (typeCode == "TOILET"){
newIcon = new legendneedmoretoilet();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
if (typeCode == "DIRTY"){
newIcon = new legenddirty();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
if (typeCode == "ELEVATOR"){
newIcon = new legendneedmoreelevator();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
if (typeCode == "REPAIR"){
newIcon = new legendunderconstruction();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
} else {
if (typeCode == "BANDIT"){
newIcon = new legendstolen();
newIcon.x = iconPosition.x;
newIcon.y = iconPosition.y;
addChild(newIcon);
};
};
};
};
};
};
};
};
try {
visitor.hasALegend = true;
} catch(e:Error) {
};
addEventListener(Event.ENTER_FRAME, ChangePosition);
}
function frame30(){
stop();
try {
visitor.hasALegend = false;
} catch(e:Error) {
};
removeEventListener(Event.ENTER_FRAME, ChangePosition);
this.parent.removeChild(this);
}
}
}//package
Section 202
//legenddirty (legenddirty)
package {
import flash.display.*;
public dynamic class legenddirty extends MovieClip {
}
}//package
Section 203
//legendelectricityproblem (legendelectricityproblem)
package {
import flash.display.*;
public dynamic class legendelectricityproblem extends MovieClip {
}
}//package
Section 204
//legendhungry (legendhungry)
package {
import flash.display.*;
public dynamic class legendhungry extends MovieClip {
}
}//package
Section 205
//legendmoodhappy (legendmoodhappy)
package {
import flash.display.*;
public dynamic class legendmoodhappy extends MovieClip {
}
}//package
Section 206
//legendmoodnormal (legendmoodnormal)
package {
import flash.display.*;
public dynamic class legendmoodnormal extends MovieClip {
}
}//package
Section 207
//legendmoodupset (legendmoodupset)
package {
import flash.display.*;
public dynamic class legendmoodupset extends MovieClip {
}
}//package
Section 208
//legendmoodveryupset (legendmoodveryupset)
package {
import flash.display.*;
public dynamic class legendmoodveryupset extends MovieClip {
}
}//package
Section 209
//legendneedmoreelevator (legendneedmoreelevator)
package {
import flash.display.*;
public dynamic class legendneedmoreelevator extends MovieClip {
}
}//package
Section 210
//legendneedmoreshop (legendneedmoreshop)
package {
import flash.display.*;
public dynamic class legendneedmoreshop extends MovieClip {
}
}//package
Section 211
//legendneedmoretoilet (legendneedmoretoilet)
package {
import flash.display.*;
public dynamic class legendneedmoretoilet extends MovieClip {
}
}//package
Section 212
//legendstolen (legendstolen)
package {
import flash.display.*;
public dynamic class legendstolen extends MovieClip {
}
}//package
Section 213
//legendunderconstruction (legendunderconstruction)
package {
import flash.display.*;
public dynamic class legendunderconstruction extends MovieClip {
}
}//package
Section 214
//LegendWideBox (LegendWideBox)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LegendWideBox extends MovieClip {
public var alignment;
public var legendOpen:MovieClip;
public var legendClose:MovieClip;
public var commentText;
public var legendExtension:MovieClip;
public var legendText:TextField;
public function LegendWideBox(){
addFrameScript(0, frame1);
}
function frame1(){
if (alignment == "Left"){
legendText.autoSize = TextFieldAutoSize.LEFT;
} else {
if (alignment == "Center"){
legendText.autoSize = TextFieldAutoSize.CENTER;
} else {
if (alignment == "Right"){
legendText.autoSize = TextFieldAutoSize.RIGHT;
} else {
legendText.autoSize = TextFieldAutoSize.CENTER;
};
};
};
legendText.text = commentText;
if (legendText.autoSize == TextFieldAutoSize.LEFT){
legendExtension.width = legendText.width;
legendExtension.x = 0;
legendOpen.x = -(legendOpen.width);
legendClose.x = legendExtension.width;
} else {
legendExtension.width = legendText.width;
legendExtension.x = legendText.x;
legendOpen.x = (legendExtension.x - legendOpen.width);
legendClose.x = (legendExtension.x + legendExtension.width);
};
}
}
}//package
Section 215
//MenuAccPeople (MenuAccPeople)
package {
import flash.display.*;
public dynamic class MenuAccPeople extends MovieClip {
public var enterMall:Boolean;
public var exitMall:Boolean;
public var dx;
public function MenuAccPeople(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 216
//NewYorkBoothAvailable (NewYorkBoothAvailable)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class NewYorkBoothAvailable extends MovieClip {
public var btnStartGame:SimpleButton;
public var head;
public function NewYorkBoothAvailable(){
addFrameScript(12, frame13, 25, frame26);
}
public function RemoveThisObject(_arg1:MouseEvent):void{
this.parent.removeChild(this);
}
function frame13(){
head = root;
btnStartGame.addEventListener(MouseEvent.CLICK, head.StartGame);
btnStartGame.addEventListener(MouseEvent.CLICK, RemoveThisObject);
}
function frame26(){
gotoAndPlay("BlinkStart");
}
}
}//package
Section 217
//Ninja (Ninja)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Ninja extends MovieClip {
public var ninjitsu;
public var rideElevator;
public var pursue;
public var destination;
public var elevatorTarget;
public var stolenProfit;
public var waiting;
public var dirrection;
public var dx;
public var floorPos;
public var catcher;
public var elevatorChecked;
public var tryToEnter;
public var arrested:MovieClip;
public var ninjitsuTime;
public var homePos;
public var speedX;
public var worldX;
public var worldY;
public var pursuer;
public var arrestDelay;
public var swapingDelay;
public var myParent;
public var isStealing;
public var hiding;
public var delay;
public var blinkDelay;
public var lastDestination;
public var stealingTime;
public var stealingRate;
public var elevatorFloor;
public var runDelay;
public var firstCome;
public var ninjitsuCharge;
public var captured;
public var securityDetected;
public var stealSomething;
public var openLockDelay;
public var initialBlinkDelay;
public var toiletTarget;
public var goHome;
public function Ninja(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
public function ninjitsuProgress():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = myParent.floorList.indexOf(floorPos);
if (((!(goHome)) && (!(myParent.alarmTrigger)))){
if (destination != null){
_local2 = myParent.floorList.indexOf(destination.ground);
} else {
_local2 = _local1;
};
} else {
_local2 = myParent.floorList.indexOf(myParent.ground);
};
if (_local2 > _local1){
_local3 = (_local1 + 1);
} else {
if (_local2 < _local1){
_local3 = (_local1 - 1);
} else {
_local3 = _local1;
};
};
if (_local3 != _local1){
if (((!(rideElevator)) && (((((!((myParent.floorList[_local3] == myParent.ground))) && ((((this.worldX > myParent.floorList[_local3].worldX)) && ((this.worldX < (myParent.floorList[_local3].worldX + myParent.floorList[_local3].width))))))) || ((myParent.floorList[_local3] == myParent.ground)))))){
if (ninjitsuCharge <= 0){
if (!ninjitsu){
if (pursue){
ninjitsu = true;
} else {
ninjitsu = ((Math.random() * 100) < 5);
};
} else {
if (ninjitsuTime > 0){
ninjitsuTime--;
} else {
_local4 = new fx_smoke();
_local4.worldX = this.worldX;
_local4.worldY = (this.worldY - (this.height / 2));
myParent.legendParent.addChild(_local4);
this.floorPos = myParent.floorList[_local3];
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
ninjitsu = false;
ninjitsuTime = 24;
ninjitsuCharge = 96;
if (elevatorTarget != null){
_local5 = elevatorTarget.visitorWaiting.indexOf(this);
if (_local5 >= 0){
elevatorTarget.visitorWaiting.splice(_local5, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
};
};
};
};
};
}
function frame3(){
stop();
}
function frame4(){
stop();
}
public function checkSecurity(_arg1:MovieClip):MovieClip{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
_local3 = null;
while ((((_local2 < _arg1.visitorList.length)) && ((_local3 == null)))) {
_local4 = _arg1.visitorList[_local2];
if ((((((_local4 is CrewSecuritylv1)) || ((_local4 is CrewSecuritylv2)))) || ((_local4 is CrewSecuritylv3)))){
_local3 = _local4;
};
_local2++;
};
if (_local3 != null){
captured = true;
};
return (_local3);
}
public function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local11 = Math.floor((Math.random() * _local8.length));
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
public function scanTarget():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < myParent.tenantParent.numChildren) {
_local5 = myParent.tenantParent.getChildAt(_local2);
if (((((!((((((_local5 is SupportElevator)) || ((_local5 is SupportRestroom)))) || ((_local5 is TenantHall))))) && (_local5.isClose))) && ((lastDestination.indexOf(_local5) < 0)))){
_local1.push(_local5);
};
_local2++;
};
_local3 = Math.floor((Math.random() * _local1.length));
_local4 = _local1[_local3];
return (_local4);
}
function frame5(){
stop();
}
function frame1(){
dx = 0;
speedX = 3;
stealSomething = false;
hiding = 0;
myParent = root;
isStealing = false;
elevatorChecked = null;
securityDetected = new Array();
pursuer = new Array();
captured = false;
goHome = false;
catcher = null;
rideElevator = false;
waiting = 0;
ninjitsu = false;
ninjitsuTime = 24;
ninjitsuCharge = 0;
stolenProfit = 0;
addEventListener(Event.ENTER_FRAME, Animation);
delay = 100;
openLockDelay = 0;
tryToEnter = false;
stealingTime = 0;
stealingRate = 0;
firstCome = true;
lastDestination = new Array();
addEventListener(Event.ENTER_FRAME, Behavior);
runDelay = 0;
swapingDelay = 0;
}
function frame2(){
stop();
}
public function Behavior(_arg1:Event):void{
var sp:*;
var rate:*;
var rAlrmTrigger:*;
var profit:*;
var tipsText:*;
var temp:*;
var glowFilter:*;
var rnd:*;
var stealArea:*;
var test:*;
var bi:*;
var vi:*;
var bonusProfit:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
if (((stealSomething) && (!(pursue)))){
if (hiding > 0){
hiding--;
} else {
stealSomething = false;
};
};
if (ninjitsuCharge > 0){
ninjitsuCharge--;
};
if (!captured){
scanSecurity();
runAwayFromSecurity();
if ((floorPos is Floor)){
if ((this.worldX + dx) < floorPos.worldX){
this.worldX = (floorPos.worldX - dx);
if (!pursue){
dx = speedX;
} else {
dx = (speedX * 2);
runDelay = 5;
};
};
if ((this.worldX + dx) > (floorPos.worldX + floorPos.width)){
this.worldX = ((floorPos.worldX + floorPos.width) - dx);
if (!pursue){
dx = -(speedX);
} else {
dx = (-(speedX) * 2);
runDelay = 5;
};
};
};
if (isStealing){
dx = 0;
if (destination != null){
if ((((stealingTime > 0)) && (!(myParent.alarmTrigger)))){
stealingTime--;
stealingRate--;
if (stealingRate <= 0){
stealingRate = 20;
rate = ((Math.random() * 10) - 5);
if (rate > 0){
rAlrmTrigger = (Math.random() * 100);
if (rAlrmTrigger < (destination.tLevel * 30)){
myParent.banditTrigger = this;
myParent.robedBooth = destination;
myParent.alarmTrigger = true;
};
};
if (!myParent.alarmTrigger){
profit = ((Math.floor((Math.random() * 40)) + 10) * 10);
stolenProfit = (stolenProfit + profit);
myParent.otherOutcome = (myParent.otherOutcome + profit);
};
stealingTime = (stealingTime + rate);
stealSomething = true;
hiding = 72;
};
} else {
if (!destination.isOpen){
destination.isOpen = true;
};
if (lastDestination.indexOf(destination) < 0){
lastDestination.push(destination);
};
destination.finishStealing(this);
if (!isStealing){
myParent.addCashUpdate(stolenProfit, worldX, (worldY - height), false);
if (!myParent.firstBanditStealing){
if (myParent.menuParent.numChildren > 0){
try {
temp = myParent.menuParent.getChildAt(0);
temp.closeMenu();
} catch(e:Error) {
};
};
myParent.cameraX = (worldX - (myParent.CAMERA_WIDTH / 2));
myParent.cameraY = ((worldY - myParent.CAMERA_HEIGHT) + 120);
tipsText = "If there is a flashing red color on your booths it means there is theft. Try to add more security on your mall, it will prevent theft.";
myParent.addTips(("Tips:\n" + tipsText));
if (myParent.tipsHistory.indexOf(tipsText) < 0){
myParent.tipsHistory.unshift(tipsText);
myParent.userinterface.tipsHistory.updateText(myParent.tipsHistory);
if (!myParent.userinterface.tipsHistory.visible){
glowFilter = new GlowFilter(0xFF8800);
myParent.userinterface.btnMailBox.filters = [glowFilter];
if (myParent.userinterface.currentLabel == "reveal"){
myParent.userinterface.tipsHistory.checkHeight();
};
};
};
myParent.firstBanditStealing = true;
};
};
};
if (destination != null){
try {
myParent.tenantParent.getChildIndex(destination);
} catch(e:Error) {
destination.finishStealing(this);
};
};
};
};
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
};
if ((((myParent.dayTime >= 5)) && ((myParent.dayTime < 22)))){
goHome = true;
if (isStealing){
destination.finishStealing(this);
};
};
if (((!(goHome)) && (!(myParent.alarmTrigger)))){
if ((((((destination == null)) || ((destination is SupportElevator)))) || ((destination is SupportRestroom)))){
if (firstCome){
destination = scanTarget();
firstCome = false;
} else {
rnd = (Math.random() * 100);
if (rnd < 50){
destination = scanTarget();
if (destination == null){
goHome = true;
};
} else {
goHome = true;
};
};
} else {
if (destination.ground != floorPos){
if (!pursue){
if ((((elevatorTarget == null)) && (!(ninjitsu)))){
elevatorTarget = getElevator();
};
};
} else {
if (!pursue){
if (!isStealing){
if (destination.enterance != null){
stealArea = destination.enterance;
} else {
stealArea = destination.door;
};
if (worldX < (destination.worldX + stealArea.x)){
dx = speedX;
} else {
if (worldX > ((destination.worldX + stealArea.x) + stealArea.width)){
dx = -(speedX);
} else {
if (stealArea.hitTestObject(this)){
if (destination.Visited(this)){
dx = 0;
if (!tryToEnter){
openLockDelay = 50;
tryToEnter = true;
stealingTime = 100;
stealingRate = 20;
} else {
if (openLockDelay > 0){
openLockDelay--;
} else {
if (!destination.isOpen){
destination.isOpen = true;
};
};
};
destination.stolen(this);
};
};
};
};
};
};
};
};
};
if (((((!((elevatorTarget == null))) && (!(pursue)))) && (!(captured)))){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
test = null;
if ((((elevatorFloor.door.currentFrame < 10)) && (((elevatorFloor.door.currentFrame + myParent.gameSpeed) >= 10)))){
test = checkSecurity(elevatorTarget);
if (test != null){
catcher = test;
};
};
if (test == null){
elevatorTarget.Visited(this);
};
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
if (!myParent.alarmTrigger){
dx = -(speedX);
} else {
dx = (-(speedX) * 2);
};
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
if (!myParent.alarmTrigger){
dx = speedX;
} else {
dx = (speedX * 2);
};
} else {
dx = 0;
};
};
};
};
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
elevatorTarget = null;
};
};
if (rideElevator){
dx = 0;
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (((((((goHome) || (myParent.alarmTrigger))) && (!(isStealing)))) && (!(pursue)))){
if (destination != null){
destination = null;
};
if ((((floorPos == myParent.ground)) && (!(rideElevator)))){
if (elevatorTarget != null){
elevatorFloor = null;
vi = elevatorTarget.visitorWaiting.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorWaiting.splice(vi, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if ((((worldX < (homePos + 11))) && ((homePos > 0)))){
if (!myParent.alarmTrigger){
dx = speedX;
} else {
dx = (speedX * 2);
};
} else {
if ((((worldX > (homePos - 11))) && ((homePos <= 0)))){
if (!myParent.alarmTrigger){
dx = -(speedX);
} else {
dx = (-(speedX) * 2);
};
};
};
} else {
if (!pursue){
if ((((elevatorTarget == null)) && (!(ninjitsu)))){
elevatorTarget = getElevator();
};
};
};
};
if (((!(isStealing)) && (((((!((destination == null))) && (!((destination.ground == floorPos))))) || (((goHome) && (!((floorPos == myParent.ground))))))))){
ninjitsuProgress();
} else {
ninjitsu = false;
};
if (ninjitsu){
dx = 0;
};
this.worldX = (this.worldX + dx);
if ((((this.worldX < -10)) || ((this.worldX > (myParent.MAX_WIDTH + 10))))){
bi = myParent.banditList.indexOf(this);
myParent.banditList.splice(bi, 1);
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
sp = myParent.gameSpeed;
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Behavior);
this.parent.removeChild(this);
break;
};
} else {
dx = 0;
if (elevatorTarget != null){
vi = elevatorTarget.visitorList.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorList.splice(vi, 1);
elevatorTarget.elevatorTargetList.splice(vi, 1);
myParent.visitorParent.addChild(this);
};
vi = elevatorTarget.visitorWaiting.indexOf(this);
if (vi >= 0){
elevatorTarget.visitorWaiting.splice(vi, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
if (catcher != null){
if (!catcher.isAction){
catcher.isAction = true;
catcher = null;
};
};
if (arrested != null){
if (arrested.currentLabel == "Arrest Label"){
sp = myParent.gameSpeed;
arrestDelay = 60;
initialBlinkDelay = 7;
blinkDelay = 7;
bi = myParent.banditList.indexOf(this);
myParent.banditList.splice(bi, 1);
if (this == myParent.banditTrigger){
myParent.banditTrigger = null;
};
bonusProfit = Math.round((stolenProfit * (15 / 100)));
if (bonusProfit < 70){
bonusProfit = 70;
};
myParent.otherOutcome = (myParent.otherOutcome - stolenProfit);
if (myParent.otherOutcome < 0){
myParent.otherIncome = (myParent.otherIncome + Math.abs(myParent.otherOutcome));
myParent.otherOutcome = 0;
};
myParent.otherIncome = (myParent.otherIncome + bonusProfit);
myParent.addCashUpdate(stolenProfit, this.worldX, this.worldY, true, bonusProfit);
myParent.banditCaptured++;
stolenProfit = 0;
removeEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, Arrested);
break;
} else {
this.alpha = 1;
};
};
};
sp = (sp + 1);
};
}
public function scanSecurity():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = null;
_local2 = 0;
while (_local2 < myParent.crewList.length) {
_local3 = myParent.crewList[_local2];
if ((((((_local3 is CrewSecuritylv1)) || ((_local3 is CrewSecuritylv2)))) || ((_local3 is CrewSecuritylv3)))){
_local4 = securityDetected.indexOf(_local3);
if (_local3.floorPos == floorPos){
if (_local4 < 0){
if (Math.abs((_local3.worldX - worldX)) <= 200){
if (dirrection == 1){
if (_local3.worldX > worldX){
_local1 = _local3;
};
} else {
if (_local3.worldX < worldX){
_local1 = _local3;
};
};
securityDetected.push(_local1);
};
};
} else {
if (_local4 >= 0){
securityDetected.splice(_local4, 1);
};
};
};
_local2++;
};
}
public function Arrested(_arg1:Event):void{
arrestDelay--;
if (arrestDelay < 28){
blinkDelay--;
if (blinkDelay <= 0){
initialBlinkDelay--;
blinkDelay = initialBlinkDelay;
if (this.alpha == 1){
this.alpha = 0;
} else {
this.alpha = 1;
};
};
};
if (arrestDelay <= 0){
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Arrested);
this.parent.removeChild(this);
};
}
public function Animation(_arg1:Event):void{
if (!isStealing){
if (((((((((((!(stealSomething)) && (!(myParent.alarmTrigger)))) && (!(captured)))) && (!(rideElevator)))) && (!(ninjitsu)))) && (!(pursue)))){
if (this.alpha > 0.6){
this.alpha = (this.alpha - 0.1);
};
} else {
if (!captured){
this.alpha = 1;
};
};
};
if (captured){
if (this.currentFrame != 4){
gotoAndPlay(4);
};
} else {
if (!ninjitsu){
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
} else {
if (this.currentLabel != "ninjitsu"){
gotoAndPlay("ninjitsu");
};
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
public function runAwayFromSecurity():void{
var _local1:*;
var _local2:*;
if (runDelay > 0){
runDelay--;
} else {
pursue = (((pursuer.length > 0)) && ((securityDetected.indexOf(pursuer[0]) >= 0)));
if (pursue){
if (elevatorTarget != null){
_local2 = elevatorTarget.visitorWaiting.indexOf(this);
if (_local2 >= 0){
elevatorTarget.visitorWaiting.splice(_local2, 1);
if (elevatorTarget.visitorWaiting.length <= 0){
elevatorTarget.isStart = false;
};
};
elevatorTarget = null;
};
_local1 = pursuer[0];
if (_local1.worldX > worldX){
dx = -((speedX * 2));
} else {
if (_local1.worldX < worldX){
dx = (speedX * 2);
};
};
if (ninjitsu){
ninjitsuProgress();
} else {
if (Math.abs((worldX - _local1.worldX)) >= 300){
ninjitsuProgress();
};
};
};
};
if (swapingDelay > 0){
swapingDelay--;
} else {
if (pursuer.length > 0){
_local1 = pursuer.shift();
pursuer.push(_local1);
};
swapingDelay = 5;
};
}
}
}//package
Section 218
//Pillar (Pillar)
package {
import flash.display.*;
public dynamic class Pillar extends MovieClip {
public var worldX:Number;
public var worldY:Number;
public function Pillar(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 219
//SE_Achievement (SE_Achievement)
package {
import flash.media.*;
public dynamic class SE_Achievement extends Sound {
}
}//package
Section 220
//SE_Close (SE_Close)
package {
import flash.media.*;
public dynamic class SE_Close extends Sound {
}
}//package
Section 221
//SE_Coin (SE_Coin)
package {
import flash.media.*;
public dynamic class SE_Coin extends Sound {
}
}//package
Section 222
//SE_Destroy (SE_Destroy)
package {
import flash.media.*;
public dynamic class SE_Destroy extends Sound {
}
}//package
Section 223
//SE_Intro_Explode (SE_Intro_Explode)
package {
import flash.media.*;
public dynamic class SE_Intro_Explode extends Sound {
}
}//package
Section 224
//SE_Intro_Walk (SE_Intro_Walk)
package {
import flash.media.*;
public dynamic class SE_Intro_Walk extends Sound {
}
}//package
Section 225
//SE_Notification (SE_Notification)
package {
import flash.media.*;
public dynamic class SE_Notification extends Sound {
}
}//package
Section 226
//SE_Popularity (SE_Popularity)
package {
import flash.media.*;
public dynamic class SE_Popularity extends Sound {
}
}//package
Section 227
//SE_Select (SE_Select)
package {
import flash.media.*;
public dynamic class SE_Select extends Sound {
}
}//package
Section 228
//SE_SelectUnable (SE_SelectUnable)
package {
import flash.media.*;
public dynamic class SE_SelectUnable extends Sound {
}
}//package
Section 229
//SEAlarm (SEAlarm)
package {
import flash.media.*;
public dynamic class SEAlarm extends Sound {
}
}//package
Section 230
//suitabilityminus (suitabilityminus)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class suitabilityminus extends MovieClip {
public var worldX;
public var worldY;
public var head;
public function suitabilityminus(){
addFrameScript(0, frame1, 39, frame40);
}
public function UpdatePosition(_arg1:Event):void{
this.x = (worldX - head.cameraX);
this.y = (worldY - head.cameraY);
this.visible = head.drawArea.hitTestObject(this);
}
function frame1(){
head = root;
addEventListener(Event.ENTER_FRAME, UpdatePosition);
}
function frame40(){
stop();
removeEventListener(Event.ENTER_FRAME, UpdatePosition);
this.parent.removeChild(this);
}
}
}//package
Section 231
//suitabilityplus (suitabilityplus)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class suitabilityplus extends MovieClip {
public var worldX;
public var worldY;
public var head;
public function suitabilityplus(){
addFrameScript(0, frame1, 39, frame40);
}
public function UpdatePosition(_arg1:Event):void{
this.x = (worldX - head.cameraX);
this.y = (worldY - head.cameraY);
this.visible = head.drawArea.hitTestObject(this);
}
function frame1(){
head = root;
addEventListener(Event.ENTER_FRAME, UpdatePosition);
}
function frame40(){
stop();
removeEventListener(Event.ENTER_FRAME, UpdatePosition);
this.parent.removeChild(this);
}
}
}//package
Section 232
//SupportElevator (SupportElevator)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class SupportElevator extends MovieClip {
public const UPGRADE_COST:Array;
public const speedModifier:Array;
public const UPGRADE_FLOOR_COST = 2750;
public const TENANT_NOTE = "Transport between floors";
public const MAX_LEVEL = 4;
public const capacity:Array;
public const TENANT_TYPE = "Support Building";
public var legend;
public var minHeight:Number;
public var visitorList;
public var wire:MovieClip;
public var canExpand:Boolean;
public var isOpen:Boolean;
public var elevatorList:Array;
public var floorList:Array;
public var expandSymbol:MovieClip;
public var room:MovieClip;
public var eRoom:MovieClip;
public var worldX:Number;
public var worldY:Number;
public var isUP:Boolean;
public var elevatorTargetList;
public var isStart:Boolean;
public var expandMode:MovieClip;
public var tLevel;
public var myParent;
public var body:ElevatorBody;
public var maxHeight:Number;
public var targetIndex;
public var isActivated:Boolean;
public var expandBuild:MovieClip;
public var visitorWaiting;
public function SupportElevator(){
capacity = [10, 15, 15, 20];
speedModifier = [1, 1, 2, 3];
UPGRADE_COST = [3500, 4000, 4500];
super();
addFrameScript(0, frame1);
}
public function checkCloseFloor():MovieClip{
var _local1:*;
var _local2:*;
_local2 = 0;
while (_local2 < elevatorList.length) {
if (_local2 == 0){
_local1 = 0;
} else {
if (Math.abs(((elevatorList[_local2].y + elevatorList[_local2].height) - (eRoom.y + eRoom.height))) < Math.abs(((elevatorList[_local1].y + elevatorList[_local1].height) - (eRoom.y + eRoom.height)))){
_local1 = _local2;
};
};
_local2++;
};
return (floorList[_local1]);
}
public function NoticeToExpand(_arg1:MouseEvent):void{
legend = new LegendWideBox();
legend.alignment = "Center";
legend.commentText = ("Drag elevator to expand floor. Each floor cost $" + UPGRADE_FLOOR_COST);
myParent.noticeParent.addChild(legend);
}
public function getTopPosition():Number{
var _local1:*;
var _local2:*;
_local2 = 0;
while (_local2 < elevatorList.length) {
if (!_local1){
_local1 = elevatorList[_local2].y;
} else {
if (_local1 > elevatorList[_local2].y){
_local1 = elevatorList[_local2].y;
};
};
_local2++;
};
return (_local1);
}
public function removeAllListener():void{
removeEventListener(Event.ENTER_FRAME, Animate);
this.removeEventListener(MouseEvent.MOUSE_DOWN, HoldElevator);
}
function frame1(){
isOpen = false;
isUP = true;
isActivated = false;
isStart = false;
myParent = root;
visitorWaiting = new Array();
updateWire();
addEventListener(Event.ENTER_FRAME, Animate);
visitorList = new Array();
elevatorTargetList = new Array();
targetIndex = Number;
this.addEventListener(MouseEvent.MOUSE_DOWN, HoldElevator);
addEventListener(MouseEvent.MOUSE_OVER, NoticeToExpand);
addEventListener(MouseEvent.MOUSE_OUT, NoticeDisappear);
}
public function replaceBody(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = elevatorList[_arg1];
_local3 = new ElevatorUpgrade();
_local3.y = _local2.y;
_local3.door.gotoAndStop(_local2.door.currentFrame);
_local2.door.stop();
_local4 = 0;
while (_local4 < myParent.visitorParent.numChildren) {
_local8 = myParent.visitorParent.getChildAt(_local4);
if ((((_local8.elevatorTarget == this)) && ((_local8.elevatorFloor == _local2)))){
_local8.elevatorFloor = _local3;
};
_local4++;
};
_local5 = getChildIndex(_local2);
_local6 = _local2.getChildByName("upgrade");
if (_local6 != null){
_local3.addChild(_local6);
};
_local7 = elevatorTargetList.indexOf(_local2);
while (_local7 >= 0) {
elevatorTargetList[_local7] = _local3;
_local7 = elevatorTargetList.indexOf(_local2);
};
removeChild(_local2);
addChildAt(_local3, _local5);
elevatorList[_arg1] = _local3;
}
public function checkAllVisitorTarget():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = true;
_local2 = true;
_local3 = 0;
while ((((_local3 < elevatorTargetList.length)) && (((_local1) || (_local2))))) {
_local4 = elevatorTargetList[_local3];
if ((_local4.y + _local4.height) < (eRoom.y + eRoom.height)){
_local2 = false;
} else {
if ((_local4.y + _local4.height) > (eRoom.y + eRoom.height)){
_local1 = false;
};
};
_local3++;
};
_local3 = 0;
while ((((_local3 < visitorWaiting.length)) && (((_local1) || (_local2))))) {
_local4 = visitorWaiting[_local3];
if (_local4.worldY < ((this.worldY + eRoom.y) + eRoom.height)){
_local2 = false;
} else {
if (_local4.worldY > ((this.worldY + eRoom.y) + eRoom.height)){
_local1 = false;
};
};
_local3++;
};
if (((_local1) && (!(_local2)))){
isUP = true;
} else {
if (((_local2) && (!(_local1)))){
isUP = false;
};
};
}
public function Animate(_arg1:Event):void{
var detect:*;
var i:*;
var loop:*;
var temp:*;
var exitVisitorList:*;
var exitFloor:*;
var exitElevator:*;
var indexFloor:*;
var index:*;
var closeFloor:*;
var closeY:*;
var event = _arg1;
detect = false;
i = 0;
while (i < elevatorList.length) {
temp = elevatorList[i];
if (!detect){
minHeight = ((temp.y + temp.height) - 2);
maxHeight = ((temp.y + temp.height) - 2);
detect = true;
} else {
if (minHeight < ((temp.y + temp.height) - 2)){
minHeight = ((temp.y + temp.height) - 2);
};
if (maxHeight > ((temp.y + temp.height) - 2)){
maxHeight = ((temp.y + temp.height) - 2);
};
};
if ((eRoom.y + eRoom.height) == ((temp.y + temp.height) - 2)){
if (!isOpen){
temp.door.gotoAndStop(1);
} else {
temp.door.gotoAndStop((temp.door.currentFrame + myParent.gameSpeed));
if (temp.door.currentFrame >= temp.door.totalFrames){
isOpen = false;
temp.door.gotoAndStop(1);
};
};
} else {
temp.door.gotoAndStop(1);
};
i = (i + 1);
};
loop = 0;
while (loop < (myParent.gameSpeed * speedModifier[(tLevel - 1)])) {
room.x = eRoom.x;
room.y = eRoom.y;
if (visitorWaiting.length <= 0){
isStart = false;
};
isActivated = (((visitorList.length > 0)) || (isStart));
exitVisitorList = new Array();
exitFloor = new Array();
exitElevator = null;
i = 0;
while (i < elevatorTargetList.length) {
if ((eRoom.y + eRoom.height) == ((elevatorTargetList[i].y + elevatorTargetList[i].height) - 2)){
exitVisitorList.push(visitorList[i]);
indexFloor = elevatorList.indexOf(elevatorTargetList[i]);
exitFloor.push(floorList[indexFloor]);
exitElevator = elevatorList[indexFloor];
isOpen = true;
};
i = (i + 1);
};
if (!isOpen){
i = 0;
while (i < visitorWaiting.length) {
temp = visitorWaiting[i].elevatorFloor;
if (((((eRoom.y + eRoom.height) == ((temp.y + temp.height) - 2))) && ((visitorList.length < capacity[(tLevel - 1)])))){
isOpen = true;
break;
};
i = (i + 1);
};
};
if (isOpen){
if (((!((exitElevator == null))) && ((((exitElevator.door.currentFrame >= 10)) && (((exitElevator.door.currentFrame - myParent.gameSpeed) < 10)))))){
i = 0;
while (i < exitVisitorList.length) {
exitVisitorList[i].floorPos = exitFloor[i];
exitVisitorList[i].worldX = (this.worldX + (this.width / 2));
exitVisitorList[i].worldY = exitFloor[i].worldY;
exitVisitorList[i].elevatorTarget = null;
exitVisitorList[i].elevatorChecked = this;
exitVisitorList[i].rideElevator = false;
if (!(exitFloor[i] is Floor)){
exitVisitorList[i].worldY = (exitVisitorList[i].worldY - exitFloor[i].height);
};
exitVisitorList[i].x = (exitVisitorList[i].worldX - myParent.cameraX);
exitVisitorList[i].y = (exitVisitorList[i].worldY - myParent.cameraY);
myParent.visitorParent.addChild(exitVisitorList[i]);
i = (i + 1);
};
i = 0;
while (i < exitVisitorList.length) {
index = visitorList.indexOf(exitVisitorList[i]);
visitorList.splice(index, 1);
elevatorTargetList.splice(index, 1);
i = (i + 1);
};
checkAllVisitorTarget();
};
} else {
if (isActivated){
if (isUP){
if ((eRoom.y + eRoom.height) > maxHeight){
eRoom.y = (eRoom.y - 2);
} else {
isUP = false;
};
} else {
if ((eRoom.y + eRoom.height) < minHeight){
eRoom.y = (eRoom.y + 2);
} else {
isUP = true;
};
};
};
};
try {
myParent.tenantParent.getChildIndex(this);
} catch(e:Error) {
closeFloor = checkCloseFloor();
closeY = closeFloor.worldY;
if (!(closeFloor is Floor)){
closeY = (closeY - closeFloor.height);
};
i = 0;
while (i < visitorList.length) {
visitorList[i].floorPos = closeFloor;
visitorList[i].worldX = (this.worldX + (this.width / 2));
visitorList[i].worldY = closeY;
visitorList[i].elevatorTarget = null;
visitorList[i].elevatorChecked = this;
visitorList[i].rideElevator = false;
visitorList[i].x = (visitorList[i].worldX - myParent.cameraX);
visitorList[i].y = (visitorList[i].worldY - myParent.cameraY);
myParent.visitorParent.addChild(visitorList[i]);
i = (i + 1);
};
loop = (myParent.gameSpeed * speedModifier[(tLevel - 1)]);
removeAllListener();
};
loop = (loop + 1);
};
}
public function HoldElevator(_arg1:MouseEvent):void{
var _local2:*;
if (myParent.userinterface.getButtonActive() != 0){
expandMode = new MovieClip();
expandBuild = new MovieClip();
expandSymbol = new MovieClip();
this.parent.parent.addChild(expandMode);
this.parent.parent.addChild(expandBuild);
this.parent.parent.addChild(expandSymbol);
_local2 = new HelpExpandElevator();
_local2.x = (this.x + (this.width / 2));
_local2.y = ((this.y + maxHeight) - 82);
expandSymbol.addChild(_local2);
_local2 = new HelpExpandElevator();
_local2.x = (this.x + (this.width / 2));
_local2.y = (this.y + minHeight);
_local2.scaleY = -1;
expandSymbol.addChild(_local2);
addEventListener(Event.ENTER_FRAME, ExpandSymbol);
stage.addEventListener(MouseEvent.MOUSE_MOVE, ExpandElevator);
stage.addEventListener(MouseEvent.MOUSE_UP, ReleaseElevator);
};
}
public function updateWire():void{
var _local1:*;
_local1 = 0;
while (_local1 < elevatorList.length) {
if (_local1 == 0){
wire.y = elevatorList[_local1].y;
} else {
if (elevatorList[_local1].y < wire.y){
wire.y = elevatorList[_local1].y;
};
};
_local1++;
};
wire.height = (height - 2);
}
public function ExpandSymbol(_arg1:Event):void{
var _local2:*;
var _local3:*;
expandMode.x = this.x;
expandBuild.x = this.x;
expandMode.y = (this.y + 2);
expandBuild.y = (this.y + 2);
_local2 = expandSymbol.getChildAt(0);
_local2.x = (this.x + (this.width / 2));
_local2.y = ((this.y + maxHeight) - 82);
_local3 = expandSymbol.getChildAt(1);
_local3.x = (this.x + (this.width / 2));
_local3.y = (this.y + minHeight);
}
public function Visited(_arg1:MovieClip):void{
var temp:*;
var tWidth:*;
var vIndex:*;
var wIndex:*;
var indexList:*;
var visitor = _arg1;
if (visitor.waiting > 0){
visitor.waiting--;
};
if ((((visitorWaiting.indexOf(visitor) < 0)) && ((visitorList.indexOf(visitor) < 0)))){
visitorWaiting.push(visitor);
};
if ((((visitorList.indexOf(visitor) < 0)) && ((visitor.waiting <= 0)))){
temp = visitor.elevatorFloor;
visitor.dx = visitor.dirrection;
tWidth = (visitor.width / 2);
if (((((visitor.worldX - tWidth) >= (this.worldX + temp.door.x))) && (((visitor.worldX + tWidth) <= ((this.worldX + temp.door.x) + temp.door.width))))){
visitor.dx = 0;
if (!isActivated){
if (visitor.worldY < ((worldY + eRoom.y) + eRoom.height)){
isUP = true;
} else {
if (visitor.worldY > ((worldY + eRoom.y) + eRoom.height)){
isUP = false;
};
};
};
isStart = true;
if (isOpen){
if ((((temp.door.currentFrame >= 10)) && (((temp.door.currentFrame - myParent.gameSpeed) < 10)))){
visitorList.push(visitor);
vIndex = visitorList.indexOf(visitor);
if (vIndex < capacity[(tLevel - 1)]){
visitor.rideElevator = true;
visitor.x = (eRoom.width / 2);
visitor.y = eRoom.height;
room.addChild(visitor);
wIndex = visitorWaiting.indexOf(visitor);
if (wIndex >= 0){
visitorWaiting.splice(wIndex, 1);
};
if (!visitor.goHome){
if (visitor.toiletTarget == null){
if (!(((((visitor is CrewSecuritylv1)) || ((visitor is CrewSecuritylv2)))) || ((visitor is CrewSecuritylv3)))){
if (visitor.destination != null){
targetIndex = floorList.indexOf(visitor.destination.ground);
if ((((myParent.visitorList.indexOf(visitor) >= 0)) && ((visitor.destination == visitor.lastDestination)))){
targetIndex = -1;
};
} else {
targetIndex = -1;
};
} else {
if (myParent.banditTrigger != null){
targetIndex = floorList.indexOf(myParent.banditTrigger.floorPos);
} else {
targetIndex = -1;
};
};
} else {
targetIndex = floorList.indexOf(visitor.toiletTarget.ground);
};
} else {
targetIndex = floorList.indexOf(myParent.ground);
};
if (targetIndex >= 0){
elevatorTargetList.push(elevatorList[targetIndex]);
} else {
if (!visitor.goHome){
try {
indexList = visitor.shiftFloor;
if (indexList < 0){
elevatorTargetList.push(randomTargetElevator(visitor));
} else {
targetIndex = floorList.indexOf(myParent.floorList[indexList]);
if (targetIndex >= 0){
elevatorTargetList.push(elevatorList[targetIndex]);
} else {
elevatorTargetList.push(randomTargetElevator(visitor));
};
};
} catch(e:Error) {
elevatorTargetList.push(randomTargetElevator(visitor));
};
} else {
elevatorTargetList.push(randomTargetElevator(visitor));
};
};
checkAllVisitorTarget();
} else {
visitorList.splice(vIndex, 1);
visitor.waiting = 12;
};
};
};
};
} else {
visitor.visible = true;
};
}
public function randomTargetElevator(_arg1:MovieClip):MovieClip{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = new Array();
_local3 = 0;
while (_local3 < floorList.length) {
if (floorList[_local3] != _arg1.floorPos){
_local2.push(elevatorList[_local3]);
};
_local3++;
};
if (_local2.length > 0){
_local4 = Math.floor((Math.random() * _local2.length));
return (_local2[_local4]);
};
return (_arg1.floorPos);
}
public function addNewElevator(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = 0;
while (_local1 < expandBuild.numChildren) {
_local2 = expandBuild.getChildAt(_local1);
if (_local2.canBuild){
if (((myParent.cash - myParent.purchase) + myParent.recive) >= UPGRADE_FLOOR_COST){
if (tLevel < 3){
_local4 = new ElevatorBody();
} else {
_local4 = new ElevatorUpgrade();
};
_local4.y = _local2.y;
myParent.addCashUpdate(UPGRADE_FLOOR_COST, (worldX + (this.width / 2)), ((worldY + _local2.y) + (_local2.height / 2)), false);
addChild(_local4);
_local3 = 0;
while (_local3 < myParent.pillarParent.numChildren) {
_local5 = myParent.pillarParent.getChildAt(_local3);
if (!(_local5 is Floor)){
if (_local2.body.hitTestObject(_local5)){
_local5.parent.removeChild(_local5);
_local3--;
};
};
_local3++;
};
_local3 = 0;
while (_local3 < myParent.emptyParent.numChildren) {
_local5 = myParent.emptyParent.getChildAt(_local3);
if (_local2.body.hitTestObject(_local5)){
_local5.parent.removeChild(_local5);
_local3--;
};
_local3++;
};
_local3 = 0;
while (_local3 < myParent.floorList.length) {
_local5 = myParent.floorList[_local3];
if ((_local5 is Floor)){
if (((_local2.hitTestObject(_local5)) && (((this.y + _local2.y) <= _local5.y)))){
floorList.push(_local5);
elevatorList.push(_local4);
};
} else {
if (((_local2.hitTestObject(_local5)) && (((this.y + _local2.y) <= (_local5.y - _local5.height))))){
floorList.push(_local5);
elevatorList.push(_local4);
};
};
_local3++;
};
myParent.createPillar((worldX - 12), (worldY + (_local4.y - 2)));
myParent.createPillar((worldX + (this.width - (this.width % 12))), (worldY + (_local4.y - 2)));
myParent.createFloor((worldX - 12), ((worldY + _local4.y) - 12), ((this.width - (this.width % 12)) + 24));
} else {
myParent.addNotification("Not enough cash");
break;
};
};
_local1++;
};
updateWire();
}
public function getBottomPosition():Number{
var _local1:*;
var _local2:*;
_local2 = 0;
while (_local2 < elevatorList.length) {
if (!_local1){
_local1 = (elevatorList[_local2].y + 72);
} else {
if (_local1 < (elevatorList[_local2].y + 72)){
_local1 = (elevatorList[_local2].y + 72);
};
};
_local2++;
};
return (_local1);
}
public function NoticeDisappear(_arg1:MouseEvent):void{
var event = _arg1;
try {
myParent.noticeParent.removeChild(legend);
} catch(e:Error) {
};
}
public function ExpandElevator(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
if (myParent.userinterface.getButtonActive() != 0){
_local2 = (_arg1.stageY + myParent.cameraY);
_local3 = getTopPosition();
_local4 = getBottomPosition();
if (_local2 < ((worldY + _local3) - 12)){
_local2 = (Math.round((_local2 / 12)) * 12);
_local5 = ((worldY + _local3) - _local2);
if (expandMode.numChildren <= 0){
_local6 = new ElevatorExpand();
_local6.y = (_local3 - _local5);
_local6.scaleY = (_local5 / 74);
expandMode.addChild(_local6);
} else {
_local6 = expandMode.getChildAt(0);
_local6.y = (_local3 - _local5);
_local6.scaleY = (_local5 / 74);
_local7 = Math.floor(((_local5 + 12) / 86));
if (expandBuild.numChildren < _local7){
if (tLevel < 3){
_local8 = new ExpandElevatorSymbol();
} else {
_local8 = new ExpandElevatorUpgraded();
};
_local8.y = (_local3 - (84 * (expandBuild.numChildren + 1)));
_local8.alpha = 0.3;
expandBuild.addChild(_local8);
} else {
if (expandBuild.numChildren > _local7){
expandBuild.removeChild(expandBuild.getChildAt((expandBuild.numChildren - 1)));
};
};
if (_local7 > 0){
_local9 = false;
_local10 = 0;
while (_local10 < expandBuild.numChildren) {
_local11 = expandBuild.getChildAt(_local10);
if (_local11.hitTestObject(myParent.sky)){
_local9 = true;
};
_local12 = 0;
while ((((_local12 < myParent.tenantParent.numChildren)) && (!(_local9)))) {
_local13 = myParent.tenantParent.getChildAt(_local12);
if (((!((_local13 == this))) && (_local11.body.hitTestObject(_local13)))){
_local9 = true;
};
_local12++;
};
_local11.canBuild = !(_local9);
_local10++;
};
canExpand = true;
} else {
canExpand = false;
};
if (canExpand){
_local6.transform.colorTransform = new ColorTransform(1, 1, 1, 0.7, 0, 0, 0, 0);
} else {
_local6.transform.colorTransform = new ColorTransform(1, 0, 0, 0.7, 0, 0, 0, 0);
};
};
} else {
if (_local2 > ((worldY + _local4) + 12)){
_local2 = (Math.round((_local2 / 12)) * 12);
_local5 = ((worldY + _local4) - _local2);
if (expandMode.numChildren <= 0){
_local6 = new ElevatorExpand();
_local6.y = (_local4 - _local5);
_local6.scaleY = (_local5 / 74);
expandMode.addChild(_local6);
} else {
_local6 = expandMode.getChildAt(0);
_local6.y = (_local4 - _local5);
_local6.scaleY = (_local5 / 74);
_local7 = Math.abs(Math.ceil(((_local5 + 12) / 74)));
if (expandBuild.numChildren < _local7){
if (tLevel < 3){
_local8 = new ExpandElevatorSymbol();
} else {
_local8 = new ExpandElevatorUpgraded();
};
_local8.y = ((_local4 + 12) + (84 * expandBuild.numChildren));
_local8.alpha = 0.3;
expandBuild.addChild(_local8);
} else {
if (expandBuild.numChildren > _local7){
expandBuild.removeChild(expandBuild.getChildAt((expandBuild.numChildren - 1)));
};
};
if (_local7 > 0){
_local9 = false;
_local10 = 0;
while (_local10 < expandBuild.numChildren) {
_local11 = expandBuild.getChildAt(_local10);
_local12 = 0;
while ((((_local12 < myParent.tenantParent.numChildren)) && (!(_local9)))) {
_local13 = myParent.tenantParent.getChildAt(_local12);
if (((((!((_local13 == this))) && (_local11.body.hitTestObject(_local13)))) || (((_local11.body.hitTestObject(myParent.ground)) && ((((_local11.y + this.y) + 72) > (myParent.ground.y - myParent.ground.height))))))){
_local9 = true;
};
_local12++;
};
_local11.canBuild = !(_local9);
_local10++;
};
canExpand = true;
} else {
canExpand = false;
};
if (canExpand){
_local6.transform.colorTransform = new ColorTransform(1, 1, 1, 0.7, 0, 0, 0, 0);
} else {
_local6.transform.colorTransform = new ColorTransform(1, 0, 0, 0.7, 0, 0, 0, 0);
};
};
} else {
if (expandMode.numChildren > 0){
expandMode.removeChild(expandMode.getChildAt(0));
};
};
};
};
}
public function ReleaseElevator(_arg1:MouseEvent):void{
addNewElevator();
this.parent.parent.removeChild(expandMode);
this.parent.parent.removeChild(expandBuild);
this.parent.parent.removeChild(expandSymbol);
removeEventListener(Event.ENTER_FRAME, ExpandSymbol);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, ExpandElevator);
stage.removeEventListener(MouseEvent.MOUSE_UP, ReleaseElevator);
}
}
}//package
Section 233
//SupportRestroom (SupportRestroom)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class SupportRestroom extends MovieClip {
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Visitors don't need to leave your mall while they need to go";
public const TENANT_TYPE = "Support Building";
public const MAX_LEVEL = 4;
public var worldX:Number;
public var worldY:Number;
public var enteranceWomen:MovieClip;
public var femaleList;
public var visitorList;
public var enteranceMen:MovieClip;
public var doorMen:MovieClip;
public var maleList;
public var tLevel;
public var womenOpen;
public var myParent;
public var ground:MovieClip;
public var body:MovieClip;
public var menOpen;
public var doorWomen:MovieClip;
public function SupportRestroom(){
UPGRADE_COST = [1500, 1800, 2200];
super();
addFrameScript(0, frame1);
}
public function getCapacity():Number{
var _local1:*;
_local1 = (2 + (tLevel * 3));
return (_local1);
}
public function Visited(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (_arg1.gender){
_local2 = enteranceMen;
_local3 = doorMen;
} else {
_local2 = enteranceWomen;
_local3 = doorWomen;
};
_local4 = 0;
while (_local4 < myParent.gameSpeed) {
if (visitorList.indexOf(_arg1) < 0){
if (_arg1.hitTestObject(_local2)){
_arg1.dx = _arg1.dirrection;
if ((((_arg1.worldX > (((worldX + _local2.x) + (_local2.width / 2)) - 5))) && ((_arg1.worldX < (((worldX + _local2.x) + (_local2.width / 2)) + 5))))){
_arg1.dx = 0;
if (_arg1.gender){
if (maleList.length <= getCapacity()){
menOpen = true;
};
} else {
if (femaleList.length <= getCapacity()){
womenOpen = true;
};
};
if ((((_local3.currentFrame >= 10)) && (((_local3.currentFrame - myParent.gameSpeed) < 10)))){
if (_arg1.gender){
maleList.push(_arg1);
} else {
femaleList.push(_arg1);
};
visitorList.push(_arg1);
_arg1.alpha = 0;
_arg1.addEventListener(Event.ENTER_FRAME, PeeProgress);
};
};
};
};
_local4++;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((((((((((_local4 is TenantCake)) || ((_local4 is TenantIceCream)))) || ((_local4 is TenantBurger)))) || ((_local4 is TenantSteak)))) || ((_local4 is TenantSushi)))) || ((_local4 is TenantCafe)))){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantCinema)){
_local2 = (_local2 + 2);
} else {
if ((_local4 is TenantSalon)){
_local2 = (_local2 - 3);
};
};
};
};
};
_local3++;
};
return (_local2);
}
public function PeeProgress(_arg1:Event):void{
var sp:*;
var temp:*;
var imageTemp:*;
var index:*;
var mi:*;
var fi:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
temp = event.currentTarget;
temp.toiletFill = (temp.toiletFill - 1);
if (temp.toiletFill <= 0){
temp.toiletFill = 0;
if (temp.gender){
imageTemp = doorMen;
menOpen = true;
} else {
imageTemp = doorWomen;
womenOpen = true;
};
if ((((imageTemp.currentFrame >= 10)) && (((imageTemp.currentFrame - myParent.gameSpeed) < 10)))){
temp.alpha = 1;
temp.toiletTarget = null;
index = visitorList.indexOf(temp);
visitorList.splice(index, 1);
if (temp.gender){
mi = maleList.indexOf(temp);
maleList.splice(mi, 1);
} else {
fi = femaleList.indexOf(temp);
femaleList.splice(fi, 1);
};
temp.removeEventListener(Event.ENTER_FRAME, PeeProgress);
};
} else {
try {
myParent.tenantParent.getChildIndex(this);
} catch(e:Error) {
temp.alpha = 1;
temp.toiletTarget = null;
temp.removeEventListener(Event.ENTER_FRAME, PeeProgress);
};
};
sp = (sp + 1);
};
}
function frame1(){
menOpen = false;
womenOpen = false;
myParent = root;
addEventListener(Event.ENTER_FRAME, Animate);
visitorList = new Array();
maleList = new Array();
femaleList = new Array();
}
public function Animate(_arg1:Event):void{
if (!menOpen){
doorMen.gotoAndStop(1);
} else {
doorMen.gotoAndStop((doorMen.currentFrame + myParent.gameSpeed));
};
if (!womenOpen){
doorWomen.gotoAndStop(1);
} else {
doorWomen.gotoAndStop((doorWomen.currentFrame + myParent.gameSpeed));
};
if (doorMen.currentFrame >= doorMen.totalFrames){
menOpen = false;
doorMen.gotoAndStop(1);
};
if (doorWomen.currentFrame >= doorWomen.totalFrames){
womenOpen = false;
doorWomen.gotoAndStop(1);
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (2 + ((tLevel + 1) * 3));
return (_local1);
}
}
}//package
Section 234
//TenantBabyShop (TenantBabyShop)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantBabyShop extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell baby's supplies and needs";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var isClose;
public function TenantBabyShop(){
PRICE = [30, 50, 70];
UPGRADE_COST = [2500, 3000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
_local2 = 0;
_arg1.dx = _arg1.dirrection;
_local3 = (((_arg1.worldX > (((this.worldX + this.door.x) + this.door.width) - 10))) && ((_arg1.worldX < ((this.worldX + this.door.x) + this.door.width))));
return (_local3);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 3));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((((((((((_local4 is TenantCake)) || ((_local4 is TenantIceCream)))) || ((_local4 is TenantBurger)))) || ((_local4 is TenantSteak)))) || ((_local4 is TenantSushi)))) || ((_local4 is TenantCafe)))){
_local2 = (_local2 - 2);
};
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 10));
_local4 = (_local3 - 3);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((((((((((_local3 is TenantCake)) || ((_local3 is TenantIceCream)))) || ((_local3 is TenantBurger)))) || ((_local3 is TenantSteak)))) || ((_local3 is TenantSushi)))) || ((_local3 is TenantCafe)))){
_local1.popularity = (_local1.popularity + 2);
};
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 3));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
door.gotoAndStop(1);
} else {
if ((door.currentFrame + _local2.gameSpeed) <= door.totalFrames){
door.gotoAndStop((door.currentFrame + _local2.gameSpeed));
} else {
door.gotoAndStop(door.totalFrames);
};
};
if (((isOpen) && ((door.currentFrame >= door.totalFrames)))){
isOpen = false;
door.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 235
//TenantBookStore (TenantBookStore)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantBookStore extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell magazine, novel, dictionary, comic, recipe and fiction books";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var doorImage:MovieClip;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var visitorCome:Number;
public var isClose;
public function TenantBookStore(){
PRICE = [50, 100, 150];
UPGRADE_COST = [4000, 6000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
_arg1.dx = _arg1.dirrection;
_local2 = (((_arg1.worldX >= (this.worldX + 38))) && ((_arg1.worldX <= (this.worldX + 44))));
return (_local2);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((_local4 is TenantToyStore)){
_local2 = (_local2 + 1);
};
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 15));
_local4 = (_local3 - 2);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((_local3 is TenantToyStore)){
_local1.popularity = (_local1.popularity - 1);
};
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
doorImage.gotoAndStop(1);
} else {
if ((doorImage.currentFrame + _local2.gameSpeed) <= doorImage.totalFrames){
doorImage.gotoAndStop((doorImage.currentFrame + _local2.gameSpeed));
} else {
doorImage.gotoAndStop(doorImage.totalFrames);
};
};
if (doorImage.currentFrame >= doorImage.totalFrames){
isOpen = false;
doorImage.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 236
//TenantBoutiqueA (TenantBoutiqueA)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantBoutiqueA extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell gowns and other elegant clothes for men and women";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var isClose;
public function TenantBoutiqueA(){
PRICE = [120, 180, 240];
UPGRADE_COST = [5000, 8000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
_local2 = 0;
_arg1.dx = _arg1.dirrection;
_local3 = (((_arg1.worldX > (((this.worldX + this.door.x) + this.door.width) - 10))) && ((_arg1.worldX < ((this.worldX + this.door.x) + this.door.width))));
return (_local3);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((((_local4 is TenantBoutiqueA)) || ((_local4 is TenantBoutiqueB)))) || ((_local4 is TenantJewelry)))){
_local2 = (_local2 + 1);
} else {
if ((_local4 is TenantIceCream)){
_local2 = (_local2 - 2);
};
};
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 15));
_local4 = (Math.floor(_local3) - 2);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + this.door.width), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((((_local3 is TenantBoutiqueA)) || ((_local3 is TenantBoutiqueB)))) || ((_local3 is TenantJewelry)))){
_local1.popularity = (_local1.popularity - 1);
} else {
if ((_local3 is TenantIceCream)){
_local1.popularity = (_local1.popularity + 2);
};
};
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
door.gotoAndStop(1);
} else {
if ((door.currentFrame + _local2.gameSpeed) <= door.totalFrames){
door.gotoAndStop((door.currentFrame + _local2.gameSpeed));
} else {
door.gotoAndStop(door.totalFrames);
};
};
if (((isOpen) && ((door.currentFrame >= door.totalFrames)))){
isOpen = false;
door.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
};
}
}
}//package
Section 237
//TenantBoutiqueB (TenantBoutiqueB)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantBoutiqueB extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell t-shirts and other casual cloths for boys and girls";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var isClose;
public function TenantBoutiqueB(){
PRICE = [60, 100, 160];
UPGRADE_COST = [6500, 8000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
_local2 = 0;
_arg1.dx = _arg1.dirrection;
_local3 = (((_arg1.worldX > (((this.worldX + this.door.x) + this.door.width) - 10))) && ((_arg1.worldX < ((this.worldX + this.door.x) + this.door.width))));
return (_local3);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((((_local4 is TenantBoutiqueA)) || ((_local4 is TenantBoutiqueB)))) || ((_local4 is TenantJewelry)))){
_local2 = (_local2 + 1);
} else {
if ((_local4 is TenantIceCream)){
_local2 = (_local2 - 2);
};
};
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 10));
_local4 = (_local3 - 3);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((((_local3 is TenantBoutiqueA)) || ((_local3 is TenantBoutiqueB)))) || ((_local3 is TenantJewelry)))){
_local1.popularity = (_local1.popularity - 1);
} else {
if ((_local3 is TenantIceCream)){
_local1.popularity = (_local1.popularity + 2);
};
};
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
door.gotoAndStop(1);
} else {
if ((door.currentFrame + _local2.gameSpeed) <= door.totalFrames){
door.gotoAndStop((door.currentFrame + _local2.gameSpeed));
} else {
door.gotoAndStop(door.totalFrames);
};
};
if (((isOpen) && ((door.currentFrame >= door.totalFrames)))){
isOpen = false;
door.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 238
//TenantBurger (TenantBurger)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantBurger extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell burgers, french fries and other fast foods";
public const TENANT_TYPE = "Food Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var doorImage:MovieClip;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var visitorCome:Number;
public var isClose;
public function TenantBurger(){
PRICE = [80, 100, 120];
UPGRADE_COST = [4500, 6500];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
_arg1.dx = _arg1.dirrection;
_local2 = (((_arg1.worldX > (((this.worldX + this.door.x) + (this.door.width / 2)) - 5))) && ((_arg1.worldX < (((this.worldX + this.door.x) + (this.door.width / 2)) + 5))));
return (_local2);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((_local4 is TenantSupermarket)){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantIceCream)){
_local2 = (_local2 + 3);
} else {
if ((_local4 is TenantCinema)){
_local2 = (_local2 + 4);
} else {
if ((((_local4 is TenantBabyShop)) || ((_local4 is TenantSalon)))){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantDrugStore)){
_local1.popularity = (_local1.popularity - 3);
};
};
};
};
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local1.restroomList.length) {
_local4 = _local1.restroomList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
_local2 = (_local2 - 2);
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 10));
_local4 = (_local3 - 2);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((_local3 is TenantSupermarket)){
_local1.popularity = (_local1.popularity - 2);
} else {
if ((_local3 is TenantIceCream)){
_local1.popularity = (_local1.popularity - 3);
} else {
if ((_local3 is TenantCinema)){
_local1.popularity = (_local1.popularity - 4);
} else {
if ((((_local3 is TenantBabyShop)) || ((_local3 is TenantSalon)))){
_local1.popularity = (_local1.popularity + 2);
} else {
if ((_local3 is TenantDrugStore)){
_local1.popularity = (_local1.popularity + 3);
};
};
};
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
_local1.popularity = (_local1.popularity + 2);
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
doorImage.gotoAndStop(1);
} else {
if ((doorImage.currentFrame + _local2.gameSpeed) <= doorImage.totalFrames){
doorImage.gotoAndStop((doorImage.currentFrame + _local2.gameSpeed));
} else {
doorImage.gotoAndStop(doorImage.totalFrames);
};
};
if (((isOpen) && ((doorImage.currentFrame >= doorImage.totalFrames)))){
isOpen = false;
doorImage.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 239
//TenantCafe (TenantCafe)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantCafe extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Places where young people hangs out. Also sell coffee";
public const TENANT_TYPE = "Food Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var closedSymbol:MovieClip;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var closedDoor:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var isClose;
public function TenantCafe(){
PRICE = [160, 180, 200];
UPGRADE_COST = [16500, 18000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
if (!isClose){
_arg1.dx = _arg1.dirrection;
_local2 = ((Math.random() * 10) < 0.5);
} else {
_local2 = (((_arg1.worldX > (((this.worldX + this.door.x) + (this.door.width / 2)) - 10))) && ((_arg1.worldX < (((this.worldX + this.door.x) + (this.door.width / 2)) + 10))));
};
return (_local2);
}
public function stolen(_arg1:MovieClip):void{
if ((((closedDoor.currentFrame >= 5)) && ((closedDoor.currentFrame < 15)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
closedDoor.gotoAndPlay(15);
isOpen = false;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
_arg1.isRepairing = true;
worker = _arg1;
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((_local4 is TenantSupermarket)) || ((_local4 is TenantIceCream)))){
_local2 = (_local2 + 2);
} else {
if ((((_local4 is TenantBabyShop)) || ((_local4 is TenantSalon)))){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantDrugStore)){
_local2 = (_local2 - 3);
};
};
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local1.restroomList.length) {
_local4 = _local1.restroomList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
_local2 = (_local2 - 2);
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = Math.round((_arg1.mood / 10));
_local3 = (_local2 - 5);
if (_local3 < 1){
_local3 = 1;
};
if (_arg1.specialVisitor){
_local3 = (_local3 + Math.floor((Math.random() * _local2)));
};
_local4 = (_local3 * PRICE[(tLevel - 1)]);
income = (income + _local4);
_local5 = root;
_local5.addCashUpdate(_local4, _arg1.worldX, (_arg1.worldY - _arg1.height), true);
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
isOpen = false;
}
function frame1(){
isOpen = false;
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((_local3 is TenantSupermarket)) || ((_local3 is TenantIceCream)))){
_local1.popularity = (_local1.popularity - 2);
} else {
if ((((_local3 is TenantBabyShop)) || ((_local3 is TenantSalon)))){
_local1.popularity = (_local1.popularity + 2);
} else {
if ((_local3 is TenantDrugStore)){
_local1.popularity = (_local1.popularity + 3);
};
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
_local1.popularity = (_local1.popularity + 2);
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
closedSymbol.visible = isClose;
if (isClose){
if (!isOpen){
if ((((closedDoor.currentLabel == "totalOpen")) && ((worker == null)))){
closedDoor.gotoAndPlay("closed");
};
} else {
if (closedDoor.currentLabel == "totalClosed"){
closedDoor.gotoAndPlay("open");
};
};
broken.gotoAndPlay(broken.totalFrames);
} else {
if (closedDoor.currentLabel == "totalClosed"){
closedDoor.gotoAndPlay("open");
};
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
isOpen = false;
}
public function EnterShop(_arg1:MovieClip):void{
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
}
public function finishStealing(_arg1:MovieClip):void{
if ((((closedDoor.currentFrame >= 5)) && ((closedDoor.currentFrame < 15)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
gotoAndPlay(15);
isOpen = false;
};
}
}
}//package
Section 240
//TenantCake (TenantCake)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantCake extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell bread and cake. Also sell tart cake";
public const TENANT_TYPE = "Food Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var isClose;
public function TenantCake(){
PRICE = [30, 50, 70];
UPGRADE_COST = [3000, 4000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
_local2 = 0;
_arg1.dx = _arg1.dirrection;
_local3 = (((_arg1.worldX > (((this.worldX + this.door.x) + this.door.width) - 10))) && ((_arg1.worldX < ((this.worldX + this.door.x) + this.door.width))));
return (_local3);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
_arg1.tryToEnter = false;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 3));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((_local4 is TenantSupermarket)) || ((_local4 is TenantCinema)))){
_local2 = (_local2 + 2);
} else {
if ((((_local4 is TenantBabyShop)) || ((_local4 is TenantSalon)))){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantDrugStore)){
_local2 = (_local2 - 3);
};
};
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local1.restroomList.length) {
_local4 = _local1.restroomList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
_local1.popularity = (_local1.popularity - 2);
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_local3 = Math.round((_arg1.mood / 10));
_local4 = (_local3 - 2);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((_local3 is TenantSupermarket)) || ((_local3 is TenantCinema)))){
_local1.popularity = (_local1.popularity - 2);
} else {
if ((((_local3 is TenantBabyShop)) || ((_local3 is TenantSalon)))){
_local1.popularity = (_local1.popularity + 2);
} else {
if ((_local3 is TenantDrugStore)){
_local1.popularity = (_local1.popularity + 3);
};
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
_local1.popularity = (_local1.popularity + 2);
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 3));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
door.gotoAndStop(1);
} else {
if ((door.currentFrame + _local2.gameSpeed) <= door.totalFrames){
door.gotoAndStop((door.currentFrame + _local2.gameSpeed));
} else {
door.gotoAndStop(door.totalFrames);
};
};
if (((isOpen) && ((door.currentFrame >= door.totalFrames)))){
isOpen = false;
door.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
};
}
}
}//package
Section 241
//TenantCinema (TenantCinema)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantCinema extends MovieClip {
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Show movie from any countries. Usually for remove stress. Also sell some snack";
public const MAX_LEVEL = 3;
public const PRICE:Array;
public const TENANT_TYPE = "Entertainment";
public const Meal:Array;
public var pass;
public var closedSymbol:MovieClip;
public var visitorList:Array;
public var doorImage:MovieClip;
public var i;
public var isOpen;
public var visitorCome:Number;
public var brokenLevel;
public var broken11:MovieClip;
public var broken13:MovieClip;
public var broken14:MovieClip;
public var broken15:MovieClip;
public var doorClosed:MovieClip;
public var broken10:MovieClip;
public var broken12:MovieClip;
public var broken16:MovieClip;
public var broken17:MovieClip;
public var broken18:MovieClip;
public var lightList;
public var isClose;
public var broken1:MovieClip;
public var broken2:MovieClip;
public var broken3:MovieClip;
public var broken4:MovieClip;
public var broken5:MovieClip;
public var broken6:MovieClip;
public var broken7:MovieClip;
public var broken8:MovieClip;
public var broken9:MovieClip;
public var worldX:Number;
public var worldY:Number;
public var outcome:Number;
public var tLevel;
public var worker;
public var ground:MovieClip;
public var isBroken;
public var body:MovieClip;
public var income:Number;
public var door:MovieClip;
public var broken:MovieClip;
public var justBroken;
public function TenantCinema(){
PRICE = [300, 320, 350];
UPGRADE_COST = [3000, 3500];
Meal = [30, 30, 30, 50, 50, 60];
super();
addFrameScript(0, frame1);
}
public function getCapacity():Number{
var _local1:*;
_local1 = (15 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
pass = false;
};
}
public function MoodManipulation(_arg1:Event):void{
var head:*;
var sp:*;
var target:*;
var moodIncrease:*;
var enjoyIncrease:*;
var modifier:*;
var amountItem:*;
var recive:*;
var event = _arg1;
head = root;
sp = 0;
while (sp < head.gameSpeed) {
target = event.currentTarget;
var _local3 = target;
with (_local3) {
if (otherDelay > 0){
otherDelay--;
} else {
moodIncrease = (Math.random() * 3);
if (isBroken){
moodIncrease = -((moodIncrease / 2));
};
mood = (mood + moodIncrease);
enjoyIncrease = ((moodIncrease * 5) - 10);
if (enjoyIncrease < 0){
enjoyIncrease = 0;
} else {
modifier = Math.round((target.mood / 10));
amountItem = (modifier - 3);
if (amountItem < 0){
amountItem = 0;
};
if (target.specialVisitor){
amountItem = (amountItem + Math.floor((Math.random() * modifier)));
};
recive = (Meal[Math.floor((Math.random() * Meal.length))] * amountItem);
income = (income + recive);
head.addCashUpdate(recive, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
};
enjoyingTime = (enjoyingTime + enjoyIncrease);
otherDelay = (otherDelay + (Math.round((Math.random() * 20)) + 40));
};
};
sp = (sp + 1);
};
}
function frame1(){
justBroken = true;
lightList = new Array();
lightList.push(broken1);
lightList.push(broken2);
lightList.push(broken3);
lightList.push(broken4);
lightList.push(broken5);
lightList.push(broken6);
lightList.push(broken7);
lightList.push(broken8);
lightList.push(broken9);
lightList.push(broken10);
lightList.push(broken11);
lightList.push(broken12);
lightList.push(broken13);
lightList.push(broken14);
lightList.push(broken15);
lightList.push(broken16);
lightList.push(broken17);
lightList.push(broken18);
i = 0;
while (i < lightList.length) {
lightList[i].isBroken = false;
i++;
};
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((_local3 is TenantBurger)){
_local1.popularity = (_local1.popularity - 4);
} else {
if ((_local3 is TenantIceCream)){
_local1.popularity = (_local1.popularity - 3);
} else {
if ((_local3 is TenantCake)){
_local1.popularity = (_local1.popularity - 2);
};
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
_local1.popularity = (_local1.popularity - 2);
};
};
_local2++;
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (15 + (tLevel * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = root;
if (((!(isOpen)) && (!(pass)))){
doorImage.gotoAndStop(1);
doorClosed.gotoAndStop(1);
} else {
if (((pass) && ((doorImage.currentFrame > 10)))){
doorImage.gotoAndStop(10);
doorClosed.gotoAndStop(10);
} else {
if ((doorImage.currentFrame + _local2.gameSpeed) <= doorImage.totalFrames){
doorImage.gotoAndStop((doorImage.currentFrame + _local2.gameSpeed));
doorClosed.gotoAndStop((doorClosed.currentFrame + _local2.gameSpeed));
} else {
doorImage.gotoAndStop(doorImage.totalFrames);
doorClosed.gotoAndStop(doorClosed.totalFrames);
};
};
};
_local3 = 0;
while (_local3 < lightList.length) {
if (isClose){
lightList[_local3].gotoAndPlay(lightList[_local3].totalFrames);
} else {
if (!lightList[_local3].isBroken){
lightList[_local3].gotoAndPlay(1);
};
};
_local3++;
};
closedSymbol.visible = isClose;
doorClosed.visible = isClose;
if (isClose){
pass = false;
broken.gotoAndPlay(broken.totalFrames);
} else {
if (isBroken){
if (justBroken){
_local4 = (Math.ceil(((Math.random() * lightList.length) - 5)) + 5);
_local3 = 0;
while (_local3 < lightList.length) {
if ((lightList.length - _local3) > _local4){
_local5 = (Math.random() * 100);
if (_local5 < 50){
lightList[_local3].isBroken = true;
_local4--;
};
} else {
lightList[_local3].isBroken = true;
_local4--;
};
_local3++;
};
justBroken = false;
};
} else {
if (!justBroken){
_local3 = 0;
while (_local3 < lightList.length) {
lightList[_local3].isBroken = false;
_local3++;
};
justBroken = true;
};
broken.gotoAndPlay(1);
};
};
if (((isOpen) && ((doorImage.currentFrame >= doorImage.totalFrames)))){
isOpen = false;
doorImage.gotoAndStop(1);
};
if (((isOpen) && ((doorClosed.currentFrame >= doorClosed.totalFrames)))){
isOpen = false;
doorClosed.gotoAndStop(1);
};
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
pass = !(isClose);
_arg1.dx = _arg1.dirrection;
_local2 = (((_arg1.worldX > (((this.worldX + this.door.x) + (this.door.width / 2)) - 5))) && ((_arg1.worldX < (((this.worldX + this.door.x) + (this.door.width / 2)) + 5))));
return (_local2);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((_local4 is TenantBurger)){
_local2 = (_local2 + 4);
} else {
if ((_local4 is TenantIceCream)){
_local2 = (_local2 + 3);
} else {
if ((_local4 is TenantCake)){
_local2 = (_local2 + 2);
};
};
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local1.restroomList.length) {
_local4 = _local1.restroomList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
_local2 = (_local2 + 2);
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.visiting = false;
_local3 = visitorList.indexOf(_arg1);
visitorList.splice(_local3, 1);
_arg1.removeEventListener(Event.ENTER_FRAME, MoodManipulation);
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
pass = false;
visitorCome++;
if (visitorList.indexOf(_arg1) < getCapacity()){
_local3 = PRICE[(tLevel - 1)];
income = (income + _local3);
_local2.addCashUpdate(_local3, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.otherDelay = (Math.round((Math.random() * 10)) + 50);
_arg1.addEventListener(Event.ENTER_FRAME, MoodManipulation);
};
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 242
//TenantDrugStore (TenantDrugStore)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantDrugStore extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell medicine and health supplies";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var isClose;
public function TenantDrugStore(){
PRICE = [20, 40, 60];
UPGRADE_COST = [2500, 3000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
_local2 = 0;
_arg1.dx = _arg1.dirrection;
_local3 = (((_arg1.worldX > ((this.worldX + this.door.x) + 20))) && ((_arg1.worldX < (((this.worldX + this.door.x) + this.door.width) - 20))));
return (_local3);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 3));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((((((((((_local4 is TenantCake)) || ((_local4 is TenantIceCream)))) || ((_local4 is TenantBurger)))) || ((_local4 is TenantSteak)))) || ((_local4 is TenantSushi)))) || ((_local4 is TenantCafe)))){
_local2 = (_local2 - 3);
};
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 8));
_local4 = (_local3 - 1);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((((((((((_local3 is TenantCake)) || ((_local3 is TenantIceCream)))) || ((_local3 is TenantBurger)))) || ((_local3 is TenantSteak)))) || ((_local3 is TenantSushi)))) || ((_local3 is TenantCafe)))){
_local1.popularity = (_local1.popularity + 3);
};
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 3));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
door.gotoAndStop(1);
} else {
if ((door.currentFrame + _local2.gameSpeed) <= door.totalFrames){
door.gotoAndStop((door.currentFrame + _local2.gameSpeed));
} else {
door.gotoAndStop(door.totalFrames);
};
};
if (((isOpen) && ((door.currentFrame >= door.totalFrames)))){
isOpen = false;
door.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 243
//TenantEmptySpace (TenantEmptySpace)
package {
import flash.display.*;
public dynamic class TenantEmptySpace extends MovieClip {
public var worldX:Number;
public var worldY:Number;
public function TenantEmptySpace(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 244
//TenantGameCenter (TenantGameCenter)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantGameCenter extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Good entertainment place. Favored by many young people";
public const TENANT_TYPE = "Entertainment";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var isClose;
public function TenantGameCenter(){
PRICE = [200, 220, 240];
UPGRADE_COST = [29000, 33000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
_arg1.dx = _arg1.dirrection;
_local2 = (((_arg1.worldX > (((this.worldX + this.door.x) + (this.door.width / 2)) - 5))) && ((_arg1.worldX < (((this.worldX + this.door.x) + (this.door.width / 2)) + 5))));
return (_local2);
}
public function stolen(_arg1:MovieClip):void{
_arg1.alpha = 0;
_arg1.isStealing = true;
}
public function getCapacity():Number{
var _local1:*;
_local1 = (15 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((_local4 is TenantToyStore)){
_local2 = (_local2 + 2);
};
};
};
_local3++;
};
return (_local2);
}
public function MoodManipulation(_arg1:Event):void{
var head:*;
var sp:*;
var target:*;
var moodIncrease:*;
var enjoyIncrease:*;
var recive:*;
var event = _arg1;
head = root;
sp = 0;
while (sp < head.gameSpeed) {
target = event.currentTarget;
var _local3 = target;
with (_local3) {
if (otherDelay > 0){
otherDelay--;
} else {
moodIncrease = (Math.random() * 3);
if (isBroken){
moodIncrease = -((moodIncrease / 2));
};
mood = (mood + moodIncrease);
enjoyIncrease = ((moodIncrease * 10) - 10);
if (enjoyIncrease < 0){
enjoyIncrease = 0;
} else {
recive = PRICE[(tLevel - 1)];
income = (income + recive);
head.addCashUpdate(recive, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
};
enjoyingTime = (enjoyingTime + enjoyIncrease);
otherDelay = (otherDelay + (Math.round((Math.random() * 20)) + 40));
};
};
sp = (sp + 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
_arg1.alpha = 1;
_arg1.visiting = false;
_local2 = visitorList.indexOf(_arg1);
visitorList.splice(_local2, 1);
_arg1.removeEventListener(Event.ENTER_FRAME, MoodManipulation);
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((_local3 is TenantToyStore)){
_local1.popularity = (_local1.popularity - 2);
};
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (15 + (tLevel * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
if (isClose){
broken.visible = true;
broken.gotoAndPlay(1);
} else {
broken.visible = isBroken;
};
}
public function FinishRepaired(_arg1:MovieClip):void{
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
}
public function EnterShop(_arg1:MovieClip):void{
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
if (visitorList.indexOf(_arg1) < getCapacity()){
_arg1.otherDelay = (Math.round((Math.random() * 10)) + 50);
_arg1.addEventListener(Event.ENTER_FRAME, MoodManipulation);
};
}
public function finishStealing(_arg1:MovieClip):void{
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
}
}
}//package
Section 245
//TenantHall (TenantHall)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantHall extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const EVENT_PRICE:Array;
public const TENANT_NOTE = "Hold events to attract more visitors";
public const TENANT_TYPE = "Entertainment";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var liveConcert:MovieClip;
public var visitorList:Array;
public var i;
public var tLevel;
public var ground:MovieClip;
public var eventList;
public var electronicExpo:MovieClip;
public var artExhibition:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var income:Number;
public var outcome:Number;
public var myParent;
public var lastEvent;
public var isClose;
public function TenantHall(){
PRICE = [1000, 1200, 1500];
EVENT_PRICE = [20000, 17500, 15000];
UPGRADE_COST = [55000, 67500];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
_arg1.dx = _arg1.dirrection;
_local2 = ((Math.random() * 10) < 0.5);
return (_local2);
}
public function getCapacity():Number{
var _local1:*;
_local1 = 100;
return (_local1);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
if (_arg1.mood > 90){
_local3 = new SE_Popularity();
_local3.play(0, 0, myParent.seTransform);
myParent.nextDayPopularity = (myParent.nextDayPopularity + 0.5);
myParent.addFlyingText("Popularity\nIncreased", _arg1.worldX, (_arg1.worldY - _arg1.height));
};
_arg1.visiting = false;
_arg1.removeEventListener(Event.ENTER_FRAME, MoodManipulation);
_local2 = visitorList.indexOf(_arg1);
visitorList.splice(_local2, 1);
}
function frame1(){
isBroken = false;
isClose = true;
visitorList = new Array();
myParent = root;
eventList = new Array();
eventList.push(artExhibition);
eventList.push(electronicExpo);
eventList.push(liveConcert);
i = 0;
while (i < eventList.length) {
eventList[i].alpha = 0;
eventList[i].visible = false;
i++;
};
addEventListener(Event.ENTER_FRAME, Animate);
lastEvent = -1;
stop();
}
public function MoodManipulation(_arg1:Event):void{
var head:*;
var sp:*;
var target:*;
var rnd:*;
var addEnjoy:*;
var event = _arg1;
head = root;
sp = 0;
while (sp < head.gameSpeed) {
target = event.currentTarget;
var _local3 = target;
with (_local3) {
if (otherDelay > 0){
otherDelay--;
} else {
rnd = (Math.random() * 5);
switch (rnd){
case 1:
dx = 1;
break;
case 2:
dx = -1;
break;
default:
dx = 0;
};
addEnjoy = (Math.floor((Math.random() * 25)) - 3);
enjoyingTime = (enjoyingTime + addEnjoy);
if (addEnjoy > 16){
mood = (mood + (1.2 * ACCEL_MOOD));
} else {
if (addEnjoy > 7){
mood = (mood + (0.3 * ACCEL_MOOD));
};
};
otherDelay = (Math.round((Math.random() * 20)) + 40);
};
};
if (target.dx != 0){
if (target.worldX <= (worldX + door.x)){
target.dx = 1;
} else {
if (target.worldX >= ((worldX + door.x) + door.width)){
target.dx = -1;
};
};
};
target.worldX = (target.worldX + target.dx);
if (isClose){
ExitShop(target);
break;
};
sp = (sp + 1);
};
}
public function Animate(_arg1:Event):void{
var _local2:*;
var _local3:*;
if ((((myParent.nowEvent >= 0)) || ((myParent.bookedEvent >= 0)))){
if (lastEvent < 0){
_local2 = myParent.nowEvent;
if (_local2 < 0){
_local2 = myParent.bookedEvent;
};
_local3 = eventList[_local2];
_local3.visible = true;
if (_local3.alpha < 1){
_local3.alpha = (_local3.alpha + 0.1);
} else {
lastEvent = _local2;
};
};
} else {
if (lastEvent >= 0){
_local3 = eventList[lastEvent];
if (_local3.alpha > 0){
_local3.alpha = (_local3.alpha - 0.1);
} else {
_local3.visible = false;
lastEvent = -1;
};
};
};
if (myParent.nowEvent >= 0){
if ((((myParent.dayTime >= 12)) && ((myParent.dayTime < 22)))){
isClose = false;
} else {
isClose = true;
};
} else {
isClose = true;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
if (visitorList.indexOf(_arg1) < getCapacity()){
_local2 = PRICE[(tLevel - 1)];
income = (income + _local2);
myParent.addCashUpdate(_local2, _arg1.worldX, (_arg1.worldY - _arg1.height), true);
_arg1.otherDelay = (Math.round((Math.random() * 10)) + 50);
_arg1.addEventListener(Event.ENTER_FRAME, MoodManipulation);
};
}
}
}//package
Section 246
//TenantIceCream (TenantIceCream)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantIceCream extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell ice cream. Favored when hot wheater";
public const TENANT_TYPE = "Food Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var defaultServeTime;
public var tLevel;
public var serveTime;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var waiter:MovieClip;
public var isClose;
public function TenantIceCream(){
PRICE = [30, 50, 70];
UPGRADE_COST = [3000, 4000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
return (true);
}
public function stolen(_arg1:MovieClip):void{
_arg1.alpha = 0;
_arg1.isStealing = true;
}
public function getCapacity():Number{
var _local1:*;
_local1 = (2 + (tLevel * 3));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
_arg1.isRepairing = true;
worker = _arg1;
_arg1.worldX = (this.worldX + (this.width / 2));
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((_local4 is TenantCafe)){
_local2 = (_local2 + 2);
} else {
if ((((_local4 is TenantBurger)) || ((_local4 is TenantCinema)))){
_local2 = (_local2 + 3);
} else {
if ((((((((_local4 is TenantBabyShop)) || ((_local4 is TenantSalon)))) || ((_local4 is TenantBoutiqueA)))) || ((_local4 is TenantBoutiqueB)))){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantDrugStore)){
_local2 = (_local2 - 3);
};
};
};
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local1.restroomList.length) {
_local4 = _local1.restroomList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
_local2 = (_local2 - 2);
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_arg1.visiting = false;
if (_arg1.enjoyingTime > 0){
_local3 = Math.round((_arg1.mood / 10));
_local4 = (_local3 - 3);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local6 = root;
_local6.addCashUpdate(_local5, (this.worldX + (this.width / 2)), (this.worldY + (this.height / 2)), true);
_arg1.mood = (_arg1.mood + 3);
} else {
_arg1.mood = (_arg1.mood - 5);
};
_local2 = visitorList.indexOf(_arg1);
visitorList.splice(_local2, 1);
}
function frame1(){
defaultServeTime = 120;
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function VisitorQueue(_arg1:Event):void{
var head:*;
var sp:*;
var firstLine:*;
var i:*;
var temp:*;
var tempPos:*;
var event = _arg1;
head = root;
sp = 0;
while (sp < head.gameSpeed) {
if (visitorList.length > 0){
firstLine = ((this.worldX + this.waiter.x) + 20);
visitorList[0].enjoyingTime = 100;
if (visitorList[0].worldX <= firstLine){
serveTime--;
if (serveTime <= 0){
serveTime = defaultServeTime;
temp = visitorList[0];
ExitShop(temp);
if (visitorList.length > 0){
visitorList[0].enjoyingTime = 100;
};
};
};
i = 0;
while (i < visitorList.length) {
tempPos = (((this.worldX + this.waiter.x) + 20) + (30 * i));
visitorList[i].dirrection = -1;
if (visitorList[i].worldX > tempPos){
if (visitorList[i].currentFrame != 3){
visitorList[i].gotoAndPlay(3);
};
visitorList[i].dx = visitorList[i].dirrection;
visitorList[i].worldX = (visitorList[i].worldX + visitorList[i].dx);
} else {
var _local3 = visitorList[i];
with (_local3) {
visitorList[i].dx = 0;
scaleX = -1;
if (visitorList[i].currentFrame != 2){
gotoAndPlay(2);
};
worldX = tempPos;
if (worldX > (floorPos.worldX + floorPos.width)){
worldX = ((floorPos.worldX + floorPos.width) - 10);
};
};
};
i = (i + 1);
};
} else {
removeEventListener(Event.ENTER_FRAME, VisitorQueue);
break;
};
sp = (sp + 1);
};
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((_local3 is TenantCafe)){
_local1.popularity = (_local1.popularity - 2);
} else {
if ((((_local3 is TenantBurger)) || ((_local3 is TenantCinema)))){
_local1.popularity = (_local1.popularity - 3);
} else {
if ((((((((_local3 is TenantBabyShop)) || ((_local3 is TenantSalon)))) || ((_local3 is TenantBoutiqueA)))) || ((_local3 is TenantBoutiqueB)))){
_local1.popularity = (_local1.popularity + 2);
} else {
if ((_local3 is TenantDrugStore)){
_local1.popularity = (_local1.popularity + 3);
};
};
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
_local1.popularity = (_local1.popularity + 2);
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (2 + ((tLevel + 1) * 3));
return (_local1);
}
public function Animate(_arg1:Event):void{
waiter.visible = !(isClose);
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
}
public function EnterShop(_arg1:MovieClip):void{
_arg1.visiting = true;
if (visitorList.length <= 0){
serveTime = (defaultServeTime / tLevel);
addEventListener(Event.ENTER_FRAME, VisitorQueue);
};
visitorList.push(_arg1);
visitorCome++;
}
public function finishStealing(_arg1:MovieClip):void{
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
}
}
}//package
Section 247
//TenantJewelry (TenantJewelry)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantJewelry extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell rings, necklaces and others expansive accesories";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var isClose;
public function TenantJewelry(){
PRICE = [300, 400, 500];
UPGRADE_COST = [16500, 18000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
_local2 = 0;
_arg1.dx = _arg1.dirrection;
_local3 = (((_arg1.worldX > (((this.worldX + this.door.x) + this.door.width) - 10))) && ((_arg1.worldX < ((this.worldX + this.door.x) + this.door.width))));
return (_local3);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((_local4 is TenantBoutiqueA)) || ((_local4 is TenantBoutiqueB)))){
_local2 = (_local2 + 2);
} else {
if ((_local4 is TenantSalon)){
_local2 = (_local2 + 1);
};
};
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 20));
_local4 = (_local3 - 3);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((_local3 is TenantBoutiqueA)) || ((_local3 is TenantBoutiqueB)))){
_local1.popularity = (_local1.popularity - 2);
} else {
if ((_local3 is TenantSalon)){
_local1.popularity = (_local1.popularity - 1);
};
};
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
door.gotoAndStop(1);
} else {
if ((door.currentFrame + _local2.gameSpeed) <= door.totalFrames){
door.gotoAndStop((door.currentFrame + _local2.gameSpeed));
} else {
door.gotoAndStop(door.totalFrames);
};
};
if (((isOpen) && ((door.currentFrame >= door.totalFrames)))){
isOpen = false;
door.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 248
//TenantSalon (TenantSalon)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantSalon extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Place for people where his or her want to change hair style. Favored by girls";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var enterance:MovieClip;
public var tLevel;
public var ground:MovieClip;
public var closedDoor:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var waiter:MovieClip;
public var isClose;
public function TenantSalon(){
PRICE = [80, 120, 160];
UPGRADE_COST = [7500, 9000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
if (!isClose){
_local2 = (((_arg1.worldX > (((this.worldX + this.enterance.x) + (this.enterance.width / 2)) - 10))) && ((_arg1.worldX < (((this.worldX + this.enterance.x) + (this.enterance.width / 2)) + 20))));
} else {
_local2 = (((_arg1.worldX > ((this.worldX + this.door.x) + 20))) && ((_arg1.worldX < (((this.worldX + this.door.x) + this.door.width) - 20))));
};
return (_local2);
}
public function stolen(_arg1:MovieClip):void{
if ((((closedDoor.currentFrame >= 5)) && ((closedDoor.currentFrame < 15)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
closedDoor.gotoAndPlay(15);
isOpen = false;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((((((((((_local4 is TenantCake)) || ((_local4 is TenantIceCream)))) || ((_local4 is TenantBurger)))) || ((_local4 is TenantSteak)))) || ((_local4 is TenantSushi)))) || ((_local4 is TenantCafe)))){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantJewelry)){
_local2 = (_local2 + 1);
};
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local1.restroomList.length) {
_local4 = _local1.restroomList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
_local2 = (_local2 - 3);
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = Math.round((_arg1.mood / 10));
_local3 = (_local2 - 4);
if (_local3 < 1){
_local3 = 1;
};
if (_arg1.specialVisitor){
_local3 = (_local3 + Math.floor((Math.random() * _local2)));
};
_local4 = (_local3 * PRICE[(tLevel - 1)]);
income = (income + _local4);
_local5 = root;
_local5.addCashUpdate(_local4, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
isOpen = false;
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((((((((((_local3 is TenantCake)) || ((_local3 is TenantIceCream)))) || ((_local3 is TenantBurger)))) || ((_local3 is TenantSteak)))) || ((_local3 is TenantSushi)))) || ((_local3 is TenantCafe)))){
_local1.popularity = (_local1.popularity + 2);
} else {
if ((_local3 is TenantJewelry)){
_local1.popularity = (_local1.popularity - 1);
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
_local1.popularity = (_local1.popularity + 3);
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
waiter.visible = !(isClose);
if (isClose){
if (!isOpen){
if ((((closedDoor.currentLabel == "totalOpen")) && ((worker == null)))){
closedDoor.gotoAndPlay("closed");
};
} else {
if (closedDoor.currentLabel == "totalClosed"){
closedDoor.gotoAndPlay("open");
};
};
broken.gotoAndPlay(broken.totalFrames);
} else {
if (closedDoor.currentLabel == "totalClosed"){
closedDoor.gotoAndPlay("open");
};
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
isOpen = false;
_arg1.destination = null;
}
public function EnterShop(_arg1:MovieClip):void{
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
}
public function finishStealing(_arg1:MovieClip):void{
if ((((closedDoor.currentFrame >= 5)) && ((closedDoor.currentFrame < 15)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
gotoAndPlay(15);
isOpen = false;
};
}
}
}//package
Section 249
//TenantSteak (TenantSteak)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantSteak extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell hot plates. Favored when cold or rainy";
public const TENANT_TYPE = "Food Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var waiter:MovieClip;
public var isClose;
public function TenantSteak(){
PRICE = [150, 170, 200];
UPGRADE_COST = [17000, 18500];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
_arg1.dx = _arg1.dirrection;
_local2 = (((_arg1.worldX > (((this.worldX + this.door.x) + (this.door.width / 2)) - 5))) && ((_arg1.worldX < (((this.worldX + this.door.x) + (this.door.width / 2)) + 5))));
return (_local2);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((_local4 is TenantSupermarket)) || ((_local4 is TenantSushi)))){
_local2 = (_local2 + 2);
} else {
if ((((_local4 is TenantBabyShop)) || ((_local4 is TenantSalon)))){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantDrugStore)){
_local2 = (_local2 - 3);
};
};
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local1.restroomList.length) {
_local4 = _local1.restroomList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
_local2 = (_local2 - 2);
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 10));
_local4 = (_local3 - 2);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((_local3 is TenantSupermarket)) || ((_local3 is TenantSushi)))){
_local1.popularity = (_local1.popularity - 2);
} else {
if ((((_local3 is TenantBabyShop)) || ((_local3 is TenantSalon)))){
_local1.popularity = (_local1.popularity + 2);
} else {
if ((_local3 is TenantDrugStore)){
_local1.popularity = (_local1.popularity + 3);
};
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
_local1.popularity = (_local1.popularity + 2);
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (!isOpen){
door.gotoAndStop(1);
} else {
if ((door.currentFrame + _local2.gameSpeed) <= door.totalFrames){
door.gotoAndStop((door.currentFrame + _local2.gameSpeed));
} else {
door.gotoAndStop(door.totalFrames);
};
};
if (((isOpen) && ((door.currentFrame >= door.totalFrames)))){
isOpen = false;
door.gotoAndStop(1);
};
waiter.visible = !(isClose);
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 250
//TenantSupermarket (TenantSupermarket)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantSupermarket extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell fruits, vegetables, snack and many kind of house supplies and needs";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var exitPoint;
public var closedSymbol:MovieClip;
public var visitorList:Array;
public var enterance:MovieClip;
public var exitPoint1:MovieClip;
public var exitPoint4:MovieClip;
public var exitPoint3:MovieClip;
public var tLevel;
public var ground:MovieClip;
public var exitPoint2:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var income:Number;
public var outcome:Number;
public var brokenLevel;
public var broken:MovieClip;
public var isClose;
public function TenantSupermarket(){
PRICE = [150, 200, 250];
UPGRADE_COST = [25000, 30000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
var _local3:*;
_local2 = root;
if (_local2.banditList.indexOf(_arg1) < 0){
_arg1.dx = _arg1.dirrection;
_local3 = (((_arg1.worldX > (((this.worldX + this.door.x) + (this.door.width / 2)) - 10))) && ((_arg1.worldX < (((this.worldX + this.door.x) + (this.door.width / 2)) + 10))));
} else {
_local3 = (((_arg1.worldX > (((this.worldX + this.enterance.x) + (this.enterance.width / 2)) - 10))) && ((_arg1.worldX < (((this.worldX + this.enterance.x) + (this.enterance.width / 2)) + 10))));
};
return (_local3);
}
public function stolen(_arg1:MovieClip):void{
if ((((closedSymbol.currentFrame >= 5)) && ((closedSymbol.currentFrame < 15)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
isOpen = false;
closedSymbol.gotoAndPlay(15);
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (15 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
_local3 = Math.floor((Math.random() * exitPoint.length));
_local4 = (door.x - exitPoint[_local3].x);
_arg1.worldX = (_arg1.worldX - _local4);
};
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((((((((((_local4 is TenantCake)) || ((_local4 is TenantIceCream)))) || ((_local4 is TenantBurger)))) || ((_local4 is TenantSteak)))) || ((_local4 is TenantSushi)))) || ((_local4 is TenantCafe)))){
_local2 = (_local2 + 2);
};
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = Math.round((_arg1.mood / 5));
_local3 = _local2;
if (_local3 < 1){
_local3 = 1;
};
if (_arg1.specialVisitor){
_local3 = (_local3 + Math.floor((Math.random() * _local2)));
};
_local4 = (_local3 * PRICE[(tLevel - 1)]);
income = (income + _local4);
_local5 = root;
_local5.addCashUpdate(_local4, _arg1.worldX, (_arg1.worldY - _arg1.height), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
}
function frame1(){
exitPoint = new Array();
exitPoint.push(exitPoint1);
exitPoint.push(exitPoint2);
exitPoint.push(exitPoint3);
exitPoint.push(exitPoint4);
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((((((((((_local3 is TenantCake)) || ((_local3 is TenantIceCream)))) || ((_local3 is TenantBurger)))) || ((_local3 is TenantSteak)))) || ((_local3 is TenantSushi)))) || ((_local3 is TenantCafe)))){
_local1.popularity = (_local1.popularity - 2);
};
};
};
_local2++;
};
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (((!(isOpen)) || (((isClose) && ((worker == null)))))){
door.gotoAndStop(1);
} else {
if ((door.currentFrame + _local2.gameSpeed) <= door.totalFrames){
door.gotoAndStop((door.currentFrame + _local2.gameSpeed));
} else {
door.gotoAndStop(door.totalFrames);
};
};
if (isClose){
if (!isOpen){
if ((((closedSymbol.currentLabel == "totalOpen")) && ((worker == null)))){
closedSymbol.gotoAndPlay("closed");
};
} else {
if (closedSymbol.currentLabel == "totalClosed"){
closedSymbol.gotoAndPlay("open");
};
};
broken.gotoAndPlay(broken.totalFrames);
} else {
if (closedSymbol.currentLabel == "totalClosed"){
closedSymbol.gotoAndPlay("open");
};
if (!isBroken){
broken.gotoAndPlay(1);
};
};
if (((isOpen) && ((door.currentFrame >= door.totalFrames)))){
isOpen = false;
door.gotoAndStop(1);
};
}
public function FinishRepaired(_arg1:MovieClip):void{
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
isOpen = false;
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = root;
if ((((door.currentFrame >= 10)) && (((door.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
_local3 = Math.floor((Math.random() * exitPoint.length));
_local4 = (door.x - exitPoint[_local3].x);
_arg1.worldX = (_arg1.worldX - _local4);
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
if ((((closedSymbol.currentFrame >= 5)) && ((closedSymbol.currentFrame < 15)))){
_arg1.alpha = 1;
isOpen = false;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
closedSymbol.gotoAndPlay(15);
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (15 + (tLevel * 5));
return (_local1);
}
}
}//package
Section 251
//TenantSushi (TenantSushi)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantSushi extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell Japanesse Food. Favourite when in Japan";
public const TENANT_TYPE = "Food Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var closedSymbol:MovieClip;
public var visitorList:Array;
public var tLevel;
public var ground:MovieClip;
public var closedDoor:MovieClip;
public var isBroken;
public var visitorCome:Number;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var waiter:MovieClip;
public var isClose;
public function TenantSushi(){
PRICE = [100, 120, 150];
UPGRADE_COST = [12000, 14000];
super();
addFrameScript(0, frame1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
_arg1.dx = _arg1.dirrection;
_local2 = (((_arg1.worldX > (((this.worldX + this.door.x) + (this.door.width / 2)) - 5))) && ((_arg1.worldX < (((this.worldX + this.door.x) + (this.door.width / 2)) + 5))));
return (_local2);
}
public function stolen(_arg1:MovieClip):void{
if ((((closedDoor.currentFrame >= 5)) && ((closedDoor.currentFrame < 15)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
closedDoor.gotoAndPlay(15);
isOpen = false;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function RepairShop(_arg1:MovieClip):void{
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((((_local4 is TenantSupermarket)) || ((_local4 is TenantSteak)))){
_local2 = (_local2 + 2);
} else {
if ((((_local4 is TenantBabyShop)) || ((_local4 is TenantSalon)))){
_local2 = (_local2 - 2);
} else {
if ((_local4 is TenantDrugStore)){
_local2 = (_local2 - 3);
};
};
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local1.restroomList.length) {
_local4 = _local1.restroomList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
_local2 = (_local2 - 2);
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = Math.round((_arg1.mood / 10));
_local3 = (_local2 - 3);
if (_local3 < 1){
_local3 = 1;
};
if (_arg1.specialVisitor){
_local3 = (_local3 + Math.floor((Math.random() * _local2)));
};
_local4 = (_local3 * PRICE[(tLevel - 1)]);
income = (income + _local4);
_local5 = root;
_local5.addCashUpdate(_local4, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
isOpen = false;
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((((_local3 is TenantSupermarket)) || ((_local3 is TenantSteak)))){
_local1.popularity = (_local1.popularity - 2);
} else {
if ((((_local3 is TenantBabyShop)) || ((_local3 is TenantSalon)))){
_local1.popularity = (_local1.popularity + 2);
} else {
if ((_local3 is TenantDrugStore)){
_local1.popularity = (_local1.popularity + 3);
};
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
_local1.popularity = (_local1.popularity + 2);
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
closedSymbol.visible = ((isClose) || (!((closedDoor.currentLabel == "totalOpen"))));
waiter.visible = !(isClose);
if (isClose){
if (!isOpen){
if ((((closedDoor.currentLabel == "totalOpen")) && ((worker == null)))){
closedDoor.gotoAndPlay("closed");
};
} else {
if (closedDoor.currentLabel == "totalClosed"){
closedDoor.gotoAndPlay("open");
};
};
broken.gotoAndPlay(broken.totalFrames);
} else {
if (closedDoor.currentLabel == "totalClosed"){
closedDoor.gotoAndPlay("open");
};
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
isOpen = false;
}
public function EnterShop(_arg1:MovieClip):void{
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
visitorCome++;
}
public function finishStealing(_arg1:MovieClip):void{
if ((((closedDoor.currentFrame >= 5)) && ((closedDoor.currentFrame < 15)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
gotoAndPlay(15);
isOpen = false;
};
}
}
}//package
Section 252
//TenantToyStore (TenantToyStore)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TenantToyStore extends MovieClip {
public const PRICE:Array;
public const UPGRADE_COST:Array;
public const TENANT_NOTE = "Sell kid's toys and action figures. Also sell dolls and boardgames";
public const TENANT_TYPE = "Shop Center";
public const MAX_LEVEL = 3;
public var worldX:Number;
public var worldY:Number;
public var visitorList:Array;
public var pass;
public var tLevel;
public var ground:MovieClip;
public var isBroken;
public var doorImage:MovieClip;
public var outcome:Number;
public var body:MovieClip;
public var isOpen;
public var door:MovieClip;
public var worker;
public var brokenLevel;
public var income:Number;
public var broken:MovieClip;
public var visitorCome:Number;
public var isClose;
public function TenantToyStore(){
PRICE = [120, 150, 200];
UPGRADE_COST = [12000, 14000];
super();
addFrameScript(0, frame1);
}
public function stolen(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isStealing = true;
};
}
public function getCapacity():Number{
var _local1:*;
_local1 = (5 + (tLevel * 5));
return (_local1);
}
public function Visited(_arg1:MovieClip):Boolean{
var _local2:*;
pass = !(isClose);
_arg1.dx = _arg1.dirrection;
_local2 = (((_arg1.worldX > (((this.worldX + this.door.x) + (this.door.width / 2)) - 5))) && ((_arg1.worldX < (((this.worldX + this.door.x) + (this.door.width / 2)) + 5))));
return (_local2);
}
public function testBuildRelation():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = root;
_local2 = 0;
_local3 = 0;
while (_local3 < _local1.tenantList.length) {
_local4 = _local1.tenantList[_local3];
if (((!((_local4 == this))) && ((_local4.ground == ground)))){
_local5 = (worldX - (_local4.worldX + _local4.width));
_local6 = (_local4.worldX - (this.worldX + this.width));
if ((((((_local5 >= 0)) && ((_local5 <= 48)))) || ((((_local6 >= 0)) && ((_local6 <= 48)))))){
if ((_local4 is TenantBookStore)){
_local2 = (_local2 + 1);
} else {
if ((_local4 is TenantGameCenter)){
_local2 = (_local2 + 2);
};
};
};
};
_local3++;
};
return (_local2);
}
public function ExitShop(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_local3 = Math.round((_arg1.mood / 10));
_local4 = (_local3 - 4);
if (_local4 < 1){
_local4 = 1;
};
if (_arg1.specialVisitor){
_local4 = (_local4 + Math.floor((Math.random() * _local3)));
};
_local5 = (_local4 * PRICE[(tLevel - 1)]);
income = (income + _local5);
_local2.addCashUpdate(_local5, ((this.worldX + this.door.x) + (this.door.width / 2)), (this.worldY + this.door.y), true);
_arg1.alpha = 1;
_arg1.visiting = false;
_local6 = visitorList.indexOf(_arg1);
visitorList.splice(_local6, 1);
};
}
function frame1(){
visitorList = new Array();
addEventListener(Event.ENTER_FRAME, Animate);
stop();
}
public function restoreRelation():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = root;
_local2 = 0;
while (_local2 < _local1.tenantList.length) {
_local3 = _local1.tenantList[_local2];
if (((!((_local3 == this))) && ((_local3.ground == ground)))){
_local4 = (worldX - (_local3.worldX + _local3.width));
_local5 = (_local3.worldX - (this.worldX + this.width));
if ((((((_local4 >= 0)) && ((_local4 <= 48)))) || ((((_local5 >= 0)) && ((_local5 <= 48)))))){
if ((_local3 is TenantBookStore)){
_local1.popularity = (_local1.popularity - 1);
} else {
if ((_local3 is TenantGameCenter)){
_local1.popularity = (_local1.popularity - 2);
};
};
};
};
_local2++;
};
}
public function getUpgradeCapacity():Number{
var _local1:*;
_local1 = (5 + ((tLevel + 1) * 5));
return (_local1);
}
public function Animate(_arg1:Event):void{
var _local2:*;
_local2 = root;
if (((!(isOpen)) && (!(pass)))){
doorImage.gotoAndStop(1);
} else {
if (((pass) && ((doorImage.currentFrame > 10)))){
doorImage.gotoAndStop(10);
} else {
if ((doorImage.currentFrame + _local2.gameSpeed) <= doorImage.totalFrames){
doorImage.gotoAndStop((doorImage.currentFrame + _local2.gameSpeed));
} else {
doorImage.gotoAndStop(doorImage.totalFrames);
};
};
};
if (((isOpen) && ((doorImage.currentFrame >= doorImage.totalFrames)))){
isOpen = false;
doorImage.gotoAndStop(1);
};
if (isClose){
broken.gotoAndPlay(broken.totalFrames);
} else {
if (!isBroken){
broken.gotoAndPlay(1);
};
};
}
public function FinishRepaired(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isRepairing = false;
worker = null;
_arg1.destination = null;
};
}
public function RepairShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.isRepairing = true;
worker = _arg1;
pass = false;
};
}
public function EnterShop(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 0;
_arg1.visiting = true;
visitorList.push(_arg1);
pass = false;
visitorCome++;
};
}
public function finishStealing(_arg1:MovieClip):void{
var _local2:*;
_local2 = root;
if ((((doorImage.currentFrame >= 10)) && (((doorImage.currentFrame - _local2.gameSpeed) < 10)))){
_arg1.alpha = 1;
_arg1.isStealing = false;
_arg1.destination = null;
_arg1.tryToEnter = false;
};
}
}
}//package
Section 253
//TipsNote (TipsNote)
package {
import flash.display.*;
public dynamic class TipsNote extends MovieClip {
public var note:MovieClip;
public function TipsNote(){
addFrameScript(148, frame149);
}
function frame149(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 254
//TokyoBoothAvailable (TokyoBoothAvailable)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TokyoBoothAvailable extends MovieClip {
public var btnStartGame:SimpleButton;
public var head;
public function TokyoBoothAvailable(){
addFrameScript(12, frame13, 25, frame26);
}
public function RemoveThisObject(_arg1:MouseEvent):void{
this.parent.removeChild(this);
}
function frame13(){
head = root;
btnStartGame.addEventListener(MouseEvent.CLICK, head.StartGame);
btnStartGame.addEventListener(MouseEvent.CLICK, RemoveThisObject);
}
function frame26(){
gotoAndPlay("BlinkStart");
}
}
}//package
Section 255
//TutorialArrow (TutorialArrow)
package {
import flash.display.*;
public dynamic class TutorialArrow extends MovieClip {
}
}//package
Section 256
//TutorialNotification (TutorialNotification)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class TutorialNotification extends MovieClip {
public var lower:MovieClip;
public var left:MovieClip;
public var nextTutor:SimpleButton;
public var right:MovieClip;
public var theText;
public var noteText:TextField;
public var tempText;
public var hasNextButton;
public var upperRight:MovieClip;
public var lowerLeft:MovieClip;
public var body:MovieClip;
public var upper:MovieClip;
public var lowerRight:MovieClip;
public var upperLeft:MovieClip;
public function TutorialNotification(){
addFrameScript(0, frame1);
}
public function NextTutor(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.MOUSE_OVER, MouseOverEvent);
removeEventListener(MouseEvent.MOUSE_OUT, MouseOutEvent);
this.parent.removeChild(this);
}
function frame1(){
theText = "";
noteText.autoSize = TextFieldAutoSize.CENTER;
noteText.mouseEnabled = false;
body.width = noteText.width;
body.height = noteText.height;
body.x = (-(body.width) / 2);
body.y = (-(body.height) / 2);
nextTutor.visible = false;
if (hasNextButton){
body.height = (body.height + nextTutor.height);
nextTutor.x = ((body.x + body.width) - nextTutor.width);
nextTutor.y = ((body.y + body.height) - nextTutor.height);
};
noteText.x = body.x;
noteText.y = body.y;
theText = noteText.htmlText;
noteText.htmlText = "";
upper.x = body.x;
upper.y = (body.y - upper.height);
upper.width = body.width;
lower.x = body.x;
lower.y = (body.y + body.height);
lower.width = body.width;
left.x = (body.x - left.width);
left.y = body.y;
left.height = body.height;
right.x = (body.x + body.width);
right.y = body.y;
right.height = body.height;
upperLeft.x = (body.x - upperLeft.width);
upperLeft.y = (body.y - upperLeft.height);
upperRight.x = (body.x + body.width);
upperRight.y = (body.y - upperRight.height);
lowerLeft.x = (body.x - lowerLeft.width);
lowerLeft.y = (body.y + body.height);
lowerRight.x = (body.x + body.width);
lowerRight.y = (body.y + body.height);
tempText = "";
addEventListener(Event.ENTER_FRAME, TextAnimation);
stage.addEventListener(MouseEvent.CLICK, SkipTextAnimation);
stage.addEventListener(KeyboardEvent.KEY_UP, SkipTextWithKey);
addEventListener(MouseEvent.MOUSE_OVER, MouseOverEvent);
addEventListener(MouseEvent.MOUSE_OUT, MouseOutEvent);
}
public function MouseOverEvent(_arg1:MouseEvent):void{
var _local2:*;
_local2 = root;
_local2.mouseInUI = true;
}
public function SkipTextAnimation(_arg1:MouseEvent):void{
tempText = (tempText + theText);
theText = "";
}
public function MouseOutEvent(_arg1:MouseEvent):void{
var _local2:*;
_local2 = root;
_local2.mouseInUI = false;
}
public function SkipTextWithKey(_arg1:KeyboardEvent):void{
tempText = (tempText + theText);
theText = "";
}
public function TextAnimation(_arg1:Event):void{
var _local2:*;
var _local3:*;
if (theText.charAt(0) == "<"){
_local2 = (theText.indexOf(">") + 1);
while (theText.charAt(_local2) == "<") {
_local3 = theText.indexOf(">", _local2);
_local2 = (_local3 + 1);
};
} else {
_local2 = 1;
};
tempText = (tempText + theText.substr(0, _local2));
theText = theText.substr(_local2, theText.length);
noteText.htmlText = tempText;
if (theText.length <= 0){
stage.removeEventListener(MouseEvent.CLICK, SkipTextAnimation);
stage.removeEventListener(KeyboardEvent.KEY_UP, SkipTextWithKey);
removeEventListener(Event.ENTER_FRAME, TextAnimation);
if (hasNextButton){
nextTutor.visible = true;
nextTutor.addEventListener(MouseEvent.CLICK, NextTutor);
};
};
}
}
}//package
Section 257
//UI_CashUpdatePurchase (UI_CashUpdatePurchase)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_CashUpdatePurchase extends MovieClip {
public var worldX;
public var worldY;
public var dyMod;
public var beginAlpha;
public var clip:MovieClip;
public var scaleMod;
public var dy;
public var dx;
public var alphaMod;
public var head;
public function UI_CashUpdatePurchase(){
addFrameScript(0, frame1, 24, frame25);
}
public function UpdatePosition(_arg1:Event):void{
this.x = (worldX - head.cameraX);
this.y = (worldY - head.cameraY);
this.visible = head.drawArea.hitTestObject(this);
clip.x = (clip.x + dx);
clip.y = (clip.y - dy);
clip.scaleX = (clip.scaleX + scaleMod);
clip.scaleY = (clip.scaleY + scaleMod);
dy = (dy - dyMod);
if (this.currentFrame > beginAlpha){
this.alpha = (this.alpha - alphaMod);
};
}
function frame1(){
dy = 8;
scaleMod = (0.5 / this.totalFrames);
dyMod = (dy / (this.totalFrames - 10));
beginAlpha = 20;
alphaMod = (1 / (this.totalFrames - beginAlpha));
head = root;
dx = (((Math.floor((Math.random() * 2)) * 2) - 1) * 2);
addEventListener(Event.ENTER_FRAME, UpdatePosition);
}
function frame25(){
stop();
removeEventListener(Event.ENTER_FRAME, UpdatePosition);
this.parent.removeChild(this);
}
}
}//package
Section 258
//UI_CashUpdateRecive (UI_CashUpdateRecive)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_CashUpdateRecive extends MovieClip {
public var worldX;
public var worldY;
public var clip:MovieClip;
public var staticPosition;
public var head;
public function UI_CashUpdateRecive(){
addFrameScript(0, frame1, 30, frame31);
}
public function UpdatePosition(_arg1:Event):void{
if (staticPosition){
this.x = worldX;
this.y = worldY;
} else {
this.x = (worldX - head.cameraX);
this.y = (worldY - head.cameraY);
};
this.visible = head.drawArea.hitTestObject(this);
}
function frame1(){
head = root;
addEventListener(Event.ENTER_FRAME, UpdatePosition);
}
function frame31(){
stop();
removeEventListener(Event.ENTER_FRAME, UpdatePosition);
this.parent.removeChild(this);
}
}
}//package
Section 259
//UI_EmployeeInformation (UI_EmployeeInformation)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_EmployeeInformation extends MovieClip {
public var salaryText;
public var maxUpgrade:MovieClip;
public var upgradeNote;
public var btnUpFloor:SimpleButton;
public var crewType:TextField;
public var levelSymbol;
public var starLevel;
public var standartNote:MovieClip;
public var i;
public var visitorRelation;
public var colorMod;
public var btnPrevCrew:SimpleButton;
public var shiftFloor:TextField;
public var btnFire:SimpleButton;
public var upgradeEffect;
public var crewNote:TextField;
public var btnClose:SimpleButton;
public var btnNextCrew:SimpleButton;
public var myParent;
public var isDrag;
public var lSymbol2:MovieClip;
public var justUpgrade;
public var btnDownFloor:SimpleButton;
public var floorTextList;
public var lSymbol1:MovieClip;
public var lSymbol3:MovieClip;
public var salaryList:TextField;
public var dragDropSymbol:MovieClip;
public var salary;
public var disablePromote:MovieClip;
public var btnPromote:SimpleButton;
public var temp;
public var ancestor;
public var difX;
public var difY;
public function UI_EmployeeInformation(){
addFrameScript(0, frame1);
}
public function SearchPrevTechnician():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = myParent.crewList.indexOf(myParent.visitorFocus);
_local2 = (((((myParent.visitorFocus is CrewCleaningServicelv1)) || ((myParent.visitorFocus is CrewCleaningServicelv2)))) || ((myParent.visitorFocus is CrewCleaningServicelv3)));
_local3 = _local1;
_local1--;
if (_local1 < 0){
_local1 = (myParent.crewList.length - 1);
};
_local4 = myParent.crewList[_local1];
while (((!((((((_local4 is CrewTechnicianlv1)) || ((_local4 is CrewTechnicianlv2)))) || ((_local4 is CrewTechnicianlv3))))) && (!((_local1 == _local3))))) {
_local1--;
if (_local1 < 0){
_local1 = (myParent.crewList.length - 1);
};
_local4 = myParent.crewList[_local1];
};
myParent.visitorFocus.filters = [];
if (myParent.menuParent.numChildren > 0){
_local5 = myParent.menuParent.getChildAt(0);
_local5.closeMenu();
selectCrew(_local4);
};
}
public function Draging(_arg1:MouseEvent):void{
isDrag = !(isDrag);
difX = (_arg1.stageX - this.x);
difY = (_arg1.stageY - this.y);
}
public function SearchPrevCrew(_arg1:MouseEvent):void{
var _local2:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
if ((((((myParent.visitorFocus is CrewCleaningServicelv1)) || ((myParent.visitorFocus is CrewCleaningServicelv2)))) || ((myParent.visitorFocus is CrewCleaningServicelv3)))){
SearchPrevCleaningService();
} else {
if ((((((myParent.visitorFocus is CrewTechnicianlv1)) || ((myParent.visitorFocus is CrewTechnicianlv2)))) || ((myParent.visitorFocus is CrewTechnicianlv3)))){
SearchPrevTechnician();
} else {
if ((((((myParent.visitorFocus is CrewSecuritylv1)) || ((myParent.visitorFocus is CrewSecuritylv2)))) || ((myParent.visitorFocus is CrewSecuritylv3)))){
SearchPrevSecurity();
};
};
};
}
function frame1(){
crewType.autoSize = TextFieldAutoSize.CENTER;
salaryList.autoSize = TextFieldAutoSize.LEFT;
shiftFloor.autoSize = TextFieldAutoSize.RIGHT;
crewNote.autoSize = TextFieldAutoSize.LEFT;
levelSymbol = new Array();
levelSymbol.push(lSymbol1);
levelSymbol.push(lSymbol2);
levelSymbol.push(lSymbol3);
floorTextList = new Array();
floorTextList.push("All");
myParent = root;
addEventListener(MouseEvent.MOUSE_OVER, MouseOverEvent);
addEventListener(MouseEvent.MOUSE_OUT, MouseOutEvent);
visitorRelation = myParent.visitorFocus;
checkCanPromote();
crewType.text = ("STAFF: " + myParent.visitorFocus.nameType);
i = 0;
while (i < levelSymbol.length) {
if (i < myParent.visitorFocus.cLevel){
levelSymbol[i].gotoAndPlay(2);
} else {
levelSymbol[i].gotoAndPlay(1);
};
i++;
};
i = 0;
while (i < myParent.floorList.length) {
temp = myParent.floorList[i];
if (temp == myParent.ground){
floorTextList.push("Ground");
} else {
if (i < (myParent.floorList.length - 1)){
floorTextList.push(("Floor " + i));
};
};
i++;
};
salaryText = "";
salary = myParent.visitorFocus.salary;
salaryText = salarySplit(salary);
salaryList.text = ((":$" + salaryText) + ".-");
shiftFloor.text = floorTextList[(myParent.visitorFocus.shiftFloor + 1)];
crewNote.text = myParent.visitorFocus.crewNote;
btnUpFloor.addEventListener(MouseEvent.CLICK, FloorUp);
btnDownFloor.addEventListener(MouseEvent.CLICK, FloorDown);
btnClose.addEventListener(MouseEvent.CLICK, Closing);
btnFire.addEventListener(MouseEvent.CLICK, Fired);
btnPromote.addEventListener(MouseEvent.CLICK, Promote);
justUpgrade = false;
colorMod = 0;
stage.addEventListener(KeyboardEvent.KEY_UP, CloseWithKey);
dragDropSymbol.addEventListener(MouseEvent.MOUSE_DOWN, Draging);
dragDropSymbol.addEventListener(MouseEvent.MOUSE_UP, Droping);
stage.addEventListener(MouseEvent.MOUSE_MOVE, Moving);
if ((((((myParent.visitorFocus is CrewCleaningServicelv1)) || ((myParent.visitorFocus is CrewCleaningServicelv2)))) || ((myParent.visitorFocus is CrewCleaningServicelv3)))){
btnPrevCrew.visible = (myParent.countEmployee(0) > 1);
btnNextCrew.visible = (myParent.countEmployee(0) > 1);
} else {
if ((((((myParent.visitorFocus is CrewTechnicianlv1)) || ((myParent.visitorFocus is CrewTechnicianlv2)))) || ((myParent.visitorFocus is CrewTechnicianlv3)))){
btnPrevCrew.visible = (myParent.countEmployee(1) > 1);
btnNextCrew.visible = (myParent.countEmployee(1) > 1);
} else {
if ((((((myParent.visitorFocus is CrewSecuritylv1)) || ((myParent.visitorFocus is CrewSecuritylv2)))) || ((myParent.visitorFocus is CrewSecuritylv3)))){
btnPrevCrew.visible = (myParent.countEmployee(2) > 1);
btnNextCrew.visible = (myParent.countEmployee(2) > 1);
};
};
};
btnPrevCrew.addEventListener(MouseEvent.CLICK, SearchPrevCrew);
btnNextCrew.addEventListener(MouseEvent.CLICK, SearchNextCrew);
stop();
}
public function Moving(_arg1:MouseEvent):void{
if (isDrag){
this.x = (_arg1.stageX - difX);
this.y = (_arg1.stageY - difY);
myParent.menuX = this.x;
myParent.menuY = this.y;
};
}
public function Droping(_arg1:MouseEvent):void{
isDrag = false;
}
public function SearchPrevSecurity():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = myParent.crewList.indexOf(myParent.visitorFocus);
_local2 = (((((myParent.visitorFocus is CrewSecuritylv1)) || ((myParent.visitorFocus is CrewSecuritylv2)))) || ((myParent.visitorFocus is CrewSecuritylv3)));
_local3 = _local1;
_local1--;
if (_local1 < 0){
_local1 = (myParent.crewList.length - 1);
};
_local4 = myParent.crewList[_local1];
while (((!((((((_local4 is CrewSecuritylv1)) || ((_local4 is CrewSecuritylv2)))) || ((_local4 is CrewSecuritylv3))))) && (!((_local1 == _local3))))) {
_local1--;
if (_local1 < 0){
_local1 = (myParent.crewList.length - 1);
};
_local4 = myParent.crewList[_local1];
};
myParent.visitorFocus.filters = [];
if (myParent.menuParent.numChildren > 0){
_local5 = myParent.menuParent.getChildAt(0);
_local5.closeMenu();
selectCrew(_local4);
};
}
public function selectCrew(_arg1:MovieClip):void{
var _local2:*;
var _local3:BitmapFilter;
var _local4:*;
_local2 = new UI_EmployeeInformation();
_local2.x = myParent.menuX;
_local2.y = myParent.menuY;
myParent.menuParent.addChild(_local2);
myParent.visitorFocus = _arg1;
_local3 = new GlowFilter(0xFF8800, 0.9, 5, 5, 2);
_local4 = new Array();
_local4.push(_local3);
myParent.visitorFocus.filters = _local4;
}
public function Closing(_arg1:MouseEvent):void{
closeMenu();
}
public function SearchNextTechnician():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = myParent.crewList.indexOf(myParent.visitorFocus);
_local2 = (((((myParent.visitorFocus is CrewTechnicianlv1)) || ((myParent.visitorFocus is CrewTechnicianlv2)))) || ((myParent.visitorFocus is CrewTechnicianlv3)));
_local3 = _local1;
_local1++;
if (_local1 >= myParent.crewList.length){
_local1 = 0;
};
_local4 = myParent.crewList[_local1];
while (((!((((((_local4 is CrewTechnicianlv1)) || ((_local4 is CrewTechnicianlv2)))) || ((_local4 is CrewTechnicianlv3))))) && (!((_local1 == _local3))))) {
_local1++;
if (_local1 >= myParent.crewList.length){
_local1 = 0;
};
_local4 = myParent.crewList[_local1];
};
myParent.visitorFocus.filters = [];
if (myParent.menuParent.numChildren > 0){
_local5 = myParent.menuParent.getChildAt(0);
_local5.closeMenu();
selectCrew(_local4);
};
}
public function FloorDown(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
_local3 = floorTextList.indexOf(shiftFloor.text);
_local3--;
if (_local3 < 0){
_local3 = (floorTextList.length - 1);
};
myParent.visitorFocus.shiftFloor = (_local3 - 1);
shiftFloor.text = floorTextList[_local3];
}
public function CloseWithKey(_arg1:KeyboardEvent):void{
var _local2:*;
_local2 = _arg1.keyCode;
if (_local2 == Keyboard.ESCAPE){
closeMenu();
};
}
public function Fired(_arg1:MouseEvent):void{
var index:*;
var newSE:*;
var vi:*;
var event = _arg1;
index = myParent.crewList.indexOf(myParent.visitorFocus);
if (index >= 0){
newSE = new SE_Close();
newSE.play(0, 0, myParent.seTransform);
if (myParent.visitorFocus.destination != null){
myParent.visitorFocus.destination.worker = null;
};
if (myParent.visitorFocus.elevatorTarget != null){
vi = myParent.visitorFocus.elevatorTarget.visitorList.indexOf(myParent.visitorFocus);
if (vi >= 0){
myParent.visitorFocus.elevatorTarget.visitorList.splice(vi, 1);
myParent.visitorFocus.elevatorTarget.elevatorTargetList.splice(vi, 1);
};
vi = myParent.visitorFocus.elevatorTarget.visitorWaiting.indexOf(myParent.visitorFocus);
if (vi >= 0){
myParent.visitorFocus.elevatorTarget.visitorWaiting.splice(vi, 1);
if (myParent.visitorFocus.elevatorTarget.visitorWaiting.length <= 0){
myParent.visitorFocus.elevatorTarget.isStart = false;
};
};
};
var _local3 = myParent.visitorFocus;
with (_local3) {
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Behavior);
removeEventListener(Event.ENTER_FRAME, BackToWork);
removeEventListener(MouseEvent.CLICK, myParent.EmployeeOnClick);
removeEventListener(MouseEvent.MOUSE_OVER, myParent.VisitorOnOver);
removeEventListener(MouseEvent.MOUSE_OUT, myParent.VisitorOnOut);
};
myParent.crewList.splice(index, 1);
myParent.visitorFocus.parent.removeChild(myParent.visitorFocus);
myParent.userinterface.updateSector();
};
closeMenu();
}
public function Update(_arg1:Event):void{
var head:*;
var clip:*;
var temp:*;
var cIndex:*;
var tParent:*;
var pIndex:*;
var elevatorTemp:*;
var eIndex:*;
var event = _arg1;
head = root;
clip = visitorRelation.getChildByName("upgrade");
if (clip != null){
if (clip.currentFrame <= 5){
colorMod = (colorMod + (1 / 5));
} else {
colorMod = (colorMod - (1 / 10));
};
if ((((clip.currentFrame == 5)) && (justUpgrade))){
temp = new ancestor.nextUpgrade();
temp.ancestor = ancestor;
temp.alpha = ancestor.alpha;
temp.scaleX = ancestor.scaleX;
temp.filters = ancestor.filters;
temp.addChild(clip);
temp.x = ancestor.x;
temp.y = ancestor.y;
cIndex = myParent.crewList.indexOf(ancestor);
myParent.crewList[cIndex] = temp;
if (ancestor.elevatorTarget != null){
elevatorTemp = ancestor.elevatorTarget;
eIndex = elevatorTemp.visitorWaiting.indexOf(ancestor);
if (eIndex >= 0){
elevatorTemp.visitorWaiting[eIndex] = temp;
};
eIndex = elevatorTemp.visitorList.indexOf(ancestor);
if (eIndex >= 0){
elevatorTemp.visitorList[eIndex] = temp;
};
};
try {
if (((!((ancestor.destination == null))) && ((ancestor.destination.worker == ancestor)))){
ancestor.destination.worker = temp;
};
} catch(e:Error) {
};
checkAllBandit(temp);
ancestor.removeEventListener(Event.ENTER_FRAME, ancestor.Animation);
ancestor.removeEventListener(Event.ENTER_FRAME, ancestor.Behavior);
ancestor.removeEventListener(Event.ENTER_FRAME, ancestor.BackToWork);
ancestor.removeEventListener(MouseEvent.CLICK, myParent.EmployeeOnClick);
ancestor.removeEventListener(MouseEvent.MOUSE_OVER, myParent.VisitorOnOver);
ancestor.removeEventListener(MouseEvent.MOUSE_OUT, myParent.VisitorOnOut);
temp.addEventListener(MouseEvent.CLICK, myParent.EmployeeOnClick);
temp.addEventListener(MouseEvent.MOUSE_OVER, myParent.VisitorOnOver);
temp.addEventListener(MouseEvent.MOUSE_OUT, myParent.VisitorOnOut);
tParent = ancestor.parent;
pIndex = tParent.getChildIndex(ancestor);
tParent.addChildAt(temp, pIndex);
tParent.removeChild(ancestor);
visitorRelation = temp;
if (((!((myParent.visitorFocus == null))) && ((myParent.visitorFocus == ancestor)))){
myParent.visitorFocus = visitorRelation;
};
justUpgrade = false;
if (head.userinterface.employeeList.visible){
head.userinterface.employeeList.setCrewList();
};
};
visitorRelation.transform.colorTransform = new ColorTransform(1, 1, 1, visitorRelation.alpha, (0xFF * colorMod), (0xFF * colorMod), (0xFF * colorMod), 0);
levelSymbol[starLevel].rotation = (levelSymbol[starLevel].rotation + 30);
} else {
if (head.userinterface.employeeList.visible){
head.userinterface.employeeList.setCrewList();
};
levelSymbol[starLevel].rotation = 0;
levelSymbol[starLevel].gotoAndPlay(2);
visitorRelation.transform.colorTransform = new ColorTransform(1, 1, 1, visitorRelation.alpha, 0, 0, 0, 0);
salaryList.text = (":$" + salarySplit(visitorRelation.salary));
checkCanPromote();
removeEventListener(Event.ENTER_FRAME, Update);
};
}
public function SearchNextCrew(_arg1:MouseEvent):void{
var _local2:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
if ((((((myParent.visitorFocus is CrewCleaningServicelv1)) || ((myParent.visitorFocus is CrewCleaningServicelv2)))) || ((myParent.visitorFocus is CrewCleaningServicelv3)))){
SearchNextCleaningService();
} else {
if ((((((myParent.visitorFocus is CrewTechnicianlv1)) || ((myParent.visitorFocus is CrewTechnicianlv2)))) || ((myParent.visitorFocus is CrewTechnicianlv3)))){
SearchNextTechnician();
} else {
if ((((((myParent.visitorFocus is CrewSecuritylv1)) || ((myParent.visitorFocus is CrewSecuritylv2)))) || ((myParent.visitorFocus is CrewSecuritylv3)))){
SearchNextSecurity();
};
};
};
}
public function checkCanPromote():void{
standartNote.visible = false;
maxUpgrade.visible = false;
if (visitorRelation.nextUpgrade){
upgradeNote = standartNote;
upgradeNote.upgradeSalary.text = (":$" + salarySplit(visitorRelation.upgradeSalary));
upgradeNote.otherNote.text = visitorRelation.upgradeEffect;
upgradeNote.upgradeCost.text = (":$" + salarySplit(visitorRelation.UPGRADE_COST));
btnPromote.visible = true;
disablePromote.visible = false;
} else {
upgradeNote = maxUpgrade;
btnPromote.visible = false;
disablePromote.visible = true;
};
upgradeNote.visible = true;
}
public function checkAllBandit(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
while (_local2 < myParent.banditList.length) {
_local3 = myParent.banditList[_local2];
_local4 = 0;
while (_local4 < _local3.securityDetected.length) {
if (_local3.securityDetected[_local4] == ancestor){
_local3.securityDetected[_local4] = _arg1;
};
_local4++;
};
_local4 = 0;
while (_local4 < _local3.pursuer.length) {
if (_local3.pursuer[_local4] == ancestor){
_local3.pursuer[_local4] = _arg1;
};
_local4++;
};
_local2++;
};
}
public function MouseOverEvent(_arg1:MouseEvent):void{
myParent.menuOver = true;
}
public function SearchNextCleaningService():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = myParent.crewList.indexOf(myParent.visitorFocus);
_local2 = (((((myParent.visitorFocus is CrewCleaningServicelv1)) || ((myParent.visitorFocus is CrewCleaningServicelv2)))) || ((myParent.visitorFocus is CrewCleaningServicelv3)));
_local3 = _local1;
_local1++;
if (_local1 >= myParent.crewList.length){
_local1 = 0;
};
_local4 = myParent.crewList[_local1];
while (((!((((((_local4 is CrewCleaningServicelv1)) || ((_local4 is CrewCleaningServicelv2)))) || ((_local4 is CrewCleaningServicelv3))))) && (!((_local1 == _local3))))) {
_local1++;
if (_local1 >= myParent.crewList.length){
_local1 = 0;
};
_local4 = myParent.crewList[_local1];
};
myParent.visitorFocus.filters = [];
if (myParent.menuParent.numChildren > 0){
_local5 = myParent.menuParent.getChildAt(0);
_local5.closeMenu();
selectCrew(_local4);
};
}
public function SearchNextSecurity():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = myParent.crewList.indexOf(myParent.visitorFocus);
_local2 = (((((myParent.visitorFocus is CrewSecuritylv1)) || ((myParent.visitorFocus is CrewSecuritylv2)))) || ((myParent.visitorFocus is CrewSecuritylv3)));
_local3 = _local1;
_local1++;
if (_local1 >= myParent.crewList.length){
_local1 = 0;
};
_local4 = myParent.crewList[_local1];
while (((!((((((_local4 is CrewSecuritylv1)) || ((_local4 is CrewSecuritylv2)))) || ((_local4 is CrewSecuritylv3))))) && (!((_local1 == _local3))))) {
_local1++;
if (_local1 >= myParent.crewList.length){
_local1 = 0;
};
_local4 = myParent.crewList[_local1];
};
myParent.visitorFocus.filters = [];
if (myParent.menuParent.numChildren > 0){
_local5 = myParent.menuParent.getChildAt(0);
_local5.closeMenu();
selectCrew(_local4);
};
}
public function salarySplit(_arg1:Number):String{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = "";
if (_arg1 >= 1000){
_local3 = Math.floor((_arg1 / 1000));
_local4 = (_arg1 % 1000);
_local5 = salarySplit(_local4);
while (_local5.length < 3) {
_local5 = ("0" + _local5);
};
_local2 = ((_local3 + ",") + _local5);
} else {
_local2 = (_arg1 + "");
};
return (_local2);
}
public function MouseOutEvent(_arg1:MouseEvent):void{
myParent.menuOver = false;
}
public function closeMenu():void{
stage.focus = stage;
myParent.visitorFocus.filters = [];
myParent.visitorFocus = null;
btnClose.removeEventListener(MouseEvent.CLICK, Closing);
stage.removeEventListener(KeyboardEvent.KEY_UP, CloseWithKey);
this.parent.removeChild(this);
}
public function Promote(_arg1:MouseEvent):void{
var spend:*;
var newSE:*;
var event = _arg1;
spend = myParent.visitorFocus.UPGRADE_COST;
if (((myParent.cash - myParent.purchase) + myParent.recive) >= spend){
newSE = new SE_Popularity();
newSE.play(0, 0, myParent.seTransform);
ancestor = myParent.visitorFocus;
starLevel = ancestor.cLevel;
upgradeEffect = new fx_upgrade_crew();
upgradeEffect.name = "upgrade";
ancestor.addChild(upgradeEffect);
addEventListener(Event.ENTER_FRAME, Update);
btnPromote.visible = false;
disablePromote.visible = true;
justUpgrade = true;
myParent.addCashUpdate(spend, myParent.visitorFocus.worldX, (myParent.visitorFocus.worldY - myParent.visitorFocus.height), false);
var _local3 = myParent;
with (_local3) {
if ((((((visitorFocus is CrewCleaningServicelv1)) || ((visitorFocus is CrewCleaningServicelv2)))) || ((visitorFocus is CrewCleaningServicelv3)))){
cleaningServiceOutcome = (cleaningServiceOutcome + spend);
} else {
if ((((((visitorFocus is CrewTechnicianlv1)) || ((visitorFocus is CrewTechnicianlv2)))) || ((visitorFocus is CrewTechnicianlv3)))){
technicianOutcome = (technicianOutcome + spend);
} else {
if ((((((visitorFocus is CrewSecuritylv1)) || ((visitorFocus is CrewSecuritylv2)))) || ((visitorFocus is CrewSecuritylv3)))){
securityOutcome = (securityOutcome + spend);
};
};
};
};
} else {
myParent.addNotification("Not enough cash");
};
}
public function FloorUp(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = new SE_Select();
_local2.play(0, 0, myParent.seTransform);
_local3 = floorTextList.indexOf(shiftFloor.text);
_local3++;
if (_local3 >= floorTextList.length){
_local3 = 0;
};
myParent.visitorFocus.shiftFloor = (_local3 - 1);
shiftFloor.text = floorTextList[_local3];
}
public function SearchPrevCleaningService():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = myParent.crewList.indexOf(myParent.visitorFocus);
_local2 = (((((myParent.visitorFocus is CrewCleaningServicelv1)) || ((myParent.visitorFocus is CrewCleaningServicelv2)))) || ((myParent.visitorFocus is CrewCleaningServicelv3)));
_local3 = _local1;
_local1--;
if (_local1 < 0){
_local1 = (myParent.crewList.length - 1);
};
_local4 = myParent.crewList[_local1];
while (((!((((((_local4 is CrewCleaningServicelv1)) || ((_local4 is CrewCleaningServicelv2)))) || ((_local4 is CrewCleaningServicelv3))))) && (!((_local1 == _local3))))) {
_local1--;
if (_local1 < 0){
_local1 = (myParent.crewList.length - 1);
};
_local4 = myParent.crewList[_local1];
};
myParent.visitorFocus.filters = [];
if (myParent.menuParent.numChildren > 0){
_local5 = myParent.menuParent.getChildAt(0);
_local5.closeMenu();
selectCrew(_local4);
};
}
}
}//package
Section 260
//UI_GameSavedAnimation (UI_GameSavedAnimation)
package {
import flash.display.*;
public dynamic class UI_GameSavedAnimation extends MovieClip {
public function UI_GameSavedAnimation(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 261
//UI_GoodNote (UI_GoodNote)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_GoodNote extends MovieClip {
public var worldX;
public var worldY;
public var clip:MovieClip;
public var largerClip:MovieClip;
public var head;
public function UI_GoodNote(){
addFrameScript(0, frame1, 30, frame31);
}
public function UpdatePosition(_arg1:Event):void{
this.x = (worldX - head.cameraX);
this.y = (worldY - head.cameraY);
this.visible = head.drawArea.hitTestObject(this);
}
function frame1(){
head = root;
largerClip.cashList.text = clip.cashList.text;
addEventListener(Event.ENTER_FRAME, UpdatePosition);
}
function frame31(){
stop();
removeEventListener(Event.ENTER_FRAME, UpdatePosition);
this.parent.removeChild(this);
}
}
}//package
Section 262
//UI_HallInformation (UI_HallInformation)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_HallInformation extends MovieClip {
public var dayNumber:TextField;
public var maxUpgrade:MovieClip;
public var btnUpgrade:SimpleButton;
public var prevEvent:SimpleButton;
public var upgradeNote;
public var levelSymbol;
public var eventList:TextField;
public var tCost:Number;
public var firstSymbol:MovieClip;
public var i;
public var tenantName:TextField;
public var btnUpgradeDisable:MovieClip;
public var btnStartEvent:SimpleButton;
public var buildingRelation;
public var upgradeList:MovieClip;
public var btnClose:SimpleButton;
public var tenantType:TextField;
public var secondSymbol:MovieClip;
public var totalCost:TextField;
public var nextEvent:SimpleButton;
public var myParent;
public var isDrag;
public var eventCost:TextField;
public var upgradeClip;
public var day:Number;
public var ticketPrice:TextField;
public var dragDropSymbol:MovieClip;
public var tenantNote:TextField;
public var extraSymbol:MovieClip;
public var cost:Number;
public var dayBtnUp:SimpleButton;
public var thirdSymbol:MovieClip;
public var dayBtnDown:SimpleButton;
public var difX;
public var btnDestroy:SimpleButton;
public var difY;
public function UI_HallInformation(){
addFrameScript(0, frame1);
}
public function PrevEvent(_arg1:MouseEvent):void{
if (myParent.eventSelection > 0){
myParent.eventSelection--;
} else {
if (myParent.city < (myParent.EVENT_LIST.length - 1)){
myParent.eventSelection = myParent.city;
} else {
myParent.eventSelection = (myParent.EVENT_LIST.length - 1);
};
};
eventList.text = myParent.EVENT_LIST[myParent.eventSelection];
updateNote();
}
public function DecreaseDay(_arg1:MouseEvent):void{
if (day > 1){
day--;
};
updateNote();
}
public function Draging(_arg1:MouseEvent):void{
isDrag = !(isDrag);
difX = (_arg1.stageX - this.x);
difY = (_arg1.stageY - this.y);
}
public function updateNote():void{
ticketPrice.text = (":$" + myParent.MoneySplit(buildingRelation.PRICE[(buildingRelation.tLevel - 1)]));
cost = (buildingRelation.EVENT_PRICE[(buildingRelation.tLevel - 1)] + (5000 * myParent.eventSelection));
eventCost.text = (":$" + myParent.MoneySplit(cost));
if (day > 1){
dayNumber.text = (day + " days");
} else {
dayNumber.text = (day + " day");
};
tCost = cost;
if (day > 1){
tCost = (tCost + (Math.round((cost * 0.75)) * (day - 1)));
};
totalCost.text = (":$" + myParent.MoneySplit(tCost));
upgradeNote.visible = true;
if (upgradeNote != maxUpgrade){
upgradeNote.ticketPrice.text = (":$" + myParent.MoneySplit(buildingRelation.PRICE[buildingRelation.tLevel]));
upgradeNote.eventPrice.text = (":-$" + myParent.MoneySplit((buildingRelation.EVENT_PRICE[(buildingRelation.tLevel - 1)] - buildingRelation.EVENT_PRICE[buildingRelation.tLevel])));
upgradeNote.upgradeCost.text = (":$" + myParent.MoneySplit(buildingRelation.UPGRADE_COST[(buildingRelation.tLevel - 1)]));
};
}
function frame1(){
tenantType.autoSize = TextFieldAutoSize.CENTER;
tenantName.autoSize = TextFieldAutoSize.LEFT;
tenantNote.autoSize = TextFieldAutoSize.LEFT;
eventList.autoSize = TextFieldAutoSize.CENTER;
eventCost.autoSize = TextFieldAutoSize.LEFT;
dayNumber.autoSize = TextFieldAutoSize.RIGHT;
totalCost.autoSize = TextFieldAutoSize.LEFT;
ticketPrice.autoSize = TextFieldAutoSize.LEFT;
myParent = root;
btnStartEvent.visible = (((myParent.nowEvent < 0)) && ((myParent.bookedEvent < 0)));
prevEvent.visible = btnStartEvent.visible;
nextEvent.visible = btnStartEvent.visible;
dayBtnUp.visible = btnStartEvent.visible;
dayBtnDown.visible = btnStartEvent.visible;
levelSymbol = new Array();
if (buildingRelation.MAX_LEVEL > 3){
levelSymbol.push(extraSymbol);
} else {
extraSymbol.visible = false;
};
levelSymbol.push(firstSymbol);
levelSymbol.push(secondSymbol);
levelSymbol.push(thirdSymbol);
btnStartEvent.addEventListener(MouseEvent.CLICK, StartEvent);
prevEvent.addEventListener(MouseEvent.CLICK, PrevEvent);
nextEvent.addEventListener(MouseEvent.CLICK, NextEvent);
i = 0;
while (i < levelSymbol.length) {
if (i < buildingRelation.tLevel){
levelSymbol[i].gotoAndPlay(2);
} else {
levelSymbol[i].gotoAndPlay(1);
};
eventList.text = myParent.EVENT_LIST[myParent.eventSelection];
i++;
};
btnUpgradeDisable.visible = (buildingRelation.tLevel >= buildingRelation.MAX_LEVEL);
btnUpgrade.visible = (buildingRelation.tLevel < buildingRelation.MAX_LEVEL);
btnClose.addEventListener(MouseEvent.CLICK, Closing);
tenantType.text = buildingRelation.TENANT_TYPE.toUpperCase();
tenantName.text = "Hall";
tenantNote.text = buildingRelation.TENANT_NOTE;
eventList.text = myParent.EVENT_LIST[myParent.eventSelection];
upgradeList.visible = false;
maxUpgrade.visible = false;
if (buildingRelation.tLevel < buildingRelation.MAX_LEVEL){
upgradeNote = upgradeList;
} else {
upgradeNote = maxUpgrade;
};
if ((((myParent.nowEvent < 0)) && ((myParent.bookedEvent < 0)))){
day = 1;
} else {
day = myParent.eventTime;
};
updateNote();
dayBtnUp.addEventListener(MouseEvent.CLICK, IncreaseDay);
dayBtnDown.addEventListener(MouseEvent.CLICK, DecreaseDay);
btnUpgrade.addEventListener(MouseEvent.CLICK, UpgradeBuilding);
btnDestroy.addEventListener(MouseEvent.CLICK, DestroyBuilding);
stage.addEventListener(KeyboardEvent.KEY_UP, CloseWithKey);
dragDropSymbol.addEventListener(MouseEvent.MOUSE_DOWN, Draging);
dragDropSymbol.addEventListener(MouseEvent.MOUSE_UP, Droping);
stage.addEventListener(MouseEvent.MOUSE_MOVE, Moving);
}
public function Moving(_arg1:MouseEvent):void{
if (isDrag){
this.x = (_arg1.stageX - difX);
this.y = (_arg1.stageY - difY);
myParent.menuX = this.x;
myParent.menuY = this.y;
};
}
public function UpgradeCheck(_arg1:Event):void{
var event = _arg1;
try {
buildingRelation.getChildIndex(upgradeClip);
levelSymbol[(buildingRelation.tLevel - 1)].rotation = (levelSymbol[(buildingRelation.tLevel - 1)].rotation + 30);
} catch(e:Error) {
try {
buildingRelation.transform.colorTransform = new ColorTransform(0.7, 0.7, 0, 1, 0, 0, 0, 0);
myParent.menuParent.getChildIndex(this);
} catch(e:Error) {
buildingRelation.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
levelSymbol[(buildingRelation.tLevel - 1)].rotation = 0;
levelSymbol[(buildingRelation.tLevel - 1)].gotoAndPlay(2);
removeEventListener(Event.ENTER_FRAME, UpgradeCheck);
if (buildingRelation.tLevel < buildingRelation.MAX_LEVEL){
btnUpgrade.visible = true;
btnUpgradeDisable.visible = false;
} else {
upgradeNote.visible = false;
upgradeNote = maxUpgrade;
};
updateNote();
};
}
public function Closing(_arg1:MouseEvent):void{
closeMenu();
}
public function CheckEvent(_arg1:Event):void{
if (btnStartEvent.visible){
removeEventListener(Event.ENTER_FRAME, CheckEvent);
};
if ((((myParent.nowEvent < 0)) && ((myParent.bookedEvent < 0)))){
btnStartEvent.visible = true;
} else {
day = myParent.eventTime;
if (day > 1){
dayNumber.text = (day + " days");
} else {
dayNumber.text = (day + " day");
};
};
prevEvent.visible = btnStartEvent.visible;
nextEvent.visible = btnStartEvent.visible;
dayBtnUp.visible = btnStartEvent.visible;
dayBtnDown.visible = btnStartEvent.visible;
}
public function Droping(_arg1:MouseEvent):void{
isDrag = false;
}
public function DestroyBuilding(_arg1:MouseEvent):void{
var newSE:*;
var grid:*;
var i:*;
var index:*;
var temp:*;
var event = _arg1;
if ((((myParent.nowEvent < 0)) && ((myParent.bookedEvent < 0)))){
newSE = new SE_Destroy();
newSE.play(0, 0, myParent.seTransform);
grid = ((buildingRelation.width - (buildingRelation.width % 12)) / 12);
i = 0;
while (i < grid) {
temp = new TenantEmptySpace();
temp.worldX = (buildingRelation.worldX + (i * 12));
temp.worldY = buildingRelation.worldY;
myParent.emptyParent.addChild(temp);
i = (i + 1);
};
if ((buildingRelation is TenantHall)){
myParent.hall = null;
};
closeMenu();
updatePopularity(buildingRelation);
index = myParent.tenantList.indexOf(buildingRelation);
if (index >= 0){
myParent.tenantList.splice(index, 1);
};
index = myParent.elevatorList.indexOf(buildingRelation);
if (index >= 0){
myParent.elevatorList.splice(index, 1);
};
index = myParent.restroomList.indexOf(buildingRelation);
if (index >= 0){
myParent.restroomList.splice(index, 1);
};
try {
index = buildingRelation.ground.tenantList.indexOf(buildingRelation);
if (index >= 0){
buildingRelation.ground.tenantList.splice(index, 1);
};
} catch(e:Error) {
};
buildingRelation.parent.removeChild(buildingRelation);
} else {
myParent.addNotification("Please wait until there is no event");
};
}
public function CloseWithKey(_arg1:KeyboardEvent):void{
var _local2:*;
var _local3:*;
_local2 = _arg1.keyCode;
if (_local2 == Keyboard.ESCAPE){
_local3 = new SE_Close();
_local3.play(0, 0, myParent.seTransform);
closeMenu();
};
}
public function updatePopularity(_arg1:MovieClip):void{
var tenant = _arg1;
if (!(((tenant is SupportElevator)) || ((tenant is SupportRestroom)))){
myParent.popularity = (myParent.popularity - 5);
};
try {
tenant.restoreRelation();
} catch(e:Error) {
};
trace(("Now Popularity is " + myParent.popularity));
}
public function UpgradeBuilding(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = buildingRelation.UPGRADE_COST[(buildingRelation.tLevel - 1)];
if (((myParent.cash - myParent.purchase) + myParent.recive) >= _local2){
_local3 = new SE_Popularity();
_local3.play(0, 0, myParent.seTransform);
if (buildingRelation.tLevel < buildingRelation.MAX_LEVEL){
buildingRelation.tLevel++;
};
if (buildingRelation.width <= 150){
upgradeClip = new fx_upgrade_small();
} else {
if (buildingRelation.width <= 300){
upgradeClip = new fx_upgrade_medium();
} else {
upgradeClip = new fx_upgrade_large();
};
};
buildingRelation.addChild(upgradeClip);
buildingRelation.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
addEventListener(Event.ENTER_FRAME, UpgradeCheck);
btnUpgrade.visible = false;
btnUpgradeDisable.visible = true;
myParent.addCashUpdate(_local2, (buildingRelation.worldX + (buildingRelation.width / 2)), (buildingRelation.worldY + (buildingRelation.height / 2)), false);
buildingRelation.outcome = (buildingRelation.outcome + _local2);
} else {
myParent.addNotification("Not enough cash");
};
}
public function NextEvent(_arg1:MouseEvent):void{
if ((((myParent.eventSelection < (myParent.EVENT_LIST.length - 1))) && ((myParent.eventSelection < myParent.city)))){
myParent.eventSelection++;
} else {
myParent.eventSelection = 0;
};
eventList.text = myParent.EVENT_LIST[myParent.eventSelection];
updateNote();
}
public function closeMenu():void{
stage.focus = stage;
btnClose.removeEventListener(MouseEvent.CLICK, Closing);
btnUpgrade.removeEventListener(MouseEvent.CLICK, UpgradeBuilding);
btnDestroy.removeEventListener(MouseEvent.CLICK, DestroyBuilding);
stage.removeEventListener(KeyboardEvent.KEY_UP, CloseWithKey);
buildingRelation.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
this.parent.removeChild(this);
}
public function StartEvent(_arg1:MouseEvent):void{
if (((myParent.cash - myParent.purchase) + myParent.recive) >= tCost){
if (myParent.dayTime >= 15){
myParent.addNotification("Too late to begin event today. Event will start Tommorrow.");
myParent.bookedEvent = myParent.EVENT_LIST.indexOf(eventList.text);
} else {
myParent.addNotification("The event starts soon");
myParent.nowEvent = myParent.EVENT_LIST.indexOf(eventList.text);
};
myParent.eventTime = day;
btnStartEvent.visible = false;
addEventListener(Event.ENTER_FRAME, CheckEvent);
myParent.addCashUpdate(tCost, (buildingRelation.worldX + (buildingRelation.width / 2)), (buildingRelation.worldY + (buildingRelation.height / 2)), false);
buildingRelation.outcome = (buildingRelation.outcome + tCost);
} else {
myParent.addNotification("Not Enough Cash");
};
}
public function IncreaseDay(_arg1:MouseEvent):void{
if (day < 7){
day++;
};
updateNote();
}
}
}//package
Section 263
//UI_ManualGameSavedAnimation (UI_ManualGameSavedAnimation)
package {
import flash.display.*;
public dynamic class UI_ManualGameSavedAnimation extends MovieClip {
public function UI_ManualGameSavedAnimation(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 264
//UI_Notification (UI_Notification)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_Notification extends MovieClip {
public var tParent;
public var note:MovieClip;
public function UI_Notification(){
addFrameScript(0, frame1, 87, frame88);
}
public function checkOtherNote(_arg1:Event):void{
var _local2:*;
var _local3:*;
_local2 = tParent.getChildIndex(this);
if (_local2 > 0){
_local3 = tParent.getChildAt((_local2 - 1));
_local3.y = (((this.y + this.note.y) + (this.note.upperBody.y + 18)) - 2);
};
}
function frame88(){
stop();
this.removeEventListener(Event.ENTER_FRAME, checkOtherNote);
this.parent.removeChild(this);
}
function frame1(){
tParent = this.parent;
addEventListener(Event.ENTER_FRAME, checkOtherNote);
}
}
}//package
Section 265
//UI_TenantInformation (UI_TenantInformation)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_TenantInformation extends MovieClip {
public var tenantType:TextField;
public var btnDestroy:SimpleButton;
public var difX;
public var btnClose:SimpleButton;
public var difY;
public var nIndex;
public var secondSymbol:MovieClip;
public var upgradeNote;
public var maxUpgrade:MovieClip;
public var btnUpgrade:SimpleButton;
public var levelSymbol;
public var standartUpgradeNote:MovieClip;
public var standartNote:MovieClip;
public var i;
public var tenantName:TextField;
public var supportNote:MovieClip;
public var firstSymbol:MovieClip;
public var myParent;
public var btnUpgradeDisable:MovieClip;
public var isDrag;
public var upgradeClip;
public var dragDropSymbol:MovieClip;
public var tenantNote:TextField;
public var extraSymbol:MovieClip;
public var buildingRelation;
public var thirdSymbol:MovieClip;
public var noteInfo;
public var supportUpgradeNote:MovieClip;
public function UI_TenantInformation(){
addFrameScript(0, frame1);
}
public function Draging(_arg1:MouseEvent):void{
isDrag = !(isDrag);
difX = (_arg1.stageX - this.x);
difY = (_arg1.stageY - this.y);
}
public function updateNote():void{
noteInfo.visible = true;
if ((buildingRelation is SupportElevator)){
noteInfo.capacity.text = (((":" + buildingRelation.visitorList.length) + "/") + buildingRelation.capacity[(buildingRelation.tLevel - 1)]);
} else {
noteInfo.capacity.text = (((":" + buildingRelation.visitorList.length) + "/") + buildingRelation.getCapacity());
};
if (noteInfo == standartNote){
if ((((buildingRelation is TenantCinema)) || ((buildingRelation is TenantGameCenter)))){
noteInfo.priceOrTicket.text = "Ticket";
};
noteInfo.price.text = (":$" + myParent.MoneySplit(buildingRelation.PRICE[(buildingRelation.tLevel - 1)]));
};
upgradeNote.visible = true;
if (upgradeNote != maxUpgrade){
if ((buildingRelation is SupportElevator)){
upgradeNote.upgradeCapacity.text = (":" + buildingRelation.capacity[buildingRelation.tLevel]);
} else {
upgradeNote.upgradeCapacity.text = (":" + buildingRelation.getUpgradeCapacity());
};
if (upgradeNote == standartUpgradeNote){
if ((((buildingRelation is TenantCinema)) || ((buildingRelation is TenantGameCenter)))){
upgradeNote.priceOrTicket.text = "Ticket";
};
upgradeNote.upgradePrice.text = (":$" + myParent.MoneySplit(buildingRelation.PRICE[buildingRelation.tLevel]));
} else {
if ((buildingRelation is SupportElevator)){
if (buildingRelation.tLevel >= 2){
upgradeNote.otherNote.text = "Speed Increased.";
};
};
};
upgradeNote.upgradeCost.text = (":$" + myParent.MoneySplit(buildingRelation.UPGRADE_COST[(buildingRelation.tLevel - 1)]));
};
}
function frame1(){
tenantType.autoSize = TextFieldAutoSize.CENTER;
tenantName.autoSize = TextFieldAutoSize.LEFT;
tenantNote.autoSize = TextFieldAutoSize.LEFT;
myParent = root;
levelSymbol = new Array();
standartUpgradeNote.visible = false;
supportUpgradeNote.visible = false;
standartNote.visible = false;
supportNote.visible = false;
maxUpgrade.visible = false;
if (buildingRelation.MAX_LEVEL > 3){
levelSymbol.push(extraSymbol);
} else {
extraSymbol.visible = false;
};
levelSymbol.push(firstSymbol);
levelSymbol.push(secondSymbol);
levelSymbol.push(thirdSymbol);
i = 0;
while (i < levelSymbol.length) {
if (i < buildingRelation.tLevel){
levelSymbol[i].gotoAndPlay(2);
} else {
levelSymbol[i].gotoAndPlay(1);
};
i++;
};
btnUpgradeDisable.visible = (buildingRelation.tLevel >= buildingRelation.MAX_LEVEL);
btnUpgrade.visible = (buildingRelation.tLevel < buildingRelation.MAX_LEVEL);
btnClose.addEventListener(MouseEvent.CLICK, Closing);
tenantType.text = buildingRelation.TENANT_TYPE.toUpperCase();
tenantNote.text = buildingRelation.TENANT_NOTE;
if ((buildingRelation is SupportElevator)){
tenantName.text = "Elevator";
upgradeNote = supportUpgradeNote;
noteInfo = supportNote;
} else {
if ((buildingRelation is SupportRestroom)){
tenantName.text = "Restroom";
upgradeNote = supportUpgradeNote;
noteInfo = supportNote;
} else {
nIndex = myParent.userinterface.btnArr.indexOf(buildingRelation.name);
if (nIndex >= 0){
tenantName.text = myParent.TENANT_TEXT[nIndex];
upgradeNote = standartUpgradeNote;
noteInfo = standartNote;
};
};
};
if (buildingRelation.tLevel >= buildingRelation.MAX_LEVEL){
upgradeNote = maxUpgrade;
};
addEventListener(Event.ENTER_FRAME, EditText);
updateNote();
btnUpgrade.addEventListener(MouseEvent.CLICK, UpgradeBuilding);
btnDestroy.addEventListener(MouseEvent.CLICK, DestroyBuilding);
stage.addEventListener(KeyboardEvent.KEY_UP, CloseWithKey);
dragDropSymbol.addEventListener(MouseEvent.MOUSE_DOWN, Draging);
dragDropSymbol.addEventListener(MouseEvent.MOUSE_UP, Droping);
stage.addEventListener(MouseEvent.MOUSE_MOVE, Moving);
}
public function Moving(_arg1:MouseEvent):void{
if (isDrag){
this.x = (_arg1.stageX - difX);
this.y = (_arg1.stageY - difY);
myParent.menuX = this.x;
myParent.menuY = this.y;
};
}
public function UpgradeCheck(_arg1:Event):void{
var allNull:*;
var i:*;
var temp:*;
var clip:*;
var event = _arg1;
if ((buildingRelation is SupportElevator)){
allNull = true;
i = 0;
while (i < buildingRelation.elevatorList.length) {
temp = buildingRelation.elevatorList[i];
clip = temp.getChildByName("upgrade");
if (clip != null){
if (buildingRelation.tLevel == 3){
if (clip.currentFrame == 5){
buildingRelation.replaceBody(i);
};
};
allNull = false;
};
levelSymbol[(buildingRelation.tLevel - 1)].rotation = (levelSymbol[(buildingRelation.tLevel - 1)].rotation + 30);
i = (i + 1);
};
if (allNull){
levelSymbol[(buildingRelation.tLevel - 1)].rotation = 0;
levelSymbol[(buildingRelation.tLevel - 1)].gotoAndPlay(2);
try {
buildingRelation.transform.colorTransform = new ColorTransform(0.7, 0.7, 0, 1, 0, 0, 0, 0);
myParent.menuParent.getChildIndex(this);
} catch(e:Error) {
buildingRelation.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
removeEventListener(Event.ENTER_FRAME, UpgradeCheck);
if (buildingRelation.tLevel < buildingRelation.MAX_LEVEL){
btnUpgrade.visible = true;
btnUpgradeDisable.visible = false;
} else {
upgradeNote.visible = false;
upgradeNote = maxUpgrade;
};
updateNote();
};
} else {
try {
buildingRelation.getChildIndex(upgradeClip);
levelSymbol[(buildingRelation.tLevel - 1)].rotation = (levelSymbol[(buildingRelation.tLevel - 1)].rotation + 30);
} catch(e:Error) {
try {
buildingRelation.transform.colorTransform = new ColorTransform(0.7, 0.7, 0, 1, 0, 0, 0, 0);
myParent.menuParent.getChildIndex(this);
} catch(e:Error) {
buildingRelation.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
levelSymbol[(buildingRelation.tLevel - 1)].rotation = 0;
levelSymbol[(buildingRelation.tLevel - 1)].gotoAndPlay(2);
removeEventListener(Event.ENTER_FRAME, UpgradeCheck);
if (buildingRelation.tLevel < buildingRelation.MAX_LEVEL){
btnUpgrade.visible = true;
btnUpgradeDisable.visible = false;
} else {
upgradeNote.visible = false;
upgradeNote = maxUpgrade;
};
updateNote();
};
};
}
public function Closing(_arg1:MouseEvent):void{
closeMenu();
}
public function EditText(_arg1:Event):void{
if ((buildingRelation is SupportElevator)){
noteInfo.capacity.text = (((":" + buildingRelation.visitorList.length) + "/") + buildingRelation.capacity[(buildingRelation.tLevel - 1)]);
} else {
noteInfo.capacity.text = (((":" + buildingRelation.visitorList.length) + "/") + buildingRelation.getCapacity());
};
}
public function Droping(_arg1:MouseEvent):void{
isDrag = false;
}
public function closeMenu():void{
stage.focus = stage;
btnClose.removeEventListener(MouseEvent.CLICK, Closing);
btnUpgrade.removeEventListener(MouseEvent.CLICK, UpgradeBuilding);
btnDestroy.removeEventListener(MouseEvent.CLICK, DestroyBuilding);
stage.removeEventListener(KeyboardEvent.KEY_UP, CloseWithKey);
buildingRelation.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
this.parent.removeChild(this);
}
public function DestroyBuilding(_arg1:MouseEvent):void{
var newSE:*;
var index:*;
var grid:*;
var i:*;
var temp:*;
var ti:*;
var type:*;
var j:*;
var event = _arg1;
if (!myParent.tutorialMode){
newSE = new SE_Destroy();
newSE.play(0, 0, myParent.seTransform);
if (!(buildingRelation is SupportElevator)){
grid = ((buildingRelation.width - (buildingRelation.width % 12)) / 12);
i = 0;
while (i < grid) {
temp = new TenantEmptySpace();
temp.worldX = (buildingRelation.worldX + (i * 12));
temp.worldY = buildingRelation.worldY;
myParent.emptyParent.addChild(temp);
i = (i + 1);
};
} else {
grid = ((buildingRelation.width - (buildingRelation.width % 12)) / 12);
ti = 0;
i = 0;
while (i < buildingRelation.numChildren) {
type = buildingRelation.getChildAt(i);
if ((((type is ElevatorBody)) || ((type is ElevatorUpgrade)))){
j = 0;
while (j < grid) {
temp = new TenantEmptySpace();
temp.worldX = (buildingRelation.worldX + (j * 12));
temp.worldY = (buildingRelation.worldY + type.y);
myParent.emptyParent.addChild(temp);
j = (j + 1);
};
ti = (ti + 1);
};
i = (i + 1);
};
};
if ((buildingRelation is TenantHall)){
myParent.hall = null;
};
closeMenu();
updatePopularity(buildingRelation);
index = myParent.tenantList.indexOf(buildingRelation);
if (index >= 0){
myParent.tenantList.splice(index, 1);
};
index = myParent.elevatorList.indexOf(buildingRelation);
if (index >= 0){
myParent.elevatorList.splice(index, 1);
};
index = myParent.restroomList.indexOf(buildingRelation);
if (index >= 0){
myParent.restroomList.splice(index, 1);
};
if (buildingRelation.income){
myParent.otherIncome = (myParent.otherIncome + buildingRelation.income);
};
if (buildingRelation.outcome){
myParent.otherOutcome = (myParent.otherOutcome + buildingRelation.outcome);
};
try {
index = buildingRelation.ground.tenantList.indexOf(buildingRelation);
if (index >= 0){
buildingRelation.ground.tenantList.splice(index, 1);
};
} catch(e:Error) {
};
try {
index = buildingRelation.ground.toiletList.indexOf(buildingRelation);
if (index >= 0){
buildingRelation.ground.toiletList.splice(index, 1);
};
} catch(e:Error) {
};
buildingRelation.parent.removeChild(buildingRelation);
myParent.userinterface.updateSector();
} else {
myParent.addNotification("Cannot destroy during tutorial");
};
}
public function CloseWithKey(_arg1:KeyboardEvent):void{
var _local2:*;
_local2 = _arg1.keyCode;
if (_local2 == Keyboard.ESCAPE){
closeMenu();
};
}
public function updatePopularity(_arg1:MovieClip):void{
var tenant = _arg1;
if (!(((tenant is SupportElevator)) || ((tenant is SupportRestroom)))){
myParent.popularity = (myParent.popularity - 5);
};
try {
tenant.restoreRelation();
} catch(e:Error) {
};
}
public function UpgradeBuilding(_arg1:MouseEvent):void{
var spend:*;
var newSE:*;
var i:*;
var event = _arg1;
spend = buildingRelation.UPGRADE_COST[(buildingRelation.tLevel - 1)];
if (((myParent.cash - myParent.purchase) + myParent.recive) >= spend){
newSE = new SE_Popularity();
newSE.play(0, 0, myParent.seTransform);
if ((buildingRelation is SupportElevator)){
var _local3 = buildingRelation;
with (_local3) {
if (tLevel < MAX_LEVEL){
tLevel++;
};
i = 0;
while (i < buildingRelation.elevatorList.length) {
upgradeClip = new fx_upgrade_small();
upgradeClip.name = "upgrade";
buildingRelation.elevatorList[i].addChild(upgradeClip);
i++;
};
};
} else {
if (buildingRelation.tLevel < buildingRelation.MAX_LEVEL){
buildingRelation.tLevel++;
};
if (buildingRelation.width <= 150){
upgradeClip = new fx_upgrade_small();
} else {
if (buildingRelation.width <= 300){
upgradeClip = new fx_upgrade_medium();
} else {
upgradeClip = new fx_upgrade_large();
};
};
buildingRelation.addChild(upgradeClip);
};
buildingRelation.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
addEventListener(Event.ENTER_FRAME, UpgradeCheck);
btnUpgrade.visible = false;
btnUpgradeDisable.visible = true;
if ((buildingRelation is SupportElevator)){
myParent.addCashUpdate(spend, (buildingRelation.worldX + (buildingRelation.width / 2)), ((buildingRelation.worldY + buildingRelation.maxHeight) + (buildingRelation.height / 2)), false);
} else {
myParent.addCashUpdate(spend, (buildingRelation.worldX + (buildingRelation.width / 2)), (buildingRelation.worldY + (buildingRelation.height / 2)), false);
};
try {
buildingRelation.outcome = (buildingRelation.outcome + spend);
} catch(e:Error) {
myParent.otherOutcome = (myParent.otherOutcome + spend);
};
} else {
myParent.addNotification("Not enough cash");
};
}
}
}//package
Section 266
//UI_VisitorInformation (UI_VisitorInformation)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UI_VisitorInformation extends MovieClip {
public var difX;
public var btnClose:SimpleButton;
public var difY;
public var tRandomText;
public var visitorName:TextField;
public var favoriteList:TextField;
public var newList;
public var i;
public var favList;
public var randomText;
public var myParent;
public var commentList:TextField;
public var tString:String;
public var isDrag;
public var dragDropSymbol:MovieClip;
public var temp;
public var randomElevatorText;
public var index;
public var conditionStatus:MovieClip;
public var randomToiletText;
public function UI_VisitorInformation(){
addFrameScript(0, frame1);
}
public function Draging(_arg1:MouseEvent):void{
isDrag = !(isDrag);
difX = (_arg1.stageX - this.x);
difY = (_arg1.stageY - this.y);
}
public function MouseOverEvent(_arg1:MouseEvent):void{
myParent.menuOver = true;
}
function frame1(){
visitorName.autoSize = TextFieldAutoSize.CENTER;
commentList.autoSize = TextFieldAutoSize.LEFT;
myParent = root;
addEventListener(MouseEvent.MOUSE_OVER, MouseOverEvent);
addEventListener(MouseEvent.MOUSE_OUT, MouseOutEvent);
addEventListener(Event.ENTER_FRAME, Update);
favList = new Array();
i = 0;
while (i < myParent.visitorFocus.interestList.length) {
temp = myParent.visitorFocus.interestList[i];
if (temp != "Other"){
index = myParent.userinterface.btnArr.indexOf(temp);
newList = myParent.TENANT_TEXT[index];
if (favList.indexOf(newList) < 0){
favList.push(newList);
};
};
i++;
};
if (myParent.visitorFocus.visitorName){
visitorName.text = myParent.visitorFocus.visitorName;
} else {
visitorName.text = "";
};
favoriteList.autoSize = TextFieldAutoSize.CENTER;
tString = "";
i = 0;
while (i < favList.length) {
tString = (tString + (favList[i] + "\n"));
i++;
};
favoriteList.text = tString;
btnClose.addEventListener(MouseEvent.CLICK, Closing);
randomText = -1;
tRandomText = Math.floor((Math.random() * myParent.commentList[myParent.visitorFocus.interest].length));
if (((!((myParent.hall == null))) && ((myParent.visitorFocus.destination == myParent.hall)))){
tRandomText = Math.floor((Math.random() * myParent.eventCommentList[myParent.nowEvent].length));
};
randomToiletText = -1;
randomElevatorText = -1;
stage.addEventListener(KeyboardEvent.KEY_UP, CloseWithKey);
dragDropSymbol.addEventListener(MouseEvent.MOUSE_DOWN, Draging);
dragDropSymbol.addEventListener(MouseEvent.MOUSE_UP, Droping);
stage.addEventListener(MouseEvent.MOUSE_MOVE, Moving);
}
public function Moving(_arg1:MouseEvent):void{
if (isDrag){
this.x = (_arg1.stageX - difX);
this.y = (_arg1.stageY - difY);
myParent.menuX = this.x;
myParent.menuY = this.y;
};
}
public function MouseOutEvent(_arg1:MouseEvent):void{
myParent.menuOver = false;
}
public function Closing(_arg1:MouseEvent):void{
closeMenu();
}
public function closeMenu():void{
stage.focus = stage;
myParent.visitorFocus.filters = [];
myParent.visitorFocus = null;
btnClose.removeEventListener(MouseEvent.CLICK, Closing);
stage.removeEventListener(KeyboardEvent.KEY_UP, CloseWithKey);
removeEventListener(Event.ENTER_FRAME, Update);
this.parent.removeChild(this);
}
public function CloseWithKey(_arg1:KeyboardEvent):void{
var _local2:*;
_local2 = _arg1.keyCode;
if (_local2 == Keyboard.ESCAPE){
closeMenu();
};
}
public function Droping(_arg1:MouseEvent):void{
isDrag = false;
}
public function Update(_arg1:Event):void{
var frameIndex:*;
var tString:String;
var temp:*;
var textIndex:*;
var event = _arg1;
frameIndex = Math.ceil((myParent.visitorFocus.mood / 25));
if (frameIndex > conditionStatus.totalFrames){
frameIndex = conditionStatus.totalFrames;
};
conditionStatus.gotoAndPlay(frameIndex);
tString = "";
if (!myParent.visitorFocus.goHome){
if ((((myParent.visitorFocus.lastDestination == null)) || (!((myParent.visitorFocus.destination == myParent.visitorFocus.lastDestination))))){
if ((((myParent.hall == null)) || (!((myParent.visitorFocus.destination == myParent.hall))))){
temp = myParent.commentList[myParent.visitorFocus.interest];
if (!myParent.visitorFocus.visiting){
if ((((randomText < 0)) || ((randomText >= temp.length)))){
textIndex = Math.floor((Math.random() * temp.length));
randomText = textIndex;
tRandomText = textIndex;
};
} else {
randomText = -1;
};
tString = temp[tRandomText];
if (myParent.visitorFocus.gender){
if (tString == "Need gown for tonight"){
tString = "Need tuxedo for tonight";
} else {
if (tString == "Victoria's dress looks beautiful"){
tString = "I think my girlfriend looks for new dress";
} else {
if (tString == "I want to buy a golden necklace"){
tString = "I will looks more cool with a golden necklace";
};
};
};
} else {
if (tString == "I'm searching for a pair of earrings for her gift"){
tString = "I'm searching for a pair of earrings";
} else {
if (tString == "Need a diamond ring to propose her"){
tString = "I will be more elegant with new diamond ring";
};
};
};
} else {
temp = myParent.eventCommentList[myParent.nowEvent];
if (!myParent.visitorFocus.visiting){
if ((((randomText < 0)) || ((randomText >= temp.length)))){
textIndex = Math.floor((Math.random() * temp.length));
randomText = textIndex;
tRandomText = textIndex;
};
} else {
randomText = -1;
};
tString = temp[tRandomText];
};
} else {
tString = "Maybe I'll just walking around before visit my next destination";
};
if (myParent.visitorFocus.toiletTarget != null){
if ((((randomToiletText < 0)) || ((randomToiletText >= myParent.supportComment[0].length)))){
textIndex = Math.floor((Math.random() * myParent.supportComment[0].length));
randomToiletText = textIndex;
};
tString = myParent.supportComment[0][randomToiletText];
} else {
randomToiletText = -1;
};
} else {
var _local3 = myParent;
with (_local3) {
if (visitorFocus.mood > 75){
tString = "It's a great place";
} else {
if (visitorFocus.mood > 50){
tString = "It's enough for today";
} else {
if (visitorFocus.mood > 25){
tString = "This mall is sucks";
} else {
tString = "Worst place that I ever visited";
};
};
};
if (visitorFocus.toiletTrouble){
if (visitorFocus.mood > 75){
tString = (tString + " but why no restroom here");
} else {
if (visitorFocus.mood > 50){
tString = (tString + " because no toilet here");
} else {
tString = (tString + " even toilet is not exist");
};
};
};
};
};
if (myParent.visitorFocus.elevatorTrouble){
if ((((randomElevatorText < 0)) || ((randomElevatorText >= myParent.supportComment[1].length)))){
textIndex = Math.floor((Math.random() * myParent.supportComment[1].length));
randomElevatorText = textIndex;
};
tString = myParent.supportComment[1][randomElevatorText];
} else {
randomElevatorText = -1;
};
commentList.text = tString;
}
}
}//package
Section 267
//Visitor (Visitor)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.ui.*;
import flash.filters.*;
public class Visitor extends MovieClip {
const ENJOY_DELAY_TIME = 10;
public var rideElevator;// = false
public var floorChecked;
var ACCEL_MOOD;// = 0.5
public var visitorName;
public var destination;
var waitPattiene;// = 0
public var elevatorTarget;// = null
var changeDestination;// = 0
public var tenantName:String;
public var otherDelay;
var lastToiletFill;
public var enterWaiting;// = false
public var waiting;// = 0
public var dirrection;
public var searchTenant;// = false
public var dx;
public var floorPos;
var lastMood;
public var visiting;
public var gender;// = true
var moodDelay;// = 24
public var arrive;
public var elevatorChecked;
var MIN_MOOD;// = 26
var interestList:Array;
public var enjoyingTime;
public var speedX;
public var homePos;
public var mood;
public var worldX;
var backDelay;// = 24
public var worldY;
var MAX_MOOD;// = 100
public var elevatorTrouble;// = false
public var interest;
public var toiletTrouble;// = false
public var toiletFill;// = 0
public var specialVisitor;// = false
public var myParent;
var toiletIncreaseChance;
var pattiene;// = 10
var delay;// = 100
public var lastDestination;
public var targetTenant;
public var elevatorFloor;// = null
public var justVisiting;// = true
public var hasALegend;// = false
public var enjoyDelay;
public var goHome;
var toiletTarget;// = null
public function Visitor(){
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 10;
ACCEL_MOOD = 0.5;
gender = true;
specialVisitor = false;
targetTenant = new Array();
rideElevator = false;
waiting = 0;
mood = ((Math.random() * 10) + 45);
enterWaiting = false;
hasALegend = false;
searchTenant = false;
justVisiting = true;
elevatorTarget = null;
elevatorFloor = null;
floorChecked = new Array();
elevatorTrouble = false;
toiletTrouble = false;
toiletFill = 0;
toiletIncreaseChance = ((Math.random() * 8) + 2);
toiletTarget = null;
changeDestination = 0;
delay = 100;
backDelay = 24;
moodDelay = 24;
waitPattiene = 0;
super();
addEventListener(Event.ADDED, Initialize);
}
function VisitingProgress(_arg1:Event):void{
var sp:*;
var addEnjoy:*;
var legend:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
elevatorTrouble = false;
enjoyingTime--;
enjoyDelay++;
if (enjoyingTime <= 0){
mood = (mood - (0.1 * ACCEL_MOOD));
if (destination.isBroken){
mood = (mood - (0.4 * ACCEL_MOOD));
};
if (visiting){
if (((!((destination is TenantSupermarket))) && (!(destination.isOpen)))){
destination.isOpen = true;
};
destination.ExitShop(this);
};
} else {
if (enjoyDelay > ENJOY_DELAY_TIME){
enjoyDelay = 0;
addEnjoy = (Math.floor((Math.random() * 20)) - 5);
enjoyingTime = (enjoyingTime + addEnjoy);
mood = (mood + (2 * ACCEL_MOOD));
if (destination.isBroken){
mood = (mood - (((destination.brokenLevel - 75) / 10) * ACCEL_MOOD));
};
};
};
try {
myParent.tenantParent.getChildIndex(destination);
} catch(e:Error) {
if ((((((destination is TenantCinema)) || ((destination is TenantGameCenter)))) || ((destination is TenantHall)))){
removeEventListener(Event.ENTER_FRAME, destination.MoodManipulation);
};
mood = (mood - (20 * ACCEL_MOOD));
visiting = false;
};
if (!visiting){
legend = new Legend();
legend.moodType = true;
legend.visitor = this;
myParent.legendParent.addChild(legend);
sp = myParent.gameSpeed;
finishVisiting();
};
sp = (sp + 1);
};
}
public function removeAllListener():void{
if ((((((destination is TenantCinema)) || ((destination is TenantGameCenter)))) || ((destination is TenantHall)))){
removeEventListener(Event.ENTER_FRAME, destination.MoodManipulation);
};
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Behavior);
removeEventListener(Event.ENTER_FRAME, VisitingProgress);
removeEventListener(Event.ENTER_FRAME, MoodUpdate);
}
function finishVisiting():void{
alpha = 1;
arrive = false;
lastDestination = destination;
destination = null;
delay = 1;
changeDestination = 0;
removeEventListener(Event.ENTER_FRAME, VisitingProgress);
addEventListener(Event.ENTER_FRAME, Behavior);
}
function getElevator():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = myParent.tenantParent;
_local2 = "btnElevator";
_local3 = new Array();
_local4 = null;
if (_local1.getChildByName(_local2) != null){
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local10 = _local1.getChildAt(_local5);
if ((((_local10 is SupportElevator)) && (!((_local10 == elevatorChecked))))){
_local3.push(_local10);
};
_local5++;
};
_local6 = new Array();
_local7 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local11 = _local3[_local5].floorList.indexOf(floorPos);
if (_local11 >= 0){
_local6.push(_local3[_local5]);
_local7.push(_local3[_local5].elevatorList[_local11]);
};
_local5++;
};
_local8 = new Array();
_local9 = new Array();
_local5 = 0;
while (_local5 < _local6.length) {
if (!goHome){
if (toiletTarget == null){
if (destination != null){
_local11 = _local6[_local5].floorList.indexOf(destination.ground);
} else {
_local11 = -1;
};
} else {
_local11 = _local6[_local5].floorList.indexOf(toiletTarget.ground);
};
} else {
_local11 = _local6[_local5].floorList.indexOf(myParent.ground);
};
if (_local11 >= 0){
_local8.push(_local6[_local5]);
_local12 = _local6[_local5].floorList.indexOf(floorPos);
_local9.push(_local6[_local5].elevatorList[_local12]);
};
_local5++;
};
if (_local8.length > 0){
_local11 = Math.floor((Math.random() * _local8.length));
_local4 = _local8[_local11];
elevatorFloor = _local9[_local11];
} else {
if (_local6.length > 0){
_local11 = Math.floor((Math.random() * _local6.length));
_local4 = _local6[_local11];
elevatorFloor = _local7[_local11];
} else {
elevatorChecked = null;
};
};
};
return (_local4);
}
function isInterest():Boolean{
var _local1:*;
var _local2:*;
_local1 = myParent.tenantParent;
_local2 = myParent.userinterface.btnArr[interest];
tenantName = _local2;
return (!((_local1.getChildByName(_local2) == null)));
}
function Behavior(_arg1:Event):void{
var sp:*;
var rndHome:*;
var rnd:*;
var homeModifier:*;
var des:*;
var dstIndex:*;
var wIndex:*;
var indexFloor:*;
var tFloor:*;
var vIndex:*;
var tMenu:*;
var event = _arg1;
sp = 0;
while (sp < myParent.gameSpeed) {
SimulateRestroom();
if ((((((myParent.dayTime >= 21)) || ((myParent.dayTime < 10)))) && (!(goHome)))){
if (myParent.dayTime >= 22){
goHome = true;
} else {
if (backDelay > 0){
backDelay--;
} else {
rndHome = (Math.random() * 100);
if (rndHome < 50){
goHome = true;
};
backDelay = 24;
};
};
};
if ((((((destination == null)) || ((destination == lastDestination)))) && (!(goHome)))){
if ((((delay == 1)) && ((changeDestination <= 0)))){
rnd = (Math.random() * 100);
homeModifier = 0;
if (myParent.dayTime >= 21){
homeModifier = 50;
} else {
if (myParent.dayTime >= 20){
homeModifier = 25;
};
};
if (rnd < (mood - homeModifier)){
decideDestination();
if (isInterest()){
scanTenant();
randomDestination();
};
} else {
if (!justVisiting){
goHome = true;
};
};
};
if ((((((((((((destination == null)) || ((destination == lastDestination)))) && ((elevatorTarget == null)))) && ((toiletTarget == null)))) && (!(visiting)))) && (!(justVisiting)))){
delay--;
if (delay <= 0){
des = Math.floor((Math.random() * 4));
switch (des){
case 1:
dx = -(speedX);
break;
case 2:
dx = speedX;
break;
case 3:
elevatorTarget = getElevator();
break;
default:
dx = dx;
};
if (destination == null){
searchTenant = true;
};
changeDestination++;
if (changeDestination >= 5){
changeDestination = 0;
lastDestination = null;
};
delay = 100;
};
if (dx == 0){
dx = (((Math.floor((Math.random() * 2)) * 2) - 1) * speedX);
};
};
};
if (((((((!((destination == null))) && (!((destination == lastDestination))))) && (!(goHome)))) && ((toiletTarget == null)))){
if (destination.isClose){
(destination == null);
};
if (!visiting){
if (destination.ground != floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if (worldX < (destination.worldX + destination.door.x)){
dx = speedX;
} else {
if (worldX > ((destination.worldX + destination.door.x) + destination.door.width)){
dx = -(speedX);
};
};
if (destination.door != null){
if (destination.door.hitTestObject(this)){
if (!arrive){
arrive = destination.Visited(this);
};
if (arrive){
if (!visiting){
if (!destination.isOpen){
destination.isOpen = true;
};
dx = 0;
destination.EnterShop(this);
if (visiting){
dstIndex = destination.visitorList.indexOf(this);
if (dstIndex >= destination.getCapacity()){
visiting = false;
lastDestination = destination;
destination = null;
randomDestination();
destination.visitorList.splice(dstIndex, 1);
alpha = 1;
searchTenant = true;
} else {
elevatorChecked = null;
enjoyingTime = 100;
addEventListener(Event.ENTER_FRAME, VisitingProgress);
removeEventListener(Event.ENTER_FRAME, Behavior);
};
};
};
};
} else {
try {
destination.pass = false;
} catch(e:Error) {
};
};
};
};
};
try {
myParent.tenantParent.getChildIndex(destination);
} catch(e:Error) {
destination = null;
};
};
if (((((!((toiletTarget == null))) && (!(goHome)))) && (!(visiting)))){
if (toiletTarget.ground != floorPos){
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
} else {
if (worldX < toiletTarget.worldX){
if (toiletFill < 90){
dx = speedX;
} else {
dx = (speedX * 2);
};
} else {
if (worldX > (toiletTarget.worldX + toiletTarget.width)){
if (toiletFill < 90){
dx = -(speedX);
} else {
dx = (-(speedX) * 2);
};
};
};
toiletTarget.Visited(this);
};
};
if (floorPos != null){
this.worldY = floorPos.worldY;
if (!(floorPos is Floor)){
this.worldY = (this.worldY - floorPos.height);
};
};
if (((goHome) && (!(visiting)))){
if (destination != null){
destination = null;
};
if (floorPos == myParent.ground){
if (elevatorTarget != null){
wIndex = elevatorTarget.visitorWaiting.indexOf(this);
if (wIndex >= 0){
elevatorTarget.visitorWaiting.splice(wIndex, 1);
};
elevatorFloor = null;
elevatorTarget = null;
enterWaiting = false;
};
if ((((worldX < (homePos + 11))) && ((homePos > 0)))){
if (toiletFill < 90){
dx = speedX;
} else {
dx = (speedX * 2);
};
} else {
if ((((worldX > (homePos - 11))) && ((homePos <= 0)))){
if (toiletFill < 90){
dx = -(speedX);
} else {
dx = (-(speedX) * 2);
};
};
};
} else {
if (elevatorTarget == null){
elevatorTarget = getElevator();
};
};
};
if (elevatorTarget != null){
if (elevatorFloor.door != null){
if (elevatorFloor.door.hitTestObject(this)){
elevatorTarget.Visited(this);
if (elevatorTarget.visitorList.indexOf(this) < 0){
if (!enterWaiting){
waitPattiene = pattiene;
};
enterWaiting = true;
} else {
elevatorTrouble = false;
enterWaiting = false;
};
} else {
if (worldX > ((elevatorTarget.worldX + elevatorTarget.width) - (elevatorFloor.door.x + elevatorFloor.door.width))){
dx = -(speedX);
} else {
if (worldX < (elevatorTarget.worldX + elevatorFloor.door.x)){
dx = speedX;
} else {
dx = 0;
};
};
};
};
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
wIndex = elevatorTarget.visitorWaiting.indexOf(this);
if (wIndex >= 0){
elevatorTarget.visitorWaiting.splice(wIndex, 1);
};
elevatorTarget = null;
};
};
if (!goHome){
indexFloor = myParent.floorList.indexOf(floorPos);
if ((indexFloor + 1) >= myParent.floorList.length){
if ((floorPos is Floor)){
if (this.worldX < floorPos.worldX){
this.worldX = floorPos.worldX;
dx = speedX;
};
if (this.worldX > (floorPos.worldX + floorPos.width)){
this.worldX = (floorPos.worldX + floorPos.width);
dx = -(speedX);
};
} else {
if (!goHome){
if (myParent.mallWidth > 10){
if (this.worldX < myParent.mallLeft){
dx = speedX;
};
if (this.worldX > (myParent.mallLeft + myParent.mallWidth)){
dx = -(speedX);
};
};
};
};
} else {
tFloor = myParent.floorList[(indexFloor + 1)];
if (this.worldX < tFloor.worldX){
dx = speedX;
};
if (this.worldX > (tFloor.worldX + tFloor.width)){
dx = -(speedX);
};
};
};
if (((justVisiting) && (!(goHome)))){
if ((((worldX > myParent.mallLeft)) && ((worldX < (myParent.mallLeft + myParent.mallWidth))))){
justVisiting = false;
};
};
if (rideElevator){
dx = 0;
};
this.worldX = (this.worldX + dx);
sp = (sp + 1);
};
if ((((this.worldX < -10)) || ((this.worldX > (myParent.MAX_WIDTH + 10))))){
myParent.nextDayPopularity = (myParent.nextDayPopularity + ((mood - 50) / 10));
if (this == myParent.visitorFocus){
if (myParent.menuParent.numChildren > 0){
tMenu = myParent.menuParent.getChildAt(0);
tMenu.closeMenu();
};
};
vIndex = myParent.visitorList.indexOf(this);
if (vIndex >= 0){
myParent.visitorList.splice(vIndex, 1);
};
vIndex = myParent.specialVisitor.indexOf(this);
if (vIndex >= 0){
myParent.specialVisitor.splice(vIndex, 1);
};
if ((((mood < 50)) && (!(justVisiting)))){
myParent.numberUpset++;
};
removeEventListener(Event.ENTER_FRAME, Animation);
removeEventListener(Event.ENTER_FRAME, Behavior);
removeEventListener(Event.ENTER_FRAME, MoodUpdate);
this.parent.removeChild(this);
};
}
function scanElevator():void{
var wIndex:*;
if (elevatorTarget == null){
elevatorTarget = getElevator();
} else {
try {
myParent.tenantParent.getChildIndex(elevatorTarget);
} catch(e:Error) {
wIndex = elevatorTarget.visitorWaiting.indexOf(this);
if (wIndex >= 0){
elevatorTarget.visitorWaiting.splice(wIndex, 1);
};
elevatorTarget = null;
};
};
}
function MoodUpdate(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local2 = 0;
while (_local2 < myParent.gameSpeed) {
if ((((((toiletFill >= 75)) && ((lastToiletFill < 75)))) && (!(rideElevator)))){
_local3 = new Legend();
_local3.moodType = false;
_local3.visitor = this;
_local3.typeCode = "TOILET";
myParent.legendParent.addChild(_local3);
searchTenant = false;
};
if (!rideElevator){
lastToiletFill = toiletFill;
};
if (((searchTenant) && (!(hasALegend)))){
_local3 = new Legend();
_local3.moodType = false;
_local3.visitor = this;
_local3.typeCode = "TENANT";
myParent.legendParent.addChild(_local3);
searchTenant = false;
mood = (mood - (0.2 * ACCEL_MOOD));
};
if (moodDelay > 0){
moodDelay--;
} else {
if (!visiting){
if (!enterWaiting){
if (!goHome){
mood = (mood + (0.1 * ACCEL_MOOD));
};
} else {
if (waitPattiene > 0){
waitPattiene--;
} else {
mood = (mood - (2 * ACCEL_MOOD));
_local3 = new Legend();
_local3.moodType = false;
_local3.visitor = this;
_local3.typeCode = "ELEVATOR";
myParent.legendParent.addChild(_local3);
elevatorTrouble = true;
if (elevatorTarget != null){
_local5 = elevatorTarget.visitorWaiting.indexOf(this);
if (_local5 >= 0){
elevatorTarget.visitorWaiting.splice(_local5, 1);
};
elevatorTarget = null;
};
enterWaiting = false;
};
};
};
_local4 = 0;
while (_local4 < myParent.dirtyParent.numChildren) {
_local6 = myParent.dirtyParent.getChildAt(_local4);
if (((((((((((_local6.bundle) && ((_local6.ground == floorPos)))) && ((Math.abs((_local6.worldX - worldX)) < 75)))) && (!(hasALegend)))) && (((!(visiting)) || ((destination == myParent.hall)))))) && (!(rideElevator)))){
_local7 = (Math.random() * 100);
if (_local7 < _local6.trashLevel){
mood = (mood - ((_local6.trashLevel / 25) * ACCEL_MOOD));
_local3 = new Legend();
_local3.moodType = false;
_local3.visitor = this;
_local3.typeCode = "DIRTY";
myParent.legendParent.addChild(_local3);
};
};
_local4++;
};
_local4 = 0;
while (_local4 < myParent.tenantList.length) {
_local6 = myParent.tenantList[_local4];
if (((((((((this.hitTestObject(_local6)) && (_local6.isBroken))) && (!(_local6.isClose)))) && (!(hasALegend)))) && (!(visiting)))){
mood = (mood - (0.2 * ACCEL_MOOD));
_local3 = new Legend();
_local3.moodType = false;
_local3.visitor = this;
_local3.typeCode = "ELECTRICITY";
myParent.legendParent.addChild(_local3);
};
_local4++;
};
moodDelay = 24;
};
if (mood > MAX_MOOD){
mood = MAX_MOOD;
};
if (mood < MIN_MOOD){
mood = MIN_MOOD;
};
if (((!(visiting)) && (!(rideElevator)))){
if ((((((((((((((lastMood > 75)) && ((mood <= 75)))) || ((((lastMood <= 75)) && ((mood > 75)))))) || ((((lastMood > 50)) && ((mood <= 50)))))) || ((((lastMood <= 50)) && ((mood > 50)))))) || ((((lastMood > 25)) && ((mood <= 25)))))) || ((((lastMood <= 25)) && ((mood > 25)))))){
_local3 = new Legend();
_local3.moodType = true;
_local3.visitor = this;
myParent.legendParent.addChild(_local3);
};
};
if (!rideElevator){
lastMood = mood;
};
_local2++;
};
}
function scanToilet():MovieClip{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = myParent.tenantParent;
_local2 = null;
_local3 = new Array();
if (_local1.getChildByName("btnRestRoom") != null){
_local4 = 0;
while (_local4 < _local1.numChildren) {
_local5 = _local1.getChildAt(_local4);
if ((_local5 is SupportRestroom)){
if (_local5.ground == floorPos){
if (_local2 == null){
_local2 = _local5;
} else {
if (_local2.ground == floorPos){
if (Math.abs((_local2.worldX - worldX)) > Math.abs((_local5.worldX - worldX))){
_local2 = _local5;
};
} else {
_local2 = _local5;
};
};
} else {
_local3.push(_local5);
};
};
_local4++;
};
if ((((_local2 == null)) && ((_local3.length > 0)))){
_local6 = Math.floor((Math.random() * _local3.length));
_local2 = _local3[_local6];
};
};
if (_local2 == null){
toiletTrouble = true;
};
return (_local2);
}
function SimulateRestroom():void{
var peeValue:*;
var wIndex:*;
peeValue = (Math.random() * 100);
if (peeValue < toiletIncreaseChance){
if (toiletFill < 100){
toiletFill++;
};
};
if (toiletFill >= 75){
if (toiletTarget == null){
if (!goHome){
if (elevatorTarget != null){
wIndex = elevatorTarget.visitorWaiting.indexOf(this);
if (wIndex >= 0){
elevatorTarget.visitorWaiting.splice(wIndex, 1);
};
elevatorChecked = null;
elevatorTarget = null;
enterWaiting = false;
};
};
toiletTarget = scanToilet();
if (toiletTarget == null){
goHome = true;
};
} else {
try {
myParent.tenantParent.getChildIndex(toiletTarget);
} catch(e:Error) {
toiletTarget = null;
};
};
};
}
function randomDestination():void{
var _local1:*;
if (((((((!((myParent.hall == null))) && ((myParent.nowEvent >= 0)))) && (!(myParent.hall.isClose)))) && (!((lastDestination == myParent.hall))))){
destination = myParent.hall;
} else {
_local1 = Math.floor((Math.random() * targetTenant.length));
destination = targetTenant[_local1];
};
}
function Animation(_arg1:Event):void{
if (dx == 0){
if (this.currentFrame != 2){
gotoAndPlay(2);
};
} else {
if (this.currentFrame != 3){
gotoAndPlay(3);
};
};
if (dx > 0){
dirrection = 1;
this.scaleX = 1;
} else {
if (dx < 0){
dirrection = -1;
this.scaleX = -1;
};
};
}
function scanTenant():void{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = myParent.tenantParent;
targetTenant = new Array();
_local2 = 0;
while (_local2 < _local1.numChildren) {
_local3 = _local1.getChildAt(_local2);
if (_local3.name == tenantName){
targetTenant.push(_local3);
};
_local2++;
};
}
function decideDestination():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (!specialVisitor){
_local1 = Math.floor((Math.random() * interestList.length));
_local2 = interestList[_local1];
if (_local2 != "Other"){
interest = myParent.userinterface.btnArr.indexOf(_local2);
} else {
interest = Math.floor((Math.random() * myParent.tenantArr.length));
};
} else {
_local3 = new Array();
_local4 = 0;
while (_local4 < myParent.tenantList.length) {
_local6 = myParent.tenantList[_local4];
if (((!((_local6.name == "Hall"))) && ((_local3.indexOf(_local6.name) < 0)))){
_local3.push(_local6.name);
};
_local4++;
};
_local5 = Math.floor((Math.random() * _local3.length));
interest = myParent.userinterface.btnArr.indexOf(_local3[_local5]);
};
}
function Initialize(_arg1:Event):void{
myParent = root;
decideDestination();
if (isInterest()){
scanTenant();
randomDestination();
} else {
destination = null;
};
arrive = false;
visiting = false;
enjoyingTime = 0;
enjoyDelay = 0;
addEventListener(Event.ENTER_FRAME, Animation);
addEventListener(Event.ENTER_FRAME, Behavior);
addEventListener(Event.ENTER_FRAME, MoodUpdate);
removeEventListener(Event.ADDED, Initialize);
}
}
}//package
Section 268
//VisitorAfro (VisitorAfro)
package {
import flash.events.*;
public class VisitorAfro extends Visitor {
public function VisitorAfro(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnCinema", "btnCinema", "btnSteak", "btnSteak", "Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 10;
ACCEL_MOOD = 1;
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 269
//VisitorBeard (VisitorBeard)
package {
import flash.events.*;
public class VisitorBeard extends Visitor {
public function VisitorBeard(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnBurger", "btnBurger", "btnBurger", "btnIceCream", "Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 10;
ACCEL_MOOD = 2;
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 270
//VisitorBlondie (VisitorBlondie)
package {
import flash.events.*;
public class VisitorBlondie extends Visitor {
public function VisitorBlondie(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnBoutiqueB", "btnBoutiqueB", "btnBoutiqueB", "btnBoutiqueB", "btnBarberShop", "btnBarberShop", "btnBarberShop", "btnBarberShop", "btnBarberShop", "btnBabyShop", "Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 20;
ACCEL_MOOD = 1.5;
gender = false;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 271
//VisitorCheer (VisitorCheer)
package {
import flash.events.*;
public class VisitorCheer extends Visitor {
public function VisitorCheer(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnBoutiqueA", "btnBarberShop", "btnJewelry", "btnCafe", "Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 5;
ACCEL_MOOD = 2.5;
gender = false;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 272
//VisitorJustinBieber (VisitorJustinBieber)
package {
import flash.events.*;
public class VisitorJustinBieber extends Visitor {
public function VisitorJustinBieber(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 20;
ACCEL_MOOD = 1;
speedX = 2;
specialVisitor = true;
visitorName = "Justin Mieber";
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 273
//VisitorLadyGaga (VisitorLadyGaga)
package {
import flash.events.*;
public class VisitorLadyGaga extends Visitor {
public function VisitorLadyGaga(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 20;
ACCEL_MOOD = 1.5;
speedX = 2;
specialVisitor = true;
visitorName = "Lady Gogo";
gender = false;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 274
//VisitorMacho (VisitorMacho)
package {
import flash.events.*;
public class VisitorMacho extends Visitor {
public function VisitorMacho(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnSushi", "btnSushi", "btnGameCenter", "btnBurger", "Other");
MAX_MOOD = 75;
MIN_MOOD = 0;
pattiene = 10;
ACCEL_MOOD = 2;
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 275
//VisitorNerd (VisitorNerd)
package {
import flash.events.*;
public class VisitorNerd extends Visitor {
public function VisitorNerd(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnBookStore", "btnBookStore", "btnBookStore", "btnBookStore", "btnDrugStore", "btnCake", "btnCake", "btnSushi", "Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 15;
ACCEL_MOOD = 2;
gender = false;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 276
//VisitorNiggaFemale (VisitorNiggaFemale)
package {
import flash.events.*;
public class VisitorNiggaFemale extends Visitor {
public function VisitorNiggaFemale(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnSupermarket", "btnSupermarket", "btnSupermarket", "btnSupermarket", "btnBarberShop", "btnBarberShop", "btnIceCream", "btnIceCream", "btnCinema", "Other");
MAX_MOOD = 75;
MIN_MOOD = 0;
pattiene = 15;
ACCEL_MOOD = 2.5;
gender = false;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 277
//VisitorNiggaMale (VisitorNiggaMale)
package {
import flash.events.*;
public class VisitorNiggaMale extends Visitor {
public function VisitorNiggaMale(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnSupermarket", "btnSupermarket", "btnSupermarket", "btnBoutiqueB", "btnBoutiqueB", "btnBoutiqueB", "btnSteak", "btnSteak", "btnSteak", "Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 10;
ACCEL_MOOD = 0.5;
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 278
//VisitorObama (VisitorObama)
package {
import flash.events.*;
public class VisitorObama extends Visitor {
public function VisitorObama(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 20;
ACCEL_MOOD = 2;
speedX = 2;
specialVisitor = true;
visitorName = "The President";
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 279
//VisitorParisHilton (VisitorParisHilton)
package {
import flash.events.*;
public class VisitorParisHilton extends Visitor {
public function VisitorParisHilton(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 20;
ACCEL_MOOD = 1;
speedX = 2;
specialVisitor = true;
visitorName = "Faris Hilton";
gender = false;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 280
//VisitorPunk (VisitorPunk)
package {
import flash.events.*;
public class VisitorPunk extends Visitor {
public function VisitorPunk(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnGameCenter", "btnGameCenter", "btnGameCenter", "btnBurger", "btnBurger", "btnBurger", "btnIceCream", "btnIceCream", "btnIceCream", "Other");
MAX_MOOD = 100;
MIN_MOOD = 0;
pattiene = 5;
ACCEL_MOOD = 2.5;
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 281
//VisitorReggae (VisitorReggae)
package {
import flash.events.*;
public class VisitorReggae extends Visitor {
public function VisitorReggae(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnCafe", "btnCafe", "btnCafe", "btnDrugStore", "btnDrugStore", "btnDrugStore", "btnBarberShop", "btnBarberShop", "btnBarberShop", "Other");
MAX_MOOD = 75;
MIN_MOOD = 0;
pattiene = 10;
ACCEL_MOOD = 1;
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 282
//VisitorRihana (VisitorRihana)
package {
import flash.events.*;
public class VisitorRihana extends Visitor {
public function VisitorRihana(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 20;
ACCEL_MOOD = 0.5;
speedX = 2;
specialVisitor = true;
visitorName = "Rohana";
gender = false;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 283
//VisitorStranger (VisitorStranger)
package {
import flash.events.*;
public class VisitorStranger extends Visitor {
public function VisitorStranger(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnBurger", "btnBurger", "btnBookStore", "btnJewelry", "Other");
MAX_MOOD = 100;
MIN_MOOD = 26;
pattiene = 10;
ACCEL_MOOD = 1.5;
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 284
//VisitorWenart (VisitorWenart)
package {
import flash.events.*;
public class VisitorWenart extends Visitor {
public function VisitorWenart(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
interestList = new Array("btnGameCenter", "btnGameCenter", "btnGameCenter", "btnGameCenter", "btnToyStore", "btnToyStore", "btnToyStore", "btnToyStore", "btnCafe", "Other");
MAX_MOOD = 100;
MIN_MOOD = 0;
pattiene = 15;
ACCEL_MOOD = 2;
gender = true;
addEventListener(Event.ADDED, Initialize);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
function frame2(){
stop();
}
}
}//package