Frame 1
function RollIt() {
if (_root.steen1._currentframe < 7) {
tellTarget (_root.steen1) {
rolMeMaar();
};
}
if (_root.steen2._currentframe < 7) {
tellTarget (_root.steen2) {
rolMeMaar();
};
}
if (_root.steen3._currentframe < 7) {
tellTarget (_root.steen3) {
rolMeMaar();
};
}
if (_root.steen4._currentframe < 7) {
tellTarget (_root.steen4) {
rolMeMaar();
};
}
if (_root.steen5._currentframe < 7) {
tellTarget (_root.steen5) {
rolMeMaar();
};
}
}
function watZijnDeStenen() {
if (_root.steen1._currentframe < 7) {
_root.steenWaarde1 = _root.steen1._currentframe;
} else {
_root.steenWaarde1 = _root.steen1._currentframe - 6;
}
if (_root.steen2._currentframe < 7) {
_root.steenWaarde2 = _root.steen2._currentframe;
} else {
_root.steenWaarde2 = _root.steen2._currentframe - 6;
}
if (_root.steen3._currentframe < 7) {
_root.steenWaarde3 = _root.steen3._currentframe;
} else {
_root.steenWaarde3 = _root.steen3._currentframe - 6;
}
if (_root.steen4._currentframe < 7) {
_root.steenWaarde4 = _root.steen4._currentframe;
} else {
_root.steenWaarde4 = _root.steen4._currentframe - 6;
}
if (_root.steen5._currentframe < 7) {
_root.steenWaarde5 = _root.steen5._currentframe;
} else {
_root.steenWaarde5 = _root.steen5._currentframe - 6;
}
}
function checkVelden() {
i = 1;
while (i < 7) {
if (eval (("_root.A" + i) + "._currentframe") != 3) {
tellTarget ("_root.A" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 7) {
if (eval (("_root.B" + i) + "._currentframe") != 3) {
tellTarget ("_root.B" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 7) {
if (eval (("_root.C" + i) + "._currentframe") != 3) {
tellTarget ("_root.C" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.T" + i) + "._currentframe") != 3) {
tellTarget ("_root.T" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.Q" + i) + "._currentframe") != 3) {
tellTarget ("_root.Q" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.F" + i) + "._currentframe") != 3) {
tellTarget ("_root.F" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.K" + i) + "._currentframe") != 3) {
tellTarget ("_root.K" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.G" + i) + "._currentframe") != 3) {
tellTarget ("_root.G" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.Y" + i) + "._currentframe") != 3) {
tellTarget ("_root.Y" + i) {
gotoAndStop (2);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.X" + i) + "._currentframe") != 3) {
tellTarget ("_root.X" + i) {
gotoAndStop (2);
};
}
i++;
}
}
function totaalBerekenen() {
_root.A7.txtAantal = 0;
_root.B7.txtAantal = 0;
_root.C7.txtAantal = 0;
i = 1;
while (i < 7) {
_root.A7.txtAantal = parseInt(_root.A7.txtAantal) + parseInt(eval (("_root.A" + i) + ".txtAantal"));
_root.B7.txtAantal = parseInt(_root.B7.txtAantal) + parseInt(eval (("_root.B" + i) + ".txtAantal"));
_root.C7.txtAantal = parseInt(_root.C7.txtAantal) + parseInt(eval (("_root.C" + i) + ".txtAantal"));
i++;
}
if (_root.A7.txtAantal >= 63) {
_root.A8.txtAantal = 35;
}
_root.A9.txtAantal = parseInt(_root.A7.txtAantal) + parseInt(_root.A8.txtAantal);
_root.A18.txtAantal = _root.A9.txtAantal;
if (_root.B7.txtAantal >= 63) {
_root.B8.txtAantal = 35;
}
_root.B9.txtAantal = parseInt(_root.B7.txtAantal) + parseInt(_root.B8.txtAantal);
_root.B18.txtAantal = _root.B9.txtAantal;
if (_root.C7.txtAantal >= 63) {
_root.C8.txtAantal = 35;
}
_root.C9.txtAantal = parseInt(_root.C7.txtAantal) + parseInt(_root.C8.txtAantal);
_root.C18.txtAantal = _root.C9.txtAantal;
_root.A17.txtAantal = (((((parseInt(_root.T1.txtAantal) + parseInt(_root.Q1.txtAantal)) + parseInt(_root.F1.txtAantal)) + parseInt(_root.K1.txtAantal)) + parseInt(_root.G1.txtAantal)) + parseInt(_root.Y1.txtAantal)) + parseInt(_root.X1.txtAantal);
_root.B17.txtAantal = (((((parseInt(_root.T2.txtAantal) + parseInt(_root.Q2.txtAantal)) + parseInt(_root.F2.txtAantal)) + parseInt(_root.K2.txtAantal)) + parseInt(_root.G2.txtAantal)) + parseInt(_root.Y2.txtAantal)) + parseInt(_root.X2.txtAantal);
_root.C17.txtAantal = (((((parseInt(_root.T3.txtAantal) + parseInt(_root.Q3.txtAantal)) + parseInt(_root.F3.txtAantal)) + parseInt(_root.K3.txtAantal)) + parseInt(_root.G3.txtAantal)) + parseInt(_root.Y3.txtAantal)) + parseInt(_root.X3.txtAantal);
_root.A19.txtAantal = parseInt(_root.A17.txtAantal) + parseInt(_root.A18.txtAantal);
_root.B19.txtAantal = parseInt(_root.B17.txtAantal) + parseInt(_root.B18.txtAantal);
_root.C19.txtAantal = parseInt(_root.C17.txtAantal) + parseInt(_root.C18.txtAantal);
_root.txtGrandTotal = (parseInt(_root.A19.txtAantal) + parseInt(_root.B19.txtAantal)) + parseInt(_root.C19.txtAantal);
}
function addAantal(nummer) {
var aantal = 0;
trace("addAantal");
if (_root.steenWaarde1 == nummer) {
aantal = parseInt(aantal) + parseInt(nummer);
}
if (_root.steenWaarde2 == nummer) {
aantal = parseInt(aantal) + parseInt(nummer);
}
if (_root.steenWaarde3 == nummer) {
aantal = parseInt(aantal) + parseInt(nummer);
}
if (_root.steenWaarde4 == nummer) {
aantal = parseInt(aantal) + parseInt(nummer);
}
if (_root.steenWaarde5 == nummer) {
aantal = parseInt(aantal) + parseInt(nummer);
}
trace(aantal);
return(aantal);
}
function nrMatches(nummer) {
var matches = 0;
if (_root.steenWaarde1 == nummer) {
matches = parseInt(matches) + 1;
}
if (_root.steenWaarde2 == nummer) {
matches = parseInt(matches) + 1;
}
if (_root.steenWaarde3 == nummer) {
matches = parseInt(matches) + 1;
}
if (_root.steenWaarde4 == nummer) {
matches = parseInt(matches) + 1;
}
if (_root.steenWaarde5 == nummer) {
matches = parseInt(matches) + 1;
}
trace("matches " + nummer);
trace(matches);
return(matches);
}
function addTripple() {
if ((((((2 < nrMatches(1)) or (2 < nrMatches(2))) or (2 < nrMatches(3))) or (2 < nrMatches(4))) or (2 < nrMatches(5))) or (2 < nrMatches(6))) {
return((((parseInt(_root.steenWaarde1) + parseInt(_root.steenWaarde2)) + parseInt(_root.steenWaarde3)) + parseInt(_root.steenWaarde4)) + parseInt(_root.steenWaarde5));
}
return(0);
}
function addQuad() {
if ((((((3 < nrMatches(1)) or (3 < nrMatches(2))) or (3 < nrMatches(3))) or (3 < nrMatches(4))) or (3 < nrMatches(5))) or (3 < nrMatches(6))) {
return((((parseInt(_root.steenWaarde1) + parseInt(_root.steenWaarde2)) + parseInt(_root.steenWaarde3)) + parseInt(_root.steenWaarde4)) + parseInt(_root.steenWaarde5));
}
return(0);
}
function addGroteStraat() {
if (nrMatches(1) == 0) {
if (((((nrMatches(2) == 1) and (nrMatches(3) == 1)) and (nrMatches(4) == 1)) and (nrMatches(5) == 1)) and (nrMatches(6) == 1)) {
return(40);
}
return(0);
}
if (nrMatches(6) == 0) {
if (((((nrMatches(2) == 1) and (nrMatches(3) == 1)) and (nrMatches(4) == 1)) and (nrMatches(5) == 1)) and (nrMatches(1) == 1)) {
return(40);
}
return(0);
}
return(0);
}
function addYahtzee() {
if ((((((nrMatches(1) == 5) or (nrMatches(2) == 5)) or (nrMatches(3) == 5)) or (nrMatches(4) == 5)) or (nrMatches(5) == 5)) or (nrMatches(6) == 5)) {
return(50);
}
return(0);
}
function addChance() {
return(((((addAantal(1) + addAantal(2)) + addAantal(3)) + addAantal(4)) + addAantal(5)) + addAantal(6));
}
function addFullHouse() {
if ((((((nrMatches(1) == 3) or (nrMatches(2) == 3)) or (nrMatches(3) == 3)) or (nrMatches(4) == 3)) or (nrMatches(5) == 3)) or (nrMatches(6) == 3)) {
if ((((((nrMatches(1) == 2) or (nrMatches(2) == 2)) or (nrMatches(3) == 2)) or (nrMatches(4) == 2)) or (nrMatches(5) == 2)) or (nrMatches(6) == 2)) {
return(25);
}
}
return(0);
}
function addKleineStraat() {
if ((((0 < nrMatches(1)) and (0 < nrMatches(2))) and (0 < nrMatches(3))) and (0 < nrMatches(4))) {
return(30);
}
if ((((0 < nrMatches(2)) and (0 < nrMatches(3))) and (0 < nrMatches(4))) and (0 < nrMatches(5))) {
return(30);
}
if ((((0 < nrMatches(3)) and (0 < nrMatches(4))) and (0 < nrMatches(5))) and (0 < nrMatches(6))) {
return(30);
}
return(0);
}
function newGame() {
i = 1;
while (i < 7) {
Set(("_root.A" + i) + ".txtAantal", 0);
tellTarget ("_root.A" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 7) {
Set(("_root.B" + i) + ".txtAantal", 0);
tellTarget ("_root.B" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 7) {
Set(("_root.C" + i) + ".txtAantal", 0);
tellTarget ("_root.C" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 4) {
Set(("_root.T" + i) + ".txtAantal", 0);
tellTarget ("_root.T" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 4) {
Set(("_root.Q" + i) + ".txtAantal", 0);
tellTarget ("_root.Q" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 4) {
Set(("_root.F" + i) + ".txtAantal", 0);
tellTarget ("_root.F" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 4) {
Set(("_root.K" + i) + ".txtAantal", 0);
tellTarget ("_root.k" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 4) {
Set(("_root.G" + i) + ".txtAantal", 0);
tellTarget ("_root.G" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 4) {
Set(("_root.Y" + i) + ".txtAantal", 0);
tellTarget ("_root.Y" + i) {
gotoAndStop (1);
};
i++;
}
i = 1;
while (i < 4) {
Set(("_root.X" + i) + ".txtAantal", 0);
tellTarget ("_root.X" + i) {
gotoAndStop (1);
};
i++;
}
_root.A8.txtAantal = 0;
_root.B8.txtAantal = 0;
_root.C8.txtAantal = 0;
totaalBerekenen();
initStenen();
_root.txtAantalScores = 0;
loadVariables ("http://www.eyegrid.com/yahtzee/getYscores.cfm", _root.TopTien);
}
function schakelButtonsUit() {
i = 1;
while (i < 7) {
if (eval (("_root.A" + i) + "._currentframe") != 3) {
tellTarget ("_root.A" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 7) {
if (eval (("_root.B" + i) + "._currentframe") != 3) {
tellTarget ("_root.B" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 7) {
if (eval (("_root.C" + i) + "._currentframe") != 3) {
tellTarget ("_root.C" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.T" + i) + "._currentframe") != 3) {
tellTarget ("_root.T" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.Q" + i) + "._currentframe") != 3) {
tellTarget ("_root.Q" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.F" + i) + "._currentframe") != 3) {
tellTarget ("_root.F" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.K" + i) + "._currentframe") != 3) {
tellTarget ("_root.K" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.G" + i) + "._currentframe") != 3) {
tellTarget ("_root.G" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.Y" + i) + "._currentframe") != 3) {
tellTarget ("_root.Y" + i) {
gotoAndStop (1);
};
}
i++;
}
i = 1;
while (i < 4) {
if (eval (("_root.X" + i) + "._currentframe") != 3) {
tellTarget ("_root.X" + i) {
gotoAndStop (1);
};
}
i++;
}
initStenen();
}
function initStenen() {
_root.txtAantalWorpen = 1;
tellTarget (_root.WitButtonVlak) {
gotoAndStop (1);
};
i = 1;
while (i < 6) {
if (6 < parseInt(eval (("_root.steen" + i) + "._currentframe"))) {
var spring = parseInt(eval (("_root.steen" + i) + "._currentframe") - 6);
tellTarget (eval ("_root.steen" + i)) {
gotoAndStop(spring);
};
}
i++;
}
_root.txtRollend = 0;
}
function Einde() {
if (parseInt(_root.txtGrandTotal) >= parseInt(_root.TopTien.txtTopScore10)) {
tellTarget (_root.winScherm) {
gotoAndPlay (2);
};
}
trace("Einde");
}
Symbol 5 Button
on (release) {
getURL ("http://www.EyeGrid.com", "_self");
}
Symbol 8 MovieClip Frame 1
stop();
Symbol 33 Button
on (release) {
if (parseInt(_root.txtAantalWorpen) < 4) {
trace("//" + _root.txtRollend);
if (_root.txtRollend == 0) {
_root.txtRollend = 1;
_root.RollIt();
_root.checkVelden();
_root.txtAantalWorpen = parseInt(_root.txtAantalWorpen) + 1;
if (3 < _root.txtAantalWorpen) {
tellTarget (_root.WitButtonVlak) {
gotoAndStop (2);
};
} else {
tellTarget (_root.WitButtonVlak) {
gotoAndStop (1);
};
}
}
}
}
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 2
stop();
Symbol 39 Button
on (release) {
if (1 < _root.txtAantalWorpen) {
if (6 < _currentframe) {
gotoAndStop(_currentframe - 6);
} else {
gotoAndStop(_currentframe + 6);
}
}
}
Symbol 42 MovieClip Frame 1
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 1);
function rolMeMaar() {
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 0);
gotoAndPlay(14 + random(6));
}
stop();
Symbol 42 MovieClip Frame 2
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 2);
Symbol 42 MovieClip Frame 3
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 3);
Symbol 42 MovieClip Frame 4
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 4);
Symbol 42 MovieClip Frame 5
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 5);
Symbol 42 MovieClip Frame 6
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 6);
Symbol 42 MovieClip Frame 7
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 1);
Symbol 42 MovieClip Frame 8
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 2);
Symbol 42 MovieClip Frame 9
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 3);
Symbol 42 MovieClip Frame 10
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 4);
Symbol 42 MovieClip Frame 11
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 5);
Symbol 42 MovieClip Frame 12
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 6);
Symbol 42 MovieClip Frame 14
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 0);
Symbol 42 MovieClip Frame 32
_root.txtRollend = 0;
gotoAndStop(random(6) + 1);
Symbol 43 MovieClip Frame 1
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 1);
function rolMeMaar() {
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 0);
gotoAndPlay(14 + random(6));
}
stop();
Symbol 43 MovieClip Frame 2
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 2);
Symbol 43 MovieClip Frame 3
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 3);
Symbol 43 MovieClip Frame 4
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 4);
Symbol 43 MovieClip Frame 5
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 5);
Symbol 43 MovieClip Frame 6
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 6);
Symbol 43 MovieClip Frame 7
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 1);
Symbol 43 MovieClip Frame 8
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 2);
Symbol 43 MovieClip Frame 9
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 3);
Symbol 43 MovieClip Frame 10
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 4);
Symbol 43 MovieClip Frame 11
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 5);
Symbol 43 MovieClip Frame 12
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 6);
Symbol 43 MovieClip Frame 14
Set("_root.steenWaarde" + (substring(this._name, 6, 1)), 0);
Symbol 43 MovieClip Frame 32
_root.txtRollend = 0;
gotoAndStop(random(6) + 1);
Symbol 48 Button
on (release) {
trace(substring(this._name, 2, 1));
if ((((substring(this._name, 1, 1)) == "A") or ((substring(this._name, 1, 1)) == "B")) or ((substring(this._name, 1, 1)) == "C")) {
Set(("_root." + this._name) + ".txtAantal", _root.addAantal(substring(this._name, 2, 1)));
} else if ((substring(this._name, 1, 1)) == "T") {
Set(("_root." + this._name) + ".txtAantal", _root.addTripple());
} else if ((substring(this._name, 1, 1)) == "Q") {
Set(("_root." + this._name) + ".txtAantal", _root.addQuad());
} else if ((substring(this._name, 1, 1)) == "G") {
Set(("_root." + this._name) + ".txtAantal", _root.addGroteStraat());
} else if ((substring(this._name, 1, 1)) == "Y") {
Set(("_root." + this._name) + ".txtAantal", _root.addYahtzee());
} else if ((substring(this._name, 1, 1)) == "X") {
Set(("_root." + this._name) + ".txtAantal", _root.addChance());
} else if ((substring(this._name, 1, 1)) == "F") {
Set(("_root." + this._name) + ".txtAantal", _root.addFullHouse());
} else if ((substring(this._name, 1, 1)) == "K") {
Set(("_root." + this._name) + ".txtAantal", _root.addKleineStraat());
}
_root.totaalBerekenen();
trace("XXXXX" + parseInt(_root.txtAantalScores + 1));
gotoAndStop (3);
_root.txtAantalScores = parseInt(_root.txtAantalScores) + 1;
_root.schakelButtonsUit();
if (_root.txtAantalScores == 39) {
_root.Einde();
}
}
Symbol 50 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 1
stop();
Symbol 61 Button
on (release) {
newGame();
}
Symbol 63 Button
on (release) {
tellTarget (_root.TopTien) {
gotoAndPlay (2);
};
}
Symbol 72 Button
on (release) {
loadVariablesNum ((((("http://www.eyegrid.com/yahtzee/cwq.cfm?dhf=" + txtWinName) + "&bbw=") + txtWinCountry) + "&sx=") + _root.txtGrandTotal, 0);
gotoAndStop (1);
}
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 2
stop();
Symbol 121 Button
on (release) {
gotoAndStop (1);
}
Symbol 122 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 2
loadVariables ("http://www.eyegrid.com/yahtzee/getYscores.cfm", _root.TopTien);
Symbol 122 MovieClip Frame 10
stop();