Frame 1
sofar = this.getBytesLoaded();
total = this.getBytesTotal();
pc = int((sofar / total) * 100) + "%";
if (sofar == total) {
gotoAndStop (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
fscommand ("showmenu", false);
Sel1.gotoAndStop(2);
compPlay = true;
Mouse.show();
Frame 4
function updateGame(newPlayer) {
if (newPlayer) {
score4 = (score6 = 0);
}
var nextPlayer = ((player < 5) ? 6 : 4);
var noMoves = true;
var i = 22;
while (i < 111) {
if ((newPlayer && (noMoves)) && (_root["Hexx" + i]._currentframe == nextPlayer)) {
var j = 0;
while (j < 18) {
if (_root["Hexx" + (all[j] + i)]._currentframe == 1) {
noMoves = false;
j = 18;
}
j++;
}
}
tellTarget ("Hexx" + i) {
if (3 < _currentframe) {
if ((_currentframe == 5) || (_currentframe == 7)) {
prevFrame();
}
if (newPlayer) {
_root["score" + _currentframe]++;
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 = (score6 = 0);
var i = 22;
while (i < 111) {
tellTarget ("Hexx" + i) {
if (_currentframe == 1) {
gotoAndStop(_root.player);
}
_root["score" + _currentframe]++;
HexxButtonP1._visible = (HexxButtonP2._visible = false);
};
i++;
}
if (score4 == score6) {
Winner.gotoAndStop("Tie");
} else if (score6 < score4) {
Winner.gotoAndPlay("Win4");
player = 6;
} else {
Winner.gotoAndPlay("Win6");
player = 4;
}
Winner._visible = true;
}
var b = 4;
while (b < 8) {
tellTarget ("Bar" + b) {
_width = _root["score" + b];
_x = (362 - (_width / 2));
};
b = b + 2;
}
if (compAttack) {
Bulb.play();
}
compAttack = false;
if (((compPlay && (!noMoves)) && (attack)) && (player != computer)) {
compAttack = true;
} else {
Turn.gotoAndStop(player / 2);
startDrag ("Turn", true);
}
}
}
function playAnim(plyr) {
Turn.gotoAndStop(1);
stopDrag();
if (remove) {
_root["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 = _root["Hexx" + mover]._x;
_y = _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 (0 < dirn) {
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 (0 < dirn) {
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);
}
}
function moveAnim(dest, plyr) {
_root["P" + plyr]._x = _root["Hexx" + dest]._x;
_root["P" + plyr]._y = _root["Hexx" + dest]._y;
}
function attackHexx(dest, plyr) {
_root["Hexx" + dest].gotoAndStop(plyr);
_root["P" + plyr].gotoAndStop("Zap");
var noAttack = true;
var i = 0;
while (i < 6) {
var toZap = false;
tellTarget ("Hexx" + (dest + double[i])) {
if ((3 < _currentframe) && (_currentframe != plyr)) {
noAttack = false;
toZap = true;
gotoAndStop(plyr);
Wobble.gotoAndStop("Morph");
}
};
_root["P" + plyr]["Zap" + double[i]]._visible = toZap;
i++;
}
if (noAttack) {
_root["P" + plyr].gotoAndStop(1);
_root["Hexx" + dest].Wobble.gotoAndStop("Sparkle");
}
}
function playerSelect(hexx) {
if (compAttack || (attack && (player == _root["Hexx" + hexx]._currentframe))) {
return(undefined);
}
_root.hexx = hexx;
attack = (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.attack = (_root.remove = true);
_root.lastHexx = hexx;
}
};
updateGame(false);
if (attack) {
playAnim(player);
} else {
Snd.gotoAndPlay("Select");
}
if (lastHexx != hexx) {
lastHexx = hexx;
_root["Hexx" + hexx].nextFrame();
var i = 0;
while (i < 6) {
tellTarget ("Hexx" + (hexx + double[i])) {
if (_currentframe < 4) {
gotoAndStop ("Double");
}
};
tellTarget ("Hexx" + (hexx + jump[i])) {
if (_currentframe < 4) {
gotoAndStop ("Jump");
}
};
tellTarget ("Hexx" + (hexx + jump[i + 6])) {
if (_currentframe < 4) {
gotoAndStop ("Jump");
}
};
i++;
}
} else {
lastHexx = 0;
}
}
function findBestMove(compHexx) {
highestRanking = (hexxOrig = (hexxDest = (eqCount = 0)));
var check = 0;
while (check < 3) {
var j = 0;
while (j < 6) {
attackCount = 0;
var _local1 = 0;
switch (check) {
case _local1 :
hexxCheck = double[j];
if (Math.round(Math.random() * 1.5)) {
attackCount = 0.5;
} else {
attackCount = 1.5;
}
break;
case 1 :
hexxCheck = jump[j];
break;
case 2 :
hexxCheck = jump[j + 6];
}
var k = 0;
while (k < 6) {
tryDest = compHexx + hexxCheck;
if (_root["Hexx" + tryDest]._currentframe == 1) {
if (_root["Hexx" + (tryDest + double[k])]._currentframe == player) {
this.attackCount++;
}
}
k++;
}
if (attackCount >= highestRanking) {
if (_root["Hexx" + tryDest]._currentframe == 1) {
highestRanking = attackCount;
hexxDest = tryDest;
}
}
if (attackCount == highestRanking) {
eqCount = 0;
var k = 0;
while (k < 6) {
if (_root["Hexx" + (compHexx + double[k])]._currentframe == computer) {
eqCount++;
} else {
eqCount--;
}
k++;
}
}
j++;
}
check++;
}
return([highestRanking, compHexx, hexxDest, eqCount]);
}
function computerSelect() {
thisBest = new Array(0, 0, 0, 0);
bestMove = new Array(0, 0, 0, 0);
var i = 22;
while (i < 111) {
compHexx = 0;
if (_root["Hexx" + i]._currentframe == computer) {
compHexx = i;
}
if (compHexx) {
thisBest = findBestMove(compHexx);
if (bestMove[0] < thisBest[0]) {
bestMove = thisBest;
} else if ((thisBest[0] == bestMove[0]) && (thisBest[3] < bestMove[3])) {
bestMove = thisBest;
}
}
i++;
}
if (bestMove[0]) {
if ((bestMove[0] - int(bestMove[0])) != 0.5) {
remove = true;
}
unselect = bestMove[1];
hexx = bestMove[2];
player = computer;
playAnim(computer);
}
}
stop();
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);
attack = (compAttack = (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 = (Hexx62.HexxButtonP2._visible = (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);
Instance of Symbol 50 MovieClip "Mute" in Frame 4
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 99 MovieClip "Winner" in Frame 4
onClipEvent (load) {
_visible = false;
}
Symbol 10 Button
on (release) {
getURL ("http://www.neave.com/games/", "_blank");
}
Symbol 14 MovieClip Frame 1
stop();
Symbol 26 Button
on (release) {
Sel1.gotoAndStop(2);
Sel2.gotoAndStop(1);
compPlay = true;
}
Symbol 27 Button
on (release) {
Sel1.gotoAndStop(1);
Sel2.gotoAndStop(2);
compPlay = false;
}
Symbol 30 Button
on (release, keyPress "<Enter>") {
play();
}
Symbol 33 MovieClip Frame 2
stop();
Symbol 36 Button
on (release) {
Winner.gotoAndStop(1);
Winner._visible = true;
}
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 3
stop();
Symbol 47 MovieClip Frame 5
stop();
Symbol 47 MovieClip Frame 7
stop();
Symbol 47 MovieClip Frame 9
stop();
Symbol 47 MovieClip Frame 11
stop();
Symbol 47 MovieClip Frame 13
stop();
Symbol 47 MovieClip Frame 15
stop();
Symbol 47 MovieClip Frame 17
stop();
Symbol 47 MovieClip Frame 19
stop();
Symbol 49 Button
on (release) {
if (s.getVolume() == 0) {
s.setVolume(100);
Mute._visible = false;
} else {
s.setVolume(0);
Mute._visible = true;
}
}
Symbol 56 Button
on (release) {
_root.playerSelect(Number(_parent._name.substr(4)));
}
Symbol 59 MovieClip Frame 1
_root.Snd.gotoAndPlay("Ding");
Symbol 59 MovieClip Frame 11
stop();
if (_parent._parent._name == ("Hexx" + _root.hexx)) {
_root.updateGame(true);
}
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 2
play();
Symbol 60 MovieClip Frame 18
tellTarget (("_root.Hexx" + _root.hexx) + ".Wobble") {
if (_currentframe < 2) {
gotoAndStop ("Sparkle");
}
};
play();
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 2
play();
Symbol 62 MovieClip Frame 9
gotoAndStop (1);
Symbol 62 MovieClip Frame 10
play();
Symbol 62 MovieClip Frame 23
tellTarget (("_root.Hexx" + _root.hexx) + ".Wobble") {
if (_currentframe < 10) {
gotoAndStop ("Attacked");
}
};
play();
Symbol 62 MovieClip Frame 30
_root.Snd.gotoAndPlay("P2Wobble");
Symbol 62 MovieClip Frame 39
play();
Symbol 64 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 2
tellTarget (_parent) {
gotoAndStop(_currentframe - 1);
};
Symbol 65 MovieClip Frame 3
if (_parent._currentframe == 1) {
_root.notRev = true;
gotoAndStop (1);
} else {
gotoAndPlay (2);
}
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 2
if (_root.notRev) {
play();
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 18
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 19
if (_root.notRev) {
play();
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 35
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 36
if (_root.notRev) {
play();
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 52
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 53
if (_root.notRev) {
gotoAndPlay (54);
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 69
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 70
if (_root.notRev) {
gotoAndPlay (71);
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 86
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 87
if (_root.notRev) {
gotoAndPlay (88);
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 103
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 104
if (_root.notRev) {
gotoAndPlay (105);
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 120
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 121
if (_root.notRev) {
gotoAndPlay (122);
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 137
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 138
if (_root.notRev) {
gotoAndPlay (139);
} else {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 154
if (_root.notRev) {
gotoAndPlay (155);
}
Symbol 82 MovieClip Frame 155
_root.moveAnim(_root.hexx, _root.player);
Symbol 82 MovieClip Frame 156
_root.attackHexx(_root.hexx, _root.player);
stop();
Symbol 82 MovieClip Frame 157
play();
Symbol 82 MovieClip Frame 158
_root.Snd.gotoAndPlay("P1PreZap");
Symbol 82 MovieClip Frame 165
_root.Snd.gotoAndPlay("P1Zap");
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 6
_root.Snd.gotoAndPlay("P2PreJump");
Symbol 85 MovieClip Frame 8
gotoAndPlay(_root.animPos);
Symbol 85 MovieClip Frame 13
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 85 MovieClip Frame 15
gotoAndPlay (134);
Symbol 85 MovieClip Frame 20
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 85 MovieClip Frame 22
gotoAndPlay (134);
Symbol 85 MovieClip Frame 27
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 85 MovieClip Frame 29
gotoAndPlay (134);
Symbol 85 MovieClip Frame 34
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 85 MovieClip Frame 36
gotoAndPlay (134);
Symbol 85 MovieClip Frame 41
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 85 MovieClip Frame 43
gotoAndPlay (134);
Symbol 85 MovieClip Frame 48
tellTarget (("_root.Hexx" + _root.unselect) + ".Wobble") {
gotoAndPlay (2);
};
Symbol 85 MovieClip Frame 50
gotoAndPlay (134);
Symbol 85 MovieClip Frame 57
gotoAndPlay (134);
Symbol 85 MovieClip Frame 64
gotoAndPlay (134);
Symbol 85 MovieClip Frame 71
gotoAndPlay (134);
Symbol 85 MovieClip Frame 78
gotoAndPlay (134);
Symbol 85 MovieClip Frame 85
gotoAndPlay (134);
Symbol 85 MovieClip Frame 92
gotoAndPlay (134);
Symbol 85 MovieClip Frame 99
gotoAndPlay (134);
Symbol 85 MovieClip Frame 106
gotoAndPlay (134);
Symbol 85 MovieClip Frame 113
gotoAndPlay (134);
Symbol 85 MovieClip Frame 120
gotoAndPlay (134);
Symbol 85 MovieClip Frame 127
gotoAndPlay (134);
Symbol 85 MovieClip Frame 134
Wobble.gotoAndPlay(2);
_root.moveAnim(_root.hexx, _root.player);
if (50 < _root.animPos) {
_root.Snd.gotoAndPlay("P2LandJump");
}
_root.animPos = 1;
Symbol 85 MovieClip Frame 142
_root.attackHexx(_root.hexx, _root.player);
stop();
Symbol 85 MovieClip Frame 143
play();
Symbol 85 MovieClip Frame 144
_root.Snd.gotoAndPlay("P2Zap");
Symbol 87 MovieClip Frame 2
if (!_root.compAttack) {
gotoAndPlay (1);
}
Symbol 87 MovieClip Frame 5
stop();
_root.computerSelect();
Symbol 92 Button
on (release, keyPress "y") {
_root.gotoAndStop("Loaded");
}
Symbol 94 Button
on (release, keyPress "n") {
_visible = false;
}
Symbol 96 Button
on (release) {
gotoAndPlay (43);
}
Symbol 98 Button
on (release) {
_root.gotoAndStop("Loaded");
}
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 22
stop();
Symbol 99 MovieClip Frame 42
stop();
Symbol 99 MovieClip Frame 48
stop();
Symbol 102 MovieClip Frame 1
stop();