Frame 1
ifFrameLoaded (8) {
gotoAndPlay (4);
}
loaded = int(getBytesLoaded() / 460) + "%";
Frame 3
gotoAndPlay (1);
Frame 4
Sel1.gotoAndStop(2);
compPlay = true;
Mouse.show();
stop();
Frame 5
Mouse.hide();
double = new Array(10, 11, 1, -10, -11, -1);
jump = new Array(9, 20, 21, 22, 12, 2, -9, -20, -21, -22, -12, -2);
all = jump.concat(double);
Winner._visible = false;
Mute._visible = false;
attack = false;
compAttack = false;
remove = false;
notRev = true;
player = 4;
computer = 6;
score4 = 3;
score6 = 3;
unselect = 0;
hexx = 0;
lastHexx = 0;
animPos = 1;
Hexx22.gotoAndStop("On1");
Hexx70.gotoAndStop("On1");
Hexx106.gotoAndStop("On1");
Hexx26.gotoAndStop("On2");
Hexx62.gotoAndStop("On2");
Hexx110.gotoAndStop("On2");
Hexx26.HexxButtonP2._visible = false;
Hexx62.HexxButtonP2._visible = false;
Hexx110.HexxButtonP2._visible = false;
var i = 1;
while (i < 133) {
duplicateMovieClip ("Hexx0", "Hexx" + i, i);
i++;
}
s = new Sound();
startDrag ("Turn", true);
Turn.gotoAndStop(3);
Frame 6
function updateGame(newPlayer) {
if (newPlayer) {
score4 = 0;
score6 = 0;
}
var nextPlayer = (((player - 5) < 0) ? 6 : 4);
var noMoves = true;
var i = 22;
while (i < 111) {
if ((newPlayer && (noMoves)) && (eval ("Hexx" + i)._currentframe == nextPlayer)) {
var j = 0;
while (j < 18) {
if (eval ("Hexx" + Number(i + all[j]))._currentframe == 1) {
noMoves = false;
j = 18;
}
j++;
}
}
tellTarget ("Hexx" + i) {
if (_currentframe > 3) {
if ((_currentframe == 5) || (_currentframe == 7)) {
prevFrame();
}
if (newPlayer) {
Set("_root.score" + _currentframe, eval ("_root.score" + _currentframe) + 1);
if ((_root.player == 4) && (!_root.compPlay)) {
HexxButtonP1._visible = false;
HexxButtonP2._visible = true;
} else if (_root.player == 6) {
HexxButtonP1._visible = true;
HexxButtonP2._visible = false;
}
}
} else {
gotoAndStop ("Off");
}
};
i++;
}
if (newPlayer) {
if (noMoves) {
score4 = 0;
score6 = 0;
var i = 22;
while (i < 111) {
tellTarget ("Hexx" + i) {
if (_currentframe == 1) {
gotoAndStop(_root.player);
}
Set("_root.score" + _currentframe, eval ("_root.score" + _currentframe) + 1);
HexxButtonP1._visible = false;
HexxButtonP2._visible = false;
};
i++;
}
Winner._visible = true;
if (score4 == score6) {
Winner.gotoAndStop("Tie");
} else if (score4 > score6) {
Winner.gotoAndPlay("Win4");
player = 6;
} else {
Winner.gotoAndPlay("Win6");
player = 4;
}
}
var b = 4;
while (b < 8) {
tellTarget ("Bar" + b) {
_width = eval ("_root.score" + b);
_x = (357 - (_width / 2));
};
b = b + 2;
}
if (compAttack) {
compAttack = false;
Bulb.play();
}
if (((compPlay && (!noMoves)) && (attack)) && (player != computer)) {
compAttack = true;
} else {
Turn.gotoAndStop(player / 2);
startDrag ("Turn", true);
}
}
}
Frame 7
function playAnim(plyr) {
Turn.gotoAndStop(1);
stopDrag();
if (remove) {
tellTarget ("Hexx" + unselect) {
gotoAndStop ("Off");
};
remove = false;
lastHexx = hexx;
}
notRev = true;
tellTarget ("P" + plyr) {
dirn = _root.hexx - _root.unselect;
mover = _root.unselect;
if ((plyr == 4) && (dirn < 0)) {
mover = _root.hexx;
}
_x = eval (("_root.Hexx" + mover) + "._x");
_y = eval (("_root.Hexx" + mover) + "._y");
var d = 0;
while (d < 6) {
if (dirn == _root.double[d]) {
if (plyr == 6) {
_root.Snd.gotoAndPlay("P2Double");
gotoAndPlay((7 * d) + 9);
} else {
if (dirn > 0) {
gotoAndPlay((17 * d) + 2);
} else {
_root.notRev = false;
gotoAndPlay((17 * d) - 33);
Rewinder.gotoAndPlay(2);
}
_root.Snd.gotoAndPlay("P1Move");
}
}
d++;
}
var d = 0;
while (d < 12) {
if (dirn == _root.jump[d]) {
if (plyr == 6) {
_root.animPos = (7 * d) + 51;
gotoAndPlay (2);
} else {
if (dirn > 0) {
gotoAndPlay((17 * d) + 53);
} else {
_root.notRev = false;
gotoAndPlay((17 * d) - 33);
Rewinder.gotoAndPlay(2);
}
_root.Snd.gotoAndPlay("P1Move");
}
}
d++;
}
};
if (compAttack) {
Bulb.gotoAndStop(1);
}
}
Frame 8
function moveAnim(dest, plyr) {
setProperty("P" + plyr, _x , eval (("Hexx" + dest) + "._x"));
setProperty("P" + plyr, _y , eval (("Hexx" + dest) + "._y"));
}
function attackHexx(dest, plyr) {
var _local3 = plyr;
tellTarget ("Hexx" + dest) {
gotoAndStop(_local3);
};
tellTarget ("P" + _local3) {
gotoAndStop ("Zap");
};
var noAttack = true;
var _local1 = 0;
while (_local1 < 6) {
var _local2 = false;
tellTarget ("Hexx" + Number(dest + double[_local1])) {
if ((_currentframe > 3) && (_currentframe != _local3)) {
noAttack = false;
_local2 = true;
gotoAndStop(_local3);
Wobble.gotoAndStop("Morph");
}
};
setProperty((("P" + _local3) + ".Zap") + double[_local1], _visible , _local2);
_local1++;
}
if (noAttack) {
tellTarget ("P" + _local3) {
gotoAndStop (1);
};
tellTarget (("Hexx" + dest) + ".Wobble") {
gotoAndStop ("Sparkle");
};
}
}
Frame 9
function playerSelect(hexx) {
if (compAttack || (attack && (player == eval ("Hexx" + hexx)._currentframe))) {
return(undefined);
}
_root.hexx = hexx;
attack = false;
remove = false;
tellTarget ("Hexx" + hexx) {
if ((_currentframe == 4) || (_currentframe == 6)) {
_root.player = _currentframe;
_root.unselect = hexx;
nextFrame();
} else if (_currentframe == 2) {
_root.attack = true;
_root.lastHexx = hexx;
} else if (_currentframe == 3) {
_root.remove = true;
_root.attack = true;
_root.lastHexx = hexx;
}
};
updateGame(false);
if (attack) {
playAnim(player);
} else {
Snd.gotoAndPlay("Select");
}
if (lastHexx != hexx) {
lastHexx = hexx;
tellTarget ("Hexx" + hexx) {
nextFrame();
};
var i = 0;
while (i < 6) {
tellTarget ("Hexx" + Number(hexx + double[i])) {
if (_currentframe < 4) {
gotoAndStop ("Double");
}
};
tellTarget ("Hexx" + Number(hexx + jump[i])) {
if (_currentframe < 4) {
gotoAndStop ("Jump");
}
};
tellTarget ("Hexx" + Number(hexx + jump[i + 6])) {
if (_currentframe < 4) {
gotoAndStop ("Jump");
}
};
i++;
}
} else {
lastHexx = 0;
}
}
Frame 10
function findBestMove(compHexx) {
highestRanking = 0;
hexxOrig = 0;
hexxDest = 0;
eqCount = 0;
var check = 0;
while (check < 3) {
var j = 0;
while (j < 6) {
attackCount = 0;
if (check == 0) {
hexxCheck = double[j];
if (Math.round(1.5 * Math.random())) {
attackCount = 0.5;
} else {
attackCount = 1.5;
}
}
if (check == 1) {
hexxCheck = jump[j];
}
if (check == 2) {
hexxCheck = jump[j + 6];
}
var k = 0;
while (k < 6) {
tryDest = compHexx + hexxCheck;
if (eval ("Hexx" + tryDest)._currentframe == 1) {
if (eval ("Hexx" + Number(tryDest + double[k]))._currentframe == player) {
this.attackCount++;
}
}
k++;
}
if (attackCount >= highestRanking) {
if (eval ("Hexx" + tryDest)._currentframe == 1) {
highestRanking = attackCount;
hexxDest = tryDest;
}
}
if (attackCount == highestRanking) {
eqCount = 0;
var k = 0;
while (k < 6) {
if (eval ("Hexx" + Number(compHexx + double[k]))._currentframe == computer) {
eqCount++;
} else {
eqCount--;
}
k++;
}
}
j++;
}
check++;
}
return([highestRanking, compHexx, hexxDest, eqCount]);
}
Frame 11
function computerSelect() {
var _local1 = this;
var _local2 = _root;
thisBest = new Array(0, 0, 0, 0);
bestMove = new Array(0, 0, 0, 0);
i = 22;
while (i < 111) {
compHexx = 0;
tellTarget ("Hexx" + i) {
if (_currentframe == _local2.computer) {
_local1.compHexx = _local1.i;
}
};
if (compHexx != 0) {
thisBest = findBestMove(compHexx);
if (thisBest[0] > bestMove[0]) {
bestMove = thisBest;
} else if (thisBest[0] == bestMove[0]) {
if (thisBest[3] < bestMove[3]) {
bestMove = thisBest;
}
}
}
i++;
}
if (bestMove[0] != 0) {
if ((bestMove[0] - int(bestMove[0])) != 0.5) {
remove = true;
}
unselect = bestMove[1];
hexx = bestMove[2];
player = computer;
playAnim(computer);
}
}
Frame 12
stop();
Symbol 14 Button
on (release) {
gotoAndPlay (5);
}
Symbol 19 Button
on (release) {
getURL ("http://www.neave.com/", "_blank");
}
Symbol 21 Button
on (release) {
Sel1.gotoAndStop(2);
Sel2.gotoAndStop(1);
compPlay = true;
}
Symbol 22 Button
on (release) {
Sel1.gotoAndStop(1);
Sel2.gotoAndStop(2);
compPlay = false;
}
Symbol 33 Button
on (release) {
getURL ("http://www.secretlair.com/arcade", "_top");
}
Symbol 39 Button
on (release) {
getURL ("http://www.neave.com/", "_blank");
}
Symbol 48 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 2
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 3
stop();
Symbol 62 MovieClip Frame 5
stop();
Symbol 62 MovieClip Frame 7
stop();
Symbol 62 MovieClip Frame 9
stop();
Symbol 62 MovieClip Frame 11
stop();
Symbol 62 MovieClip Frame 13
stop();
Symbol 62 MovieClip Frame 15
stop();
Symbol 62 MovieClip Frame 17
stop();
Symbol 62 MovieClip Frame 19
stop();
Symbol 62 MovieClip Frame 21
stop();
Symbol 72 Button
on (release) {
_root.playerSelect(Number(_parent._name.substr(4)));
}
Symbol 91 MovieClip Frame 1
_root.Snd.gotoAndPlay("Ding");
Symbol 91 MovieClip Frame 4
stop();
if (_parent._parent._name == ("Hexx" + _root.hexx)) {
_root.updateGame(true);
}
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 2
play();
Symbol 92 MovieClip Frame 12
tellTarget (("_root.Hexx" + _root.hexx) + ".Wobble") {
if (_currentframe < 2) {
gotoAndStop ("Sparkle");
}
};
play();
Symbol 97 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 2
play();
Symbol 97 MovieClip Frame 9
gotoAndStop (1);
Symbol 97 MovieClip Frame 10
play();
Symbol 97 MovieClip Frame 19
tellTarget (("_root.Hexx" + _root.hexx) + ".Wobble") {
if (_currentframe < 10) {
gotoAndStop ("Attacked");
}
};
play();
Symbol 97 MovieClip Frame 26
_root.Snd.gotoAndPlay("P2Wobble");
Symbol 97 MovieClip Frame 27
play();
Symbol 99 MovieClip Frame 1
stop();
Symbol 108 Button
on (release) {
getURL ("http://www.secretlair.com/ratboy", "_top");
}
Symbol 111 Button
on (release) {
tellTarget ("_root") {
gotoAndStop (4);
};
}
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 21
stop();
Symbol 116 MovieClip Frame 38
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 2
tellTarget (_parent) {
gotoAndStop(_currentframe - 1);
};
Symbol 117 MovieClip Frame 3
if (_parent._currentframe == 1) {
_root.notRev = true;
gotoAndStop (1);
} else {
gotoAndPlay (2);
}
Symbol 121 MovieClip Frame 1
stop();
Symbol 121 MovieClip Frame 2
if (_root.notRev) {
play();
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 18
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 19
if (_root.notRev) {
play();
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 35
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 36
if (_root.notRev) {
play();
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 52
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 53
if (_root.notRev) {
gotoAndPlay (54);
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 69
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 70
if (_root.notRev) {
gotoAndPlay (71);
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 86
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 87
if (_root.notRev) {
gotoAndPlay (88);
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 103
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 104
if (_root.notRev) {
gotoAndPlay (105);
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 120
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 121
if (_root.notRev) {
gotoAndPlay (122);
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 137
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 138
if (_root.notRev) {
gotoAndPlay (139);
} else {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 154
if (_root.notRev) {
gotoAndPlay ("Wobble");
}
Symbol 121 MovieClip Frame 155
_root.moveAnim(_root.hexx, _root.player);
Symbol 121 MovieClip Frame 156
_root.attackHexx(_root.hexx, _root.player);
stop();
Symbol 121 MovieClip Frame 157
play();
Symbol 121 MovieClip Frame 158
_root.Snd.gotoAndPlay("P1PreZap");
Symbol 121 MovieClip Frame 165
_root.Snd.gotoAndPlay("P1Zap");
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 3
_root.Snd.gotoAndPlay("P2PreJump");
Symbol 123 MovieClip Frame 4
gotoAndPlay(_root.animPos);
Symbol 123 MovieClip Frame 9
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 123 MovieClip Frame 11
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 16
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 123 MovieClip Frame 18
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 23
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 123 MovieClip Frame 25
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 30
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 123 MovieClip Frame 32
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 37
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 123 MovieClip Frame 39
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 44
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 123 MovieClip Frame 46
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 53
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 60
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 67
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 74
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 81
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 88
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 95
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 102
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 109
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 116
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 123
gotoAndPlay ("Wobble");
Symbol 123 MovieClip Frame 130
Wobble.gotoAndPlay(2);
_root.moveAnim(_root.hexx, _root.player);
if (_root.animPos > 50) {
_root.Snd.gotoAndPlay("P2LandJump");
}
_root.animPos = 1;
Symbol 123 MovieClip Frame 149
_root.attackHexx(_root.hexx, _root.player);
stop();
Symbol 123 MovieClip Frame 150
play();
Symbol 123 MovieClip Frame 151
_root.Snd.gotoAndPlay("P2Zap");
Symbol 125 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 2
if (!_root.compAttack) {
gotoAndPlay (1);
}
Symbol 126 MovieClip Frame 5
stop();
_root.computerSelect();