Frame 1
stop();
Stage.showMenu = false;
Stage.scaleMode = "noScale";
Instance of Symbol 19 MovieClip in Frame 1
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent = (loading / total) * 100;
per = int(percent);
percentage = per + "%";
loadBar._width = per;
if (percent > 99) {
_parent.gotoAndStop("intro");
}
}
Frame 3
_root.rover = new Sound(rover);
_root.rover.attachSound("rover");
_root.explode = new Sound(explode);
_root.explode.attachSound("explode");
_root.loop = new Sound(loop);
_root.loop.attachSound("loop");
_root.loopvolume = 100;
_root.fade = "in";
_root.gsc = "play";
_root.display._visible = false;
_root.score = "None";
_root.stageheight = 220;
_root.stagewidth = 400;
_root.mycolor = "0x000000";
_root.halfshipwidth = 10;
_root.maxjaggyness = 30;
_root.mintunnelwidth = 30;
_root.minaddy = 20;
_root.terrainarray = new Array();
_root.coordinates = new Array();
_root.loop.onSoundComplete = function () {
_root.loop.start(0, 0);
};
_root.setup = function () {
_root.loop.stop();
_root.loop.start(0, 0);
if (_root.gsc == "play") {
_root.loopvolume = 100;
_root.fade = "in";
} else if (_root.gsc == "stop") {
_root.fade = "out";
_root.loopvolume = 0;
}
_root.loop.setVolume(_root.loopvolume);
_root.attachMovie("ship", "ship", 1);
_root.ship._y = _root.stageheight - 5;
_root.ship._x = _root.stagewidth / 2;
_root.attachMovie("terrain", "terrain" + _root.depth, _root.depth);
_root.terrainarray[_root.terrainarray.length] = _root["terrain" + _root.depth];
if (_root.depth < 1000) {
_root.depth++;
} else {
_root.depth = 5;
}
_root.addterrain = false;
_root.diesequence = false;
_root.display._visible = true;
_root.gameplay = true;
_root.score = 0;
_root.speed = 14;
_root.tspeed = 15;
_root.jaggyness = 10;
_root.tunnelwidth = 125;
_root.depth = 5;
_root.nextx = (_root.stagewidth / 2) - (_root.tunnelwidth / 2);
_root.addy = 50;
_root.deadcounter = 0;
_root.pausedelay = 0;
};
_root.clean = function () {
i = _root._root.terrainarray.length - 1;
while (i >= 0) {
_root.terrainarray[i].removeMovieClip();
_root.terrainarray.splice(i, 1);
i--;
}
i = _root._root.coordinates.length - 1;
while (i >= 0) {
_root.coordinates[i].removeMovieClip();
_root.coordinates.splice(i, 1);
i--;
}
_root.ship.removeMovieClip();
_root.explosion.removeMovieClip();
_root.youaredead = false;
_root.display._visible = false;
_root.gameplay = false;
_root.fade = "end";
};
Instance of Symbol 97 MovieClip "display" in Frame 3
onClipEvent (load) {
_root.display.swapDepths(10000);
}
Instance of Symbol 6 MovieClip in Frame 3
onClipEvent (keyDown) {
if (Key.isDown(79)) {
if (_root.gsc == "play") {
_root.gsc = "stop";
_root.fade = "out";
_root.display.music.gotoAndStop("off");
} else {
_root.gsc = "play";
if (_root.gameplay == true) {
_root.fade = "in";
}
_root.display.music.gotoAndStop("on");
}
}
}
onClipEvent (enterFrame) {
if (_root.pausedelay < 50) {
_root.pausedelay++;
}
if (Key.isDown(80) and (_root.pausedelay == 50)) {
_root.pausedelay = 0;
if (_root.gameplay == true) {
_root.gameplay = false;
_root.fade = "out";
} else {
_root.gameplay = true;
if (_root.gsc == "play") {
_root.fade = "in";
}
}
}
if (_root.fade == "in") {
if (_root.loopvolume < 100) {
_root.loopvolume = _root.loopvolume + 8;
_root.loop.setVolume(_root.loopvolume);
} else if (_root.loopvolume > 100) {
_root.loopvolume = 100;
_root.loop.setVolume(_root.loopvolume);
}
} else if (_root.fade == "out") {
if (_root.loopvolume > 0) {
_root.loopvolume = _root.loopvolume - 20;
} else if (_root.loopvolume < 0) {
_root.loopvolume = 0;
}
_root.loop.setVolume(_root.loopvolume);
} else if (_root.fade == "end") {
if (_root.loopvolume > 0) {
_root.loopvolume = _root.loopvolume - 30;
_root.loop.setVolume(_root.loopvolume);
} else if (_root.loopvolume < 0) {
_root.loop.stop();
}
}
if (_root.youaredead == true) {
if (_root.diesequence == false) {
_root.attachMovie("explosion", "explosion", 1010);
_root.explosion._x = _root.ship._x;
_root.explosion._y = _root.ship._y;
_root.ship.removeMovieClip();
_root.espeed = _root.tspeed - 10;
_root.explode.start(0, 0);
_root.gameplay = false;
_root.fade = "end";
_root.diesequence = true;
}
_root.deadcounter++;
_root.explosion._y = _root.explosion._y - _root.espeed;
_root.espeed = _root.espeed - 0.5;
if (_root.deadcounter == 30) {
_root.clean();
_root.maindisplay.gotoAndStop("gameover");
_root.deadcounter = 0;
}
}
if (_root.gameplay == true) {
_root.score++;
_root.display.scoretext = _root.score;
if (Key.isDown(37)) {
_root.ship._x = _root.ship._x - _root.speed;
} else if (Key.isDown(39)) {
_root.ship._x = _root.ship._x + _root.speed;
}
if (_root.ship._x > _root.stagewidth) {
_root.ship._x = _root.stagewidth;
} else if (_root.ship._x < 0) {
_root.ship._x = 0;
}
tc = _root.terrainarray.length - 1;
while (tc >= 0) {
_root.terrainarray[tc]._y = _root.terrainarray[tc]._y + _root.tspeed;
if (_root.addterrain == false) {
if (_root.terrainarray[tc]._y >= (_root.terrainarray[tc]._height - 10)) {
_root.attachMovie("terrain", "terrain" + _root.depth, _root.depth);
_root.terrainarray[_root.terrainarray.length] = _root["terrain" + _root.depth];
_root["terrain" + _root.depth]._y = _root.terrainarray[tc]._y - (_root.terrainarray[tc]._height - _root.tspeed);
if (_root.depth < 1000) {
_root.depth++;
} else {
_root.depth = 5;
}
_root.addterrain = true;
}
}
if (_root.terrainarray[tc]._y >= (_root.stageheight + _root.terrainarray[tc]._height)) {
_root._root.addterrain = false;
_root.terrainarray[tc].removeMovieClip();
_root.terrainarray.splice(tc, 1);
}
if (_root.terrainarray[tc].hitTest(_root.ship._x + _root.ship.point1._x, _root.ship._y + _root.ship.point1._y, true) or _root.terrainarray[tc].hitTest(_root.ship._x + _root.ship.point2._x, _root.ship._y + _root.ship.point2._y, true)) {
_root.youaredead = true;
}
_root.tspeed = _root.tspeed + 0.005;
if (_root.tunnelwidth > _root.mintunnelwidth) {
_root.tunnelwidth = _root.tunnelwidth - 0.01;
}
if (_root.jaggyness < _root.maxjaggyness) {
_root.jaggyness = _root.jaggyness + 0.01;
}
if (_root.addy > _root.minaddy) {
_root.addy = _root.addy - 0.01;
}
tc--;
}
}
}
Symbol 4 MovieClip [terrain] Frame 1
createEmptyMovieClip("left", _root.depth);
with (left) {
beginFill(_root.mycolor, 100);
moveTo(0, 0);
lineStyle(3, _root.mycolor, 100);
nextx = _root.nextx;
nexty = 0;
lineTo(nextx, nexty);
_root.coordinates.push(nextx);
_root.coordinates.push(nexty);
i = 25;
while (i > 0) {
addx = random(Math.round(_root.jaggyness / 2)) + (_root.jaggyness / 2);
if (nextx <= (addx + 10)) {
nextx = nextx + addx;
} else if ((nextx + addx) > ((_root.stagewidth - _root.tunnelwidth) - 10)) {
nextx = nextx - addx;
trace("minus");
} else {
aors = random(2);
if (aors == 0) {
nextx = nextx + addx;
} else {
nextx = nextx - addx;
}
}
nexty = nexty - _root.addy;
lineTo(nextx, nexty);
_root.coordinates.push(nextx);
_root.coordinates.push(nexty);
i--;
}
_root.nextx = nextx;
lineTo(0, nexty);
LineTo(0, 0);
endFill();
}
if (_root.depth < 1000) {
_root.depth++;
} else {
_root.depth = 5;
}
createEmptyMovieClip("right", _root.depth);
with (right) {
beginFill(_root.mycolor, 100);
moveTo(_root.stagewidth, 0);
lineStyle(3, _root.mycolor, 100);
i = _root.coordinates.length / 2;
while (i > 0) {
lineTo(_root.coordinates[0] + _root.tunnelwidth, _root.coordinates[1]);
rlasty = _root.coordinates[1];
_root.coordinates.splice(0, 2);
i--;
}
lineTo(_root.stagewidth, rlasty);
lineTo(_root.stagewidth, 0);
endFill();
}
if (_root.depth < 1000) {
_root.depth++;
} else {
_root.depth = 5;
}
Symbol 8 MovieClip [explosion] Frame 1
i = 30;
while (i > 0) {
wone = random(2);
rotation = random(361);
size = random(50) + 70;
if (wone == 0) {
attachMovie("smallpar", "smallpar" + _root.depth, _root.depth);
_root.explosion["smallpar" + _root.depth]._x = (_root.explosion["smallpar" + _root.depth]._y = 0);
_root.explosion["smallpar" + _root.depth]._rotation = rotation;
_root.explosion["smallpar" + _root.depth]._xscale = (_root.explosion["smallpar" + _root.depth]._yscale = size);
if (_root.depth < 1000) {
_root.depth++;
} else {
_root.depth = 5;
}
} else {
attachMovie("bigpar", "bigpar" + _root.depth, _root.depth);
_root.explosion["bigpar" + _root.depth]._x = (_root.explosion["bigpar" + _root.depth]._y = 0);
_root.explosion["bigpar" + _root.depth]._rotation = rotation;
_root.explosion["bigpar" + _root.depth]._xscale = (_root.explosion["bigpar" + _root.depth]._yscale = size);
if (_root.depth < 1000) {
_root.depth++;
} else {
_root.depth = 5;
}
}
i--;
}
i = 5;
while (i > 0) {
wone = random(2);
rotation = random(60) - 30;
size = random(50) + 70;
if (wone == 0) {
attachMovie("smallpar", "smallpar" + _root.depth, _root.depth);
_root.explosion["smallpar" + _root.depth]._x = (_root.explosion["smallpar" + _root.depth]._y = 0);
_root.explosion["smallpar" + _root.depth]._rotation = rotation;
_root.explosion["smallpar" + _root.depth]._xscale = (_root.explosion["smallpar" + _root.depth]._yscale = size);
if (_root.depth < 1000) {
_root.depth++;
} else {
_root.depth = 5;
}
} else {
attachMovie("bigpar", "bigpar" + _root.depth, _root.depth);
_root.explosion["bigpar" + _root.depth]._x = (_root.explosion["bigpar" + _root.depth]._y = 0);
_root.explosion["bigpar" + _root.depth]._rotation = rotation;
_root.explosion["bigpar" + _root.depth]._xscale = (_root.explosion["bigpar" + _root.depth]._yscale = size);
if (_root.depth < 1000) {
_root.depth++;
} else {
_root.depth = 5;
}
}
i--;
}
Symbol 11 MovieClip [bigpar] Frame 20
this.removeMovieClip();
Symbol 12 MovieClip [smallpar] Frame 10
this.removeMovieClip();
Symbol 19 MovieClip Frame 1
stop();
Symbol 24 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 80 Button
on (release) {
getURL ("www.flashkit.com", "_blank");
}
Symbol 81 Button
on (release) {
getURL ("http://www.flashkit.com/loops/Techno-Dance/Techno/Aai_Took-Needthew-3776/index.php", "_blank");
}
Symbol 83 MovieClip Frame 273
_root.gotoAndStop("game");
Symbol 92 Button
on (rollOver) {
_root.rover.stop();
_root.rover.start();
}
on (release) {
_root.clean();
_root.score = 0;
_root.maindisplay.gotoAndStop("title");
}
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
stop();
Instance of Symbol 96 MovieClip "music" in Symbol 97 MovieClip Frame 1
on (release) {
if (_root.gsc == "play") {
_root.gsc = "stop";
_root.fade = "out";
_root.display.music.gotoAndStop("off");
} else {
_root.gsc = "play";
if (_root.gameplay == true) {
_root.fade = "in";
}
_root.display.music.gotoAndStop("on");
}
}
Symbol 102 Button
on (rollOver) {
_root.rover.stop();
_root.rover.start();
}
on (release) {
_root.maindisplay.gotoAndStop("blank");
_root.setup();
}
Symbol 105 Button
on (rollOver) {
_root.rover.stop();
_root.rover.start();
}
on (release) {
_root.maindisplay.gotoAndStop("instructions");
}
Symbol 108 Button
on (rollOver) {
_root.rover.stop();
_root.rover.start();
}
on (release) {
getURL ("http://members.lycos.co.uk/dounanthebarb/dtunnel.html?", "_blank");
}
Symbol 110 Button
on (rollOver) {
_root.rover.stop();
_root.rover.start();
}
on (release) {
_root.maindisplay.gotoAndStop("title");
}
Symbol 113 Button
on (rollOver) {
_root.rover.stop();
_root.rover.start();
}
on (release) {
_root.maindisplay.gotoAndStop("blank");
_root.setup();
}
Symbol 119 Button
on (rollOver) {
_root.rover.stop();
_root.rover.start();
}
on (release) {
_root.maindisplay.gotoAndStop("title");
}
Symbol 124 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 2
stop();
_root.maindisplay.fscore = _root.score;
Symbol 124 MovieClip Frame 3
stop();
Symbol 124 MovieClip Frame 4
stop();