Frame 1
var total = this.getBytesTotal();
var loaded = this.getBytesLoaded();
var percent = Math.round((loaded * 100) / total);
if (percent == 100) {
gotoAndStop ("start");
}
System.security.allowDomain("*");
mochi.MochiServices.connect("ceac6ae686f16149");
Frame 3
gotoAndPlay (1);
Frame 4
fscommand ("allowscale", true);
fscommand ("showmenu", false);
Mouse.hide();
Frame 5
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function shuffle(theArray) {
var _local3 = [];
var _local4 = theArray.length;
i = 0;
while (i < _local4) {
var _local1 = randRange(0, theArray.length - 1);
_local3.push(theArray[_local1]);
theArray.splice(_local1, 1);
i++;
}
theArray = _local3;
return(theArray);
}
function showTime() {
if (gamePlaying) {
gameTime++;
min = int(gameTime / 60);
sec = gameTime - (60 * min);
if (sec >= 60) {
sec = 0;
min = min + 1;
}
if (min < 10) {
min_txt = "0" + min;
} else {
min_txt = min;
}
if (sec < 10) {
sec_txt = "0" + sec;
} else {
sec_txt = sec;
}
}
score_mc.timer.text = (min_txt + ":") + sec_txt;
}
function characterDisplay() {
if (gamePlaying) {
timeScoreBonus--;
var _local3 = randRange(0, waitressDisplayState.length);
waitress.gotoAndPlay(waitressDisplayState[_local3]);
i = 0;
while (i < level) {
var _local1 = randRange(0, characterDisplayState.length);
var _local2 = guest_mc["mc" + i];
_local2.gotoAndPlay(characterDisplayState[_local1]);
i++;
}
}
}
function dishXPos(id) {
return(int(((initCharacterX - 20) + (dishProvideSpace / 2)) + ((90 + dishProvideSpace) * id)));
}
var gameTime = 0;
var waitressDisplayState = ["idle1", "idle2", "eyeblink", "eyeleft", "eyeright", "sfx"];
var characterDisplayState = ["idle", "eyeblink", "eyeleft", "eyeright"];
displayInterval = setInterval(characterDisplay, 2000);
var introText = new Array();
introText[0] = "Hi ya, doll. Ready to work out that memory muscle of yours? Remember, the faster you can serve the customers correctly, the more electravolts you'll earn.";
introText[1] = "Boy, am I glad to see you, doll. Ready to bulk up your memory muscle?";
introText[2] = "Where you been, doll? My dogs are aching from covering your shifts!";
introText[3] = "Hello, doll. Hope you can impress me with your visual memory vigor.";
introText[4] = "Hi ya, doll. You can boost your memory skills one Blue Plate Special at a time.";
introText[5] = "Wakie, wakie! Time to fix the eggs and bac-ey. It's never too early to work on your memory mastery.";
introText[6] = "Testing your Brain Power, eh, doll? Get on in there and show 'em your visual memory smarts.";
introText[7] = "Hi ya, doll. Here's the deal. Customers come in to place their orders. Click \"Ready\" or wait for the food to appear. Then double-click on the food plate that matches each customer's order or drag the plates to the customers to serve them. Got it?";
var LS_Message = new Array();
LS_Message[0] = "Be more focused and speed things up and you're sure to improve.$$";
LS_Message[1] = "Tips are sure to roll in now that you're improving your memory.$$";
LS_Message[2] = "Your memory skills are better than an All-You-Can-Eat Blue Plate Special!$$";
LS_Message[3] = "With a little more experience, you'll get better. Play again?$$";
LS_Message[4] = "Put on a smile, get back out there and play again.$$";
var LS_Complement = new Array();
LS_Complement[0] = "Try saying the orders out loud to help memorize them.";
LS_Complement[1] = "It might help you memorize the orders if you imagine what the foods taste and smell like.";
LS_Complement[2] = "Try memorizing the both the shape and colors of the foods.";
LS_Complement[3] = "See if it helps you to memorize just the first letter of each food order.";
var cusomerNumArr = new Array(2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8);
var distractorDishes = new Array(0, 0, 0, 0, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4);
var memoryTimeArr = new Array(5, 5, 5, 5, 5, 4.5, 4.5, 4.5, 4.5, 4.5, 4, 4, 4, 4, 4, 3.5, 3.5, 3.5, 3.5, 3.5, 3, 3, 3, 3, 3, 2.5, 2.5, 2.5, 2.5, 2.5);
function loadCharacter() {
score_mc.playtime.text = "Level: " + level;
gamePlaying = true;
timeScoreBonus = 50;
score_mc.score_pause._visible = false;
askingFoodArr = [];
matchTypeArr = [];
num_of_char = cusomerNumArr[level - 1];
totalDish = totalDish + num_of_char;
var _local7 = (characterShowRange - (num_of_char * maxCharacterWidth)) / num_of_char;
i = 0;
while (i < num_of_char) {
var _local6 = randRange(1, 15);
askingFoodArr.push("food" + _local6);
matchTypeArr[i] = 0;
var _local5 = randRange(1, 8);
var _local1 = guest_mc.attachMovie("character" + _local5, "mc" + i, guest_mc.getNextHighestDepth());
var _local3 = food_mc.attachMovie("placemat" + randRange(1, 4), "pm" + i, food_mc.getNextHighestDepth());
var _local2 = guest_mc.attachMovie("food_asking", "bb" + i, guest_mc.getNextHighestDepth());
var _local4 = _local2.food.attachMovie(askingFoodArr[i], "askingFood" + i, _local2.food.getNextHighestDepth());
_local3.id = i;
_local3.havingFood = false;
_local3.t = askingFoodArr[i];
_local1._x = (initCharacterX + (_local7 / 2)) + ((maxCharacterWidth + _local7) * i);
_local1._y = initCharacterY - _local1._height;
_local3._x = (_local1._x + (_local1._width / 2)) - (_local3._width / 2);
_local3._y = initCharacterY - 30;
_local2._x = _local1._x - 40;
_local2._y = (_local1._y - _local2._height) - 20;
_local4._x = (_local2._width / 2) - (_local4._width / 2);
_local4._y = (_local2._height / 3) - (_local4._height / 2);
new mx.transitions.Tween(_local1, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
i++;
}
bell_mc._visible = true;
var _local8 = new Number(memoryTimeArr[level - 1]);
showBellInterval = setInterval(loadDish, _local8 * 1000);
}
function loadDish() {
clearInterval(showBellInterval);
bell_mc._visible = false;
hideAskingFood();
putItem = 0;
var _local3 = askingFoodArr;
if (distractorDishes[level - 1] > 0) {
i = 0;
while (i < distractorDishes[level - 1]) {
_local3.push("food" + randRange(1, 15));
i++;
}
}
providingFoodArr = [];
providingFoodArr = shuffle(_local3);
num_of_dish = providingFoodArr.length;
dishProvideSpace = (characterShowRange - (num_of_dish * 90)) / num_of_dish;
i = 0;
while (i < num_of_dish) {
var _local1 = food_mc.attachMovie("food_dish", "d" + i, food_mc.getNextHighestDepth());
var _local2 = _local1.food.attachMovie(providingFoodArr[i], "f" + i, _local1.food.getNextHighestDepth());
_local1._x = dishXPos(i);
_local1._y = 530;
_local2._x = (_local1._width / 2) - (_local2._width / 2);
_local2._y = ((_local1._height / 2) - _local2._height) + 10;
_local1.id = i;
_local1.t = providingFoodArr[i];
dragging(_local1);
i++;
}
}
function dragging(mc) {
var cX;
var cY;
var isHit = false;
var cPlacemat;
mc.onPress = function () {
if (gamePlaying) {
matchTypeArr[cPlacemat.id] = 0;
isHit = false;
cPlacemat = null;
cX = dishXPos(mc.id);
cY = 530;
startDrag (this);
if (this._y != cY) {
putItem--;
}
i = 0;
while (i < num_of_char) {
if (mc.hitTest(food_mc["pm" + i])) {
food_mc["pm" + i].havingFood = false;
}
i++;
}
}
};
mc.onRelease = (mc.onReleaseOutside = function () {
if (gamePlaying) {
stopDrag();
i = 0;
while (i < num_of_char) {
if (mc.plate.dishHitTest_mc.hitTest(food_mc["pm" + i]) && (!food_mc["pm" + i].havingFood)) {
if (!isHit) {
cPlacemat = food_mc["pm" + i];
food_mc["pm" + i].havingFood = true;
isHit = true;
}
}
i++;
}
if (isHit) {
if (this.t == cPlacemat.t) {
matchTypeArr[cPlacemat.id] = 1;
} else {
matchTypeArr[cPlacemat.id] = 0;
}
this._x = cPlacemat._x;
this._y = cPlacemat._y;
putItem++;
putPlateSound.start();
if (putItem == num_of_char) {
characterEating();
}
} else {
var _local2 = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.None.easeIn, mc._x, cX, 0.2, true);
_local2 = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.None.easeIn, mc._y, cY, 0.2, true);
}
}
});
}
function characterEating() {
gamePlaying = false;
score_mc.score_pause._visible = true;
correctDish = 0;
i = 0;
while (i < num_of_char) {
var _local1 = guest_mc["mc" + i];
if (matchTypeArr[i] == 1) {
_local1.gotoAndPlay("eating");
correctDish++;
} else {
_local1.gotoAndPlay("facefrown");
}
i++;
}
if (correctDish == num_of_char) {
eatSound.start();
waitress.gotoAndPlay("facebigsmile");
} else {
incorrectSound.start();
waitress.gotoAndPlay("facefrown");
}
allCorrect = allCorrect + correctDish;
eatingInterval = setInterval(showResult, 1500);
}
function showResult() {
clearInterval(eatingInterval);
i = 0;
while (i < num_of_char) {
var _local2 = guest_mc["bb" + i];
var _local3 = food_mc["pm" + i];
_local2._visible = true;
if (matchTypeArr[i] == 1) {
var _local1 = food_mc.attachMovie("correct_ico", "ico" + i, food_mc.getNextHighestDepth());
} else {
var _local1 = food_mc.attachMovie("wrong_ico", "ico" + i, food_mc.getNextHighestDepth());
}
_local1._x = _local3._x + 25;
_local1._y = _local3._y - 10;
new mx.transitions.Tween(_local1, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
i++;
}
if (correctDish > 0) {
score = score + Math.round((((((timeScoreBonus * level) * 10) / 100) + bellBonus) * correctDish) / num_of_dish);
}
removeCharacterInterval = setInterval(removeCharacter, 1500);
}
function newLevel() {
clearInterval(nextLevelInterval);
if (level <= 30) {
bellBonus = 0;
level++;
loadCharacter();
} else {
end_game();
}
}
function removeCharacter() {
clearInterval(removeCharacterInterval);
i = 0;
while (i < num_of_char) {
remove_movie(food_mc["pm" + i]);
remove_movie(guest_mc["bb" + i]);
remove_movie(guest_mc["mc" + i]);
i++;
}
i = 0;
while (i < num_of_dish) {
remove_movie(food_mc["d" + i]);
remove_movie(food_mc["ico" + i]);
i++;
}
if (correctDish == num_of_char) {
if (lightBulb < 3) {
consecutiveSupply++;
if (consecutiveSupply == 5) {
consecutiveSupply = 0;
lightBulb++;
showLightBulb();
}
}
} else {
consecutiveSupply = 0;
lightBulb--;
showLightBulb();
}
if (lightBulb == 0) {
end_game();
} else {
nextLevelInterval = setInterval(newLevel, 1500);
}
}
function remove_movie(mc) {
var _local1 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.7, true);
_local1.onMotionFinished = function () {
removeMovieClip(mc);
};
}
function hideAskingFood() {
i = 0;
while (i < num_of_char) {
var _local1 = new mx.transitions.Tween(guest_mc["bb" + i], "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.4, true);
_local1.onMotionFinished = function () {
guest_mc["bb" + i]._visible = false;
};
i++;
}
}
function showLightBulb() {
i = 1;
while (i <= 3) {
if (i > lightBulb) {
lightbulb_mc["b" + i].gotoAndStop(2);
} else {
lightbulb_mc["b" + i].gotoAndStop(1);
}
i++;
}
}
function end_game() {
clearInterval(timeInterval);
gamePlaying = false;
score_mc.score_pause._visible = false;
end_mc._y = 0;
end_mc.next_btn._visible = true;
end_mc.end_txt.text = LS_Message[randRange(0, 4)];
end_mc.score_txt.text = Math.round((score + (level * 10)) + ((((totalDish - allCorrect) / totalDish) * 5) * level));
end_mc.time_txt.text = (min_txt + ":") + sec_txt;
end_mc.error_txt.text = totalDish - allCorrect;
end_mc.level_txt.text = level;
new mx.transitions.Tween(end_mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
end_mc.next_btn.onRelease = function () {
this._visible = false;
end_mc.end_txt.text = LS_Complement[randRange(0, 3)];
};
}
function startGame() {
gameTime = 0;
score = 0;
allCorrect = 0;
errorTime = 0;
totalDish = 0;
bellBonus = 0;
timeInterval = setInterval(showTime, 1000);
lightBulb = 3;
showLightBulb();
level = 1;
putItem = 0;
score_mc.score_pause._visible = false;
score_mc.timer.text = "00:00";
score_mc.playtime.text = "Level: " + level;
waitress.gotoAndPlay("sfx");
var _local1 = new mx.transitions.Tween(bell_mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
_local1.onMotionFinished = function () {
loadCharacter();
};
}
function showMainMenu() {
help_mc._visible = (instruction_mc._visible = false);
main_mc._visible = true;
var _local1 = new mx.transitions.Tween(main_mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
}
Mouse.show();
var mainSound = new Sound();
mainSound.attachSound("st_diner.mp3");
var dinnerSound = new Sound();
dinnerSound.attachSound("vm_greet_norm.mp3");
var bellRing = new Sound();
bellRing.attachSound("sfx_vm_dinerbell.mp3");
var putPlateSound = new Sound();
putPlateSound.attachSound("sfx_vm_deliver.mp3");
var eatSound = new Sound();
eatSound.attachSound("sfx_vm_eat.mp3");
var incorrectSound = new Sound();
incorrectSound.attachSound("sfx_incorrect.mp3");
var maxCharacterWidth = 144;
var initCharacterX = 140;
var initCharacterY = 440;
var characterShowRange = 680;
var dishProvideSpace;
var correctDish;
var consecutiveSupply = 0;
var askingFoodArr = new Array();
var providingFoodArr = new Array();
var matchTypeArr = new Array();
var level;
var num_of_char;
var putItem;
var score;
var bellBonus;
var timeScoreBonus;
var totalDish;
var allCorrect;
var lightBulb;
var gamePlaying = false;
bell_mc._alpha = 0;
var bellClicked = false;
bell_mc.onRelease = function () {
if (!bellClicked) {
bellBonus = level * 5;
bellRing.start();
this.play();
clickBellInterval = setInterval(function () {
clearInterval(clickBellInterval);
bellClicked = false;
loadDish();
}, 300);
}
bellClicked = true;
};
end_mc.replay_btn.onRelease = function () {
end_mc._y = -600;
i = 0;
while (i < num_of_char) {
remove_movie(food_mc["pm" + i]);
remove_movie(guest_mc["bb" + i]);
remove_movie(guest_mc["mc" + i]);
i++;
}
i = 0;
while (i < num_of_dish) {
remove_movie(food_mc["d" + i]);
remove_movie(food_mc["ico" + i]);
i++;
}
instruction_mc._visible = true;
new mx.transitions.Tween(instruction_mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
};
var instructionPlayClicked = false;
instruction_mc.play_btn.onRelease = function () {
if (!instructionPlayClicked) {
var _local1 = new mx.transitions.Tween(instruction_mc, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.7, true);
_local1.onMotionFinished = function () {
instructionPlayClicked = false;
instruction_mc._visible = false;
startGame();
};
}
instructionPlayClicked = true;
};
instruction_mc.back_btn.onRelease = function () {
showMainMenu();
};
instruction_mc.help_btn.onRelease = function () {
instruction_mc._visible = false;
help_mc._visible = true;
new mx.transitions.Tween(help_mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
};
help_mc.ok_btn.onRelease = function () {
instruction_mc._visible = true;
help_mc._visible = false;
new mx.transitions.Tween(instruction_mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.7, true);
};
showMainMenu();
mainSound.start(0, 999);
var mainPlayBtnClicked = false;
main_mc.play_btn.onRelease = function () {
if (!mainPlayBtnClicked) {
instruction_mc._visible = true;
instruction_mc.t.text = introText[randRange(0, 7)];
var _local1 = new mx.transitions.Tween(main_mc, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.7, true);
_local1.onMotionFinished = function () {
mainPlayBtnClicked = false;
dinnerSound.start();
main_mc._visible = false;
};
}
mainPlayBtnClicked = true;
};
stop();
Symbol 88 MovieClip [character1] Frame 1
stop();
Symbol 88 MovieClip [character1] Frame 6
play();
Symbol 88 MovieClip [character1] Frame 14
gotoAndPlay ("facenormal");
Symbol 88 MovieClip [character1] Frame 15
play();
Symbol 88 MovieClip [character1] Frame 33
gotoAndPlay ("facesmile");
Symbol 88 MovieClip [character1] Frame 34
play();
Symbol 88 MovieClip [character1] Frame 51
gotoAndPlay ("facenormal");
Symbol 88 MovieClip [character1] Frame 52
play();
Symbol 88 MovieClip [character1] Frame 61
gotoAndPlay ("facenormal");
Symbol 88 MovieClip [character1] Frame 62
play();
Symbol 88 MovieClip [character1] Frame 70
gotoAndPlay ("facenormal");
Symbol 88 MovieClip [character1] Frame 71
play();
Symbol 88 MovieClip [character1] Frame 90
stop();
Symbol 88 MovieClip [character1] Frame 91
play();
Symbol 88 MovieClip [character1] Frame 108
stop();
Symbol 125 MovieClip [character2] Frame 1
stop();
Symbol 125 MovieClip [character2] Frame 6
play();
Symbol 125 MovieClip [character2] Frame 14
gotoAndPlay ("facenormal");
Symbol 125 MovieClip [character2] Frame 15
play();
Symbol 125 MovieClip [character2] Frame 33
gotoAndPlay ("facesmile");
Symbol 125 MovieClip [character2] Frame 34
play();
Symbol 125 MovieClip [character2] Frame 51
gotoAndPlay ("facenormal");
Symbol 125 MovieClip [character2] Frame 52
play();
Symbol 125 MovieClip [character2] Frame 61
gotoAndPlay ("facenormal");
Symbol 125 MovieClip [character2] Frame 62
play();
Symbol 125 MovieClip [character2] Frame 70
gotoAndPlay ("facenormal");
Symbol 125 MovieClip [character2] Frame 71
play();
Symbol 125 MovieClip [character2] Frame 90
stop();
Symbol 125 MovieClip [character2] Frame 91
play();
Symbol 125 MovieClip [character2] Frame 108
stop();
Symbol 162 MovieClip [character3] Frame 1
stop();
Symbol 162 MovieClip [character3] Frame 6
play();
Symbol 162 MovieClip [character3] Frame 14
gotoAndPlay ("facenormal");
Symbol 162 MovieClip [character3] Frame 15
play();
Symbol 162 MovieClip [character3] Frame 33
gotoAndPlay ("facesmile");
Symbol 162 MovieClip [character3] Frame 34
play();
Symbol 162 MovieClip [character3] Frame 51
gotoAndPlay ("facenormal");
Symbol 162 MovieClip [character3] Frame 52
play();
Symbol 162 MovieClip [character3] Frame 61
gotoAndPlay ("facenormal");
Symbol 162 MovieClip [character3] Frame 62
play();
Symbol 162 MovieClip [character3] Frame 70
gotoAndPlay ("facenormal");
Symbol 162 MovieClip [character3] Frame 71
play();
Symbol 162 MovieClip [character3] Frame 90
stop();
Symbol 162 MovieClip [character3] Frame 91
play();
Symbol 162 MovieClip [character3] Frame 108
stop();
Symbol 199 MovieClip [character4] Frame 1
stop();
Symbol 199 MovieClip [character4] Frame 6
play();
Symbol 199 MovieClip [character4] Frame 14
gotoAndPlay ("facenormal");
Symbol 199 MovieClip [character4] Frame 15
play();
Symbol 199 MovieClip [character4] Frame 33
gotoAndPlay ("facesmile");
Symbol 199 MovieClip [character4] Frame 34
play();
Symbol 199 MovieClip [character4] Frame 51
gotoAndPlay ("facenormal");
Symbol 199 MovieClip [character4] Frame 52
play();
Symbol 199 MovieClip [character4] Frame 61
gotoAndPlay ("facenormal");
Symbol 199 MovieClip [character4] Frame 62
play();
Symbol 199 MovieClip [character4] Frame 70
gotoAndPlay ("facenormal");
Symbol 199 MovieClip [character4] Frame 71
play();
Symbol 199 MovieClip [character4] Frame 90
stop();
Symbol 199 MovieClip [character4] Frame 91
play();
Symbol 199 MovieClip [character4] Frame 108
stop();
Symbol 236 MovieClip [character5] Frame 1
stop();
Symbol 236 MovieClip [character5] Frame 6
play();
Symbol 236 MovieClip [character5] Frame 14
gotoAndPlay ("facenormal");
Symbol 236 MovieClip [character5] Frame 15
play();
Symbol 236 MovieClip [character5] Frame 33
gotoAndPlay ("facesmile");
Symbol 236 MovieClip [character5] Frame 34
play();
Symbol 236 MovieClip [character5] Frame 51
gotoAndPlay ("facenormal");
Symbol 236 MovieClip [character5] Frame 52
play();
Symbol 236 MovieClip [character5] Frame 61
gotoAndPlay ("facenormal");
Symbol 236 MovieClip [character5] Frame 62
play();
Symbol 236 MovieClip [character5] Frame 70
gotoAndPlay ("facenormal");
Symbol 236 MovieClip [character5] Frame 71
play();
Symbol 236 MovieClip [character5] Frame 90
stop();
Symbol 236 MovieClip [character5] Frame 91
play();
Symbol 236 MovieClip [character5] Frame 108
stop();
Symbol 273 MovieClip [character6] Frame 1
stop();
Symbol 273 MovieClip [character6] Frame 6
play();
Symbol 273 MovieClip [character6] Frame 14
gotoAndPlay ("facenormal");
Symbol 273 MovieClip [character6] Frame 15
play();
Symbol 273 MovieClip [character6] Frame 33
gotoAndPlay ("facesmile");
Symbol 273 MovieClip [character6] Frame 34
play();
Symbol 273 MovieClip [character6] Frame 51
gotoAndPlay ("facenormal");
Symbol 273 MovieClip [character6] Frame 52
play();
Symbol 273 MovieClip [character6] Frame 61
gotoAndPlay ("facenormal");
Symbol 273 MovieClip [character6] Frame 62
play();
Symbol 273 MovieClip [character6] Frame 70
gotoAndPlay ("facenormal");
Symbol 273 MovieClip [character6] Frame 71
play();
Symbol 273 MovieClip [character6] Frame 90
stop();
Symbol 273 MovieClip [character6] Frame 91
play();
Symbol 273 MovieClip [character6] Frame 108
stop();
Symbol 310 MovieClip [character7] Frame 1
stop();
Symbol 310 MovieClip [character7] Frame 6
play();
Symbol 310 MovieClip [character7] Frame 14
gotoAndPlay ("facenormal");
Symbol 310 MovieClip [character7] Frame 15
play();
Symbol 310 MovieClip [character7] Frame 33
gotoAndPlay ("facesmile");
Symbol 310 MovieClip [character7] Frame 34
play();
Symbol 310 MovieClip [character7] Frame 51
gotoAndPlay ("facenormal");
Symbol 310 MovieClip [character7] Frame 52
play();
Symbol 310 MovieClip [character7] Frame 61
gotoAndPlay ("facenormal");
Symbol 310 MovieClip [character7] Frame 62
play();
Symbol 310 MovieClip [character7] Frame 70
gotoAndPlay ("facenormal");
Symbol 310 MovieClip [character7] Frame 71
play();
Symbol 310 MovieClip [character7] Frame 90
stop();
Symbol 310 MovieClip [character7] Frame 91
play();
Symbol 310 MovieClip [character7] Frame 108
stop();
Symbol 347 MovieClip [character8] Frame 1
stop();
Symbol 347 MovieClip [character8] Frame 6
play();
Symbol 347 MovieClip [character8] Frame 14
gotoAndPlay ("facenormal");
Symbol 347 MovieClip [character8] Frame 15
play();
Symbol 347 MovieClip [character8] Frame 33
gotoAndPlay ("facesmile");
Symbol 347 MovieClip [character8] Frame 34
play();
Symbol 347 MovieClip [character8] Frame 51
gotoAndPlay ("facenormal");
Symbol 347 MovieClip [character8] Frame 52
play();
Symbol 347 MovieClip [character8] Frame 61
gotoAndPlay ("facenormal");
Symbol 347 MovieClip [character8] Frame 62
play();
Symbol 347 MovieClip [character8] Frame 70
gotoAndPlay ("facenormal");
Symbol 347 MovieClip [character8] Frame 71
play();
Symbol 347 MovieClip [character8] Frame 90
stop();
Symbol 347 MovieClip [character8] Frame 91
play();
Symbol 347 MovieClip [character8] Frame 108
stop();
Symbol 387 MovieClip [plate_mc] Frame 1
stop();
Symbol 457 MovieClip [waitress] Frame 1
stop();
Symbol 457 MovieClip [waitress] Frame 7
play();
Symbol 457 MovieClip [waitress] Frame 20
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 22
play();
Symbol 457 MovieClip [waitress] Frame 28
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 29
play();
Symbol 457 MovieClip [waitress] Frame 35
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 36
play();
Symbol 457 MovieClip [waitress] Frame 64
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 65
play();
Symbol 457 MovieClip [waitress] Frame 90
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 91
play();
Symbol 457 MovieClip [waitress] Frame 99
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 100
play();
Symbol 457 MovieClip [waitress] Frame 108
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 109
play();
Symbol 457 MovieClip [waitress] Frame 138
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 139
play();
Symbol 457 MovieClip [waitress] Frame 166
gotoAndStop ("facenormal");
Symbol 457 MovieClip [waitress] Frame 167
play();
Symbol 457 MovieClip [waitress] Frame 195
gotoAndStop ("facenormal");
Symbol 610 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.32");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 611 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 612 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 613 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 614 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 615 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 616 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function getBoardID() {
return(boardID);
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 464 MovieClip Frame 172
stop();
_parent.play();
Symbol 477 MovieClip Frame 1
stop();
Symbol 493 MovieClip Frame 1
stop();
Symbol 530 Button
on (release) {
mochi.MochiScores.setBoardID("171150bd55231181");
var scoreQuery = {score:score_txt, onClose:function () {
}, onError:function (arg2) {
}};
mochi.MochiScores.showLeaderboard(scoreQuery);
}
Symbol 550 MovieClip Frame 1
buynow_btn.onRelease = function () {
getURL ("http://www.legacygames.com/download_games/76/brain_spa/", "_blank");
};
getfree_btn.onRelease = function () {
getURL ("http://www.trialpay.com/productpage/?c=6f4a3b4&tid=6rGiGxo", "_blank");
};
Instance of Symbol 496 MovieClip in Symbol 550 MovieClip Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Instance of Symbol 496 MovieClip in Symbol 577 MovieClip Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Symbol 609 MovieClip Frame 1
buynow_btn.onRelease = function () {
getURL ("http://www.legacygames.com/download_games/76/brain_spa/", "_blank");
};
getfree_btn.onRelease = function () {
getURL ("http://www.trialpay.com/productpage/?c=6f4a3b4&tid=6rGiGxo", "_blank");
};
board.onRelease = function () {
mochi.MochiScores.setBoardID("171150bd55231181");
var _local1 = {onClose:function () {
}, onError:function (arg2) {
}};
mochi.MochiScores.showLeaderboard(_local1);
};