Frame 1
total = Math.round(this.getBytesTotal() / 1000);
current = Math.round(this.getBytesLoaded() / 1000);
percent = Math.round((current / total) * 100);
Frame 2
if (current < total) {
_root.loadingBar.bar._xscale = percent;
this.gotoAndPlay(1);
} else {
this.gotoAndPlay(4);
}
Frame 4
function bitOR(a, b) {
var _local1 = (a & 1) | (b & 1);
var _local2 = (a >>> 1) | (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitXOR(a, b) {
var _local1 = (a & 1) ^ (b & 1);
var _local2 = (a >>> 1) ^ (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitAND(a, b) {
var _local1 = (a & 1) & (b & 1);
var _local2 = (a >>> 1) & (b >>> 1);
return((_local2 << 1) | _local1);
}
function addme(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function rhex(num) {
var _local1 = num;
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt((_local1 >> ((j * 8) + 4)) & 15) + hex_chr.charAt((_local1 >> (j * 8)) & 15));
j++;
}
return(str);
}
function str2blks_MD5(str) {
var _local1 = str;
nblk = ((_local1.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < _local1.length) {
blks[i >> 2] = blks[i >> 2] | (_local1.charCodeAt(i) << ((((_local1.length * 8) + i) % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((((_local1.length * 8) + i) % 4) * 8));
var _local2 = _local1.length * 8;
blks[(nblk * 16) - 2] = _local2 & 255;
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 8) & 255) << 8);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 16) & 255) << 16);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 24) & 255) << 24);
return(blks);
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
var _local1 = b;
return(cmn(bitOR(bitAND(_local1, c), bitAND(~_local1, d)), a, _local1, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, d), bitAND(c, ~d)), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn(bitXOR(bitXOR(b, c), d), a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(bitXOR(c, bitOR(b, ~d)), a, b, x, s, t));
}
function calcMD5(str) {
x = str2blks_MD5(str);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
var _local1;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
_local1 = 0;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
}
MetaTable = function (tbName, tbNo) {
this.tbN = tbName;
this.tbNumber = tbNo;
};
MetaTable.prototype.maxVisitorType = 2;
MetaTable.prototype.maxVisitorCnt = 1;
MetaTable.prototype.nowVisitorCnt = 0;
MetaTable.prototype.angry = 0;
MetaTable.prototype.serving = 0;
MetaTable.prototype.order_1 = 0;
MetaTable.prototype.order_2 = 0;
MetaTable.prototype.eatLoopNo = 0;
MetaTable.prototype.cleaningNo = 0;
MetaTable.prototype.Brew = function (visibleType, brewNo, brandNo, statusNo) {
var _local1 = brewNo;
var _local2 = this;
_local2.tbN["brew_" + _local1]._visible = visibleType;
_local2.tbN["brew_" + _local1].gotoAndStop(brandNo);
_local2.tbN["brew_" + _local1].brewStatus.gotoAndStop(statusNo);
};
MetaTable.prototype.Visitor = function (visibleType, visitorNo, visitorXenderNo, visitorStatusNo, giftNo) {
var _local1 = visitorNo;
var _local2 = this;
_local2.tbN["visitor_" + _local1].xenderNo = visitorXenderNo;
_local2.tbN["visitor_" + _local1]._visible = visibleType;
_local2.tbN["visitor_" + _local1].gotoAndStop(visitorXenderNo);
_local2.tbN["visitor_" + _local1].u_half.gotoAndStop(visitorStatusNo);
if (visitorStatusNo >= 4) {
_local2.tbN["visitor_" + _local1].u_half.actType.gotoAndStop(giftNo);
}
};
MetaTable.prototype.Popcorn = function (visibleType, statusNo) {
this.tbN.popcorn._visible = visibleType;
this.tbN.popcorn.gotoAndStop(statusNo);
};
MetaTable.prototype.OrderBlock = function (visibleType, blockNo, brandNo) {
var _local1 = blockNo;
var _local2 = this;
_local2.tbN["orderBlock_" + _local1]._visible = visibleType;
_local2.tbN["orderBlock_" + _local1].brew.gotoAndStop(brandNo);
_local2.tbN["orderBlock_" + _local1].brew.brewBrand._visible = false;
_local2.tbN["orderBlock_" + _local1].brew.brewBrand.gotoAndStop(brandNo);
_local2.tbN["orderBlock_" + _local1].brew.brewStatus.gotoAndStop(4);
};
MetaTable.prototype.Waste = function (visibleType, statusNo) {
this.tbN.waste._visible = visibleType;
this.tbN.waste.gotoAndStop(statusNo);
};
MetaTable.prototype.Gauge = function (visibleType) {
var _local1 = this;
_local1.tbN.gauge._visible = visibleType;
if (visibleType) {
var _local2 = random(3) + 1;
GaugeMove(_local1, _local1.tbN.gauge.bar, _local2, _local1.tbN.gauge.bar._x, (_local1.tbN.gauge.bar._y - _local1.tbN.gauge.GaugeGround._height) + 2, true);
} else {
delete _local1.tbN.gauge.bar.onEnterFrame;
_local1.tbN.gauge.bar._y = 0;
}
};
MetaTable.prototype.Reset = function () {
var _local1 = this;
_local1.Visitor(false, 1, 1, 1);
_local1.Brew(false, 1, 1, 1);
_local1.OrderBlock(false, 1, 1);
_local1.OrderBlock(false, 2, 1);
_local1.Waste(false, 1);
_local1.Gauge(false);
};
MetaSelfa = function (sfName) {
this.sfN = sfName;
};
MetaSelfa.prototype.maxSelfaBrand = 8;
MetaSelfa.prototype.Brand = function (brandNo) {
var _local1 = this;
var _local2 = brandNo;
_local1.sfN.gotoAndStop(_local2);
_local1.sfN.logo.gotoAndStop(_local2);
_local1.sfN.brew.gotoAndStop(_local2);
_local1.sfN.brew.brewBrand._visible = false;
_local1.sfN.brew.brewBrand.gotoAndStop(_local2);
};
MetaSelfa.prototype.Brew = function (StatusNo) {
this.sfN.brew.brewStatus.gotoAndStop(StatusNo);
this.brewStatusNo = StatusNo;
};
MetaSelfa.prototype.Reset = function (brandNo) {
this.Brew(5);
};
MetaUnitTray = function (unitName) {
this.trName = unitName;
};
MetaUnitTray.prototype.maxTray = 4;
MetaUnitTray.prototype.nowTray = 0;
MetaUnitTray.prototype.carryArray = new Array(0, 0, 0, 0);
MetaUnitTray.prototype.posArray = new Array(1, 2, 3, 4);
MetaUnitTray.prototype.Hiding = function () {
var _local1 = this;
i = 1;
while (i <= _local1.maxTray) {
trace(i);
_local1.trName["tray_" + i]._visible = false;
i++;
}
};
MetaGame = function (obj) {
var _local1 = this;
var _local2 = _root;
var _local3 = obj;
i = 0;
while (i <= 4) {
j = 0;
while (j <= 6) {
if (typeof(_local1[(("mp_" + i) + "_") + j]) == "movieclip") {
_local1[(("mp_" + i) + "_") + j]._visible = false;
}
j++;
}
i++;
}
_local2.unit1.msgBox._visible = false;
_local3.posNoX = 4;
_local3.posNoY = 2;
_local3.tray = new MetaUnitTray(_local3);
_local3.tray.Hiding();
i = 1;
while (i <= 4) {
_local1["table" + i] = new MetaTable(_local2["table_" + i], i);
_local1["table" + i].Reset();
i++;
}
i = 1;
while (i <= 8) {
_local1["selfa" + i] = new MetaSelfa(_local2["selfa_" + i]);
_local1["selfa" + i].Brand(i);
_local1["selfa" + i].Reset(i);
i++;
}
};
GameStart = function (obj) {
var _local1 = _root;
var _local2 = obj;
_local1.profit = 0;
_local1.selling = 0;
_local1.smile = 0;
_local1.visit = 0;
_local1.hope = 0;
_local1.hope1 = 0;
_local1.hope2 = 0;
_local1.hope3 = 0;
_local1.hope4 = 0;
_local1.brewPrice = 1000;
_local1.gameTime = 0;
_local1.gameHour = 0;
_local1.workDay = 15;
_local1.half24 = 0;
_local1.workTime = 240;
_local1.gameAI.play();
_local2._x = _local1[(("mp_" + _local2.posNoX) + "_") + _local2.posNoY]._x;
_local2._y = _local1[(("mp_" + _local2.posNoX) + "_") + _local2.posNoY]._y;
CreateKeyListener(_local2);
};
SmileCalculator = function (obj, addPoint, remainderPoint) {
var _local1 = obj;
var _local2 = addPoint;
var _local3 = _root;
_local1.tbN.smileAni.gotoAndPlay(2);
_local1.tbN.smileAni._visible = true;
_local1.tbN.smileAni.addNum.gotoAndStop(Math.abs(_local2));
if (remainderPoint >= 0) {
_local1.tbN.smileAni.addMark.gotoAndStop(1);
} else {
_local1.tbN.smileAni.addMark.gotoAndStop(2);
}
_local3.smile = _local3.smile + _local2;
_local3.good.text = _local3.smile;
trace("+++++++++++++++");
trace((_local2 + "\uD604\uC7AC \uBD88\uB9CC\uB3C4 : ") + _local1.angry);
trace("+++++++++++++++");
if (remainderPoint == 0) {
trace("\uBD84\uB178 \uCD08\uAE30\uD654");
_local1.angry = 0;
}
};
VisitVisitor = function () {
var i = 1;
while (i <= 4) {
var _local1 = this["table" + i];
_local1.orderArray = new Array();
var randVisit = random(10);
if ((randVisit == 0) and (_local1.serving == 0)) {
var randVisitorCnt = (random(2) + 1);
_local1.nowVisitorCnt = randVisitorCnt;
_local1.serving = 2;
var _local2 = 1;
while (_local2 <= _local1.nowVisitorCnt) {
trace(i + "\uBC88 \uD14C\uC774\uBE14 \uC190\uB2D8 \uCC29\uC11D \uC2DC\uB3C4");
var randXender = (random(_local1.maxVisitorType) + 1);
_local1.Visitor(true, _local2, randXender, 1);
var _local3 = random(8) + 1;
_local1["order_" + _local2] = _local3;
_local1.orderArray.push(_local3);
_local1.OrderBlock(true, _local2, _local3);
_local2++;
}
_local1.Gauge(true);
_root.visit = _root.visit + _local1.nowVisitorCnt;
_root.visitor.text = _root.visit;
_root.sound_visit.start();
}
i++;
}
};
TimerAI = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.workDay < 24) {
_local1.VisitVisitor();
_local1.gameHour++;
if (_local1.gameHour >= 24) {
_local1.gameHour = 0;
_local1.workDay++;
}
_local1.watch.text = ((_local1.workDay + "\uC77C ") + _local1.gameHour) + ":00 ";
} else if (_local1.workDay >= 24) {
if ((((_local1.table1.serving == 0) and (_local1.table2.serving == 0)) and (_local1.table3.serving == 0)) and (_local1.table4.serving == 0)) {
_local2.gotoAndStop(1);
trace("\uAC8C\uC784\uC885\uB8CC");
stopAllSounds();
_local1.gotoAndStop("gameResult");
} else {
trace("\uD0C0\uC774\uBA38\uC815\uC9C0");
trace(_local2.table1.serving);
trace(_local2.table2.serving);
trace(_local2.table3.serving);
trace(_local2.table4.serving);
}
}
};
GaugeMove = function (obj, moveObj, s, aX, aY) {
var _local1 = this;
moveObj.maxSpeed = s / 10;
moveObj.onEnterFrame = function () {
var _local1 = this;
var _local3 = _local1._x - aX;
var _local2 = _local1._y - aY;
var directR = ((-Math.atan2(_local3, _local2)) / (Math.PI/180));
var distA = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var speed = _local1.maxSpeed;
if (distA > _local1.maxSpeed) {
_local1._y = _local1._y - (speed * Math.cos(directR * (Math.PI/180)));
_local1._x = _local1._x + (speed * Math.sin(directR * (Math.PI/180)));
} else {
_local1._x = aX;
_local1._y = aY;
_local1.speed = 0;
delete _local1.onEnterFrame;
trace("\uC190\uB2D8\uC0C1\uD0DC \uBCC0\uACBD\uC804 : " + obj.angry);
obj.angry++;
trace("\uC190\uB2D8\uC0C1\uD0DC \uBCC0\uACBD : " + obj.angry);
if (obj.angry < 3) {
i = 1;
while (i <= obj.nowVisitorCnt) {
obj.Visitor(true, i, obj.tbN["visitor_" + i].xenderNo, obj.angry + 1);
i++;
}
} else {
obj.angry = 3;
}
SmileCalculator(obj, -obj.angry, -1);
obj.Gauge(false);
obj.Gauge(true);
}
};
};
MoveObj = function (moveObj, s, aX, aY) {
var _local1 = this;
moveObj.maxSpeed = s;
moveObj.onEnterFrame = function () {
var _local1 = this;
var _local3 = _local1._x - aX;
var _local2 = _local1._y - aY;
var directR = ((-Math.atan2(_local3, _local2)) / (Math.PI/180));
var distA = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if ((distA / 2) > _local1.maxSpeed) {
var speed = (distA / 2);
} else {
var speed = _local1.maxSpeed;
}
if (distA > _local1.maxSpeed) {
_local1._y = _local1._y - (speed * Math.cos(directR * (Math.PI/180)));
_local1._x = _local1._x + (speed * Math.sin(directR * (Math.PI/180)));
} else {
_local1._x = aX;
_local1._y = aY;
_local1.speed = 0;
moveObj.movement = false;
delete _local1.onEnterFrame;
}
};
};
CharMove = function (obj, xM, yM) {
var _local1 = obj;
var _local3 = _local1.posNoX + xM;
var _local2 = _local1.posNoY + yM;
if (_root[(("mp_" + _local3) + "_") + _local2]) {
_root.MoveObj(_local1, 7, _root[(("mp_" + _local3) + "_") + _local2]._x, _root[(("mp_" + _local3) + "_") + _local2]._y);
_local1.movement = true;
_local1.posNoX = _local3;
_local1.posNoY = _local2;
_root.sound_walk.start();
if ((_local1.posNoX == 0) and (_local1.posNoY == 2)) {
_local1.arrow_L._visible = false;
_local1.arrow_R._visible = true;
} else if ((_local1.posNoX == 0) and (_local1.posNoY == 3)) {
_local1.arrow_L._visible = false;
_local1.arrow_R._visible = true;
} else if ((_local1.posNoX == 2) and (_local1.posNoY == 2)) {
_local1.arrow_L._visible = true;
_local1.arrow_R._visible = true;
} else if ((_local1.posNoX == 2) and (_local1.posNoY == 3)) {
_local1.arrow_L._visible = true;
_local1.arrow_R._visible = true;
} else if (_local1.posNoX == 4) {
if (_local1.posNoY == 2) {
_local1.arrow_L._visible = true;
_local1.arrow_R._visible = true;
} else if (_local1.posNoY == 3) {
_local1.arrow_L._visible = true;
_local1.arrow_R._visible = true;
} else if (_local1.posNoY == 5) {
_local1.arrow_L._visible = false;
_local1.arrow_R._visible = false;
} else {
_local1.arrow_L._visible = false;
_local1.arrow_R._visible = true;
}
} else {
_local1.arrow_L._visible = false;
_local1.arrow_R._visible = false;
}
} else {
CheckServing(_local1, xM);
}
};
CheckServing = function (obj, xM) {
var _local1 = obj;
var _local2 = xM;
trace("function : CheckServing");
if ((_local1.posNoX == 0) and (_local1.posNoY == 2)) {
if (_local2 > 0) {
CarryOn(_local1, 1);
}
} else if ((_local1.posNoX == 0) and (_local1.posNoY == 3)) {
if (_local2 > 0) {
CarryOn(_local1, 2);
}
} else if ((_local1.posNoX == 2) and (_local1.posNoY == 2)) {
if (_local2 < 0) {
CarryOn(_local1, 3);
} else if (_local2 > 0) {
CarryOn(_local1, 5);
}
} else if ((_local1.posNoX == 2) and (_local1.posNoY == 3)) {
if (_local2 < 0) {
CarryOn(_local1, 4);
} else if (_local2 > 0) {
CarryOn(_local1, 6);
}
} else if ((_local1.posNoX == 4) and (_local1.posNoY == 0)) {
if (_local2 > 0) {
RenewalTray(_local1, 1 + _local2);
}
} else if ((_local1.posNoX == 4) and (_local1.posNoY == 1)) {
if (_local2 > 0) {
PutDown(_local1, 1, _local2);
}
} else if ((_local1.posNoX == 4) and (_local1.posNoY == 2)) {
if (_local2 < 0) {
CarryOn(_local1, 7);
} else if (_local2 > 0) {
PutDown(_local1, 2, _local2);
}
} else if ((_local1.posNoX == 4) and (_local1.posNoY == 3)) {
if (_local2 < 0) {
CarryOn(_local1, 8);
} else if (_local2 > 0) {
PutDown(_local1, 3, _local2);
}
} else if ((_local1.posNoX == 4) and (_local1.posNoY == 4)) {
if (_local2 > 0) {
PutDown(_local1, 4, _local2);
}
}
};
RenewalTray = function (obj, arrayNo) {
var _local1 = obj;
var _local2 = arrayNo;
_local1.tray.carryArray[_local2] = 0;
_local1["trayItem" + _local1.tray.posArray[_local2]].removeMovieClip();
_root.sound_take.start();
trace(_local1.tray.posArray[_local2]);
};
MistakeMessage = function (obj) {
obj.msgBox._visible = true;
obj.msgBox.gotoAndPlay(2);
trace("\uC798\uBABB \uB4DC\uB838\uB124\uC694 \uC8C4\uC1A1\uD569\uB2C8\uB2E4.");
};
BrewSwitch = function (drinkClip, visibleType) {
var _local2 = drinkClip;
var pNo = (substring(_local2._parent._parent._parent._parent._name, 7, 1));
trace((_local2._parent._parent._parent._parent._name + " : \uB9E5\uC8FC \uAE5C\uBE61\uC784 : ") + pNo);
var _local1 = this["table" + pNo];
_local1.eatLoopNo++;
if (_local1.eatLoopNo == 5) {
var _local3 = 3;
} else if (_local1.eatLoopNo == 15) {
var _local3 = 2;
_local1.PopCorn(true, 2);
} else if (_local1.eatLoopNo == 20) {
var _local3 = 1;
_local1.Waste(true, 1);
} else if (_local1.eatLoopNo > 25) {
var _local3 = 0;
}
if (_local3 > 0) {
i = 1;
while (i <= _local1.nowVisitorCnt) {
if (visibleType) {
_local2._parent._parent._parent["brew_" + i]._visible = true;
} else {
_local2._parent._parent._parent["brew_" + i]._visible = false;
}
_local2._parent._parent._parent["brew_" + i].brewStatus.gotoAndStop(_local3);
i++;
}
} else if (_local3 == 0) {
SmileCalculator(_local1, 2, 0);
_root.selling = _root.selling + (_root.brewPrice * _local1.nowVisitorCnt);
_root.sellingBoard.text = _root.selling / 10;
trace("\uB9E4\uCD9C\uC561 : " + _root.selling);
_root.sound_out.start();
_local1.Visitor(false, 1, _local1.visitor_1.xenderNo, 1);
_local1.Visitor(false, 2, _local1.visitor_2.xenderNo, 1);
_local1.nowVisitorCnt = 0;
_local1.eatLoopNo = 0;
_local1.serving = 0;
}
};
UseSelfa = function (obj) {
var _local1 = obj;
var _local3 = this;
if (_local1.posNoX > 3) {
var _local2 = _local1.posNoY;
if ((_local1.posNoY < 5) and (_local1.posNoY > 0)) {
if (_local3["selfa" + _local2].brewStatusNo < 4) {
_local3["selfa" + _local2].Brew(_local3["selfa" + _local2].brewStatusNo + 1);
_root.sound_press.start();
} else {
CarryOn(_local1, _local2);
}
} else if (_local1.posNoY == 5) {
CarryOn(_local1, _local2);
}
}
};
CarryOn = function (obj, selfaNo) {
var _local1 = obj;
i = 0;
while (i < _local1.tray.maxTray) {
if (_local1.tray.carryArray[i] == 0) {
var _local3 = i + 1;
var _local2 = _local1.tray.posArray[i];
trace((_local1 + " : \uBE48 \uC2AC\uB86F : ") + _local2);
_local1.attachMovie("brewSet", "trayItem" + _local2, _local2);
_local1["trayItem" + _local2].gotoAndStop(selfaNo);
_root["hope" + selfaNo]++;
_root.hope++;
_root.giftBox.text = _root.hope;
_local1["trayItem" + _local2]._x = _local1["tray_" + _local3]._x;
_local1["trayItem" + _local2]._y = _local1["tray_" + _local3]._y;
_local1.tray.carryArray[i] = selfaNo;
_local1["trayItem" + _local2].posNo = _local3;
_root.sound_take.start();
return;
}
i++;
}
};
PutDown = function (obj, packNo, xM) {
var _local3 = obj.tray.carryArray[1 + xM];
var _local1 = this["table" + packNo];
if (_local1.serving == 2) {
var _local2 = 1;
while (_local2 <= _local1.nowVisitorCnt) {
if (_local1["order_" + _local2] == _local3) {
RenewalTray(obj, 1 + xM);
_local1["order_" + _local2] = 0;
_local1.OrderBlock(false, _local2, _local3);
var msgRight = true;
_root.sound_take.start();
break;
}
var msgRight = false;
_local2++;
}
if (!msgRight) {
_root.sound_fault.start();
MistakeMessage(obj);
}
trace((_local1.order_1 + " : \uC794\uC5EC \uC8FC\uBB38\uB7C9 : ") + _local1.order_2);
if ((_local1.order_1 == 0) and (_local1.order_2 == 0)) {
_local1.Gauge(false);
_local1.Gauge(true);
_local1.serving = 3;
_local1.boxNo = random(4) + 1;
_local1.packBox = 1;
_local1.Brew(true, 1, _local1.boxNo, 1);
}
} else if (_local1.serving == 3) {
trace(_local1);
if (_local1.packBox <= 4) {
trace("\uD3EC\uC7A5\uC911");
_local1.packBox++;
_local1.Brew(true, 1, _local1.boxNo, _local1.packBox);
_root.sound_press.start();
} else {
trace("\uD3EC\uC7A5\uC885\uB8CC");
var _local2 = 1;
while (_local2 <= _local1.nowVisitorCnt) {
_local1.Visitor(true, _local2, _local1.tbN["visitor_" + _local2].xenderNo, 4, _local1.boxNo);
_local2++;
}
_local1.Gauge(false);
_local1.Brew(false, 1, 1, 1);
_local1.serving = 4;
trace("\uC8FC\uBB38\uB7C9 : " + _local1.orderArray);
SmileCalculator(_local1, 2, 0);
_root.sound_success.start();
}
}
};
SpeenWheel = function (obj) {
var _local1 = obj;
i = 1;
while (i <= _local1.tray.maxTray) {
if (_local1["trayItem" + i].posNo < _local1.tray.maxTray) {
var _local2 = _local1["trayItem" + i].posNo + 1;
} else if (_local1["trayItem" + i].posNo == _local1.tray.maxTray) {
var _local2 = 1;
}
MoveObj(_local1["trayItem" + i], 5, _local1["tray_" + _local2]._x, _local1["tray_" + _local2]._y);
_local1["trayItem" + i].posNo = _local2;
i++;
}
_local1.tray.carryArray.SpeenArray();
_local1.tray.posArray.SpeenArray();
_root.sound_wheel.start();
};
Array.prototype.SpeenArray = function () {
var _local1 = this;
_local1.reverse();
var _local2 = _local1.shift();
_local1.push(_local2);
_local1.reverse();
};
CreateKeyListener = function (obj) {
keyListner = new Object(obj);
keyListner.onKeyDown = function () {
_root.Remocon(obj, Key.getCode(), true);
};
keyListner.onKeyUp = function () {
_root.Remocon(obj, Key.getCode(), false);
};
Key.addListener(keyListner);
};
Remocon = function (obj, keyCode, used) {
var _local1 = obj;
var _local2 = used;
var _local3 = _root;
switch (keyCode) {
case 37 :
if (!_local1.moveKey) {
_local3.CharMove(_local1, -1, 0);
}
_local1.moveKey = _local2;
return;
case 38 :
if (!_local1.moveKey) {
_local3.CharMove(_local1, 0, -1);
}
_local1.moveKey = _local2;
return;
case 39 :
if (!_local1.moveKey) {
_local3.CharMove(_local1, 1, 0);
}
_local1.moveKey = _local2;
return;
case 40 :
if (!_local1.moveKey) {
_local3.CharMove(_local1, 0, 1);
}
_local1.moveKey = _local2;
return;
case 32 :
if (_local2) {
SpeenWheel(_local1);
}
return;
case 17 :
_local1.ctrlKey = _local2;
return;
case 88 :
trace("\uD68C\uC804");
if (!_local2) {
break;
}
SpeenWheel(_local1);
}
};
DetectKeys = function (obj) {
var _local1 = obj;
if (Key.isDown(39) and (!_local1.rightKey)) {
_local1.rightKey = true;
trace("\uC6B0");
} else if (Key.isDown(37) and (!_local1.leftKey)) {
_local1.leftKey = true;
trace("\uC88C");
}
if (Key.isDown(40) and (!_local1.downKey)) {
_local1.downKey = true;
trace("\uD558");
} else if (Key.isDown(38) and (!_local1.upKey)) {
_local1.upKey = true;
trace("\uC0C1");
}
};
Color.prototype.setTint = function (r, g, b, t) {
var _local2 = t;
var _local1 = 100 - _local2;
_local2 = _local2 / 100;
this.setTransform({ra:_local1, rb:r * _local2, ga:_local1, gb:g * _local2, ba:_local1, bb:b * _local2});
};
Color.prototype.setBrightness = function (b) {
var _local1 = b;
var _local3 = (255 * ((_local1 > 0) ? (_local1) : 0)) / 100;
var _local2 = ((_local1 >= 0) ? (100 - _local1) : (100 + _local1));
this.setTransform({ra:_local2, rb:_local3, ga:_local2, gb:_local3, ba:_local2, bb:_local3});
};
ExtractDay = function (y, m, d) {
var _local1 = this;
var _local3 = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
var _local2 = new Date(y, m - 1, d);
_local1.rYear = _local2.getFullYear();
_local1.rMonth = _local2.getMonth() + 1;
_local1.rDate = _local2.getDate();
_local1.rDay = _local2.getDay();
_local1.rWeekDay = _local3[_local1.rDay];
};
DataLoad = function () {
var _local1 = this;
_root.fullSet._visible = false;
_local1.readVar = new LoadVars();
_local1.readVar.onLoad = function (success) {
var _local1 = this;
if (success == true) {
_local1.newProf = calcMD5((_local1.id + "game") + _local1.gameProf);
trace(_local1.newProf);
}
};
var no = random(10000);
var _local2 = "tycoonL.php";
_local1.readVar.load(_local2);
};
DataSend = function () {
var _local1 = _root;
var _local2 = this;
_local1.hope_1.text = _local1.hope1;
_local1.hope_2.text = _local1.hope2;
_local1.hope_3.text = _local1.hope3;
_local1.hope_4.text = _local1.hope4;
_local1.satisfaction = ((_local1.hope1 + _local1.hope2) + _local1.hope3) + _local1.hope4;
_local1.hope_0.text = _local1.satisfaction;
_local1.sellingBoard.text = _local1.selling / 10;
_local1.visitor.text = _local1.visit;
_local1.good.text = _local1.smile;
_local1.profit = ((_local1.selling + (_local1.smile * 100)) + (_local1.visit * 10)) - (_local1.satisfaction * 400);
_local1.profitBoard.text = _local1.profit;
_local1.btn_save.enabled = false;
_local1.btn_save._visible = false;
_local2.sendVar = new LoadVars();
_local2.receiveVar = new LoadVars();
_local2.receiveVar.onLoad = function (success) {
var _local1 = _root;
trace("\uB85C\uB4DC \uC2DC\uB3C4");
if (success) {
trace("\uC131\uACF5");
trace(this.TAIL);
_local1.saveMsg.stop();
_local1.saveMsg._visible = false;
} else {
trace("\uC2E4\uD328");
_local1.saveMsg.recordMsg.text = "\uB370\uC774\uD130 \uC800\uC7A5\uC5D0 \uC2E4\uD328\uD558\uC600\uC2B5\uB2C8\uB2E4.";
trace(this.TAIL);
}
};
_local2.sendVar.dayProfit = _local1.profit;
_local2.sendVar.visitor = _local1.visit;
_local2.sendVar.satisfaction = _local1.satisfaction;
_local2.sendVar.selling = _local1.selling;
_local2.sendVar.gameProf = readVar.newProf;
_local2.sendVar.id = readVar.id;
_local2.sendVar.good = _local1.smile;
trace("this.sendVar.dayProfit : " + _local2.sendVar.dayProfit);
trace("this.sendVar.visitor : " + _local2.sendVar.visitor);
trace("this.sendVar.satisfaction : " + _local2.sendVar.satisfaction);
trace("this.sendVar.selling : " + _local2.sendVar.selling);
trace("this.sendVar.gameProf : " + _local2.sendVar.gameProf);
trace("this.sendVar.id : " + _local2.sendVar.id);
trace("this.sendVar.good : " + _local2.sendVar.good);
var _local3 = "tycoonS.php?randNo=" + random(5000);
_local2.sendVar.sendAndLoad(_local3, _local2.receiveVar, "POST");
};
var hex_chr = "0123456789abcdef";
sound_wheel = new Sound();
sound_wheel.attachSound("wheel");
sound_walk = new Sound();
sound_walk.attachSound("walk");
sound_take = new Sound();
sound_take.attachsound("take");
sound_press = new Sound();
sound_press.attachSound("press");
sound_visit = new Sound();
sound_visit.attachSound("visit");
sound_out = new Sound();
sound_out.attachSound("goOut");
sound_success = new Sound();
sound_success.attachSound("success");
sound_fault = new Sound();
sound_fault.attachSound("fault");
Frame 5
_root._quality = "HIGH";
this.stop();
Frame 6
this.stop();
_root._quality = "MEDIUM";
MetaGame(_root.unit1);
GameStart(_root.unit1);
Frame 7
_root._quality = "HIGH";
_root.hope_1.text = _root.hope1;
_root.hope_2.text = _root.hope2;
_root.hope_3.text = _root.hope3;
_root.hope_4.text = _root.hope4;
_root.satisfaction = ((_root.hope1 + _root.hope2) + _root.hope3) + _root.hope4;
_root.hope_0.text = _root.satisfaction;
_root.sellingBoard.text = _root.selling / 10;
_root.visitor.text = _root.visit;
_root.good.text = _root.smile;
_root.giftBox.text = _root.satisfaction;
_root.profit = ((_root.selling + (_root.smile * 100)) + (_root.visit * 10)) - (_root.satisfaction * 400);
_root.profitBoard.text = _root.profit;
Symbol 12 MovieClip [smileAni] Frame 1
this._visible = false;
this.stop();
Symbol 58 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("gameMain");
}
Symbol 81 MovieClip Frame 24
this._visible = false;
this.gotoAndStop(1);
Symbol 129 MovieClip Frame 1
_root.BrewSwitch(this, true);
Symbol 129 MovieClip Frame 6
_root.BrewSwitch(this, false);
Symbol 134 MovieClip Frame 1
_root.BrewSwitch(this, true);
Symbol 134 MovieClip Frame 6
_root.BrewSwitch(this, false);
Symbol 139 MovieClip Frame 1
_root.BrewSwitch(this, true);
Symbol 139 MovieClip Frame 6
_root.BrewSwitch(this, false);
Symbol 144 MovieClip Frame 1
_root.BrewSwitch(this, true);
Symbol 144 MovieClip Frame 6
_root.BrewSwitch(this, false);
Symbol 166 MovieClip Frame 1
_root.BrewSwitch(this, true);
Symbol 166 MovieClip Frame 6
_root.BrewSwitch(this, false);
Symbol 171 MovieClip Frame 1
_root.BrewSwitch(this, true);
Symbol 171 MovieClip Frame 6
_root.BrewSwitch(this, false);
Symbol 176 MovieClip Frame 1
_root.BrewSwitch(this, true);
Symbol 176 MovieClip Frame 6
_root.BrewSwitch(this, false);
Symbol 181 MovieClip Frame 1
_root.BrewSwitch(this, true);
Symbol 181 MovieClip Frame 6
_root.BrewSwitch(this, false);
Symbol 200 MovieClip Frame 24
_root.TimerAI();
Symbol 213 Button
on (release) {
getURL ("http://www1.sayhi.co.kr/sayhi_kids/php/kids_board/event/view20.php?board_code=sayevent&num=20");
}
Symbol 238 Button
on (release) {
getURL ("http://www1.sayhi.co.kr/sayhi_kids/php/kids_board/event/view20.php?board_code=sayevent&num=20");
}
Symbol 243 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("gameMain");
}
Symbol 248 Button
on (release) {
getURL ("javascript:self.close();");
}