Frame 1
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
if (percentDone >= 100) {
_root.winName = "Click";
_root.gotoAndPlay(4);
} else {
_root.progr.text = ((Math.round(loadedBytes) + "b of ") + Math.round(totalBytes)) + "b loaded";
}
Frame 2
gotoAndPlay (1);
Frame 3
stopAllSounds();
Frame 4
function gotoOphyr() {
getURL ("http://www.ophyr.nl", "_blank");
}
function gotoGG() {
getURL ("http://www.gamegarage.co.uk", "_blank");
}
function tracking() {
trace("Tracking number of times played");
myURL = "http://gamegarage.co.uk/scripts/";
url = myURL + "tracking.php";
lv = new LoadVars();
lv.game_id = _root.game_id;
lv.user_id = _root.user_id;
lv.sendAndLoad(url, lv, "POST");
}
_root.clicked = false;
stop();
trace(_root.winName);
stopAllSounds();
var myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
var link = new ContextMenuItem("www.ophyr.nl", gotoOphyr);
myContextMenu.customItems.push(link);
var link2 = new ContextMenuItem("www.gamegarage.co.uk", gotoGG);
myContextMenu.customItems.push(link2);
_root.menu = myContextMenu;
Instance of Symbol 70 MovieClip "fader" in Frame 4
onClipEvent (load) {
this.swapDepths(9001);
}
Frame 5
function scoring(archievedScore) {
trace("Attempting to submit " + archievedScore);
myURL = "http://www.gamegarage.co.uk/scripts/";
url = myURL + "score.php";
lv = new LoadVars();
lv.game_id = _root.game_id;
lv.user_id = _root.user_id;
lv.score = archievedScore;
lv.alg = ((_root.game_id + _root.user_id) + archievedScore) + "a83l9xj";
lv.sendAndLoad(url, lv, "POST");
}
stop();
Mouse.hide();
_root.attachMovie("startfader", "startfadert", 9005, {_x:300, _y:150});
music = new Sound(_root.createEmptyMovieClip("bgm", 166));
music.attachSound("music");
music.start(0, 5);
jet = new Sound(_root.createEmptyMovieClip("jet", 10000));
jet.attachSound("jet");
jet.start(0, 5000);
jet.setVolume(0);
_root.speed = 5;
Instance of Symbol 85 MovieClip "spd" in Frame 5
onClipEvent (load) {
this.swapDepths(4000);
}
Instance of Symbol 67 MovieClip "head" in Frame 5
onClipEvent (load) {
this.swapDepths(5000);
var index = 0;
var yspeed = 0;
var yacc = 0.35;
var rotation = 0;
var scrollspeed = 8;
var defaultScrollSpeed = 8;
var gameBeaten = false;
var gameStarted = false;
}
onClipEvent (enterFrame) {
_root.jet.setVolume(_root.speed);
if (gameStarted) {
if (!this.gameBeaten) {
_root.speed = _root.controller.scaler / 14;
if (Key.isDown(32)) {
this.yspeed = this.yspeed - this.yacc;
} else {
this.yspeed = this.yspeed + this.yacc;
}
this._y = this._y + this.yspeed;
this._rotation = this.yspeed * 4;
} else {
this._x = this._x + _root.controller.scaler;
this._rotation = 0;
}
}
this.scrollspeed = this.defaultScrollSpeed + ((_root.controller.scaler / 100) * 2);
nm = "b" + index;
rotation = this._rotation;
var tribalname = ("bodytr_" + this._currentframe);
_root.attachMovie(tribalname, nm, index, {_x:this._x, _y:this._y, _rotation:rotation, _xscale:(index % 16) + 30, _yscale:(index % 16) + 30, onEnterFrame:function () {
if (!_root.head.gameBeaten) {
this._x = this._x - scrollspeed;
} else {
this._x = this._x + (_root.controller.scaler - scrollspeed);
}
}});
_root[nm].cacheAsBitmap = true;
if (index > 30) {
index = 0;
} else {
index++;
}
}
Instance of Symbol 61 MovieClip [border] "controller" in Frame 5
onClipEvent (load) {
function createSparks(dirUp) {
var _local4 = 0;
while (_local4 <= 5) {
var _local3 = "spark" + this.sindex;
if (dirUp) {
var _local6 = (RAND() * 8) - (-4 * (_root.controller.scaler / 80));
var _local5 = -(8 + (RAND() * 6));
} else {
var _local6 = (RAND() * 8) - (-4 * (_root.controller.scaler / 80));
var _local5 = -(RAND() * 6);
}
_root.attachMovie("spark", _local3, this.sindex, {_x:_root.head._x + 20, _y:_root.head._y, xacc:_local6, yacc:_local5, onEnterFrame:function () {
this._x = this._x - this.xacc;
this.xacc = this.xacc + 0.4;
this._y = this._y + this.yacc;
this.yacc = this.yacc + 0.6;
if ((this._x < -10) || (this._y > 300)) {
this.removeMovieClip();
}
}});
_root[_local3].cacheAsBitmap = true;
_root[_local3].gotoAndStop(_root.head._currentframe);
if (this.sindex > 380) {
this.sindex = 300;
} else {
this.sindex++;
}
_local4++;
}
}
function createBorder() {
nm = "border" + index;
_root.attachMovie("border", nm, index, {_x:680, _y:150, onEnterFrame:function () {
if (!_root.head.gameBeaten) {
this._x = this._x - (this._width / 4);
this._width = _root.controller.scaler;
this.down.gotoAndStop(_root.head._currentframe);
this.up.gotoAndStop(_root.head._currentframe);
if ((this._x < 340) && (this._x > 260)) {
if (this.up.hitTest(_root.head)) {
_root.controller.hit.start(0.25, 1);
createSparks(false);
if ((_root.controller.scaler - 20) >= 70) {
_root.controller.scaler = _root.controller.scaler - 20;
}
if ((_root.controller.difficulty - 8) >= -30) {
_root.controller.difficulty = _root.controller.difficulty - 8;
}
_root.controller.hits++;
_root.head._y = _root.head._y + 5;
if (_root.head.yspeed < 0) {
_root.head.yspeed = ((-_root.head.yspeed) * 0.6) + 0.5;
} else {
_root.head.yspeed = 5;
}
_root.controller.pb.start(0, 1);
}
if (this.down.hitTest(_root.head)) {
_root.controller.hit.start(0.25, 1);
createSparks(true);
if ((_root.controller.scaler - 20) >= 70) {
_root.controller.scaler = _root.controller.scaler - 20;
}
if ((_root.controller.difficulty - 8) >= -30) {
_root.controller.difficulty = _root.controller.difficulty - 8;
}
_root.controller.hits++;
_root.head._y = _root.head._y - 10;
if (_root.head.yspeed > 0) {
_root.head.yspeed = ((-_root.head.yspeed) * 0.6) - 0.5;
} else {
_root.head.yspeed = -5;
}
_root.controller.pb.start(0, 1);
}
}
if (this._x < (-(10 + this._width))) {
this.removeMovieClip();
}
}
}});
}
grab = new Sound();
grab.attachSound("grab");
pb = new Sound();
pb.attachSound("pickupBad");
pg = new Sound();
pg.attachSound("pickupGood");
hit = new Sound();
hit.attachSound("hit");
RAND = Math.random;
SIN = Math.sin;
FLOOR = Math.floor;
var gameStarted = false;
var borderUp = 100;
var borderDown = 100;
var index = 50;
var gindex = 140;
var findex = 200;
var sindex = 300;
var timeRemaining = 3600;
var edgeAggressiveness = 100;
var scaler = 100;
var distance = 0;
var dir = 0;
var bdir = 0;
var lCounter = 0;
var fCounter = 0;
var levelDir = 6;
var difficulty = -30;
var hits = 0;
}
onClipEvent (enterFrame) {
if (!_root.head.gameBeaten) {
createBorder();
this.timeRemaining = FLOOR((3600 - this.lCounter) / 60);
if (this.timeRemaining <= 0) {
_root.jet.setVolume(0);
_root.jet = undefined;
_root.head.gameBeaten = true;
}
_root.spd.speedometer.text = ((((("Speed : " + this.scaler) + " Kph. Time remaining : ") + this.timeRemaining) + " seconds. Distance travelled : ") + FLOOR(this.distance)) + " Metres";
if (_root.head.gameStarted) {
this.lCounter++;
}
this.fCounter++;
if ((this.scaler >= 240) && (this.fCounter >= (20 - FLOOR(_root.controller.scaler / 15)))) {
this.fCounter = 0;
fnm = "flare" + this.findex;
_root.attachMovie("flare", fnm, this.findex, {_x:620, _y:150, onEnterFrame:function () {
if (this._x > (-this._width)) {
this._x = this._x - this._width;
} else {
this.removeMovieClip();
}
}});
_root[fnm].gotoAndStop(_root.head._currentframe);
_root[fnm]._y = 20 + (RAND() * 260);
_root[fnm]._xscale = 100 + ((RAND() * 80) - 40);
if (this.findex > 280) {
this.findex = 200;
} else {
this.findex++;
}
}
if (_root.controller.gameStarted) {
if ((this.lCounter % FLOOR(_root.controller.scaler)) == 0) {
gnm = "globe" + this.gindex;
_root.attachMovie("globe", gnm, this.gindex, {_x:620, _y:150, killed:false, onEnterFrame:function () {
this._y = this._y + Math.cos(this._x / 100);
if (!_root.head.gameBeaten) {
if (this._x > -20) {
this._x = this._x - ((_root.controller.scaler / 100) * 6);
} else {
this.removeMovieClip();
}
} else if (this._x < 620) {
this._x = this._x + ((_root.controller.scaler / 100) * 16);
} else {
this.removeMovieClip();
}
if ((this._x < 350) && (this._x > 250)) {
if ((!this.killed) && (_root.head.grab.hitTest(this))) {
_root.controller.grab.start(0, 1);
this.killed = true;
createSparks(false);
if (this._currentframe != _root.head._currentframe) {
_root.controller.pg.start(0, 1);
_root.head.gotoAndStop(this._currentframe);
_root.bg.gotoAndStop(this._currentframe);
if ((_root.controller.scaler + 40) <= 400) {
_root.controller.scaler = _root.controller.scaler + 40;
}
if ((_root.controller.difficulty + 10) <= 60) {
_root.controller.difficulty = _root.controller.difficulty + 10;
}
_root.controller.edgeAggressiveness = _root.controller.edgeAggressiveness + 4;
} else if (this._currentframe == _root.head._currentframe) {
_root.controller.pb.start(0, 1);
if ((_root.controller.scaler - 20) >= 70) {
_root.controller.scaler = _root.controller.scaler - 20;
}
if ((_root.controller.difficulty - 10) >= -30) {
_root.controller.difficulty = _root.controller.difficulty - 10;
}
_root.controller.edgeAggressiveness = _root.controller.edgeAggressiveness - 4;
}
this.g.gotoAndPlay(2);
}
}
}});
var randNum = FLOOR(RAND() * 3);
if (randNum == 1) {
_root[gnm].gotoAndStop(_root.head._currentframe);
} else {
var tmpFrame = _root.head._currentframe;
if (tmpFrame == 3) {
tmpFrame = 1;
} else {
tmpFrame++;
}
_root[gnm].gotoAndStop(tmpFrame);
}
_root[gnm]._y = (_root.head._y + (RAND() * 50)) - 25;
}
if (gindex > 180) {
gindex = 140;
} else {
gindex++;
}
}
if (gameStarted) {
this.distance = this.distance + (this.scaler / 36);
this.dir = this.dir + ((RAND() * 12) - this.levelDir);
newUpCoord = (_root[nm].up._y - this.borderUp) + this.dir;
newDownCoord = (_root[nm].down._y + this.borderDown) + this.dir;
newUpCoord = newUpCoord + (this.difficulty * SIN(this.lCounter / 10));
newDownCoord = newDownCoord - (this.difficulty * SIN(this.lCounter / 10));
} else {
newUpCoord = _root[nm].up._y - this.borderUp;
newDownCoord = _root[nm].down._y + this.borderDown;
}
if (newUpCoord > 80) {
newUpCoord = 80;
if (this.levelDir < 12) {
this.levelDir = this.levelDir + ((RAND() * this.scaler) / (this.edgeAggressiveness + (this.scaler / 60)));
}
} else if (newDownCoord < -80) {
newDownCoord = -80;
if (this.levelDir > -12) {
this.levelDir = this.levelDir - ((RAND() * this.scaler) / (this.edgeAggressiveness + (this.scaler / 60)));
}
} else if (newUpCoord < -140) {
newUpCoord = -140;
if (this.levelDir > -12) {
this.levelDir = this.levelDir - ((RAND() * this.scaler) / (this.edgeAggressiveness + (this.scaler / 60)));
}
} else if (newDownCoord > 140) {
newDownCoord = 140;
if (this.levelDir < 12) {
this.levelDir = this.levelDir + ((RAND() * this.scaler) / (this.edgeAggressiveness + (this.scaler / 60)));
}
} else if ((RAND() * 3) > 2) {
if (this.levelDir > 5) {
levelDir = levelDir - ((RAND() * this.scaler) / (this.edgeAggressiveness + (this.scaler / 60)));
} else if (this.levelDir < 9) {
levelDir = levelDir + ((RAND() * this.scaler) / (this.edgeAggressiveness + (this.scaler / 60)));
}
}
_root[nm].up.gotoAndStop(_root.head._currentframe);
_root[nm].down.gotoAndStop(_root.head._currentframe);
_root[nm].up._y = newUpCoord;
_root[nm].down._y = newDownCoord;
if (index > 100) {
index = 50;
} else {
index++;
}
} else if (!_root.ending) {
_root.jet.setVolume(0);
_root.distanceScoreString = ("You travelled " + FLOOR(this.distance)) + " meters";
_root.distanceScore = FLOOR(this.distance);
trace("Distancescore = " + _root.distanceScore);
_root.attachMovie("endfader", "endfadert", 9005, {_x:300, _y:150});
}
}
Instance of Symbol 13 MovieClip "gglogo" in Frame 5
onClipEvent (load) {
this.swapDepths(9004);
}
Frame 6
Mouse.show();
stop();
_root.clicked = false;
stopAllSounds();
trace("Sending score to ze Germanz");
scoring(_root.distanceScore);
Instance of Symbol 70 MovieClip "fader" in Frame 6
onClipEvent (load) {
this.swapDepths(9001);
}
Instance of Symbol 13 MovieClip "gglogo" in Frame 6
on (press) {
if (!_root.clicked) {
grab = new Sound();
grab.attachSound("grab");
grab.start(0, 1);
_root.getURL("http://www.gamegarage.co.uk/users/register.php", "_blank");
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Symbol 13 MovieClip Frame 1
stop();
Symbol 37 MovieClip [counter] Frame 180
_root.head.gameStarted = true;
Symbol 37 MovieClip [counter] Frame 240
_root.controller.gameStarted = true;
this.unloadMovie();
Symbol 44 MovieClip [bodytr_3] Frame 25
this.removeMovieClip();
Symbol 46 MovieClip [bodytr_2] Frame 25
this.removeMovieClip();
Symbol 48 MovieClip [bodytr_1] Frame 25
this.removeMovieClip();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 2
stop();
Symbol 52 MovieClip Frame 3
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 2
stop();
Symbol 67 MovieClip Frame 3
stop();
Symbol 69 MovieClip [endfader] Frame 1
_root.ending = true;
stopAllSounds();
rip = new Sound();
rip.attachSound("rip");
rip.start(0, 1);
boom = new Sound(_root.createEmptyMovieClip("boom", 167));
boom.attachSound("boom");
boom.setVolume(_root.speed);
boom.start(0, 1);
Symbol 69 MovieClip [endfader] Frame 120
trace(_root.distancescore);
var i = 0;
while (i <= 9000) {
_level0.getInstanceAtDepth(i).swapDepths(9002);
_level0.getInstanceAtDepth(i).removeMovieClip();
i++;
}
_root.head.removeMovieClip();
_root.controller.swapDepths(9002);
_root.controller.removeMovieClip();
_root.gglogo.swapDepths(9002);
_root.gglogo.removeMovieClip();
_root.nextFrame();
this.swapDepths(10000);
this.removeMovieClip();
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 121
_root.gotoAndPlay(5);
this.removeMovieClip();
Symbol 75 MovieClip [startfader] Frame 120
_root.distancescore = 0;
_root.attachMovie("counter", "counter", 8000, {_x:Stage.width / 2, _y:Stage.height / 2});
this.swapDepths(10000);
this.removeMovieClip();
Symbol 113 MovieClip Frame 1
_root.winName = "Click";
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 20
_parent.removeMovieClip();
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 20
_parent.removeMovieClip();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 20
_parent.removeMovieClip();
Symbol 120 MovieClip [globe] Frame 1
stop();
Symbol 120 MovieClip [globe] Frame 2
stop();
Symbol 120 MovieClip [globe] Frame 3
stop();
Symbol 121 Button
on (release) {
grab = new Sound();
grab.attachSound("grab");
grab.start(0, 1);
_root.Table.scoretable.filename = "scores/dragondashscores.sco";
_root.Table.scoretable.scoresize = 10;
_root.Table.scoretable.action = "INSERT";
_root.Table.scoretable.viewtype = "FLASH";
_root.Table.scoretable.winname = winName.Name.text;
_root.Table.scoretable.winscore = winScore.Score.text;
_root.Table.scoretable.loadVariables("http://www.ophyr.nl/scores/scores.php", "GET");
_root.enterHighScore._visible = false;
_root.Table._visible = true;
}
Symbol 148 Button
on (press) {
grab = new Sound();
grab.attachSound("grab");
grab.start(0, 1);
_root.gotoAndStop(4);
}
Symbol 160 Button
on (press) {
if (!_root.clicked) {
grab = new Sound();
grab.attachSound("grab");
grab.start(0, 1);
_root.getURL("http://www.gamegarage.co.uk", "_blank");
}
}
Symbol 161 Button
on (press) {
if (!_root.clicked) {
grab = new Sound();
grab.attachSound("grab");
grab.start(0, 1);
tracking();
_root.clicked = true;
_root.ending = false;
_root.fader.gotoAndPlay(2);
}
}
Symbol 164 Button
on (press) {
if (!_root.clicked) {
grab = new Sound();
grab.attachSound("grab");
grab.start(0, 1);
tracking();
_root.clicked = true;
_root.ending = false;
_root.fader.gotoAndPlay(2);
}
}