Frame 1
fscommand ("allowscale", "true");
Frame 2
if (_framesloaded >= 10) {
gotoAndPlay (10);
} else {
thePercent = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_root.loaderPercent = thePercent;
}
Frame 3
gotoAndPlay (2);
Frame 10
if (_framesloaded >= _totalframes) {
gotoAndPlay (12);
} else {
percent = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_root.loaderPercent = percent;
}
Frame 11
gotoAndPlay (10);
Frame 20
stop();
Frame 25
stop();
_root.soundIsOn = true;
Instance of Symbol 96 MovieClip "credits" in Frame 25
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 103 MovieClip "instructions" in Frame 25
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 111 MovieClip "login" in Frame 25
onClipEvent (load) {
_visible = 0;
}
onClipEvent (keyDown) {
if (Key.isDown(Key.ENTER)) {
_root.playerName = playerName;
tellTarget ("_root") {
gotoAndPlay ("start");
};
}
}
Frame 34
_quality = "MEDIUM";
elementList = new Array("salad", "chips", "falafel", "humus");
_root.score = 0;
_root.pitaTaken = 0;
_root.pitaIsFull = false;
_root.posX0 = -200;
_root.posX1 = 585;
_root.posX2 = 460;
_root.posX3 = 345;
_root.posX4 = 255;
_root.posX5 = 840;
_root.occupiedPos1 = false;
_root.occupiedPos2 = false;
_root.occupiedPos3 = false;
_root.occupiedPos4 = false;
_root.charsOnStage = 0;
_root.musicOn = false;
_root.lastSheerit = 0;
_root.charInterval = 10000;
_root.flyInterval = 20000;
_root.fullQuantity = 12;
_root.achmedIsOut = false;
_root.whichTape = random(2) + 1;
_root.flyOriginalTime = getTimer();
_root.charOriginalTime = getTimer();
_root.pauseMode = false;
_root.soundOn = true;
_root.currentChar = "";
Instance of Symbol 144 MovieClip "person2" in Frame 34
onClipEvent (load) {
theInterval = 7000;
originalTime = getTimer();
inPlace = false;
gotPita = false;
posX = "pos0";
exitIndicator = false;
}
onClipEvent (enterFrame) {
if (_root.pauseMode == false) {
_root.manageChar(this);
}
}
Instance of Symbol 171 MovieClip "person1" in Frame 34
onClipEvent (load) {
theInterval = 9000;
originalTime = getTimer();
inPlace = false;
gotPita = false;
posX = "pos0";
exitIndicator = false;
}
onClipEvent (enterFrame) {
if (_root.pauseMode == false) {
_root.manageChar(this);
}
}
Instance of Symbol 183 MovieClip "person3" in Frame 34
onClipEvent (load) {
theInterval = 8000;
originalTime = getTimer();
inPlace = false;
gotPita = false;
posX = "pos0";
exitIndicator = false;
}
onClipEvent (enterFrame) {
if (_root.pauseMode == false) {
_root.manageChar(this);
}
}
Instance of Symbol 196 MovieClip "person4" in Frame 34
onClipEvent (load) {
theInterval = 11000;
originalTime = getTimer();
inPlace = false;
gotPita = false;
posX = "pos0";
exitIndicator = false;
}
onClipEvent (enterFrame) {
if (_root.pauseMode == false) {
_root.manageChar(this);
}
}
Instance of Symbol 210 MovieClip "person5" in Frame 34
onClipEvent (load) {
theInterval = 10000;
originalTime = getTimer();
inPlace = false;
gotPita = false;
posX = "pos0";
exitIndicator = false;
}
onClipEvent (enterFrame) {
if (_root.pauseMode == false) {
_root.manageChar(this);
}
}
Instance of Symbol 223 MovieClip "person6" in Frame 34
onClipEvent (load) {
theInterval = 9000;
originalTime = getTimer();
inPlace = false;
gotPita = false;
posX = "pos0";
exitIndicator = false;
}
onClipEvent (enterFrame) {
if (_root.pauseMode == false) {
_root.manageChar(this);
}
}
Instance of Symbol 359 MovieClip "flies" in Frame 34
onClipEvent (load) {
_visible = 0;
dead = false;
}
Instance of Symbol 398 MovieClip "dummy" in Frame 34
onClipEvent (enterFrame) {
CurrentTime = getTimer();
if (_root.charInterval < (CurrentTime - _root.charOriginalTime)) {
_root.initializeChar();
_root.charOriginalTime = getTimer();
}
if (_root.flyInterval < (CurrentTime - _root.flyOriginalTime)) {
if (_root.flies.active == false) {
_root.place_flies();
_root.flyOriginalTime = getTimer();
if (_root.flyInterval >= 6000) {
_root.flyInterval = _root.flyInterval - 1000;
}
}
}
sheerit = Math.floor(_root.score / 100);
_root.checkTapeStatus(sheerit);
}
onClipEvent (load) {
_root.manaSound = new Sound(this);
_root.tapeSound = new Sound(this);
_root.buzzSound = new Sound(this);
_root.manaSound.attachSound("mana1");
_root.tapeSound.attachSound("tape_announce");
_root.buzzSound.attachSound("buzz");
}
Instance of Symbol 405 MovieClip "no_pita" in Frame 34
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 408 MovieClip "no_tweezers" in Frame 34
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 413 MovieClip "points_clip" in Frame 34
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 413 MovieClip "points_clip2" in Frame 34
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 417 MovieClip in Frame 34
onClipEvent (keyDown) {
if (Key.isDown(32)) {
_root.pauseGame();
}
}
Frame 35
function clickPita() {
if (_root.pitaTaken == 0) {
_root.pitaTaken = 1;
tellTarget ("_root.R_Hand") {
gotoAndPlay ("getting pita");
};
}
}
function rolloverElement(whichClip) {
tellTarget ("duchan.all_salads.all_" add whichClip._name) {
if (_root.pitaTaken == 1) {
gotoAndPlay("contor " add currentState);
}
};
}
function rolloutElement(whichClip) {
tellTarget ("duchan.all_salads.all_" add whichClip._name) {
gotoAndPlay(currentState);
};
}
function click_element(whichClip) {
if (_root.pitaTaken == 1) {
if (eval (("duchan.all_salads.all_" add whichClip._name) add ".currentState") != "empty") {
_root.manageElements(eval ("duchan.all_salads.all_" add whichClip._name));
tellTarget ("_root.L_Hand") {
gotoAndPlay("getting " add whichClip._name);
theElement = whichClip;
};
}
}
}
function add_element(whichClip) {
whichClip.counter = whichClip.counter + 1;
if (whichClip.maxElements >= whichClip.counter) {
whichClip.counterText = whichClip.maxElements - whichClip.counter;
} else {
whichClip.counterText = 0;
}
if (whichClip.maxElements < whichClip.counter) {
_root.score = _root.score - 5;
showPoints("-5");
updateCharInterval();
_root.buzzSound.start();
} else {
_root.score = _root.score + 1;
showPoints("+1");
updateCharInterval();
}
if (whichClip.counter == whichClip.maxElements) {
theElement = ("_root.R_Hand.pita." add whichClip._name) add "_element";
eval (theElement)._visible = 1;
_root.R_Hand.pita.countElements = _root.R_Hand.pita.countElements + 1;
if (R_Hand.pita.countElements == 4) {
_root.pitaIsFull = true;
_root.manaSound.start();
}
}
}
function click_person(whichClip) {
if ((_root.pitaIsFull == true) and (_root.achmedIsOut == false)) {
_root.givePita(whichClip);
} else {
var checkStatus = 0;
i = 0;
while (i < _root.elementList.length) {
theClip = "_root.duchan." add _root.elementList[i];
if (eval (theClip).counterText == 0) {
checkStatus = checkStatus + 1;
}
i++;
}
if ((checkStatus >= 4) and (_root.achmedIsOut == false)) {
_root.givePita(whichClip);
}
}
}
function givePita(whichClip) {
tellTarget (_root.R_Hand) {
gotoAndPlay ("giving pita");
tellTarget (_root.R_Hand.pitaToGive) {
gotoAndPlay("p" add whichClip.posX.charAt(whichClip.posX.length - 1));
};
};
_root.score = _root.score + 5;
showPoints("+5");
tellTarget (whichClip) {
gotoAndPlay ("with pita");
};
_root.resetPita();
}
function resetPita() {
_root.pitaTaken = 0;
_root.pitaIsFull = false;
_root.pita.countElements = 0;
i = 0;
while (i < _root.elementList.length) {
theClip = "_root.duchan." add _root.elementList[i];
theElement = ("_root.pita." add _root.elementList[i]) add "_element";
eval (theClip).maxElements = Number(findRandom(3));
eval (theClip).counter = 0;
eval (theClip).counterText = eval (theClip).maxElements;
eval (theElement)._visible = 0;
i++;
}
}
function updateCharInterval() {
if (_root.score < 20) {
_root.charInterval = 10000;
} else if (_root.score < 40) {
_root.charInterval = 8000;
} else if (_root.score < 60) {
_root.charInterval = 5000;
} else if (_root.score < 80) {
_root.charInterval = 2000;
} else if (_root.score >= 120) {
_root.charInterval = 1000;
}
}
function manageFalafel() {
if (_root.L_Hand.falafel_fly1.falafelInAir == true) {
if (_root.L_Hand.falafel_fly2.falafelInAir == true) {
if (_root.L_Hand.falafel_fly3.falafelInAir == true) {
} else {
tellTarget ("_root.L_Hand.falafel_fly3") {
_visible = 1;
play();
};
}
} else {
tellTarget ("_root.L_Hand.falafel_fly2") {
_visible = 1;
play();
};
}
} else {
tellTarget ("_root.L_Hand.falafel_fly1") {
_visible = 1;
play();
};
}
}
function manageElements(whichElement) {
if (0 < whichElement.quantity) {
whichElement.quantity = whichElement.quantity - 1;
}
if (0.75 < (whichElement.quantity / _root.fullQuantity)) {
whichElement.currentState = "full";
whichElement.currentStateNum = 4;
whichElement.currentPercent = "100%";
} else if (0.5 < (whichElement.quantity / _root.fullQuantity)) {
whichElement.currentState = "TQ";
whichElement.currentStateNum = 3;
whichElement.currentPercent = "75%";
} else if (0.25 < (whichElement.quantity / _root.fullQuantity)) {
whichElement.currentState = "Half";
whichElement.currentStateNum = 2;
whichElement.currentPercent = "50%";
} else if (0 < (whichElement.quantity / _root.fullQuantity)) {
whichElement.currentState = "QT";
whichElement.currentStateNum = 1;
whichElement.currentPercent = "25%";
} else {
whichElement.currentState = "empty";
whichElement.currentStateNum = 0;
whichElement.currentPercent = "0%";
}
tellTarget (whichElement) {
gotoAndPlay(String(currentState));
percent_indicator.gotoAndPlay("n-" add currentState);
};
}
function fillUp(elementName) {
currentStateNum = eval (("duchan.all_salads.all_" add elementName) add ".currentStateNum");
if (currentStateNum < 4) {
currentStateNum = currentStateNum + 1;
quantity = currentStateNum * Math.round(_root.fullQuantity / 4);
if (currentStateNum == 4) {
currentState = "full";
} else if (currentStateNum == 3) {
currentState = "TQ";
} else if (currentStateNum == 2) {
currentState = "Half";
} else if (currentStateNum == 1) {
currentState = "QT";
} else {
currentState = "Empty";
}
Set(("duchan.all_salads.all_" add elementName) add ".quantity", quantity);
Set(("duchan.all_salads.all_" add elementName) add ".currentState", currentState);
Set(("duchan.all_salads.all_" add elementName) add ".currentStateNum", currentStateNum);
tellTarget ("duchan.all_salads.all_" add elementName) {
gotoAndPlay(String(currentState));
percent_indicator.gotoAndPlay("n-" add currentState);
};
}
}
Frame 36
function initializeChar() {
var personFound = false;
if (_root.charsOnStage < 4) {
if ((eval (eval (_root.currentChar) add ".inPlace") == true) or (_root.currentChar == "")) {
rand = findRandom(6);
i = 1;
while (100 >= i) {
if ((eval ("_root.person" add rand).inPlace == true) or (_root.currentChar == ("person" add rand))) {
rand = findRandom(6);
} else {
_root.currentChar = "person" add rand;
var personFound = true;
break;
}
i++;
}
var posFound = false;
if (personFound == true) {
rand = findRandom(4);
i = 1;
while (100 >= i) {
if (eval ("_root.occupiedPos" add rand) == true) {
rand = findRandom(4);
} else {
_root.currentPos = "_root.posX" add rand;
Set("_root.occupiedPos" add rand, true);
posFound = true;
_root.charsOnStage = _root.charsOnStage + 1;
break;
}
i++;
}
if (posFound != true) {
_root.currentChar = "";
_root.currentPos = "";
}
}
}
}
}
function manageChar(whichClip) {
if (whichClip._name == _root.currentChar) {
if (whichClip.inPlace == false) {
if (eval (_root.currentPos) < 400) {
if (640 < whichClip._x) {
whichClip._x = _root.posX0;
}
} else if (whichClip._x < 0) {
whichClip._x = _root.posX5;
}
_root.enterChar(whichClip, _root.currentPos);
_root.resetNerves(whichClip);
}
}
if (whichClip.gotPita == true) {
_root.exitChar(whichClip);
}
}
function enterChar(whichClip, whichPos) {
if (eval (whichPos) < 400) {
whichClip._x = whichClip._x + 20;
} else {
whichClip._x = whichClip._x - 20;
}
whichClip.posX = whichPos;
if (((eval (whichPos) - 21) < whichClip._x) and (whichClip._x < (eval (whichPos) + 21))) {
whichClip._x = eval (whichPos);
whichClip.inPlace = true;
_root.resetNerves(whichClip);
_root.updateNerves(whichclip, -500);
}
}
function exitChar(whichClip) {
if (whichClip.exitIndicator == false) {
Set("_root.occupiedPos" add whichClip.posX.charAt(whichClip.posX.length - 1), false);
whichClip.exitIndicator = true;
}
if ((whichClip.posX == "_root.posX3") or (whichClip.posX == "_root.posX4")) {
whichClip._x = whichClip._x - 20;
if (((_root.posX0 - 21) < whichClip._x) and (whichClip._x < (_root.posX0 + 21))) {
whichClip._x = _root.posX0;
whichClip.inPlace = false;
_root.charsOnStage = _root.charsOnStage - 1;
whichClip.exitIndicator = false;
whichClip.gotPita = false;
whichClip.gotoAndPlay("Normal");
if (_root.currentChar == whichClip._name) {
_root.currentChar = "";
}
}
} else if ((whichClip.posX == "_root.posX1") or (whichClip.posX == "_root.posX2")) {
whichClip._x = whichClip._x + 20;
if (((_root.posX5 - 21) < whichClip._x) and (whichClip._x < (_root.posX5 + 21))) {
whichClip._x = _root.posX5;
whichClip.inPlace = false;
_root.charsOnStage = _root.charsOnStage - 1;
whichClip.exitIndicator = false;
whichClip.gotPita = false;
whichClip.gotoAndPlay("Normal");
if (_root.currentChar == whichClip._name) {
_root.currentChar = "";
}
}
}
}
function findRandom(num) {
return(Math.round(random(num) + 1).toString());
}
function updateNerves(whichClip, howMuch) {
if (whichClip.theInterval >= 1000) {
whichClip.theInterval = whichClip.theInterval + howMuch;
}
}
function resetNerves(whichClip) {
whichClip.nerves.nerveCounter = 0;
whichClip.nerves.originalTime = getTimer();
whichClip.nerves.gotoAndPlay(2);
}
Frame 37
function showIcon(whichIcon) {
whichIcon._visible = 1;
whichIcon._x = _root._xmouse;
whichIcon._y = _root._ymouse;
}
function hideIcon(whichIcon) {
whichIcon._visible = 0;
}
function openTape() {
duchan.tape._visible = 1;
duchan.tape.tape_light._visible = 1;
duchan.tape.tape_light._visible = 1;
duchan.tape.tape_light.gotoAndPlay(2);
}
function activateTape() {
duchan.tape._visible = 0;
duchan.tape.tape_light._visible = 0;
_root.bg_music.gotoAndPlay("stop music");
if (flies.active == true) {
_root.flies.gotoAndPlay("stop buzz");
}
i = 1;
while (6 >= i) {
eval ("person" add i).gotoAndPlay("music");
gotoAndPlay (54);
i++;
}
_root.musicOn = true;
}
function returnTape() {
gotoAndPlay (45);
if (_root.soundOn == true) {
_root.bg_music.gotoAndPlay(1);
} else {
_root.soundButt.gotoAndPlay("sound off");
}
if (flies.active == true) {
_root.flies.gotoAndPlay("loop");
}
i = 1;
while (6 >= i) {
eval ("person" add i).gotoAndPlay("normal");
resetNerves(eval ("person" add i));
i++;
}
_root.musicOn = false;
}
function checkTapeStatus(currentSheerit) {
if (currentSheerit >= 1) {
if (_root.lastSheerit < currentSheerit) {
tapeSound.start();
_root.openTape();
_root.lastSheerit = currentSheerit;
}
}
}
function pauseGame() {
if (_root.pauseMode == false) {
_root.pauseMode = true;
_root.flies.stop();
_root.flyOriginalTimeAtPause = _root.flyOriginalTime;
_root.charOriginalTimeAtPause = _root.charOriginalTime;
_root.bg_music.gotoAndPlay("stop music");
i = 1;
while (6 >= i) {
Set(("_root.person" add i) add "_originalTimeAtPause", eval (("_root.person" add i) add ".nerves.originalTime"));
i++;
}
gotoAndPlay (329);
} else {
_root.pauseMode = false;
_root.flyOriginalTime = getTimer() - _root.flyOriginalTimeAtPause;
_root.charOriginalTime = getTimer() - _root.charOriginalTimeAtPause;
if (soundOn == true) {
_root.bg_music.gotoAndPlay("start");
} else {
_root.soundButt.gotoAndPlay("sound off");
}
i = 1;
while (6 >= i) {
Set(("_root.person" add i) add ".nerves.originalTime", getTimer() - eval (("_root.person" add i) add "_originalTimeAtPause"));
i++;
}
stopAllSounds();
_root.flies.play();
gotoAndPlay (45);
}
}
Frame 38
function place_flies() {
var chips = duchan.all_salads.all_chips.quantity;
var falafel = duchan.all_salads.all_falafel.quantity;
var humus = duchan.all_salads.all_humus.quantity;
var salad = duchan.all_salads.all_salad.quantity;
var max1 = Math.max(chips, falafel);
var max2 = Math.max(humus, salad);
var finalMax = Math.max(max1, max2);
if (finalMax != 0) {
if (finalMax == chips) {
fly_X = duchan.all_salads.all_chips.my_X;
fly_Y = duchan.all_salads.all_chips.my_Y;
_root.currentFly = "chips";
} else if (finalMax == falafel) {
fly_X = duchan.all_salads.all_falafel.my_X;
fly_Y = duchan.all_salads.all_falafel.my_Y;
_root.currentFly = "falafel";
} else if (finalMax == humus) {
fly_X = duchan.all_salads.all_humus.my_X;
fly_Y = duchan.all_salads.all_humus.my_Y;
_root.currentFly = "humus";
} else {
fly_X = duchan.all_salads.all_salad.my_X;
fly_Y = duchan.all_salads.all_salad.my_Y;
_root.currentFly = "salad";
}
flies._visible = 1;
flies.gotoAndPlay("Active");
flies._x = fly_X;
flies._y = fly_Y;
}
}
function manageFlies() {
if (0 < eval ("duchan.all_salads.all_" add _root.currentFly).quantity) {
_root.manageElements(eval ("duchan.all_salads.all_" add currentFly));
_root.score = _root.score - 1;
if (_root.points_clip._visible == 0) {
tellTarget ("_root.points_clip") {
_visible = 1;
points = "-1";
_x = _root.flies._x;
_y = _root.flies._y;
gotoAndPlay ("red");
};
} else {
tellTarget ("_root.points_clip2") {
_visible = 1;
points = "-1";
_x = _root.flies._x;
_y = _root.flies._y;
gotoAndPlay ("red");
};
}
} else {
_root.place_Flies();
}
}
function showPoints(howMuch) {
var theXmouse = _root._xmouse;
var theYmouse = _root._ymouse;
if (_root.points_clip._visible == 0) {
tellTarget ("_root.points_clip") {
_visible = 1;
points = howmuch;
_x = theXmouse;
_y = theYmouse;
if (0 < Number(points)) {
gotoAndPlay ("green");
} else {
gotoAndPlay ("red");
}
};
} else {
tellTarget ("_root.points_clip2") {
_visible = 1;
points = howmuch;
_x = theXmouse;
_y = theYmouse;
if (0 < Number(points)) {
gotoAndPlay ("green");
} else {
gotoAndPlay ("red");
}
};
}
}
Frame 39
_root.initializeChar();
Frame 46
stop();
Frame 55
if (whichTape == 1) {
whichTape = 2;
gotoAndPlay (59);
} else {
whichTape = 1;
gotoAndPlay (208);
}
Frame 190
stop();
_root.returnTape();
Frame 326
_root.returnTape();
stop();
Frame 329
stop();
stopAllSounds();
Instance of Symbol 423 MovieClip in Frame 329
onClipEvent (keyDown) {
if (Key.isDown(32)) {
_root.pauseGame();
}
}
Frame 341
stopAllSounds();
_quality = "HIGH";
Frame 344
Mouse.show();
stop();
Instance of Symbol 465 MovieClip "scoretable" in Frame 352
onClipEvent (load) {
sk_url = "http://www.falafelgame.com/cgi-bin/sk_eng.pl";
script_timeout = 10;
game_title = "surf";
game_author = "net";
my_name = "_root.playerName";
attempt_to_collect_name = 0;
my_score = "_root.score";
additional_data_name = new array();
additional_data_name[0] = "";
additional_data_name[1] = "";
additional_data_name[2] = "";
additional_data_name[3] = "";
additional_data_name[4] = "";
additional_data_name[5] = "";
additional_data = new array();
additional_data[0] = "";
additional_data[1] = "";
additional_data[2] = "";
additional_data[3] = "";
additional_data[4] = "";
additional_data[5] = "";
scores_to_return = 100;
scores_per_person = 200;
anonymous_name = "";
sort_scores_in_reverse = "";
additional_data_name[0] = "time";
additional_data[0] = "_root.time";
}
onClipEvent (load) {
_visible = true;
}
Instance of Symbol 469 MovieClip "open_scoretable" in Frame 352
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 473 MovieClip "winner" in Frame 352
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 96 MovieClip "credits" in Frame 352
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 103 MovieClip "instructions" in Frame 352
onClipEvent (load) {
_visible = 0;
}
Frame 353
stop();
winner._visible = true;
winner.score = _root.score;
myDate = new Date();
myDate.getTime();
_root.time = myDate.toString();
Instance of Symbol 4 MovieClip in Symbol 5 MovieClip [processManageChar] Frame 1
onClipEvent (enterFrame) {
_root.manageChar(_parent._parent);
}
Symbol 7 MovieClip [puzzle_spot] Frame 1
stop();
Symbol 51 MovieClip Frame 23
stop();
Symbol 52 MovieClip Frame 1
function PieceX(col) {
return(xBase + (col * xSpace));
}
function PieceY(row) {
return(yBase + (row * ySpace));
}
function Initialize() {
Congratulations.stop();
numRows = 4;
numCols = 4;
numCells = numRows * numCols;
xBase = p0._x;
yBase = p0._y;
xSpace = p0._width * 1.02;
ySpace = p0._height * 1.02;
var c = 1;
var r = 0;
var i = 1;
while (i < (numCells - 1)) {
var name = ("p" + i);
p0.duplicateMovieClip(name, i);
var newPiece = eval (name);
newPiece._x = PieceX(c);
newPiece._y = PieceY(r);
newPiece.PieceNumber = i + 1;
newPiece.attachMovie(String(i + 1), "part" add String(i + 1), 1);
if ((++c) >= numCols) {
c = 0;
r++;
}
p0.attachMovie(1, "part1", 1);
p0.PieceNumber = 1;
i++;
}
posArray = [];
i = 0;
while (i < (numCells - 1)) {
posArray[i] = i;
i++;
}
empty = numCells - 1;
}
function isWinner() {
var i = 0;
while (i < (numCells - 1)) {
if (posArray[i] != i) {
return(false);
}
i++;
}
return(true);
}
function Click(clicked) {
clicked--;
if (isWinner()) {
shuffle();
Congratulations.gotoAndStop(1);
} else {
pos = posArray[clicked];
emptyRow = Math.floor(empty / numCols);
emptyCol = empty - (emptyRow * numCols);
clickedRow = Math.floor(pos / numCols);
clickedCol = pos - (clickedRow * numCols);
rowDiff = Math.abs(clickedRow - emptyRow);
colDiff = Math.abs(clickedCol - emptyCol);
adjacent = (rowDiff + colDiff) == 1;
if (adjacent) {
var piece = eval ("p" + clicked);
piece._x = PieceX(emptyCol);
piece._y = PieceY(emptyRow);
posArray[clicked] = empty;
empty = pos;
if (isWinner()) {
Congratulations.play();
}
}
}
}
function Shuffle() {
var cf = function (x, y) {
if (x[1] < y[1]) {
return(-1);
}
if (y[1] < x[1]) {
return(1);
}
return(0);
};
var i;
var cell = [];
i = 0;
while (i < numCells) {
cell.push([i, Math.random()]);
i++;
}
cell.sort(cf);
var r = 0;
var c = 0;
i = 0;
while (i < numCells) {
var piece = cell[i][0];
if (piece == (numCells - 1)) {
empty = i;
} else {
posArray[piece] = i;
var p = eval ("p" + piece);
p._x = PieceX(c);
p._y = PieceY(r);
}
if ((++c) >= numCols) {
c = 0;
r++;
}
i++;
}
}
if (!initialized) {
Initialize();
initialized = true;
}
Instance of Symbol 46 MovieClip "p0" in Symbol 52 MovieClip Frame 1
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse, false)) {
_parent.Click(PieceNumber);
}
}
Symbol 56 Button
on (release) {
gotoAndPlay (25);
}
Symbol 60 MovieClip Frame 1
stop();
Symbol 64 Button
on (release) {
_root.credits._visible = 1;
_root.instructions._visible = 0;
}
Symbol 66 Button
on (release) {
_root.credits._visible = 0;
_root.instructions._visible = 0;
_root.login._visible = 1;
Selection.setFocus("login.playerName");
}
Symbol 68 Button
on (release) {
_root.instructions._visible = 1;
_root.credits._visible = 0;
}
Symbol 90 Button
on (release) {
getURL ("mailto:dovg73@barak-online.net");
}
Symbol 91 Button
on (release) {
getURL ("mailto:rafi76@netvision.net.il");
}
Symbol 92 Button
on (release) {
getURL ("mailto:nadavgal@barak-online.net");
}
Symbol 95 Button
on (release) {
_visible = 0;
}
Symbol 110 Button
on (release) {
_root.playerName = playerName;
tellTarget ("_root") {
gotoAndPlay ("start");
};
}
Symbol 118 Button
on (release) {
if (_root.pauseMode == false) {
_root.click_person(this);
}
}
on (press) {
if ((_root.pitaIsFull == false) or (_root.achmedIsOut == true)) {
if (_root.pauseMode == false) {
_root.showIcon(_root.no_pita);
}
}
}
on (release, releaseOutside) {
_root.hideIcon(_root.no_pita);
}
Symbol 124 MovieClip Frame 1
originalTime = getTimer();
nerveCounter = 0;
Instance of Symbol 122 MovieClip "dimmer" in Symbol 124 MovieClip Frame 1
onClipEvent (load) {
original_y = _y;
}
Symbol 124 MovieClip Frame 2
if (_root.musicOn == true) {
nerveCounter = 0;
dimmer._y = dimmer.original_y - (nerveCounter * (dimmer._height / 5));
}
if (_root.pauseMode == false) {
if ((_parent.inPlace == true) and (_root.musicOn == false)) {
currentTime = getTimer();
if ((currentTime - originalTime) >= _parent.theInterval) {
nerveCounter = nerveCounter + 1;
originalTime = getTimer();
if ((nerveCounter >= 0) and (2 >= nerveCounter)) {
_parent.gotoAndPlay("normal");
} else if ((nerveCounter >= 3) and (nerveCounter < 4)) {
_parent.gotoAndPlay("angry");
} else {
_parent.gotoAndPlay("very angry");
}
}
dimmer._y = dimmer.original_y - (nerveCounter * (dimmer._height / 5));
if (nerveCounter == 6) {
_root.gotoAndPlay("game over");
}
if (nerveCounter == 0) {
_parent.gotoAndPlay("normal");
}
}
}
Symbol 124 MovieClip Frame 20
gotoAndPlay (2);
Symbol 133 MovieClip Frame 55
gotoAndPlay (33);
Symbol 142 MovieClip Frame 60
gotoAndPlay (33);
Symbol 144 MovieClip Frame 2
stop();
Symbol 144 MovieClip Frame 16
stop();
Symbol 144 MovieClip Frame 32
stop();
Symbol 144 MovieClip Frame 46
_root.resetNerves(this);
Symbol 144 MovieClip Frame 71
gotoAndPlay (46);
Symbol 144 MovieClip Frame 85
stop();
gotPita = true;
Symbol 162 MovieClip Frame 63
gotoAndPlay (37);
Symbol 166 MovieClip Frame 65
gotoAndPlay (37);
Symbol 167 MovieClip Frame 65
gotoAndPlay (37);
Symbol 171 MovieClip Frame 2
stop();
Symbol 171 MovieClip Frame 21
stop();
Symbol 171 MovieClip Frame 38
if (_root.pauseMode == false) {
gotoAndPlay (28);
} else {
stop();
}
Symbol 171 MovieClip Frame 40
_root.resetNerves(this);
Symbol 171 MovieClip Frame 49
gotoAndPlay (40);
Symbol 171 MovieClip Frame 61
stop();
gotPita = true;
Symbol 183 MovieClip Frame 2
stop();
Symbol 183 MovieClip Frame 16
stop();
Symbol 183 MovieClip Frame 41
if (_root.pauseMode == false) {
gotoAndPlay (30);
} else {
stop();
}
Symbol 183 MovieClip Frame 45
_root.resetNerves(this);
Symbol 183 MovieClip Frame 61
gotoAndPlay (45);
Symbol 183 MovieClip Frame 72
stop();
gotPita = true;
Symbol 196 MovieClip Frame 2
stop();
Symbol 196 MovieClip Frame 16
stop();
Symbol 196 MovieClip Frame 45
if (_root.pauseMode == false) {
gotoAndPlay (30);
} else {
stop();
}
Symbol 196 MovieClip Frame 47
_root.resetNerves(this);
Symbol 196 MovieClip Frame 60
gotoAndPlay (47);
Symbol 196 MovieClip Frame 68
stop();
gotPita = true;
Symbol 210 MovieClip Frame 2
stop();
Symbol 210 MovieClip Frame 21
stop();
Symbol 210 MovieClip Frame 56
if (_root.pauseMode == false) {
gotoAndPlay (41);
} else {
stop();
}
Symbol 210 MovieClip Frame 58
_root.resetNerves(this);
Symbol 210 MovieClip Frame 71
gotoAndPlay (58);
Symbol 210 MovieClip Frame 80
stop();
gotPita = true;
Symbol 215 Button
on (release) {
_root.click_person(this);
}
on (press) {
if ((_root.pitaIsFull == false) or (_root.achmedIsOut == true)) {
_root.showIcon(_root.no_pita);
}
}
on (release, releaseOutside) {
_root.hideIcon(_root.no_pita);
}
Symbol 223 MovieClip Frame 2
stop();
Symbol 223 MovieClip Frame 21
stop();
Symbol 223 MovieClip Frame 31
stop();
Symbol 223 MovieClip Frame 47
_root.resetNerves(this);
Symbol 223 MovieClip Frame 60
gotoAndPlay (47);
Symbol 223 MovieClip Frame 69
stop();
gotPita = true;
Symbol 232 MovieClip Frame 2
stop();
Symbol 232 MovieClip Frame 7
stop();
Symbol 232 MovieClip Frame 12
stop();
Symbol 232 MovieClip Frame 17
stop();
Symbol 232 MovieClip Frame 22
stop();
Instance of Symbol 232 MovieClip "percent_indicator" in Symbol 241 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Symbol 241 MovieClip Frame 3
stop();
Symbol 241 MovieClip Frame 9
stop();
Symbol 241 MovieClip Frame 17
stop();
Symbol 241 MovieClip Frame 25
stop();
Symbol 241 MovieClip Frame 33
stop();
Symbol 241 MovieClip Frame 41
stop();
Symbol 241 MovieClip Frame 50
stop();
Symbol 241 MovieClip Frame 58
stop();
Symbol 241 MovieClip Frame 66
stop();
Symbol 241 MovieClip Frame 75
stop();
Instance of Symbol 232 MovieClip "percent_indicator" in Symbol 251 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Symbol 251 MovieClip Frame 3
stop();
Symbol 251 MovieClip Frame 9
stop();
Symbol 251 MovieClip Frame 17
stop();
Symbol 251 MovieClip Frame 24
stop();
Symbol 251 MovieClip Frame 33
stop();
Symbol 251 MovieClip Frame 42
stop();
Symbol 251 MovieClip Frame 51
stop();
Symbol 251 MovieClip Frame 58
stop();
Symbol 251 MovieClip Frame 66
stop();
Symbol 251 MovieClip Frame 74
stop();
Instance of Symbol 232 MovieClip "percent_indicator" in Symbol 261 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Symbol 261 MovieClip Frame 3
stop();
Symbol 261 MovieClip Frame 9
stop();
Symbol 261 MovieClip Frame 18
stop();
Symbol 261 MovieClip Frame 27
stop();
Symbol 261 MovieClip Frame 35
stop();
Symbol 261 MovieClip Frame 43
stop();
Symbol 261 MovieClip Frame 53
stop();
Symbol 261 MovieClip Frame 61
stop();
Symbol 261 MovieClip Frame 70
stop();
Symbol 261 MovieClip Frame 78
stop();
Instance of Symbol 232 MovieClip "percent_indicator" in Symbol 271 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Symbol 271 MovieClip Frame 3
stop();
Symbol 271 MovieClip Frame 8
stop();
Symbol 271 MovieClip Frame 16
stop();
Symbol 271 MovieClip Frame 24
stop();
Symbol 271 MovieClip Frame 31
stop();
Symbol 271 MovieClip Frame 38
stop();
Symbol 271 MovieClip Frame 46
stop();
Symbol 271 MovieClip Frame 53
stop();
Symbol 271 MovieClip Frame 61
stop();
Symbol 271 MovieClip Frame 68
stop();
Symbol 272 MovieClip Frame 1
function setPercentVisible(cond) {
i = 0;
while (i < _root.elementList.length) {
theElement = ("all_" add _root.elementList[i]) add ".percent_indicator";
eval (theElement)._visible = cond;
var whichFrame = ("n-" add eval (theElement)._parent.currentState);
eval (theElement).gotoAndPlay(whichFrame);
i++;
}
}
Instance of Symbol 241 MovieClip "all_chips" in Symbol 272 MovieClip Frame 1
onClipEvent (load) {
currentState = "full";
currentStateNum = 4;
quantity = _root.fullQuantity;
my_X = 230;
my_Y = 340;
}
Instance of Symbol 251 MovieClip "all_falafel" in Symbol 272 MovieClip Frame 1
onClipEvent (load) {
currentState = "full";
currentStateNum = 4;
quantity = _root.fullQuantity;
my_X = 225;
my_Y = 400;
}
Instance of Symbol 261 MovieClip "all_salad" in Symbol 272 MovieClip Frame 1
onClipEvent (load) {
currentState = "full";
currentStateNum = 4;
quantity = _root.fullQuantity;
my_X = 380;
my_Y = 340;
}
Instance of Symbol 271 MovieClip "all_humus" in Symbol 272 MovieClip Frame 1
onClipEvent (load) {
currentState = "full";
currentStateNum = 4;
quantity = _root.fullQuantity;
my_X = 400;
my_Y = 400;
}
Symbol 272 MovieClip Frame 2
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 34
gotoAndStop (1);
Symbol 278 Button
on (release) {
_root.activateTape();
}
Symbol 288 Button
on (release) {
if (_root.pauseMode == false) {
var rand = (random(2) + 1);
gotoAndPlay("out" add rand);
}
}
Symbol 297 MovieClip Frame 5
_root.fillUp("Chips");
_parent.gotoAndPlay("Basic");
gotoAndStop (1);
Symbol 302 MovieClip Frame 5
_root.fillUp("Salad");
_parent.gotoAndPlay("Basic");
gotoAndStop (1);
Symbol 307 MovieClip Frame 5
_root.fillUp("Falafel");
_parent.gotoAndPlay("Basic");
gotoAndStop (1);
Symbol 313 MovieClip Frame 5
_root.fillUp("Humus");
_parent.gotoAndPlay("Basic");
gotoAndStop (1);
Symbol 314 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 8
stop();
Symbol 314 MovieClip Frame 32
stop();
Symbol 314 MovieClip Frame 54
stop();
Symbol 314 MovieClip Frame 71
stop();
Symbol 317 Button
on (release) {
getElement("Humus");
}
Symbol 318 Button
on (release) {
getElement("Falafel");
}
Symbol 319 Button
on (release) {
getElement("Chips");
}
Symbol 320 Button
on (release) {
getElement("Salad");
}
Symbol 321 Button
on (release) {
gotoAndPlay (28);
}
Symbol 324 MovieClip Frame 1
function getElement(whichElement) {
tellTarget ("achmed_out.achmed_hand") {
gotoAndPlay(whichElement);
};
}
Symbol 324 MovieClip Frame 2
stop();
Symbol 324 MovieClip Frame 12
stop();
_root.achmedIsOut = true;
_parent.all_salads.setPercentVisible(true);
Symbol 324 MovieClip Frame 20
stop();
_root.achmedIsOut = true;
_parent.all_salads.setPercentVisible(true);
Symbol 324 MovieClip Frame 30
_root.achmedIsOut = false;
_parent.all_salads.setPercentVisible(false);
gotoAndPlay (2);
Symbol 325 Button
on (release) {
_root.hideIcon(_root.no_tweezers);
}
on (rollOver) {
_root.rolloverElement(this);
}
on (rollOut) {
_root.rolloutElement(this);
}
on (press) {
if ((_root.pitaTaken != 1) or (eval (("_parent.all_salads.all_" add _name) add ".currentState") == "empty")) {
_root.showIcon(_root.no_tweezers);
} else if (_root.pauseMode == false) {
_root.click_element(this);
}
}
Symbol 332 Button
on (release) {
_root.hideIcon(_root.no_tweezers);
}
on (rollOver) {
_root.rolloverElement(this);
}
on (rollOut) {
_root.rolloutElement(this);
}
on (press) {
if ((_root.pitaTaken != 1) or (eval (("_parent.all_salads.all_" add _name) add ".currentState") == "empty")) {
_root.showIcon(_root.no_tweezers);
} else if (_root.pauseMode == false) {
_root.click_element(this);
}
}
Instance of Symbol 279 MovieClip "tape" in Symbol 335 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 327 MovieClip "chips" in Symbol 335 MovieClip Frame 5
onClipEvent (load) {
counter = 0;
maxElements = Number(_root.findRandom(3));
counterText = maxElements;
}
Instance of Symbol 329 MovieClip "falafel" in Symbol 335 MovieClip Frame 5
onClipEvent (load) {
counter = 0;
maxElements = Number(_root.findRandom(3));
counterText = maxElements;
}
Instance of Symbol 331 MovieClip "salad" in Symbol 335 MovieClip Frame 5
onClipEvent (load) {
counter = 0;
maxElements = Number(_root.findRandom(3));
counterText = maxElements;
}
Instance of Symbol 334 MovieClip "humus" in Symbol 335 MovieClip Frame 5
onClipEvent (load) {
counter = 0;
maxElements = Number(_root.findRandom(3));
counterText = maxElements;
}
Symbol 335 MovieClip Frame 10
stop();
Symbol 335 MovieClip Frame 16
stop();
Symbol 339 Button
on (release) {
if (_root.pauseMode == false) {
_root.clickPita();
}
}
Symbol 340 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 4
_parent.gotoAndPlay("static");
stop();
Symbol 359 MovieClip Frame 1
stop();
active = false;
_visible = false;
Symbol 359 MovieClip Frame 2
gotoAndPlay (1);
Symbol 359 MovieClip Frame 7
active = true;
Symbol 359 MovieClip Frame 30
if (dead == false) {
_root.manageFlies();
gotoAndPlay (10);
}
Symbol 359 MovieClip Frame 33
stop();
Symbol 359 MovieClip Frame 48
stop();
_root.score = _root.score + 3;
_root.flyOriginalTime = getTimer();
dead = false;
Symbol 361 Button
on (release) {
if (_root.pauseMode == false) {
gotoAndPlay (15);
}
}
Symbol 367 MovieClip Frame 1
stop();
Symbol 367 MovieClip Frame 15
if (_root.flies.active == true) {
_root.showPoints("+3");
}
Symbol 367 MovieClip Frame 20
if (_root.flies.active == true) {
_root.flies.gotoAndPlay("dead");
_root.flies.dead = true;
}
Symbol 367 MovieClip Frame 22
gotoAndPlay (1);
Symbol 370 MovieClip Frame 2
falafelInAir = true;
Symbol 370 MovieClip Frame 9
gotoAndStop (1);
_visible = 0;
falafelInAir = false;
Symbol 373 MovieClip Frame 3
_root.add_element(_parent.theElement);
Symbol 373 MovieClip Frame 4
gotoAndStop (1);
tellTarget ("_parent") {
gotoAndPlay ("start");
};
Symbol 376 MovieClip Frame 3
_root.add_element(_parent.theElement);
Symbol 376 MovieClip Frame 4
gotoAndStop (1);
tellTarget ("_parent") {
gotoAndPlay ("start");
};
Symbol 377 MovieClip Frame 2
_root.manageFalafel();
Symbol 377 MovieClip Frame 3
_root.add_element(_parent.theElement);
Symbol 377 MovieClip Frame 4
gotoAndStop (1);
tellTarget ("_parent") {
gotoAndPlay ("start");
};
Symbol 379 MovieClip Frame 3
_root.add_element(_parent.theElement);
Symbol 379 MovieClip Frame 5
gotoAndStop (1);
tellTarget ("_parent") {
gotoAndPlay ("start");
};
Symbol 380 MovieClip Frame 1
stop();
Instance of Symbol 370 MovieClip "falafel_fly1" in Symbol 380 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 370 MovieClip "falafel_fly2" in Symbol 380 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 370 MovieClip "falafel_fly3" in Symbol 380 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Symbol 380 MovieClip Frame 10
stop();
Symbol 380 MovieClip Frame 20
stop();
Symbol 380 MovieClip Frame 30
stop();
Symbol 380 MovieClip Frame 40
stop();
Instance of Symbol 384 MovieClip "falafel_element" in Symbol 391 MovieClip Frame 2
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 386 MovieClip "salad_element" in Symbol 391 MovieClip Frame 2
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 388 MovieClip "chips_element" in Symbol 391 MovieClip Frame 2
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 390 MovieClip "humus_element" in Symbol 391 MovieClip Frame 2
onClipEvent (load) {
_visible = 0;
}
Symbol 391 MovieClip Frame 3
stop();
_parent.gotoAndPlay("Hand with Pita");
Instance of Symbol 384 MovieClip "falafel_element" in Symbol 392 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 386 MovieClip "salad_element" in Symbol 392 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 388 MovieClip "chips_element" in Symbol 392 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 390 MovieClip "humus_element" in Symbol 392 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Symbol 392 MovieClip Frame 9
stop();
Symbol 395 MovieClip Frame 5
stop();
_parent.gotoAndPlay("Empty");
_root.resetPita();
Symbol 395 MovieClip Frame 14
stop();
_parent.gotoAndPlay("Empty");
_root.resetPita();
Symbol 395 MovieClip Frame 24
stop();
_parent.gotoAndPlay("Empty");
_root.resetPita();
Symbol 395 MovieClip Frame 34
stop();
_parent.gotoAndPlay("Empty");
_root.resetPita();
Symbol 396 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 10
stop();
Symbol 396 MovieClip Frame 20
stop();
Instance of Symbol 392 MovieClip "pita" in Symbol 396 MovieClip Frame 20
onClipEvent (load) {
countElements = 0;
}
Symbol 396 MovieClip Frame 35
stop();
Instance of Symbol 395 MovieClip "pitaToGive" in Symbol 396 MovieClip Frame 35
onClipEvent (load) {
countElements = 0;
}
Symbol 400 Button
on (release) {
if (_root.pauseMode == false) {
_root.soundOn = false;
tellTarget ("_root.bg_music") {
stopAllSounds();
gotoAndPlay ("stop music");
};
gotoAndPlay (11);
}
}
Symbol 402 Button
on (release) {
if (_root.pauseMode == false) {
_root.soundOn = true;
tellTarget ("_root.bg_music") {
gotoAndPlay ("start");
};
gotoAndPlay (1);
}
}
Symbol 403 MovieClip Frame 2
stop();
Symbol 403 MovieClip Frame 12
stop();
Symbol 413 MovieClip Frame 7
_visible = 0;
gotoAndStop (1);
Symbol 413 MovieClip Frame 14
_visible = 0;
gotoAndStop (1);
Symbol 415 Button
on (release) {
gotoAndPlay (10);
_root.pauseGame();
}
Symbol 416 Button
on (release) {
gotoAndPlay (1);
_root.pauseGame();
}
Symbol 417 MovieClip Frame 1
stop();
Symbol 417 MovieClip Frame 10
stop();
Symbol 420 MovieClip Frame 3
stop();
Symbol 420 MovieClip Frame 29
if (((_root.soundOn == false) or (_root.pauseMode == true)) or (_root.musicOn == true)) {
gotoAndPlay (28);
} else {
gotoAndPlay (1);
}
Symbol 424 Button
on (release) {
_root.pauseGame();
}
Symbol 434 MovieClip Frame 59
stop();
tellTarget ("_root") {
gotoAndPlay ("play again");
};
Symbol 436 Button
on (release) {
gotoAndPlay (34);
}
Symbol 439 MovieClip Frame 1
setProperty(this, _visible , 0);
Symbol 447 Button
on (release) {
getURL ("http://www.k2w.f2s.com/software/", "k2w");
}
Symbol 457 Button
on (release) {
_visible = 0;
_root.open_scoretable._visible = true;
}
Symbol 460 Button
on (press) {
scrollaction.up = true;
}
on (rollOut, release, dragOut, releaseOutside) {
scrollaction.up = false;
}
Symbol 461 Button
on (press) {
scrollaction.down = true;
}
on (rollOut, release, dragOut, releaseOutside) {
scrollaction.down = false;
}
Symbol 462 MovieClip Frame 1
var sk_url = _parent._parent.sk_url;
var return_type = "PLAIN";
var game_title = _parent._parent.game_title;
var game_author = _parent._parent.game_author;
var script_timeout = _parent._parent.script_timeout;
var my_name = _parent._parent.my_name;
if (my_name == "") {
my_name = _parent._parent.anonymous_name;
}
var my_score = _parent._parent.my_score;
i = 0;
while (_parent._parent.additional_data.length >= i) {
if (eval (_parent._parent.additional_data[i]) != "") {
Set(_parent._parent.additional_data_name[i], eval (_parent._parent.additional_data[i]));
}
i++;
}
var scores_to_return = _parent._parent.scores_to_return;
var scores_per_person = _parent._parent.scores_per_person;
var anonymous_name = _parent._parent.anonymous_name;
var sort_scores_in_reverse = _parent._parent.sort_scores_in_reverse;
_parent.rank = "";
_parent.name = "Loading";
_parent.score = "";
_parent.message_text = "";
script_timeout = (getTimer() / 1000) + script_timeout;
loadVariables (sk_url, this, "POST");
play();
Symbol 462 MovieClip Frame 2
test_timeout = getTimer() / 1000;
if (sk_done == "yes") {
sk_done = "no";
_parent.name = "";
gotoAndPlay (4);
} else if (error != null) {
_parent.name = error;
stop();
} else if (test_timeout >= script_timeout) {
_parent.name = "This script has\rtimed out.";
stop();
} else {
if (_parent.name == "Loading....") {
_parent.name = "Loading";
} else {
_parent.name = _parent.name + ".";
}
play();
}
Symbol 462 MovieClip Frame 3
prevFrame();
Symbol 462 MovieClip Frame 4
var pos = my_name.indexOf("|");
while (pos >= 0) {
var start_string = my_name.substr(0, pos);
var end_string = my_name.substr(pos + 1);
my_name = (start_string + "/") + end_string;
pos = my_name.indexOf("|");
}
var i = 1;
var match = 0;
while (eval ("score_" + i) != null) {
_parent.rank = _parent.rank + (i + newline);
_parent.name = _parent.name + (eval ("name_" + i) + newline);
_parent.score = _parent.score + (eval ("score_" + i) + newline);
if (((escape(my_name) == eval ("name_" + i)) && (my_score == eval ("score_" + i))) && (match == 0)) {
match = i;
}
i++;
}
var scores_returned = (i - 1);
if (!score_1) {
_parent.name = "No data yet.";
stop();
}
play();
Symbol 462 MovieClip Frame 5
stop();
Symbol 463 MovieClip Frame 1
if (up == true) {
_parent.rank.scroll = _parent.rank.scroll - 1;
_parent.name.scroll = _parent.name.scroll - 1;
_parent.score.scroll = _parent.score.scroll - 1;
} else if (down == true) {
_parent.rank.scroll = _parent.rank.scroll + 1;
_parent.name.scroll = _parent.name.scroll + 1;
_parent.score.scroll = _parent.score.scroll + 1;
}
play();
Symbol 463 MovieClip Frame 2
prevFrame();
Symbol 464 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 2
stop();
Symbol 465 MovieClip Frame 1
Symbol 465 MovieClip Frame 2
var my_name = eval (my_name);
if ((my_name == "") or (my_name == null)) {
my_name = anonymous_name;
}
var my_score = eval (my_score);
if (my_name != anonymous_name) {
board.gotoAndPlay(2);
} else if (attempt_to_collect_name == 0) {
board.gotoAndPlay(2);
} else {
my_name = "";
}
stop();
Symbol 468 Button
on (release) {
_root.scoretable.board._visible = true;
_visible = 0;
}