Frame 1
stop();
Symbol 6 MovieClip [title_letter] Frame 1
function setLetter(letter) {
i = 0;
while (i < mLineArray.length) {
index = mLineArray[i].indexOf(letter);
if (index >= 0) {
mletters_mc._x = mZeroPosX - (mFontWidth * index);
mletters_mc._y = mZeroPosY - (i * mFontHeight);
break;
}
i++;
}
}
stop();
var mLine1 = "1234567890!?.,<>'";
var mLine2 = "ABCDEFGHIJKLMNOPQ";
var mLine3 = "RSTUVWXYZ ";
var mLine4 = "";
var mLine5 = "abcdefghijklmnopq";
var mLine6 = "rstuvwxyz";
var mLineArray = new Array(mLine1, mLine2, mLine3, mLine4, mLine5, mLine6);
var mZeroPosX = mletters_mc._x;
var mZeroPosY = mletters_mc._y;
var mFontWidth = 22;
var mFontHeight = 30;
if (mLetter != undefined) {
setLetter(mLetter);
}
Symbol 7 MovieClip [button] Frame 1
function setText(texto) {
newlength = texto.length;
oldlength = mLetters.length;
if (oldlength > newlength) {
i = newlength;
while (i < oldlength) {
mLetters[i].removeMovieClip();
i++;
}
} else if (oldlength < newlength) {
i = oldlength;
while (i < newlength) {
var _local2 = this.attachMovie("button_letter", ("letter" + i) + "_mc", i, {_x:i * mFontWidth, _y:0, mLetter:texto.charAt(i)});
mLetters.push(_local2);
i++;
}
}
i = 0;
while (i < newlength) {
mLetters[i].setLetter(texto.charAt(i));
i++;
}
this._x = origx - ((newlength * mFontWidth) / 2);
}
function clearText() {
i = 0;
while (i < mLetters.length) {
mLetters[i].removeMovieClip();
i++;
}
}
function over() {
i = 0;
while (i < mLetters.length) {
mLetters[i].over();
i++;
}
}
function out() {
i = 0;
while (i < mLetters.length) {
mLetters[i].out();
i++;
}
}
function up() {
i = 0;
while (i < mLetters.length) {
mLetters[i].up();
i++;
}
}
function down() {
i = 0;
while (i < mLetters.length) {
mLetters[i].down();
i++;
}
}
stop();
var mLetters = new Array();
var mFontWidth = 12;
var origx = this._x;
Symbol 20 MovieClip [button_letter] Frame 1
function setLetter(letter) {
mLetter = letter;
i = 0;
while (i < mLineArray.length) {
index = mLineArray[i].indexOf(letter);
if (index >= 0) {
mletters_mc._x = mZeroPosX - (mFontWidth * index);
mletters_mc._y = mZeroPosY - (i * mFontHeight);
mletters2_mc._x = mletters_mc._x;
mletters2_mc._y = mletters_mc._y + 3;
break;
}
i++;
}
}
function over() {
gotoAndStop ("over");
}
function out() {
gotoAndStop ("off");
}
function down() {
this._y = mOrigY + 2;
}
function up() {
this._y = mOrigY;
}
stop();
var mLine1 = "1234567890!?.,<> ";
var mLine2 = "ABCDEFGHIJKLMNOPQ";
var mLine3 = "RSTUVWXYZ";
var mLine4 = "";
var mLine5 = "abcdefghijklmnopq";
var mLine6 = "rstuvwxyz";
var mLineArray = new Array(mLine1, mLine2, mLine3, mLine4, mLine5, mLine6);
var mZeroPosX = mletters_mc._x;
var mZeroPosY = mletters_mc._y;
var mOrigX = this._x;
var mOrigY = this._y;
var mFontWidth = 22;
var mFontHeight = 30;
if (mLetter != undefined) {
setLetter(mLetter);
}
Symbol 20 MovieClip [button_letter] Frame 2
if (mLetter != undefined) {
setLetter(mLetter);
}
Symbol 21 MovieClip [title] Frame 1
function setText(texto) {
newlength = texto.length;
oldlength = mLetters.length;
if (oldlength > newlength) {
i = newlength;
while (i < oldlength) {
mLetters[i].removeMovieClip();
i++;
}
} else if (oldlength < newlength) {
i = oldlength;
while (i < newlength) {
var _local2 = this.attachMovie("title_letter", ("letter" + i) + "_mc", i, {_x:i * mFontWidth, _y:0, mLetter:texto.charAt(i)});
mLetters.push(_local2);
i++;
}
}
i = 0;
while (i < newlength) {
mLetters[i].setLetter(texto.charAt(i));
i++;
}
this._x = origx - ((newlength * mFontWidth) / 2);
}
function clearText() {
i = 0;
while (i < mLetters.length) {
mLetters[i].removeMovieClip();
i++;
}
}
stop();
var mLetters = new Array();
var mFontWidth = 12;
var origx = this._x;
Symbol 28 MovieClip Frame 1
this.onEnterFrame = function () {
p = Math.floor((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100);
this.mLoadText.text = p + "%";
if (p >= 100) {
_parent.gotoAndStop(2);
}
};
Symbol 38 Button
on (release) {
this.gotoAndStop("3");
}
Symbol 75 MovieClip Frame 1
function work() {
mbInAnim = true;
mbWorking = true;
mNextAnim = 0;
this.gotoAndPlay("working");
}
function isWorking() {
return(mbWorking);
}
function stopWorking() {
mbInAnim = false;
mbWorking = false;
this.gotoAndStop("stand");
}
function setFoodStation(station) {
mFoodStation = station;
}
function prepareFood(food) {
mFoodQueue.push(food);
if (mFoodQueue.length == 1) {
work();
mTimeToWork = getTimer() + WORKINGTIME;
}
}
stop();
var mbInAnim = false;
var mbWorking = false;
var mNextAnim = 0;
var mFoodStation = null;
var WORKINGTIME = 4000;
var mFoodQueue = new Array();
var mTimeToWork = 0;
this.onEnterFrame = function () {
now = getTimer();
if (!mbWorking) {
if ((!mbInAnim) && (mNextAnim == 0)) {
waitTime = Math.floor(Math.random() * 7000);
mNextAnim = now + waitTime;
}
if ((now >= mNextAnim) && (mNextAnim > 0)) {
mbInAnim = true;
mNextAnim = 0;
this.gotoAndPlay("stand");
}
} else if (now >= mTimeToWork) {
food = mFoodQueue.shift();
mFoodStation.deliverFood(food);
if (mFoodQueue.length > 0) {
mTimeToWork = now + WORKINGTIME;
} else {
stopWorking();
}
}
};
Symbol 75 MovieClip Frame 17
this.mbInAnim = false;
gotoAndStop (2);
Symbol 75 MovieClip Frame 33
gotoAndPlay ("working");
Symbol 80 MovieClip Frame 1
function work() {
mbInAnim = true;
mbWorking = true;
mNextAnim = 0;
this.gotoAndPlay("working");
}
function stopWorking() {
mbInAnim = false;
mbWorking = false;
this.gotoAndStop("stand");
}
function isWorking() {
return(mbWorking);
}
function prepareRice(rice) {
mRiceQueue.push(rice);
rice.work();
if (mRiceQueue.length == 1) {
work();
mTimeToWork = getTimer() + WORKINGTIME;
}
}
stop();
var mbInAnim = false;
var mbWorking = false;
var mNextAnim = 0;
var WORKINGTIME = 4000;
var mRiceQueue = new Array();
var mTimeToWork = 0;
this.onEnterFrame = function () {
now = getTimer();
if (!mbWorking) {
if ((!mbInAnim) && (mNextAnim == 0)) {
waitTime = Math.floor(Math.random() * 7000);
mNextAnim = now + waitTime;
}
if ((now >= mNextAnim) && (mNextAnim > 0)) {
mbInAnim = true;
mNextAnim = 0;
this.gotoAndPlay("stand");
}
} else if (now >= mTimeToWork) {
rice = mRiceQueue.shift();
rice.stopWorking();
if (mRiceQueue.length > 0) {
mTimeToWork = now + WORKINGTIME;
} else {
stopWorking();
}
}
};
Symbol 80 MovieClip Frame 17
this.mbInAnim = false;
gotoAndStop (2);
Symbol 80 MovieClip Frame 33
gotoAndPlay ("working");
Symbol 91 MovieClip Frame 1
function trash() {
gotoAndPlay ("work");
}
function highlight(tipo) {
mbHighlight = tipo;
mHighlight_mc._visible = mbHighlight;
}
function showPointer() {
mPointer_mc._visible = true;
}
function hidePointer() {
mPointer_mc._visible = false;
}
stop();
mHighlight_mc._visible = false;
var mbHighlight = false;
mPointer_mc._visible = false;
Symbol 91 MovieClip Frame 2
mHighlight_mc._visible = mbHighlight;
Symbol 91 MovieClip Frame 3
mHighlight_mc._visible = mbHighlight;
Symbol 91 MovieClip Frame 4
mHighlight_mc._visible = mbHighlight;
Symbol 91 MovieClip Frame 5
mHighlight_mc._visible = mbHighlight;
gotoAndStop ("idle");
Symbol 107 MovieClip Frame 1
function highlight(tipo) {
mHighlight_mc._visible = tipo;
}
function setType(tipo) {
miType = tipo;
gotoAndStop(miType + 2);
}
function work() {
mbWorking = true;
gotoAndStop (2);
}
function stopWorking() {
mbWorking = false;
gotoAndStop(miType + 2);
}
function isWorking() {
return(mbWorking);
}
function showPointer() {
mPointer_mc._visible = true;
}
function hidePointer() {
mPointer_mc._visible = false;
}
stop();
var mbWorking = false;
var miType = 1;
mHighlight_mc._visible = false;
mPointer_mc._visible = false;
Symbol 122 MovieClip Frame 1
function setType(tipo) {
miType = tipo;
gotoAndStop("idle" + miType);
}
function work() {
gotoAndPlay("work" + miType);
}
function highlight(tipo) {
mHighlight_mc._visible = tipo;
}
function showPointer() {
mPointer_mc._visible = true;
}
function hidePointer() {
mPointer_mc._visible = false;
}
stop();
var miType = 1;
mHighlight_mc._visible = false;
mPointer_mc._visible = false;
Symbol 122 MovieClip Frame 8
gotoAndStop ("idle1");
Symbol 122 MovieClip Frame 12
gotoAndStop ("idle2");
Symbol 122 MovieClip Frame 16
gotoAndStop ("idle3");
Symbol 150 MovieClip Frame 1
function highlight(tipo) {
mbHighlight = tipo;
mHighlight_mc._visible = mbHighlight;
}
stop();
var mbHighlight = false;
Symbol 150 MovieClip Frame 2
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 3
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 4
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 5
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 6
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 7
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 8
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 9
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 10
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 11
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 12
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 13
mHighlight_mc._visible = mbHighlight;
Symbol 150 MovieClip Frame 14
mHighlight_mc._visible = mbHighlight;
Symbol 151 MovieClip Frame 1
function highlight(tipo, n) {
if (n == 1) {
food1_mc.highlight(tipo);
} else if (n == 2) {
food2_mc.highlight(tipo);
}
}
function deliverFood(food) {
if (hasFood(1)) {
mFoodNamesArray[1] = mFoodNamesArray[0];
mFoodNamesArray[0] = food;
food2_mc.gotoAndStop(mFoodNamesArray[1]);
food2_mc._visible = true;
food1_mc.gotoAndStop(food);
food1_mc._visible = true;
gotoAndPlay ("deliver");
} else {
mFoodNamesArray[0] = food;
food1_mc.gotoAndStop(food);
food1_mc._visible = true;
gotoAndPlay ("deliver1");
}
}
function getFood(pos) {
food = mFoodNamesArray[pos - 1];
mFoodNamesArray[pos - 1] = "";
mFoodArray[pos - 1]._visible = false;
return(food);
}
function hasFood(pos) {
return(mFoodArray[pos - 1]._visible);
}
function showPointer(pos) {
if (pos == 1) {
mPointer1_mc._visible = true;
} else if (pos == 2) {
mPointer2_mc._visible = true;
}
}
function hidePointer(pos) {
if (pos == 1) {
mPointer1_mc._visible = false;
} else if (pos == 2) {
mPointer2_mc._visible = false;
}
}
stop();
var mFoodArray = new Array(food1_mc, food2_mc);
food1_mc._visible = false;
food2_mc._visible = false;
var mFoodNamesArray = new Array("", "");
mPointer1_mc._visible = false;
mPointer2_mc._visible = false;
Symbol 151 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 151 MovieClip Frame 12
gotoAndStop ("idle");
Symbol 160 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 1
function hasProduct() {
return(mbWithProduct);
}
function setProduct(prod) {
mbWithProduct = true;
mProduct = prod;
if ((mProduct == "drink") || (mProduct == "spice")) {
mbSmallProduct = true;
} else {
mbSmallProduct = false;
}
this.gotoAndStop("stand1");
}
function getProduct() {
return(mProduct);
}
function releaseProduct() {
mbWithProduct = false;
mProduct = "";
miRice = 0;
this.gotoAndStop("stand");
}
function setRice(tipo) {
miRice = tipo;
}
function hasRice() {
return(miRice > 0);
}
function getRice() {
return(miRice);
}
function moveToPosition(posX, posY) {
mTargetX = posX;
mTargetY = posY;
mbMoving = true;
}
function doubleMove(posX, posY) {
mbDoubleMove = true;
mT2X = posX;
mT2Y = posY;
}
function stopMoving() {
mDirX = 0;
mDirY = 0;
mbMoving = false;
if (mbDoubleMove) {
mbDoubleMove = false;
moveToPosition(mT2X, mT2Y);
defineDirection();
} else if (mbWithProduct) {
this.gotoAndStop("stand1");
} else {
this.gotoAndStop("stand");
}
}
function setItem(item) {
item_mc = item;
item_mc._visible = false;
}
function updateItem() {
if (mbWithProduct && (!mbSmallProduct)) {
item_mc._visible = true;
if (((_currentframe >= 18) && (_currentframe <= 33)) || ((_currentframe >= 82) && (_currentframe <= 97))) {
item_mc._x = _x + 1;
item_mc._y = _y - 2;
} else if ((_currentframe >= 114) && (_currentframe <= 129)) {
item_mc._x = _x + 46;
item_mc._y = _y - 22;
} else if ((_currentframe >= 51) && (_currentframe <= 65)) {
item_mc._x = _x - 46;
item_mc._y = _y - 22;
} else {
item_mc._visible = false;
}
} else {
item_mc._visible = false;
}
}
function isMoving() {
return(mbMoving);
}
function addObstacle(obst) {
mObstacles.push(obst);
}
function defineDirection() {
if ((this._x == mTargetX) && (this._y == mTargetY)) {
stopMoving();
} else if (Math.abs(this._x - mTargetX) > Math.abs(this._y - mTargetY)) {
if (this._x > mTargetX) {
moveLeft();
} else {
moveRight();
}
} else if (this._y > mTargetY) {
moveUp();
} else {
moveDown();
}
}
function collideUp(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x, y - 10, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 12, y - 3, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 12, y - 3, true)) {
return(true);
}
i++;
}
return(false);
}
function collideDown(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x, y + 10, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 12, y + 6, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 12, y + 6, true)) {
return(true);
}
i++;
}
return(false);
}
function collideLeft(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x - 18, y, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 18, y - 8, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 18, y + 6, true)) {
return(true);
}
i++;
}
return(false);
}
function collideRight(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x + 18, y, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 18, y - 6, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 18, y + 8, true)) {
return(true);
}
i++;
}
return(false);
}
function moveUp() {
mDirX = 0;
mDirY = -1;
if (mbWithProduct) {
this.gotoAndPlay("runu1");
} else {
this.gotoAndPlay("runu");
}
}
function moveLeft() {
mDirX = -1;
mDirY = 0;
if (mbWithProduct) {
this.gotoAndPlay("runl1");
} else {
this.gotoAndPlay("runl");
}
}
function moveDown() {
mDirX = 0;
mDirY = 1;
if (mbWithProduct) {
this.gotoAndPlay("rund1");
} else {
this.gotoAndPlay("rund");
}
}
function moveRight() {
mDirX = 1;
mDirY = 0;
if (mbWithProduct) {
this.gotoAndPlay("runr1");
} else {
this.gotoAndPlay("runr");
}
}
stop();
var mbWithProduct = false;
var mbSmallProduct = false;
var mProduct = "";
var miRice = 0;
var mbInAnim = false;
var mNextAnim = 0;
var mObstacles = new Array();
var mbMoving = false;
var mTargetX = 0;
var mTargetY = 0;
var mT2X = 0;
var mT2Y = 0;
var mDirX = 0;
var mDirY = 0;
var mbDoubleMove = false;
var item_mc = null;
var MIN_SPEED = 10;
var MAX_SPEED = 40;
var DELTA_SPEED = 10;
this.onEnterFrame = function () {
now = getTimer();
if (!mbMoving) {
if ((!mbInAnim) && (mNextAnim == 0)) {
waitTime = Math.floor(Math.random() * 7000);
mNextAnim = now + waitTime;
}
if ((now >= mNextAnim) && (mNextAnim > 0)) {
mbInAnim = true;
mNextAnim = 0;
if (mbWithProduct) {
this.gotoAndPlay("stand1");
} else {
this.gotoAndPlay("stand");
}
}
} else if ((this._x != mTargetX) || (this._y != mTargetY)) {
if ((mDirX == 0) && (mDirY == 0)) {
defineDirection();
} else {
newX = this._x + (mDirX * MAX_SPEED);
if ((mDirX != 0) && (((newX - mTargetX) * (this._x - mTargetX)) <= 0)) {
newX = mTargetX;
if (this._y != mTargetY) {
defineDirection();
}
}
newY = this._y + (mDirY * MAX_SPEED);
if ((mDirY != 0) && (((newY - mTargetY) * (this._y - mTargetY)) <= 0)) {
newY = mTargetY;
if (this._x != mTargetX) {
defineDirection();
}
}
pos = new Object();
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
speed = MAX_SPEED;
collision = false;
if (mDirY < 0) {
collision = collideUp(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newY = this._y + (mDirY * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideUp(pos.x, pos.y);
}
if (collision) {
mDirY = 0;
if (this._x == mTargetX) {
stopMoving();
} else if (newX < mTargetX) {
moveRight();
} else if (newX > mTargetX) {
moveLeft();
} else {
stopMoving();
}
}
} else if (mDirY > 0) {
collision = collideDown(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newY = this._y + (mDirY * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideDown(pos.x, pos.y);
}
if (collision) {
mDirY = 0;
if (this._x == mTargetX) {
stopMoving();
} else if (newX < mTargetX) {
moveRight();
} else if (newX > mTargetX) {
moveLeft();
} else {
stopMoving();
}
}
} else if (mDirX < 0) {
collision = collideLeft(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newX = this._x + (mDirX * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideLeft(pos.x, pos.y);
}
if (collision) {
mDirX = 0;
if (this._y == mTargetY) {
stopMoving();
} else if (newY < mTargetY) {
moveDown();
} else if (newY > mTargetY) {
moveUp();
} else {
stopMoving();
}
}
} else if (mDirX > 0) {
collision = collideRight(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newX = this._x + (mDirX * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideRight(pos.x, pos.y);
}
if (collision) {
mDirX = 0;
if (this._y == mTargetY) {
stopMoving();
} else if (newY < mTargetY) {
moveDown();
} else if (newY > mTargetY) {
moveUp();
} else {
stopMoving();
}
}
}
if (!collision) {
this._x = newX;
this._y = newY;
updateItem();
}
}
} else {
stopMoving();
}
};
Symbol 177 MovieClip Frame 2
item_mc._visible = false;
Symbol 177 MovieClip Frame 17
this.mbInAnim = false;
gotoAndStop ("stand");
Symbol 177 MovieClip Frame 18
if (mbSmallProduct) {
item_mc._visible = false;
itemsmall_mc._visible = true;
itemsmall_mc.gotoAndStop(mProduct);
} else {
itemsmall_mc._visible = false;
item_mc._visible = true;
item_mc._x = _x + 1;
item_mc._y = _y - 2;
item_mc.gotoAndStop(mProduct);
}
Symbol 177 MovieClip Frame 33
this.mbInAnim = false;
if (!mbMoving) {
gotoAndStop ("stand1");
}
Symbol 177 MovieClip Frame 34
item_mc._visible = false;
Symbol 177 MovieClip Frame 49
if (mbMoving && (mDirX == -1)) {
gotoAndPlay ("runl");
}
Symbol 177 MovieClip Frame 50
if (mbSmallProduct) {
item_mc._visible = false;
itemsmall_mc._visible = true;
itemsmall_mc.gotoAndStop(mProduct);
} else {
itemsmall_mc._visible = false;
item_mc._visible = true;
item_mc._x = _x - 46;
item_mc._y = _y - 22;
item_mc.gotoAndStop(mProduct);
}
Symbol 177 MovieClip Frame 65
if (mbMoving && (mDirX == -1)) {
gotoAndPlay ("runl1");
}
Symbol 177 MovieClip Frame 66
item_mc._visible = false;
Symbol 177 MovieClip Frame 81
if (mbMoving && (mDirY == 1)) {
gotoAndPlay ("rund");
}
Symbol 177 MovieClip Frame 82
if (mbSmallProduct) {
item_mc._visible = false;
itemsmall_mc._visible = true;
itemsmall_mc.gotoAndStop(mProduct);
} else {
itemsmall_mc._visible = false;
item_mc._visible = true;
item_mc._x = _x + 1;
item_mc._y = _y - 2;
item_mc.gotoAndStop(mProduct);
}
Symbol 177 MovieClip Frame 97
if (mbMoving && (mDirY == 1)) {
gotoAndPlay ("rund1");
}
Symbol 177 MovieClip Frame 98
item_mc._visible = false;
Symbol 177 MovieClip Frame 113
if (mbMoving && (mDirX == 1)) {
gotoAndPlay ("runr");
}
Symbol 177 MovieClip Frame 114
if (mbSmallProduct) {
item_mc._visible = false;
itemsmall_mc._visible = true;
itemsmall_mc.gotoAndStop(mProduct);
} else {
itemsmall_mc._visible = false;
item_mc._visible = true;
item_mc._x = _x + 46;
item_mc._y = _y - 22;
item_mc.gotoAndStop(mProduct);
}
Symbol 177 MovieClip Frame 129
if (mbMoving && (mDirX == 1)) {
gotoAndPlay ("runr1");
}
Symbol 177 MovieClip Frame 130
item_mc._visible = false;
Symbol 177 MovieClip Frame 145
if (mbMoving && (mDirY == -1)) {
gotoAndPlay ("runu");
}
Symbol 177 MovieClip Frame 146
item_mc._visible = false;
if (mbSmallProduct) {
itemhide_mc._visible = false;
} else {
itemhide_mc._visible = true;
itemhide_mc.gotoAndStop(mProduct);
}
Symbol 177 MovieClip Frame 161
if (mbMoving && (mDirY == -1)) {
gotoAndPlay ("runu1");
}
Symbol 211 MovieClip Frame 104
stop();
Symbol 234 MovieClip Frame 16
stop();
_parent.stopAnimation();
Symbol 234 MovieClip Frame 32
stop();
_parent.stopAnimation();
Symbol 234 MovieClip Frame 48
stop();
_parent.stopAnimation();
Symbol 234 MovieClip Frame 64
stop();
_parent.stopAnimation();
Symbol 234 MovieClip Frame 80
stop();
_parent.stopAnimation();
Symbol 234 MovieClip Frame 96
stop();
_parent.stopAnimation();
Symbol 269 MovieClip Frame 1
function mostraIcone(produto) {
gotoAndStop(produto);
}
stop();
Symbol 274 MovieClip Frame 1
function addProduto(prod) {
mProdutos.push(prod);
produto_mc.mostraIcone(mProdutos[0]);
frame = mProdutos.length + 1;
if (mbFlip) {
frame = frame + 3;
}
gotoAndStop(frame);
this._visible = true;
}
function getProduto() {
if (mProdutos.length > 0) {
return(mProdutos[0]);
}
return("");
}
function hasProduto() {
return(mProdutos.length > 0);
}
function removeProduto() {
mProdutos.shift();
if (mProdutos.length > 0) {
produto_mc.mostraIcone(mProdutos[0]);
frame = mProdutos.length + 1;
if (mbFlip) {
frame = frame + 3;
}
gotoAndStop(frame);
} else {
this._visible = false;
}
}
function clearPedido() {
while (mProdutos.length > 0) {
mProdutos.shift();
}
this._visible = false;
}
function flip() {
mbFlip = true;
}
stop();
var mProdutos = new Array();
var mbFlip = false;
this._visible = false;
Symbol 277 MovieClip Frame 2
stop();
Symbol 277 MovieClip Frame 4
stop();
Symbol 277 MovieClip Frame 6
stop();
Symbol 277 MovieClip Frame 8
stop();
Symbol 277 MovieClip Frame 10
stop();
Symbol 277 MovieClip Frame 21
gotoAndPlay ("mood06");
Symbol 277 MovieClip Frame 32
gotoAndPlay ("mood07");
Symbol 277 MovieClip Frame 43
gotoAndPlay ("mood08");
Symbol 292 MovieClip Frame 16
stop();
_parent.stopAnimation();
Symbol 292 MovieClip Frame 32
stop();
_parent.stopAnimation();
Symbol 292 MovieClip Frame 48
stop();
_parent.stopAnimation();
Symbol 292 MovieClip Frame 64
stop();
_parent.stopAnimation();
Symbol 292 MovieClip Frame 80
stop();
_parent.stopAnimation();
Symbol 292 MovieClip Frame 96
stop();
_parent.stopAnimation();
Symbol 307 MovieClip Frame 16
stop();
_parent.stopAnimation();
Symbol 307 MovieClip Frame 32
stop();
_parent.stopAnimation();
Symbol 307 MovieClip Frame 48
stop();
_parent.stopAnimation();
Symbol 307 MovieClip Frame 64
stop();
_parent.stopAnimation();
Symbol 307 MovieClip Frame 80
stop();
_parent.stopAnimation();
Symbol 307 MovieClip Frame 96
stop();
_parent.stopAnimation();
Symbol 322 MovieClip Frame 16
stop();
_parent.stopAnimation();
Symbol 322 MovieClip Frame 32
stop();
_parent.stopAnimation();
Symbol 322 MovieClip Frame 48
stop();
_parent.stopAnimation();
Symbol 322 MovieClip Frame 64
stop();
_parent.stopAnimation();
Symbol 322 MovieClip Frame 80
stop();
_parent.stopAnimation();
Symbol 322 MovieClip Frame 96
stop();
_parent.stopAnimation();
Symbol 337 MovieClip Frame 16
stop();
_parent.stopAnimation();
Symbol 337 MovieClip Frame 32
stop();
_parent.stopAnimation();
Symbol 337 MovieClip Frame 48
stop();
_parent.stopAnimation();
Symbol 337 MovieClip Frame 64
stop();
_parent.stopAnimation();
Symbol 337 MovieClip Frame 80
stop();
_parent.stopAnimation();
Symbol 337 MovieClip Frame 96
stop();
_parent.stopAnimation();
Symbol 352 MovieClip Frame 16
stop();
_parent.stopAnimation();
Symbol 352 MovieClip Frame 32
stop();
_parent.stopAnimation();
Symbol 352 MovieClip Frame 48
stop();
_parent.stopAnimation();
Symbol 352 MovieClip Frame 64
stop();
_parent.stopAnimation();
Symbol 352 MovieClip Frame 80
stop();
_parent.stopAnimation();
Symbol 352 MovieClip Frame 96
stop();
_parent.stopAnimation();
Symbol 353 MovieClip Frame 1
function highlight(tipo) {
if (!mbAtivo) {
mHighlight_mc._visible = false;
} else {
mHighlight_mc._visible = tipo;
}
}
function flip() {
pedido_mc.flip();
}
function setID(id) {
mID = id;
}
function restart() {
mChegarTime = 0;
}
function ativarJogador() {
if (!_parent.clientArrive()) {
return(undefined);
}
level = _parent.getLevel();
mLevel = level;
max = level + 1;
if (level >= 4) {
max = 6;
}
mTipo = (Math.floor(Math.random() * 100000) % max) + 1;
gotoAndStop(mTipo + 1);
mostraCliente();
pede("menu");
m_moodStepTime = ((m_moodTotalTime[mTipo - 1] * 1000) / 8) + mMoodBonus[level - 1];
m_moodChangeTime = getTimer() + m_moodStepTime;
m_moodPause = false;
m_mood = 0;
increaseMood();
mConta = 0;
mTip = 0;
mbToEnd = false;
mAnimacao = "";
mbAtivo = true;
}
function increaseMood() {
m_mood++;
if (m_mood > MAX_MOOD) {
leaveAngry();
_parent.clientLeaveAngry(mID);
}
if ((m_mood == ANGRY_MOOD) && (m_estado == "pedindo")) {
char_anim_mc.gotoAndPlay("sit_angry");
}
mood_mc.gotoAndPlay("mood0" + m_mood);
}
function updateMood(now) {
if ((now >= m_moodChangeTime) && (!m_moodPause)) {
m_moodChangeTime = now + m_moodStepTime;
increaseMood();
}
}
function pauseMood() {
m_moodRemainingTime = m_moodChangeTime - getTimer();
m_moodPause = true;
}
function resumeMood() {
if (m_moodPause) {
m_moodChangeTime = getTimer() + m_moodRemainingTime;
m_moodPause = false;
}
}
function leaveAngry() {
apagaCliente();
mbAtivo = false;
pedido_mc.clearPedido();
mFood_mc._visible = false;
mHighlight_mc._visible = false;
m_estado = "";
}
function pede(produto) {
pedido_mc.addProduto(produto);
pedido_mc._visible = true;
changeEstado("pedindo");
}
function hasMoney() {
return(mbHasMoney);
}
function getMoney() {
money = mConta;
mConta = 0;
mbHasMoney = false;
mFood_mc._visible = false;
return(money);
}
function geraTip() {
return(((8 - m_mood) * 5) + mTip);
}
function updateConta(produto) {
mTip = mTip + 5;
if (produto == "drink") {
mConta = mConta + 20;
} else if (produto == "spice") {
mConta = mConta + 5;
} else if (produto == "dessert") {
mConta = mConta + 100;
} else if (produto.indexOf("food") == 0) {
mConta = mConta + 100;
}
}
function geraPedidoSouvenir() {
switch (mLevel) {
case 1 :
return;
case 2 :
rand = Math.floor(Math.random() * 100000) % 10;
if (rand < 5) {
pede("balloon");
} else {
pede("souvenir");
}
return;
case 3 :
return;
case 4 :
return;
case 5 :
rand = Math.floor(Math.random() * 100000) % 10;
if (rand < 3) {
pede("balloon");
} else {
if (rand >= 6) {
break;
}
pede("souvenir");
}
}
}
function geraPedidoFood() {
maxRice = 0;
maxSeaFood = 0;
if (mLevel < 5) {
maxRice = 2;
maxSeaFood = 2;
} else {
maxRice = 3;
maxSeaFood = 2;
}
switch (mLevel) {
case 1 :
rand = Math.floor(Math.random() * 100000) % 2;
if (rand == 0) {
pede("dessert");
} else {
pede("drink");
mbToEnd = true;
}
return;
case 2 :
rand = Math.floor(Math.random() * 100000) % 3;
if (rand == 0) {
pede("dessert");
} else if (rand == 1) {
pede("drink");
mbToEnd = true;
} else {
pede("dessert");
pede("drink");
}
return;
case 3 :
rice = (Math.floor(Math.random() * 100000) % maxRice) + 1;
seafood = (Math.floor(Math.random() * 100000) % maxSeaFood) + 1;
pede((("food" + rice) + "0") + seafood);
return;
case 4 :
case 5 :
nPedidos = 0;
rand = Math.floor(Math.random() * 100000) % 10;
if (rand < 4) {
nPedidos = 1;
} else {
nPedidos = 2;
}
rand = Math.floor(Math.random() * 100000) % 10;
if (rand < 3) {
pede("dessert");
if (nPedidos == 2) {
pede("drink");
}
} else {
rice = (Math.floor(Math.random() * 100000) % maxRice) + 1;
seafood = (Math.floor(Math.random() * 100000) % maxSeaFood) + 1;
pede((("food" + rice) + "0") + seafood);
if (nPedidos != 2) {
break;
}
rand = Math.floor(Math.random() * 100000) % 10;
if (rand < 6) {
pede("spice");
} else {
pede("drink");
}
}
}
}
function getPedido() {
return(pedido_mc.getProduto());
}
function recebePedido(produto) {
if (pedido_mc.getProduto() != produto) {
return(false);
}
pedido_mc.removeProduto();
if (produto == "menu") {
changeEstado("leitura");
} else {
if ((produto == "dessert") || (produto.indexOf("food") == 0)) {
mFood_mc.gotoAndStop(produto);
mFood_mc._visible = true;
}
if ((!pedido_mc.hasProduto()) && (mFood_mc._visible)) {
changeEstado("comendo");
}
updateConta(produto);
}
if (mbToEnd) {
mbToEnd = false;
changeEstado("finalizando");
}
return(true);
}
function changeEstado(estado) {
now = getTimer();
m_estado = estado;
if (estado == "pedindo") {
resumeMood();
if (m_mood >= ANGRY_MOOD) {
mAnimacao = "sit_angry";
} else {
mAnimacao = "sit_happy";
}
} else if (estado == "leitura") {
pauseMood();
mAnimacao = "read";
mActionTime = now + (m_readTime[mTipo - 1] * 1000);
animate();
} else if (estado == "comendo") {
pauseMood();
mAnimacao = "eat";
mActionTime = now + (m_eatTime[mTipo - 1] * 1000);
animate();
mNextFoodStep = (m_eatTime[mTipo - 1] * 1000) / 4;
mNextFoodAnimTime = now + mNextFoodStep;
mFoodFrame = 1;
} else if (estado == "finalizando") {
pauseMood();
mAnimacao = "sit_cash";
animate();
mFood_mc._visible = true;
mFood_mc.gotoAndPlay("money");
} else if (estado == "fim") {
mAnimacao = "exit_happy";
animate();
mbAtivo = false;
mbHasMoney = true;
tip = geraTip();
_parent.giveTip(tip, mID);
}
}
function updateEstado(now) {
if (m_estado == "leitura") {
if (now >= mActionTime) {
geraPedidoFood();
}
} else if (m_estado == "comendo") {
if (now >= mActionTime) {
mFood_mc._visible = false;
geraPedidoSouvenir();
if (m_estado == "pedindo") {
mbToEnd = true;
} else {
changeEstado("finalizando");
}
} else if (now >= mNextFoodAnimTime) {
if (mFoodFrame < 4) {
mFood_mc.nextFrame();
mNextFoodAnimTime = now + mNextFoodStep;
mFoodFrame++;
}
}
}
}
function updateAnimation(now) {
if (mAnimacao == "") {
return(undefined);
}
if ((!mbInAnim) && (mNextAnim == 0)) {
waitTime = Math.floor(Math.random() * 7000);
mNextAnim = now + waitTime;
}
if ((now >= mNextAnim) && (mNextAnim > 0)) {
animate();
}
}
function animate() {
mbInAnim = true;
mNextAnim = 0;
char_anim_mc.gotoAndPlay(mAnimacao);
}
function stopAnimation() {
mbInAnim = false;
if (m_estado == "leitura") {
animate();
} else if (m_estado == "comendo") {
animate();
} else if (m_estado == "finalizando") {
changeEstado("fim");
} else if (m_estado == "fim") {
apagaCliente();
}
}
function myHitTest(x, y) {
hit = false;
if (pedido_mc._visible) {
hit = pedido_mask_mc.hitTest(x, y, true);
}
if (char_anim_mc._visible && (!hit)) {
hit = char_mask_mc.hitTest(x, y, true);
}
if (!hit) {
hit = toalha_mask_mc.hitTest(x, y, true);
}
return(hit);
}
function apagaCliente() {
pedido_mc._visible = false;
char_anim_mc._visible = false;
mood_mc._visible = false;
}
function mostraCliente() {
char_anim_mc.gotoAndStop("sit_happy");
char_anim_mc._visible = true;
mood_mc._visible = true;
}
function setFood(food) {
mFood_mc = food;
mFood_mc._visible = false;
}
function setPointer(pointer) {
mPointer_mc = pointer;
mPointer_mc._visible = false;
}
function showPointer() {
mPointer_mc._visible = true;
}
function hidePointer() {
mPointer_mc._visible = false;
}
stop();
var m_mood = 0;
var m_moodTotalTime = new Array(60, 60, 50, 50, 40, 40);
var m_moodStepTime = 0;
var m_moodChangeTime = 0;
var m_moodPause = false;
var m_moodRemainingTime = 0;
var MAX_MOOD = 8;
var ANGRY_MOOD = 4;
apagaCliente();
pedido_mask_mc._visible = false;
char_mask_mc._visible = false;
toalha_mask_mc._visible = false;
var m_estado = "inicio";
var mbAtivo = false;
var mFood_mc = null;
var mID = 0;
var mTipo = 0;
var mChegarTime = 0;
var mAnimacao = "";
var mNextAnim = 0;
var mbInAnim = false;
var m_readTime = new Array(6, 5, 3, 4, 5, 2);
var m_eatTime = new Array(5, 4, 3, 2, 6, 3);
var mActionTime = 0;
var mNextFoodAnimTime = 0;
var mNextFoodStep = 0;
var mFoodFrame = 1;
var mConta = 0;
var mTip = 0;
var mbHasMoney = false;
var mMoodBonus = new Array(5, 2, 2, 1, 0);
var mLevel = 0;
mHighlight_mc._visible = false;
this.onEnterFrame = function () {
now = getTimer();
if (mbAtivo) {
updateMood(now);
updateAnimation(now);
updateEstado(now);
} else if (!_parent.timeIsUp()) {
if (mChegarTime == 0) {
mChegarTime = now + Math.floor(Math.random() * 7000);
} else if ((now >= mChegarTime) && (!mbHasMoney)) {
ativarJogador();
mChegarTime = 0;
}
}
};
mPointer_mc._visible = false;
Symbol 357 MovieClip Frame 1
function highlight(type) {
mbHighlight = type;
if (mbHighlight) {
gotoAndStop ("on");
} else {
gotoAndStop ("off");
}
}
function showPointer() {
mPointer_mc._visible = true;
}
function hidePointer() {
mPointer_mc._visible = false;
}
stop();
var mbHighlight = false;
mPointer_mc._visible = false;
Symbol 361 MovieClip Frame 1
function highlight(type) {
mbHighlight = type;
if (mbHighlight) {
gotoAndStop ("on");
} else {
gotoAndStop ("off");
}
}
function showPointer() {
mPointer_mc._visible = true;
}
function hidePointer() {
mPointer_mc._visible = false;
}
stop();
var mbHighlight = false;
mPointer_mc._visible = false;
Symbol 376 MovieClip Frame 1
function highlight(tipo) {
mbHighlight = tipo;
mHighlight_mc._visible = mbHighlight;
}
function isWorking() {
return(mbWorking);
}
function setNumberOfCups(cups) {
mNumberOfCups = cups;
if (mNumberOfCups < 1) {
mNumberOfCups = 1;
}
if (mNumberOfCups > 2) {
mNumberOfCups = 2;
}
}
function hasCupFull() {
return(mCupsFull > 0);
}
function fillCup() {
mbWorking = true;
if (mNumberOfCups == 1) {
this.gotoAndPlay("work1");
} else {
this.gotoAndPlay("work2");
}
}
function getCup() {
mCupsFull--;
if (mNumberOfCups == 1) {
this.gotoAndStop("idle10");
} else if (mCupsFull == 0) {
this.gotoAndStop("idle20");
} else {
this.gotoAndStop("idle21");
}
}
function showPointer() {
mPointer_mc._visible = true;
}
function hidePointer() {
mPointer_mc._visible = false;
}
stop();
var mNumberOfCups = 1;
var mCupsFull = 0;
var mbHighlight = false;
var mbWorking = false;
mPointer_mc._visible = false;
Symbol 376 MovieClip Frame 2
mHighlight_mc._visible = mbHighlight;
Symbol 376 MovieClip Frame 3
mHighlight_mc._visible = mbHighlight;
Symbol 376 MovieClip Frame 4
mHighlight_mc._visible = mbHighlight;
Symbol 376 MovieClip Frame 5
mHighlight_mc._visible = mbHighlight;
Symbol 376 MovieClip Frame 6
mHighlight_mc._visible = mbHighlight;
Symbol 376 MovieClip Frame 22
this.mCupsFull = 1;
mbWorking = false;
this.gotoAndStop("idle11");
Symbol 376 MovieClip Frame 54
this.mCupsFull = 2;
mbWorking = false;
this.gotoAndStop("idle22");
Symbol 399 MovieClip Frame 1
function hasProduct() {
return(mbWithProduct);
}
function setProduct(prod) {
mbWithProduct = true;
mProduct = prod;
if ((mProduct == "drink") || (mProduct == "spice")) {
mbSmallProduct = true;
} else {
mbSmallProduct = false;
}
this.gotoAndStop("stand1");
}
function getProduct() {
return(mProduct);
}
function releaseProduct() {
mbWithProduct = false;
mProduct = "";
miRice = 0;
this.gotoAndStop("stand");
}
function moveToPosition(posX, posY) {
mTargetX = posX;
mTargetY = posY;
mbMoving = true;
}
function doubleMove(posX, posY) {
mbDoubleMove = true;
mT2X = posX;
mT2Y = posY;
}
function stopMoving() {
mDirX = 0;
mDirY = 0;
mbMoving = false;
if (mbDoubleMove) {
mbDoubleMove = false;
moveToPosition(mT2X, mT2Y);
defineDirection();
} else if (mbWithProduct) {
this.gotoAndStop("stand1");
} else {
this.gotoAndStop("stand");
}
}
function isMoving() {
return(mbMoving);
}
function addObstacle(obst) {
mObstacles.push(obst);
}
function defineDirection() {
if ((this._x == mTargetX) && (this._y == mTargetY)) {
stopMoving();
} else if (Math.abs(this._x - mTargetX) > Math.abs(this._y - mTargetY)) {
if (this._x > mTargetX) {
moveLeft();
} else {
moveRight();
}
} else if (this._y > mTargetY) {
moveUp();
} else {
moveDown();
}
}
function collideUp(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x, y - 10, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 12, y - 3, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 12, y - 3, true)) {
return(true);
}
i++;
}
return(false);
}
function collideDown(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x, y + 10, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 12, y + 6, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 12, y + 6, true)) {
return(true);
}
i++;
}
return(false);
}
function collideLeft(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x - 18, y, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 18, y - 8, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 18, y + 6, true)) {
return(true);
}
i++;
}
return(false);
}
function collideRight(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x + 18, y, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 18, y - 6, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 18, y + 8, true)) {
return(true);
}
i++;
}
return(false);
}
function moveUp() {
mDirX = 0;
mDirY = -1;
if (mbWithProduct) {
this.gotoAndPlay("runu1");
} else {
this.gotoAndPlay("runu");
}
}
function moveLeft() {
mDirX = -1;
mDirY = 0;
if (mbWithProduct) {
this.gotoAndPlay("runl1");
} else {
this.gotoAndPlay("runl");
}
}
function moveDown() {
mDirX = 0;
mDirY = 1;
if (mbWithProduct) {
this.gotoAndPlay("rund1");
} else {
this.gotoAndPlay("rund");
}
}
function moveRight() {
mDirX = 1;
mDirY = 0;
if (mbWithProduct) {
this.gotoAndPlay("runr1");
} else {
this.gotoAndPlay("runr");
}
}
stop();
var mbWithProduct = false;
var mProduct = "";
var mbInAnim = false;
var mNextAnim = 0;
var mObstacles = new Array();
var mbMoving = false;
var mTargetX = 0;
var mTargetY = 0;
var mT2X = 0;
var mT2Y = 0;
var mDirX = 0;
var mDirY = 0;
var mbDoubleMove = false;
var item_mc = null;
var MIN_SPEED = 10;
var MAX_SPEED = 40;
var DELTA_SPEED = 10;
this.onEnterFrame = function () {
now = getTimer();
if (!mbMoving) {
if ((!mbInAnim) && (mNextAnim == 0)) {
waitTime = Math.floor(Math.random() * 7000);
mNextAnim = now + waitTime;
}
if ((now >= mNextAnim) && (mNextAnim > 0)) {
mbInAnim = true;
mNextAnim = 0;
if (mbWithProduct) {
this.gotoAndPlay("stand1");
} else {
this.gotoAndPlay("stand");
}
}
} else if ((this._x != mTargetX) || (this._y != mTargetY)) {
if ((mDirX == 0) && (mDirY == 0)) {
defineDirection();
} else {
newX = this._x + (mDirX * MAX_SPEED);
if ((mDirX != 0) && (((newX - mTargetX) * (this._x - mTargetX)) <= 0)) {
newX = mTargetX;
if (this._y != mTargetY) {
defineDirection();
}
}
newY = this._y + (mDirY * MAX_SPEED);
if ((mDirY != 0) && (((newY - mTargetY) * (this._y - mTargetY)) <= 0)) {
newY = mTargetY;
if (this._x != mTargetX) {
defineDirection();
}
}
pos = new Object();
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
speed = MAX_SPEED;
collision = false;
if (mDirY < 0) {
collision = collideUp(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newY = this._y + (mDirY * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideUp(pos.x, pos.y);
}
if (collision) {
mDirY = 0;
if (this._x == mTargetX) {
stopMoving();
} else if (newX < mTargetX) {
moveRight();
} else if (newX > mTargetX) {
moveLeft();
} else {
stopMoving();
}
}
} else if (mDirY > 0) {
collision = collideDown(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newY = this._y + (mDirY * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideDown(pos.x, pos.y);
}
if (collision) {
mDirY = 0;
if (this._x == mTargetX) {
stopMoving();
} else if (newX < mTargetX) {
moveRight();
} else if (newX > mTargetX) {
moveLeft();
} else {
stopMoving();
}
}
} else if (mDirX < 0) {
collision = collideLeft(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newX = this._x + (mDirX * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideLeft(pos.x, pos.y);
}
if (collision) {
mDirX = 0;
if (this._y == mTargetY) {
stopMoving();
} else if (newY < mTargetY) {
moveDown();
} else if (newY > mTargetY) {
moveUp();
} else {
stopMoving();
}
}
} else if (mDirX > 0) {
collision = collideRight(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newX = this._x + (mDirX * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideRight(pos.x, pos.y);
}
if (collision) {
mDirX = 0;
if (this._y == mTargetY) {
stopMoving();
} else if (newY < mTargetY) {
moveDown();
} else if (newY > mTargetY) {
moveUp();
} else {
stopMoving();
}
}
}
if (!collision) {
this._x = newX;
this._y = newY;
updateItem();
}
}
} else {
stopMoving();
}
};
Symbol 399 MovieClip Frame 17
this.mbInAnim = false;
gotoAndStop (2);
Symbol 399 MovieClip Frame 33
this.mbInAnim = false;
gotoAndStop (2);
Symbol 399 MovieClip Frame 49
if (mbMoving) {
gotoAndPlay ("runl");
}
Symbol 399 MovieClip Frame 65
if (mbMoving) {
gotoAndPlay ("runl1");
}
Symbol 399 MovieClip Frame 81
if (mbMoving) {
gotoAndPlay ("rund");
}
Symbol 399 MovieClip Frame 97
if (mbMoving) {
gotoAndPlay ("rund1");
}
Symbol 399 MovieClip Frame 113
if (mbMoving) {
gotoAndPlay ("runr");
}
Symbol 399 MovieClip Frame 129
if (mbMoving) {
gotoAndPlay ("runr1");
}
Symbol 399 MovieClip Frame 145
if (mbMoving) {
gotoAndPlay ("runu");
}
Symbol 399 MovieClip Frame 161
if (mbMoving) {
gotoAndPlay ("runu1");
}
Symbol 422 MovieClip Frame 1
function hasProduct() {
return(mbWithProduct);
}
function setProduct(prod) {
mbWithProduct = true;
mProduct = prod;
if ((mProduct == "drink") || (mProduct == "spice")) {
mbSmallProduct = true;
} else {
mbSmallProduct = false;
}
this.gotoAndStop("stand1");
}
function getProduct() {
return(mProduct);
}
function releaseProduct() {
mbWithProduct = false;
mProduct = "";
miRice = 0;
this.gotoAndStop("stand");
}
function moveToPosition(posX, posY) {
mTargetX = posX;
mTargetY = posY;
mbMoving = true;
}
function doubleMove(posX, posY) {
mbDoubleMove = true;
mT2X = posX;
mT2Y = posY;
}
function stopMoving() {
mDirX = 0;
mDirY = 0;
mbMoving = false;
if (mbDoubleMove) {
mbDoubleMove = false;
moveToPosition(mT2X, mT2Y);
defineDirection();
} else if (mbWithProduct) {
this.gotoAndStop("stand1");
} else {
this.gotoAndStop("stand");
}
}
function isMoving() {
return(mbMoving);
}
function addObstacle(obst) {
mObstacles.push(obst);
}
function defineDirection() {
if ((this._x == mTargetX) && (this._y == mTargetY)) {
stopMoving();
} else if (Math.abs(this._x - mTargetX) > Math.abs(this._y - mTargetY)) {
if (this._x > mTargetX) {
moveLeft();
} else {
moveRight();
}
} else if (this._y > mTargetY) {
moveUp();
} else {
moveDown();
}
}
function collideUp(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x, y - 10, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 12, y - 3, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 12, y - 3, true)) {
return(true);
}
i++;
}
return(false);
}
function collideDown(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x, y + 10, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 12, y + 6, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 12, y + 6, true)) {
return(true);
}
i++;
}
return(false);
}
function collideLeft(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x - 18, y, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 18, y - 8, true)) {
return(true);
}
if (mObstacles[i].hitTest(x - 18, y + 6, true)) {
return(true);
}
i++;
}
return(false);
}
function collideRight(x, y) {
var _local3 = false;
i = 0;
while (i < mObstacles.length) {
if (mObstacles[i].hitTest(x + 18, y, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 18, y - 6, true)) {
return(true);
}
if (mObstacles[i].hitTest(x + 18, y + 8, true)) {
return(true);
}
i++;
}
return(false);
}
function moveUp() {
mDirX = 0;
mDirY = -1;
if (mbWithProduct) {
this.gotoAndPlay("runu1");
} else {
this.gotoAndPlay("runu");
}
}
function moveLeft() {
mDirX = -1;
mDirY = 0;
if (mbWithProduct) {
this.gotoAndPlay("runl1");
} else {
this.gotoAndPlay("runl");
}
}
function moveDown() {
mDirX = 0;
mDirY = 1;
if (mbWithProduct) {
this.gotoAndPlay("rund1");
} else {
this.gotoAndPlay("rund");
}
}
function moveRight() {
mDirX = 1;
mDirY = 0;
if (mbWithProduct) {
this.gotoAndPlay("runr1");
} else {
this.gotoAndPlay("runr");
}
}
stop();
var mbWithProduct = false;
var mProduct = "";
var mbInAnim = false;
var mNextAnim = 0;
var mObstacles = new Array();
var mbMoving = false;
var mTargetX = 0;
var mTargetY = 0;
var mT2X = 0;
var mT2Y = 0;
var mDirX = 0;
var mDirY = 0;
var mbDoubleMove = false;
var item_mc = null;
var MIN_SPEED = 10;
var MAX_SPEED = 40;
var DELTA_SPEED = 10;
this.onEnterFrame = function () {
now = getTimer();
if (!mbMoving) {
if ((!mbInAnim) && (mNextAnim == 0)) {
waitTime = Math.floor(Math.random() * 7000);
mNextAnim = now + waitTime;
}
if ((now >= mNextAnim) && (mNextAnim > 0)) {
mbInAnim = true;
mNextAnim = 0;
if (mbWithProduct) {
this.gotoAndPlay("stand1");
} else {
this.gotoAndPlay("stand");
}
}
} else if ((this._x != mTargetX) || (this._y != mTargetY)) {
if ((mDirX == 0) && (mDirY == 0)) {
defineDirection();
} else {
newX = this._x + (mDirX * MAX_SPEED);
if ((mDirX != 0) && (((newX - mTargetX) * (this._x - mTargetX)) <= 0)) {
newX = mTargetX;
if (this._y != mTargetY) {
defineDirection();
}
}
newY = this._y + (mDirY * MAX_SPEED);
if ((mDirY != 0) && (((newY - mTargetY) * (this._y - mTargetY)) <= 0)) {
newY = mTargetY;
if (this._x != mTargetX) {
defineDirection();
}
}
pos = new Object();
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
speed = MAX_SPEED;
collision = false;
if (mDirY < 0) {
collision = collideUp(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newY = this._y + (mDirY * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideUp(pos.x, pos.y);
}
if (collision) {
mDirY = 0;
if (this._x == mTargetX) {
stopMoving();
} else if (newX < mTargetX) {
moveRight();
} else if (newX > mTargetX) {
moveLeft();
} else {
stopMoving();
}
}
} else if (mDirY > 0) {
collision = collideDown(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newY = this._y + (mDirY * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideDown(pos.x, pos.y);
}
if (collision) {
mDirY = 0;
if (this._x == mTargetX) {
stopMoving();
} else if (newX < mTargetX) {
moveRight();
} else if (newX > mTargetX) {
moveLeft();
} else {
stopMoving();
}
}
} else if (mDirX < 0) {
collision = collideLeft(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newX = this._x + (mDirX * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideLeft(pos.x, pos.y);
}
if (collision) {
mDirX = 0;
if (this._y == mTargetY) {
stopMoving();
} else if (newY < mTargetY) {
moveDown();
} else if (newY > mTargetY) {
moveUp();
} else {
stopMoving();
}
}
} else if (mDirX > 0) {
collision = collideRight(pos.x, pos.y);
while (collision && (speed > MIN_SPEED)) {
speed = speed - DELTA_SPEED;
newX = this._x + (mDirX * speed);
pos.x = newX;
pos.y = newY;
_parent.localToGlobal(pos);
collision = collideRight(pos.x, pos.y);
}
if (collision) {
mDirX = 0;
if (this._y == mTargetY) {
stopMoving();
} else if (newY < mTargetY) {
moveDown();
} else if (newY > mTargetY) {
moveUp();
} else {
stopMoving();
}
}
}
if (!collision) {
this._x = newX;
this._y = newY;
updateItem();
}
}
} else {
stopMoving();
}
};
Symbol 422 MovieClip Frame 17
this.mbInAnim = false;
gotoAndStop (2);
Symbol 422 MovieClip Frame 33
this.mbInAnim = false;
gotoAndStop (2);
Symbol 422 MovieClip Frame 49
if (mbMoving) {
gotoAndPlay ("runl");
}
Symbol 422 MovieClip Frame 65
if (mbMoving) {
gotoAndPlay ("runl1");
}
Symbol 422 MovieClip Frame 81
if (mbMoving) {
gotoAndPlay ("rund");
}
Symbol 422 MovieClip Frame 97
if (mbMoving) {
gotoAndPlay ("rund1");
}
Symbol 422 MovieClip Frame 113
if (mbMoving) {
gotoAndPlay ("runr");
}
Symbol 422 MovieClip Frame 129
if (mbMoving) {
gotoAndPlay ("runr1");
}
Symbol 422 MovieClip Frame 145
if (mbMoving) {
gotoAndPlay ("runu");
}
Symbol 422 MovieClip Frame 161
if (mbMoving) {
gotoAndPlay ("runu1");
}
Symbol 430 MovieClip Frame 1
function highlight(tipo) {
mbHighlight = tipo;
mHighlight_mc._visible = mbHighlight;
}
function hasSouvenir() {
return(mbHasSouvenir);
}
function generateSouvenir() {
mbWorking = true;
gotoAndPlay ("work");
}
function stopWorking() {
mbHasSouvenir = true;
mbWorking = false;
}
function isWorking() {
return(mbWorking);
}
function getSouvenir() {
mbHasSouvenir = false;
mbSelected = false;
generateSouvenir();
}
function isSelected() {
return(mbSelected);
}
function select() {
if ((!mbSelected) && (_currentframe >= 2)) {
gotoAndPlay(_currentframe + 8);
}
mbSelected = true;
}
function deselect() {
if (mbSelected && (_currentframe >= 10)) {
gotoAndPlay(_currentframe - 8);
}
mbSelected = false;
}
stop();
var mbHasSouvenir = false;
var mbWorking = false;
var mbSelected = false;
var mbHighlight = false;
generateSouvenir();
Symbol 430 MovieClip Frame 2
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 3
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 4
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 5
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 6
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 7
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 8
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 9
stopWorking();
stop();
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 10
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 11
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 12
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 13
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 14
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 15
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 16
mHighlight_mc._visible = mbHighlight;
Symbol 430 MovieClip Frame 17
stopWorking();
stop();
mHighlight_mc._visible = mbHighlight;
Symbol 440 MovieClip Frame 1
function work() {
mbWorking = true;
gotoAndPlay ("work");
}
function getBalloon() {
mbSelected = false;
gotoAndStop ("empty");
}
function isWorking() {
return(mbWorking);
}
function select() {
if (!mbSelected) {
if (_currentframe >= 3) {
gotoAndPlay(_currentframe + 25);
}
}
mbSelected = true;
}
function deselect() {
if (mbSelected) {
gotoAndPlay(_currentframe - 25);
}
mbSelected = false;
}
stop();
var mbWorking = false;
var mbSelected = false;
Symbol 440 MovieClip Frame 27
gotoAndPlay ("idle");
Symbol 440 MovieClip Frame 52
gotoAndPlay ("idle_a");
Symbol 440 MovieClip Frame 68
mbWorking = false;
_parent.stopWorking();
gotoAndPlay ("ini");
Symbol 446 MovieClip Frame 1
function highlight(tipo) {
mbHighlight = tipo;
mHighlight1_mc._visible = mbHighlight;
balloon_mc.highlight(tipo);
}
function hasBalloon() {
return(mbHasBalloon);
}
function generateBalloon() {
balloon_mc.work();
mbWorking = true;
gotoAndPlay ("work");
}
function stopWorking() {
mbHasBalloon = true;
mbWorking = false;
gotoAndStop ("idle");
}
function isWorking() {
return(mbWorking);
}
function getBalloon() {
balloon_mc.getBalloon();
mbHasBalloon = false;
mbSelected = false;
gotoAndStop ("idle");
}
function isSelected() {
return(mbSelected);
}
function select() {
mbSelected = true;
balloon_mc.select();
gotoAndStop ("idle_a");
}
function deselect() {
mbSelected = false;
balloon_mc.deselect();
gotoAndStop ("idle");
}
stop();
var mbHasBalloon = false;
var mbWorking = false;
var mbSelected = false;
var mbHighlight = false;
Symbol 446 MovieClip Frame 2
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 3
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 4
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 5
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 6
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 7
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 8
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 9
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 10
mHighlight1_mc._visible = mbHighlight;
Symbol 446 MovieClip Frame 11
gotoAndPlay ("work");
mHighlight1_mc._visible = mbHighlight;
Symbol 450 MovieClip Frame 1
function setColor(color) {
if (color == "green") {
mgreenletters_mc._visible = true;
mredletters_mc._visible = false;
} else {
mgreenletters_mc._visible = false;
mredletters_mc._visible = true;
}
}
function setLetter(letter) {
mLetter = letter;
linha = 0;
coluna = 0;
index = mLine1.indexOf(letter);
if (index >= 0) {
mgreenletters_mc._x = mZeroPosX - (mFontWidth * index);
mgreenletters_mc._y = mZeroPosY;
mredletters_mc._x = mgreenletters_mc._x;
mredletters_mc._y = mgreenletters_mc._y;
} else {
index = mLine2.indexOf(letter);
if (index >= 0) {
mgreenletters_mc._x = mZeroPosX - (mFontWidth * index);
mgreenletters_mc._y = mZeroPosY - mFontHeight;
mredletters_mc._x = mgreenletters_mc._x;
mredletters_mc._y = mgreenletters_mc._y;
} else {
index = mLine3.indexOf(letter);
mgreenletters_mc._x = mZeroPosX - (mFontWidth * index);
mgreenletters_mc._y = mZeroPosY - (2 * mFontHeight);
mredletters_mc._x = mgreenletters_mc._x;
mredletters_mc._y = mgreenletters_mc._y;
}
}
}
stop();
var mLine1 = "!?.,1234567890:-x";
var mLine2 = "ABCDEFGHIJKLMNOPQ";
var mLine3 = "RSTUVWXYZ ";
var mZeroPosX = mgreenletters_mc._x;
var mZeroPosY = mgreenletters_mc._y;
var mFontWidth = 14;
var mFontHeight = 25;
var mLetter = "";
Symbol 451 MovieClip Frame 1
function setColor(cor) {
i = 0;
while (i < mTopArray.length) {
mTopArray[i].setColor(cor);
i++;
}
i = 0;
while (i < mTopValueArray.length) {
mTopValueArray[i].setColor(cor);
i++;
}
i = 0;
while (i < mValueArray.length) {
mValueArray[i].setColor(cor);
i++;
}
mX.setColor(cor);
}
function setValue(valor) {
var _local2 = 0;
var _local3 = false;
if (valor < 0) {
_local3 = true;
valor = -valor;
}
if (valor > 999) {
_local2 = 4;
} else if (valor > 99) {
_local2 = 3;
} else if (valor > 9) {
_local2 = 2;
} else {
_local2 = 1;
}
if (_local3) {
_local2++;
}
i = _local2;
while (i < 4) {
mValueArray[i]._visible = false;
i++;
}
min = 0;
if (_local3) {
mValueArray[0].setLetter("-");
mValueArray[0]._visible = true;
min = 1;
}
i = _local2 - 1;
while (i >= min) {
digit = valor % 10;
mValueArray[i].setLetter(digit);
mValueArray[i]._visible = true;
valor = Math.floor(valor / 10);
i--;
}
}
function setTopValue(valor) {
var _local2 = 0;
if (valor > 9) {
_local2 = 2;
} else {
_local2 = 1;
}
i = _local2;
while (i < 2) {
mTopValueArray[i]._visible = false;
i++;
}
i = _local2 - 1;
while (i >= 0) {
digit = valor % 10;
mTopValueArray[i].setLetter(digit);
mTopValueArray[i]._visible = true;
valor = Math.floor(valor / 10);
i--;
}
mX.setLetter("x");
mX._visible = true;
}
function setTopString(nome) {
empty = mTopArray.length - nome.length;
i = 0;
while (i < empty) {
mTopArray[i]._visible = false;
i++;
}
i = empty;
while (i < mTopArray.length) {
mTopArray[i].setLetter(nome.charAt(i - empty));
mTopArray[i]._visible = true;
i++;
}
}
function showTop() {
i = 0;
while (i < mTopArray.length) {
mTopArray[i]._visible = true;
i++;
}
i = 0;
while (i < mTopValueArray.length) {
mTopValueArray[i]._visible = true;
i++;
}
mX._visible = true;
}
function hideTop() {
i = 0;
while (i < mTopArray.length) {
mTopArray[i]._visible = false;
i++;
}
i = 0;
while (i < mTopValueArray.length) {
mTopValueArray[i]._visible = false;
i++;
}
mX._visible = false;
}
stop();
var mTopArray = new Array(mTop1, mTop2, mTop3, mTop4, mTop5, mTop6, mTop7);
var mTopValueArray = new Array(mxv1, mxv2);
var mValueArray = new Array(mv1, mv2, mv3, mv4);
Symbol 452 MovieClip Frame 1
function setColor(cor) {
m_flyscore_mc.setColor(cor);
}
function setValue(valor) {
m_flyscore_mc.setValue(valor);
}
function setTopValue(valor) {
m_flyscore_mc.setTopValue(valor);
}
function setTopString(nome) {
m_flyscore_mc.setTopString(nome);
}
function showTop() {
m_flyscore_mc.showTop();
}
function hideTop() {
m_flyscore_mc.hideTop();
}
stop();
Symbol 452 MovieClip Frame 20
stop();
Symbol 458 MovieClip Frame 1
function startClock() {
mbRunning = true;
mLastTime = getTimer();
mElapsedToChange = (mTotalTime * 1000) / 64;
}
function resetClock() {
mbRunning = false;
mActualFrame = 2;
this.gotoAndStop("work01");
}
function timeIsUp() {
return(mActualFrame >= 65);
}
stop();
var mTotalTime = 120;
var mLastTime = 0;
var mbRunning = false;
var mElapsedToChange = 0;
var mActualFrame = 2;
this.onEnterFrame = function () {
if (mbRunning) {
var _local2 = getTimer();
if ((_local2 - mLastTime) >= mElapsedToChange) {
mActualFrame++;
if (mActualFrame > 65) {
mActualFrame = 65;
}
mLastTime = _local2;
this.gotoAndStop(mActualFrame);
}
}
};
Symbol 462 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 1
function showValue(valor) {
var _local2 = 0;
if (valor > 9999) {
_local2 = 5;
} else if (valor > 999) {
_local2 = 4;
} else if (valor > 99) {
_local2 = 3;
} else if (valor > 9) {
_local2 = 2;
} else {
_local2 = 1;
}
i = _local2;
while (i < 5) {
letras[i]._visible = false;
i++;
}
i = _local2 - 1;
while (i >= 0) {
digit = valor % 10;
if (digit == 0) {
digit = 10;
}
letras[i].gotoAndStop(digit);
letras[i]._visible = true;
valor = Math.floor(valor / 10);
i--;
}
}
stop();
var letras = new Array(g0, g1, g2, g3, g4);
Symbol 467 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 1
function showValue(valor) {
var _local2 = 0;
if (valor > 9999) {
_local2 = 5;
} else if (valor > 999) {
_local2 = 4;
} else if (valor > 99) {
_local2 = 3;
} else if (valor > 9) {
_local2 = 2;
} else {
_local2 = 1;
}
i = _local2;
while (i < 5) {
letras[i]._visible = false;
i++;
}
i = _local2 - 1;
while (i >= 0) {
digit = valor % 10;
if (digit == 0) {
digit = 10;
}
letras[i].gotoAndStop(digit);
letras[i]._visible = true;
valor = Math.floor(valor / 10);
i--;
}
}
stop();
var letras = new Array(g0, g1, g2, g3, g4);
Symbol 472 MovieClip Frame 1
stop();
Symbol 473 MovieClip Frame 1
function showValue(valor) {
gg._visible = true;
gg.gotoAndStop(11);
var _local2 = 0;
if (valor > 9999) {
_local2 = 5;
} else if (valor > 999) {
_local2 = 4;
} else if (valor > 99) {
_local2 = 3;
} else if (valor > 9) {
_local2 = 2;
} else {
_local2 = 1;
}
i = _local2;
while (i < 5) {
letras[i]._visible = false;
i++;
}
i = _local2 - 1;
while (i >= 0) {
digit = valor % 10;
if (digit == 0) {
digit = 10;
}
letras[i].gotoAndStop(digit);
letras[i]._visible = true;
valor = Math.floor(valor / 10);
i--;
}
mLength = ((_local2 + 1) * 12) + 3;
}
function reset() {
this._x = origx;
this._y = origy;
mLength = mTotalLength;
}
function center() {
this._x = origx + ((mTotalLength - mLength) / 2);
}
stop();
var letras = new Array(g0, g1, g2, g3, g4);
var origx = this._x;
var origy = this._y;
var mLength = 75;
var mTotalLength = 75;
Symbol 478 MovieClip Frame 1
stop();
Symbol 478 MovieClip Frame 2
stop();
Symbol 485 MovieClip Frame 1
stop();
Symbol 485 MovieClip Frame 26
stop();
Symbol 485 MovieClip Frame 51
stop();
Symbol 490 Button
on (release) {
_root.gotoAndStop(4);
}
Symbol 499 Button
on (release) {
_root.gotoAndStop(4);
}
Symbol 504 Button
on (release) {
mFunction.call(mMovie);
}
Symbol 509 Button
on (release) {
mFunction.call(mMovie);
}
Symbol 519 MovieClip Frame 1
function setText(texto) {
mText_txt.text = texto;
}
function setTitle(titulo) {
if (titulo == "Excellent Job!") {
tryagain_mc._visible = false;
excellent_mc._visible = true;
good_mc._visible = false;
} else if (titulo == "Good Job!") {
tryagain_mc._visible = false;
excellent_mc._visible = false;
good_mc._visible = true;
} else {
tryagain_mc._visible = true;
excellent_mc._visible = false;
good_mc._visible = false;
}
}
function setGoal(goal) {
mGoal_mc.showValue(goal);
}
function setExpert(goal) {
mExpert_mc.showValue(goal);
}
function setButton(nome, movie, action) {
if (nome == "Continue") {
mButton = mContinue_mc;
mContinue_btn._visible = true;
mPlay_btn._visible = false;
} else {
mButton = mPlay_mc;
mContinue_btn._visible = false;
mPlay_btn._visible = true;
}
mFunction = action;
mMovie = movie;
}
stop();
mStartMask_mc._visible = false;
var mbButtonDown = false;
var mbExitButtonDown = false;
var mFunction = null;
var mMovie = null;
var mButton = null;
mContinue_btn._visible = false;
mPlay_btn._visible = false;
tryagain_mc._visible = false;
excellent_mc._visible = false;
good_mc._visible = false;
Symbol 520 MovieClip Frame 1
function setText(texto) {
mText = texto;
}
function setTitle(titulo) {
mTitle = titulo;
}
function setGoal(goal) {
mGoal = goal;
}
function setExpert(goal) {
mExpert = goal;
}
function setButton(nome, movie, action) {
mButton = nome;
mButtonMovie = movie;
mButtonAction = action;
}
stop();
var mTitle = "";
var mGoal = 0;
var mExpert = 0;
var mButton = "";
var mButtonMovie = null;
var mButtonAction = null;
var mText = "";
Symbol 520 MovieClip Frame 2
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 520 MovieClip Frame 11
stop();
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 520 MovieClip Frame 12
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 528 Button
on (release) {
mFunction.call(mMovie);
}
Symbol 532 MovieClip Frame 1
function setText(texto) {
mText_txt.text = texto;
}
function setTitle(titulo) {
mTitle_mc.setText(titulo);
mTitle_mc.center();
}
function setGoal(goal) {
mGoal_mc.showValue(goal);
}
function setExpert(goal) {
mExpert_mc.showValue(goal);
}
function setButton(nome, movie, action) {
mStartButton.setText(nome);
mStartButton.center();
mFunction = action;
mMovie = movie;
}
stop();
mStartMask_mc._visible = false;
var mbButtonDown = false;
var mFunction = null;
var mMovie = null;
var mouselistener = new Object();
mouselistener.onMouseMove = function () {
pos = new Object();
pos.x = _xmouse;
pos.y = _ymouse;
localToGlobal(pos);
if (mStartMask_mc.hitTest(pos.x, pos.y, false)) {
mStartButton.over();
} else {
mStartButton.out();
}
};
mouselistener.onMouseDown = function () {
pos = new Object();
pos.x = _xmouse;
pos.y = _ymouse;
localToGlobal(pos);
if (mStartMask_mc.hitTest(pos.x, pos.y, false)) {
mStartButton.down();
mbButtonDown = true;
}
};
mouselistener.onMouseUp = function () {
pos = new Object();
pos.x = _xmouse;
pos.y = _ymouse;
localToGlobal(pos);
if (mbButtonDown) {
mStartButton.up();
mbButtonDown = false;
if (mStartMask_mc.hitTest(pos.x, pos.y, false)) {
mFunction.call(mMovie);
}
}
};
Mouse.addListener(mouselistener);
Symbol 533 MovieClip Frame 1
function setText(texto) {
mText = texto;
}
function setTitle(titulo) {
mTitle = titulo;
}
function setGoal(goal) {
mGoal = goal;
}
function setExpert(goal) {
mExpert = goal;
}
function setButton(nome, movie, action) {
mButton = nome;
mButtonMovie = movie;
mButtonAction = action;
}
stop();
var mTitle = "";
var mGoal = 0;
var mExpert = 0;
var mButton = "";
var mButtonMovie = null;
var mButtonAction = null;
var mText = "";
Symbol 533 MovieClip Frame 2
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 533 MovieClip Frame 11
stop();
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 533 MovieClip Frame 12
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 536 Button
on (release) {
_root.gotoAndStop("4");
}
Symbol 543 MovieClip Frame 1
function setText(texto) {
mText_txt.text = texto;
}
function setTitle(titulo) {
if (titulo == "You're Hired!") {
hired_mc._visible = true;
fired_mc._visible = false;
} else {
fired_mc._visible = true;
hired_mc._visible = false;
}
}
function setGoal(goal) {
mGoal_mc.showValue(goal);
}
function setExpert(goal) {
mExpert_mc.showValue(goal);
}
function setButton(nome, movie, action) {
mStartButton.setText(nome);
mStartButton.center();
mFunction = action;
mMovie = movie;
}
stop();
mStartMask_mc._visible = false;
var mbButtonDown = false;
var mFunction = null;
var mMovie = null;
fired_mc._visible = false;
hired_mc._visible = false;
var mouselistener = new Object();
mouselistener.onMouseMove = function () {
pos = new Object();
pos.x = _xmouse;
pos.y = _ymouse;
localToGlobal(pos);
if (mStartMask_mc.hitTest(pos.x, pos.y, false)) {
mStartButton.over();
} else {
mStartButton.out();
}
};
mouselistener.onMouseDown = function () {
pos = new Object();
pos.x = _xmouse;
pos.y = _ymouse;
localToGlobal(pos);
if (mStartMask_mc.hitTest(pos.x, pos.y, false)) {
mStartButton.down();
mbButtonDown = true;
}
};
mouselistener.onMouseUp = function () {
pos = new Object();
pos.x = _xmouse;
pos.y = _ymouse;
localToGlobal(pos);
if (mbButtonDown) {
mStartButton.up();
mbButtonDown = false;
if (mStartMask_mc.hitTest(pos.x, pos.y, false)) {
mFunction.call(mMovie);
}
}
};
Mouse.addListener(mouselistener);
Symbol 544 MovieClip Frame 1
function setText(texto) {
mText = texto;
}
function setTitle(titulo) {
mTitle = titulo;
}
function setGoal(goal) {
mGoal = goal;
}
function setExpert(goal) {
mExpert = goal;
}
function setButton(nome, movie, action) {
mButton = nome;
mButtonMovie = movie;
mButtonAction = action;
}
stop();
var mTitle = "";
var mGoal = 0;
var mExpert = 0;
var mButton = "";
var mButtonMovie = null;
var mButtonAction = null;
var mText = "";
Symbol 544 MovieClip Frame 2
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 544 MovieClip Frame 11
stop();
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 544 MovieClip Frame 12
mTitle_mc.setTitle(mTitle);
mTitle_mc.setGoal(mGoal);
mTitle_mc.setExpert(mExpert);
mTitle_mc.setButton(mButton, mButtonMovie, mButtonAction);
mTitle_mc.setText(mText);
Symbol 545 MovieClip Frame 1
function startLevel() {
mLevelStart_mc.gotoAndPlay("hide");
mbInit = true;
}
function endLevel() {
mbPlaying = false;
mTaskPoints = mTaskPoints + mPoints;
highlightOff();
clock_mc.resetClock();
rand = Math.floor(Math.random() * 10000) % 3;
texto = mWinTexts[rand];
if (mPoints >= mExpertPoints[mLevel - 1]) {
mLevelEnd_mc.setTitle("Excellent Job!");
} else if (mPoints >= mGoalPoints[mLevel - 1]) {
mLevelEnd_mc.setTitle("Good Job!");
} else {
mLevelEnd_mc.setTitle("Try Again!");
texto = mLoseTexts[rand];
}
mLevelEnd_mc.setText(texto);
mLevelEnd_mc.setGoal(mPoints);
mLevelEnd_mc.setExpert(mTaskPoints);
if (mLevel == 5) {
mLevelEnd_mc.setButton("Continue", this, this.gameOver);
} else if (mPoints >= mGoalPoints[mLevel - 1]) {
mLevelEnd_mc.setButton("Continue", this, this.nextLevel);
} else {
mLevelEnd_mc.setButton("Play Again", this, this.repeatLevel);
}
mLevelEnd_mc.gotoAndPlay("show");
}
function nextLevel() {
mLevelEnd_mc.gotoAndPlay("hide");
mLevel++;
mbStartLevel = true;
}
function repeatLevel() {
mLevelEnd_mc.gotoAndPlay("hide");
mbStartLevel = true;
}
function startGame() {
mGameOver_mc.gotoAndPlay("hide");
mLevel = 0;
mTaskPoints = 0;
nextLevel();
}
function gameOver() {
mLevelEnd_mc.gotoAndPlay("hide");
if (mPoints >= mGoalPoints[mLevel - 1]) {
mGameOver_mc.setTitle("You're Hired!");
mGameOver_mc.setText(mGameOverTexts[0]);
} else {
mGameOver_mc.setTitle("You're Fired!");
mGameOver_mc.setText(mGameOverTexts[1]);
}
mGameOver_mc.setButton("Play Again", this, this.startGame);
mGameOver_mc.gotoAndPlay("show");
}
function timeIsUp() {
if (!mbPlaying) {
return(true);
}
return(clock_mc.timeIsUp());
}
function getLevel() {
return(mLevel);
}
function init() {
goal_mc.showValue(mGoalPoints[mLevel - 1]);
goal_mc._visible = true;
task_mc.showValue(1);
level_mc.showValue(mLevel);
score_mc.showValue(0);
score_mc.center();
drink_st_mc.setNumberOfCups(1);
leader_mc.addObstacle(collision_mc);
leader_mc.setItem(item_mc);
teammate1_mc.addObstacle(collision_mc);
teammate2_mc.addObstacle(collision_mc);
mPoints = 0;
mPointType = "";
mPointSerie = 0;
rice1_mc.setType(1);
rice2_mc.setType(2);
rice3_mc.setType(3);
if (mLevel == 5) {
rice3_mc._visible = true;
} else {
rice3_mc._visible = false;
}
seafood1_mc.setType(1);
seafood2_mc.setType(2);
seafood3_mc.setType(3);
seafood3_mc._visible = false;
chief01_mc.setFoodStation(food_st_mc);
char01_mc.setFood(food1_mc);
char02_mc.setFood(food2_mc);
char03_mc.setFood(food3_mc);
char04_mc.setFood(food4_mc);
char01_mc.setPointer(mPointer1_mc);
char02_mc.setPointer(mPointer2_mc);
char03_mc.setPointer(mPointer3_mc);
char04_mc.setPointer(mPointer4_mc);
char01_mc.setID(1);
char02_mc.setID(2);
char03_mc.setID(3);
char04_mc.setID(4);
char01_mc.restart();
char02_mc.restart();
char03_mc.restart();
char04_mc.restart();
char03_mc.flip();
char04_mc.flip();
mbShowGoal = false;
mbShowExpert = false;
mStatusGoal_mc.gotoAndStop("goal");
leader_mc.releaseProduct();
balloon_st_mc.deselect();
balloon_st_mc.getBalloon();
souvenir_mc.deselect();
food_st_mc.getFood(1);
food_st_mc.getFood(2);
drink_st_mc.getCup();
drink_st_mc.getCup();
mClients = 0;
mbPlaying = true;
}
function clientArrive() {
if (mClients < mCustomersLimit[mLevel - 1]) {
mClients++;
return(true);
}
return(false);
}
function clientLeaveAngry(id) {
flyscore = mClientFlyscoreArray[id - 1];
flyscore.setValue(-500);
flyscore.setColor("red");
flyscore.hideTop();
flyscore._visible = true;
flyscore.gotoAndPlay(2);
addPoints(-500);
}
function giveTip(valor, id) {
flyscore = mClientFlyscoreArray[id - 1];
flyscore.hideTop();
flyscore.setValue(valor);
flyscore.setColor("green");
flyscore._visible = true;
flyscore.gotoAndPlay(2);
addPoints(valor);
}
function addPoints(pontos) {
mPoints = mPoints + pontos;
if (mPoints < 0) {
mPoints = 0;
}
score_mc.showValue(mPoints);
score_mc.center();
if (mPoints >= mExpertPoints[mLevel - 1]) {
if (!mbShowExpert) {
mbShowExpert = true;
mShowGoal_mc.gotoAndPlay("expert");
}
} else if (mPoints >= mGoalPoints[mLevel - 1]) {
mStatusGoal_mc.gotoAndStop("expert");
goal_mc.showValue(mExpertPoints[mLevel - 1]);
if (!mbShowGoal) {
mbShowGoal = true;
mShowGoal_mc.gotoAndPlay("goal");
}
}
}
function updateLeaderPoints(tipo, pontos) {
if (tipo == mPointType) {
mPointSerie++;
} else {
mPointType = tipo;
mPointSerie = 1;
}
pontos = pontos * mPointSerie;
addPoints(pontos);
showLeaderFlyscore(mPointType, mPointSerie, pontos);
}
function showLeaderFlyscore(tipo, contagem, valor) {
if (valor < 0) {
leaderflyscore_mc.setColor("red");
} else {
leaderflyscore_mc.setColor("green");
}
if (contagem > 1) {
leaderflyscore_mc.setTopString(tipo);
leaderflyscore_mc.setTopValue(contagem);
} else {
leaderflyscore_mc.hideTop();
}
leaderflyscore_mc.setValue(valor);
leaderflyscore_mc._x = leader_mc._x + mLeaderFlyX;
leaderflyscore_mc._y = leader_mc._y + mLeaderFlyY;
leaderflyscore_mc._visible = true;
leaderflyscore_mc.gotoAndPlay(2);
}
function updateTeam1Points() {
addPoints(100);
showTeam1Flyscore(100);
}
function updateTeam2Points() {
addPoints(250);
showTeam2Flyscore(250);
}
function showTeam1Flyscore(valor) {
team1flyscore_mc.setColor("green");
team1flyscore_mc.hideTop();
team1flyscore_mc.setValue(valor);
team1flyscore_mc._x = teammate1_mc._x + mTeam1FlyX;
team1flyscore_mc._y = teammate1_mc._y + mTeam1FlyY;
team1flyscore_mc._visible = true;
team1flyscore_mc.gotoAndPlay(2);
}
function showTeam2Flyscore(valor) {
team2flyscore_mc.setColor("green");
team2flyscore_mc.hideTop();
team2flyscore_mc.setValue(valor);
team2flyscore_mc._x = teammate2_mc._x + mTeam2FlyX;
team2flyscore_mc._y = teammate2_mc._y + mTeam2FlyY;
team2flyscore_mc._visible = true;
team2flyscore_mc.gotoAndPlay(2);
}
function processLeaderAction() {
if (mLeaderActionQueue.length == 0) {
return(undefined);
}
action = mLeaderActionQueue.shift();
switch (action.tipo) {
case MOVETO :
waypoint = null;
pos = new Object();
pos.x = leader_mc._x;
pos.y = leader_mc._y;
localToGlobal(pos);
if (bad_area1_mc.hitTest(pos.x, pos.y, true)) {
pos.x = action.x;
pos.y = action.y;
localToGlobal(pos);
if (bad_area2_mc.hitTest(pos.x, pos.y, true)) {
waypoint = waypoint1;
}
} else if (bad_area2_mc.hitTest(pos.x, pos.y, true)) {
pos.x = action.x;
pos.y = action.y;
localToGlobal(pos);
if (bad_area1_mc.hitTest(pos.x, pos.y, true)) {
waypoint = waypoint2;
}
}
if (waypoint != null) {
leader_mc.moveToPosition(waypoint.x, waypoint.y);
leader_mc.doubleMove(action.x, action.y);
action2 = new Object();
action2.tipo = WAITMOVE;
mLeaderActionQueue.unshift(action2);
} else {
leader_mc.moveToPosition(action.x, action.y);
action.tipo = WAITMOVE;
mLeaderActionQueue.unshift(action);
}
return;
case GET :
if (!leader_mc.hasProduct()) {
leader_mc.setProduct(action.product);
if (action.product == "drink") {
drink_st_mc.getCup();
}
}
return;
case GETRICE :
if (!leader_mc.hasProduct()) {
leader_mc.setProduct("rice" + action.rice);
leader_mc.setRice(action.rice);
chief02_mc.prepareRice(mRiceArray[action.rice - 1]);
}
return;
case MAKEFOOD :
if (leader_mc.hasRice()) {
rice = leader_mc.getRice();
leader_mc.releaseProduct();
chief01_mc.prepareFood((("food" + rice) + "0") + action.seafood);
mSeaFoodArray[action.seafood - 1].work();
}
return;
case GETFOOD :
if (!leader_mc.hasProduct()) {
food = food_st_mc.getFood(action.food);
leader_mc.setProduct(food);
}
return;
case GIVE :
cliente = mClientArray[action.client - 1];
if (cliente.hasMoney()) {
valor = cliente.getMoney();
updateLeaderPoints("MONEY", valor);
} else {
produto = leader_mc.getProduct();
if ((!leader_mc.hasProduct()) || (cliente.getPedido() == "menu")) {
produto = "menu";
}
if (cliente.recebePedido(produto)) {
if (produto == "menu") {
updateLeaderPoints("TAKE", 5);
} else {
leader_mc.releaseProduct();
updateLeaderPoints("DELIVER", 10);
}
}
}
return;
case TRASH :
if (leader_mc.hasProduct()) {
leader_mc.releaseProduct();
trash_mc.trash();
}
return;
case MAKEDRINK :
drink_st_mc.fillCup();
return;
case WAITMOVE :
if (leader_mc.isMoving()) {
mLeaderActionQueue.unshift(action);
}
return;
case UNPOINT :
if ((action.param == 1) || (action.param == 2)) {
action.movie.hidePointer(action.param);
} else {
action.movie.hidePointer();
}
processLeaderAction();
}
}
function processTeam1Action() {
action = mTeam1ActionQueue.shift();
switch (action.tipo) {
case MOVETO :
waypoint = null;
pos = new Object();
pos.x = teammate1_mc._x;
pos.y = teammate1_mc._y;
localToGlobal(pos);
if (bad_area3_mc.hitTest(pos.x, pos.y, true)) {
pos.x = action.x;
pos.y = action.y;
localToGlobal(pos);
if (bad_area4_mc.hitTest(pos.x, pos.y, true)) {
waypoint = waypoint3;
}
} else if (bad_area4_mc.hitTest(pos.x, pos.y, true)) {
pos.x = action.x;
pos.y = action.y;
localToGlobal(pos);
if (bad_area3_mc.hitTest(pos.x, pos.y, true)) {
waypoint = waypoint4;
}
}
if (waypoint != null) {
teammate1_mc.moveToPosition(waypoint.x, waypoint.y);
teammate1_mc.doubleMove(action.x, action.y);
action2 = new Object();
action2.tipo = WAITMOVE;
mTeam1ActionQueue.unshift(action2);
} else {
teammate1_mc.moveToPosition(action.x, action.y);
action.tipo = WAITMOVE;
mTeam1ActionQueue.unshift(action);
}
return;
case GET :
if (!teammate1_mc.hasProduct()) {
souvenir_mc.getSouvenir();
teammate1_mc.setProduct("souvenir");
}
return;
case GIVE :
cliente = mClientArray[action.client - 1];
if (cliente.recebePedido("souvenir")) {
teammate1_mc.releaseProduct();
updateTeam1Points();
}
return;
case WAITMOVE :
if (!teammate1_mc.isMoving()) {
break;
}
mTeam1ActionQueue.unshift(action);
}
}
function processTeam2Action() {
action = mTeam2ActionQueue.shift();
switch (action.tipo) {
case MOVETO :
waypoint = null;
pos = new Object();
pos.x = teammate2_mc._x;
pos.y = teammate2_mc._y;
localToGlobal(pos);
if (bad_area3_mc.hitTest(pos.x, pos.y, true)) {
pos.x = action.x;
pos.y = action.y;
localToGlobal(pos);
if (bad_area4_mc.hitTest(pos.x, pos.y, true)) {
waypoint = waypoint3;
}
} else if (bad_area4_mc.hitTest(pos.x, pos.y, true)) {
pos.x = action.x;
pos.y = action.y;
localToGlobal(pos);
if (bad_area3_mc.hitTest(pos.x, pos.y, true)) {
waypoint = waypoint4;
}
}
if (waypoint != null) {
teammate2_mc.moveToPosition(waypoint.x, waypoint.y);
teammate2_mc.doubleMove(action.x, action.y);
action2 = new Object();
action2.tipo = WAITMOVE;
mTeam2ActionQueue.unshift(action2);
} else {
teammate2_mc.moveToPosition(action.x, action.y);
action.tipo = WAITMOVE;
mTeam2ActionQueue.unshift(action);
}
return;
case GET :
if ((!teammate2_mc.hasProduct()) && (balloon_st_mc.hasBalloon())) {
balloon_st_mc.getBalloon();
teammate2_mc.setProduct("balloon");
}
return;
case GIVE :
cliente = mClientArray[action.client - 1];
if (cliente.recebePedido("balloon")) {
teammate2_mc.releaseProduct();
updateTeam2Points();
}
return;
case WAITMOVE :
if (!teammate2_mc.isMoving()) {
break;
}
mTeam2ActionQueue.unshift(action);
}
}
function highlightOff() {
spice_st_mc.highlight(false);
dessert_st_mc.highlight(false);
drink_st_mc.highlight(false);
rice1_mc.highlight(false);
rice2_mc.highlight(false);
rice3_mc.highlight(false);
food_st_mc.highlight(false, 1);
food_st_mc.highlight(false, 2);
seafood1_mc.highlight(false);
seafood2_mc.highlight(false);
seafood3_mc.highlight(false);
trash_mc.highlight(false);
souvenir_mc.highlight(false);
balloon_st_mc.highlight(false);
char01_mc.highlight(false);
char02_mc.highlight(false);
char03_mc.highlight(false);
char04_mc.highlight(false);
}
function entregaBalao(client, x, y) {
var _local1 = new Object();
_local1.tipo = GET;
mTeam2ActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = x;
_local1.y = y;
mTeam2ActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GIVE;
_local1.client = client;
mTeam2ActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = mTeam2X;
_local1.y = mTeam2Y;
mTeam2ActionQueue.push(_local1);
}
function entregaSouvenir(client, x, y) {
var _local1 = new Object();
_local1.tipo = GET;
mTeam1ActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = x;
_local1.y = y;
mTeam1ActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GIVE;
_local1.client = client;
mTeam1ActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = mTeam1X;
_local1.y = mTeam1Y;
mTeam1ActionQueue.push(_local1);
}
stop();
var mbInit = false;
var mLevel = 1;
var mbStartLevel = true;
var mPoints = 0;
var mTaskPoints = 0;
var mPointType = "";
var mPointSerie = 0;
var waypoint1 = new Object();
waypoint1.x = -154;
waypoint1.y = -13;
var waypoint2 = new Object();
waypoint2.x = 154;
waypoint2.y = -13;
var waypoint3 = new Object();
waypoint3.x = -254;
waypoint3.y = 192;
var waypoint4 = new Object();
waypoint4.x = 253;
waypoint4.y = 192;
var mGoalPoints = new Array(500, 1000, 1200, 2000, 2500);
var mExpertPoints = new Array(700, 1500, 1700, 2500, 3000);
var mRiceArray = new Array(rice1_mc, rice2_mc, rice3_mc);
var mSeaFoodArray = new Array(seafood1_mc, seafood2_mc, seafood3_mc);
var mFoodArray = new Array(food1_mc, food2_mc, food3_mc, food4_mc);
var mClientArray = new Array(char01_mc, char02_mc, char03_mc, char04_mc);
var mClientFlyscoreArray = new Array(flyscore1_mc, flyscore2_mc, flyscore3_mc, flyscore4_mc);
var mLeaderActionQueue = new Array();
var mTeam1ActionQueue = new Array();
var mTeam2ActionQueue = new Array();
var MOVETO = 1;
var GET = 2;
var GIVE = 3;
var MAKEDRINK = 4;
var WAITMOVE = 5;
var TRASH = 6;
var GETRICE = 7;
var MAKEFOOD = 8;
var GETFOOD = 9;
var UNPOINT = 10;
food1_mc._visible = false;
food2_mc._visible = false;
food3_mc._visible = false;
food4_mc._visible = false;
leaderflyscore_mc._visible = false;
team1flyscore_mc._visible = false;
team2flyscore_mc._visible = false;
var mLeaderFlyX = -50;
var mLeaderFlyY = -100;
var mTeam1FlyX = -50;
var mTeam1FlyY = -100;
var mTeam2FlyX = -50;
var mTeam2FlyY = -100;
bad_area3_mc._visible = false;
bad_area4_mc._visible = false;
var mTeam1X = teammate1_mc._x;
var mTeam1Y = teammate1_mc._y;
var mTeam2X = teammate2_mc._x;
var mTeam2Y = teammate2_mc._y;
var mbShowGoal = false;
var mbShowExpert = false;
var mbPlaying = false;
i = 0;
while (i < 4) {
mClientFlyscoreArray[i]._visible = false;
i++;
}
mPointer1_mc._visible = false;
mPointer2_mc._visible = false;
mPointer3_mc._visible = false;
mPointer4_mc._visible = false;
item_mc._visible = false;
var mLevelText = new Array("\tYour task is to run one of L.A.'s best sushi bars in the heart of Little Tokyo. Serve your customers quickly and efficiently throughout the first five game levels to see if you are worthy of becoming The Apprentice.\n\tWhen customers appear, click them to give them a menu. After they place their order, pick up the appropriate item on the counter and then click the customer. Don't forget to collect the money once the customer leaves!\n\nTip: Get rid of wrong items by throwing them away in the garbage can in the rear.", "\tSometimes customers want more than one item. If they order umbrella or balloon souvenirs, you'll need to select the appropriate item and then click the customer.\n\nTip: Inflate a balloon by clicking the balloon pump. Then click on the balloon and then the customer to have it delivered.", "\tTo make a sushi order, select the appropriate rice and then select the necessary fish. The sushi chef will assemble the sushi plate for you to serve to the customer.\n\nTip: Keep an eye on each customer's mood bar. If it empties, the customer will walk out without paying!", "\tLooks like you're up to speed! This time, customers who order sushi may also want soy sauce as well.\n\nTip: The more identical actions you perform in a row, the more points you will earn.", "\tTime to put it all together: Your last chance to impress Mr. Trump. You have one more chance to impress Mr. Trump. If you win, your life will be filled with fortune, fame, and happiness. Lose, and you'll be fired.\n\tWe're expecting the largest crowds yet, and they're going to be very demanding. You'll need to be as efficient as possible to get through this shift!");
var mLoseTexts = new Array("I don't want any quitters on my team. Get back in the game.", "There's no way around it. You failed. Do you have the guts to try again?", "I'm not sure you have what it takes. Are you tough enough to become the next Apprentice?");
var mWinTexts = new Array("Impressive performance. Can you do it again?", "You have real potential. Keep up the good work.", "If you keep this up, you're going to make my hiring decision very easy.");
var mGameOverTexts = new Array("I couldn't have done better myself! Now, to make sure that you remain at the top of your game, I suggest you go buy the FULL VERSION of The Apprentice: Los Angeles game, complete with 40 levels, 4 unique LA settings, and nail-biting boardroom showdowns. Ivanka, Don Jr., and I will be on hand to monitor your progress.\n\nCongratulations!\nThe Donald", "The only thing I can suggest is that you immediately go buy the FULL VERSION of The Apprentice: Los Angeles game, complete with 40 levels, 4 unique LA settings, and nail-biting boardroom showdowns. Ivanka, Don Jr., and I will be on hand to monitor your progress.\n\nThe Donald");
var mCustomersLimit = new Array(4, 6, 8, 12, 20);
var mClients = 0;
this.onEnterFrame = function () {
if (mbStartLevel) {
highlightOff();
mbStartLevel = false;
mLevelStart_mc.setTitle("" + mLevel);
mLevelStart_mc.setGoal(mGoalPoints[mLevel - 1]);
mLevelStart_mc.setText(mLevelText[mLevel - 1]);
mLevelStart_mc.setExpert(mExpertPoints[mLevel - 1]);
mLevelStart_mc.setButton("Start!", this, this.startLevel);
mLevelStart_mc.gotoAndPlay("show");
goal_mc._visible = false;
task_mc.showValue(1);
level_mc.showValue(1);
score_mc.showValue(0);
score_mc.center();
return(undefined);
}
if (mbInit) {
init();
mbInit = false;
clock_mc.resetClock();
clock_mc.startClock();
}
if (mbPlaying) {
processLeaderAction();
processTeam1Action();
processTeam2Action();
if (clock_mc.timeIsUp() || (mClients >= mCustomersLimit[mLevel - 1])) {
fim = true;
i = 0;
while (i < 4) {
cliente = mClientArray[i];
if (cliente.hasMoney() || (cliente.mbAtivo)) {
fim = false;
}
i++;
}
if (fim) {
endLevel();
}
}
if ((teammate1_mc._y < teammate2_mc._y) && (teammate1_mc.getDepth() > teammate2_mc.getDepth())) {
teammate1_mc.swapDepths(teammate2_mc);
}
if ((teammate2_mc._y < teammate1_mc._y) && (teammate2_mc.getDepth() > teammate1_mc.getDepth())) {
teammate1_mc.swapDepths(teammate2_mc);
}
}
};
var mouseListener = new Object();
mouseListener.onMouseMove = function () {
if (!mbPlaying) {
return(undefined);
}
pos = new Object();
pos.x = _xmouse;
pos.y = _ymouse;
localToGlobal(pos);
highlightOff();
if (spice_mask_mc.hitTest(pos.x, pos.y, true)) {
spice_st_mc.highlight(true);
} else if (dessert_mask_mc.hitTest(pos.x, pos.y, true)) {
dessert_st_mc.highlight(true);
} else if (drink_mask_mc.hitTest(pos.x, pos.y, true)) {
drink_st_mc.highlight(true);
} else if (empty_balloon_mask_mc.hitTest(pos.x, pos.y, true)) {
balloon_st_mc.highlight(true);
} else if (full_balloon_mask_mc.hitTest(pos.x, pos.y, true)) {
if (balloon_st_mc.hasBalloon()) {
balloon_st_mc.highlight(true);
}
} else if (souvenir_mask_mc.hitTest(pos.x, pos.y, true)) {
souvenir_mc.highlight(true);
} else if (trash_mask_mc.hitTest(pos.x, pos.y, true)) {
trash_mc.highlight(true);
} else if (rice1_mask_mc.hitTest(pos.x, pos.y, true) && (!rice1_mc.isWorking())) {
rice1_mc.highlight(true);
} else if (rice2_mask_mc.hitTest(pos.x, pos.y, true) && (!rice2_mc.isWorking())) {
rice2_mc.highlight(true);
} else if ((rice3_mask_mc.hitTest(pos.x, pos.y, true) && (!rice3_mc.isWorking())) && rice3_mc._visible) {
rice3_mc.highlight(true);
} else if (seafood1_mask_mc.hitTest(pos.x, pos.y, true)) {
seafood1_mc.highlight(true);
} else if (seafood2_mask_mc.hitTest(pos.x, pos.y, true)) {
seafood2_mc.highlight(true);
} else if (seafood3_mask_mc.hitTest(pos.x, pos.y, true) && seafood3_mc._visible) {
seafood3_mc.highlight(true);
} else if (food_st_mask1_mc.hitTest(pos.x, pos.y, true) && food_st_mc.hasFood(1)) {
food_st_mc.highlight(true, 1);
} else if (food_st_mask2_mc.hitTest(pos.x, pos.y, true) && food_st_mc.hasFood(2)) {
food_st_mc.highlight(true, 2);
} else if (char02_mc.myHitTest(pos.x, pos.y)) {
char02_mc.highlight(true);
} else if (char01_mc.myHitTest(pos.x, pos.y)) {
char01_mc.highlight(true);
} else if (char03_mc.myHitTest(pos.x, pos.y)) {
char03_mc.highlight(true);
} else if (char04_mc.myHitTest(pos.x, pos.y)) {
char04_mc.highlight(true);
}
};
mouseListener.onMouseUp = function () {
if (!mbPlaying) {
return(undefined);
}
pos = new Object();
pos.x = _xmouse;
pos.y = _ymouse;
localToGlobal(pos);
if (spice_mask_mc.hitTest(pos.x, pos.y, true)) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = -80;
_local1.y = 110;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GET;
_local1.product = "spice";
mLeaderActionQueue.push(_local1);
spice_st_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = spice_st_mc;
mLeaderActionQueue.push(_local1);
} else if (dessert_mask_mc.hitTest(pos.x, pos.y, true)) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = -5;
_local1.y = 110;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GET;
_local1.product = "dessert";
mLeaderActionQueue.push(_local1);
dessert_st_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = dessert_st_mc;
mLeaderActionQueue.push(_local1);
} else if (drink_mask_mc.hitTest(pos.x, pos.y, true)) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = 74;
_local1.y = 110;
mLeaderActionQueue.push(_local1);
if (!drink_st_mc.isWorking()) {
if (!drink_st_mc.hasCupFull()) {
_local1 = new Object();
_local1.tipo = MAKEDRINK;
mLeaderActionQueue.push(_local1);
} else {
_local1 = new Object();
_local1.tipo = GET;
_local1.product = "drink";
mLeaderActionQueue.push(_local1);
}
}
drink_st_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = drink_st_mc;
mLeaderActionQueue.push(_local1);
} else if (empty_balloon_mask_mc.hitTest(pos.x, pos.y, true)) {
if (!balloon_st_mc.hasBalloon()) {
if ((!balloon_st_mc.isWorking()) && (mTeam2ActionQueue.length == 0)) {
balloon_st_mc.generateBalloon();
}
} else if (!balloon_st_mc.isSelected()) {
balloon_st_mc.select();
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
}
} else if (full_balloon_mask_mc.hitTest(pos.x, pos.y, true)) {
if (balloon_st_mc.hasBalloon()) {
if (!balloon_st_mc.isSelected()) {
balloon_st_mc.select();
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
}
}
} else if (souvenir_mask_mc.hitTest(pos.x, pos.y, true)) {
souvenir_mc.select();
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
} else if (trash_mask_mc.hitTest(pos.x, pos.y, true)) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = 189;
_local1.y = -141;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = TRASH;
mLeaderActionQueue.push(_local1);
trash_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = trash_mc;
mLeaderActionQueue.push(_local1);
} else if (rice1_mask_mc.hitTest(pos.x, pos.y, true) && (!rice1_mc.isWorking())) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = 154;
_local1.y = -100;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GETRICE;
_local1.rice = 1;
mLeaderActionQueue.push(_local1);
rice1_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = rice1_mc;
mLeaderActionQueue.push(_local1);
} else if (rice2_mask_mc.hitTest(pos.x, pos.y, true) && (!rice2_mc.isWorking())) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = 154;
_local1.y = -100;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GETRICE;
_local1.rice = 2;
mLeaderActionQueue.push(_local1);
rice2_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = rice2_mc;
mLeaderActionQueue.push(_local1);
} else if ((rice3_mask_mc.hitTest(pos.x, pos.y, true) && (!rice3_mc.isWorking())) && rice3_mc._visible) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = 154;
_local1.y = -100;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GETRICE;
_local1.rice = 3;
mLeaderActionQueue.push(_local1);
rice3_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = rice3_mc;
mLeaderActionQueue.push(_local1);
} else if (seafood1_mask_mc.hitTest(pos.x, pos.y, true)) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = -154;
_local1.y = -100;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = MAKEFOOD;
_local1.seafood = 1;
mLeaderActionQueue.push(_local1);
seafood1_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = seafood1_mc;
mLeaderActionQueue.push(_local1);
} else if (seafood2_mask_mc.hitTest(pos.x, pos.y, true)) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = -154;
_local1.y = -100;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = MAKEFOOD;
_local1.seafood = 2;
mLeaderActionQueue.push(_local1);
seafood2_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = seafood2_mc;
mLeaderActionQueue.push(_local1);
} else if (seafood3_mask_mc.hitTest(pos.x, pos.y, true) && seafood3_mc._visible) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = -154;
_local1.y = -100;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = MAKEFOOD;
_local1.seafood = 3;
mLeaderActionQueue.push(_local1);
seafood3_mc.showPointer();
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = seafood3_mc;
mLeaderActionQueue.push(_local1);
} else if (food_st_mask1_mc.hitTest(pos.x, pos.y, true) && food_st_mc.hasFood(1)) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = -41;
_local1.y = -23;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GETFOOD;
_local1.food = 1;
mLeaderActionQueue.push(_local1);
food_st_mc.showPointer(1);
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = food_st_mc;
_local1.param = 1;
mLeaderActionQueue.push(_local1);
} else if (food_st_mask2_mc.hitTest(pos.x, pos.y, true) && food_st_mc.hasFood(2)) {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = 46;
_local1.y = -23;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GETFOOD;
_local1.food = 2;
mLeaderActionQueue.push(_local1);
food_st_mc.showPointer(2);
_local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = food_st_mc;
_local1.param = 2;
mLeaderActionQueue.push(_local1);
} else if (char02_mc.myHitTest(pos.x, pos.y)) {
if (souvenir_mc.isSelected() && (char02_mc.getPedido() == "souvenir")) {
entregaSouvenir(2, -278, 61);
} else if (balloon_st_mc.isSelected() && (char02_mc.getPedido() == "balloon")) {
entregaBalao(2, -278, 61);
} else {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = -141;
_local1.y = 10;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GIVE;
_local1.client = 2;
mLeaderActionQueue.push(_local1);
}
char02_mc.showPointer();
var _local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = char02_mc;
mLeaderActionQueue.push(_local1);
} else if (char01_mc.myHitTest(pos.x, pos.y)) {
if (souvenir_mc.isSelected() && (char01_mc.getPedido() == "souvenir")) {
entregaSouvenir(1, -254, 137);
} else if (balloon_st_mc.isSelected() && (char01_mc.getPedido() == "balloon")) {
entregaBalao(1, -254, 137);
} else {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = -113;
_local1.y = 81;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GIVE;
_local1.client = 1;
mLeaderActionQueue.push(_local1);
}
char01_mc.showPointer();
var _local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = char01_mc;
mLeaderActionQueue.push(_local1);
} else if (char03_mc.myHitTest(pos.x, pos.y)) {
if (souvenir_mc.isSelected() && (char03_mc.getPedido() == "souvenir")) {
entregaSouvenir(3, 253, 128);
} else if (balloon_st_mc.isSelected() && (char03_mc.getPedido() == "balloon")) {
entregaBalao(3, 253, 128);
} else {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = 125;
_local1.y = 68;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GIVE;
_local1.client = 3;
mLeaderActionQueue.push(_local1);
}
char03_mc.showPointer();
var _local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = char03_mc;
mLeaderActionQueue.push(_local1);
} else if (char04_mc.myHitTest(pos.x, pos.y)) {
if (souvenir_mc.isSelected() && (char04_mc.getPedido() == "souvenir")) {
entregaSouvenir(4, 292, 56);
} else if (balloon_st_mc.isSelected() && (char04_mc.getPedido() == "balloon")) {
entregaBalao(4, 292, 56);
} else {
if (souvenir_mc.isSelected()) {
souvenir_mc.deselect();
}
if (balloon_st_mc.isSelected()) {
balloon_st_mc.deselect();
}
var _local1 = new Object();
_local1.tipo = MOVETO;
_local1.x = 152;
_local1.y = -5;
mLeaderActionQueue.push(_local1);
_local1 = new Object();
_local1.tipo = GIVE;
_local1.client = 4;
mLeaderActionQueue.push(_local1);
}
char04_mc.showPointer();
var _local1 = new Object();
_local1.tipo = UNPOINT;
_local1.movie = char04_mc;
mLeaderActionQueue.push(_local1);
}
};
Mouse.addListener(mouseListener);
Symbol 554 Button
on (release) {
getURL ("http://tinyurl.com/2ev84h", "_blank");
}
Symbol 559 Button
on (release) {
getURL ("http://www.legacygames.com/softwrapgames/The%20Apprentice%20Los%20Angeles%20Setup.exe", "_blank");
}
Symbol 564 Button
on (release) {
getURL ("mailto:a_friend?subject=Found%20a%20great%20game%20for%20you%20to%20play%2E &body=Will%20you%20be%20the%20next%20Apprentice%3F%0A%0DStart%20your%20climb%20up%20the%20corporate%20ladder%21%20See%20if%20you%20can%20keep%20your%20cool%20and%20your%20customers%20as%20you%20race%20to%20serve%20your%20product%2E%20Prove%20to%20The%20Donald%20that%20you%20have%20what%20it%20takes%20to%20be%20the%20next%20Apprentice%2E%0A%0DYour%20friend%20thought%20you%27d%20enjoy%20this%20free%20online%20game%20from%20Legacy%20Interactive%2E%20Go%20to%20www.apprenticegames.com/game.html", "_blank");
}
Symbol 569 Button
on (release) {
gotoAndStop (3);
}