Combined Code
movieClip 13 {
}
movieClip 15 radar_mc {
frame 1 {
stop();
}
}
movieClip 18 {
}
movieClip 23 bullet_mc {
frame 1 {
stop();
}
frame 5 {
this.removeMovieClip();
delete this;
}
}
movieClip 25 debris_s {
frame 1 {
xspeed = random(0.1);
yspeed = -0.4 + Math.random() * -0.8;
gravity = 1.1;
alphaDecay = 4 + random(4);
this._alpha = 100;
this._visible = false;
var rotationSpeed = Math.random() * 39;
if (Math.round(Math.random()) == 1) {
this.rotationSpeed *= -1;
}
this.onEnterFrame = function () {
if (this.angle != undefined && !this._visible) {
this._rotation = this.angle * 180 / Math.PI;
this.xspeed += Math.cos(this.angle - 1.570796326794897) * 9;
this.yspeed += Math.sin(this.angle) * -3;
this._visible = true;
}
if (this._visible) {
this._rotation += rotationSpeed;
this._x += xspeed;
this._y += yspeed;
yspeed += gravity;
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
yspeed *= -0.5;
xspeed *= 0.5;
}
this._alpha -= alphaDecay;
if (this._alpha <= 10) {
this.removeMovieClip();
delete this.onEnterFrame;
}
}
};
}
}
movieClip 30 dead_debris {
frame 1 {
stop();
dice = 1 + random(5);
if (dice == 1) {
this.gotoAndStop(1);
}
if (dice == 2) {
this.gotoAndStop(2);
}
if (dice == 3) {
this.gotoAndStop(3);
}
if (dice == 4) {
this.gotoAndStop(4);
}
if (dice == 5) {
this.gotoAndStop(5);
}
if (dice == 6) {
this.gotoAndStop(6);
}
}
frame 2 {
xspeed = random(0.5);
yspeed = -8 + Math.random() * -10;
gravity = 1.1;
alphaDecay = 1 + random(1);
this._alpha = 80;
this._visible = false;
var rotationSpeed = Math.random() * 39;
if (Math.round(Math.random()) == 1) {
this.rotationSpeed *= -1;
}
this.onEnterFrame = function () {
if (this.angle != undefined && !this._visible) {
this._rotation = this.angle * 180 / Math.PI;
this.xspeed += Math.cos(this.angle - 1.570796326794897) * 9;
this.yspeed += Math.sin(this.angle) * -3;
this._visible = true;
}
if (this._visible) {
this._rotation += rotationSpeed;
this._x += xspeed;
this._y += yspeed;
yspeed += gravity;
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
yspeed *= -0.5;
xspeed *= 0.5;
}
this._alpha -= alphaDecay;
if (this._alpha <= 10) {
this.removeMovieClip();
delete this.onEnterFrame;
}
}
};
}
frame 3 {
xspeed = random(0.5);
yspeed = -6 + Math.random() * -8;
gravity = 1.1;
alphaDecay = 1 + random(1);
this._alpha = 80;
this._visible = false;
var rotationSpeed = Math.random() * 39;
if (Math.round(Math.random()) == 1) {
this.rotationSpeed *= -1;
}
this.onEnterFrame = function () {
if (this.angle != undefined && !this._visible) {
this._rotation = this.angle * 180 / Math.PI;
this.xspeed += Math.cos(this.angle - 1.570796326794897) * 9;
this.yspeed += Math.sin(this.angle) * -3;
this._visible = true;
}
if (this._visible) {
this._rotation += rotationSpeed;
this._x += xspeed;
this._y += yspeed;
yspeed += gravity;
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
yspeed *= -0.5;
xspeed *= 0.5;
}
this._alpha -= alphaDecay;
if (this._alpha <= 10) {
this.removeMovieClip();
delete this.onEnterFrame;
}
}
};
}
frame 4 {
xspeed = random(0.5);
yspeed = -10 + Math.random() * -14;
gravity = 1.1;
alphaDecay = 1 + random(1);
this._alpha = 80;
this._visible = false;
var rotationSpeed = Math.random() * 39;
if (Math.round(Math.random()) == 1) {
this.rotationSpeed *= -1;
}
this.onEnterFrame = function () {
if (this.angle != undefined && !this._visible) {
this._rotation = this.angle * 180 / Math.PI;
this.xspeed += Math.cos(this.angle - 1.570796326794897) * 9;
this.yspeed += Math.sin(this.angle) * -3;
this._visible = true;
}
if (this._visible) {
this._rotation += rotationSpeed;
this._x += xspeed;
this._y += yspeed;
yspeed += gravity;
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
yspeed *= -0.5;
xspeed *= 0.5;
}
this._alpha -= alphaDecay;
if (this._alpha <= 10) {
this.removeMovieClip();
delete this.onEnterFrame;
}
}
};
}
frame 5 {
xspeed = random(0.5);
yspeed = -6 + Math.random() * -8;
gravity = 1.1;
alphaDecay = 1 + random(1);
this._alpha = 80;
this._visible = false;
var rotationSpeed = Math.random() * 39;
if (Math.round(Math.random()) == 1) {
this.rotationSpeed *= -1;
}
this.onEnterFrame = function () {
if (this.angle != undefined && !this._visible) {
this._rotation = this.angle * 180 / Math.PI;
this.xspeed += Math.cos(this.angle - 1.570796326794897) * 9;
this.yspeed += Math.sin(this.angle) * -3;
this._visible = true;
}
if (this._visible) {
this._rotation += rotationSpeed;
this._x += xspeed;
this._y += yspeed;
yspeed += gravity;
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
yspeed *= -0.5;
xspeed *= 0.5;
}
this._alpha -= alphaDecay;
if (this._alpha <= 10) {
this.removeMovieClip();
delete this.onEnterFrame;
}
}
};
}
frame 6 {
xspeed = random(0.5);
yspeed = -6 + Math.random() * -8;
gravity = 1.1;
alphaDecay = 1 + random(1);
this._alpha = 80;
this._visible = false;
var rotationSpeed = Math.random() * 39;
if (Math.round(Math.random()) == 1) {
this.rotationSpeed *= -1;
}
this.onEnterFrame = function () {
if (this.angle != undefined && !this._visible) {
this._rotation = this.angle * 180 / Math.PI;
this.xspeed += Math.cos(this.angle - 1.570796326794897) * 9;
this.yspeed += Math.sin(this.angle) * -3;
this._visible = true;
}
if (this._visible) {
this._rotation += rotationSpeed;
this._x += xspeed;
this._y += yspeed;
yspeed += gravity;
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
yspeed *= -0.5;
xspeed *= 0.5;
}
this._alpha -= alphaDecay;
if (this._alpha <= 10) {
this.removeMovieClip();
delete this.onEnterFrame;
}
}
};
}
}
movieClip 31 debris {
frame 1 {
xspeed = random(0.5);
yspeed = -6 + Math.random() * -8;
gravity = 1.1;
alphaDecay = 1 + random(1);
this._alpha = 80;
this._visible = false;
var rotationSpeed = Math.random() * 39;
if (Math.round(Math.random()) == 1) {
this.rotationSpeed *= -1;
}
this.onEnterFrame = function () {
if (this.angle != undefined && !this._visible) {
this._rotation = this.angle * 180 / Math.PI;
this.xspeed += Math.cos(this.angle - 1.570796326794897) * 9;
this.yspeed += Math.sin(this.angle) * -3;
this._visible = true;
}
if (this._visible) {
this._rotation += rotationSpeed;
this._x += xspeed;
this._y += yspeed;
yspeed += gravity;
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
yspeed *= -0.5;
xspeed *= 0.5;
}
this._alpha -= alphaDecay;
if (this._alpha <= 10) {
this.removeMovieClip();
delete this.onEnterFrame;
}
}
};
}
}
movieClip 35 {
frame 21 {
stop();
this.removeMovieClip();
delete this;
}
}
movieClip 36 bomb_mc {
frame 1 {
stop();
}
frame 40 {
stop();
this.removeMovieClip();
delete this;
}
}
movieClip 42 {
}
movieClip 44 {
}
movieClip 46 {
}
movieClip 48 {
}
movieClip 51 {
}
movieClip 53 {
frame 1 {
stop();
}
}
movieClip 56 wingman_mc {
frame 1 {
stop();
}
frame 30 {
this.removeMovieClip();
delete this;
}
}
movieClip 58 {
}
movieClip 60 enemy_mc {
frame 1 {
stop();
}
frame 30 {
this.removeMovieClip();
delete this;
}
}
movieClip 64 {
}
movieClip 69 player_mc3 {
frame 1 {
stop();
}
frame 30 {
this.removeMovieClip();
delete this;
}
}
movieClip 72 {
}
movieClip 75 {
}
movieClip 77 {
}
movieClip 81 player_mc2 {
frame 1 {
stop();
}
frame 30 {
this.removeMovieClip();
delete this;
}
}
movieClip 86 player_mc1 {
frame 1 {
stop();
}
frame 30 {
this.removeMovieClip();
delete this;
}
}
movieClip 88 {
}
movieClip 89 burning_debris {
}
movieClip 90 burning {
frame 37 {
this.removeMovieClip();
delete this;
}
}
movieClip 92 {
frame 40 {
stop();
this.removeMovieClip();
delete this;
}
}
movieClip 93 smoke_dmg {
frame 1 {
stop();
}
}
movieClip 95 {
frame 1 {
stop();
}
}
movieClip 98 aa_gun {
frame 1 {
stop();
nn;
}
}
movieClip 102 outpost_mc {
frame 1 {
stop();
if (_root.terrain_mc.timeofyear == 'winter') {
this.gotoAndStop(2);
}
}
}
movieClip 104 {
}
movieClip 105 score_100 {
frame 41 {
stop();
}
}
movieClip 107 {
}
movieClip 108 score_40 {
frame 41 {
stop();
}
}
movieClip 110 {
}
movieClip 121 splash {
frame 1 {
_root.fader = false;
}
frame 1 {
stop();
this.playes = false;
}
frame 2 {
this.playes = true;
}
frame 36 {
stop();
_root.paus = false;
this.playes = false;
if (_root.player_mc.crashed == true or _root.player_mc.crashed == undefined) {
if (!_root.level_comp) {
_root.restart();
}
}
if (_root.level_comp) {
_root.clean_up();
_root.total_score += _root.level_score[_root.level];
_root.game_score += _root.level_score[_root.level];
_root.gotoAndStop('shop');
if (_root.level == 10) {
_root.gotoAndPlay('highscore');
}
++_root.level;
}
this.removeMovieClip();
}
}
movieClip 123 {
}
movieClip 124 score_10 {
frame 26 {
stop();
}
}
movieClip 126 {
}
movieClip 127 score_500 {
frame 41 {
stop();
this.removeMovieClip();
}
}
movieClip 129 {
}
movieClip 130 rank {
frame 41 {
stop();
}
}
movieClip 133 {
}
movieClip 134 aa_veh {
}
movieClip 137 factory_mc {
frame 1 {
stop();
}
}
movieClip 140 hangar_mc {
frame 1 {
stop();
}
}
movieClip 143 villa_mc {
frame 1 {
stop();
}
}
movieClip 145 {
}
movieClip 148 villa2_mc {
frame 1 {
stop();
if (_root.terrain_mc.timeofyear == 'winter') {
this.gotoAndStop(2);
}
}
}
movieClip 150 {
}
movieClip 152 {
}
movieClip 156 villa3_mc {
frame 1 {
stop();
if (_root.terrain_mc.timeofyear == 'winter') {
this.gotoAndStop(2);
}
}
instance of movieClip 152 {
onClipEvent (enterFrame) {
this._rotation += 1.5;
}
}
}
movieClip 159 hangar2_mc {
frame 1 {
stop();
}
}
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) ? /:$version : 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);
}
return res;
}
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
return res;
}
_root._x = 0;
_root._y = 0;
stop();
var total;
var loaded;
onEnterFrame = function () {
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
_root.disp = loaded + ' bytes' + ' / ' + total + ' bytes';
};
mochi.as2.MochiAd.showPreGameAd({'id': '481f004a557ca310', 'res': '800x650', 'background': 10137835, 'color': 15458774, 'outline': 15654365, 'no_bg': true});
mochi.as2.MochiServices.connect('481f004a557ca310');
__com_mochibot__('4cd4f82e', this, 10301, true);
}
movieClip 161 {
}
movieClip 164 {
}
movieClip 167 {
}
movieClip 171 {
}
movieClip 446 __Packages.mochi.as2.MochiAd {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiAd) {
var v1 = function () {};
mochi.as2.MochiAd = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showPreGameAd = function (options) {
var v27 = {'clip': _root, 'ad_timeout': 3000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showPreloaderAd', 'color': 16747008, 'background': 16777161, 'outline': 13994812, 'no_progress_bar': false, 'ad_started': function () {
this.clip.stop();
}, 'ad_finished': function () {
this.clip.play();
}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_loaded': function (width, height) {}, 'ad_skipped': function () {}, 'ad_progress': function (percent) {}};
options = mochi.as2.MochiAd._parseOptions(options, v27);
if ('c862232051e0a94e1c3609b3916ddb17'.substr(0) == 'dfeada81ac97cde83665f81c12da7def') {
options.ad_started();
options.ad_finished();
return undefined;
}
var clip = options.clip;
var v24 = 11000;
var v19 = options.ad_timeout;
if (options.skip) {
v19 = 0;
}
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v15 = mochi.as2.MochiAd._getRes(options);
var v5 = v15[0];
var v14 = v15[1];
mc._x = v5 * 0.5;
mc._y = v14 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk._x = v5 * -0.5;
chk._y = v14 * -0.5;
var v7 = chk.createEmptyMovieClip('_mochiad_bar', 4);
if (options.no_progress_bar) {
v7._visible = false;
delete options.no_progress_bar;
} else {
v7._x = 10;
v7._y = v14 - 20;
}
var v23 = options.color;
delete options.color;
var v21 = options.background;
delete options.background;
var v25 = options.outline;
delete options.outline;
var v6 = v7.createEmptyMovieClip('_outline', 1);
v6.beginFill(v21);
v6.moveTo(0, 0);
v6.lineTo(v5 - 20, 0);
v6.lineTo(v5 - 20, 10);
v6.lineTo(0, 10);
v6.lineTo(0, 0);
v6.endFill();
var v4 = v7.createEmptyMovieClip('_inside', 2);
v4.beginFill(v23);
v4.moveTo(0, 0);
v4.lineTo(v5 - 20, 0);
v4.lineTo(v5 - 20, 10);
v4.lineTo(0, 10);
v4.lineTo(0, 0);
v4.endFill();
v4._xscale = 0;
var v8 = v7.createEmptyMovieClip('_outline', 3);
v8.lineStyle(0, v25, 100);
v8.moveTo(0, 0);
v8.lineTo(v5 - 20, 0);
v8.lineTo(v5 - 20, 10);
v8.lineTo(0, 10);
v8.lineTo(0, 0);
chk.ad_msec = v24;
chk.ad_timeout = v19;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
mochi.as2.MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var v2 = this.mc._mochiad_wait;
v2.server_control = true;
v2.started = getTimer();
v2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v10 = this._parent._parent;
var v3 = v10;
for (;;) {
if (!(!v3.getBytesTotal() && v3)) break;
v3 = v3._parent;
}
if (!v3) {
v3 = _root;
}
var v13 = this._parent._mochiad_ctr;
var v7 = getTimer() - this.started;
var v5 = false;
var v6 = v3.getBytesTotal();
var v9 = v3.getBytesLoaded();
var v4 = 100 * v9 / v6;
var v12 = 100 * v7 / chk.ad_msec;
var v11 = this._mochiad_bar._inside;
var v15 = Math.min(100, Math.min(v4 || 0, v12));
v15 = Math.max(this.last_pcnt, v15);
this.last_pcnt = v15;
v11._xscale = v15;
options.ad_progress(v15);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {'id': 'hostLoadPcnt', 'pcnt': v4}, clip._mochiad._containerLCName);
if (v4 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var v8 = v13.getBytesTotal();
if (v8 > 0 || typeof v8 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v7 > chk.ad_timeout && v4 == 100) {
options.ad_failed();
v5 = true;
}
}
}
if (v7 > chk.ad_msec) {
v5 = true;
}
if (v6 > 0 && v9 >= v6 && v5) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
};
v1.showClickAwayAd = function (options) {
var v10 = {'clip': _root, 'ad_timeout': 2000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showClickAwayAd', 'res': '300x250', 'no_bg': true, 'ad_started': function () {}, 'ad_finished': function () {}, 'ad_loaded': function (width, height) {}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_skipped': function () {}};
options = mochi.as2.MochiAd._parseOptions(options, v10);
var clip = options.clip;
var v9 = options.ad_timeout;
delete options.ad_timeout;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var v3 = clip._mochiad;
v3.onUnload = function () {
options.ad_finished();
};
var v5 = mochi.as2.MochiAd._getRes(options);
var v11 = v5[0];
var v8 = v5[1];
v3._x = v11 * 0.5;
v3._y = v8 * 0.5;
var chk = v3.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_timeout = v9;
chk.started = getTimer();
chk.showing = false;
v3.lc.adLoaded = options.ad_loaded;
v3.lc.adSkipped = options.ad_skipped;
v3.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
v3.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
var v21 = false;
chk.onEnterFrame = function () {
var v5 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v2 = false;
if (!chk.showing) {
var v3 = v5.getBytesTotal();
if (v3 > 0 || typeof v3 == 'undefined') {
v2 = true;
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout) {
options.ad_failed();
v2 = true;
}
}
}
if (v2) {
delete this.onEnterFrame;
}
};
};
v1.showInterLevelAd = function (options) {
var v13 = {'clip': _root, 'ad_timeout': 2000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showTimedAd', 'ad_started': function () {
this.clip.stop();
}, 'ad_finished': function () {
this.clip.play();
}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_loaded': function (width, height) {}, 'ad_skipped': function () {}};
options = mochi.as2.MochiAd._parseOptions(options, v13);
var clip = options.clip;
var v10 = 11000;
var v12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v5 = mochi.as2.MochiAd._getRes(options);
var v14 = v5[0];
var v11 = v5[1];
mc._x = v14 * 0.5;
mc._y = v11 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_msec = v10;
chk.ad_timeout = v12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
mochi.as2.MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var v2 = this.mc._mochiad_wait;
v2.server_control = true;
v2.started = getTimer();
v2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v5 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v2 = false;
if (!chk.showing) {
var v3 = v5.getBytesTotal();
if (v3 > 0 || typeof v3 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout) {
options.ad_failed();
v2 = true;
}
}
}
if (v4 > chk.ad_msec) {
v2 = true;
}
if (v2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
};
v1.showPreloaderAd = function (options) {
trace('[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0');
mochi.as2.MochiAd.showPreGameAd(options);
};
v1.showTimedAd = function (options) {
trace('[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0');
mochi.as2.MochiAd.showInterLevelAd(options);
};
v1._allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.load = function (options) {
var v12 = {'clip': _root, 'server': 'http://x.mochiads.com/srv/1/', 'method': 'load', 'depth': 10333, 'id': '_UNKNOWN_'};
options = mochi.as2.MochiAd._parseOptions(options, v12);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = mochi.as2.MochiAd.getVersion();
var v6 = options.clip;
if (!mochi.as2.MochiAd._isNetworkAvailable()) {
return null;
}
if (v6._mochiad_loaded) {
return null;
}
var v11 = options.depth;
delete options.depth;
var mc = v6.createEmptyMovieClip('_mochiad', v11);
var v10 = mochi.as2.MochiAd._getRes(options);
options.res = v10[0] + 'x' + v10[1];
options.server += options.id;
delete options.id;
v6._mochiad_loaded = true;
if (v6._url.indexOf('http') != 0) {
trace('[MochiAd] NOTE: Security Sandbox Violation errors below are normal');
}
var v4 = mc.createEmptyMovieClip('_mochiad_ctr', 1);
for (var v7 in options) {
v4[v7] = options[v7];
}
var v9 = v4.server;
delete v4.server;
var v13 = mochi.as2.MochiAd._allowDomains(v9);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var v5 = new Object();
var v8 = ['', Math.floor((new Date()).getTime()), random(999999)].join('_');
v5.mc = mc;
v5.name = v8;
v5.hostname = v13;
v5.allowDomain = function (d) {
return true;
};
v5.allowInsecureDomain = v5.allowDomain;
v5.connect(v8);
mc.lc = v5;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
v4.lc = v8;
v4.st = getTimer();
if (!options.skip) {
v4.loadMovie(v9 + '.swf', 'POST');
}
return mc;
};
v1.unload = function (clip) {
if (typeof clip == 'undefined') {
clip = _root;
}
if (clip.clip && clip.clip._mochiad) {
clip = clip.clip;
}
if (!clip._mochiad) {
return false;
}
mochi.as2.MochiAd.containerNotify(clip, {'id': 'unload'}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return true;
};
v1._isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1._getRes = function (options) {
var v3 = options.clip.getBounds();
var v2 = 0;
var v1 = 0;
if (typeof options.res != 'undefined') {
var v4 = options.res.split('x');
v2 = parseFloat(v4[0]);
v1 = parseFloat(v4[1]);
} else {
v2 = v3.xMax - v3.xMin;
v1 = v3.yMax - v3.yMin;
}
if (v2 == 0 || v1 == 0) {
v2 = Stage.width;
v1 = Stage.height;
}
return [v2, v1];
};
v1._parseOptions = function (options, defaults) {
var v4 = {};
for (var v8 in defaults) {
v4[v8] = defaults[v8];
}
if (options) {
for (v8 in options) {
v4[v8] = options[v8];
}
}
if (_root.mochiad_options) {
var v5 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v5.length) {
var v3 = v5[v2].split('=');
v4[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
if (v4.id == 'test') {
trace('[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!');
}
return v4;
};
v1.rpc = function (clip, callbackID, arg) {
switch (arg.id) {
case 'setValue':
mochi.as2.MochiAd.setValue(clip, arg.objectName, arg.value);
break;
case 'getValue':
var v4 = mochi.as2.MochiAd.getValue(clip, arg.objectName);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v4, clip._mochiad._containerLCName);
break;
case 'runMethod':
var v3 = mochi.as2.MochiAd.runMethod(clip, arg.method, arg.args);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v3, clip._mochiad._containerLCName);
break;
default:
trace('[mochiads rpc] unknown rpc id: ' + arg.id);
}
};
v1.setValue = function (base, objectName, value) {
var v2 = objectName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
base[v2[v1]] = value;
};
v1.getValue = function (base, objectName) {
var v2 = objectName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
return base[v2[v1]];
};
v1.runMethod = function (base, methodName, argsArray) {
var v2 = methodName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
if (typeof base[v2[v1]] == 'function') {
return base[v2[v1]].apply(base, argsArray);
} else {
return undefined;
}
};
v1.containerNotify = function (clip, args, lcName) {
var v1 = clip._mochiad._mochiad_ctr.ad.app;
if (v1.notify) {
v1.notify(args);
} else {
(new LocalConnection()).send(lcName, 'notify', args);
}
};
v1.containerRpcResult = function (clip, callbackID, val, lcName) {
var v1 = clip._mochiad._mochiad_ctr.ad.app;
if (v1.rpcResult) {
v1.rpcResult(callbackID, val);
} else {
(new LocalConnection()).send(lcName, 'rpcResult', callbackID, val);
}
};
ASSetPropFlags(mochi.as2.MochiAd.prototype, null, 1);
}
#endinitclip
}
movieClip 447 __Packages.mochi.as2.MochiEventDispatcher {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEventDispatcher) {
var v1 = function () {
this.eventTable = {};
};
mochi.as2.MochiEventDispatcher = v1;
var v2 = v1.prototype;
v2.buildDelegate = function (thisObject, thatObject) {
var v2 = {'thisObject': thisObject, 'thatObject': thatObject};
if (thatObject != undefined) {
var funct = (typeof thatObject == 'string') ? thisObject[thatObject] : thatObject;
v2.delegate = function (args) {
funct.call(thisObject, args);
};
return v2;
}
v2.delegate = thisObject;
return v2;
};
v2.compareDelegate = function (d_A, d_B) {
if (d_A.thisObject != d_B.thisObject || d_A.thatObject != d_B.thatObject) {
return false;
}
return true;
};
v2.addEventListener = function (event, thisObject, thatObject) {
this.removeEventListener(event, thisObject, thatObject);
this.eventTable[event].push(this.buildDelegate(thisObject, thatObject));
};
v2.removeEventListener = function (event, thisObject, thatObject) {
var v3 = this.buildDelegate(thisObject, thatObject);
if (this.eventTable[event] == undefined) {
this.eventTable[event] = [];
return undefined;
}
for (var v4 in this.eventTable[event]) {
if (!this.compareDelegate(this.eventTable[event][v4], v3)) {
continue;
}
this.eventTable[event].splice(Number(v4), 1);
}
};
v2.triggerEvent = function (event, args) {
if (this.eventTable[event] == undefined) {
return undefined;
}
for (var v4 in this.eventTable[event]) {
this.eventTable[event][v4].delegate(args);
}
};
ASSetPropFlags(mochi.as2.MochiEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 448 __Packages.mochi.as2.MochiServices {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiServices) {
var v1 = function () {};
mochi.as2.MochiServices = v1;
var v2 = v1.prototype;
v1.__get__id = function () {
return mochi.as2.MochiServices._id;
};
v1.__get__clip = function () {
return mochi.as2.MochiServices._container;
};
v1.__get__childClip = function () {
return mochi.as2.MochiServices._clip;
};
v1.getVersion = function () {
return '3.9.1 as2';
};
v1.allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.__get__isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1.__set__comChannelName = function (val) {
if (val != undefined) {
if (val.length > 3) {
mochi.as2.MochiServices._sendChannelName = val + '_fromgame';
mochi.as2.MochiServices.initComChannels();
}
}
return mochi.as2.MochiServices.__get__comChannelName();
};
v1.__get__connected = function () {
return mochi.as2.MochiServices._connected;
};
v1.connect = function (id, clip, onError) {
mochi.as2.MochiServices.warnID(id, false);
if (!mochi.as2.MochiServices._connected && mochi.as2.MochiServices._clip == undefined) {
trace('MochiServices Connecting...');
mochi.as2.MochiServices._connecting = true;
mochi.as2.MochiServices.init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else {
if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
};
v1.disconnect = function () {
if (mochi.as2.MochiServices._connected || mochi.as2.MochiServices._connecting) {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._connecting = mochi.as2.MochiServices._connected;
mochi.as2.MochiServices.flush(true);
if (mochi.as2.MochiServices._clip != undefined) {
mochi.as2.MochiServices._clip.removeMovieClip();
delete mochi.as2.MochiServices._clip;
}
mochi.as2.MochiServices._listenChannel.close();
}
};
v1.init = function (id, clip) {
mochi.as2.MochiServices._id = id;
if (clip != undefined) {
mochi.as2.MochiServices._container = clip;
} else {
mochi.as2.MochiServices._container = _root;
}
mochi.as2.MochiServices.loadCommunicator(id, mochi.as2.MochiServices._container);
};
v1.loadCommunicator = function (id, clip) {
var v6 = '_mochiservices_com_' + id;
var v5 = new MovieClipLoader();
var v3 = {};
if (mochi.as2.MochiServices._clip != null) {
return mochi.as2.MochiServices._clip;
}
if (!mochi.as2.MochiServices.__get__isNetworkAvailable()) {
return null;
}
if ((mochi.as2.MochiServices.urlOptions()).servURL) {
mochi.as2.MochiServices._servURL = (mochi.as2.MochiServices.urlOptions()).servURL;
}
var v4 = mochi.as2.MochiServices._servURL + mochi.as2.MochiServices._services;
if ((mochi.as2.MochiServices.urlOptions()).servicesURL) {
v4 = (mochi.as2.MochiServices.urlOptions()).servicesURL;
}
mochi.as2.MochiServices.allowDomains(v4);
mochi.as2.MochiServices._clip = clip.createEmptyMovieClip(v6, 10336, false);
mochi.as2.MochiServices._listenChannelName += Math.floor((new Date()).getTime()) + '_' + Math.floor(Math.random() * 99999);
mochi.as2.MochiServices.listen();
if (v3.waitInterval != null) {
clearInterval(v3.waitInterval);
}
v3.onLoadError = mochi.as2.MochiServices.loadError;
v3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
v3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
v3.startTime = getTimer();
v3.wait = function () {
if (getTimer() - this.startTime > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
}
clearInterval(this.waitInterval);
}
};
v3.waitInterval = setInterval(v3, 'wait', 1000);
v5.addListener(v3);
v5.loadClip(v4 + '?listenLC=' + mochi.as2.MochiServices._listenChannelName + '&mochiad_options=' + escape(_root.mochiad_options) + '&api_version=' + mochi.as2.MochiServices.getVersion(), mochi.as2.MochiServices._clip);
mochi.as2.MochiServices._sendChannel = new LocalConnection();
mochi.as2.MochiServices._sendChannel._queue = [];
return mochi.as2.MochiServices._clip;
};
v1.loadError = function (target_mc, errorCode, httpStatus) {
trace('MochiServices could not load.');
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
v1.onStatus = function (infoObject) {
if (infoObject.level !== 'error') {
} else {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
}
};
v1.listen = function () {
mochi.as2.MochiServices._listenChannel = new LocalConnection();
mochi.as2.MochiServices._listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
mochi.as2.MochiServices._listenChannel.allowDomain = function (d) {
return true;
};
mochi.as2.MochiServices._listenChannel.allowInsecureDomain = mochi.as2.MochiServices._listenChannel.allowDomain;
mochi.as2.MochiServices._listenChannel._nextcallbackID = 0;
mochi.as2.MochiServices._listenChannel._callbacks = {};
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
trace('Waiting for MochiAds services to connect...');
};
v1.initComChannels = function () {
if (!mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'handshakeDone'});
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'registerGame', 'id': mochi.as2.MochiServices._id, 'version': mochi.as2.MochiServices.getVersion()});
mochi.as2.MochiServices._listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._listenChannel.onReceive = function (pkg) {
var v5 = pkg.callbackID;
var v4 = this._callbacks[v5];
if (!v4) {
return undefined;
}
var v2 = v4.callbackMethod;
var v3 = v4.callbackObject;
if (v3 && typeof v2 == 'string') {
v2 = v3[v2];
}
if (v2 != undefined) {
v2.apply(v3, pkg.args);
}
delete this._callbacks[v5];
};
mochi.as2.MochiServices._listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case 'services':
mochi.as2.MochiServices.triggerEvent(pkg.event, pkg.args);
break;
case 'events':
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case 'coins':
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case 'social':
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
}
};
mochi.as2.MochiServices._listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
};
trace('[SERVICES_API] connected!');
mochi.as2.MochiServices._connecting = false;
mochi.as2.MochiServices._connected = true;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', mochi.as2.MochiServices._sendChannel._queue.shift());
}
}
};
v1.flush = function (error) {
var v1;
var v2;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
v1 = mochi.as2.MochiServices._sendChannel._queue.shift();
false;
if (v1.callbackID != null) {
v2 = mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
}
delete mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
if (error) {
mochi.as2.MochiServices.handleError(v1.args, v2.callbackObject, v2.callbackMethod);
}
}
};
v1.handleError = function (args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ['NotConnected']);
}
if (args.options != null && args.options.onError != null) {
args.options.onError.apply(null, ['NotConnected']);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = 'NotConnected';
if (callbackObject != null && typeof callbackMethod == 'string') {
callbackObject[callbackMethod](args);
} else {
if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
};
v1.send = function (methodName, args, callbackObject, callbackMethod) {
if (mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
} else {
if (mochi.as2.MochiServices._clip == undefined || !mochi.as2.MochiServices._connecting) {
trace('Error: MochiServices not connected. Please call MochiServices.connect(). Function: ' + methodName);
mochi.as2.MochiServices.handleError(args, callbackObject, callbackMethod);
mochi.as2.MochiServices.flush(true);
return undefined;
} else {
mochi.as2.MochiServices._sendChannel._queue.push({'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
}
}
mochi.as2.MochiServices._listenChannel._callbacks[mochi.as2.MochiServices._listenChannel._nextcallbackID] = {'callbackObject': callbackObject, 'callbackMethod': callbackMethod};
++mochi.as2.MochiServices._listenChannel._nextcallbackID;
};
v1.urlOptions = function () {
var v5 = {};
var v6;
if (_root._url.indexOf('mochiad_options') != -1) {
var v2 = _root._url.indexOf('mochiad_options') + 'mochiad_options'.length + 1;
v6 = _root._url.substr(v2, _root._url.length);
} else {
if (_root.mochiad_options) {
v6 = _root.mochiad_options;
}
}
if (v6) {
var v4 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v4.length) {
var v3 = v4[v2].split('=');
v5[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
return v5;
};
v1.warnID = function (bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace('WARNING: ' + (leaderboard ? 'board' : 'game') + ' ID is not the appropriate length');
return undefined;
} else {
if (bid == '1e113c7239048b3f') {
if (leaderboard) {
trace('WARNING: Using testing board ID');
} else {
trace('WARNING: Using testing board ID as game ID');
}
return undefined;
} else {
if (bid == '84993a1de4031cd8') {
if (leaderboard) {
trace('WARNING: Using testing game ID as board ID');
} else {
trace('WARNING: Using testing game ID');
}
return undefined;
}
}
}
var v1 = 0;
while (v1 < bid.length) {
switch (bid.charAt(v1)) {
if (bid.charAt(v1) !== 'f') {
} else {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'a':
break;
case 'b':
case 'c':
case 'd':
case 'e':
}
default:
trace('WARNING: Board ID contains illegal characters: ' + bid);
return undefined;
}
++v1;
}
};
v1.addLinkEvent = function (url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var v2 = new Object();
v2.mav = mochi.as2.MochiServices.getVersion();
v2.swfv = btn.getSWFVersion() || 6;
v2.swfurl = btn._url;
v2.fv = System.capabilities.version;
v2.os = System.capabilities.os;
v2.lang = System.capabilities.language;
v2.scres = System.capabilities.screenResolutionX + 'x' + System.capabilities.screenResolutionY;
var s = '?';
var v3 = 0;
for (var v6 in v2) {
if (v3 != 0) {
s += '&';
}
++v3;
s = s + v6 + '=' + escape(v2[v6]);
}
if (!(mochi.as2.MochiServices.netupAttempted || mochi.as2.MochiServices._connected)) {
var ping = btn.createEmptyMovieClip('ping', 777);
var v7 = btn.createEmptyMovieClip('nettest', 778);
mochi.as2.MochiServices.netupAttempted = true;
ping.loadMovie('http://link.mochiads.com/linkping.swf?t=' + getTimer());
v7.onEnterFrame = function () {
if (ping._totalframes > 0 && ping._totalframes == ping._framesloaded) {
delete this.onEnterFrame;
} else {
if (getTimer() - t0 > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
}
};
}
var v4 = btn.createEmptyMovieClip('clk', 1001);
v4._alpha = 0;
v4.beginFill(1044735);
v4.moveTo(0, 0);
v4.lineTo(0, btn._height);
v4.lineTo(btn._width, btn._height);
v4.lineTo(btn._width, 0);
v4.lineTo(0, 0);
v4.endFill();
v4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL(url + s, '_blank');
} else {
getURL(burl, '_blank');
}
if (onClick != undefined) {
onClick();
}
};
};
v1.setContainer = function (clip) {};
v1.stayOnTop = function (clip) {};
v1.addEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiServices._dispatcher.addEventListener(eventType, thisObject, thatObject);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiServices._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiServices._dispatcher.removeEventListener(eventType, thisObject, thatObject);
};
v1.CONNECTED = 'onConnected';
v1._servURL = 'http://www.mochiads.com/static/lib/services/';
v1._services = 'services.swf';
v1._mochiLC = 'MochiLC.swf';
v1._listenChannelName = '__ms_';
v1._connecting = false;
v1._connected = false;
v1.netup = true;
v1.netupAttempted = false;
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
v1.addProperty('childClip', v1.__get__childClip, function () {});
v1.addProperty('clip', v1.__get__clip, function () {});
v1.addProperty('comChannelName', function () {}, v1.__set__comChannelName);
v1.addProperty('connected', v1.__get__connected, function () {});
v1.addProperty('id', v1.__get__id, function () {});
v1.addProperty('isNetworkAvailable', v1.__get__isNetworkAvailable, function () {});
ASSetPropFlags(mochi.as2.MochiServices.prototype, null, 1);
}
#endinitclip
}
movieClip 449 __Packages.mochi.as2.MochiEvents {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEvents) {
var v1 = function () {};
mochi.as2.MochiEvents = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.startSession = function (achievementID) {
mochi.as2.MochiServices.send('events_beginSession', {'achievementID': achievementID}, null, null);
};
v1.setNotifications = function (clip, style) {
var v2 = {};
for (var v3 in style) {
v2[v3] = style[v3];
}
v2.clip = clip;
mochi.as2.MochiServices.send('events_setNotifications', v2, null, null);
};
v1.addEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.addEventListener(eventType, thisObject, thatObject);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiEvents._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.removeEventListener(eventType, thisObject, thatObject);
};
v1.startPlay = function (tag) {
if (tag == undefined) {
tag = 'gameplay';
}
mochi.as2.MochiServices.send('events_setRoundID', {'tag': String(tag)}, null, null);
};
v1.endPlay = function () {
mochi.as2.MochiServices.send('events_clearRoundID', null, null, null);
};
v1.trackEvent = function (tag, value) {
mochi.as2.MochiServices.send('events_trackEvent', {'tag': tag, 'value': value}, null, null);
};
v1.ACHIEVEMENT_RECEIVED = 'AchievementReceived';
v1.ALIGN_TOP_LEFT = 'ALIGN_TL';
v1.ALIGN_TOP = 'ALIGN_T';
v1.ALIGN_TOP_RIGHT = 'ALIGN_TR';
v1.ALIGN_LEFT = 'ALIGN_L';
v1.ALIGN_CENTER = 'ALIGN_C';
v1.ALIGN_RIGHT = 'ALIGN_R';
v1.ALIGN_BOTTOM_LEFT = 'ALIGN_BL';
v1.ALIGN_BOTTOM = 'ALIGN_B';
v1.ALIGN_BOTTOM_RIGHT = 'ALIGN_BR';
v1.FORMAT_SHORT = 'ShortForm';
v1.FORMAT_LONG = 'LongForm';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiEvents.prototype, null, 1);
}
#endinitclip
}
movieClip 450 __Packages.mochi.as2.MochiCoins {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiCoins) {
var v1 = function () {};
mochi.as2.MochiCoins = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showStore = function (options) {
mochi.as2.MochiServices.send('coins_showStore', {'options': options}, null, null);
};
v1.showItem = function (options) {
if (options == undefined || typeof options.item != 'string') {
trace('ERROR: showItem call must pass an Object with an item key');
return undefined;
}
mochi.as2.MochiServices.send('coins_showItem', {'options': options}, null, null);
};
v1.showVideo = function (options) {
if (options == undefined || typeof options.item != 'string') {
trace('ERROR: showVideo call must pass an Object with an item key');
return undefined;
}
mochi.as2.MochiServices.send('coins_showVideo', {'options': options}, null, null);
};
v1.getStoreItems = function () {
mochi.as2.MochiServices.send('coins_getStoreItems');
};
v1.requestFunding = function (properties) {
mochi.as2.MochiServices.send('social_requestFunding', properties);
};
v1.addEventListener = function (eventType, delegate) {
mochi.as2.MochiCoins._dispatcher.addEventListener(eventType, delegate);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiCoins._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, delegate) {
mochi.as2.MochiCoins._dispatcher.removeEventListener(eventType, delegate);
};
v1.STORE_SHOW = 'StoreShow';
v1.STORE_HIDE = 'StoreHide';
v1.ITEM_OWNED = 'ItemOwned';
v1.ITEM_NEW = 'ItemNew';
v1.STORE_ITEMS = 'StoreItems';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.NO_USER = 'NoUser';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiCoins.prototype, null, 1);
}
#endinitclip
}
movieClip 451 __Packages.mochi.as2.MochiSocial {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSocial) {
var v1 = function () {};
mochi.as2.MochiSocial = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showLoginWidget = function (options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send('social_showLoginWidget', {'options': options});
};
v1.hideLoginWidget = function () {
mochi.as2.MochiServices.send('social_hideLoginWidget');
};
v1.requestLogin = function (properties) {
mochi.as2.MochiServices.send('social_requestLogin', properties);
};
v1.getFriendsList = function (properties) {
mochi.as2.MochiServices.send('social_getFriendsList', properties);
};
v1.postToStream = function (properties) {
mochi.as2.MochiServices.send('social_postToStream', properties);
};
v1.inviteFriends = function (properties) {
mochi.as2.MochiServices.send('social_inviteFriends', properties);
};
v1.requestFan = function (properties) {
mochi.as2.MochiServices.send('social_requestFan', properties);
};
v1.saveUserProperties = function (properties) {
mochi.as2.MochiServices.send('social_saveUserProperties', properties);
};
v1.addEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.addEventListener(eventType, delegate);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiSocial._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.removeEventListener(eventType, delegate);
};
v1.LOGGED_IN = 'LoggedIn';
v1.LOGGED_OUT = 'LoggedOut';
v1.LOGIN_SHOW = 'LoginShow';
v1.LOGIN_HIDE = 'LoginHide';
v1.LOGIN_SHOWN = 'LoginShown';
v1.PROFILE_SHOW = 'ProfileShow';
v1.PROFILE_HIDE = 'ProfileHide';
v1.PROPERTIES_SAVED = 'PropertySaved';
v1.WIDGET_LOADED = 'WidgetLoaded';
v1.FRIEND_LIST = 'FriendsList';
v1.PROFILE_DATA = 'ProfileData';
v1.GAMEPLAY_DATA = 'GameplayData';
v1.ACTION_CANCELED = 'onCancel';
v1.ACTION_COMPLETE = 'onComplete';
v1.USER_INFO = 'UserInfo';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.NO_USER = 'NoUser';
v1.PROPERTIES_SIZE = 'PropertiesSize';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiSocial.prototype, null, 1);
}
#endinitclip
}
movieClip 452 __Packages.mochi.as2.MochiScores {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiScores) {
var v1 = function () {};
mochi.as2.MochiScores = v1;
var v2 = v1.prototype;
v1.setBoardID = function (boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send('scores_setBoardID', {'boardID': boardID});
};
v1.showLeaderboard = function (options) {
options.clip = mochi.as2.MochiServices.clip;
if (options.clip != mochi.as2.MochiServices.__get__clip() || (mochi.as2.MochiServices.__get__childClip())._target == undefined) {
mochi.as2.MochiServices.disconnect();
trace('WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!');
trace('make sure MochiServices.connect is called as early in the application runtime as possible.');
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof options.name == 'object') {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else {
if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
}
var v1 = Number(options.score);
if (isNaN(v1)) {
trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is \'Not a Number\'');
} else {
if (v1 == Number.NEGATIVE_INFINITY || v1 == Number.POSITIVE_INFINITY) {
trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is an infinite');
} else {
if (Math.floor(v1) != v1) {
trace('WARNING: Submitted score \'' + options.score + '\' will be truncated');
}
options.score = v1;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
(mochi.as2.MochiServices.__get__clip()).stop();
}
if (options.onClose != null) {
mochi.as2.MochiScores.onClose = options.onClose;
} else {
mochi.as2.MochiScores.onClose = function () {
(mochi.as2.MochiServices.__get__clip()).play();
};
}
if (options.onError != null) {
mochi.as2.MochiScores.onError = options.onError;
} else {
mochi.as2.MochiScores.onError = mochi.as2.MochiScores.onClose;
}
if (options.boardID == null) {
if (mochi.as2.MochiScores.boardID != null) {
options.boardID = mochi.as2.MochiScores.boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace('[MochiScores] NOTE: Security Sandbox Violation errors below are normal');
mochi.as2.MochiServices.send('scores_showLeaderboard', {'options': options}, null, mochi.as2.MochiScores.doClose);
};
v1.closeLeaderboard = function () {
mochi.as2.MochiServices.send('scores_closeLeaderboard');
};
v1.getPlayerInfo = function (callbackObj, callbackMethod) {
mochi.as2.MochiServices.send('scores_getPlayerInfo', null, callbackObj, callbackMethod);
};
v1.submit = function (score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace('ERROR: Submitted score \'' + String(score) + '\' will be rejected, score is \'Not a Number\'');
} else {
if (score == Number.NEGATIVE_INFINITY || score == Number.POSITIVE_INFINITY) {
trace('ERROR: Submitted score \'' + String(score) + '\' will be rejected, score is an infinite');
} else {
if (Math.floor(score) != score) {
trace('WARNING: Submitted score \'' + String(score) + '\' will be truncated');
}
score = Number(score);
}
}
mochi.as2.MochiServices.send('scores_submit', {'score': score, 'name': name}, callbackObj, callbackMethod);
};
v1.requestList = function (callbackObj, callbackMethod) {
mochi.as2.MochiServices.send('scores_requestList', null, callbackObj, callbackMethod);
};
v1.scoresArrayToObjects = function (scores) {
var v5 = {};
var v1;
var v4;
var v2;
var v6;
for (var v8 in scores) {
if (typeof scores[v8] == 'object') {
if (scores[v8].cols != null && scores[v8].rows != null) {
v5[v8] = [];
v2 = scores[v8];
v4 = 0;
while (v4 < v2.rows.length) {
v6 = {};
v1 = 0;
while (v1 < v2.cols.length) {
v6[v2.cols[v1]] = v2.rows[v4][v1];
++v1;
}
v5[v8].push(v6);
++v4;
}
} else {
v5[v8] = {};
for (var v7 in scores[v8]) {
v5[v8][v7] = scores[v8][v7];
}
}
} else {
v5[v8] = scores[v8];
}
}
return v5;
};
v1.doClose = function (args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = 'IOError';
}
mochi.as2.MochiScores.onError.apply(null, [args.errorCode]);
} else {
mochi.as2.MochiScores.onClose.apply();
}
};
ASSetPropFlags(mochi.as2.MochiScores.prototype, null, 1);
}
#endinitclip
}
movieClip 453 __Packages.mochi.as2.MochiDigits {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiDigits) {
var v1 = function (digit, index) {
this.Encoder = 0;
this.setValue(digit, index);
};
mochi.as2.MochiDigits = v1;
var v2 = v1.prototype;
v2.__get__value = function () {
return Number(this.toString());
};
v2.__set__value = function (v) {
this.setValue(v);
return this.__get__value();
};
v2.addValue = function (v) {
this.value += v;
};
v2.setValue = function (digit, index) {
var v3 = digit.toString();
if (index == undefined || isNaN(index)) {
index = 0;
}
this.Fragment = v3.charCodeAt(index++) ^ this.Encoder;
if (index < v3.length) {
this.Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
this.Sibling = null;
}
this.reencode();
};
v2.reencode = function () {
var v2 = int(2147483647 * Math.random());
this.Fragment ^= v2 ^ this.Encoder;
this.Encoder = v2;
};
v2.toString = function () {
var v2 = String.fromCharCode(this.Fragment ^ this.Encoder);
return (this.Sibling != null) ? v2.concat(this.Sibling.toString()) : v2;
};
v2.addProperty('value', v2.__get__value, v2.__set__value);
ASSetPropFlags(mochi.as2.MochiDigits.prototype, null, 1);
}
#endinitclip
}
frame 2 {
function fade() {
i = 0;
while (i < 5) {
btns[i].onRollOver = function () {
this.play();
};
_root.onMouseDown = function () {
if (btns[0].hitTest(_root._xmouse, _root._ymouse, true)) {
_root.gotoAndStop('level1');
}
if (btns[1].hitTest(_root._xmouse, _root._ymouse, true)) {
_root.options_slide.play();
}
if (btns[2].hitTest(_root._xmouse, _root._ymouse, true)) {
_root.credits_slide.play();
}
};
btns[i].onRollOut = function () {
this.gotoAndStop(1);
};
++i;
}
}
function start_effect() {
++fcount;
if (fcount == 20) {
btns[0].play();
}
if (fcount == 25) {
btns[1].play();
}
if (fcount == 30) {
btns[2].play();
}
if (fcount == 60) {
btns[0].gotoAndStop(1);
}
if (fcount == 65) {
btns[1].gotoAndStop(1);
}
if (fcount == 70) {
btns[2].gotoAndStop(1);
}
}
stop();
_root._x = 0;
_root._y = 0;
Stage.showMenu = false;
var fcount = 0;
btns = new Array(_root.start_game, _root.options_btn, _root.credits_btn);
onEnterFrame = function () {
start_effect();
fade();
};
}
movieClip 175 {
}
movieClip 177 {
}
movieClip 180 {
}
movieClip 181 {
frame 1 {
stop();
}
frame 8 {
stop();
}
}
movieClip 183 {
}
movieClip 184 {
frame 1 {
stop();
}
frame 8 {
stop();
}
}
movieClip 186 {
}
movieClip 187 {
frame 1 {
stop();
}
frame 8 {
stop();
}
}
movieClip 194 {
}
movieClip 196 {
}
movieClip 198 {
}
button 202 {
on (press) {
this.play();
}
}
movieClip 203 {
frame 1 {
stop();
}
frame 12 {
stop();
}
}
movieClip 206 {
}
button 209 {
on (press) {
_root._quality = 'BEST';
}
}
button 212 {
on (press) {
_root._quality = 'HIGH';
}
}
button 217 {
on (press) {
_root._quality = 'MEDIUM';
}
}
button 220 {
on (press) {
_root._quality = 'LOW';
}
}
button 223 {
on (press) {
this.play();
}
}
movieClip 224 {
frame 1 {
stop();
}
frame 13 {
stop();
}
}
frame 6 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Dogfight', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 1;
minX = -250;
maxX = 1420;
minY = -120;
startX = 170;
startY = 0;
total_score = 0;
level_score = new Array(0, 0, 0, 0, 0, 0);
game_score = 0;
rank = 1;
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
units = new Array([], []);
aa_structures = new Array([], []);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = maxX + 600;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 6 {
function player_aircraft() {
s = attachMovie('player_mc' + plane_mc, 'player_mc', 1);
s._x = 180;
s._y = 200;
s._xscale = 15;
s._yscale = 15;
s._rotation = 90;
s.turnR = 0;
s.dir = 1;
s.count = 10;
s.delay = 11;
s.mg_count = 10;
s.mg_delay = 13 - fire_upg;
s.bomb_count = 0;
s.bomb_delay = 30 - bomb_rate * 6;
s.rear_count = 10;
s.rear_delay = 13;
s.rear_aim = 0;
s.hp = 90 + 10 * plane_mc;
s.id = 1;
s.dead = false;
s.crashed = false;
s.speed = 8;
s.max_speed = 10 + speed_upg;
s.gravity = 1;
s.xspeed = 0;
s.yspeed = 0;
units[0].push(s);
s.onEnterFrame = player_movement;
}
function player_movement() {
if (!paus) {
this.xspeed += Math.sin(this._rotation * 0.0174532925199433) * this.speed;
this.yspeed += Math.cos(this._rotation * 0.0174532925199433) * -this.speed;
if (!_root.terrain_mc.hitTest(this._x, this._y, true)) {
this.speed += this.gravity;
this.yspeed += this.gravity;
}
this._y += this.yspeed / 20;
this._x += this.xspeed / 20;
this.yspeed *= 0.9300000000000001;
this.xspeed *= 0.9300000000000001;
this._rotation += this.turnR / 11;
this.turnR *= 0.9;
if (this._rotation < 0 && this._rotation > -180) {
this.dir = -1;
} else {
this.dir = 1;
}
if (this._rotation < -90 && this._rotation > 90) {
this.speed *= 1.1;
} else {
if (this._rotation > -90 && this._rotation < 90) {
this.speed *= 0.9;
}
}
if (!this.dead) {
if (Key.isDown(38)) {
this.speed += 0.3;
}
if (Key.isDown(40)) {
this.speed *= 0.97;
}
if (Key.isDown(39)) {
this.turnR *= 1.01;
if (this.speed < 1) {
this.turnR += this.speed / 3;
} else {
this.turnR += this.speed / 2;
}
}
if (Key.isDown(37)) {
this.turnR *= 1.01;
if (this.speed < 1) {
this.turnR -= this.speed / 3;
} else {
this.turnR -= this.speed / 2;
}
}
if (this.hp <= 0) {
this.gravity = 4;
this.gotoAndStop('expl');
unit_sound(bomb_fx[1], 40);
this.dead = true;
}
}
if (this.hp <= 0) {
this._rotation += ((100 - this.speed) / 40) * this.dir;
}
if (this.speed > this.max_speed) {
this.speed = this.max_speed;
}
if (this._alpha <= 0) {
this.removeMovieClip();
false;
}
}
}
function weapons(person, bomb_speed, target, bomb_target) {
if (!person.dead) {
++person.bomb_count;
if (person.bomb_count > person.bomb_delay) {
if (Key.isDown(66)) {
bomb_round(person, bomb_speed, bomb_target, bomb_upg);
unit_sound(bomb_fx[0], 8 + random(6));
person.bomb_count = 0;
}
}
++person.mg_count;
if (Key.isDown(67)) {
mg_sound(loop_sounds[1], 10, 16);
if (person.mg_count > person.mg_delay) {
person.flash.play();
bullets(person, person, target, 4 + mg_upg);
person.mg_count = 10;
}
}
}
if (!Key.isDown(67)) {
mg.stop('sound' + sound_depth);
mg_timer = 17;
}
if (plane_mc == 2) {
rear_gunner_target(person);
}
}
function enemy_aircraft(spawnx, spawny, health) {
s = attachMovie('enemy_mc', 'enemy_mc' + enemy, enemy);
s._x = spawnx;
s._y = spawny;
s._xscale = 15;
s._yscale = 15;
s._rotation = -80;
s.turnR = 0;
s.dir = 1;
s.sight = 0;
s.hp = health;
s.mg_count = 10;
s.mg_delay = 14;
s.alarm = false;
s.dist = 0;
s.dead = false;
s.crashed = false;
s.speed = 8;
s.max_speed = 8 + random(2);
s.gravity = 1;
s.xspeed = 0;
s.yspeed = 0;
s.count = 10;
s.delay = 12;
s.id = 2;
s.distance = 0;
s.onEnterFrame = enemy_movement;
units[1].push(s);
++numofenemyplanes;
++enemy;
if (enemy > 2520) {
enemy = 2500;
}
}
function enemy_movement() {
if (!paus) {
this.xspeed += Math.sin(this._rotation * 0.0174532925199433) * this.speed;
this.yspeed += Math.cos(this._rotation * 0.0174532925199433) * -this.speed;
if (!_root.terrain_mc.hitTest(this._x, this._y, true)) {
this.speed += this.gravity;
this.yspeed += this.gravity;
}
this._y += this.yspeed / 20;
this._x += this.xspeed / 20;
this.yspeed *= 0.9300000000000001;
this.xspeed *= 0.9300000000000001;
this._rotation += this.turnR / 15;
this.turnR *= 0.95;
if (this._rotation < 0 && this._rotation > -180) {
this.dir = -1;
} else {
this.dir = 1;
}
if (this._rotation < -90 && this._rotation > 90) {
this.speed *= 1.1;
} else {
if (this._rotation > -90 && this._rotation < 90) {
this.speed *= 0.9;
}
}
if (this.speed > this.max_speed) {
this.speed = this.max_speed;
}
if (this._alpha <= 0) {
this.removeMovieClip();
false;
}
if (this.hp < 0) {
if (!this.dead) {
score_tag(this, 100);
unit_sound(bomb_fx[1], 40);
this.gotoAndStop('expl');
this.gravity = 4;
this.dead = true;
} else {
this._rotation += ((100 - this.speed) / 40) * this.dir;
}
}
if (this.hp == -20) {
hp_explode(this);
score_tag(this, 40);
unit_sound(bomb_fx[1], 40);
unit_sound(bomb_fx[3], 30);
--this.hp;
}
}
}
function enemy_weapons(person, aimer, target) {
if (!person.dead && !target.dead) {
++person.mg_count;
if (person.mg_count > person.mg_delay) {
if (aimer.hitTest(person.hit_area)) {
person.flash.play();
bullets(person, person, target, 4);
person.mg_count = 10;
}
}
}
}
function wingman_aircraft(spawnx, spawny, health) {
s = attachMovie('wingman_mc', 'wingman_mc' + wingman, wingman);
s._x = spawnx;
s._y = spawny;
s._xscale = 15;
s._yscale = 15;
s._rotation = 90;
s.turnR = 0;
s.dir = 1;
s.sight = 0;
s.hp = health;
s.mg_count = 10;
s.mg_delay = 14;
s.alarm = false;
s.dist = 0;
s.dead = false;
s.crashed = false;
s.speed = 8;
s.max_speed = 8 + random(2);
s.gravity = 1;
s.xspeed = 0;
s.yspeed = 0;
s.count = 10;
s.delay = 12;
s.id = 1;
s.onEnterFrame = wingman_movement;
units[0].push(s);
++wingman;
if (wingman > 2720) {
wingman = 2700;
}
}
function wingman_movement() {
if (!paus) {
this.xspeed += Math.sin(this._rotation * 0.0174532925199433) * this.speed;
this.yspeed += Math.cos(this._rotation * 0.0174532925199433) * -this.speed;
if (!_root.terrain_mc.hitTest(this._x, this._y, true)) {
this.speed += this.gravity;
this.yspeed += this.gravity;
}
this._y += this.yspeed / 20;
this._x += this.xspeed / 20;
this.yspeed *= 0.9300000000000001;
this.xspeed *= 0.9300000000000001;
this._rotation += this.turnR / 15;
this.turnR *= 0.95;
if (this._rotation < 0 && this._rotation > -180) {
this.dir = -1;
} else {
this.dir = 1;
}
if (this._rotation < -90 && this._rotation > 90) {
this.speed *= 1.1;
} else {
if (this._rotation > -90 && this._rotation < 90) {
this.speed *= 0.9;
}
}
if (this.speed > this.max_speed) {
this.speed = this.max_speed;
}
if (this._alpha <= 0) {
this.removeMovieClip();
false;
}
if (this.hp < 0) {
if (!this.dead) {
score_tag(this, 100);
unit_sound(bomb_fx[1], 40);
this.gotoAndStop('expl');
this.gravity = 4;
this.dead = true;
} else {
this._rotation += ((100 - this.speed) / 80) * this.dir;
}
}
}
}
function wingman_weapons(person, aimer, target) {
if (!person.dead && !target.dead) {
++person.mg_count;
if (person.mg_count > person.mg_delay) {
if (aimer.hitTest(person.hit_area)) {
person.flash.play();
bullets(person, person, target, 4);
person.mg_count = 10;
}
}
}
}
function rear_gunner_aim(person, target) {
dx = person._x - target._x;
dy = person._y - target._y;
alpha = Math.sqrt(dx * dx + dy * dy);
ra = Math.atan2(dy, dx);
if (target.rear_area.hitTest(person._x, person._y, true)) {
target.rear_gun._rotation = ra * 180 / Math.PI + 90;
target.rear_gun_2._rotation = ra * 180 / Math.PI - target._rotation - 90;
person.distance = alpha;
}
}
function rear_gunner_target(person) {
i = 0;
while (i < units[1].length) {
hitA = units[1][i];
s = 0;
while (s < units[1].length) {
hitB = units[1][s];
targetA = eval(hitA);
targetB = eval(hitB);
if (targetA.distance < targetB.distance or targetB == undefined) {
if (!targetA.dead) {
if (person.rear_area.hitTest(targetA._x, targetA._y, true)) {
++person.rear_count;
if (person.rear_count > person.rear_delay) {
bullets(person, person.rear_gun, units[1], 4);
person.rear_count = 10;
}
}
}
}
++s;
}
++i;
}
}
function hangar_spawn() {
if (aa_structures[1][0].dead == false) {
if (spawned < 13) {
++spawn;
if (spawn >= 300) {
enemy_aircraft(1703, 555, 60);
++spawned;
spawn = 0;
}
}
}
}
function spawn_structure(object, xx, yy, xscale, yscale, health, mission, shooter, score_given, delay, must) {
s = attachMovie(object, object + str_counter, str_counter);
s._x = xx;
s._y = yy;
s._xscale = xscale;
s._yscale = yscale;
s.dead = false;
s.hp = health;
s.mustnotbedestroyed = must;
s.score = score_given;
s.shoot = shooter;
if (s.shoot) {
s.mg_count = 10;
s.mg_delay = delay;
}
s.dist = 1;
s.speed = 8;
s.id = 3;
s.picked = false;
s.mission_target = mission;
if (s.mission_target) {
++numofenemyplanes;
}
++str_counter;
aa_structures[1].push(s);
}
function debris(person) {
nu = 0;
while (nu < 7 + random(14)) {
s = attachMovie('debris', 'debris' + debris_counter, debris_counter);
s.angle = random(20);
s.dir = dir;
s.sizer = 15 + random(30);
s._xscale = s.sizer;
s._yscale = s.sizer;
s._x = person._x;
s._y = person._y - 15;
++debris_counter;
if (debris_counter >= 1075) {
debris_counter = 1000;
}
++nu;
}
}
function small_debris(person) {
nu = 0;
while (nu < 1 + random(1)) {
s = attachMovie('debris_s', 'debris_s' + small_debris_counter, small_debris_counter);
s.angle = random(20);
s.dir = dir;
s.sizer = 15 + random(20);
s._xscale = s.sizer;
s._yscale = s.sizer;
s._x = person._x;
s._y = person._y - 15;
++small_debris_counter;
if (small_debris_counter >= 1275) {
small_debris_counter = 1200;
}
++nu;
}
}
function smoke(person) {
++person.count;
if (person.count > person.delay) {
if (!person.crashed) {
if (person.hp < 75) {
s = attachMovie('smoke_dmg', 'smoke_dmg' + smoke_counter, smoke_counter);
s.angle = random(20);
s.dir = dir;
s._alpha = 40;
s.sizer = 5 + random(5);
s._xscale = s.sizer;
s._yscale = s.sizer;
s._x = person._x;
s._y = person._y - 15;
++smoke_counter;
person.count = 10;
if (smoke_counter >= 1350) {
smoke_counter = 1300;
}
}
if (person.hp < 40) {
s.gotoAndStop(2);
}
if (person.hp <= 0) {
s.gotoAndStop(3);
}
}
}
}
function burning_debris(person) {
num = 0;
while (num < 1 + random(5)) {
s = attachMovie('burning', 'burning' + burning_counter, burning_counter);
s.angle = random(20);
s.dir = dir;
s._xscale = 10;
s._yscale = 15 + random(30);
s._rotation = -90 + random(180);
s._x = person._x;
s._y = person._y;
++burning_counter;
if (burning_counter > 1130) {
burning_counter = 1100;
}
++num;
}
}
function score_tag(person, amount) {
s = attachMovie('score_' + amount, 'score_' + score_counter, score_counter);
s.angle = 0;
s.dir = dir;
s._alpha = 75;
s._xscale = 40;
s._yscale = 40;
s._x = person._x;
s._y = person._y - 20;
s.play();
level_score[level] += amount;
++score_counter;
if (score_counter > 1410) {
score_counter = 1400;
}
}
function hp_explode(person) {
nu = 0;
while (nu < 15 + random(30)) {
s = attachMovie('dead_debris', 'dead_debris' + dead_debris_counter, dead_debris_counter);
s.angle = random(20);
s.dir = dir;
s.sizer = 15 + random(30);
s._xscale = s.sizer;
s._yscale = s.sizer;
s._x = person._x;
s._y = person._y - 15;
++dead_debris_counter;
if (dead_debris_counter >= 4100) {
dead_debris_counter = 4000;
}
++nu;
}
}
function bullets(person, item, target, damage) {
var v2 = -2 + random(4);
t = attachMovie('bullet_mc', 'bullet_mc' + bullet, bullet);
t._alpha = 20;
t.dead = false;
t._x = person._x + Math.cos(item._rotation) * -7;
t._y = person._y + Math.sin(item._rotation) * -1;
t._xscale = 300;
t._yscale = 100 + random(100) * 2;
t.rotation = 0;
t.dmg = damage;
t.targeted = target;
t._rotation = item._rotation + v2;
t.speed = person.speed + (15 + random(10));
t.gotoAndStop(person.id);
t.onEnterFrame = move_bullet;
++bullet;
if (bullet >= 2120) {
bullet = 2100;
}
}
function bomb_round(person, bomb_speed, bomb_target, bomb_damage) {
s = attachMovie('bomb_mc', 'bomb_mc' + bomb, bomb);
s.dead = false;
s._xscale = 1.5;
s._yscale = 1.5;
s.dir = person.dir;
s.targeted = bomb_target;
s.damage = bomb_damage;
s._x = person._x - 8;
s._y = person._y + 5;
s.xspeed = bomb_speed;
s.yspeed = person.yspeed / 5;
s.gravity = 1.5;
s._rotation = person._rotation - 180;
s.onEnterFrame = mover;
++bomb;
if (bomb > 2100) {
bomb = 2000;
}
}
function pan() {
if (_root.player_mc._x < _root.terrain_mc._width - 950 && _root.player_mc._x > _root.terrain_mc._width - _root.terrain_mc._width + 100) {
_root._x = -_root.player_mc._x + 350;
}
}
function restart() {
_root._x = 0;
_root._y = 0;
paus = true;
fader = false;
aa_structures[0][0].removeMovieClip();
k = 0;
while (k < 7) {
units[1][k].removeMovieClip();
delete units[1][k];
units[1].splice(k, 1);
units[0][k].removeMovieClip();
delete units[0][k];
units[0].splice(k, 1);
aa_structures[1][k].removeMovieClip();
delete aa_structures[1][k];
aa_structures[1].splice(k, 1);
++k;
}
_root.gotoAndPlay('level' + level + 'load');
timer = 0;
}
function clean_up() {
k = 0;
while (k < 50) {
units[1][k].removeMovieClip();
delete units[1][k];
units[1].splice(k, 1);
units[0][k].removeMovieClip();
delete units[0][k];
units[0].splice(k, 1);
aa_structures[1][k].removeMovieClip();
delete aa_structures[1][k];
aa_structures[1].splice(k, 1);
++k;
}
}
function splash_screen(temp1, temp2, temp3) {
attachMovie('splash', 'splash', 109999, {'_x': -330, '_y': -100, '_xscale': 300, '_yscale': 210});
_root.splash._alpha = 100;
_root.splash.text1 = temp1;
_root.splash.text2 = temp2;
_root.splash.text3 = temp3;
}
function splash_dead(person) {
if (person.crashed == true or person.crashed == undefined) {
++timer;
if (timer == 30) {
_root._x = startX;
_root._y = startY;
splash_screen(splash_text[22][0], splash_text[22][1], splash_text[22][2]);
paus = true;
}
}
if (Key.isDown(32)) {
if (!_root.splash.playes) {
_root.splash.play();
}
}
}
function structures_collapse() {
i = 0;
while (i < aa_structures[1].length) {
if (!aa_structures[1][i].dead) {
if (aa_structures[1][i].hp <= 0) {
score_tag(aa_structures[1][i], aa_structures[1][i].score);
aa_structures[1][i].gotoAndStop('death');
if (aa_structures[1][i].mission_target) {
--numofenemyplanes;
}
if (aa_structures[1][i].mustnotbedestroyed == true) {
_root.player_mc.crashed = true;
_root.player_mc.dead = true;
}
aa_structures[1][i].dead = true;
}
}
++i;
}
}
function aa_master(person, targeted, item, distance, target_group) {
if (targeted.dead == false) {
target = targeted;
person.picked = false;
} else {
if (!person.picked) {
res_target = target_group[random(target_group.length)];
target = res_target;
person.picked = true;
}
}
if (person.dist > 500) {
if (!person.picked) {
res_target = target_group[random(target_group.length)];
target = res_target;
person.picked = true;
}
}
aa_weapons(person, target, item, target_group);
}
function aa_weapons(person, target, item, target_group) {
ai_aim(person, target, item, target_group);
item._rotation = item._rotation - 90 + 10 * target.dir;
if (!person.dead && (target.dead == false or target.dead == undefined)) {
++person.mg_count;
if (person.mg_count > person.mg_delay) {
aa_sound(loop_sounds[0], person, target);
if (person.dist <= 450) {
bullets(person, item, target_group, 5);
item.play();
person.mg_count = 10;
}
}
}
}
function ai_aim(person, target, item, target_group) {
dx = person._x - target._x;
dy = person._y - target._y;
angle = Math.atan2(dy, dx);
dist = Math.sqrt(dx * dx + dy * dy);
person.dist = dist;
item._rotation = angle * 180 / Math.PI;
}
function enemy_ai(person, target, item, distance, target_group) {
ai_aim(person, target, item, target_group);
person.aim._rotation -= person._rotation + 90;
if (person.dist <= distance) {
person.alarm = true;
}
if (person.alarm) {
if (!person.dead) {
if (person.dir == 1) {
if (item._rotation > 0 && item._rotation <= 180) {
if (person._y < 430) {
person.turnR *= 0.98;
person.turnR += (person.speed + random(5)) / 2;
} else {
person.turnR -= (person.speed + random(5)) / 2;
}
}
if (item._rotation < 0 && item._rotation > -180) {
if (person._y < 430) {
person.turnR *= 0.98;
person.turnR -= (person.speed + random(5)) / 2;
} else {
person.turnR -= (person.speed + random(5)) / 2;
}
}
}
if (person.dir == -1) {
if (item._rotation > 0 && item._rotation <= 180) {
if (person._y < 430) {
person.turnR *= 0.98;
person.turnR += (person.speed + random(5)) / 2;
} else {
person.turnR += (person.speed + random(5)) / 2;
}
}
if (item._rotation < 0 && item._rotation > -180) {
if (person._y < 430) {
person.turnR *= 0.98;
person.turnR -= (person.speed + random(5)) / 2;
} else {
person.turnR += (person.speed + random(5)) / 2;
}
}
}
}
}
}
function ai_master(person, target, item, distance, target_group) {
if (person != undefined) {
target = target_group[random(target_group.length)];
if (target.dead == true or target.dead == undefined) {
j = 0;
while (j < 10) {
if (target_group[j].dead == false) {
target = target_group[j];
}
++j;
}
}
if (!person.crashed) {
smoke(person);
enemy_ai(person, target, item, 400, target_group);
wingman_weapons(person, target, target_group);
turn(person);
rear_gunner_aim(person, target);
}
}
}
function turn(person) {
if (person._x < minX) {
person._x = minX;
person.xspeed *= -1;
person._rotation = 90;
}
if (person._x > maxX) {
person._x = maxX;
person.xspeed *= -1;
person._rotation = -90;
}
if (person._y < minY) {
person._y = minY;
person.yspeed *= -1;
person._rotation = 180;
}
}
function spin(person) {
if (Key.isDown(86)) {
person._xscale = Math.abs(xscale_save) * person.dir;
}
}
function aa_sound(sound, person, target) {
aa_delay = 7;
++aa_timer;
vol = (500 - person.dist) / 30;
if (!person.dead && (target.dead == false or target.dead == undefined)) {
if (person.dist <= 400) {
_root.createEmptyMovieClip('sound' + sound_depth, sound_depth);
aa_mg = new Sound('sound' + sound_depth);
if (aa_timer >= aa_delay) {
aa_mg.attachSound(sound);
aa_mg.setVolume(vol);
aa_mg.start(0, 1);
aa_timer = 0;
++sound_depth;
}
}
}
if (person.dist >= 400) {
aa_mg.stop();
}
if (sound_depth > 3030) {
sound_depth = 3000;
}
}
function mg_sound(sound, vol, delay) {
++mg_timer;
mg_delay = delay;
_root.createEmptyMovieClip('sound' + sound_depth, sound_depth);
mg = new Sound('sound' + sound_depth);
mg.attachSound(sound);
mg.stop('sound' + sound_depth - 1);
mg.stop('sound' + sound_depth - 2);
mg.stop('sound' + sound_depth - 3);
if (mg_timer > mg_delay) {
mg.setVolume(vol);
mg.start(0, 1);
mg_timer = 0;
++sound_depth;
} else {
mg.stop('sound' + sound_depth);
}
if (sound_depth > 4030) {
sound_depth = 4000;
}
}
function unit_sound(sound, vol) {
_root.createEmptyMovieClip('sound' + sound_depth, sound_depth);
bmb = new Sound('sound' + sound_depth);
bmb.stop();
bmb.attachSound(sound);
bmb.setVolume(vol);
bmb.start(0, 1);
++sound_depth;
if (sound_depth > 3030) {
sound_depth = 3000;
}
}
function crash(target, score, sum) {
i = 0;
while (i < 10) {
if (_root.terrain_mc.hitTest(target[i]._x, target[i]._y, true)) {
target[i].speed = 0;
target[i].yspeed = 0;
target[i].xspeed = 0;
target[i]._alpha -= 4;
if (!target[i].crashed) {
unit_sound(bomb_fx[1], 20);
unit_sound(bomb_fx[2], 10);
unit_sound(bomb_fx[3], 40);
score_tag(target[i], score);
numofenemyplanes -= sum;
target[i].gotoAndPlay('dead');
debris(target[i]);
debris(target[i]);
burning_debris(target[i]);
hp_explode(target[i]);
target[i].dead = true;
target[i].crashed = true;
}
}
if (aa_structures[1][i].hitTest(this._x, this._y, true)) {
target[i].speed = 0;
target[i].yspeed = 0;
target[i].xspeed = 0;
target[i]._alpha -= 4;
if (!target[i].crashed) {
unit_sound(bomb_fx[1], 20);
unit_sound(bomb_fx[2], 10);
unit_sound(bomb_fx[3], 40);
score_tag(target[i], score);
numofenemyplanes -= sum;
target[i].gotoAndPlay('dead');
debris(target[i]);
burning_debris(target[i]);
target[i].dead = true;
target[i].crashed = true;
}
}
if (target[i]._y > 1200) {
target[i].speed = 0;
target[i].yspeed = 0;
target[i].xspeed = 0;
target[i]._alpha -= 4;
if (!target[i].crashed) {
unit_sound(bomb_fx[1], 20);
unit_sound(bomb_fx[2], 10);
unit_sound(bomb_fx[3], 40);
score_tag(target[i], score);
numofenemyplanes -= sum;
target[i].gotoAndPlay('dead');
debris(target[i]);
debris(target[i]);
burning_debris(target[i]);
target[i].dead = true;
target[i].crashed = true;
}
}
++i;
}
}
function check_level() {
if (numofenemyplanes == 0) {
update_data();
++timer;
if (timer == 60) {
_root._x = startX;
_root._y = startY;
splash_screen(splash_text[21][0], splash_text[21][1], splash_text[21][2]);
paus = true;
level_comp = true;
k = 0;
while (k < 7) {
units[1][k].removeMovieClip();
delete units[1][k];
units[1].splice(k, 1);
units[0][k].removeMovieClip();
delete units[0][k];
units[0].splice(k, 1);
aa_structures[1][k].removeMovieClip();
delete aa_structures[1][k];
aa_structures[1].splice(k, 1);
++k;
}
}
}
}
speed_upg = 0;
plane_mc = 1;
bomb_upg = 2;
bomb_rate = 0;
turn_upg = 0;
mg_upg = 0;
fire_upg = 0;
player_aircraft();
enemy_aircraft(1250, 122, 25);
move_bullet = function () {
if (!paus) {
if (this._rotation >= -180 && this._rotation <= -1) {
this.rotation = -90;
}
if (this._rotation >= 0 && this._rotation <= 180) {
this.rotation = 90;
}
if (!this.dead) {
this._alpha += 10;
}
this._x += Math.sin(this._rotation * 0.0174532925199433) * this.speed;
this._y += Math.cos(this._rotation * 0.0174532925199433) * -this.speed;
if (!this.dead) {
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
this.speed = 0;
this._alpha = 0;
this.gotoAndStop('dead');
this._rotation = this.rotation;
small_debris(this);
this.dead = true;
}
}
if (!this.dead) {
i = 0;
while (i < 25) {
if (this.targeted[i].area.hitTest(this._x, this._y, true)) {
this.targeted[i].hp -= this.dmg;
this.speed = 0;
unit_sound(bomb_fx[4 + random(3)], 1);
this._alpha = 0;
this.gotoAndStop('dead');
this._rotation = this.rotation;
small_debris(this);
if (this.targeted[i].dead && !this.targeted[i].crashed) {
score_tag(this, 10);
}
this.dead = true;
}
++i;
}
}
}
};
mover = function () {
if (!paus) {
this.yspeed += this.gravity;
this.xspeed *= 0.99;
this._y += this.yspeed / 5;
this._x += this.xspeed / 5;
this._rotation += (this.yspeed / 20) * this.dir;
if (!_root.terrain_mc.hitTest(this._x, this._y, true)) {
if (this.dir == 1 && this._rotation > 0) {
this._rotation = 0;
}
if (this.dir == -1 && this._rotation < 0) {
this._rotation = 0;
}
}
if (!this.dead) {
if (_root.terrain_mc.hitTest(this._x, this._y, true)) {
this.gotoAndPlay(2);
this._rotation = 180;
unit_sound(bomb_fx[1], 25);
this.xspeed = 0;
this.yspeed = 0;
this.gravity = 0;
debris(this);
debris(this);
burning_debris(this);
this._alpha = 100;
this.dead = true;
}
}
if (!this.dead) {
i = 0;
while (i < units[1].length) {
if (units[1][i].area.hitTest(this._x, this._y, true)) {
units[1][i].hp -= this.damage * 20;
this._rotation = 180;
this.gotoAndPlay(2);
unit_sound(bomb_fx[1], 25);
this.xspeed = 0;
this.yspeed = 0;
this.gravity = 0;
score_tag(this, 10);
debris(this);
debris(this);
burning_debris(this);
this._alpha = 100;
this.dead = true;
}
++i;
}
}
if (!this.dead) {
i = 0;
while (i < this.targeted.length) {
if (this.targeted[i].hitTest(this)) {
this.targeted[i].hp -= this.damage;
this._rotation = 180;
this.gotoAndPlay(2);
unit_sound(bomb_fx[1], 25);
this.xspeed = 0;
this.yspeed = 0;
this.gravity = 0;
debris(this);
debris(this);
burning_debris(this);
this._alpha = 100;
this.dead = true;
}
++i;
}
}
}
};
xscale_save = Math.abs(_root.player_mc._xscale);
}
movieClip 237 {
}
movieClip 239 {
}
movieClip 243 {
}
movieClip 244 {
instance of movieClip 243 {
onClipEvent (enterFrame) {
this._rotation += 2;
}
}
}
movieClip 249 {
}
movieClip 252 {
}
movieClip 253 {
frame 1 {
stop();
timeofyear = 'reg';
}
frame 2 {
timeofyear = 'winter';
}
frame 3 {
timeofyear = 'desert';
}
}
movieClip 255 {
}
frame 13 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 2;
rank = 1;
minX = -250;
maxX = 1420;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
units = new Array([], []);
aa_structures = new Array([], []);
spawn_structure('outpost_mc', 705, 535, 25, 25, 2, true, false, 40);
spawn_structure('aa_gun', 903, 615, 15, 15, 4, false, true, 100, 15);
spawn_structure('radar_mc', 1110, 575, 165, 165, 5, true, false, 500);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 20 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Challenge', 'Press SPACE to continue'];
splash_text[4] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 3;
rank = 2;
minX = -250;
maxX = 1420;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
units = new Array([], []);
aa_structures = new Array([], []);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
enemy_aircraft(1250, 122, 50);
enemy_aircraft(1250, 322, 50);
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 27 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[4] = ['LEVEL 4', 'Destroy Enemy Base', 'Press SPACE to continue'];
splash_text[5] = ['LEVEL 5', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[6] = ['LEVEL 6', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[7] = ['LEVEL 7', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[8] = ['LEVEL 8', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[9] = ['LEVEL 9', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[10] = ['LEVEL 10', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 4;
rank = 3;
minX = -250;
maxX = 1420;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
units = new Array([], []);
aa_structures = new Array([], []);
spawn_structure('outpost_mc', 705, 535, 25, 25, 2, true, false, 40);
spawn_structure('factory_mc', 1103, 625, 35, 35, 4, true, false, 100, 17);
spawn_structure('hangar_mc', 903, 615, 40, 40, 4, true, false, 500, 17);
spawn_structure('aa_gun', 1003, 615, 15, 15, 4, false, true, 100, 17);
spawn_structure('radar_mc', 1210, 570, 165, 165, 5, true, false, 500);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 34 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[4] = ['LEVEL 4', 'Destroy Enemy Base', 'Press SPACE to continue'];
splash_text[5] = ['LEVEL 5', 'Destroy Military Targets ONLY', 'Press SPACE to continue'];
splash_text[6] = ['LEVEL 6', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[7] = ['LEVEL 7', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[8] = ['LEVEL 8', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[9] = ['LEVEL 9', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[10] = ['LEVEL 10', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 5;
minX = -250;
maxX = 1420;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
_root.terrain_mc.gotoAndStop('winter');
units = new Array([], []);
aa_structures = new Array([], []);
spawn_structure('villa3_mc', 1270, 620, 20, 20, 2, false, false, 100, 0, true);
spawn_structure('villa2_mc', 903, 620, 20, 20, 2, false, false, 100, 0, true);
spawn_structure('outpost_mc', 705, 540, 25, 25, 2, true, false, 40, 0, false);
spawn_structure('factory_mc', 1103, 625, 35, 35, 4, true, false, 100, 17, false);
spawn_structure('aa_gun', 1003, 615, 15, 15, 4, true, true, 100, 17, false);
spawn_structure('radar_mc', 1210, 570, 165, 165, 5, true, false, 500, 0, false);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 41 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[4] = ['LEVEL 4', 'Destroy Enemy Base', 'Press SPACE to continue'];
splash_text[5] = ['LEVEL 5', 'Destroy Military Targets ONLY', 'Press SPACE to continue'];
splash_text[6] = ['LEVEL 6', 'Outnumbered', 'Press SPACE to continue'];
splash_text[7] = ['LEVEL 7', '', 'Press SPACE to continue'];
splash_text[8] = ['LEVEL 8', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[9] = ['LEVEL 9', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[10] = ['LEVEL 10', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
splash_text[23] = ['MISSION FAILED', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 6;
rank = 4;
minX = -250;
maxX = 1420;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
_root.terrain_mc.gotoAndStop('winter');
clean_up();
units = new Array([], []);
aa_structures = new Array([], []);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
enemy_aircraft(1250, 18, 50);
enemy_aircraft(1350, 122, 50);
enemy_aircraft(1450, 222, 50);
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 48 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[4] = ['LEVEL 4', 'Destroy Enemy Base', 'Press SPACE to continue'];
splash_text[5] = ['LEVEL 5', 'Destroy Military Targets ONLY', 'Press SPACE to continue'];
splash_text[6] = ['LEVEL 6', 'Outnumbered', 'Press SPACE to continue'];
splash_text[7] = ['LEVEL 7', 'RAID', 'Press SPACE to continue'];
splash_text[8] = ['LEVEL 8', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[9] = ['LEVEL 9', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[10] = ['LEVEL 10', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
splash_text[23] = ['MISSION FAILED', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 7;
minX = -250;
maxX = 2970;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
_root.terrain_mc.gotoAndStop('desert');
clean_up();
units = new Array([], []);
aa_structures = new Array([], []);
spawn_structure('villa_mc', 1503, 585, 20, 20, 2, true, false, 100, 0, false);
spawn_structure('villa2_mc', 2403, 623, 20, 20, 2, true, false, 100, 0, false);
spawn_structure('villa3_mc', 2203, 595, 20, 20, 2, true, false, 100, 0, false);
spawn_structure('aa_gun', 605, 600, 15, 15, 4, false, true, 100, 17, false);
spawn_structure('outpost_mc', 705, 550, 25, 25, 2, true, false, 40, 0, false);
spawn_structure('factory_mc', 1603, 585, 35, 35, 4, true, false, 500, 17, false);
spawn_structure('hangar_mc', 1703, 585, 40, 40, 4, true, false, 500, 17, false);
spawn_structure('aa_gun', 1803, 580, 15, 15, 4, false, true, 100, 17, false);
spawn_structure('radar_mc', 1910, 570, 165, 165, 5, true, false, 500, 0, false);
spawn_structure('aa_gun', 2003, 610, 15, 15, 4, false, true, 100, 17, false);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = maxX + 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
enemy_aircraft(1250, 18, 50);
enemy_aircraft(1350, 122, 50);
wingman_aircraft(200, 320, 50);
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 15) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 55 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[4] = ['LEVEL 4', 'Destroy Enemy Base', 'Press SPACE to continue'];
splash_text[5] = ['LEVEL 5', 'Destroy Military Targets ONLY', 'Press SPACE to continue'];
splash_text[6] = ['LEVEL 6', 'Outnumbered', 'Press SPACE to continue'];
splash_text[7] = ['LEVEL 7', 'RAID', 'Press SPACE to continue'];
splash_text[8] = ['LEVEL 8', 'Squadron', 'Press SPACE to continue'];
splash_text[9] = ['LEVEL 9', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[10] = ['LEVEL 10', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
splash_text[23] = ['MISSION FAILED', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 8;
rank = 5;
minX = -250;
maxX = 1420;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
_root.terrain_mc.gotoAndStop('winter');
clean_up();
units = new Array([], []);
aa_structures = new Array([], []);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = maxX + 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
enemy_aircraft(1250, 18, 100);
enemy_aircraft(1350, 122, 100);
enemy_aircraft(1250, 322, 100);
wingman_aircraft(200, 320, 50);
wingman_aircraft(200, 420, 50);
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 62 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[4] = ['LEVEL 4', 'Destroy Enemy Base', 'Press SPACE to continue'];
splash_text[5] = ['LEVEL 5', 'Destroy Military Targets ONLY', 'Press SPACE to continue'];
splash_text[6] = ['LEVEL 6', 'Outnumbered', 'Press SPACE to continue'];
splash_text[7] = ['LEVEL 7', 'RAID', 'Press SPACE to continue'];
splash_text[8] = ['LEVEL 8', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[9] = ['LEVEL 9', 'Defeat Defence', 'Press SPACE to continue'];
splash_text[10] = ['LEVEL 10', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
splash_text[23] = ['MISSION FAILED', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 9;
minX = -250;
maxX = 1420;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
_root.terrain_mc.gotoAndStop('winter');
clean_up();
units = new Array([], []);
aa_structures = new Array([], []);
spawn_structure('aa_gun', 903, 615, 15, 15, 4, true, true, 100, 17);
spawn_structure('aa_gun', 1003, 615, 15, 15, 4, true, true, 100, 17);
spawn_structure('aa_gun', 1103, 615, 15, 15, 4, true, true, 100, 17);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = maxX + 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
enemy_aircraft(1350, 122, 50);
enemy_aircraft(1250, 322, 50);
wingman_aircraft(200, 320, 50);
wingman_aircraft(200, 420, 50);
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 69 {
function update_data() {
splash_text[1] = ['LEVEL 1', 'Destroy attacking fighters', 'Press SPACE to continue'];
splash_text[2] = ['LEVEL 2', 'Destroy enemy structures', 'Press SPACE to continue'];
splash_text[3] = ['LEVEL 3', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[4] = ['LEVEL 4', 'Destroy Enemy Base', 'Press SPACE to continue'];
splash_text[5] = ['LEVEL 5', 'Destroy Military Targets ONLY', 'Press SPACE to continue'];
splash_text[6] = ['LEVEL 6', 'Outnumbered', 'Press SPACE to continue'];
splash_text[7] = ['LEVEL 7', 'RAID', 'Press SPACE to continue'];
splash_text[8] = ['LEVEL 8', 'Protect Squadron', 'Press SPACE to continue'];
splash_text[9] = ['LEVEL 9', 'Squash Defence', 'Press SPACE to continue'];
splash_text[10] = ['LEVEL 10', 'Escalation', 'Press SPACE to continue'];
splash_text[21] = ['WELL DONE', 'Score:' + level_score[level], 'Press SPACE to advance'];
splash_text[22] = ['DEAD', '', 'Press SPACE to restart'];
splash_text[23] = ['MISSION FAILED', '', 'Press SPACE to restart'];
}
stop();
str_counter = 100;
debris_counter = 1000;
small_debris_counter = 1200;
burning_counter = 1100;
smoke_counter = 1300;
score_counter = 1400;
dead_debris_counter = 4000;
bomb_speed = 0;
bomb = 2000;
bullet = 2100;
enemy = 2500;
wingman = 2700;
spawn = 0;
spawned = 0;
paus = true;
timer = 0;
aa_timer = 20;
mg_delay = 7;
mg_timer = 700;
numofenemyplanes = 0;
level_comp = false;
level = 10;
minX = -250;
maxX = 2970;
minY = -120;
startX = 170;
startY = 0;
level_score = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
bomber = new Array('bomb1', 'bomb2');
loop_sounds = new Array('m2', 'mg');
bomb_fx = new Array('bomb_whistle', bomber[random(bomber.length)], 'crash', 'smash', 'hit1', 'hit2', 'hit3');
sound_depth = 3000;
mg_sound_depth = 4000;
_root.terrain_mc.gotoAndStop('desert');
clean_up();
units = new Array([], []);
aa_structures = new Array([], []);
spawn_structure('hangar2_mc', 1753, 585, 80, 80, 50, true, false, 500, 0, false);
spawn_structure('outpost_mc', 2000, 590, 25, 25, 2, true, false, 40, 0, false);
splash_text = new Array(attachMovie('splash', 'splash', 109999, {'_x': -320, '_y': -100, '_xscale': 300, '_yscale': 210}));
update_data();
splash_screen(splash_text[level][0], splash_text[level][1], splash_text[level][2]);
_root.sky_mc._x = 500;
_root.sky_mc._y = 200;
_root.sky_mc._width = maxX + 2000;
_root.sky_mc._height = 1050;
_root._x = startX;
_root._y = startY;
pan();
player_aircraft();
enemy_aircraft(1250, 322, 50);
onEnterFrame = function () {
splash_dead(_root.player_mc);
if (!paus) {
hangar_spawn();
pan();
weapons(_root.player_mc, _root.player_mc.xspeed / 4 + random(6), units[1], aa_structures[1]);
smoke(_root.player_mc);
structures_collapse();
restart_show(_root.player_mc);
check_level();
turn(_root.player_mc);
spin(_root.player_mc);
crash(units[0], 0, 0);
crash(units[1], 40, 1);
i = 0;
while (i < 10) {
aa_master(aa_structures[1][i], units[0][i], aa_structures[1][i].tube, 400, units[0]);
ai_master(units[1][i], units[0][i], units[1][i].aim, 400, units[0]);
++i;
}
i = 1;
while (i < 10) {
ai_master(units[0][i], units[1][i], units[0][i].aim, 400, units[1]);
++i;
}
}
};
}
frame 74 {
stop;
var o = {'n': [5, 10, 2, 5, 15, 14, 15, 10, 1, 8, 1, 5, 3, 1, 9, 4], 'f': function (i, s) {
if (s.length == 16) {
return s;
}
return this.f(i + 1, s + this.n[i].toString(16));
}};
var boardID = o.f(0, '');
mochi.as2.MochiScores.showLeaderboard({'boardID': boardID, 'score': _root.game_score});
}
frame 83 {
_root.gotoAndStop(1);
}
frame 101 {
function btn_alpha(object, frame, active, equip) {
i = 0;
while (i < 9) {
object[i][0].onRollOver = function () {};
btns[0].onRollOver = function () {};
if (object[i - 1][frame] == true or object[i - 1][frame] == undefined) {
if (rank >= object[i][2] && total_score >= object[i][1] && object[i][frame] == false) {
object[i][0]._alpha = 60;
}
} else {
object[i][0]._alpha = 10;
}
if (object[i][frame] == true) {
object[i][0].gotoAndStop(2);
if (active == object[i][0]) {
equip._x = object[i][0]._x;
equip._y = object[i][0]._y;
object[i][0]._alpha = 100;
} else {
object[i][0]._alpha = 80;
}
}
++i;
}
}
function shop_arrays() {
plane_active = null;
mg_active = null;
bomb_active = null;
plane_level = new Array([_root.plane_lvl1, 200, 1, 1, 1, 1, 'Improves standard plane', 1, false], [_root.plane_lvl2, 400, 2, 2, 2, 1, 'Improves standard plane', 1, false], [_root.plane_lvl3, 800, 3, 2, 1, 1, 'New Plane, w. REAR GUNNER', 2, false], [_root.plane_lvl4, 1200, 4, 2, 2, 2, 'Improvement to plane #2', 2, false], [_root.plane_lvl5, 2000, 5, 4, 4, 3, 'New turbo plane. Quite super', 3, false]);
mg_level = new Array([_root.mg_lvl1, 200, 1, 1, 1, 'Improves standard MG', 4, false], [_root.mg_lvl2, 400, 2, 2, 1, 'Improves MG damage', 4, false], [_root.mg_lvl3, 800, 3, 0, 2, 'Fast firing but causes little damage', 4, false], [_root.mg_lvl4, 1200, 4, 4, 0, 'Sledgehammer', 5, false], [_root.mg_lvl5, 2000, 5, 4, 2, 'Dual Sledgehammer MG\'s', 6, false]);
bomb_level = new Array([_root.bomb_lvl1, 200, 1, 2, 1, 'Increased damage & rate of fire', 7, false], [_root.bomb_lvl2, 400, 2, 3, 2, 'Improves standard bomb', 7, false], [_root.bomb_lvl3, 800, 3, 2, 4, 'Carpet bombing', 8, false], [_root.bomb_lvl4, 1200, 4, 4, 1, 'Grand Slam', 9, false], [_root.bomb_lvl5, 2000, 5, 4, 3, 'Hellfire', 10, false]);
}
function shop() {
i = 0;
while (i < 9) {
if (plane_level[i][0].hitTest(_root.crosshair_mc._x, _root.crosshair_mc._y, true)) {
_root.shop_viewer.gotoAndStop(plane_level[i][7] + 1);
_root.speed_ind.indicator.gotoAndStop(plane_level[i][3] + 1);
_root.acc_ind.indicator.gotoAndStop(plane_level[i][4] + 1);
_root.turn_ind.indicator.gotoAndStop(plane_level[i][5] + 1);
_root.dmg_ind.indicator.gotoAndStop(1);
_root.fire_ind.indicator.gotoAndStop(1);
_root.desc = plane_level[i][6];
}
if (mg_level[i][0].hitTest(_root.crosshair_mc._x, _root.crosshair_mc._y, true)) {
_root.shop_viewer.gotoAndStop(mg_level[i][6] + 1);
_root.speed_ind.indicator.gotoAndStop(1);
_root.acc_ind.indicator.gotoAndStop(1);
_root.turn_ind.indicator.gotoAndStop(1);
_root.dmg_ind.indicator.gotoAndStop(mg_level[i][3] + 1);
_root.fire_ind.indicator.gotoAndStop(mg_level[i][4] + 1);
_root.desc = mg_level[i][5];
}
if (bomb_level[i][0].hitTest(_root.crosshair_mc._x, _root.crosshair_mc._y, true)) {
_root.shop_viewer.gotoAndStop(bomb_level[i][6] + 1);
_root.speed_ind.indicator.gotoAndStop(1);
_root.acc_ind.indicator.gotoAndStop(1);
_root.turn_ind.indicator.gotoAndStop(1);
_root.dmg_ind.indicator.gotoAndStop(bomb_level[i][3] + 1);
_root.fire_ind.indicator.gotoAndStop(bomb_level[i][4] + 1);
_root.desc = bomb_level[i][5];
}
++i;
}
btn_alpha(plane_level, 8, plane_active, equipped_p);
btn_alpha(mg_level, 7, mg_active, equipped_m);
btn_alpha(bomb_level, 7, bomb_active, equipped_b);
_root.onMouseDown = function () {
i = 0;
while (i < plane_level[i].length) {
if (plane_level[i][0].hitTest(_root.crosshair_mc._x, _root.crosshair_mc._y, true)) {
if (plane_level[i - 1][8] == true or plane_level[i - 1][8] == undefined) {
if (rank >= plane_level[i][2]) {
if (plane_level[i][8] == true) {
plane_active = plane_level[i][0];
plane_mc = plane_level[i][7];
speed_upg = plane_level[i][3];
acc_upg = plane_level[i][4];
turn_upg = plane_level[i][5];
}
if (sum >= plane_level[i][1]) {
plane_mc = plane_level[i][7];
speed_upg = plane_level[i][3];
acc_upg = plane_level[i][4];
turn_upg = plane_level[i][5];
plane_active = plane_level[i][0];
if (plane_level[i][8] == false) {
sum -= plane_level[i][1];
plane_level[i][8] = true;
}
}
}
}
}
if (mg_level[i][0].hitTest(_root.crosshair_mc._x, _root.crosshair_mc._y, true)) {
if (mg_level[i - 1][7] == true or mg_level[i - 1][7] == undefined) {
if (rank >= mg_level[i][2]) {
if (mg_level[i][7] == true) {
mg_active = mg_level[i][0];
fire_upg = mg_level[i][4];
mg_upg = mg_level[i][3];
}
if (sum >= mg_level[i][1]) {
fire_upg = mg_level[i][4];
mg_upg = mg_level[i][3];
mg_active = mg_level[i][0];
if (mg_level[i][7] == false) {
sum -= mg_level[i][1];
mg_level[i][7] = true;
}
}
}
}
}
if (bomb_level[i][0].hitTest(_root.crosshair_mc._x, _root.crosshair_mc._y, true)) {
if (bomb_level[i - 1][7] == true or bomb_level[i - 1][7] == undefined) {
if (rank >= bomb_level[i][2]) {
if (bomb_level[i][7] == true) {
bomb_active = bomb_level[i][0];
bomb_rate = bomb_level[i][4];
bomb_upg = bomb_level[i][3];
}
if (sum >= bomb_level[i][1]) {
bomb_rate = bomb_level[i][4];
bomb_upg = bomb_level[i][3];
bomb_active = bomb_level[i][0];
if (bomb_level[i][7] == false) {
sum -= bomb_level[i][1];
bomb_level[i][7] = true;
}
}
}
}
}
if (btns[0].hitTest(_root.crosshair_mc._x, _root.crosshair_mc._y, true)) {
_root.gotoAndStop('level' + level);
_root.total_score = sum;
}
++i;
}
};
}
clean_up();
stop();
btn_alpha(plane_level, 8, plane_active, equipped_p);
btn_alpha(mg_level, 7, mg_active, equipped_m);
btn_alpha(bomb_level, 7, bomb_active, equipped_b);
_root._x = 0;
_root._y = 0;
btns = new Array(_root.play_btn);
_root.rank_ind.gotoAndStop(_root.rank);
sum = total_score;
_root.desc = '';
if (level == 2) {
shop_arrays();
}
onEnterFrame = function () {
_root.cash = sum;
shop();
};
}
// unknown tag 88 length 36
movieClip 261 {
}
movieClip 265 {
}
movieClip 267 {
}
movieClip 269 {
}
movieClip 271 {
}
movieClip 273 {
frame 1 {
stop();
}
}
movieClip 281 {
frame 1 {
stop();
v;
}
frame 6 {
stop();
v;
}
}
movieClip 282 {
}
movieClip 284 {
}
movieClip 286 {
}
movieClip 288 {
}
movieClip 290 {
}
movieClip 293 {
}
movieClip 299 {
frame 1 {
stop();
}
}
movieClip 302 {
}
movieClip 308 {
frame 1 {
stop();
}
}
movieClip 311 {
}
movieClip 317 {
frame 1 {
stop();
}
}
movieClip 320 {
}
movieClip 327 {
frame 1 {
stop();
}
}
movieClip 331 {
}
movieClip 332 {
}
movieClip 338 {
frame 1 {
stop();
}
}
movieClip 341 {
}
movieClip 347 {
frame 1 {
stop();
}
}
movieClip 350 {
}
movieClip 356 {
frame 1 {
stop();
}
}
movieClip 359 {
}
movieClip 365 {
frame 1 {
stop();
}
}
movieClip 368 {
}
movieClip 375 {
frame 1 {
stop();
}
}
movieClip 378 {
}
movieClip 384 {
frame 1 {
stop();
}
}
movieClip 386 {
}
movieClip 392 {
frame 1 {
stop();
}
}
movieClip 394 {
}
movieClip 400 {
frame 1 {
stop();
}
}
movieClip 402 {
}
movieClip 408 {
frame 1 {
stop();
}
}
movieClip 410 {
}
movieClip 417 {
frame 1 {
stop();
}
}
movieClip 419 {
}
movieClip 425 {
frame 1 {
stop();
}
}
movieClip 427 {
}
movieClip 429 {
}
movieClip 431 {
}
instance crosshair_mc of movieClip 431 {
onClipEvent (enterFrame) {
startDrag(this, true);
}
}
movieClip 438 {
}
movieClip 443 {
frame 1 {
stop();
}
}
movieClip 445 {
}