Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
_lockout = true;
__com_mochibot__("316f297a", this, 10301, true);
mochi.as2.MochiServices.connect("2a3a0adc02c425de");
Frame 91
_root.onEnterFrame = function () {
if (Key.isDown(13)) {
gotoAndStop ("game");
}
};
stop();
var sndFire = new Sound();
sndFire.attachSound("fire.wav");
var sndExplode = new Sound();
sndExplode.attachSound("explode.wav");
Frame 92
function animateEnemy() {
this._y = this._y + this.speed;
if (this.hitTest(_root.mcMain)) {
_root.gameOver = true;
_root.gotoAndStop("lose");
_root.mcMain.removeMovieClip();
}
if (this._y > (Stage.height + this._height)) {
_root.score = _root.score - this.worth;
this.removeMovieClip();
}
if (_root.gameOver) {
this.removeMovieClip();
}
}
stop();
var gameOver = false;
var mainSpeed = 10;
var fireTime = 0;
var fireRate = 12;
var fireMode = 0;
var shootAllow = false;
var enemyTime = 0;
var enemyLimit = 16;
var enemyTotal = 0;
var score = 0;
var enemies = new Object();
onEnterFrame = function () {
if (Key.isDown(37) || (Key.isDown(65))) {
mcMain._x = mcMain._x - mainSpeed;
}
if (Key.isDown(38) || (Key.isDown(87))) {
mcMain._y = mcMain._y - mainSpeed;
}
if (Key.isDown(39) || (Key.isDown(68))) {
mcMain._x = mcMain._x + mainSpeed;
}
if (Key.isDown(40) || (Key.isDown(83))) {
mcMain._y = mcMain._y + mainSpeed;
}
if (mcMain._x <= (mcMain._width / 2)) {
mcMain._x = mcMain._x + mainSpeed;
}
if (mcMain._y <= (mcMain._height / 2)) {
mcMain._y = mcMain._y + mainSpeed;
}
if (mcMain._x >= (Stage.width - (mcMain._width / 2))) {
mcMain._x = mcMain._x - mainSpeed;
}
if (mcMain._y >= (Stage.height - (mcMain._height / 2))) {
mcMain._y = mcMain._y - mainSpeed;
}
if (((fireTime++) >= fireRate) && (Key.isDown(32))) {
var _local2;
if (fireMode == 1) {
_local2 = _root.attachMovie("mcBullet", "b" + Math.random(), _root.getNextHighestDepth());
_local2._x = mcMain._x - 15;
_local2._y = mcMain._y - (mcMain._height / 2);
_local2 = _root.attachMovie("mcBullet", "b" + Math.random(), _root.getNextHighestDepth());
_local2._x = mcMain._x + 15;
_local2._y = mcMain._y - (mcMain._height / 2);
} else {
_local2 = _root.attachMovie("mcBullet", "b" + Math.random(), _root.getNextHighestDepth());
_local2._x = mcMain._x;
_local2._y = mcMain._y - (mcMain._height / 2);
}
sndFire.start();
fireTime = 0;
}
if ((enemyTime++) >= (enemyLimit - int(enemyTotal / 50))) {
var _local3 = 1;
var _local4 = int(Math.random() * (4 + Math.min(enemyTotal / 15, 4)));
if (_local4 > 6) {
_local3 = 3;
} else if (_local4 > 4) {
_local3 = 2;
}
_root.enemies[enemyTotal] = _root.attachMovie("mcEnemy" + _local3, "en" + enemyTotal, _root.getNextHighestDepth());
_root.enemies[enemyTotal]._x = int(Math.random() * (Stage.width - mcMain._width)) + (mcMain._width / 2);
_root.enemies[enemyTotal]._y = -50;
enemyTime = 0;
enemyTotal++;
if ((enemyTotal % 25) == 24) {
var _local6 = Math.floor(Math.random() * 3);
var _local5 = _root.attachMovie("mcPowerUp" + _local6, "pu" + enemyTotal, _root.getNextHighestDepth());
_local5._x = int(Math.random() * (Stage.width - mcMain._width)) + (mcMain._width / 2);
_local5._y = -50;
}
}
txtScore.text = "Score: " + score;
};
mcMain.swapDepths(1000);
Frame 95
stop();
txtFinalScore.text = "Final Score: " + score;
_root.onEnterFrame = function () {
if (Key.isDown(13)) {
gotoAndStop ("game");
}
};
Symbol 5 MovieClip [mcBullet] Frame 1
onEnterFrame = function () {
for (var _local5 in _root.enemies) {
var _local3 = 0;
while (_local3 < 15) {
if (_root.enemies[_local5].hitTest(this._x, this._y - _local3, false)) {
if ((--_root.enemies[_local5].health) < 1) {
var _local4 = _root.attachMovie("mcExplode", "ex" + _local5, _root.getNextHighestDepth());
_local4._x = _root.enemies[_local5]._x;
_local4._y = _root.enemies[_local5]._y;
_root.score = _root.score + _root.enemies[_local5].worth;
_root.enemies[_local5].removeMovieClip();
delete _root.enemies[_local5];
}
this.removeMovieClip();
}
_local3++;
}
}
this._y = this._y - 15;
if (this._y < (-1 * this._height)) {
this.removeMovieClip();
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
Symbol 11 MovieClip [mcEnemy1] Frame 1
var health = 1;
var speed = 5;
var worth = 5;
onEnterFrame = _root.animateEnemy;
Symbol 11 MovieClip [mcEnemy1] Frame 4
gotoAndPlay (2);
Symbol 17 MovieClip [mcEnemy3] Frame 1
var health = 4;
var speed = 3;
var worth = 15;
onEnterFrame = _root.animateEnemy;
Symbol 17 MovieClip [mcEnemy3] Frame 4
gotoAndPlay (2);
Symbol 20 MovieClip [mcEnemy2] Frame 1
var health = 2;
var speed = 7;
var worth = 10;
onEnterFrame = _root.animateEnemy;
Symbol 20 MovieClip [mcEnemy2] Frame 4
gotoAndPlay (2);
Symbol 35 MovieClip [mcExplode] Frame 1
_root.sndExplode.stop();
_root.sndExplode.start();
Symbol 35 MovieClip [mcExplode] Frame 8
this.removeMovieClip();
Symbol 38 MovieClip [mcPowerUp2] Frame 1
onEnterFrame = function () {
this._y = this._y + 5;
if (this.hitTest(_root.mcMain)) {
for (var _local4 in _root.enemies) {
var _local3 = _root.attachMovie("mcExplode", "ex" + _local4, _root.getNextHighestDepth());
_local3._x = _root.enemies[_local4]._x;
_local3._y = _root.enemies[_local4]._y;
_root.score = _root.score + int(_root.enemies[_local4].worth);
_root.enemies[_local4].removeMovieClip();
delete _root.enemies[_local4];
}
this.removeMovieClip();
}
if (this._y > (Stage.height + this._height)) {
this.removeMovieClip();
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
Symbol 41 MovieClip [mcPowerUp1] Frame 1
onEnterFrame = function () {
this._y = this._y + 5;
if (this.hitTest(_root.mcMain)) {
_root.fireRate = Math.max(_root.fireRate - 2, 6);
this.removeMovieClip();
}
if (this._y > (Stage.height + this._height)) {
this.removeMovieClip();
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
Symbol 43 MovieClip [mcPowerUp0] Frame 1
onEnterFrame = function () {
this._y = this._y + 5;
if (this.hitTest(_root.mcMain)) {
_root.fireMode = 1;
this.removeMovieClip();
}
if (this._y > (Stage.height + this._height)) {
this.removeMovieClip();
}
if (_root.gameOver) {
this.removeMovieClip();
}
};
Symbol 50 Button
on (press) {
getURL ("http://www.gamegutter.com/?airmarshall");
}
Symbol 54 MovieClip Frame 1
this.onEnterFrame = function () {
cloud1._y = cloud1._y + 1;
cloud2._y = cloud2._y + 1;
if (cloud1._y > cloud1._height) {
cloud1._y = (-cloud1._height) + 1;
}
if (cloud2._y > cloud2._height) {
cloud2._y = (-cloud2._height) + 1;
}
};
Symbol 59 MovieClip Frame 1
stop();
_root.sndFire.setVolume(100);
this.onPress = function () {
gotoAndStop(((_currentframe == 1) ? 2 : 1));
};
Symbol 59 MovieClip Frame 2
stop();
_root.sndFire.setVolume(0);
Symbol 64 MovieClip Frame 1
this.onPress = function () {
getURL ("http://www.gamegutter.com/?airmarshall", "_blank");
};