Frame 1
stop();
_root.soundready = false;
_root.sound1 = new Sound();
_root.musicBtn.gotoAndStop(2);
_root.sound1 = new Sound();
_root.sound1.attachSound("music");
Frame 2
if (_root.soundready == false) {
_root.musicBtn.gotoAndStop(2);
_root.musicBtn1.gotoAndStop(2);
_root.sound1.start();
_root.sound1.onSoundComplete = function () {
_root.sound1.start();
};
} else {
_root.musicBtn.gotoAndStop(1);
_root.musicBtn1.gotoAndStop(1);
}
Frame 30
stop();
if (!_root.soundready) {
_root.musicBtn.gotoAndStop(2);
_root.musicBtn1.gotoAndStop(2);
}
if (_root.soundready) {
_root.musicBtn.gotoAndStop(1);
_root.musicBtn1.gotoAndStop(1);
}
Frame 52
function initLevel() {
_root.score1 = 0;
_root.pathNodeArr.splice(0);
_root.fitRoomsCust1 = "";
_root.fitRoomsCust2 = "";
_root.arraySelect.splice(0);
_root.fitRoomFill1 = false;
_root.fitRoomFill2 = false;
_root.fitRoom1 = false;
_root.tryRooms = false;
_root.deliverPacket = false;
_root.sewingStart = false;
_root.sewingmachine = false;
_root.dressClicked = false;
_root.startActions = false;
_root.sewTimers = 0;
_root.sewTimerEnd = 70;
_root.bobName = "";
_root.bobSelects = "";
_root.dressSelects = "";
_root.customerWalks = "";
_root.clothName = "";
_root.walkItem1 = 0;
_root.walkItem2 = 0;
_root.walkItem3 = 0;
_root.walkItem4 = 0;
_root.girlSpeed = 12;
_root.coffeeready = false;
_root.girlReachedmachine = false;
_root.dressArray.splice(0);
_root.seatArray.splice(0);
_root.destNi.splice(0);
_root.customerArray.splice(0);
_root.customerGoOutArray.splice(0);
_root.arraySelect.splice(0);
_root.pathNode.splice(0);
_root.deliverPackets = false;
_root.deliverpacks = false;
_root.custArray = ["walkright", "walkleft", "sit", "goout", "sitttingStill", "nothappysit", "happysit", "coffedrink", "readingbooks", "stillCusts", "sittingordered"];
_root.customerStart = true;
_root.custEnterT1 = 0;
_root.custEnterTime1 = 10;
_root.finalDepth = 1;
_root.goOutDepths = 1000;
_root.fittingDepths = 500;
_root.custDepth = 1;
_root.machineReachCount = 0;
_root.girlWalk = false;
_root.Paused = true;
_root.attachMovie("boxTargets", "boxeTargets", 10000, {_x:375, _y:250});
_root.currentNodeGirl = "D7";
_root[destinationNodeGirl] = "";
_root.attachMovie("girl", "girl", 4000, {_x:290, _y:400});
_root.girl.gotoAndStop("stillStand");
_root.outDepths = 5000;
_root.outDepths1 = 2000;
_root.attachMovie("machines", "machines", 8002, {_x:400, _y:500});
_root.machines.sewmachine.girldupe._visible = false;
_root.machines.sewmachine.hand._visible = false;
_root.machines.moneys._visible = false;
_root.attachMovie("dresses", "dresses", 8001, {_x:630, _y:330});
_root.fit1.popup._visible = false;
_root.fit2.popup._visible = false;
_root.girl._x = _root.D7._x;
_root.girl._y = _root.D7._y;
_root.girl._xscale = 105;
_root.girl._yscale = 105;
_root.orderTimes = 400;
_root.orderTaken = false;
_root.custwalktoseat = false;
_root.startTimer = false;
_root.timeOutProcess = false;
var _local2 = 1;
while (_local2 < 5) {
_root["seat" + _local2] = false;
_local2++;
}
_root.custSpeed = 10;
_root.seatArray = ["D2", "D3", "D4", "D5"];
_root.dressArray.push(7);
_root.dressArray.push(8);
var _local3 = 1;
while (_local3 < 5) {
_root.dresses["dress" + _local3].enabled = false;
_root.machines.bobbinTypes["bob" + _local3].enabled = false;
_local3++;
}
_root.clocks.clo.gotoAndStop(1);
_root.tars = 2900;
_root.avgScore = 0;
_root.machines.cashCounter.enabled = true;
if (_root.level == 1) {
_root.custEnterTimes = 300;
_root.avgScore = 5;
_root.score = 0;
_root.InitTime = 20;
_root.timer = 0;
_root.waitingTimes = 1200;
_local3 = 1;
while (_local3 < 13) {
_root["saleItem" + _local3] = false;
_local3++;
}
_root.machines.sewmachine.mach.enabled = false;
_root.machines.cashCounter.enabled = false;
_root.fit2._visible = false;
_root.targets = 50;
_root.dresses.dress3._visible = false;
}
if (_root.level == 2) {
_root.custEnterTimes = 290;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 250;
_root.waitingTimes = 600;
}
if (_root.level == 3) {
_root.custEnterTimes = 270;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 300;
_root.waitingTimes = 560;
}
if (_root.level == 4) {
_root.custEnterTimes = 250;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 450;
_root.waitingTimes = 520;
}
if (_root.level == 5) {
_root.custEnterTimes = 220;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 550;
_root.waitingTimes = 480;
}
if (_root.level == 6) {
_root.custEnterTimes = 200;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 650;
_root.waitingTimes = 440;
}
if (_root.level == 7) {
_root.custEnterTimes = 200;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 850;
_root.waitingTimes = 400;
}
if (_root.level == 8) {
_root.custEnterTimes = 190;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 950;
_root.waitingTimes = 360;
}
if (_root.level == 9) {
_root.custEnterTimes = 180;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 1100;
_root.waitingTimes = 360;
}
if (_root.level == 10) {
_root.custEnterTimes = 170;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 1500;
_root.waitingTimes = 320;
}
if (_root.level == 11) {
_root.custEnterTimes = 160;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 2000;
_root.waitingTimes = 320;
}
if (_root.level == 12) {
_root.custEnterTimes = 150;
_root.InitTime = 30;
_root.timer = 0;
_root.targets = 2900;
_root.waitingTimes = 280;
}
if (_root.level >= 13) {
_root.custEnterTimes = 120;
_root.InitTime = 30;
_root.timer = 0;
_root.waitingTimes = 280;
_root.targets = (_root.tars + 50) + ((_root.level - 13) * 50);
}
if (_root.saleItem1 == true) {
_root.avgScore = _root.avgScore + 50;
_root.flowerpot.gotoAndStop(2);
}
if (_root.saleItem2 == false) {
_root.yesdress2 = true;
_root.dresses._x = _root.dresses._x + 50;
_root.dresses.dress2._x = _root.dresses.dress2._x + 20;
_root.dresses.dress3._visible = false;
} else if (_root.falseDress) {
_root.allDress = true;
} else {
_root.yesdress2 = false;
_root.avgScore = _root.avgScore + 20;
_root.dresses._x = _root.dresses._x + 20;
_root.dresses.dress2._x = _root.dresses.dress2._x + 20;
_root.dresses.dress3._x = _root.dresses.dress3._x + 30;
_root.dresses.dress3._visible = true;
_root.dressArray.push(9);
}
if (_root.saleItem3 == false) {
_root.paintings.gotoAndStop(1);
} else {
_root.avgScore = _root.avgScore + 10;
_root.paintings.gotoAndStop(2);
}
if (_root.saleItem4 == false) {
_root.dresses.dress4._visible = false;
} else if (_root.yesdress2 == true) {
if (_root.allDress == true) {
_root.dresses.gotoAndStop(2);
_root.dresses.dress4._visible = true;
_root.dresses.dress3._visible = true;
_root.dressArray.push(10);
_root.dressArray.push(9);
} else {
_root.falseDress = true;
_root.dresses.gotoAndStop(2);
_root.dresses._x = _root.dresses._x - 20;
_root.dresses.dress2._x = _root.dresses.dress2._x - 20;
_root.dresses.dress4._visible = true;
_root.dressArray.push(10);
}
} else {
_root.avgScore = _root.avgScore + 20;
_root.dresses._x = _root.dresses._x - 20;
_root.dresses.dress2._x = _root.dresses.dress2._x - 20;
_root.dresses.dress3._x = _root.dresses.dress3._x - 30;
_root.dresses.dress4._visible = true;
_root.dressArray.push(10);
}
if (_root.saleItem5 == true) {
_root.avgScore = _root.avgScore + 20;
_root.machines.books._visible = true;
_root.machines.books.enabled = false;
} else {
_root.machines.books._visible = false;
}
if (_root.saleItem6 == false) {
_root.carpet.gotoAndStop(1);
} else {
_root.avgScore = _root.avgScore + 20;
_root.carpet.gotoAndStop(2);
}
if (_root.saleItem7 == false) {
} else {
_root.girlSpeed = 15;
_root.sewTimerEnd = 50;
_root.avgScore = _root.avgScore + 50;
}
if (_root.saleItem8 == false) {
_root.machines.coffemach._visible = false;
} else {
_root.avgScore = _root.avgScore + 50;
_root.machines.coffemach._visible = true;
}
if (_root.saleItem9 == false) {
_root.curtain.gotoAndStop(1);
} else {
_root.avgScore = _root.avgScore + 50;
_root.curtain.gotoAndStop(2);
}
if (_root.saleItem10 == true) {
_root.avgScore = _root.avgScore + 80;
_root.sewTimerEnd = 30;
_root.machines.sewmachine.mach.gotoAndStop(2);
}
if (_root.saleItem11 == false) {
_root.fit2._visible = false;
} else {
_root.fitRoom2 = false;
_root.avgScore = _root.avgScore + 100;
_root.fit2._visible = true;
}
if (_root.saleItem12 == false) {
_root.chairs.gotoAndStop(1);
} else {
_root.avgScore = _root.avgScore + 150;
_root.chairs.gotoAndStop(2);
}
_root.sound2.attachSound("doors1");
_root.sound3.attachSound("pops");
_root.sound4.attachSound("click");
_root.sound5.attachSound("angry");
_root.sound6.attachSound("happy");
_root.machines.sewmachine.arrows._visible = false;
_root.machines.cashCounter.arrows._visible = false;
_local2 = 1;
while (_local2 < 5) {
_root.dresses["dress" + _local2].arrows._visible = false;
_root.machines.bobbinTypes["bob" + _local2].arrows._visible = false;
_local2++;
}
}
function setTimer() {
if (_root.startTimer == false) {
_root.timer++;
if (_root.timer >= _root.InitTime) {
_root.timer = 0;
_root.clocks.clo.gotoAndStop(_root.clocks.clo._currentframe + 1);
if (_root.clocks.clo._currentframe == 40) {
_root.startTimer = true;
_root.timeOutProcess = true;
}
}
}
if (_root.timeOutProcess == true) {
if ((_root.customerArray.length == 0) && (_root.customerGoOutArray.length == 0)) {
_root.Paused = true;
if (_root.score1 >= _root.targets) {
_root.score = _root.score + _root.score1;
clearCanvas();
if ((((((((((((_root.saleItem1 == true) && (_root.saleItem2 == true)) && (_root.saleItem3 == true)) && (_root.saleItem4 == true)) && (_root.saleItem5 == true)) && (_root.saleItem6 == true)) && (_root.saleItem7 == true)) && (_root.saleItem8 == true)) && (_root.saleItem9 == true)) && (_root.saleItem10 == true)) && (_root.saleItem11 == true)) && (_root.saleItem12 == true)) {
_root.gotoAndPlay("gamewon");
} else {
_root.gotoAndStop("dayCompleted");
}
} else {
_root.score = _root.score + _root.score1;
clearCanvas();
_root.gotoAndPlay("gameover");
}
_root.timeOutProcess = false;
}
}
}
function custEnter() {
if (_root.level <= 3) {
_root.custRand = 1 + random(2);
} else if ((_root.level >= 4) && (_root.level <= 7)) {
_root.custRand = 1 + random(3);
} else {
_root.custRand = 1 + random(4);
}
_root.custDepth++;
_root.attachMovie("cust" + _root.custRand, "cust" + _root.custDepth, _root.finalDepth++);
_root["cust" + _root.custDepth]._x = _root.D1._x;
_root["cust" + _root.custDepth]._y = _root.D1._y + 10;
_root["cust" + _root.custDepth].gotoAndStop(_root.custArray[0]);
_root["cust" + _root.custDepth].walk = true;
_root["cust" + _root.custDepth].custNumber = _root.custRand;
_root["cust" + _root.custDepth].exitProcess = false;
_root["cust" + _root.custDepth].popup._visible = false;
_root["cust" + _root.custDepth].clocks._visible = false;
_root.customerId = _root["cust" + _root.custDepth];
if (_root.seat1 == false) {
_root["destinationNode" + _root.custDepth] = _root.seatArray[0];
_root.customerId.seat = 1;
_root.seat1 = true;
} else if (_root.seat2 == false) {
_root["destinationNode" + _root.custDepth] = _root.seatArray[1];
_root.customerId.seat = 2;
_root.seat2 = true;
} else if (_root.seat3 == false) {
_root["destinationNode" + _root.custDepth] = _root.seatArray[2];
_root.customerId.seat = 3;
_root.seat3 = true;
} else if (_root.seat4 == false) {
_root["destinationNode" + _root.custDepth] = _root.seatArray[3];
_root.customerId.seat = 4;
_root.seat4 = true;
} else {
_root.customerId.removeMovieClip();
}
_root.pathNodeArr = new Array();
_root.pathNodeArr.splice(0);
_root.currentNodels = "D1";
_root.pathNodeArr = _root[_root.currentNodels + "Array"][_root[_root["destinationNode" + _root.custDepth] + "Num"]].split(":");
_root.pathNodeArr.reverse();
_root.customerId.action = 1;
_root.customerId.destination = _root["destinationNode" + _root.custDepth];
_root.destination = _root["destinationNode" + _root.custDepth];
_root.custwalktoseat = true;
}
function custWalkSeat() {
if (_root[destination] == "") {
_root[destination] = _root.pathNodeArr.pop();
} else {
if ((_root.customerId._x < _root[destination]._x) && (Math.abs(_root.customerId._x - _root[destination]._x) >= _root.custSpeed)) {
_root.customerId._x = _root.customerId._x + _root.custSpeed;
} else if ((_root.customerId._x > _root[destination]._x) && (Math.abs(_root.customerId._x - _root[destination]._x) >= _root.custSpeed)) {
_root.customerId._x = _root.customerId._x - _root.custSpeed;
}
if ((_root.customerId._y < _root[destination]._y) && (Math.abs(_root.customerId._y - _root[destination]._y) > _root.custSpeed)) {
_root.customerId._y = _root.customerId._y + _root.custSpeed;
} else if ((_root.customerId._y > _root[destination]._y) && (Math.abs(_root.customerId._y - _root[destination]._y) > _root.custSpeed)) {
_root.customerId._y = _root.customerId._y - _root.custSpeed;
}
if ((Math.abs(_root.customerId._x - _root[destination]._x) <= _root.custSpeed) && (Math.abs(_root.customerId._y - _root[destination]._y) <= _root.custSpeed)) {
_root.customerId._x = _root[destination]._x;
_root.customerId._y = _root[destination]._y;
_root.customerId.currentNode = destination;
if (_root.customerId.destination == _root.customerId.currentNode) {
_root.customerId.walk = false;
_root.custwalktoseat = false;
_root.customerId.gotoAndStop(_root.custArray[2]);
_root.customerId.charsit.gotoAndPlay(_root.custArray[4]);
_root.customerId.charsit.arrows._visible = false;
_root.customerId.intervalForOrder = true;
_root.customerId.timeNum = 0;
_root.customerId.timeForOrder = _root.orderTimes;
_root.customerId.states = "order";
_root.customerId.clocks._visible = true;
_root.customerId.clocks.gotoAndStop(1);
_root.customerId.pressstate = true;
if (_root.level == 1) {
var _local2 = new flash.filters.GlowFilter(16711680, 4, 6, 6, 2, 5, false, false);
_root.customerId.filters = [_local2];
_root.customerId.charsit.arrows._visible = true;
} else {
_root.customerId.arrows._visible = false;
}
if (_root.clocks.clo._currentframe < 28) {
if (_root.level == 1) {
_root.customerStart = false;
} else {
_root.customerStart = true;
}
}
if (_root.soundready == false) {
_root.sound3.start();
}
_root.customerId.enabled = true;
_root.customerArray.push(_root.customerId);
}
}
}
}
function customerWaiting() {
if (_root.fitRoomsCust1.states == "tryingDress") {
if (_root.fitRoomsCust1.intervalForOrder) {
_root.fitRoomsCust1.timeNum++;
if (_root.fitRoomsCust1.timeNum == _root.fitRoomsCust1.timeForOrder) {
_root.fitRoomsCust1._visible = true;
_root.fitRoomsCust1.gotoAndStop(1);
_root.fitRoomsCust1.states = "trydressFinish";
if (_root.fitRoomsCust1.twoDress == true) {
if ((((_root.fitRoomsCust1.correctDress1 == true) && (_root.fitRoomsCust1.correctDress2 == true)) && (_root.fitRoomsCust1.bobsSame1 == true)) && (_root.fitRoomsCust1.bobsSame2 == true)) {
_root.fitRoomsCust1.popup._visible = true;
_root.fitRoomsCust1.popup.gotoAndStop(21);
_root.fitRoomsCust1.clocks._visible = true;
_root.fitRoomsCust1.clocks.gotoAndStop(1);
_root.fitRoomsCust1.enabled = true;
_root.fitRoomsCust1.oneTaken = true;
_root.fitRoomsCust1.timeNum = 0;
} else if ((_root.fitRoomsCust1.correctDress1 == false) && (_root.fitRoomsCust1.correctDress2 == false)) {
_root.fitRoomsCust1.gotoAndStop("wrongdress");
_root.fitRoomsCust1.enabled = false;
_root.fitRoomsCust1.pressstate = false;
_root.fitRoomsCust1.intervalForOrder = true;
if (_root.saleItem11 == true) {
_root.fitRoomsCust1.timeNum = 238;
_root.fitRoomsCust1.timeForOrder = 240;
} else {
_root.fitRoomsCust1.timeNum = 158;
_root.fitRoomsCust1.timeForOrder = 160;
}
_root.fitRoomFill1 = false;
_root.fitRoom1 = false;
} else {
_root.fitRoomsCust1.clocks._visible = true;
_root.fitRoomsCust1.clocks.gotoAndStop(1);
_root.fitRoomsCust1.popup._visible = true;
_root.fitRoomsCust1.popup.gotoAndStop(20);
_root.fitRoomsCust1.enabled = true;
_root.fitRoomsCust1.timeNum = 0;
}
} else if (_root.fitRoomsCust1.correctDress == true) {
_root.fitRoomsCust1.clocks._visible = true;
_root.fitRoomsCust1.clocks.gotoAndStop(1);
_root.fitRoomsCust1.popup._visible = true;
_root.fitRoomsCust1.popup.gotoAndStop(20);
_root.fitRoomsCust1.enabled = true;
_root.fitRoomsCust1.timeNum = 0;
if (_root.level == 1) {
_root.fitRoomsCust1.timeForOrder = 1200;
if ((_root.girl._x == _root.D15._x) && (_root.girl._y == _root.D15._y)) {
var _local6 = new flash.filters.GlowFilter(16711680, 4, 6, 6, 2, 5, false, false);
_root.machines.cashCounter.filters = [_local6];
_root.machines.cashCounter.enabled = true;
_root.machines.cashCounter.arrows._visible = true;
} else {
var _local6 = new flash.filters.GlowFilter(16711680, 4, 6, 6, 2, 5, false, false);
_root.fitRoomsCust1.filters = [_local6];
}
}
} else {
_root.fitRoomsCust1.clocks._visible = false;
_root.fitRoomsCust1.gotoAndStop("wrongdress");
_root.fitRoomsCust1.enabled = false;
_root.fitRoomsCust1.pressstate = false;
_root.fitRoomsCust1.intervalForOrder = true;
if (_root.saleItem11 == true) {
_root.fitRoomsCust1.timeNum = 238;
_root.fitRoomsCust1.timeForOrder = 240;
} else {
_root.fitRoomsCust1.timeNum = 158;
_root.fitRoomsCust1.timeForOrder = 160;
}
_root.fitRoomFill1 = false;
_root.fitRoom1 = false;
}
}
}
}
if (_root.fitRoomsCust1.states == "trydressFinish") {
if (_root.fitRoomsCust1.intervalForOrder) {
_root.fitRoomsCust1.timeNum++;
if (_root.fitRoomsCust1.timeNum == 1) {
_root.fitRoomsCust1.timevals = Math.round(_root.fitRoomsCust1.timeForOrder / 40);
_root.fitRoomsCust1.timevals1 = _root.fitRoomsCust1.timevals;
}
if (_root.fitRoomsCust1.timeNum == _root.fitRoomsCust1.timevals) {
_root.fitRoomsCust1.timevals = _root.fitRoomsCust1.timevals + _root.fitRoomsCust1.timevals1;
_root.fitRoomsCust1.clocks.gotoAndStop(_root.fitRoomsCust1.clocks._currentframe + 1);
}
if (_root.fitRoomsCust1.timeNum == _root.fitRoomsCust1.timeForOrder) {
_root.customerArray.push(_root.fitRoomsCust1);
_root.fit1.popups._visible = false;
_root.fitRoom1 = false;
var _local2 = 0;
while (_local2 < _root.customerArray.length) {
if (_root.fitRoomsCust1 == _root.customerArray[_local2]) {
_root.customerArray[_local2].walk = true;
_root.customerArray[_local2].states = "GoOut";
_root.fitRoomFill1 = false;
_root.fitRoom1 = false;
_root.customerArray[_local2].popup._visible = false;
_root.customerArray[i].gotoAndPlay("go out");
_root.customerArray[_local2].enabled = false;
_root.customerArray[_local2]._y = _root.customerArray[_local2]._y + 50;
_root.customerArray[_local2].destination = "D6";
_root.fitRoomsCust1 = "";
}
_local2++;
}
}
}
}
if (_root.fitRoomsCust2.states == "tryingDress") {
if (_root.fitRoomsCust2.intervalForOrder) {
_root.fitRoomsCust2.timeNum++;
if (_root.fitRoomsCust2.timeNum == _root.fitRoomsCust2.timeForOrder) {
_root.fitRoomsCust2._visible = true;
_root.fitRoomsCust2.gotoAndStop(1);
_root.fitRoomsCust2.states = "trydressFinish";
if (_root.fitRoomsCust2.twoDress == true) {
if ((((_root.fitRoomsCust2.correctDress1 == true) && (_root.fitRoomsCust2.correctDress2 == true)) && (_root.fitRoomsCust2.bobsSame1 == true)) && (_root.fitRoomsCust2.bobsSame2 == true)) {
_root.fitRoomsCust2.clocks._visible = true;
_root.fitRoomsCust2.clocks.gotoAndStop(1);
_root.fitRoomsCust2.popup._visible = true;
_root.fitRoomsCust2.popup.gotoAndStop(21);
_root.fitRoomsCust2.enabled = true;
_root.fitRoomsCust2.oneTaken = true;
_root.fitRoomsCust2.timeNum = 0;
} else if ((_root.fitRoomsCust2.correctDress1 == false) && (_root.fitRoomsCust2.correctDress1 == false)) {
_root.fitRoomsCust2.gotoAndStop("wrongdress");
_root.fitRoomsCust2.enabled = false;
_root.fitRoomsCust2.pressstate = false;
_root.fitRoomsCust2.intervalForOrder = true;
if (_root.saleItem11 == true) {
_root.fitRoomsCust2.timeNum = 238;
_root.fitRoomsCust2.timeForOrder = 240;
} else {
_root.fitRoomsCust2.timeNum = 158;
_root.fitRoomsCust2.timeForOrder = 160;
}
_root.fitRoomFill2 = false;
_root.fitRoom2 = false;
} else {
_root.fitRoomsCust2.timeNum = 0;
_root.fitRoomsCust2.clocks._visible = true;
_root.fitRoomsCust2.clocks.gotoAndStop(1);
_root.fitRoomsCust2.popup._visible = true;
_root.fitRoomsCust2.popup.gotoAndStop(20);
_root.fitRoomsCust2.enabled = true;
_root.fitRoomsCust2.timeNum = 0;
}
} else if (_root.fitRoomsCust2.correctDress == true) {
_root.fitRoomsCust2.clocks._visible = true;
_root.fitRoomsCust2.clocks.gotoAndStop(1);
_root.fitRoomsCust2.popup._visible = true;
_root.fitRoomsCust2.popup.gotoAndStop(20);
_root.fitRoomsCust2.enabled = true;
_root.fitRoomsCust2.timeNum = 0;
} else {
_root.fitRoomsCust2.gotoAndStop("wrongdress");
_root.fitRoomsCust2.enabled = false;
_root.fitRoomsCust2.pressstate = false;
_root.fitRoomsCust2.intervalForOrder = true;
if (_root.saleItem11 == true) {
_root.fitRoomsCust2.timeNum = 238;
_root.fitRoomsCust2.timeForOrder = 240;
} else {
_root.fitRoomsCust2.timeNum = 158;
_root.fitRoomsCust2.timeForOrder = 160;
}
_root.fitRoomFill2 = false;
_root.fitRoom2 = false;
}
}
}
}
if (_root.fitRoomsCust2.states == "trydressFinish") {
if (_root.fitRoomsCust2.intervalForOrder) {
_root.fitRoomsCust2.timeNum++;
if (_root.fitRoomsCust2.timeNum == 1) {
_root.fitRoomsCust2.timevals = Math.round(_root.fitRoomsCust2.timeForOrder / 40);
_root.fitRoomsCust2.timevals1 = _root.fitRoomsCust2.timevals;
}
if (_root.fitRoomsCust2.timeNum == _root.fitRoomsCust2.timevals) {
_root.fitRoomsCust2.timevals = _root.fitRoomsCust2.timevals + _root.fitRoomsCust2.timevals1;
_root.fitRoomsCust2.clocks.gotoAndStop(_root.fitRoomsCust2.clocks._currentframe + 1);
}
if (_root.fitRoomsCust2.timeNum == _root.fitRoomsCust2.timeForOrder) {
_root.customerArray.push(_root.fitRoomsCust2);
_root.fit2.popups._visible = false;
_root.fitRoom2 = false;
var _local2 = 0;
while (_local2 < _root.customerArray.length) {
if (_root.fitRoomsCust2 == _root.customerArray[_local2]) {
_root.customerArray[_local2].walk = true;
_root.fitRoomFill2 = false;
_root.fitRoom2 = false;
_root.customerArray[_local2].states = "GoOut";
_root.customerArray[_local2].popup._visible = false;
_root.customerArray[i].gotoAndPlay("go out");
_root.customerArray[_local2].enabled = false;
_root.customerArray[_local2]._y = _root.customerArray[_local2]._y + 50;
_root.customerArray[_local2].destination = "D6";
_root.fitRoomsCust2 = "";
}
_local2++;
}
}
}
}
for (var i in _root.customerArray) {
if (_root.customerArray[i].states == "givingMoney") {
if (_root.customerArray[i].intervalForOrder) {
_root.customerArray[i].timeNum++;
if (_root.customerArray[i].timeNum == 1) {
_root.customerArray[i].timevals = Math.round(_root.customerArray[i].timeForOrder / 40);
_root.customerArray[i].timevals1 = _root.customerArray[i].timevals;
}
if (_root.customerArray[i].timeNum == _root.customerArray[i].timevals) {
_root.customerArray[i].timevals = _root.customerArray[i].timevals + _root.customerArray[i].timevals1;
_root.customerArray[i].clocks.gotoAndStop(_root.customerArray[i].clocks._currentframe + 1);
}
if (_root.customerArray[i].timeNum == (_root.customerArray[i].timeForOrder + 10)) {
if (_root.saleItem7 == true) {
_root.customerArray[i].timeForOrder = 20;
_root.customerArray[i].timesMoney = 5;
_root.girl.gotoAndStop("delivering1");
} else {
_root.customerArray[i].timesMoney = 15;
_root.girl.gotoAndStop("delivering");
}
_root.machines.moneys._visible = false;
}
if (_root.customerArray[i].timeNum == (_root.customerArray[i].timeForOrder + _root.customerArray[i].timesMoney)) {
_root.customerArray[i].walk = true;
_root.customerArray[i].popup._visible = false;
_root.customerArray[i].offerBooks = false;
_root.customerArray[i].offerCoffee = false;
_root.startActions = false;
if (_root.soundready == false) {
_root.sound6.start();
}
_root.customerArray[i].gotDress = true;
_root.customerArray[i].states = "GoOut";
_root.customerArray[i].destination = "D6";
}
}
}
if (_root.customerArray[i].states == "order") {
if (_root.customerArray[i].intervalForOrder) {
_root.customerArray[i].timeNum++;
if (_root.customerArray[i].timeNum == 1) {
_root.customerArray[i].timevals = Math.round(_root.customerArray[i].timeForOrder / 40);
_root.customerArray[i].timevals1 = _root.customerArray[i].timevals;
}
if (_root.customerArray[i].timeNum == _root.customerArray[i].timevals) {
_root.customerArray[i].timevals = _root.customerArray[i].timevals + _root.customerArray[i].timevals1;
_root.customerArray[i].clocks.gotoAndStop(_root.customerArray[i].clocks._currentframe + 1);
}
if (_root.customerArray[i].timeNum == (_root.customerArray[i].timeForOrder - 5)) {
_root.customerArray[i].charsit.gotoAndPlay(_root.custArray[5]);
_root.customerArray[i].charsit.arrows._visible = false;
_root.customerArray[i].enabled = false;
_root.customerArray[i].pressstate = false;
}
if (_root.customerArray[i].timeNum == _root.customerArray[i].timeForOrder) {
_root.customerArray[i].walk = true;
if (_root.soundready == false) {
_root.sound5.start();
}
_root.customerArray[i].states = "GoOut";
_root.customerArray[i]._y = _root.customerArray[i]._y + 30;
_root.customerArray[i].destination = "D6";
}
}
}
if (_root.customerArray[i].states == "waiting") {
if (_root.customerArray[i].intervalForOrder) {
_root.customerArray[i].timeNum++;
if (_root.customerArray[i].timeNum == 1) {
_root.customerArray[i].timevals = Math.round(_root.customerArray[i].timeForOrder / 40);
_root.customerArray[i].timevals1 = _root.customerArray[i].timevals;
}
if (_root.customerArray[i].timeNum == _root.customerArray[i].timevals) {
_root.customerArray[i].timevals = _root.customerArray[i].timevals + _root.customerArray[i].timevals1;
_root.customerArray[i].clocks.gotoAndStop(_root.customerArray[i].clocks._currentframe + 1);
}
if (_root.saleItem5 || (_root.saleItem8)) {
if (_root.customerArray[i].twoDress == false) {
if (_root.customerArray[i].notClicked == false) {
var _local3 = 1 + random(5);
if (((_local3 == 1) || (_local3 == 5)) || (_local3 == 3)) {
if (_root.customerArray[i].timeNum == 100) {
var _local5 = 1 + random(4);
if ((_local5 == 1) || (_local5 == 2)) {
_root.customerArray[i].popup._visible = true;
var _local4 = 1 + random(2);
if (_local4 == 1) {
if (_root.saleItem8 == true) {
_root.customerArray[i].offerCoffee = true;
_root.customerArray[i].popup.gotoAndStop(11);
_root.customerArray[i].enabled = false;
} else if (_root.saleItem5 == true) {
_root.customerArray[i].offerBooks = true;
_root.customerArray[i].popup.gotoAndStop(12);
_root.customerArray[i].enabled = false;
} else {
_root.customerArray[i].popup._visible = false;
}
} else if (_local4 == 2) {
if (_root.saleItem5 == true) {
_root.customerArray[i].offerBooks = true;
_root.customerArray[i].popup.gotoAndStop(12);
_root.customerArray[i].enabled = false;
} else if (_root.saleItem8 == true) {
_root.customerArray[i].offerCoffee = true;
_root.customerArray[i].popup.gotoAndStop(11);
_root.customerArray[i].enabled = false;
} else {
_root.customerArray[i].popup._visible = false;
}
}
}
}
}
}
}
}
if (_root.customerArray[i].timeTakens == true) {
if (_root.customerArray[i].timeNum == (_root.customerArray[i].timeforCoffee + 30)) {
_root.customerArray[i].popup._visible = false;
_root.customerArray[i].charsit.gotoAndPlay(_root.custArray[6]);
_root.customerArray[i].charsit.arrows._visible = false;
_root.customerArray[i].timeTakens = false;
_root.customerArray[i].processing = false;
if ((_root.fitRoom1 == false) || (_root.fitRoom2 == false)) {
if (_root.level != 1) {
_root.customerArray[i].enabled = true;
}
}
}
}
if (_root.customerArray[i].timeNum == (_root.customerArray[i].timeForOrder - 5)) {
_root.customerArray[i].timeTakens = false;
_root.customerArray[i].popup._visible = false;
_root.customerArray[i].charsit.gotoAndPlay(_root.custArray[5]);
_root.customerArray[i].charsit.arrows._visible = false;
_root.customerArray[i].enabled = false;
_root.customerArray[i].pressstate = false;
}
if (_root.customerArray[i].timeNum == _root.customerArray[i].timeForOrder) {
_root.customerArray[i].walk = true;
if (_root.soundready == false) {
_root.sound5.start();
}
_root.customerArray[i].states = "GoOut";
_root.customerArray[i]._y = _root.customerArray[i]._y + 30;
_root.customerArray[i].destination = "D6";
}
}
}
}
}
function custGoOut() {
for (var _local2 in _root.customerGoOutArray) {
_root.customerGoOutArray[_local2].clocks._visible = false;
if ((_root.customerGoOutArray[_local2]._x < _root[_root.customerGoOutArray[_local2].destination]._x) && (Math.abs(_root.customerGoOutArray[_local2]._x - _root[_root.customerGoOutArray[_local2].destination]._x) >= _root.custSpeed)) {
_root.customerGoOutArray[_local2]._x = _root.customerGoOutArray[_local2]._x + _root.custSpeed;
} else if ((_root.customerGoOutArray[_local2]._x > _root[_root.customerGoOutArray[_local2].destination]._x) && (Math.abs(_root.customerGoOutArray[_local2]._x - _root[_root.customerGoOutArray[_local2].destination]._x) >= _root.custSpeed)) {
_root.customerGoOutArray[_local2]._x = _root.customerGoOutArray[_local2]._x - _root.custSpeed;
}
if ((_root.customerGoOutArray[_local2]._y < _root[_root.customerGoOutArray[_local2].destination]._y) && (Math.abs(_root.customerGoOutArray[_local2]._y - _root[_root.customerGoOutArray[_local2].destination]._y) > _root.custSpeed)) {
_root.customerGoOutArray[_local2]._y = _root.customerGoOutArray[_local2]._y + _root.custSpeed;
} else if ((_root.customerGoOutArray[_local2]._y > _root[_root.customerGoOutArray[_local2].destination]._y) && (Math.abs(_root.customerGoOutArray[_local2]._y - _root[_root.customerGoOutArray[_local2].destination]._y) > _root.custSpeed)) {
_root.customerGoOutArray[_local2]._y = _root.customerGoOutArray[_local2]._y - _root.custSpeed;
}
if ((Math.abs(_root.customerGoOutArray[_local2]._x - _root[_root.customerGoOutArray[_local2].destination]._x) <= _root.custSpeed) && (Math.abs(_root.customerGoOutArray[_local2]._y - _root[_root.customerGoOutArray[_local2].destination]._y) <= _root.custSpeed)) {
if (_root.customerGoOutArray[_local2].destination == "D6") {
_root.customerGoOutArray[_local2].destination = "D1";
if (_root.soundready == false) {
_root.sound2.start();
}
_root.bg.doors.gotoAndPlay(1);
} else {
_root.customerGoOutArray[_local2].removeMovieClip();
_root.customerGoOutArray.splice(_local2);
}
}
}
}
function clearCanvas() {
_root.boxeTargets.removeMovieClip();
_root.helps.removeMovieClip();
var _local3 = 0;
while (_local3 < _root.customerGoOutArray.length) {
_root.customerGoOutArray[_local3].removeMovieClip();
_local3++;
}
_root.customerId.removeMovieClip();
var _local2 = 0;
while (_local2 < _root.customerArray.length) {
_root.customerArray[_local2].removeMovieClip();
_local2++;
}
_root.girl.removeMovieClip();
_root.dresses.removeMovieClip();
_root.machines.removeMovieClip();
}
function arrayFlow() {
if (_root.sewingmachine == true) {
_root.sewingStart = false;
_root.machines.sewmachine.gotoAndStop("idal");
_root.machines.sewmachine.girldupe._visible = false;
_root.machines.sewmachine.hand._visible = false;
_root.machines.sewmachine.sewClothes.gotoAndStop(_root.clothName);
_root.machines.sewmachine.bobbins._visible = true;
_root.machines.sewmachine.bobbins.gotoAndStop(_root.bobName);
}
if ((_root.arraySelect[0].states == "waitingLongs") && (_root.sewingmachine == false)) {
_root.girl._visible = true;
_root.machines.sewmachine.girldupe._visible = false;
_root.machines.sewmachine.hand._visible = false;
}
if (_root.arraySelect[0] == _root.machines.cashCounter) {
if (_root.currentNodeGirl == "D15") {
if (_root.fitRoomsCust1.states == "trydressFinish") {
_root.fitRoomFill1 = false;
_root.fitRoom1 = false;
_root.customerWalks = _root.fitRoomsCust1;
_root.customerWalks.states = "cashDeliver";
_root.packetwithGirl = true;
_root.fitRoomsExpl1 = false;
}
} else if (_root.currentNodeGirl == "D16") {
if (_root.fitRoomsCust2.states == "trydressFinish") {
_root.deliverPackets = true;
_root.fitRoomFill2 = false;
_root.fitRoom2 = false;
_root.customerWalks = _root.fitRoomsCust2;
_root.customerWalks.states = "cashDeliver";
_root.packetwithGirl = true;
_root.fitRoomsExpl2 = false;
}
}
} else {
_root.fitRoomsExpl1 = false;
_root.fitRoomsExpl2 = false;
_root.customerWalks = "";
}
_root.girl.gotoAndStop("still");
_root.girl._visible = true;
_root.machines.sewmachine.girldupe._visible = false;
_root.machines.sewmachine.hand._visible = false;
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.destNi[0] + "Num"]].split(":");
_root.pathNode.reverse();
_root.girlWalk = true;
_root.startActions = true;
if ((_root.deliverPacket == true) && (_root.arraySelect[0].states == "waitingLongs")) {
if (_root.currentNodeGirl == "D14") {
_root.machines.sewmachine.gotoAndStop(1);
_root.packetwithGirl = true;
_root.deliverPacket = false;
} else if (_root.arraySelect[0].twoDress == true) {
if ((_root.fitRoom1 == false) || (_root.fitRoom2 == false)) {
_root.nodes = "D14";
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.nodes + "Num"]].split(":");
_root.pathNode.reverse();
} else if (_root.arraySelect[0].deliverdress1 == true) {
_root.arraySelect[0].states = "waiting";
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.pathNode.splice(0);
_root.girlWalk = false;
_root.startActions = false;
} else {
_root.nodes = "D14";
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.nodes + "Num"]].split(":");
_root.pathNode.reverse();
}
} else if ((_root.fitRoom1 == false) || (_root.fitRoom2 == false)) {
_root.nodes = "D14";
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.nodes + "Num"]].split(":");
_root.pathNode.reverse();
} else {
_root.arraySelect[0].states = "waiting";
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.pathNode.splice(0);
_root.girlWalk = false;
_root.startActions = false;
}
}
_root.walkItem1 = 0;
_root.walkItem3 = 0;
_root.walkItem4 = 0;
_root.walkItem2 = 0;
}
function girlWalkTime() {
_root.girlReachedmachine = false;
_root.machines.sewmachine.girldupe._visible = false;
_root.machines.sewmachine.hand._visible = false;
if (_root.customerWalks != "") {
_root.customerWalks.clocks._visible = false;
_root.customerWalks.depths = _root.customerWalks.getDepth();
_root.customerWalks.swapDepths(_root.fittingDepths);
if (_root.customerWalks.states == "cashDeliver") {
_root.customerWalks.popup._visible = false;
_root.customerWalks._x = _root.girl._x - 50;
_root.customerWalks._y = _root.girl._y - 30;
} else {
_root.customerWalks._x = _root.girl._x + 50;
}
}
if (_root[destinationNodeGirl] == "") {
_root[destinationNodeGirl] = _root.pathNode.pop();
} else {
if ((_root.girl._x < _root[_root[destinationNodeGirl]]._x) && (Math.abs(_root.girl._x - _root[_root[destinationNodeGirl]]._x) >= _root.girlSpeed)) {
_root.girl._x = _root.girl._x + _root.girlSpeed;
_root.walkItem1++;
_root.walkItem2 = 0;
_root.walkItem3 = 0;
_root.walkItem4 = 0;
if (_root.customerWalks != "") {
_root.customerWalks.popup._visible = false;
}
if (_root.walkItem1 == 1) {
if (_root.packetwithGirl) {
_root.girl.gotoAndStop("rightwalk");
_root.girl.charwalk1.gotoAndPlay("deliverrights");
if (_root.customerWalks != "") {
_root.customerWalks.gotoAndStop("walkright");
}
} else if (_root.customerWalks != "") {
_root.girl.gotoAndStop("rightwalk");
_root.girl.charwalk1.gotoAndPlay("deliverrights");
_root.customerWalks.gotoAndStop("walkright");
} else {
_root.girl.gotoAndStop("rightwalk");
_root.girl.charwalk1.gotoAndPlay("walkrights");
}
}
} else if ((_root.girl._x > _root[_root[destinationNodeGirl]]._x) && (Math.abs(_root.girl._x - _root[_root[destinationNodeGirl]]._x) >= _root.girlSpeed)) {
_root.girl._x = _root.girl._x - _root.girlSpeed;
_root.walkItem2++;
_root.walkItem1 = 0;
_root.walkItem3 = 0;
_root.walkItem4 = 0;
if (_root.walkItem2 == 1) {
if (_root.packetwithGirl) {
_root.girl.gotoAndStop("leftwalk");
_root.girl.charwalk1.gotoAndPlay("deliverlefts");
if (_root.customerWalks != "") {
_root.customerWalks.gotoAndStop("walkleft");
}
} else if (_root.customerWalks != "") {
_root.girl.gotoAndStop("leftwalk");
_root.girl.charwalk1.gotoAndPlay("deliverlefts");
_root.customerWalks.gotoAndStop("walkleft");
} else {
_root.girl.gotoAndStop("leftwalk");
_root.girl.charwalk1.gotoAndPlay("walklefts");
}
}
} else if ((_root.girl._y < _root[_root[destinationNodeGirl]]._y) && (Math.abs(_root.girl._y - _root[_root[destinationNodeGirl]]._y) > _root.girlSpeed)) {
_root.girl._y = _root.girl._y + _root.girlSpeed;
_root.walkItem3++;
_root.walkItem1 = 0;
_root.walkItem2 = 0;
_root.walkItem4 = 0;
if (_root.walkItem3 == 1) {
if (_root.packetwithGirl) {
if (_root.currentNodeGirl == "D17") {
_root.girl.gotoAndStop("frontwalk1");
_root.girl.charwalk1.gotoAndPlay("frontwithbag1");
} else {
_root.girl.gotoAndStop("frontwalk");
_root.girl.charwalk1.gotoAndPlay("frontwithbag");
}
} else if (_root.currentNodeGirl == "D17") {
_root.girl.gotoAndStop("frontwalk1");
_root.girl.charwalk1.gotoAndPlay("front");
} else {
_root.girl.gotoAndStop("frontwalk");
_root.girl.charwalk1.gotoAndPlay("front");
}
}
} else if ((_root.girl._y > _root[_root[destinationNodeGirl]]._y) && (Math.abs(_root.girl._y - _root[_root[destinationNodeGirl]]._y) > _root.girlSpeed)) {
_root.girl._y = _root.girl._y - _root.girlSpeed;
_root.walkItem4++;
_root.walkItem1 = 0;
_root.walkItem2 = 0;
_root.walkItem3 = 0;
if (_root.walkItem4 == 1) {
if (_root.packetwithGirl) {
if (_root.currentNodeGirl == "D7") {
_root.girl.gotoAndStop("backwalk1");
_root.girl.charwalk1.gotoAndPlay("backwithbag");
} else {
_root.girl.gotoAndStop("backwalk");
_root.girl.charwalk1.gotoAndPlay("backwithbag");
}
} else if (_root.currentNodeGirl == "D7") {
_root.girl.gotoAndStop("backwalk1");
_root.girl.charwalk1.gotoAndPlay("back");
} else {
_root.girl.gotoAndStop("backwalk");
_root.girl.charwalk1.gotoAndPlay("back");
}
}
}
if ((Math.abs(_root.girl._x - _root[_root[destinationNodeGirl]]._x) <= _root.girlSpeed) && (Math.abs(_root.girl._y - _root[_root[destinationNodeGirl]]._y) <= _root.girlSpeed)) {
_root.girl._x = _root[_root[destinationNodeGirl]]._x;
_root.girl._y = _root[_root[destinationNodeGirl]]._y;
_root.currentNodeGirl = _root[destinationNodeGirl];
_root[destinationNodeGirl] = "";
if (_root.pathNode.length == 0) {
if ((((_root.currentNodeGirl == "D9") || (_root.currentNodeGirl == "D10")) || (_root.currentNodeGirl == "D11")) || (_root.currentNodeGirl == "D12")) {
if (_root.arraySelect[0].states == "clicks") {
takeMeasure();
} else if (_root.arraySelect[0].states == "waitingLongs") {
_root.arraySelect[0].states = "waiting";
if (_root.arraySelect[0].twoDress == false) {
tryState();
} else {
tryState2();
}
} else {
if (_root.packetwithGirl) {
_root.girl.gotoAndStop("losegirl");
} else {
_root.girl.gotoAndStop("still");
}
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.startActions = false;
_root.girlWalk = false;
}
}
if (_root.currentNodeGirl == "D8") {
machineProcess();
}
if (_root.currentNodeGirl == "D15") {
if (_root.fitRoomFill1 === false) {
tryRoomProcess1();
} else if (_root.arraySelect[0].twoDress == false) {
if (_root.fitRoomsCust1.correctDress == true) {
doneWithRoom1();
} else {
_root.fitRoomsCust1.intervalForOrder = true;
_root.fitRoomsCust1.timeNum = 240;
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.girl.gotoAndStop("still");
}
} else if ((_root.fitRoomsCust1.correctDress1 == true) || (_root.fitRoomsCust1.correctDress2 == true)) {
doneWithRoom1();
} else {
_root.fitRoomsCust1.intervalForOrder = true;
if (_root.saleItem11 == true) {
_root.fitRoomsCust1.timeNum = 240;
} else {
_root.fitRoomsCust1.timeNum = 170;
}
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.girl.gotoAndStop("still");
}
}
if (_root.currentNodeGirl == "D16") {
if (_root.fitRoomFill2 === false) {
tryRoomProcess2();
} else if (_root.arraySelect[0].twoDress == false) {
if (_root.fitRoomsCust2.correctDress == true) {
doneWithRoom2();
} else {
_root.fitRoomsCust2.intervalForOrder = true;
_root.fitRoomsCust2.timeNum = 240;
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.girl.gotoAndStop("still");
}
} else if ((_root.fitRoomsCust2.correctDress1 == true) || (_root.fitRoomsCust2.correctDress2 == true)) {
doneWithRoom2();
} else {
_root.fitRoomsCust2.intervalForOrder = true;
if (_root.saleItem11 == true) {
_root.fitRoomsCust2.timeNum = 240;
} else {
_root.fitRoomsCust2.timeNum = 170;
}
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.girl.gotoAndStop("still");
}
}
if (_root.currentNodeGirl == "D19") {
CashProcess();
}
if (_root.currentNodeGirl == "D14") {
tookPackets();
}
}
}
}
}
function tookPackets() {
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.destNi[0] + "Num"]].split(":");
_root.pathNode.reverse();
_root.machines.sewmachine.gotoAndStop(1);
_root.packetwithGirl = true;
_root.machines.sewmachine.girldupe._visible = false;
_root.machines.sewmachine.hand._visible = false;
}
function machineProcess() {
if (_root.sewingmachine == true) {
_root.sewingStart = true;
_root.machines.sewmachine.gotoAndStop("sweingani");
_root.machines.sewmachine.sewClothes.gotoAndStop("sewingcolor" + _root.clothName);
_root.machines.sewmachine.bobbins._visible = true;
} else {
if (_root.packetwithGirl) {
_root.machines.sewmachine.gotoAndPlay("deliver");
_root.packetwithGirl = false;
}
_root.girlReachedmachine = true;
if (_root.level == 1) {
_root.machines.sewmachine.mach.filters = [];
_root.machines.sewmachine.arrows._visible = false;
var _local2 = new flash.filters.GlowFilter(16711680, 4, 6, 6, 2, 5, false, false);
_root.dresses["dress" + (_root.customerArray[0].dressIcons - 6)].filters = [_local2];
_root.dresses["dress" + (_root.customerArray[0].dressIcons - 6)].enabled = true;
_root.dresses["dress" + (_root.customerArray[0].dressIcons - 6)].arrows._visible = true;
}
}
_root.destNi.splice(0, 1);
_root.machines.sewmachine.girldupe._visible = true;
_root.machines.sewmachine.hand._visible = true;
_root.girl.gotoAndStop("still");
_root.girl._visible = false;
_root.arraySelect.splice(0, 1);
_root.startActions = false;
_root.girlWalk = false;
}
function takeMeasure() {
_root.arraySelect[0].clocks._visible = false;
_root.arraySelect[0].gotoAndStop(_root.custArray[9]);
_root.customParents = _root.arraySelect[0];
_root.GirlX = _root.girl._x;
_root.girl._x = _root.GirlX - 70;
if (_root.saleItem7 == true) {
_root.girl.gotoAndPlay("measuring1");
} else {
_root.girl.gotoAndPlay("measuring");
}
if (_root.level == 1) {
_root.arraySelect[0].filters = [];
_root.arraySelect[0].arrows._visible = false;
}
_root.girl.chars1.gotoAndPlay(1);
_root.customParents.twoDress = false;
_root.customParents.notClicked = false;
_root.customParents.popup._visible = true;
_root.customParents.dressScore = 0;
if (((_root.saleItem2 == true) && (_root.saleItem4 == true)) && (_root.level >= 7)) {
var _local2 = 1 + random(5);
if (_local2 == 1) {
_root.randDress = 13 + random(3);
_root.customParents.popup.gotoAndStop(_root.randDress);
_root.customParents.dressIcons = _root.randDress;
_root.customParents.dressNums = 0;
_root.customParents.dressNumsed = 0;
if (_root.randDress == 13) {
_root.customParents.dress1 = 1;
_root.customParents.dress2 = 2;
}
if (_root.randDress == 14) {
_root.customParents.dress1 = 2;
_root.customParents.dress2 = 3;
}
if (_root.randDress == 15) {
_root.customParents.dress1 = 3;
_root.customParents.dress2 = 4;
}
_root.customParents.twoDress = true;
_root.customParents.deliverdress1 = false;
} else {
_root.randDress = random(_root.dressArray.length);
_root.customParents.popup.gotoAndStop(_root.dressArray[_root.randDress]);
_root.customParents.dressIcons = _root.dressArray[_root.randDress];
}
} else {
_root.randDress = random(_root.dressArray.length);
_root.customParents.popup.gotoAndStop(_root.dressArray[_root.randDress]);
_root.customParents.dressIcons = _root.dressArray[_root.randDress];
}
_root.girlWalk = false;
}
function tryState2() {
if (_root.deliverPacket) {
if (_root.arraySelect[0].dressNumsed == 1) {
if (_root.arraySelect[0].correctDresss1 == true) {
if (_root.clothName == _root.arraySelect[0].dress2) {
_root.arraySelect[0].correctDress2 = true;
if (_root.clothName == _root.bobName) {
_root.arraySelect[0].bobsSame2 = true;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + (_root.clothName * 10);
} else {
_root.arraySelect[0].bobsSame2 = false;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + _root.clothName;
}
_root.arraySelect[0].dressNumsed++;
} else {
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + 0;
_root.arraySelect[0].dressNumsed = 3;
_root.arraySelect[0].correctDress2 = false;
}
} else if (_root.arraySelect[0].correctDresss2 == true) {
if (_root.clothName == _root.arraySelect[0].dress1) {
_root.arraySelect[0].correctDress1 = true;
if (_root.clothName == _root.bobName) {
_root.arraySelect[0].bobsSame1 = true;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + (_root.clothName * 10);
} else {
_root.arraySelect[0].bobsSame1 = false;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + _root.clothName;
}
_root.arraySelect[0].dressNumsed++;
} else {
_root.arraySelect[0].dressNumsed = 3;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + 0;
_root.arraySelect[0].correctDress1 = false;
}
} else if (_root.clothName == _root.arraySelect[0].dress2) {
_root.arraySelect[0].correctDress2 = true;
if (_root.clothName == _root.bobName) {
_root.arraySelect[0].bobsSame2 = true;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + (_root.clothName * 10);
} else {
_root.arraySelect[0].bobsSame2 = false;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + _root.clothName;
}
_root.arraySelect[0].dressNumsed++;
} else if (_root.clothName == _root.arraySelect[0].dress1) {
_root.arraySelect[0].correctDress1 = true;
if (_root.clothName == _root.bobName) {
_root.arraySelect[0].bobsSame1 = true;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + (_root.clothName * 10);
} else {
_root.arraySelect[0].bobsSame1 = false;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + _root.clothName;
}
_root.arraySelect[0].dressNumsed++;
} else {
_root.arraySelect[0].dressNumsed = 3;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + 0;
}
}
if (_root.arraySelect[0].dressNumsed == 0) {
if (_root.clothName == _root.arraySelect[0].dress1) {
_root.arraySelect[0].correctDress1 = true;
if (_root.clothName == _root.bobName) {
_root.arraySelect[0].bobsSame1 = true;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + (_root.clothName * 10);
} else {
_root.arraySelect[0].bobsSame1 = false;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + _root.clothName;
}
_root.arraySelect[0].dressNumsed++;
} else if (_root.clothName == _root.arraySelect[0].dress2) {
if (_root.clothName == _root.bobName) {
_root.arraySelect[0].bobsSame2 = true;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + (_root.clothName * 10);
} else {
_root.arraySelect[0].bobsSame2 = false;
_root.arraySelect[0].dressScore = _root.arraySelect[0].dressScore + (_root.clothName * 10);
}
_root.arraySelect[0].correctDress2 = true;
_root.arraySelect[0].dressNumsed++;
} else {
_root.arraySelect[0].dressNumsed++;
_root.arraySelect[0].correctDress1 = false;
_root.arraySelect[0].correctDress2 = false;
}
}
_root.arraySelect[0].dressNums++;
if (_root.arraySelect[0].dressNums == 1) {
_root.arraySelect[0].charsit.gotoAndStop("sittingwithpacket");
if ((_root.arraySelect[0].bobsSame1 == true) && (_root.arraySelect[0].bobsSame2 == true)) {
_root.arraySelect[0].bobsSame = true;
} else {
_root.arraySelect[0].bobsSame = false;
}
_root.arraySelect[0].deliverdress1 = true;
_root.arraySelect[0].notClicked = false;
_root.destNi.splice(0, 1);
_root.girl.gotoAndStop(1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.startActions = false;
_root.packetwithGirl = false;
_root.deliverpacks = false;
_root.deliverPacket = false;
} else if (_root.arraySelect[0].dressNums == 2) {
_root.arraySelect[0].deliverdress1 = false;
_root.arraySelect[0].notClicked = false;
_root.arraySelect[0].dressNums = 0;
_root.arraySelect[0].varTimes = _root.arraySelect[0].timeNum;
_root.arraySelect[0].intervalForOrder = false;
_root.arraySelect[0].timeNum = 0;
_root.arraySelect[0].popup._visible = false;
_root.arraySelect[0].offerBooks = false;
_root.arraySelect[0].offerCoffee = false;
_root.customerWalks = _root.arraySelect[0];
_root.customerWalks.gotoAndStop(_root.custArray[0]);
_root[destinationNodeGirl] = "";
_root.girlWalk = true;
_root.deliverpacks = false;
if (_root.fitRoom1 == false) {
_root.arraySelect[0].clocks._visible = false;
_root["seat" + [_root.arraySelect[0].seat]] = false;
_root.arraySelect[0].states = "tryRooms";
_root.destNi[0] = "D15";
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.destNi[0] + "Num"]].split(":");
_root.pathNode.reverse();
_root.fitRoom1 = true;
} else if (_root.saleItem11 == true) {
if (_root.fitRoom2 == false) {
_root.arraySelect[0].clocks._visible = false;
_root["seat" + [_root.arraySelect[0].seat]] = false;
_root.arraySelect[0].states = "tryRooms";
_root.destNi[0] = "D16";
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.destNi[0] + "Num"]].split(":");
_root.pathNode.reverse();
_root.fitRoom2 = true;
} else {
_root.destNi.splice(0, 1);
_root[destinationNodeGirl] = "";
_root.arraySelect.splice(0, 1);
_root.pathNode.splice(0);
_root.customerWalks = "";
_root.girlWalk = false;
_root.startActions = false;
}
} else {
_root.destNi.splice(0, 1);
_root.arraySelect[0].notClicked = false;
_root[destinationNodeGirl] = "";
_root.arraySelect.splice(0, 1);
_root.pathNode.splice(0);
_root.customerWalks = "";
_root.girlWalk = false;
_root.startActions = false;
}
_root.deliverPacket = false;
}
} else {
_root.arraySelect[0].notClicked = false;
_root.arraySelect[0].popup._visible = true;
_root.arraySelect[0].popup.gotoAndStop(_root.arraySelect[0].dressIcons);
_root.destNi.splice(0, 1);
_root.girl.gotoAndStop(1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.startActions = false;
}
}
function tryState() {
if (_root.deliverPacket) {
if (_root.clothName == (_root.arraySelect[0].dressIcons - 6)) {
if (_root.bobName == (_root.arraySelect[0].dressIcons - 6)) {
_root.arraySelect[0].bobsSame = true;
} else {
_root.arraySelect[0].bobsSame = false;
}
_root.arraySelect[0].correctDress = true;
} else {
_root.arraySelect[0].correctDress = false;
}
if (_root.level == 1) {
_root.arraySelect[0].filters = [];
_root.arraySelect[0].charsit.arrows._visible = false;
}
_root.arraySelect[0].notClicked = false;
_root.arraySelect[0].dressScore = _root.clothName * 10;
_root.arraySelect[0].varTimes = _root.arraySelect[0].timeNum;
_root.arraySelect[0].intervalForOrder = false;
_root.arraySelect[0].timeNum = 0;
_root.arraySelect[0].popup._visible = false;
_root.arraySelect[0].offerBooks = false;
_root.arraySelect[0].offerCoffee = false;
_root.customerWalks = _root.arraySelect[0];
_root.customerWalks.gotoAndStop(_root.custArray[0]);
_root[destinationNodeGirl] = "";
_root.girlWalk = true;
_root.deliverpacks = false;
_root.startActions = true;
if (_root.level == 1) {
_root.machines.sewmachine.mach.enabled = false;
_root.machines.cashCounter.enabled = false;
}
if (_root.fitRoom1 == false) {
_root.arraySelect[0].clocks._visible = false;
_root["seat" + [_root.arraySelect[0].seat]] = false;
_root.arraySelect[0].states = "tryRooms";
_root.destNi[0] = "D15";
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.destNi[0] + "Num"]].split(":");
_root.pathNode.reverse();
_root.fitRoom1 = true;
_root.deliverPacket = false;
} else if (_root.saleItem11 == true) {
if (_root.fitRoom2 == false) {
_root.arraySelect[0].clocks._visible = false;
_root["seat" + [_root.arraySelect[0].seat]] = false;
_root.arraySelect[0].states = "tryRooms";
_root.destNi[0] = "D16";
_root.pathNode.splice(0);
_root.pathNode = _root[_root.currentNodeGirl + "Array"][_root[_root.destNi[0] + "Num"]].split(":");
_root.pathNode.reverse();
_root.fitRoom2 = true;
} else {
_root[destinationNodeGirl] = "";
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.pathNode.splice(0);
_root.customerWalks = "";
_root.girlWalk = false;
_root.startActions = false;
}
} else {
_root.destNi.splice(0, 1);
_root.arraySelect[0].notClicked = false;
_root[destinationNodeGirl] = "";
_root.arraySelect.splice(0, 1);
_root.pathNode.splice(0);
_root.customerWalks = "";
_root.girlWalk = false;
_root.startActions = false;
}
_root.deliverPacket = false;
} else {
_root.arraySelect[0].popup._visible = true;
_root.arraySelect[0].popup.gotoAndStop(_root.arraySelect[0].dressIcons);
_root.arraySelect[0].notClicked = false;
_root.destNi.splice(0, 1);
_root.girl.gotoAndStop(1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.startActions = false;
}
}
function tryRoomProcess1() {
_root.fitRoomsCust1.clocks._visible = true;
_root.fit1.gotoAndPlay(1);
_root.fit1.popups._visible = false;
_root.customerWalks = "";
_root.destNi.splice(0, 1);
_root.packetwithGirl = false;
_root.girl.gotoAndStop("still");
if (_root.level == 1) {
_root.fitRoomsCust1.filters = [];
_root.fitRoomsCust1.arrows._visible = false;
}
_root.fitRoomsCust1 = _root.arraySelect[0];
_root.arraySelect[0].swapDepths(_root.arraySelect[0].getDepth());
_root.arraySelect.splice(0, 1);
_root.fitRoomsCust1.intervalForOrder = true;
_root.fitRoomsCust1.timeNum = 0;
if (_root.fitRoomsCust1.twoDress == true) {
_root.fitRoomsCust1.timeForOrder = 240;
} else if (_root.saleItem11 == true) {
_root.fitRoomsCust1.timeForOrder = 240;
} else {
_root.fitRoomsCust1.timeForOrder = 80;
}
_root.fitRoomsCust1.states = "tryingDress";
_root.fitRoomsCust1._visible = false;
_root.fitRoomFill1 = true;
_root.girlWalk = false;
_root.startActions = false;
}
function doneWithRoom1() {
_root.fitRoomsExpl1 = true;
_root.startActions = false;
if (_root.level == 1) {
_root.fitRoomsCust1.filters = [];
_root.fitRoomsCust1.arrows._visible = false;
var _local2 = new flash.filters.GlowFilter(16711680, 4, 6, 6, 2, 5, false, false);
_root.machines.cashCounter.filters = [_local2];
_root.machines.cashCounter.enabled = true;
_root.machines.cashCounter.arrows._visible = true;
}
_root.fitRoomsCust1.intervalForOrder = true;
_root.fitRoomsCust1.timeNum = 0;
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.girl.gotoAndStop("still");
}
function tryRoomProcess2() {
_root.fitRoomsCust2.clocks._visible = true;
_root.fitRoomsCust2.clocks.gotoAndStop(1);
_root.fit2.gotoAndPlay(1);
_root.fit2.popups._visible = false;
_root.customerWalks = "";
_root.destNi.splice(0, 1);
_root.packetwithGirl = false;
_root.girl.gotoAndStop("still");
_root.fitRoomsCust2.cliocks._visible = true;
_root.fitRoomsCust2 = _root.arraySelect[0];
_root.arraySelect[0].swapDepths(_root.arraySelect[0].getDepth());
_root.arraySelect.splice(0, 1);
_root.fitRoomsCust2.intervalForOrder = true;
_root.fitRoomsCust2.timeNum = 0;
if (_root.fitRoomsCust2.twoDress == true) {
_root.fitRoomsCust2.timeForOrder = 240;
} else if (_root.saleItem11 == true) {
_root.fitRoomsCust2.timeForOrder = 240;
} else {
_root.fitRoomsCust2.timeForOrder = 80;
}
_root.fitRoomsCust2.states = "tryingDress";
_root.fitRoomsCust2._visible = false;
_root.fitRoomFill2 = true;
_root.girlWalk = false;
_root.startActions = false;
}
function doneWithRoom2() {
_root.fitRoomsExpl2 = true;
_root.startActions = false;
_root.fitRoomsCust2.intervalForOrder = true;
_root.fitRoomsCust2.timeNum = 0;
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
_root.girl.gotoAndStop("still");
}
function CashProcess() {
if (_root.customerWalks != "") {
if (_root.customerWalks.oneTaken == true) {
_root.score1 = _root.score1 + ((_root.avgScore + _root.customerWalks.dressScore) + 50);
} else if (_root.customerWalks.bobsSame == true) {
_root.score1 = _root.score1 + ((_root.avgScore + _root.customerWalks.dressScore) + 50);
} else {
_root.score1 = _root.score1 + ((_root.avgScore + _root.customerWalks.dressScore) - 10);
}
var _local2 = 0;
while (_local2 < _root.customerArray.length) {
if (_root.customerWalks == _root.customerArray[_local2]) {
_root.customerArray[_local2].states = "givingMoney";
_root.customerArray[_local2].intervalForOrder = true;
_root.customerArray[_local2].timeNum = 0;
_root.customerArray[_local2].timeForOrder = 10;
_root.customerArray[_local2].gotDress = true;
_root.machines.moneys._visible = true;
_root.customerArray[_local2]._x = _root.girl._x - 100;
_root.customerArray[_local2]._y = _root.girl._y - 50;
_root.customerArray[_local2].enabled = false;
_root.customerWalks = "";
_root.customerArray[_local2].gotoAndStop("stillCash");
}
_local2++;
}
if (_root.level == 1) {
if (_root.clocks.clo._currentframe < 28) {
_root.customerStart = true;
_root.custEnterTime1 = 10;
}
_root.machines.cashCounter.enabled = false;
_root.machines.cashCounter.filters = [];
_root.machines.cashCounter.arrows._visible = false;
}
_root.packetwithGirl = false;
if (_root.saleItem7 == true) {
_root.girl.gotoAndStop("delivering1");
} else {
_root.girl.gotoAndStop("delivering");
}
} else {
_root.girl.gotoAndStop(1);
_root.startActions = false;
}
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.girlWalk = false;
}
stop();
var custArray = new Array();
var seatArray = new Array();
var customerArray = new Array();
var customerGoOutArray = new Array();
var arraySelect = new Array();
var pathNode = new Array();
var destNi = new Array();
var dressArray = new Array();
var pathNodeArr = new Array();
var seatArray = new Array();
var custEnterT1;
var custEnterTime1;
var custEnterTimes;
var orderTimes;
var customerStart;
var custwalktoseat;
var sewingStart;
var girlWalk;
var walkItem1;
var walkItem2;
var walkItem3;
var walkItem4;
var girlSpeed;
var sewTimers;
var sewTimerEnd;
var goOutDepths;
var dressSelects;
var clothName;
var bobName;
var bobSelects;
var D1Array = new Array("D1", "D6:D20:D9:D2", "D6:D20:D9:D10:D3", "D6:D20:D9:D11:D4", "D6:D20:D9:D12:D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "D16", "D17", "D18", "D19");
var D2Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "D16", "D17", "D18", "D19");
var D3Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "D16", "D17", "D18", "D19");
var D4Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "D16", "D17", "D18", "D19");
var D5Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "D16", "D17", "D18", "D19");
var D6Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "D16", "D17", "D18", "D19");
var D7Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D17:D9", "D17:D10", "D17:D11", "D17:D12", "D13", "D14", "D12:D15", "D12:D16", "D17", "D18", "D19");
var D8Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D14:D9", "D13:D10", "D11", "D18:D12", "D13", "D14", "D7:D17:D15", "D7:D17:D16", "D17", "D18", "D19");
var D9Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D14:D8", "D9", "D10", "D11", "D12", "D14:D13", "D14", "D15", "D16", "D17", "D18", "D19");
var D10Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D14:D8", "D9", "D10", "D11", "D12", "D13", "D9:D14", "D15", "D16", "D17", "D18", "D19");
var D11Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D13:D8", "D9", "D10", "D11", "D12", "D8:D13", "D8:D14", "D15", "D16", "D17", "D18", "D19");
var D12Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D18:D13", "D18:D14", "D15", "D16", "D17", "D18", "D19");
var D13Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D13:D10", "D8:D11", "D18:D12", "D13", "D14", "D7:D17:D15", "D7:D17:D16", "D17", "D18", "D19");
var D14Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D7:D17:D15", "D7:D17:D16", "D17", "D18", "D19");
var D15Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D17:D7", "D17:D7:D8", "D9", "D10", "D11", "D12", "D17:D7:D13", "D17:D7:D14", "D15", "D16", "D17", "D17:D7:D18", "D17:D7:D19");
var D16Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D17:D7", "D17:D7:D8", "D9", "D10", "D11", "D12", "D17:D7:D13", "D17:D7:D14", "D15", "D16", "D17", "D17:D7:D18", "D17:D7:D19");
var D17Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "D16", "D17", "D18", "D19");
var D18Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D7:D17:D15", "D7:D17:D16", "D17", "D18", "D19");
var D19Array = new Array("D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D9:D10", "D9:D11", "D9:D12", "D13", "D14", "D7:D17:D15", "D7:D17:D16", "D17", "D18", "D19");
var D1Num = 0;
var D2Num = 1;
var D3Num = 2;
var D4Num = 3;
var D5Num = 4;
var D6Num = 5;
var D7Num = 6;
var D8Num = 7;
var D9Num = 8;
var D10Num = 9;
var D11Num = 10;
var D12Num = 11;
var D13Num = 12;
var D14Num = 13;
var D15Num = 14;
var D16Num = 15;
var D17Num = 16;
var D18Num = 17;
var D19Num = 18;
var machineReachCount;
var currentNodeGirl;
var destinationNodeGirl;
var deliverPacket;
var tryRooms;
var girlReachedmachine;
var falseDress = false;
var allDress = false;
var yesdress2 = false;
var sewingmachine;
var fitRoom1;
var fitRoom2;
var dressClicked;
var sound2 = new Sound();
var sound3 = new Sound();
var sound4 = new Sound();
var sound5 = new Sound();
var sound6 = new Sound();
var sound7 = new Sound();
initLevel();
_root.onEnterFrame = function () {
if (_root.Paused == false) {
if (_root.customerStart) {
_root.custEnterT1++;
if (_root.custEnterT1 == (_root.custEnterTime1 - 5)) {
if ((((_root.seat1 == true) && (_root.seat2 == true)) && (_root.seat3 == true)) && (_root.seat4 == true)) {
_root.custEnterT1 = 0;
_root.custEnterTime1 = _root.custEnterTimes;
} else {
if (_root.soundready == false) {
_root.sound2.start();
}
_root.bg.doors.gotoAndPlay(1);
}
}
if (_root.custEnterT1 == _root.custEnterTime1) {
_root.custEnter();
_root.custEnterT1 = 0;
_root.custEnterTime1 = _root.custEnterTimes;
_root.customerStart = false;
}
}
if (_root.custwalktoseat == true) {
custWalkSeat();
}
for (var _local7 in _root.customerArray) {
if (_root.customerArray[_local7].states == "GoOut") {
if (_root.customerArray[_local7].gotDress == true) {
_root.customerArray[_local7].clocks._visible = false;
_root.customerArray[_local7].gotoAndStop("go outs");
_root.customerArray[_local7].popup._visible = false;
_root.customerGoOutArray.push(_root.customerArray[_local7]);
_root.customerArray.splice(_local7, 1);
} else {
if (_root.level == 1) {
if (_root.clocks.clo._currentframe < 28) {
_root.customerStart = true;
_root.custEnterTime1 = 10;
}
_root.machines.sewmachine.arrows._visible = false;
_root.machines.cashCounter.arrows._visible = false;
_root.machines.sewmachine.mach.filters = [];
_root.machines.cashCounter.filters = [];
var _local3 = 1;
while (_local3 < 5) {
_root.dresses["dress" + _local3].arrows._visible = false;
_root.machines.bobbinTypes["bob" + _local3].arrows._visible = false;
_root.dresses["dress" + _local3].filters = [];
_root.machines.bobbinTypes["bob" + _local3].filters = [];
_local3++;
}
_root.customerArray[_local7].charsit.arrows._visible = false;
_root.customerArray[_local7].filters = [];
}
_root.customerArray[_local7].clocks._visible = false;
if (((_root.customerArray[_local7].states == "waiting") || (_root.customerArray[_local7].states == "order")) || (_root.customerArray[_local7].states == "clicks")) {
_root["seat" + [_root.customerArray[_local7].seat]] = false;
}
if (_root.girl._y <= _root.customerArray[_local7]._y) {
_root.customerArray[_local7].swapDepths(_root.outDepths);
_root.outDepths++;
} else {
_root.customerArray[_local7].swapDepths(_root.outDepths1);
_root.outDepths1++;
}
_root.customerArray[_local7].gotoAndStop(_root.custArray[1]);
_root.customerArray[_local7].popup._visible = false;
_root.customerGoOutArray.push(_root.customerArray[_local7]);
_root.customerArray.splice(_local7, 1);
}
}
}
for (var _local5 in _root.customerArray) {
if (_root.customerArray[_local5].offerCoffee) {
if (_root.coffeeready == true) {
_root.customerArray[_local5].enabled = true;
}
}
if (_root.customerArray[_local5].pressstate == true) {
_root.customerArray[_local5].onPress = function () {
if (_root.soundready == false) {
_root.sound4.start();
}
if (this.states == "order") {
this.popup._visible = false;
var _local3 = Number(String(this.currentNode).substring(1, 3));
_root.destNi.push("D" + (_local3 + 7));
_root.arraySelect.push(this);
this.pressstate = false;
this.intervalForOrder = false;
this.timeNum = 0;
this.states = "clicks";
}
if (this.states == "waiting") {
this.notClicked = true;
this.popup._visible = false;
if (this.offerCoffee) {
if (_root.coffeeready == true) {
this.charsit.gotoAndPlay("coffedrink");
this.timeTakens = true;
this.popup._visible = false;
_root.machines.coffemach.gotoAndStop(1);
this.timeforCoffee = this.timeNum;
_root.coffeeready = false;
this.enabled = false;
this.processing = true;
this.offerCoffee = false;
}
} else if (this.offerBooks) {
if (_root.bookPress == true) {
this.processing = true;
this.charsit.gotoAndPlay("readingbooks");
this.timeTakens = true;
this.popup._visible = false;
this.timeforCoffee = this.timeNum;
_root.bookPress = false;
this.enabled = false;
this.offerBooks = false;
}
} else {
var _local3 = Number(String(this.currentNode).substring(1, 3));
_root.destNi.push("D" + (_local3 + 7));
this.states = "waitingLongs";
_root.arraySelect.push(this);
}
}
};
}
}
if (_root.girlReachedmachine) {
if (_root.machines.sewmachine._currentframe == 50) {
var _local6 = 1;
while (_local6 < 5) {
_root.dresses["dress" + _local6].enabled = false;
_local6++;
}
} else {
for (var _local5 in _root.customerArray) {
if (_root.customerArray[_local5].states == "waiting") {
if (_root.level != 1) {
var _local6 = 1;
while (_local6 < 5) {
_root.dresses["dress" + _local6].enabled = true;
_local6++;
}
}
}
}
}
_root.machines.sewmachine.mach.enabled = false;
if (_root.dressClicked == true) {
if (_root.level != 1) {
var _local6 = 1;
while (_local6 < 5) {
_root.machines.bobbinTypes["bob" + _local6].enabled = true;
_local6++;
}
}
}
} else {
if (_root.level != 1) {
_root.machines.sewmachine.mach.enabled = true;
}
var _local6 = 1;
while (_local6 < 5) {
_root.dresses["dress" + _local6].enabled = false;
_root.machines.bobbinTypes["bob" + _local6].enabled = false;
_local6++;
}
}
customerWaiting();
if (_root.customerGoOutArray.length != 0) {
custGoOut();
}
if (_root.measureTaken == true) {
_root.customParents.gotoAndStop(_root.custArray[2]);
_root.customParents.charsit.gotoAndStop(_root.custArray[6]);
_root.customParents.charsit.arrows._visible = false;
_root.customParents.intervalForOrder = true;
_root.customParents.popup._visible = false;
if (_root.customParents.twoDress == true) {
_root.customParents.timeForOrder = _root.waitingTimes + 120;
} else {
_root.customParents.timeForOrder = _root.waitingTimes;
}
if (_root.level == 1) {
_root.customParents.enabled = false;
_root.customParents.pressstate = false;
_root.machines.sewmachine.mach.enabled = true;
var _local8 = new flash.filters.GlowFilter(16711680, 4, 6, 6, 2, 5, false, false);
_root.machines.sewmachine.mach.filters = [_local8];
_root.machines.sewmachine.arrows._visible = true;
}
_root.customParents.clocks._visible = true;
_root.customParents.clocks.gotoAndStop(1);
_root.customParents.timeNum = 0;
_root.customParents.states = "waiting";
_root.girl._x = _root.GirlX;
_root.destNi.splice(0, 1);
_root.arraySelect.splice(0, 1);
_root.startActions = false;
_root.measureTaken = false;
}
if (_root.sewingStart == true) {
_root.sewTimers++;
_root.machines.sewmachine.mach.enabled = false;
if (_root.sewTimers == _root.sewTimerEnd) {
_root.deliverpacks = true;
_root.machines.sewmachine.gotoAndPlay("deliver");
_root.machines.sewmachine.sewClothes.gotoAndPlay("sewingcolor" + _root.clothName);
_root.sewingStart = false;
_root.sewTimers = 0;
for (var _local6 in _root.customerArray) {
if ((_root.customerArray[_local6].states == "waiting") && ((_root.fitRoom1 == false) || (_root.fitRoom2 == false))) {
_root.customerArray[_local6].enabled = true;
}
}
if (_root.level == 1) {
this.filters = [];
this.arrows._visible = false;
var _local8 = new flash.filters.GlowFilter(16711680, 4, 6, 6, 2, 5, false, false);
_root.customerArray[0].filters = [_local8];
_root.customerArray[0].charsit.arrows._visible = true;
}
_root.sewingmachine = false;
_root.machines.sewmachine.girldupe._visible = false;
_root.machines.sewmachine.hand._visible = false;
_root.girl.gotoAndStop("still");
_root.girl._visible = true;
_root.girl._x = _root.D14._x;
_root.girl._y = _root.D14._y;
_root.deliverPacket = true;
}
}
if (_root.girlWalk) {
girlWalkTime();
} else if ((_root.arraySelect.length > 0) && (_root.startActions == false)) {
arrayFlow();
}
_root.fitRoomsCust1.onPress = function () {
if (_root.soundready == false) {
_root.sound4.start();
}
_root.destNi.push("D15");
this.intervalForOrder = false;
this.timeNum = 0;
_root.arraySelect.push(this);
};
_root.fitRoomsCust2.onPress = function () {
if (_root.soundready == false) {
_root.sound4.start();
}
_root.destNi.push("D16");
this.intervalForOrder = false;
this.timeNum = 0;
_root.arraySelect.push(this);
};
setTimer();
for (var _local6 in _root.customerArray) {
if ((_root.customerArray[_local6].states == "waiting") && ((_root.fitRoom1 == false) || (_root.fitRoom2 == false))) {
if (_root.level != 1) {
_root.customerArray[_local6].enabled = true;
}
}
if (_root.customerArray[_local6].states == "waiting") {
if (_root.customerArray[_local6].offerCoffee == true) {
if (_root.coffeeready == true) {
_root.customerArray[_local6].enabled = true;
} else {
_root.customerArray[_local6].enabled = false;
}
} else if (_root.customerArray[_local6].offerBooks == true) {
if (_root.bookPress == true) {
_root.customerArray[_local6].enabled = true;
} else {
_root.customerArray[_local6].enabled = false;
}
}
if (_root.customerArray[_local6].processing == true) {
_root.customerArray[_local6].enabled = false;
}
}
if (_root.customerArray[_local6].offerBooks == true) {
_root.machines.books.enabled = true;
}
}
}
};
_root.bg.box.onPress = function () {
if (_root.Paused == false) {
if (_root.deliverpacks == true) {
if (_root.machines.sewmachine.girldupe._visible == true) {
_root.setTask = true;
}
for (var _local2 in _root.customerArray) {
if (_root.customerArray[_local2].states == "waiting") {
if ((_root.customerArray[_local2].offerBooks == true) || (_root.customerArray[_local2].offerCoffee == true)) {
} else {
_root.customerArray[_local2].popup._visible = false;
}
}
}
_root.clothName = "";
_root.bobName = "";
_root.deliverPacket = false;
_root.machines.sewmachine.gotoAndStop(1);
if (_root.setTask == true) {
_root.machines.sewmachine.girldupe._visible = true;
_root.machines.sewmachine.hand._visible = true;
_root.setTask = false;
} else {
_root.machines.sewmachine.girldupe._visible = false;
_root.machines.sewmachine.hand._visible = false;
}
_root.deliverpacks = false;
}
}
};
_root.machines.sewmachine.mach.onPress = function () {
if (_root.Paused == false) {
if (_root.soundready == false) {
_root.sound4.start();
}
for (var _local3 in _root.customerArray) {
if ((_root.customerArray[_local3].states == "waiting") || (_root.customerArray[_local3].states == "waitingLongs")) {
if ((_root.customerArray[_local3].offerBooks == true) || (_root.customerArray[_local3].offerCoffee == true)) {
} else {
_root.customerArray[_local3].popup._visible = false;
}
}
}
_root.destNi.push("D8");
_root.arraySelect.push(this);
}
};
_root.machines.cashCounter.onPress = function () {
if (_root.Paused == false) {
if (_root.soundready == false) {
_root.sound4.start();
}
for (var _local3 in _root.customerArray) {
if ((_root.customerArray[_local3].states == "waiting") || (_root.customerArray[_local3].states == "waitingLongs")) {
if ((_root.customerArray[_local3].offerBooks == true) || (_root.customerArray[_local3].offerCoffee == true)) {
} else {
_root.customerArray[_local3].popup._visible = false;
}
}
}
_root.destNi.push("D19");
_root.arraySelect.push(this);
}
};
_root.machines.coffemach.onPress = function () {
if (_root.Paused == false) {
if (_root.soundready == false) {
_root.sound4.start();
}
_root.machines.coffemach.gotoAndPlay(1);
}
};
_root.machines.books.onPress = function () {
if (_root.Paused == false) {
if (_root.soundready == false) {
_root.sound4.start();
}
_root.bookPress = true;
}
};
var i = 1;
while (i < 5) {
_root.dresses["dress" + i].onPress = function () {
if (_root.Paused == false) {
if (_root.soundready == false) {
_root.sound4.start();
}
this.arrows._visible = false;
var _local4 = Number(String(this).substring(21, 23));
if (_root.level == 1) {
this.filters = [];
var _local5 = new flash.filters.GlowFilter(16711680, 4, 6, 6, 2, 5, false, false);
_root.machines.bobbinTypes["bob" + (_root.customerArray[0].dressIcons - 6)].filters = [_local5];
_root.machines.bobbinTypes["bob" + (_root.customerArray[0].dressIcons - 6)].enabled = true;
_root.machines.bobbinTypes["bob" + (_root.customerArray[0].dressIcons - 6)].arrows._visible = true;
}
_root.dressSelects = this;
_root.dressClicked = true;
_root.machines.sewmachine.gotoAndStop("idal");
_root.machines.sewmachine.bobbins._visible = false;
_root.machines.sewmachine.sewClothes.gotoAndStop(_local4);
_root.clothName = _local4;
var _local3 = 1;
while (_local3 < 5) {
_root.machines.bobbinTypes["bob" + _local3].enabled = true;
_local3++;
}
}
};
i++;
}
var g = 1;
while (g < 5) {
_root.machines.bobbinTypes["bob" + g].onPress = function () {
if (_root.Paused == false) {
if (_root.soundready == false) {
_root.sound4.start();
}
this.arrows._visible = false;
if (_root.level == 1) {
this.filters = [];
}
var _local3 = Number(String(this).substring(32, 34));
_root.machines.sewmachine.bobbins._visible = true;
_root.bobName = _local3;
_root.machines.sewmachine.bobbins.gotoAndStop(_root.bobName);
_root.bobSelects = this;
_root.machines.sewmachine.gotoAndStop("sweingani");
_root.machines.sewmachine.sewClothes.gotoAndStop("sewingcolor" + _root.clothName);
_root.machines.sewmachine.bobbins._visible = true;
_root.dressClicked = false;
_root.sewingmachine = true;
_root.sewingStart = true;
_root.girlReachedmachine = false;
}
};
g++;
}
if (!_root.soundready) {
_root.musicBtn.gotoAndStop(2);
_root.musicBtn1.gotoAndStop(2);
}
if (_root.soundready) {
_root.musicBtn.gotoAndStop(1);
_root.musicBtn1.gotoAndStop(1);
}
Instance of Symbol 447 MovieClip "musicBtn1" in Frame 52
on (release) {
if (_root.soundready == false) {
_root.soundready = true;
_root.sound1.stop();
this.gotoAndStop(1);
_root.musicBtn.gotoAndStop(1);
} else if (_root.soundready == true) {
_root.soundready = false;
this.gotoAndStop(2);
_root.musicBtn.gotoAndStop(2);
_root.sound1.start();
}
}
on (rollOver) {
if (_root.soundready == false) {
this.gotoAndStop(4);
_root.musicBtn.gotoAndStop(4);
}
if (_root.soundready == true) {
this.gotoAndStop(3);
_root.musicBtn.gotoAndStop(3);
}
}
on (rollOut) {
if (_root.soundready == false) {
this.gotoAndStop(2);
_root.musicBtn.gotoAndStop(2);
}
if (_root.soundready == true) {
this.gotoAndStop(1);
_root.musicBtn.gotoAndStop(1);
}
}
Frame 62
stop();
Frame 64
stop();
Frame 79
stop();
Frame 100
stop();
Symbol 24 MovieClip Frame 9
gotoAndPlay ("front");
Symbol 24 MovieClip Frame 19
gotoAndPlay ("frontwithbag");
Symbol 24 MovieClip Frame 29
gotoAndPlay ("backwithcola");
Symbol 25 MovieClip Frame 9
gotoAndPlay ("front");
Symbol 25 MovieClip Frame 19
gotoAndPlay ("frontwithbag1");
Symbol 25 MovieClip Frame 29
gotoAndPlay ("backwithcola");
Symbol 30 MovieClip Frame 9
gotoAndPlay ("back");
Symbol 30 MovieClip Frame 19
gotoAndPlay ("backwithbag");
Symbol 30 MovieClip Frame 29
gotoAndPlay ("backwithcola");
Symbol 36 MovieClip Frame 9
gotoAndPlay ("walkrights");
Symbol 36 MovieClip Frame 19
gotoAndPlay ("deliverrights");
Symbol 37 MovieClip Frame 9
gotoAndPlay ("walklefts");
Symbol 37 MovieClip Frame 19
gotoAndPlay ("deliverlefts");
Symbol 43 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 25
stop();
Symbol 45 MovieClip Frame 10
stop();
Symbol 46 MovieClip Frame 1
stop();
Symbol 47 MovieClip [girl] Frame 1
stop();
Symbol 47 MovieClip [girl] Frame 157
stop();
_root.measureTaken = true;
Symbol 47 MovieClip [girl] Frame 213
stop();
_root.measureTaken = true;
Symbol 55 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 8
stop();
Symbol 106 MovieClip Frame 18
stop();
Symbol 106 MovieClip Frame 28
stop();
Symbol 106 MovieClip Frame 39
stop();
Symbol 106 MovieClip Frame 49
stop();
Symbol 108 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 6
stop();
Symbol 129 MovieClip Frame 16
stop();
Symbol 129 MovieClip Frame 26
stop();
Symbol 129 MovieClip Frame 37
stop();
Symbol 129 MovieClip Frame 47
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 6
stop();
Symbol 156 MovieClip Frame 16
stop();
Symbol 156 MovieClip Frame 26
stop();
Symbol 156 MovieClip Frame 37
stop();
Symbol 156 MovieClip Frame 47
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 6
stop();
Symbol 179 MovieClip Frame 16
stop();
Symbol 179 MovieClip Frame 26
stop();
Symbol 179 MovieClip Frame 37
stop();
Symbol 179 MovieClip Frame 46
stop();
Symbol 181 MovieClip Frame 1
stop();
Symbol 189 Button
on (release) {
_root.Paused = false;
_root.helps.removeMovieClip();
}
Symbol 200 Button
on (release) {
_root.Paused = false;
_root.boxeTargets.removeMovieClip();
}
Symbol 221 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 6
gotoAndPlay ("sewingcolor1");
Symbol 281 MovieClip Frame 13
gotoAndPlay ("sewingcolor2");
Symbol 281 MovieClip Frame 20
gotoAndPlay ("sewingcolor3");
Symbol 281 MovieClip Frame 27
gotoAndPlay ("sewingcolor4");
Symbol 285 MovieClip Frame 1
stop();
Symbol 285 MovieClip Frame 50
stop();
Symbol 293 MovieClip Frame 1
stop();
Symbol 293 MovieClip Frame 17
stop();
_root.coffeeready = true;
Symbol 318 MovieClip [dresses] Frame 1
stop();
Symbol 325 MovieClip Frame 1
_root.stop();
Symbol 325 MovieClip Frame 2
fLoaded = Math.round(_root.getBytesLoaded());
fTotal = Math.round(_root.getBytesTotal());
fPercent = fLoaded / fTotal;
loaderTxt.text = ("Loading... " + Math.round(fPercent * 100)) + "%";
logoMask._y = 60 - (fPercent * 70);
if (fLoaded >= fTotal) {
loaderTxt._y = -3000;
loaderTxt._x = -3000;
_parent.play();
} else {
gotoAndPlay (1);
}
Symbol 341 MovieClip Frame 1
stop();
fSitebutton.onRelease = function () {
getURL ("http://www.games2girls.com/", "_blank");
};
Symbol 341 MovieClip Frame 123
stop();
_root.play();
Symbol 352 MovieClip Frame 1
games2girls_button.onRelease = function () {
getURL ("http://www.games2girls.com/");
};
Symbol 372 Button
on (release) {
_root.level = 1;
_root.days = 1;
_root.score = 0;
_root.tars1 = 0;
_root.gotoAndStop("game");
}
Symbol 375 Button
on (release) {
_root.gotoAndStop("help");
}
Symbol 380 Button
on (release) {
_root.sound1.stop();
_root.gotoAndPlay("menu");
}
Symbol 392 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 6
stop();
gotoAndStop (1);
Symbol 428 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 6
gotoAndStop (1);
Symbol 431 MovieClip Frame 1
stop();
Symbol 434 MovieClip Frame 1
stop();
Symbol 437 MovieClip Frame 1
stop();
Symbol 440 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 1
stop();
Symbol 450 Button
on (release) {
_root.sound1.stop();
_root.Paused = true;
_root.clearCanvas();
delete _root.onEnterFrame;
_root.gotoAndPlay("menu");
}
Symbol 451 Button
on (release) {
_root.Paused = true;
_root.boxeTargets.removeMovieClip();
_root.attachMovie("help", "helps", 1000000, {_x:390, _y:300});
}
Symbol 458 MovieClip Frame 7
stop();
Symbol 460 Button
on (release) {
_root.gotoAndStop("upgrades");
}
Symbol 462 Button
on (release) {
_root.level++;
_root.gotoAndStop("game");
}
Symbol 474 MovieClip Frame 1
stop();
Symbol 476 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 1
stop();
Symbol 481 MovieClip Frame 1
stop();
Symbol 484 MovieClip Frame 1
stop();
Symbol 486 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 1
stop();
Symbol 494 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 1
stop();
Symbol 499 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 1
stop();
Symbol 505 Button
on (release) {
_root.level++;
_root.gotoAndStop("game");
}
Symbol 507 MovieClip Frame 5
function initlevels() {
_root.object1 = 120;
_root.object2 = 200;
_root.object3 = 400;
_root.object4 = 500;
_root.object5 = 600;
_root.object6 = 800;
_root.object7 = 1000;
_root.object8 = 1200;
_root.object9 = 1500;
_root.object10 = 2000;
_root.object11 = 2500;
_root.object12 = 3000;
var _local2 = 1;
while (_local2 < 13) {
_root.upgradeShop["box" + _local2].enabled = false;
_root.upgradeShop["box" + _local2]._alpha = 50;
_root.upgradeShop["box" + _local2].scalesX = _root.upgradeShop["box" + _local2]._xscale;
_root.upgradeShop["box" + _local2].scalesY = _root.upgradeShop["box" + _local2]._yscale;
_local2++;
}
}
function pressFunctions() {
var _local3 = 1;
while (_local3 < 13) {
if (_root.score >= _root["object" + _local3]) {
if (_root["saleItem" + _local3] == false) {
_root.upgradeShop["box" + _local3].enabled = true;
_root.upgradeShop["box" + _local3]._alpha = 100;
_root.upgradeShop["box" + _local3].onPress = function () {
var _local3 = Number(String(this).substring(23, 26));
_root["saleItem" + _local3] = true;
_root.score = _root.score - _root["object" + _local3];
this.gotoAndStop(2);
this._xscale = this.scalesX;
this._yscale = this.scalesY;
};
_root.upgradeShop["box" + _local3].onRollOver = function () {
this._xscale = this.scalesX + 10;
this._yscale = this.scalesY + 10;
};
_root.upgradeShop["box" + _local3].onRollOut = function () {
this._xscale = this.scalesX;
this._yscale = this.scalesX;
};
} else {
_root.upgradeShop["box" + _local3].enabled = false;
_root.upgradeShop["box" + _local3]._alpha = 50;
}
} else {
_root.upgradeShop["box" + _local3].enabled = false;
_root.upgradeShop["box" + _local3]._alpha = 50;
}
_local3++;
}
}
function saleItemVisible() {
var _local2 = 1;
while (_local2 < 13) {
if (_root["saleItem" + _local2]) {
_root.upgradeShop["box" + _local2].gotoAndStop(2);
_root.upgradeShop["box" + _local2]._alpha = 70;
}
_local2++;
}
}
stop();
initlevels();
_root.onEnterFrame = function () {
pressFunctions();
saleItemVisible();
};
Symbol 510 Button
on (release) {
_root.sound1.stop();
_root.gotoAndPlay("menu");
}
Symbol 513 Button
on (release) {
_root.sound1.stop();
_root.gotoAndPlay("menu");
}