Frame 1
fscommand ("allowscale", false);
fscommand ("showmenu", false);
_quality = "medium";
SCREENX = 600;
SCREENY = 400;
SCREENX2 = SCREENX / 2;
SCREENY2 = SCREENY / 2;
play();
function LoaderGame(MC) {
this.MC = MC.createEmptyMovieClip("game", 1);
this.sfx = new LoaderSFX(this);
this.cursor = new LoaderCursor(this);
this.pigeons = new Array();
this.maxPigeons = 25;
this.pigeonCounter = 0;
this.engaged = false;
this.init = function () {
var _local2 = 0;
while (_local2 < 10) {
this.spawnPigeon();
_local2++;
}
};
this.handle = function () {
this.sfx.handle();
this.cursor.spinning = false;
this.target = false;
var _local3 = 0;
while (_local3 < this.pigeons.length) {
var _local2 = this.pigeons[_local3];
if (!_local2.active) {
this.pigeons.splice(_local3, 1);
} else {
_local2.handle();
var _local4 = this.cursor.overTarget(_local2);
this.cursor.spinning = this.cursor.spinning || (_local4);
if (_local4) {
this.target = _local2;
}
}
_local3++;
}
this.cursor.handle();
};
this.spawnPigeon = function () {
var _local2 = this.pigeons.length + 1;
if (_local2 > this.maxPigeons) {
return(undefined);
}
var _local3 = this.pigeons.push(new LoaderPigeon(this, 100 + (this.pigeonCounter++)));
};
this.destroy = function () {
Mouse.show();
this.flash();
this.MC.removeMovieClip();
};
this.flash = function () {
_root.flasher.gotoAndPlay("shot");
};
this.init();
}
function LoaderCursor(parent) {
this.parent = parent;
this.MC = this.parent.MC.attachMovie("cursor", "cursor", 10000);
this.MCdraw = this.parent.MC.createEmptyMovieClip("draw", 9999);
this.filterGlow = new flash.filters.GlowFilter(16777215, 100, 12, 12, 2, 1, false, false);
MCdraw.filters = new Array(this.filterGlow);
this.MC.gotoAndStop(1);
this.fireRecharge = 10;
this.fireCharge = 0;
this.posX = 0;
this.posY = 0;
this.spinning = false;
this.gunPost = 0;
this.handle = function () {
this.posX = _xmouse;
this.posY = _ymouse;
this.MC._x = this.posX;
this.MC._y = this.posY;
if (this.spinning) {
this.MC.play();
} else if (this.MC._currentframe == 1) {
this.MC.stop();
}
this.MCdraw._alpha = (100 * this.fireCharge) / this.fireRecharge;
if (((_ymouse > 345) && (_xmouse > 100)) && (_xmouse < (SCREENX - 100))) {
Mouse.show();
return(undefined);
}
Mouse.hide();
if (this.fireCharge) {
this.fireCharge--;
} else if (MOUSEDOWN) {
this.shoot();
}
if (!MOUSEDOWN) {
this.fireCharge = 0;
}
};
this.shoot = function () {
this.parent.engaged = true;
if (this.gunPost > 3) {
this.gunPost = 0;
}
this.spinning = true;
this.gunPost++;
this.fireCharge = this.fireRecharge;
this.parent.flash();
this.parent.sfx.play("fire" + (random(2) + 1));
var _local2 = this.MCdraw;
_local2.clear();
_local2.lineStyle(3, 16777215, 100);
if (this.gunPost == 1) {
_local2.moveTo(0, 0);
}
if (this.gunPost == 2) {
_local2.moveTo(SCREENX, 0);
}
if (this.gunPost == 3) {
_local2.moveTo(SCREENX, SCREENY);
}
if (this.gunPost == 4) {
_local2.moveTo(0, SCREENY);
}
_local2.lineTo(this.posX, this.posY);
this.parent.target.explode();
};
this.overTarget = function (target) {
var _local3 = this.posX - target.posX;
var _local2 = this.posY - target.posY;
var _local5 = (_local3 * _local3) + (_local2 * _local2);
return(_local5 < (target.size * target.size));
};
}
function LoaderPigeon(parent, depth) {
this.parent = parent;
this.depth = depth;
this.MC = this.parent.MC.attachMovie("pigeon", "pigeon" + this.depth, this.depth);
this.MC._rotation = random(40) - 20;
this.angle = random(360);
this.bulk = random(400) + 50;
this.pace = random(200) + 50;
this.count = 0;
this.ax = Math.sin(this.angle / (Math.PI*2));
this.ay = Math.cos(this.angle / (Math.PI*2));
this.active = true;
this.baseX = SCREENX2 + ((SCREENX / 500) * (random(100) - 50));
this.baseY = SCREENY2 + ((SCREENY / 500) * (random(100) - 50));
this.init = function () {
this.handle();
};
this.handle = function () {
this.count++;
this.perc = this.count / this.pace;
this.perc = (this.perc * this.perc) * this.perc;
this.posX = this.baseX + ((hyp * this.ax) * this.perc);
this.posY = this.baseY + ((hyp * this.ay) * this.perc);
if (this.perc > 1) {
this.parent.spawnPigeon();
this.destroy();
}
this.size = (0.3 * this.perc) * this.bulk;
this.draw();
};
this.draw = function () {
this.MC._x = this.posX;
this.MC._y = this.posY;
this.MC._xscale = this.perc * this.bulk;
this.MC._yscale = this.perc * this.bulk;
this.MC._alpha = 50 + ((this.perc * 2) * 100);
this.depth = Math.round(this.perc * 1000) + 100;
this.MC.swapDepths(this.depth);
};
this.explode = function () {
this.parent.MC.attachMovie("explosion", "explosion" + this.depth, this.depth, {_x:this.MC._x, _y:this.MC._y, _xscale:this.MC._xscale, _yscale:this.MC._yscale, _rotation:this.MC._rotation});
this.parent.sfx.play("explosion" + (random(2) + 1));
this.parent.spawnPigeon();
this.parent.spawnPigeon();
this.destroy();
};
this.destroy = function () {
this.active = false;
this.MC.removeMovieClip();
};
this.init();
}
hyp = Math.sqrt((SCREENX2 * SCREENX2) + (SCREENY2 * SCREENY2)) * 1.5;
function LoaderSFX(parent) {
this.parent = parent;
this.MC = this.parent.MC.attachMovie("soundFX", "soundFX", 3);
this.sound = new Sound(this.MC);
this.buffer = new Array();
this.handle = function () {
var _local2 = this.buffer.shift();
if (_local2.length) {
this.fire(_local2);
}
};
this.play = function (what) {
if ((this.buffer.length < 10) || (what.substr(0, 5) == "music")) {
this.buffer.push(String(what));
}
};
this.fire = function (what) {
this.MC.gotoAndPlay(what);
};
this.mute = function (onOrOff) {
this.sound.setVolume(Number(!onOrOff) * 100);
};
}
Frame 10
stop();
var reallyAloader = true;
var version = getVersion().split(" ")[1].split(",")[0];
onEnterFrame = function () {
var _local1 = (_level0.getBytesLoaded() / _level0.getBytesTotal()) * 100;
if (_local1 < 100) {
return(undefined);
}
if ((version != parseFloat(version)) || (version < 8)) {
gotoAndStop ("version");
} else if ((_level0.asseturl.length > 0) || (_level0.http_host.length > 0)) {
gotoAndStop ("loading");
} else {
_level0.asseturl = "";
gotoAndStop ("button");
}
};
Frame 20
System.security.allowDomain("*");
var fileName = (_level0.asseturl + "game.swf");
if (reallyAloader) {
loadMovieNum (fileName, 1);
}
var percent = 0;
var frame = 1;
var k = 0;
this.game = new LoaderGame(_root.bg.blank);
stop();
onMouseDown = function () {
MOUSEDOWN = true;
};
onMouseUp = function () {
MOUSEDOWN = false;
};
onEnterFrame = function () {
this.game.handle();
if (!reallyAloader) {
k = k + 1;
if (k > 100) {
k = 100;
}
}
if (percent < 100) {
_level1.stop();
_level1._visible = false;
percent = (_level1.getBytesLoaded() / _level1.getBytesTotal()) * 100;
if (_level1.getBytesLoaded() == undefined) {
percent = 0;
}
if (!reallyAloader) {
percent = k;
}
frame = Math.ceil(percent);
if (frame < 1) {
frame = 1;
}
if (frame > 100) {
frame = 100;
}
loader_bar.gotoAndStop(frame);
loader_bar.message = (42000000 - Math.round(percent * 420000)) + " KM";
} else {
_level1.stop();
if (this.game.engaged) {
_level0.gotoAndStop("loaded");
} else {
_level0.gotoAndStop("allstop");
}
}
};
Frame 25
stop();
Frame 30
stop();
Frame 35
onMouseDown = function () {
};
onMouseUp = function () {
};
onEnterFrame = function () {
};
this.game.destroy();
delete this.game;
_level1.play();
_level1._visible = true;
stop();
Symbol 4 MovieClip [streak5] Frame 101
this.removeMovieClip();
Symbol 5 MovieClip [streak4] Frame 101
this.removeMovieClip();
Symbol 6 MovieClip [streak3] Frame 101
this.removeMovieClip();
Symbol 7 MovieClip [streak2] Frame 101
this.removeMovieClip();
Symbol 8 MovieClip [streak1] Frame 101
this.removeMovieClip();
Symbol 52 MovieClip [explosion] Frame 11
this.removeMovieClip();
Symbol 106 MovieClip [soundFX] Frame 1
stop();
Symbol 106 MovieClip [soundFX] Frame 10
play();
Symbol 106 MovieClip [soundFX] Frame 19
gotoAndStop (1);
Symbol 106 MovieClip [soundFX] Frame 20
play();
Symbol 106 MovieClip [soundFX] Frame 29
gotoAndStop (1);
Symbol 106 MovieClip [soundFX] Frame 30
play();
Symbol 106 MovieClip [soundFX] Frame 39
gotoAndStop (1);
Symbol 106 MovieClip [soundFX] Frame 40
play();
Symbol 106 MovieClip [soundFX] Frame 49
gotoAndStop (1);
Symbol 106 MovieClip [soundFX] Frame 50
play();
Symbol 106 MovieClip [soundFX] Frame 59
gotoAndStop (1);
Symbol 124 Button
on (release, keyPress "<Space>") {
_parent.gotoAndStop("allstop");
}
Symbol 127 MovieClip Frame 1
Symbol 136 MovieClip Frame 1
function spawnStar(pos) {
i++;
if (i > 300) {
i = 1;
}
var _local2 = this.attachMovie("streak" + (random(5) + 1), "star" + i, i);
_local2._rotation = random(360);
if (pos) {
_local2.gotoAndPlay(random(100));
_local2._alpha = 1000;
}
}
i = 0;
count = 0;
var k = 0;
while (k < 100) {
spawnStar(true);
k++;
}
onEnterFrame = function () {
count++;
var _local3 = 2;
if (count < 200) {
_local3 = count / 100;
}
var _local2 = 0;
while (_local2 < 3) {
spawnStar();
_local2++;
}
this._rotation = this._rotation + (Math.cos(count / 100) * _local3);
};
Symbol 140 MovieClip Frame 11
stop();
Symbol 140 MovieClip Frame 20
stop();
Symbol 141 Button
on (release, keyPress "<Space>") {
_parent.gotoAndStop("loading");
}
Symbol 143 MovieClip Frame 1