Frame 1
trace("game loaded");
play();
function setvolume(v) {
trace("set volume called by game - level " + v);
toy.game.setvolume();
}
function replay() {
toy.p1buttons._visible = true;
if (_level0.players == 2) {
toy.p2buttons._visible = true;
}
toy.game.playedonce = true;
toy.game.gotoAndPlay(1);
toy.game.mygameoverbox.removeMovieClip();
}
function keycheck(keychar, keynum) {
if ((1 < keynum) and (p1leftkeychar eq keychar)) {
return(false);
}
if ((2 < keynum) and (p1middlekeychar eq keychar)) {
return(false);
}
if ((3 < keynum) and (p1rightkeychar eq keychar)) {
return(false);
}
if ((4 < keynum) and (p2leftkeychar eq keychar)) {
return(false);
}
if ((5 < keynum) and (p2middlekeychar eq keychar)) {
return(false);
}
return(true);
}
Frame 2
if (this.getBytesLoaded() == this.getBytesTotal()) {
gotoAndPlay (4);
}
Frame 3
gotoAndPlay (2);
Frame 4
if (_level0.online == 1) {
_level0.gamepreloader.gotoAndStop(1);
gotoAndStop (6);
} else {
gotoAndStop (16);
}
Frame 6
stop();
_root.loaded = 1;
p1leftkeychar = _level0.p1leftkeychar;
p1middlekeychar = _level0.p1middlekeychar;
p1rightkeychar = _level0.p1rightkeychar;
p2leftkeychar = _level0.p2leftkeychar;
p2middlekeychar = _level0.p2middlekeychar;
p2rightkeychar = _level0.p2rightkeychar;
toy.p1buttons.leftkey.letter = p1leftkeychar;
toy.p1buttons.middlekey.letter = p1middlekeychar;
toy.p1buttons.rightkey.letter = p1rightkeychar;
toy.p2buttons.leftkey.letter = p2leftkeychar;
toy.p2buttons.middlekey.letter = p2middlekeychar;
toy.p2buttons.rightkey.letter = p2rightkeychar;
Frame 16
globalvolume = 100;
p1leftkeychar = "Z";
p1middlekeychar = "X";
p1rightkeychar = "C";
p2leftkeychar = "J";
p2middlekeychar = "K";
p2rightkeychar = "L";
toy.p1buttons.leftkey.letter = p1leftkeychar;
toy.p1buttons.middlekey.letter = p1middlekeychar;
toy.p1buttons.rightkey.letter = p1rightkeychar;
toy.p2buttons.leftkey.letter = p2leftkeychar;
toy.p2buttons.middlekey.letter = p2middlekeychar;
toy.p2buttons.rightkey.letter = p2rightkeychar;
Symbol 34 MovieClip [correctp1] Frame 1
function correct() {
gotoAndPlay (10);
}
function wrong() {
gotoAndPlay (20);
}
stop();
Symbol 34 MovieClip [correctp1] Frame 18
gotoAndStop (2);
Symbol 34 MovieClip [correctp1] Frame 20
man.man.gotoAndStop(2);
man._rotation = _parent.player1.top._rotation;
Symbol 34 MovieClip [correctp1] Frame 38
_parent.wrong.start();
Symbol 34 MovieClip [correctp1] Frame 42
gotoAndStop (2);
Symbol 41 MovieClip [correctp2] Frame 1
function correct() {
gotoAndPlay (10);
}
function wrong() {
gotoAndPlay (20);
}
stop();
Symbol 41 MovieClip [correctp2] Frame 18
gotoAndStop (2);
Symbol 41 MovieClip [correctp2] Frame 20
man._rotation = _parent.player2.top._rotation;
Symbol 41 MovieClip [correctp2] Frame 38
_parent.wrong.start();
Symbol 41 MovieClip [correctp2] Frame 41
gotoAndStop (2);
Symbol 48 MovieClip [resultbox] Frame 1
Symbol 70 MovieClip [readygo] Frame 6
_parent.traffic1.start();
Symbol 70 MovieClip [readygo] Frame 19
_parent.traffic1.start();
Symbol 70 MovieClip [readygo] Frame 32
_parent.traffic2.start();
Symbol 70 MovieClip [readygo] Frame 35
_parent.p1game.disabled = false;
_parent.p2game.disabled = false;
_parent.loop.start(0, 10000);
_parent.timer.reset();
_parent.timer.play();
Symbol 70 MovieClip [readygo] Frame 40
this.removeMovieClip();
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 2
_parent.radius = 40;
stop();
Symbol 83 MovieClip Frame 3
_parent.radius = 50;
stop();
Symbol 83 MovieClip Frame 4
_parent.radius = 50;
stop();
Symbol 83 MovieClip Frame 5
_parent.radius = 50;
stop();
Symbol 83 MovieClip Frame 6
_parent.radius = 65;
stop();
Symbol 83 MovieClip Frame 7
_parent.radius = 60;
stop();
Symbol 84 MovieClip [island] Frame 1
graphics.gotoAndStop(1 + randomisland);
Symbol 84 MovieClip [island] Frame 2
_y = (_y - _parent._parent.moverate);
if (350 < _y) {
this.removeMovieClip();
}
if (_parent.killmines) {
this.removeMovieClip();
}
if (!hit) {
xdiff = _parent._parent.player._x - _x;
ydiff = _parent._parent.player._y - _y;
hdiff = Math.sqrt((xdiff * xdiff) + (ydiff * ydiff));
if (hdiff < radius) {
hit = 2;
_parent._parent.xpart = xdiff / hdiff;
_parent._parent.ypart = ydiff / hdiff;
_parent._parent.doflip = true;
}
}
Symbol 84 MovieClip [island] Frame 3
_y = (_y - _parent._parent.moverate);
Symbol 84 MovieClip [island] Frame 4
_y = (_y - _parent._parent.moverate);
Symbol 84 MovieClip [island] Frame 5
if (hit) {
hit--;
}
gotoAndPlay (2);
Symbol 90 MovieClip [goodthing] Frame 2
_y = (_y - _parent._parent.moverate);
if (350 < _y) {
this.removeMovieClip();
}
if (_parent.killmines) {
this.removeMovieClip();
}
if (this.hitTest(_parent._parent.player) and (!hit)) {
hit = true;
_parent._parent.addcrash(_x, _y);
this.removeMovieClip();
}
Symbol 90 MovieClip [goodthing] Frame 3
_y = (_y - _parent._parent.moverate);
Symbol 90 MovieClip [goodthing] Frame 4
_y = (_y - _parent._parent.moverate);
Symbol 90 MovieClip [goodthing] Frame 5
gotoAndPlay (2);
Symbol 95 MovieClip Frame 1
minetype = 1 + int(random(2));
this.gotoAndStop(minetype);
Symbol 96 MovieClip [mine] Frame 2
_y = (_y - _parent._parent.moverate);
if (350 < _y) {
this.removeMovieClip();
}
if (_parent.killmines) {
this.removeMovieClip();
}
if (this.hitTest(_parent._parent.player.hitarea) and (!hit)) {
_parent._parent.slowcraft();
hit = true;
_parent._parent.disabled = true;
_parent._parent.addcrash(_x, _y);
_parent._parent.attachMovie("aftercrash", "aftercrash", 523);
this.removeMovieClip();
}
Symbol 96 MovieClip [mine] Frame 3
gotoAndPlay (2);
Symbol 107 MovieClip [demoloop] Frame 83
_parent.p1game.accelerate();
_parent._parent.p1buttons.middlekey.demohitbutton();
Symbol 107 MovieClip [demoloop] Frame 225
Symbol 107 MovieClip [demoloop] Frame 300
_parent.enddemo();
this.removeMovieClip();
Symbol 108 MovieClip Frame 8
_parent.removeMovieClip();
Symbol 108 MovieClip Frame 16
_parent.removeMovieClip();
Symbol 109 MovieClip [crash] Frame 1
if (_parent.playerindex == 1) {
graphics.gotoAndPlay("p1correct");
} else {
graphics.gotoAndPlay("p2correct");
}
_parent._parent.correct.start();
Symbol 109 MovieClip [crash] Frame 2
_y = (_y - _parent.moverate);
currentframe++;
if (currentframe >= 30) {
this.removeMovieClip();
}
Symbol 109 MovieClip [crash] Frame 3
gotoAndPlay (2);
Symbol 112 MovieClip [computerai] Frame 1
function mod(num) {
if (num < 0) {
return(-num);
}
return(num);
}
difficulty = 100;
trace("computer added " + player);
if (player == 1) {
myobject = _parent._parent.p1game;
} else {
myobject = _parent._parent.p2game;
}
myobject.player.aimy = -25;
Symbol 112 MovieClip [computerai] Frame 2
currentindex = myobject.depthindex - 2;
if (oldindex != currentindex) {
if (_parent._parent.leftmines[currentindex + 1] eq "X") {
if (player == 2) {
myobject.player.aimx = 50;
} else {
myobject.player.aimx = -150;
}
} else if (_parent._parent.rightmines[currentindex + 1] eq "X") {
if (player == 2) {
myobject.player.aimx = 100;
} else {
myobject.player.aimx = -100;
}
} else if ((_parent._parent.leftmines[currentindex + 1] eq "I") and (_parent._parent.rightmines[currentindex + 1] eq "I")) {
if (player == 2) {
myobject.player.aimx = 150;
} else {
myobject.player.aimx = -50;
}
} else if (_parent._parent.leftmines[currentindex + 1] eq "I") {
if (player == 2) {
myobject.player.aimx = 150;
} else {
myobject.player.aimx = -50;
}
} else if (_parent._parent.rightmines[currentindex + 1] eq "I") {
if (player == 2) {
myobject.player.aimx = 50;
} else {
myobject.player.aimx = -150;
}
} else if (player == 2) {
myobject.player.aimx = 100;
} else {
myobject.player.aimx = -100;
}
currentindex = oldindex;
}
myobject.player.setlocal();
if (3 < mod(myobject.player.localy)) {
if (myobject.player.localy < 0) {
_parent.keyaction(player, 1);
} else {
_parent.keyaction(player, 3);
}
}
if (0 < myobject.player.localx) {
_parent.keyaction(player, 2);
}
Symbol 112 MovieClip [computerai] Frame 6
gotoAndPlay (2);
Symbol 115 MovieClip [bubble4] Frame 15
this.removeMovieClip();
Symbol 116 MovieClip [bubble3] Frame 15
this.removeMovieClip();
Symbol 117 MovieClip [bubble2] Frame 15
this.removeMovieClip();
Symbol 118 MovieClip [bubble1] Frame 15
this.removeMovieClip();
Symbol 121 MovieClip [backmine] Frame 1
_parent.addedclips.push(_name);
Symbol 121 MovieClip [backmine] Frame 2
_y = (_y - (_parent._parent.moverate / 2));
if (_y < -50) {
this.removeMovieClip();
}
if (_parent.killmines) {
this.removeMovieClip();
}
Symbol 121 MovieClip [backmine] Frame 3
gotoAndPlay (2);
Symbol 122 MovieClip [aftercrash] Frame 1
Symbol 122 MovieClip [aftercrash] Frame 30
_parent.disabled = false;
_parent.player._rotation = 0;
this.removeMovieClip();
Symbol 126 Button
on (release) {
_parent._parent.gotoAndPlay(1);
_parent.removeme();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, releaseOutside) {
this.gotoAndStop(1);
}
Symbol 131 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 31
stop();
Symbol 194 MovieClip [gameoverbox] Frame 1
function removeme() {
this.removeMovieClip();
}
p1score = p1score + (_parent.p1score.hits * 100);
p2score = p2score + (_parent.p2score.hits * 100);
p1scorecard.score = "total: " + p1score;
p2scorecard.score = "total: " + p2score;
p1scorecard.hits = "alive hits : " + _parent.p1score.hits;
p2scorecard.hits = "alive hits : " + _parent.p2score.hits;
p1scorecard.time = "time : " + _parent.p1score.time;
p2scorecard.time = "time : " + _parent.p2score.time;
if (_parent.gameplayers == 2) {
p2scorecard.players.gotoAndStop(2);
} else {
p2scorecard.players.gotoAndStop(3);
}
if (p1score < p2score) {
rosette._x = -rosette._x;
}
if (p2score == p1score) {
rosette._visible = false;
}
if (_level0.online == 1) {
playagainbutton._visible = false;
p1scorecard._y = p1scorecard._y + 5.7;
p2scorecard._y = p2scorecard._y + 5.7;
_parent._parent.p1buttons._visible = false;
_parent._parent.p2buttons._visible = false;
}
Symbol 194 MovieClip [gameoverbox] Frame 60
if ((!_level0.tournament) == 1) {
_level0.nextgame(_parent.gameplayers, p1score, p2score);
}
Symbol 194 MovieClip [gameoverbox] Frame 200
if (_level0.tournament == 1) {
_level0.nextgame(_parent.gameplayers, p1score, p2score);
}
Symbol 194 MovieClip [gameoverbox] Frame 404
if (_level0.online == 1) {
} else {
_parent.gotoAndPlay(1);
this.removeMovieClip();
}
stop();
Symbol 196 MovieClip [currentplayer] Frame 40
if (!_parent.demonstration) {
this.removeMovieClip();
}
Symbol 197 MovieClip [addscoreclip] Frame 1
zerostring = "00000";
Symbol 197 MovieClip [addscoreclip] Frame 2
diff1 = _parent.aimscore1 - _parent.p1score1;
diff2 = _parent.aimscore2 - _parent.p2score1;
if ((0 >= diff1) and (0 >= diff2)) {
this.removeMovieClip();
}
index1 = Math.floor(diff1 / 1000);
index2 = Math.floor(diff1 / 100) - (index1 * 10);
index3 = (Math.floor(diff1 / 10) - (index1 * 100)) - (index2 * 10);
index4 = ((diff1 - (index1 * 1000)) - (index2 * 100)) - (index3 * 10);
if (0 < index4) {
_parent.p1score1 = _parent.p1score1 + 1;
} else if (0 < index3) {
_parent.p1score1 = _parent.p1score1 + 10;
} else if (0 < index2) {
_parent.p1score1 = _parent.p1score1 + 100;
} else if (0 < index1) {
_parent.p1score1 = _parent.p1score1 + 1000;
}
index1 = Math.floor(diff2 / 1000);
index2 = Math.floor(diff2 / 100) - (index1 * 10);
index3 = (Math.floor(diff2 / 10) - (index1 * 100)) - (index2 * 10);
index4 = ((diff2 - (index1 * 1000)) - (index2 * 100)) - (index3 * 10);
if (0 < index4) {
_parent.p2score1 = _parent.p2score1 + 1;
} else if (0 < index3) {
_parent.p2score1 = _parent.p2score1 + 10;
} else if (0 < index2) {
_parent.p2score1 = _parent.p2score1 + 100;
} else if (0 < index1) {
_parent.p2score1 = _parent.p2score1 + 1000;
}
numlength = length(_parent.p1score1);
_parent.p1scoretext = zerostring.substr(0, 5 - numlength) + _parent.p1score1;
numlength = length(_parent.p2score1);
_parent.p2scoretext = zerostring.substr(0, 5 - numlength) + _parent.p2score1;
Symbol 197 MovieClip [addscoreclip] Frame 4
gotoAndPlay (2);
Symbol 199 MovieClip [gameovertimer] Frame 1
Symbol 199 MovieClip [gameovertimer] Frame 60
_parent.gameoverbox();
this.removeMovieClip();
Symbol 202 MovieClip [finishsymbol] Frame 2
_y = (_y - _parent._parent.moverate);
if (350 < _y) {
this.removeMovieClip();
}
Symbol 202 MovieClip [finishsymbol] Frame 3
gotoAndPlay (2);
Symbol 205 MovieClip [startsymbol] Frame 2
_y = (_y - _parent._parent.moverate);
if (250 < _y) {
this.removeMovieClip();
}
Symbol 205 MovieClip [startsymbol] Frame 3
gotoAndPlay (2);
Symbol 208 MovieClip [bubble] Frame 10
this.removeMovieClip();
Symbol 212 MovieClip Frame 1
function addcomputer(aiplayer) {
attachMovie("computerai", "computerai" + aiplayer, "1003" + aiplayer);
eval ("computerai" + aiplayer).player = aiplayer;
}
function removecomputer(aiplayer) {
eval ("computerai" + aiplayer).removeMovieClip();
}
function keyaction(player, keynumber) {
playervalid = false;
if (keynumber == 1) {
keytype = "left";
}
if (keynumber == 2) {
keytype = "middle";
}
if (keynumber == 3) {
keytype = "right";
}
if (player == 1) {
keyname = ("_parent._parent.p1buttons." + keytype) + "key";
}
if (player == 2) {
keyname = ("_parent._parent.p2buttons." + keytype) + "key";
}
if (numplayers == 0) {
if ((keynumber == 1) and (-1 < this[("p" + player) + "side"])) {
eval (keyname).demohitbutton();
}
if ((keynumber == 3) and (this[("p" + player) + "side"] < 1)) {
eval (keyname).demohitbutton();
}
} else {
eval (keyname).hitbutton();
}
if (!_parent.p1game.disabled) {
if (player == 1) {
if (keynumber == 1) {
_parent.p1game.player._rotation = _parent.p1game.player._rotation - rotationrate;
}
if (keynumber == 3) {
_parent.p1game.player._rotation = _parent.p1game.player._rotation + rotationrate;
}
if (keynumber == 2) {
_parent.p1game.accelerate();
}
}
}
if (!_parent.p2game.disabled) {
if (player == 2) {
if (keynumber == 1) {
_parent.p2game.player._rotation = _parent.p2game.player._rotation - rotationrate;
}
if (keynumber == 3) {
_parent.p2game.player._rotation = _parent.p2game.player._rotation + rotationrate;
}
if (keynumber == 2) {
_parent.p2game.accelerate();
}
}
}
}
rotationrate = 7;
function reset() {
trace("reset called");
removecomputer(1);
removecomputer(2);
trace("player keypresses reset players is " + numplayers);
if (numplayers == 1) {
addcomputer(2);
}
if (numplayers == 0) {
addcomputer(1);
addcomputer(2);
}
p1keys._visible = true;
if (numplayers == 0) {
p2keys._visible = false;
}
if (numplayers == 1) {
p2keys._visible = false;
}
if (numplayers == 2) {
p2keys._visible = true;
}
if (_parent.players == 2) {
p2keys._visible = true;
}
}
p1leftkeychar = "A";
p1middlekeychar = "S";
p1rightkeychar = "D";
p2leftkeychar = "J";
p2middlekeychar = "K";
p2rightkeychar = "L";
p1leftkey = p1leftkeychar.charCodeAt(0);
p1middlekey = p1middlekeychar.charCodeAt(0);
p1rightkey = p1rightkeychar.charCodeAt(0);
p2leftkey = p2leftkeychar.charCodeAt(0);
p2middlekey = p2middlekeychar.charCodeAt(0);
p2rightkey = p2rightkeychar.charCodeAt(0);
p1keys.key1.letter = p1leftkeychar;
p1keys.key2.letter = p1middlekeychar;
p1keys.key3.letter = p1rightkeychar;
p2keys.key1.letter = p2leftkeychar;
p2keys.key2.letter = p2middlekeychar;
p2keys.key3.letter = p2rightkeychar;
p1keys._visible = false;
p2keys._visible = false;
demotext._visible = false;
Symbol 212 MovieClip Frame 2
if (0 < numplayers) {
if (!_parent.p1game.disabled) {
if (Key.isDown(_level0.p1leftkeychar.charCodeAt(0))) {
keyaction(1, 1);
}
if (Key.isDown(_level0.p1middlekeychar.charCodeAt(0))) {
keyaction(1, 2);
}
if (Key.isDown(_level0.p1rightkeychar.charCodeAt(0))) {
keyaction(1, 3);
}
}
}
if (1 < numplayers) {
if (!_parent.p2game.disabled) {
if (Key.isDown(_level0.p2leftkeychar.charCodeAt(0))) {
keyaction(2, 1);
}
if (Key.isDown(_level0.p2middlekeychar.charCodeAt(0))) {
keyaction(2, 2);
}
if (Key.isDown(_level0.p2rightkeychar.charCodeAt(0))) {
keyaction(2, 3);
}
}
}
if (numplayers == 0) {
if (Key.isDown(Key.SPACE)) {
trace("Space pressed");
_parent.enddemo();
}
}
Symbol 212 MovieClip Frame 3
gotoAndPlay (2);
Symbol 216 Button
on (release) {
_parent.demonstration = true;
_parent.players = 2;
_level0.players = 2;
_parent._parent.p2buttons._visible = true;
_parent.play();
}
Symbol 217 MovieClip Frame 1
stop();
Symbol 218 Button
on (release) {
_parent.demonstration = true;
_parent.players = 1;
_level0.players = 1;
_parent._parent.p2buttons._visible = false;
_parent.play();
}
Symbol 219 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 1
graphics.gotoAndPlay(random(10));
Symbol 230 MovieClip Frame 2
_y = (_y - _parent._parent.moverate);
if (240 < _y) {
_y = (-40 - random(80));
_x = (60 - random(120));
}
Symbol 230 MovieClip Frame 3
gotoAndPlay (2);
Symbol 237 MovieClip Frame 1
Symbol 241 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 1
function setlocal() {
if (_level0.online == 1) {
point.x = aimx + 450;
point.y = aimy + 200;
} else {
point.x = aimx + 245;
point.y = aimy + 200;
}
globalToLocal(point);
localx = point.x;
localy = point.y;
}
orb.gotoAndPlay(_parent.playerindex);
point = new object();
mypoint = new object();
stop();
Symbol 243 MovieClip Frame 1
function removemovies() {
killmines = true;
}
function removemovies3() {
trace("deleting " + length(addedclips));
i = 0;
while (length(addedclips) >= i) {
eval (addedclips[i]).removeMovieClip();
i++;
}
addedclips = new Array();
}
function removemovies2() {
trace("movies being removed");
for (z in this) {
trace((("found a thing of type " + typeof(eval (path)[z])) + " : ") + eval (path)[z]);
if (typeof(eval (path)[z]) == "movieclip") {
trace("movie clip found of name " + eval (path)[z]._name);
}
}
}
function theList(mypath) {
var path = mypath;
_root.listoverview.thelist = "";
_root.listoverview.realpath = _root.realpath;
for (z in eval (path)) {
if (typeof(eval (path)[z]) == "movieclip") {
_root.listoverview.thelist = ((((((((_root.listoverview.thelist add "<FONT COLOR='#0066CC'>") add typeof(eval (path)[z])) add " : ") add "<FONT COLOR='#CC0000'>") add z) add " : ") add "<FONT COLOR='#333333'>") add eval (path)[z]) add "\r";
} else if (typeof(eval (path)[z]) == "string") {
_root.listoverview.thelist = ((((((((_root.listoverview.thelist add "<FONT COLOR='#669999'>") add typeof(eval (path)[z])) add " : ") add "<FONT COLOR='#CC0000'>") add z) add " : ") add "<FONT COLOR='#333333'>") add eval (path)[z]) add "\r";
} else if (typeof(eval (path)[z]) == "number") {
_root.listoverview.thelist = ((((((((_root.listoverview.thelist add "<FONT COLOR='#999966'>") add typeof(eval (path)[z])) add " : ") add "<FONT COLOR='#CC0000'>") add z) add " : ") add "<FONT COLOR='#333333'>") add eval (path)[z]) add "\r";
} else if (typeof(eval (path)[z]) == "function") {
_root.listoverview.thelist = ((((((((_root.listoverview.thelist add "<FONT COLOR='#663300'>") add typeof(eval (path)[z])) add " : ") add "<FONT COLOR='#CC0000'>") add z) add " : ") add "<FONT COLOR='#333333'>") add eval (path)[z]) add "\r";
} else {
_root.listoverview.thelist = ((((((((_root.listoverview.thelist add "<FONT COLOR='#000000'>") add typeof(eval (path)[z])) add " : ") add "<FONT COLOR='#CC0000'>") add z) add " : ") add "<FONT COLOR='#333333'>") add eval (path)[z]) add "\r";
}
}
}
addedclips = new Array();
Symbol 244 MovieClip Frame 1
function nextmine() {
backplane.killmines = false;
currentmine++;
if (_parent.leftmines[currentmine] eq "X") {
minesused++;
backplane.attachMovie("goodthing", "mine" + minesused, 2000 + minesused);
eval ("backplane.mine" + minesused)._x = -40 - (_parent.lm_offset[currentmine] * 8);
eval ("backplane.mine" + minesused)._y = -50;
}
if (_parent.rightmines[currentmine] eq "X") {
minesused++;
backplane.attachMovie("goodthing", "mine" + minesused, 2000 + minesused);
eval ("backplane.mine" + minesused)._x = 40 + (_parent.rm_offset[currentmine] * 8);
eval ("backplane.mine" + minesused)._y = -50;
}
if (_parent.leftmines[currentmine] eq "I") {
minesused++;
backplane.attachMovie("island", "mine" + minesused, 2000 + minesused);
eval ("backplane.mine" + minesused)._x = -50 - (_parent.lm_offset[currentmine] * 8);
eval ("backplane.mine" + minesused)._y = -50;
eval ("backplane.mine" + minesused).randomisland = _parent.lm_size[currentmine];
}
if (_parent.rightmines[currentmine] eq "I") {
minesused++;
backplane.attachMovie("island", "mine" + minesused, 2000 + minesused);
eval ("backplane.mine" + minesused)._x = 50 + (_parent.rm_offset[currentmine] * 8);
eval ("backplane.mine" + minesused)._y = -50;
eval ("backplane.mine" + minesused).randomisland = _parent.rm_size[currentmine];
}
if (currentmine == 50) {
verybackplane.attachMovie("finishsymbol", "gameline", 123);
verybackplane.gameline._y = -50;
}
if ((currentmine >= 54) and (!gameended)) {
reachedend();
}
}
function reset() {
verybackplane.attachMovie("startsymbol", "gameline", 123);
verybackplane.gameline._y = 157;
gameended = false;
minesused = 1;
backminesused = 0;
playeraimx = -50;
moverate = 0;
depthindex = 0;
depth = 0;
sunset._y = 67;
waves._y = 144.9;
player._y = 190.6;
currentmine = 0;
disabled = false;
backplane.removemovies();
resultbox.removeMovieClip();
startsink = false;
gameovertimer = 0;
player._rotation = -90;
if (playerindex == 1) {
player._x = -40;
} else {
player._x = 40;
}
xmom = 0;
}
function addcrash(cx, cy) {
crashesdone++;
this.attachmovie("crash", "crash" + crashesdone, 10000 + crashesdone);
if (_name == "p1game") {
_parent.p1score.hits++;
} else {
_parent.p2score.hits++;
}
eval ("crash" + crashesdone)._x = cx;
eval ("crash" + crashesdone)._y = cy;
}
function reachedend() {
if (!_parent.someonewon) {
score = int((70000 - _parent.timer.timetaken) / 6);
_parent.winner = _name;
_parent.someonewon = true;
} else {
score = int((70000 - _parent.timer.timetaken) / 6);
_parent.timer.stop();
_parent.attachMovie("gameovertimer", "gameovertimer", 6487);
}
gameended = true;
disabled = true;
trace("game ended, score " + score);
}
function timeup() {
if (!gameended) {
trace("timeup called");
gameended = true;
stop();
addresultbox("TIME UP", "", "");
disabled = true;
gameended = true;
trace("timeup");
}
}
if (_name == "p1game") {
playerindex = 1;
} else {
playerindex = 2;
}
reset();
startsink = true;
function addresultbox(result, time, score) {
trace("score passed is " + score);
this.attachMovie("resultbox", "resultbox", 9000);
resultbox.result = result;
resultbox.time = time;
resultbox.score = score;
resultbox._y = 100;
}
function accelerate() {
if (currentspeed < maxspeed) {
xmom = xmom + (Math.cos((player._rotation / 180) * 3.14) * acceleration);
moverate = moverate + (Math.sin((player._rotation / 180) * 3.14) * acceleration);
}
}
accel_rate = 1.5;
acceleration = 2;
maxspeed = 5;
Symbol 244 MovieClip Frame 2
currentspeed = Math.sqrt((xmom * xmom) + (moverate * moverate));
v_speed = currentspeed;
if (4.5 < v_speed) {
v_speed = 4.5;
}
player.speedclip._yscale = v_speed * 50;
player._x = player._x + xmom;
moverate = moverate * 0.9;
xmom = xmom * 0.9;
if (doflip) {
totalmom = Math.sqrt((xmom * xmom) + (moverate * moverate));
xmom = totalmom * xpart;
moverate = totalmom * ypart;
doflip = false;
_parent.bump.start();
}
if (playerindex == 1) {
depth_diff = depth - _parent.p2game.depth;
otherplayer._y = 189.6 + depth_diff;
otherplayer._x = _parent.p2game.player._x;
otherplayer._rotation = _parent.p2game.player._rotation;
} else {
depth_diff = depth - _parent.p1game.depth;
otherplayer._y = 189.6 + depth_diff;
otherplayer._x = _parent.p1game.player._x;
otherplayer._rotation = _parent.p1game.player._rotation;
}
depth = depth - moverate;
if (olddepth < depth) {
maxdepth = depth;
} else if ((depth - maxdepth) < -40) {
moverate = (-moverate) * 2;
}
olddepth = depth;
if (depthindex < Math.floor(depth / 80)) {
depthindex++;
nextmine();
}
if (player._x < -85) {
xmom = (-xmom) * 1.5;
_parent.bump.start();
}
if (85 < player._x) {
xmom = (-xmom) * 1.5;
_parent.bump.start();
}
Symbol 244 MovieClip Frame 3
gotoAndPlay (2);
Symbol 249 MovieClip Frame 2
tempp1 = _parent.p1game.depth / 20;
if (tempp1 < 210) {
p1ball._y = -tempp1;
}
tempp2 = _parent.p2game.depth / 20;
if (tempp2 < 210) {
p2ball._y = _ - tempp2;
}
Symbol 249 MovieClip Frame 7
gotoAndPlay (2);
Symbol 250 MovieClip Frame 1
function reset() {
starttime = getTimer();
_parent.p1score.time = "0.0";
_parent.p2score.time = "0.0";
}
reset();
Symbol 250 MovieClip Frame 2
timetaken = getTimer() - starttime;
secstaken = Math.floor(timetaken / 1000);
milsecstaken = int((timetaken - (secstaken * 1000)) / 100);
timetext = (("" + secstaken) + ".") + milsecstaken;
if (!_parent.p1game.gameended) {
_parent.p1score.time = timetext;
}
if (!_parent.p2game.gameended) {
_parent.p2score.time = timetext;
}
if (_parent.p1game.disabled and (!_parent.p1game.gameended)) {
_parent.p1score.time = "0.0";
_parent.p2score.time = "0.0";
}
if (secstaken >= 60) {
_parent.timeup();
timetext = "60.0";
stop();
}
Symbol 250 MovieClip Frame 6
gotoAndPlay (2);
Symbol 269 MovieClip Frame 1
if (_parent.players == 2) {
gotoAndStop (2);
}
stop();
Symbol 270 MovieClip Frame 1
function createmines() {
trace("Create mines called");
leftmines = new Array();
rightmines = new Array();
lm_size = new Array();
rm_size = new Array();
lm_offset = new Array();
rm_offset = new Array();
lm_string = ".1.X1X..X..6XX...XX.12..3X54.35..5.6.1XX2.23X...XF";
rm_string = "..6.1...X2.1...X.X...6..2..XX.2..5..1X.4.X..4.2X6.";
lmo_string = ".1.161..2..22....6.112.11.2.414.241..3314323...33.";
rmo_string = "..1.1...33.1.........2..2..12.1..3...3.2.1..2.233.";
i = 0;
while (50 >= i) {
lm_current = substring(lm_string, i, 1);
rm_current = substring(rm_string, i, 1);
lm_charcode = lm_current.charCodeAt(0);
rm_charcode = rm_current.charCodeAt(0);
if ((48 < lm_charcode) and (lm_charcode < 58)) {
lm_size[i] = lm_charcode - 48;
leftmines.push("I");
} else {
leftmines.push(substring(lm_string, i, 1));
}
if ((48 < rm_charcode) and (rm_charcode < 58)) {
rm_size[i] = rm_charcode - 48;
rightmines.push("I");
} else {
rightmines.push(substring(rm_string, i, 1));
}
lm_charcode = (substring(lmo_string, i, 1)).charCodeAt(0);
rm_charcode = (substring(rmo_string, i, 1)).charCodeAt(0);
if ((48 < lm_charcode) and (lm_charcode < 58)) {
lm_offset[i] = lm_charcode - 48;
}
if ((48 < rm_charcode) and (rm_charcode < 58)) {
rm_offset[i] = rm_charcode - 48;
}
i++;
}
}
function swapmomentums() {
temp_moverate = p1game.moverate;
temp_xmom = p1game.xmom;
p1game.moverate = p2game.moverate;
p1game.xmom = p2game.xmom;
p2game.moverate = temp_moverate;
p2game.xmom = p1game.xmom;
p1game.player._x = p1game.player._x + p1game.xmom;
p2game.player._x = p2game.player._x + p2game.xmom;
}
function timeup() {
p1game.stop();
p2game.stop();
p1game.score = 0;
p2game.score = 0;
gameoverbox();
stop();
}
function enddemo() {
trace("end demo called");
keypress.numplayers = players;
keypress.reset();
p1game.reset();
p2game.reset();
p1score.hits = 0;
p2score.hits = 0;
p1game.disabled = true;
p2game.disabled = true;
createmines();
demonstration = false;
demoloop.removeMovieClip();
attachMovie("readygo", "readygo", 1984);
democlip1.removeMovieClip();
democlip2.removeMovieClip();
}
function rundemo() {
trace("rundemo called");
this.attachMovie("demoloop", "demoloop", 1984);
this.attachMovie("democlip", "democlip1", 1985);
createmines();
keypress.demotext._visible = true;
keypress.numplayers = 0;
keypress.reset();
_parent.definekeys._visible = false;
gotoAndStop (5);
}
function gameoverbox() {
p1game.stop();
p2game.stop();
loop.stop();
endgamesound.start();
trace("game ended");
this.attachMovie("gameoverbox", "mygameoverbox", 1002);
mygameoverbox.p1score = p1game.score;
mygameoverbox.p2score = p2game.score;
}
someonewon = false;
Symbol 270 MovieClip Frame 2
if (_level0.online == 1) {
players = _level0.players;
trace("players is " + players);
demonstration = true;
rundemo();
} else {
stop();
}
Symbol 270 MovieClip Frame 3
rundemo();
Symbol 270 MovieClip Frame 5
function setvolume() {
hitmine.setVolume(_level0.globalvolume);
speedup.setVolume(_level0.globalvolume);
loop.setVolume(_level0.globalvolume);
endgamesound.setVolume(_level0.globalvolume);
traffic1.setVolume(_level0.globalvolume);
traffic2.setVolume(_level0.globalvolume);
keyclick.setVolume(_level0.globalvolume);
engineloop.setVolume(_level0.globalvolume);
}
p1score.hits = 0;
p2score.hits = 0;
correct = new Sound(this);
correct.attachSound("correct");
bump = new Sound(this);
bump.attachSound("bump");
speedup = new Sound(this);
speedup.attachSound("speedup3");
loop = new Sound(this);
loop.attachSound("loop");
endgamesound = new Sound(this);
endgamesound.attachSound("endgamesound");
traffic1 = new Sound(this);
traffic1.attachSound("traffic1");
traffic2 = new Sound(this);
traffic2.attachSound("traffic2");
keyclick = new Sound(this);
keyclick.attachSound("keyclick");
engineloop = new Sound(this);
engineloop.attachSound("engineloop");
trace("global volume is " + _level0.globalvolume);
setvolume();
engineloop.start(0, 1000);
Symbol 283 MovieClip Frame 1
stop();
function hitbutton() {
gotoAndPlay (5);
}
function demohitbutton() {
gotoAndPlay (16);
}
Symbol 283 MovieClip Frame 8
gotoAndStop (2);
Symbol 283 MovieClip Frame 10
letter = "";
Instance of Symbol 278 MovieClip in Symbol 283 MovieClip Frame 10
onClipEvent (keyDown) {
keychar = String.fromCharCode(Key.getCode());
if (((47 < Key.getCode()) and (Key.getCode() < 58)) or ((64 < Key.getCode()) and (Key.getCode() < 91))) {
_parent.letter = keychar;
}
trace("key pressed is " + keychar);
}
Symbol 283 MovieClip Frame 11
if (0 < length(letter)) {
if (_parent._parent._parent.keycheck(letter, _parent._parent.currentkey)) {
_parent._parent.nextkey();
gotoAndStop (2);
} else {
trace("key already used");
gotoAndPlay (10);
}
} else {
gotoAndPlay (10);
}
Symbol 283 MovieClip Frame 26
gotoAndStop (2);
Symbol 288 MovieClip Frame 7
stop();
Symbol 302 MovieClip Frame 1
stop();
function hitbutton() {
gotoAndPlay (5);
}
function demohitbutton() {
gotoAndPlay (16);
}
Symbol 302 MovieClip Frame 8
gotoAndStop (2);
Symbol 302 MovieClip Frame 10
letter = "";
Instance of Symbol 298 MovieClip in Symbol 302 MovieClip Frame 10
onClipEvent (keyDown) {
keychar = String.fromCharCode(Key.getCode());
if (((47 < Key.getCode()) and (Key.getCode() < 58)) or ((64 < Key.getCode()) and (Key.getCode() < 91))) {
_parent.letter = keychar;
}
}
Symbol 302 MovieClip Frame 11
if (0 < length(letter)) {
if (_parent._parent._parent.keycheck(letter, _parent._parent.currentkey)) {
_parent._parent.nextkey();
gotoAndStop (2);
} else {
trace("key already used");
gotoAndPlay (10);
}
} else {
gotoAndPlay (10);
}
Symbol 302 MovieClip Frame 26
gotoAndStop (2);
Symbol 304 Button
on (release) {
_parent.nextkey();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, releaseOutside) {
this.gotoAndStop(1);
}
Symbol 309 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 1
stop();
function nextkey() {
keyoverlay._visible = true;
currentkey++;
if (currentkey == 1) {
definekeys._visible = false;
keyoverlay._x = -200.8;
keyoverlay._y = 73.1;
p1buttons.leftkey.gotoAndPlay(10);
}
if (currentkey == 2) {
_parent.p1leftkeychar = p1buttons.leftkey.letter;
keyoverlay._x = -164.8;
keyoverlay._y = 76.1;
p1buttons.middlekey.gotoAndPlay(10);
}
if (currentkey == 3) {
_parent.p1middlekeychar = p1buttons.middlekey.letter;
keyoverlay._x = -128.8;
keyoverlay._y = 78.1;
p1buttons.rightkey.gotoAndPlay(10);
}
if (currentkey == 4) {
_parent.p1rightkeychar = p1buttons.rightkey.letter;
keyoverlay._x = 38.2;
keyoverlay._y = 78.1;
p2buttons.leftkey.gotoAndPlay(10);
}
if (currentkey == 5) {
_parent.p2leftkeychar = p2buttons.leftkey.letter;
keyoverlay._x = 73.2;
keyoverlay._y = 76.1;
p2buttons.middlekey.gotoAndPlay(10);
}
if (currentkey == 6) {
_parent.p2middlekeychar = p2buttons.middlekey.letter;
keyoverlay._x = 111.2;
keyoverlay._y = 73.1;
p2buttons.rightkey.gotoAndPlay(10);
}
if (currentkey == 7) {
_parent.p2rightkeychar = p2buttons.rightkey.letter;
keyoverlay._visible = false;
definekeys._visible = true;
currentkey = 0;
}
}
currentkey = 0;
keyoverlay._visible = false;
if (_level0.online == 1) {
p1buttons._y = 138.9;
p2buttons._y = 139.9;
p1buttons._x = p1buttons._x + 23;
p2buttons._x = p2buttons._x - 23;
definekeys._visible = false;
if (_level0.players < 2) {
p2buttons._visible = false;
}
}
Symbol 324 MovieClip Frame 1
stop();
Instance of Symbol 318 MovieClip in Symbol 324 MovieClip Frame 1
onClipEvent (load) {
tkb = _root.getBytesTotal();
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.nextFrame();
}
}
onClipEvent (enterFrame) {
p = Math.round((_root.getBytesLoaded() / tkb) * 100);
_root.loader.percent = p + " %";
_root.loader.gotoAndStop(p);
if (p == 100) {
_root.nextFrame();
}
}
Symbol 326 Button
on (release) {
getURL ("http://www.aliveis.com");
gotoAndStop (1);
this.gotoAndStop(1);
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, releaseOutside) {
this.gotoAndStop(1);
}
Symbol 331 MovieClip Frame 1
stop();