Frame 1
function initConfig() {
var _local1 = Number(getVersion().split(" ")[1].split(",")[0]);
gotoAndStop(((_local1 >= 8) ? "loading" : "version"));
}
Stage.scaleMode = "noScale";
Stage.showMenu = false;
fscommand ("trapallkeys", true);
System.security.allowDomain("*");
progress.stop();
function Loader(parent, url) {
this.parent = parent;
this.url = url;
this.depth = this.parent.MC.getNextHighestDepth();
this.container = this.parent.MC.createEmptyMovieClip("container" + this.depth, this.depth);
this.container._visible = false;
this.movieClipLoader = new MovieClipLoader();
this.movieClipLoader.addListener(this);
this.movieClipLoader.loadClip(this.url, this.container);
this.isLoaded = false;
this.bytesTotal = 0;
this.bytesLoaded = 0;
this.onLoadInit = function (target) {
target.removeMovieClip();
this.isLoaded = true;
};
this.update = function () {
if (!this.bytesTotal) {
this.bytesTotal = this.movieClipLoader.getProgress(this.container).bytesTotal;
if (this.bytesTotal) {
this.parent.addToBytesTotal(this.bytesTotal);
} else {
return(undefined);
}
}
if (!this.isLoaded) {
this.bytesLoaded = this.movieClipLoader.getProgress(this.container).bytesLoaded;
}
this.parent.addToBytesLoaded(this.bytesLoaded);
};
}
function Library(parent, urls, launch, passive) {
this.parent = parent;
this.urls = urls;
this.launch = launch;
this.passive = passive;
this.isLaunched = false;
this.spoof = 400000 /* 0x061A80 */;
this.bytesTotal = this.urls.length * this.spoof;
this.bytesLoaded = 0;
this.update = function () {
this.bytesLoaded = 0;
for (var _local3 in this.loaders) {
this.loaders[_local3].update();
}
if (!this.bytesTotal) {
return(undefined);
}
var _local4 = Math.round((100 * this.bytesLoaded) / this.bytesTotal);
var _local5 = ("INITIALISING: " + _local4) + "%";
_root.progress.gotoAndStop(_local4);
this.parent.display = _local5;
if (this.bytesLoaded >= this.bytesTotal) {
this.doLaunch();
}
};
this.doLaunch = function () {
if (this.isLaunched) {
return(undefined);
}
this.parent.display = "INITIALISED";
this.passive.destroy();
this.isLaunched = true;
loadMovieNum (this.launch, 1);
this.MC.removeMovieClip();
this.parent.onEnterFrame = null;
};
this.addToBytesTotal = function (bytesTotal) {
this.bytesTotal = this.bytesTotal + (bytesTotal - this.spoof);
};
this.addToBytesLoaded = function (bytesLoaded) {
this.bytesLoaded = this.bytesLoaded + bytesLoaded;
};
this.init = function () {
this.MC = this.parent.createEmptyMovieClip("library", 1);
this.loaders = [];
for (var _local2 in this.urls) {
this.loaders.push(new Loader(this, this.urls[_local2]));
}
};
this.init();
}
Frame 3
if (this._framesloaded < this._totalframes) {
this.gotoAndPlay(2);
} else {
initConfig();
}
Frame 10
var dc = ("?dc=" + random(1000));
var library = new Library(this, ["http://www.giveagarmin.co.uk/garmin-game/assets.swf", "http://www.giveagarmin.co.uk/garmin-game/sounds.swf", "http://www.giveagarmin.co.uk/garmin-game/tracks.swf", "http://www.giveagarmin.co.uk/garmin-game/units.swf"], "http://www.giveagarmin.co.uk/garmin-game/gameabsolute.swf" + dc);
this.onEnterFrame = function () {
library.update();
};
Frame 20
_root.display = "REQUIRES FLASH PLAYER 8 OR ABOVE";
this.onEnterFrame = function () {
};