Frame 2
stop();
blinkClip = function () {
var _local1 = this;
_local1.i = _local1.i + 0.125;
_local1.i = _local1.i % 1;
_local1._visible = Math.round(_local1.i);
};
compPlay_btn.onRollOver = function () {
dot1_mc.i = 0;
dot1_mc.onEnterFrame = blinkClip;
};
compPlay_btn.onRollOut = (compPlay_btn.onDragOut = function () {
dot1_mc._visible = true;
delete dot1_mc.onEnterFrame;
});
compPlay_btn.onRelease = function () {
twoPlayer = false;
play();
};
twoPlay_btn.onRollOver = function () {
dot2_mc.i = 0;
dot2_mc.onEnterFrame = blinkClip;
};
twoPlay_btn.onRollOut = (twoPlay_btn.onDragOut = function () {
dot2_mc._visible = true;
delete dot2_mc.onEnterFrame;
});
twoPlay_btn.onRelease = function () {
twoPlayer = true;
play();
};
neave_btn.onRollOver = function () {
neave_mc.i = 0;
neave_mc.onEnterFrame = blinkClip;
};
neave_btn.onRollOut = (neave_btn.onDragOut = function () {
neave_mc._visible = true;
delete neave_mc.onEnterFrame;
});
neave_btn.onRelease = function () {
getURL ("http://www.neave.com/games/", "_blank");
};
Frame 3
wins = (losses = (ties = 0));
swapTurn = twoPlayer;
title_btn.onRollOver = function () {
title_mc.i = 0;
title_mc.onEnterFrame = blinkClip;
};
title_btn.onRollOut = (title_btn.onDragOut = function () {
title_mc._visible = true;
delete title_mc.onEnterFrame;
});
title_btn.onRelease = function () {
gotoAndStop (1);
};
checkSquare = function () {
if ((square == 0) && (a == 0)) {
ok = true;
a = turn + 1;
}
if ((square == 1) && (b == 0)) {
ok = true;
b = turn + 1;
}
if ((square == 2) && (c == 0)) {
ok = true;
c = turn + 1;
}
if ((square == 3) && (d == 0)) {
ok = true;
d = turn + 1;
}
if ((square == 4) && (e == 0)) {
ok = true;
e = turn + 1;
}
if ((square == 5) && (f == 0)) {
ok = true;
f = turn + 1;
}
if ((square == 6) && (g == 0)) {
ok = true;
g = turn + 1;
}
if ((square == 7) && (h == 0)) {
ok = true;
h = turn + 1;
}
if ((square == 8) && (i == 0)) {
ok = true;
i = turn + 1;
}
};
findRow = function (x) {
var _local1 = x;
if (a == _local1) {
if ((b == _local1) && (c == _local1)) {
row = _local1;
strike = 1;
}
if ((d == _local1) && (g == _local1)) {
row = _local1;
strike = 4;
}
if ((e == _local1) && (i == _local1)) {
row = _local1;
strike = 7;
}
}
if (((b == _local1) && (e == _local1)) && (h == _local1)) {
row = _local1;
strike = 5;
}
if (c == _local1) {
if ((f == _local1) && (i == _local1)) {
row = _local1;
strike = 6;
}
if ((e == _local1) && (g == _local1)) {
row = _local1;
strike = 8;
}
}
if (((d == _local1) && (e == _local1)) && (f == _local1)) {
row = _local1;
strike = 2;
}
if (((g == _local1) && (h == _local1)) && (i == _local1)) {
row = _local1;
strike = 3;
}
};
checkGame = function () {
findRow(1);
findRow(2);
if ((((((((((row == 0) && (a)) && (b)) && (c)) && (d)) && (e)) && (f)) && (g)) && (h)) && (i)) {
row = 3;
ties++;
}
if (row == 1) {
if (twoPlayer) {
losses++;
} else {
wins++;
}
}
if (row == 2) {
if (twoPlayer) {
wins++;
} else {
losses++;
}
}
if (row) {
gotoAndPlay ("end");
}
};
playerChoice = function (n) {
var _local1 = _root;
if (row == 0) {
if (twoPlayer) {
square = n;
ok = false;
checkSquare();
if (turn == 0) {
turn = 1;
if (ok) {
_local1[("choice" + square) + "_mc"].gotoAndPlay("nought");
}
} else {
turn = 0;
if (ok) {
_local1[("choice" + square) + "_mc"].gotoAndPlay("cross");
}
}
checkGame();
} else {
square = n;
turn = 0;
ok = false;
checkSquare();
if (ok) {
_local1[("choice" + square) + "_mc"].gotoAndPlay("cross");
}
checkGame();
if (ok && (row == 0)) {
compChoice();
}
}
}
};
findGap = function (x) {
var _local1 = x;
if ((!a) && (((((b == _local1) && (c == _local1)) || ((d == _local1) && (g == _local1))) || (e == _local1)) || (i == _local1))) {
square = 0;
}
if ((!b) && (((a == _local1) && (c == _local1)) || ((e == _local1) && (h == _local1)))) {
square = 1;
}
if ((!c) && ((((a == _local1) && (b == _local1)) || ((f == _local1) && (i == _local1))) || ((e == _local1) && (g == _local1)))) {
square = 2;
}
if ((!d) && (((a == _local1) && (g == _local1)) || ((e == _local1) && (f == _local1)))) {
square = 3;
}
if ((!e) && (((((a == _local1) && (i == _local1)) || ((b == _local1) && (h == _local1))) || ((c == _local1) && (g == _local1))) || ((d == _local1) && (f == _local1)))) {
square = 4;
}
if ((!f) && (((e == _local1) && (d == _local1)) || ((c == _local1) && (i == _local1)))) {
square = 5;
}
if ((!g) && ((((a == _local1) && (d == _local1)) || ((c == _local1) && (e == _local1))) || ((h == _local1) && (i == _local1)))) {
square = 6;
}
if ((!h) && (((b == _local1) && (e == _local1)) || ((g == _local1) && (i == _local1)))) {
square = 7;
}
if ((!i) && ((((a == _local1) && (e == _local1)) || ((c == _local1) && (f == _local1))) || ((g == _local1) && (h == _local1)))) {
square = 8;
}
};
compChoice = function () {
ok = false;
turn = 1;
findGap(2);
findGap(1);
checkSquare();
while (!ok) {
square = int(Math.random() * 9);
checkSquare();
}
_root[("choice" + square) + "_mc"].gotoAndPlay("nought");
checkGame();
};
Frame 5
swapTurn = !swapTurn;
a = (b = (c = (d = (e = (f = (g = (h = (i = (x = (row = (strike = (turn = 0))))))))))));
ok = false;
Frame 6
stop();
if (swapTurn) {
if (twoPlayer) {
if (turn == 0) {
turn = 1;
} else {
turn = 0;
}
} else {
compChoice();
}
}
Instance of Symbol 52 MovieClip "Grid" in Frame 15
onClipEvent (load) {
_visible = _root.strike;
}
Frame 16
if (strike) {
sound_mc.gotoAndPlay("end");
} else {
sound_mc.gotoAndPlay("tie");
}
Instance of Symbol 52 MovieClip "Grid" in Frame 21
onClipEvent (load) {
_visible = _root.strike;
}
Frame 24
stop();
gameOver_btn.onPress = function () {
gotoAndPlay ("new");
};
Symbol 10 Button
on (release) {
_root.play();
}
Symbol 11 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 11 MovieClip Frame 2
gotoAndPlay (1);
Symbol 31 MovieClip Frame 1
if (_root.twoPlayer) {
gotoAndStop (2);
} else {
stop();
}
Symbol 34 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 3
stop();
Symbol 34 MovieClip Frame 5
stop();
Symbol 51 MovieClip Frame 1
stop();
num = Number(substring(_name, 7, 1));
if (_root.twoPlayer) {
this.onRollOver = function () {
if (_root.row == 0) {
if (_root.turn == 0) {
nought_mc._visible = true;
cross_mc._visible = false;
} else {
nought_mc._visible = false;
cross_mc._visible = true;
}
}
};
this.onRollOut = (this.onDragOut = function () {
nought_mc._visible = (cross_mc._visible = false);
});
}
this.onPress = function () {
_root.playerChoice(num);
};
Instance of Symbol 37 MovieClip "cross_mc" in Symbol 51 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 39 MovieClip "nought_mc" in Symbol 51 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 51 MovieClip Frame 2
delete this.onPress;
if (_root.twoPlayer) {
gotoAndPlay ("now");
}
Symbol 51 MovieClip Frame 14
stop();
Symbol 51 MovieClip Frame 15
delete this.onPress;
Symbol 51 MovieClip Frame 19
stop();
Symbol 55 MovieClip Frame 1
gotoAndStop(_root.strike + 2);