Frame 1
MochiAd.showPreGameAd({id:"0ed08d67c4062e27", res:"600x400"});
Frame 2
attachMovie("Preloader", "pr", 1);
stop();
_quality = "MEDIUM";
Frame 4
function game() {
_global.rad = (Math.PI/180);
cx = (cy = 0);
v = 2;
vx = 0;
sfx_vol = 10;
a = (b = (c = (d = (e = (f1 = (f2 = (vr = 0)))))));
score = 0;
health = 300;
totalhealth = 300;
dead = false;
attachMovie("Sky_Mc", "Sky_Mc", 4);
attachMovie("Berge2_Mc", "Mountain2_Mc", 5);
attachMovie("Berge_Mc", "Mountain_Mc", 6);
attachMovie("Ground_Mc", "Ground_Mc", 42);
Ground_Mc._y = 360;
Ground_Mc.cacheAsBitmap = true;
_root.createEmptyMovieClip("bc", 30);
_root.createEmptyMovieClip("oc", 31);
_root.createEmptyMovieClip("ec", 32);
_root.createEmptyMovieClip("sc", 33);
attachMovie("Tank", "Player_Mc", 40);
Player_Mc._x = 300;
Player_Mc._y = 360;
_root.createEmptyMovieClip("fc", 41);
attachMovie("Crosshair", "Crosshair", 100);
attachMovie("Crosshair2", "Crosshair2", 101);
attachMovie("Level", "Level", 200);
attachMovie("Hud_Screen", "Hud", 300);
this.onEnterFrame = function () {
Mouse.hide();
crosshair();
if (!dead) {
player();
}
counters();
};
}
function title_screen() {
clear_screen();
attachMovie("Title_Screen", "ts", 2);
trace("wtf");
}
function game_over() {
attachMovie("Game_Over_Screen", "go", 2000);
}
function intro() {
attachMovie("Intro", "int", 2000);
}
function highscore() {
v = 1;
clear_screen();
attachMovie("Highscore_Table", "hs", 2000);
}
function clear_screen() {
removeMovieClip(Sky_Mc);
removeMovieClip(Mountain_Mc);
removeMovieClip(Mountain2_Mc);
removeMovieClip(Ground_Mc);
removeMovieClip(bc);
removeMovieClip(oc);
removeMovieClip(ec);
removeMovieClip(sc);
removeMovieClip(fc);
removeMovieClip(Player_Mc);
removeMovieClip(Crosshair);
removeMovieClip(Crosshair2);
removeMovieClip(Level);
removeMovieClip(Hud);
removeMovieClip(hs);
removeMovieClip(pr);
}
function player() {
px = Player_Mc._x;
py = Player_Mc._y;
vx = vx * 0.5;
Player_Mc._rotation = Player_Mc._rotation * 0.9;
sin = Math.sin(Player_Mc._rotation * rad);
h = (Math.sqrt(sin * sin) * Player_Mc._width) / 4;
Player_Mc._y = 360 - h;
rotation1 = Math.atan2(dy, dx);
rotation2 = Math.atan2(dy2, dx2);
Player_Mc.Canon1._rotation = rotation1 / rad;
Player_Mc.Canon2._rotation = rotation2 / rad;
if (Key.isDown(1)) {
f1++;
if (f1 > 21) {
Player_Mc.Canon1.Canon.gotoAndPlay(2);
shoot1(1, rotation1);
f1 = 0;
}
f2++;
if (f2 > 5) {
Player_Mc.Canon2.Canon.gotoAndPlay(2);
shoot2(2, rotation2 + ((Math.random() - Math.random()) / 20));
f2 = 0;
}
}
if (Key.isDown(39)) {
if (Player_Mc._x < (600 - (Player_Mc._width / 2))) {
vx--;
}
}
if (Key.isDown(37)) {
if (Player_Mc._x > (Player_Mc._width / 2)) {
vx++;
}
}
Player_Mc._x = Player_Mc._x - vx;
if ((health <= 0) && (!dead)) {
fx("Explosion_Tank", px, py);
removeMovieClip(Player_Mc);
dead = true;
game_over();
}
}
function crosshair() {
cx = Crosshair._x;
cy = Crosshair._y;
Crosshair._x = (Crosshair2._x = _xmouse);
Crosshair._y = (Crosshair2._y = _ymouse);
dx = (px + 16) - cx;
dy = (py - 32) - cy;
dx2 = (px - 6) - cx;
dy2 = (py - 36) - cy;
if (Crosshair._y > 300) {
Crosshair._y = 300;
Crosshair2._visible = true;
} else {
Crosshair2._visible = false;
}
}
function shoot1(type, r) {
a++;
bul = bc.attachMovie("Bullet" + type, "b_" + a, a);
bul._x = px + 16;
bul._y = py - 32;
bul.r = r;
}
function shoot2(type, r) {
a++;
bul = bc.attachMovie("Bullet" + type, "b_" + a, a);
bul._x = px - 6;
bul._y = py - 36;
bul.r = r;
}
function fx(type, x, y) {
b++;
new_fx = fc.attachMovie(type, "fx_" + b, b);
new_fx._x = x;
new_fx._y = y;
}
function eshoot(type, x, y, r) {
c++;
bul = oc.attachMovie(type, "b_" + c, c);
bul._x = x;
bul._y = y;
bul.r = r;
}
function hit(nv) {
vx = vx - (nv * 2);
Player_Mc._rotation = Player_Mc._rotation + (nv * Math.PI);
}
function play_sound(type, pt, vol) {
e++;
smc = sc.createEmptyMovieClip("s_" + e, e);
smc.snd = new Sound();
smc.snd.attachSound(type);
smc.snd.start(0, pt);
smc.snd.setVolume((sfx_vol + vol) / 2);
}
function counters() {
if (a > 800) {
a = 0;
}
if (b > 1400) {
b = 0;
}
if (d > 1400) {
d = 0;
}
if (c > 1400) {
c = 0;
}
if (e > 800) {
e = 0;
}
}
function text_effect(txt) {
b++;
new_fx = fc.attachMovie("Text_Effect", "fx_" + b, b);
new_fx._x = 300;
new_fx._y = 200;
new_fx.mc.txt = txt;
}
function enemy(type, dd) {
d++;
en = ec.attachMovie(type, "e_" + d, d);
en.d = dd;
}
stop();
intro();
Symbol 2 MovieClip [pnFlashGames] Frame 1
#initclip 2
pnFlashGames = function () {
this.gid = _root.pn_gid;
this.uname = _root.pn_uname;
this._modvalue = "pnFlashGames";
this._modvar = "module";
this._script = "index.php";
if (_root.pn_modvalue != null) {
this._modvalue = _root.pn_modvalue;
}
if (_root.pn_modvar != null) {
this._modvar = _root.pn_modvar;
}
if (_root.pn_script != null) {
this._script = _root.pn_script;
}
this._autoupdate = false;
if (_root.pn_autoupdate == "true") {
this._autoupdate = true;
}
if (_root.pn_extravars != null) {
this._extravars = new Array();
temppairs = _root.pn_extravars.split("|");
x = 0;
while (x < temppairs.length) {
tempset = temppairs[x].split("~");
this._extravars.push(tempset);
x++;
}
} else {
this._extravars = null;
}
this.busy = false;
this.gameSaved = null;
this.gameLoaded = null;
this.gameScoresLoaded = null;
this.gameScores = null;
this.scoreStored = null;
this.gameData = "";
};
pnFlashGames.prototype.saveGame = function (gameData) {
this.busy = true;
varsObj = new LoadVars();
varsObj.func = "saveGame";
varsObj.gid = this.gid;
varsObj.gameData = gameData;
varsObj.type = "user";
varsObj[this._modvar] = this._modvalue;
varsObj.parent = this;
varsObj.onLoad = this.saveGame_Result;
if (this._extravars != null) {
x = 0;
while (x < this._extravars.length) {
varsObj[this._extravars[x][0]] = this._extravars[x][1];
x++;
}
}
if (this.debugMode) {
this.debugOutput(varsObj);
} else {
varsObj.sendAndLoad(this._script, varsObj, "POST");
}
};
pnFlashGames.prototype.saveGame_Result = function (success) {
this.parent._parent.incoming = this.opSuccess;
if (this.opSuccess == "true") {
this.parent.gameSaved = true;
} else {
this.parent.gameSaved = false;
}
this.parent.busy = false;
};
pnFlashGames.prototype.loadGame = function () {
this.busy = true;
varsObj = new LoadVars();
varsObj.func = "loadGame";
varsObj.gid = this.gid;
varsObj.type = "user";
varsObj[this._modvar] = this._modvalue;
varsObj.parent = this;
varsObj.onLoad = this.loadGame_Result;
if (this._extravars != null) {
x = 0;
while (x < this._extravars.length) {
varsObj[this._extravars[x][0]] = this._extravars[x][1];
x++;
}
}
if (this.debugMode) {
this.debugOutput(varsObj);
} else {
varsObj.sendAndLoad(this._script, varsObj, "POST");
}
};
pnFlashGames.prototype.loadGame_Result = function (success) {
if (this.opSuccess == "true") {
this.parent.gameLoaded = true;
this.parent.gameData = gameData;
} else {
this.parent.gameLoaded = false;
}
if (this.parent.onLoadGame != null) {
this.parent.onLoadGame(this.gameData);
}
this.parent.busy = false;
};
pnFlashGames.prototype.storeScore = function (score) {
this.busy = true;
varsObj = new LoadVars();
varsObj.score = score;
varsObj.func = "storeScore";
varsObj.gid = this.gid;
varsObj.type = "user";
varsObj[this._modvar] = this._modvalue;
varsObj.parent = this;
varsObj.onLoad = this.storeScore_Result;
if (this._extravars != null) {
x = 0;
while (x < this._extravars.length) {
varsObj[this._extravars[x][0]] = this._extravars[x][1];
x++;
}
}
if (this.debugMode) {
this.debugOutput(varsObj);
} else {
varsObj.sendAndLoad(this._script, varsObj, "POST");
}
};
pnFlashGames.prototype.storeScore_Result = function (success) {
if (this.opSuccess == "true") {
this.parent.scoreStored = true;
if (this.parent._autoupdate) {
_root.getURL("javascript:refreshScores();");
}
} else {
this.parent.scoreStored = false;
}
this.parent.busy = false;
};
pnFlashGames.prototype.loadGameScores = function () {
this.busy = true;
varsObj = new LoadVars();
varsObj.func = "loadGameScores";
varsObj.gid = this.gid;
varsObj.type = "user";
varsObj[this._modvar] = this._modvalue;
varsObj.parent = this;
varsObj.onLoad = this.loadGameScores_Result;
if (this._extravars != null) {
x = 0;
while (x < this._extravars.length) {
varsObj[this._extravars[x][0]] = this._extravars[x][1];
x++;
}
}
if (this.debugMode) {
this.debugOutput(varsObj);
} else {
varsObj.sendAndLoad(this._script, varsObj, "POST");
}
};
pnFlashGames.prototype.loadGameScores_Result = function (success) {
if (this.opSuccess == "true") {
this.parent.gameScoresLoaded = true;
this.parent.gameScores = new XML(this.gameScores);
} else {
this.parent.gameScoresLoaded = false;
}
if (this.parent.onLoadGameScores != null) {
this.parent.onLoadGameScores(this.gameScores);
}
this.parent.busy = false;
};
pnFlashGames.prototype.debugOutput = function (vars) {
debug = "";
debug = debug + (("Function: " + vars.func) + newline);
switch (vars.func) {
case "storeScore" :
debug = debug + ("Score: " + vars.score);
break;
case "saveGame" :
debug = debug + ("Saving: " + vars.gameData);
break;
case "loadGame" :
debug = debug + "Loading data....";
break;
case "getGameScores" :
debug = debug + "Getting scores for this game....";
}
trace(debug);
};
Object.registerClass("pnFlashGames", pnFlashGames);
#endinitclip
Symbol 9 MovieClip [Enemy4_Die] Frame 1
this.onEnterFrame = function () {
_x = (_x - _root.v);
};
Symbol 9 MovieClip [Enemy4_Die] Frame 16
stop();
Symbol 20 MovieClip [Enemy_Bullet2] Frame 1
v = 5;
vx = (-Math.cos(r)) * v;
vy = (-Math.sin(r)) * v;
_rotation = (r / rad);
cacheAsBitmap = true;
dmg = 3;
_root.play_sound("rocket", 1, 20);
Symbol 20 MovieClip [Enemy_Bullet2] Frame 2
_x = (_x + vx);
_y = (_y + vy);
if (_x > 600) {
removeMovieClip(this);
}
if (_x < 0) {
removeMovieClip(this);
}
if (_y > 360) {
_root.fx("Explosion_Ground_small", _x, 360);
removeMovieClip(this);
}
if (_root.Player_Mc.hitTest(_x, _y, true)) {
_root.health = _root.health - dmg;
_root.fx("Explosion_Hit_small", _x, _y);
removeMovieClip(this);
}
Symbol 20 MovieClip [Enemy_Bullet2] Frame 3
gotoAndPlay (2);
Symbol 22 MovieClip [Enemy_Bullet1] Frame 1
v = 7;
vx = (-Math.cos(r)) * v;
vy = (-Math.sin(r)) * v;
_rotation = (r / rad);
cacheAsBitmap = true;
dmg = 2;
_root.play_sound("mg2", 1, 100);
Symbol 22 MovieClip [Enemy_Bullet1] Frame 2
_x = (_x + vx);
_y = (_y + vy);
if (_x > 600) {
removeMovieClip(this);
}
if (_x < 0) {
removeMovieClip(this);
}
if (_y > 360) {
_root.fx("Bullet_Hit_Ground", _x, 360);
removeMovieClip(this);
}
if (_root.Player_Mc.hitTest(_x, _y, true)) {
_root.health = _root.health - dmg;
_root.fx("Bullet_Hit_Metal", _x, _y);
removeMovieClip(this);
}
Symbol 22 MovieClip [Enemy_Bullet1] Frame 3
gotoAndPlay (2);
Symbol 24 MovieClip [Explosion_Hit] Frame 1
_root.fx("Explosion_Ground_Dirt", _x, _y);
i = 0;
while (i < 5) {
_root.fx("Explosion_Ground_Smoke", _x, _y);
i++;
}
i = 0;
while (i < 0) {
_root.fx("Explosion_Ground_Debris", _x, _y);
i++;
}
i = 0;
while (i < 8) {
_root.fx("Explosion_Ground_Debris2", _x, _y);
i++;
}
_root.fx("Explosion_Hit_Flash", _x, _y);
_root.play_sound("explo_hit", 1, 100);
Symbol 24 MovieClip [Explosion_Hit] Frame 2
removeMovieClip(this);
Symbol 24 MovieClip [Explosion_Hit] Frame 3
gotoAndPlay (2);
Symbol 25 MovieClip [Explosion_Tank] Frame 1
i = 0;
while (i < 5) {
_root.fx("Explosion_Ground_Smoke", _x, _y);
i++;
}
_root.fx("Explosion_Ground", _x, _y);
_root.fx("Explosion_Hit", _x, _y);
_root.fx("Explosion_Tank_Debris1", _x, _y);
_root.fx("Explosion_Tank_Debris2", _x, _y);
_root.fx("Explosion_Tank_Debris3", _x, _y);
_root.fx("Explosion_Tank_Debris4", _x, _y);
_root.fx("Explosion_Tank_Debris5", _x, _y);
Symbol 25 MovieClip [Explosion_Tank] Frame 2
removeMovieClip(this);
Symbol 25 MovieClip [Explosion_Tank] Frame 3
gotoAndPlay (2);
Symbol 26 MovieClip [Explosion_Hit_small] Frame 1
i = 0;
while (i < 2) {
_root.fx("Explosion_Ground_Smoke", _x, _y);
i++;
}
i = 0;
while (i < 2) {
_root.fx("Explosion_Ground_Debris", _x, _y);
i++;
}
i = 0;
while (i < 1) {
_root.fx("Explosion_Ground_Debris2", _x, _y);
i++;
}
_root.fx("Explosion_Hit_Flash", _x, _y);
_root.play_sound("explo_hit", 1, 50);
Symbol 26 MovieClip [Explosion_Hit_small] Frame 2
removeMovieClip(this);
Symbol 26 MovieClip [Explosion_Hit_small] Frame 3
gotoAndPlay (2);
Symbol 27 MovieClip [Explosion_Ground_small] Frame 1
i = 0;
while (i < 2) {
_root.fx("Explosion_Ground_Smoke", _x, _y);
i++;
}
i = 0;
while (i < 3) {
_root.fx("Explosion_Ground_Debris2", _x, _y);
i++;
}
_root.fx("Explosion_Ground_Flash", _x, _y);
_root.play_sound("explo_hit", 1, 50);
Symbol 27 MovieClip [Explosion_Ground_small] Frame 2
removeMovieClip(this);
Symbol 27 MovieClip [Explosion_Ground_small] Frame 3
gotoAndPlay (2);
Symbol 28 MovieClip [Explosion_Ground] Frame 1
_root.fx("Explosion_Ground_Dirt", _x, _y);
i = 0;
while (i < 5) {
_root.fx("Explosion_Ground_Smoke", _x, _y);
i++;
}
i = 0;
while (i < 4) {
_root.fx("Explosion_Ground_Debris", _x, _y);
i++;
}
i = 0;
while (i < 3) {
_root.fx("Explosion_Ground_Debris2", _x, _y);
i++;
}
_root.fx("Explosion_Ground_Flash", _x, _y);
_root.play_sound("explo_ground", 1, 100);
Symbol 28 MovieClip [Explosion_Ground] Frame 2
removeMovieClip(this);
Symbol 28 MovieClip [Explosion_Ground] Frame 3
gotoAndPlay (2);
Symbol 30 MovieClip [Explosion_Ground_Debris2] Frame 1
i = 0;
h = 0;
_y = (_y - 5);
vx = (Math.random() - Math.random()) * 10;
vy = -(2 + (Math.random() * 5));
_yscale = (25 + (75 * Math.random()));
_xscale = (25 + (75 * Math.random()));
this.cacheAsBitmap = true;
Symbol 30 MovieClip [Explosion_Ground_Debris2] Frame 2
_alpha = (_alpha - 0.5);
_x = (_x + (vx - _root.v));
_y = (_y + vy);
vx = vx * 0.98;
vy = vy + 0.2;
if (_y > 360) {
_y = 360;
vy = (-vy) * 0.4;
}
if (_x < 0) {
removeMovieClip(this);
}
if (Math.sqrt(vy * vy) < 0.1) {
if (_y > 355) {
vy = 0;
_y = 360;
}
}
i++;
if (i < 60) {
h++;
if (h > 4) {
_root.fx("Explosion_Fade_Debris2", _x, _y);
h = 0;
}
} else {
removeMovieClip(this);
}
if (_alpha <= 0) {
removeMovieClip(this);
}
Symbol 30 MovieClip [Explosion_Ground_Debris2] Frame 3
gotoAndPlay (2);
Symbol 32 MovieClip [Explosion_Tank_Debris5] Frame 1
i = 0;
h = 0;
_y = (_y - 5);
vx = (Math.random() - Math.random()) * 10;
vy = -(2 + (Math.random() * 5));
_yscale = (25 + (50 * Math.random()));
_xscale = (25 + (50 * Math.random()));
_alpha = (50 + random(50));
_rotation = random(360);
this.cacheAsBitmap = true;
Symbol 32 MovieClip [Explosion_Tank_Debris5] Frame 2
_x = (_x + (vx - _root.v));
_y = (_y + vy);
vx = vx * 0.98;
vy = vy + 0.2;
if (_y > 360) {
_y = 360;
vy = (-vy) * 0.4;
}
if (_x < 0) {
removeMovieClip(this);
}
if (Math.sqrt(vy * vy) < 0.1) {
if (_y > 355) {
vy = 0;
_y = 360;
}
}
Symbol 32 MovieClip [Explosion_Tank_Debris5] Frame 3
gotoAndPlay (2);
Symbol 34 MovieClip [Explosion_Tank_Debris4] Frame 1
i = 0;
h = 0;
_y = (_y - 5);
vx = (Math.random() - Math.random()) * 10;
vy = -(2 + (Math.random() * 5));
_yscale = (25 + (50 * Math.random()));
_xscale = (25 + (50 * Math.random()));
_alpha = (50 + random(50));
_rotation = random(360);
this.cacheAsBitmap = true;
Symbol 34 MovieClip [Explosion_Tank_Debris4] Frame 2
_x = (_x + (vx - _root.v));
_y = (_y + vy);
vx = vx * 0.98;
vy = vy + 0.2;
if (_y > 360) {
_y = 360;
vy = (-vy) * 0.4;
}
if (_x < 0) {
removeMovieClip(this);
}
if (Math.sqrt(vy * vy) < 0.1) {
if (_y > 355) {
vy = 0;
_y = 360;
}
}
Symbol 34 MovieClip [Explosion_Tank_Debris4] Frame 3
gotoAndPlay (2);
Symbol 36 MovieClip [Explosion_Tank_Debris3] Frame 1
i = 0;
h = 0;
_y = (_y - 5);
vx = (Math.random() - Math.random()) * 10;
vy = -(2 + (Math.random() * 5));
_yscale = (25 + (50 * Math.random()));
_xscale = (25 + (50 * Math.random()));
_alpha = (50 + random(50));
_rotation = random(360);
this.cacheAsBitmap = true;
Symbol 36 MovieClip [Explosion_Tank_Debris3] Frame 2
_x = (_x + (vx - _root.v));
_y = (_y + vy);
vx = vx * 0.98;
vy = vy + 0.2;
if (_y > 360) {
_y = 360;
vy = (-vy) * 0.4;
}
if (_x < 0) {
removeMovieClip(this);
}
if (Math.sqrt(vy * vy) < 0.1) {
if (_y > 355) {
vy = 0;
_y = 360;
}
}
Symbol 36 MovieClip [Explosion_Tank_Debris3] Frame 3
gotoAndPlay (2);
Symbol 39 MovieClip Frame 1
onLoad = function () {
stop();
};
onEnterFrame = function () {
v = (_root.v - _root.vx) * Math.PI;
i = 0;
while (i < v) {
nextFrame();
i++;
}
};
Symbol 39 MovieClip Frame 361
gotoAndPlay (2);
Symbol 40 MovieClip [Explosion_Tank_Debris2] Frame 1
i = 0;
h = 0;
_y = (_y - 5);
vx = (Math.random() - Math.random()) * 10;
vy = -(2 + (Math.random() * 5));
_yscale = (25 + (50 * Math.random()));
_xscale = (25 + (50 * Math.random()));
_alpha = (50 + random(50));
_rotation = random(360);
this.cacheAsBitmap = true;
Symbol 40 MovieClip [Explosion_Tank_Debris2] Frame 2
_x = (_x + (vx - _root.v));
_y = (_y + vy);
vx = vx * 0.98;
vy = vy + 0.2;
if (_y > 360) {
_y = 360;
vy = (-vy) * 0.4;
}
if (_x < 0) {
removeMovieClip(this);
}
if (Math.sqrt(vy * vy) < 0.1) {
if (_y > 355) {
vy = 0;
_y = 360;
}
}
Symbol 40 MovieClip [Explosion_Tank_Debris2] Frame 3
gotoAndPlay (2);
Symbol 43 MovieClip Frame 1
stop();
Symbol 45 MovieClip [Explosion_Tank_Debris1] Frame 1
i = 0;
h = 0;
_y = (_y - 5);
vx = (Math.random() - Math.random()) * 10;
vy = -(2 + (Math.random() * 5));
_yscale = (25 + (50 * Math.random()));
_xscale = (25 + (50 * Math.random()));
_alpha = (50 + random(50));
_rotation = random(360);
this.cacheAsBitmap = true;
Symbol 45 MovieClip [Explosion_Tank_Debris1] Frame 2
_x = (_x + (vx - _root.v));
_y = (_y + vy);
vx = vx * 0.98;
vy = vy + 0.2;
if (_y > 360) {
_y = 360;
vy = (-vy) * 0.4;
}
if (_x < 0) {
removeMovieClip(this);
}
if (Math.sqrt(vy * vy) < 0.1) {
if (_y > 355) {
vy = 0;
_y = 360;
}
}
Symbol 45 MovieClip [Explosion_Tank_Debris1] Frame 3
gotoAndPlay (2);
Symbol 47 MovieClip [Explosion_Ground_Debris] Frame 1
i = 0;
h = 0;
_y = (_y - 5);
vx = (Math.random() - Math.random()) * 10;
vy = -(2 + (Math.random() * 5));
_yscale = (25 + (50 * Math.random()));
_xscale = (25 + (50 * Math.random()));
_alpha = (50 + random(50));
this.cacheAsBitmap = true;
Symbol 47 MovieClip [Explosion_Ground_Debris] Frame 2
_x = (_x + (vx - _root.v));
_y = (_y + vy);
vx = vx * 0.98;
vy = vy + 0.2;
if (_y > 360) {
_y = 360;
vy = (-vy) * 0.4;
}
if (_x < 0) {
removeMovieClip(this);
}
if (Math.sqrt(vy * vy) < 0.1) {
if (_y > 355) {
vy = 0;
_y = 360;
}
}
h++;
if (h > 4) {
_root.fx("Explosion_Fade_Debris", _x, _y);
h = 0;
}
Symbol 47 MovieClip [Explosion_Ground_Debris] Frame 3
gotoAndPlay (2);
Symbol 50 MovieClip [Explosion_Fade_Debris2] Frame 1
_yscale = (50 + (75 * Math.random()));
_xscale = (50 + (75 * Math.random()));
_alpha = (Math.random() * 100);
this.onEnterFrame = function () {
_x = (_x - _root.v);
};
cacheAsBitmap = true;
Symbol 50 MovieClip [Explosion_Fade_Debris2] Frame 16
removeMovieClip(this);
Symbol 53 MovieClip [Explosion_Fade_Debris] Frame 1
_yscale = (50 + (75 * Math.random()));
_xscale = (50 + (75 * Math.random()));
_alpha = (Math.random() * 100);
this.onEnterFrame = function () {
_x = (_x - _root.v);
};
cacheAsBitmap = true;
Symbol 53 MovieClip [Explosion_Fade_Debris] Frame 15
removeMovieClip(this);
Symbol 54 MovieClip [Explosion_Ground_Dirt] Frame 1
_yscale = (75 + random(50));
_xscale = (75 + random(50));
_alpha = (50 + random(50));
cacheAsBitmap = true;
Symbol 54 MovieClip [Explosion_Ground_Dirt] Frame 2
_x = (_x - _root.v);
if (_x < ((-_width) / 2)) {
removeMovieClip(this);
}
Symbol 54 MovieClip [Explosion_Ground_Dirt] Frame 3
gotoAndPlay (2);
Symbol 56 MovieClip [Explosion_Hit_Flash] Frame 3
removeMovieClip(this);
Symbol 58 MovieClip [Explosion_Ground_Flash] Frame 3
removeMovieClip(this);
Symbol 66 MovieClip [Enemy2_Mc] Frame 1
if (d == 1) {
_x = 650;
}
if (d == -1) {
_x = -50;
}
if (!d) {
d = 1;
}
_xscale = (100 * d);
_y = (50 + random(100));
health = 15;
i = 0;
vx = -4 * d;
cacheAsBitmap = true;
Symbol 66 MovieClip [Enemy2_Mc] Frame 2
_x = (_x + vx);
dv = _x - _root.px;
dv = Math.sqrt(dv * dv);
dx = _x - _root.px;
dy = _y - _root.py;
r = Math.atan2(dy, dx);
if (d == 1) {
Canon._rotation = r / rad;
} else {
Canon._rotation = ((-r) / rad) + 180;
}
if (dv < 200) {
i++;
if (i >= 8) {
_root.eshoot("Enemy_Bullet1", _x, _y, r + ((Math.random() - Math.random()) / 10));
i = 0;
}
}
if (health <= 0) {
_root.score = _root.score + (100 + random(100));
_root.b++;
w = _root.fc.attachMovie("Enemy2_Wrack_Mc", "fx_" + _root.b, _root.b);
w._x = _x;
w._y = _y;
w.d = d;
_root.fx("Explosion_Hit", _x, _y);
i = 0;
while (i < 4) {
_root.fx("Explosion_Ground_Debris", _x, _y);
i++;
}
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip(this);
}
if (_x > 650) {
removeMovieClip(this);
}
Symbol 66 MovieClip [Enemy2_Mc] Frame 3
gotoAndPlay (2);
Symbol 67 MovieClip [Level] Frame 1
stop();
i = 0;
h = 0;
onEnterFrame = function () {
i = i + Math.random();
if (i > 20) {
nextFrame();
i = 0;
}
};
Symbol 67 MovieClip [Level] Frame 2
_root.text_effect("mission 1");
Symbol 67 MovieClip [Level] Frame 4
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 6
h = 0;
Symbol 67 MovieClip [Level] Frame 8
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 10
if (h < 4) {
gotoAndStop ("l1");
}
Symbol 67 MovieClip [Level] Frame 11
_root.text_effect("mission 2");
Symbol 67 MovieClip [Level] Frame 13
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 15
h = 0;
Symbol 67 MovieClip [Level] Frame 17
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 19
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 21
if (h < 8) {
gotoAndStop ("l2");
}
Symbol 67 MovieClip [Level] Frame 23
_root.text_effect("mission 3");
h = 0;
Symbol 67 MovieClip [Level] Frame 25
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 28
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 30
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 31
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 33
if (h < 8) {
gotoAndStop ("l3");
}
Symbol 67 MovieClip [Level] Frame 34
h = 0;
Symbol 67 MovieClip [Level] Frame 35
_root.text_effect("mission 4");
Symbol 67 MovieClip [Level] Frame 37
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 40
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 42
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 43
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 45
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 46
if (h < 10) {
gotoAndStop ("l4");
}
Symbol 67 MovieClip [Level] Frame 47
h = 0;
Symbol 67 MovieClip [Level] Frame 48
_root.text_effect("mission 5");
Symbol 67 MovieClip [Level] Frame 50
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 53
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 55
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 56
d = (random(2) * 2) - 1;
_root.enemy("Enemy3_Mc", d);
Symbol 67 MovieClip [Level] Frame 58
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 60
if (h < 10) {
gotoAndStop ("l5");
}
Symbol 67 MovieClip [Level] Frame 61
h = 0;
Symbol 67 MovieClip [Level] Frame 62
_root.text_effect("mission 6");
Symbol 67 MovieClip [Level] Frame 64
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 67
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 68
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 69
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 70
d = (random(2) * 2) - 1;
_root.enemy("Enemy3_Mc", d);
Symbol 67 MovieClip [Level] Frame 72
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 74
if (h < 10) {
gotoAndStop ("l6");
}
Symbol 67 MovieClip [Level] Frame 75
h = 0;
Symbol 67 MovieClip [Level] Frame 76
_root.text_effect("mission 7");
Symbol 67 MovieClip [Level] Frame 78
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 81
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 82
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 83
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 84
d = (random(2) * 2) - 1;
_root.enemy("Enemy3_Mc", d);
Symbol 67 MovieClip [Level] Frame 85
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 86
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 88
if (h < 10) {
gotoAndStop ("l7");
}
Symbol 67 MovieClip [Level] Frame 89
h = 0;
Symbol 67 MovieClip [Level] Frame 90
_root.text_effect("mission 8");
Symbol 67 MovieClip [Level] Frame 92
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 95
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 96
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 97
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 98
d = (random(2) * 2) - 1;
_root.enemy("Enemy3_Mc", d);
Symbol 67 MovieClip [Level] Frame 99
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 100
d = (random(2) * 2) - 1;
_root.enemy("Enemy3_Mc", d);
Symbol 67 MovieClip [Level] Frame 101
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 102
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 103
if (h < 10) {
gotoAndStop ("l8");
}
Symbol 67 MovieClip [Level] Frame 104
h = 0;
Symbol 67 MovieClip [Level] Frame 105
_root.text_effect("mission 9");
Symbol 67 MovieClip [Level] Frame 107
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 110
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 111
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 112
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 113
d = (random(2) * 2) - 1;
_root.enemy("Enemy3_Mc", d);
Symbol 67 MovieClip [Level] Frame 114
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 115
d = (random(2) * 2) - 1;
_root.enemy("Enemy3_Mc", d);
Symbol 67 MovieClip [Level] Frame 116
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 117
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 118
d = (random(2) * 2) - 1;
_root.enemy("Enemy5_Mc", d);
Symbol 67 MovieClip [Level] Frame 119
if (h < 10) {
gotoAndStop ("l9");
}
Symbol 67 MovieClip [Level] Frame 120
h = 0;
Symbol 67 MovieClip [Level] Frame 121
_root.text_effect("final mission");
Symbol 67 MovieClip [Level] Frame 123
_root.text_effect("start!");
Symbol 67 MovieClip [Level] Frame 126
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
Symbol 67 MovieClip [Level] Frame 127
d = (random(2) * 2) - 1;
_root.enemy("Enemy2_Mc", d);
h = h + Math.random();
Symbol 67 MovieClip [Level] Frame 128
d = (random(2) * 2) - 1;
_root.enemy("Enemy1_Mc", d);
Symbol 67 MovieClip [Level] Frame 129
d = (random(2) * 2) - 1;
_root.enemy("Enemy3_Mc", d);
Symbol 67 MovieClip [Level] Frame 130
d = (random(2) * 2) - 1;
_root.enemy("Enemy5_Mc", d);
Symbol 67 MovieClip [Level] Frame 131
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 132
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 133
d = (random(2) * 2) - 1;
_root.enemy("Enemy4_Mc", d);
Symbol 67 MovieClip [Level] Frame 134
d = (random(2) * 2) - 1;
_root.enemy("Enemy5_Mc", d);
Symbol 67 MovieClip [Level] Frame 135
gotoAndStop ("l10");
Symbol 70 MovieClip [Bullet_Hit_Ground] Frame 1
_root.play_sound("blt_ground", 1, 100);
Symbol 70 MovieClip [Bullet_Hit_Ground] Frame 7
removeMovieClip(this);
Symbol 72 MovieClip [Bullet_Hit_Metal] Frame 1
_rotation = random(360);
_root.play_sound("blt_metal", 1, 100);
Symbol 72 MovieClip [Bullet_Hit_Metal] Frame 3
removeMovieClip(this);
Symbol 80 MovieClip Frame 8
gotoAndPlay (3);
Symbol 86 MovieClip Frame 1
stop();
Symbol 87 MovieClip [Enemy4_Mc] Frame 1
function animation(nani) {
if (cani != nani) {
ani.gotoAndStop(nani);
cani = nani;
}
}
d = 1;
if (d == 1) {
_x = 650;
}
if (d == -1) {
_x = -50;
}
if (!d) {
d = 1;
}
_xscale = (100 * d);
_y = 360;
cani = false;
animation("walk");
health = 0;
i = 0;
h = 0;
di = 50 + random(20);
s = "walk";
vx = -1 * d;
cacheAsBitmap = true;
Symbol 87 MovieClip [Enemy4_Mc] Frame 2
dv = _x - _root.px;
dv = Math.sqrt(dv * dv);
if (s == "walk") {
_x = (_x + (vx - _root.v));
animation("walk");
i++;
if (i > di) {
s = "shoot";
i = 0;
}
}
if (s == "shoot") {
animation("stand");
_x = (_x + (-_root.v));
h++;
if (h > 4) {
_root.eshoot("Enemy_Bullet1", _x, _y - 12, (Math.random() - Math.random()) / 10);
h = 0;
}
i++;
if (i > 15) {
s = "walk";
i = 0;
}
}
if (this.hitTest(_root.Player_Mc)) {
_root.score = _root.score + (100 + random(100));
_root.fx("Enemy4_Die", _x, _y);
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip(this);
}
if (_x > 650) {
removeMovieClip(this);
}
Symbol 87 MovieClip [Enemy4_Mc] Frame 3
gotoAndPlay (2);
Symbol 94 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop((_root.health / _root.totalhealth) * 100);
};
Symbol 102 MovieClip [Preloader] Frame 1
total = _root.getBytesTotal();
onEnterFrame = function () {
loaded = _root.getBytesLoaded();
p = loaded / total;
bar.bar._xscale = p * 100;
if ((p * 100) == 100) {
_root.gotoAndStop(4);
}
};
Symbol 105 MovieClip [Text_Effect] Frame 50
removeMovieClip(this);
Symbol 228 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 110 MovieClip [Berge_Mc] Frame 1
this.onEnterFrame = function () {
_x = (_x - (_root.v / 2));
if (_x < -600) {
_x = 0;
}
};
cacheAsBitmap = true;
Symbol 114 MovieClip [Berge2_Mc] Frame 1
this.onEnterFrame = function () {
_x = (_x - (_root.v / 3));
if (_x < -600) {
_x = 0;
}
};
cacheAsBitmap = true;
Symbol 117 MovieClip [Bomb_Mc] Frame 1
vx = 0;
vy = 1;
dmg = 5;
cacheAsBitmap = true;
Symbol 117 MovieClip [Bomb_Mc] Frame 2
vy = vy + 0.1;
_x = (_x + (vx - (_root.v / 2)));
_y = (_y + vy);
if (_y >= 360) {
_root.fx("Explosion_Ground", _x, _y);
removeMovieClip(this);
}
for (i in _root.bc) {
bul = _root.bc[i];
if (this.hitTest(bul)) {
_root.fx("Explosion_Hit_small", _x, _y);
removeMovieClip(this);
}
}
if (_root.Player_Mc.hitTest(_x, _y)) {
_root.fx("Explosion_Hit", _x, _y);
dx = _x - _root.px;
_root.hit((-dx) / 4);
_root.health = _root.health - dmg;
removeMovieClip(this);
}
Symbol 117 MovieClip [Bomb_Mc] Frame 3
gotoAndPlay (2);
Symbol 119 MovieClip [Bomb2_Mc] Frame 1
vx = 0;
vy = 1;
dmg = 5;
cacheAsBitmap = true;
Symbol 119 MovieClip [Bomb2_Mc] Frame 2
vy = vy + 0.15;
_x = (_x + (vx - (_root.v / 2)));
_y = (_y + vy);
if (_y >= 360) {
_root.fx("Explosion_Ground_small", _x, _y);
removeMovieClip(this);
}
if (_root.Player_Mc.hitTest(_x, _y)) {
_root.fx("Explosion_Hit_small", _x, _y);
dx = _x - _root.px;
_root.hit((-dx) / 4);
_root.health = _root.health - dmg;
removeMovieClip(this);
}
Symbol 119 MovieClip [Bomb2_Mc] Frame 3
gotoAndPlay (2);
Symbol 121 MovieClip [Bullet1] Frame 1
v = 10;
vx = (-Math.cos(r)) * v;
vy = (-Math.sin(r)) * v;
dmg = 5;
cacheAsBitmap = true;
_root.play_sound("rocket", 1, 100);
Symbol 121 MovieClip [Bullet1] Frame 2
_x = (_x + vx);
_y = (_y + vy);
if (_x > 600) {
removeMovieClip(this);
}
if (_x < 0) {
removeMovieClip(this);
}
if (_y < 0) {
removeMovieClip(this);
}
if (_root.ec.hitTest(_x, _y)) {
for (i in _root.ec) {
en = _root.ec[i];
if (this.hitTest(en)) {
en.health = en.health - dmg;
_root.fx("Bullet_Hit_Metal", _x, _y);
removeMovieClip(this);
}
}
}
Symbol 121 MovieClip [Bullet1] Frame 3
gotoAndPlay (2);
Symbol 127 MovieClip [Enemy5_Mc] Frame 1
if (d == 1) {
_x = 650;
}
if (d == -1) {
_x = -50;
}
if (!d) {
d = 1;
}
_xscale = (100 * d);
_y = (50 + random(100));
health = 15;
i = 0;
vx = -4 * d;
cacheAsBitmap = true;
Symbol 127 MovieClip [Enemy5_Mc] Frame 2
_x = (_x + vx);
dv = _x - _root.px;
dv = Math.sqrt(dv * dv);
dx = _x - _root.px;
dy = _y - _root.py;
r = Math.atan2(dy, dx);
Canon._rotation = r / rad;
if (dv < 200) {
i++;
if (i >= 20) {
_root.eshoot("Enemy_Bullet2", _x + 10, _y + 10, r + ((Math.random() - Math.random()) / 10));
i = 0;
}
}
if (health <= 0) {
_root.score = _root.score + (100 + random(100));
_root.b++;
w = _root.fc.attachMovie("Enemy2_Wrack_Mc", "fx_" + _root.b, _root.b);
w._x = _x;
w._y = _y;
w.d = d;
_root.fx("Explosion_Hit", _x, _y);
i = 0;
while (i < 4) {
_root.fx("Explosion_Ground_Debris", _x, _y);
i++;
}
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip(this);
}
if (_x > 650) {
removeMovieClip(this);
}
Symbol 127 MovieClip [Enemy5_Mc] Frame 3
gotoAndPlay (2);
Symbol 130 MovieClip [Enemy3_Mc] Frame 1
if (d == 1) {
_x = 650;
}
if (d == -1) {
_x = -50;
}
if (!d) {
d = 1;
}
_xscale = (100 * d);
_y = (100 + random(50));
health = 35;
i = 0;
vx = -2.5 * d;
cacheAsBitmap = true;
Symbol 130 MovieClip [Enemy3_Mc] Frame 2
_x = (_x + vx);
dv = _x - _root.px;
dv = Math.sqrt(dv * dv);
if (dv < 100) {
i++;
if (i >= 15) {
_root.eshoot("Bomb2_Mc", _x + 10, _y + 10);
i = 0;
}
}
if (health <= 0) {
_root.score = _root.score + (600 + random(200));
_root.fx("Explosion_Hit", _x, _y);
_root.b++;
w = _root.fc.attachMovie("Enemy3_Wrack_Mc", "fx_" + _root.b, _root.b);
w._x = _x;
w._y = _y;
i = 0;
while (i < 4) {
_root.fx("Explosion_Ground_Debris", _x, _y);
i++;
}
w.d = d;
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip(this);
}
if (_x > 650) {
removeMovieClip(this);
}
Symbol 130 MovieClip [Enemy3_Mc] Frame 3
gotoAndPlay (2);
Symbol 137 Button
on (release, keyPress "<Enter>") {
play();
}
Symbol 139 MovieClip [Game_Over_Screen] Frame 111
stop();
_root.clear_screen();
_root.pnconnector.storeScore(_root.score);
_root.onEnterFrame = function () {
};
Mouse.show();
Symbol 139 MovieClip [Game_Over_Screen] Frame 155
_root.title_screen();
removeMovieClip(this);
Symbol 142 MovieClip [Ground_Mc] Frame 1
cacheAsBitmap = true;
this.onEnterFrame = function () {
_x = (_x - _root.v);
if (_x < -620) {
_x = 0;
}
};
Symbol 177 MovieClip [Highscore_Table] Frame 1
_root.attachMovie("Sky_Mc", "Sky_Mc", 4);
_root.attachMovie("Berge2_Mc", "Mountain2_Mc", 5);
_root.attachMovie("Berge_Mc", "Mountain_Mc", 6);
_root.attachMovie("Ground_Mc", "Ground_Mc", 42);
_root.Ground_Mc._y = 360;
_root.Ground_Mc.cacheAsBitmap = true;
i = 0;
score = new Object();
Symbol 177 MovieClip [Highscore_Table] Frame 3
if (geladen == "1") {
gotoAndPlay (4);
} else {
loadVariables ("http://monolith.lol.dk/battletank/load.php?" + random(99999), this, "GET");
gotoAndPlay (2);
}
Symbol 177 MovieClip [Highscore_Table] Frame 4
names = namen.split("<br>");
scores = score.split("<br>");
trace(score);
i = 0;
while (i < names.length) {
this["name" + i] = names[i];
this["score" + i] = scores[i];
i++;
}
onEnterFrame = function () {
if (!done) {
i++;
if (i > 20) {
nextFrame();
i = 0;
}
}
if (Key.isDown(Key.getCode())) {
_root.title_screen();
}
};
stop();
Symbol 177 MovieClip [Highscore_Table] Frame 15
done = true;
stop();
Symbol 181 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop((_root.health / _root.totalhealth) * 100);
};
Symbol 186 MovieClip [Sky_Mc] Frame 1
this.onEnterFrame = function () {
_x = (_x - (_root.v / 4));
if (_x < -1200) {
_x = 0;
}
};
cacheAsBitmap = true;
Symbol 202 MovieClip [Title_Screen] Frame 15
stop();
i = 0;
this.onEnterFrame = function () {
key = Key.getCode();
if (Key.isDown(key)) {
play();
}
};
Symbol 202 MovieClip [Title_Screen] Frame 16
_root.play_sound("explo_hit", 1, 100);
Symbol 202 MovieClip [Title_Screen] Frame 74
_root.game();
removeMovieClip(this);
Symbol 203 MovieClip [Bullet2] Frame 1
v = 9;
vx = (-Math.cos(r)) * v;
vy = (-Math.sin(r)) * v;
_rotation = (r / rad);
dmg = 2;
cacheAsBitmap = true;
_root.play_sound("mg", 1, 50);
Symbol 203 MovieClip [Bullet2] Frame 2
_x = (_x + vx);
_y = (_y + vy);
if (_x > 600) {
removeMovieClip(this);
}
if (_x < 0) {
removeMovieClip(this);
}
if (_y < 0) {
removeMovieClip(this);
}
if (_root.ec.hitTest(_x, _y)) {
for (i in _root.ec) {
en = _root.ec[i];
if (this.hitTest(en)) {
en.health = en.health - dmg;
_root.fx("Bullet_Hit_Metal", _x, _y);
removeMovieClip(this);
}
}
}
Symbol 203 MovieClip [Bullet2] Frame 3
gotoAndPlay (2);
Symbol 206 MovieClip [Explosion_Ground_Smoke] Frame 1
_alpha = (10 + random(50));
_yscale = (50 + random(200));
_xscale = (50 + random(200));
vx = (Math.random() - Math.random()) * 4;
vy = Math.random() * 4;
cacheAsBitmap = true;
Symbol 206 MovieClip [Explosion_Ground_Smoke] Frame 2
_x = (_x + (vx - _root.v));
_y = (_y - vy);
vx = vx * 0.98;
vy = vy * 0.92;
if (_x < ((-_width) / 2)) {
removeMovieClip(this);
}
Symbol 206 MovieClip [Explosion_Ground_Smoke] Frame 3
gotoAndPlay (2);
Symbol 209 MovieClip [Enemy1_Mc] Frame 1
if (d == 1) {
_x = 650;
}
if (d == -1) {
_x = -50;
}
if (!d) {
d = 1;
}
_xscale = (100 * d);
_y = (50 + random(100));
health = 40;
i = 0;
vx = -3 * d;
cacheAsBitmap = true;
Symbol 209 MovieClip [Enemy1_Mc] Frame 2
_x = (_x + vx);
dv = _x - _root.px;
dv = Math.sqrt(dv * dv);
if (dv < 100) {
i++;
if (i >= 30) {
_root.eshoot("Bomb_Mc", _x, _y);
i = 0;
}
}
if (health <= 0) {
_root.score = _root.score + (300 + random(200));
_root.fx("Explosion_Hit", _x, _y);
_root.b++;
w = _root.fc.attachMovie("Enemy1_Wrack_Mc", "fx_" + _root.b, _root.b);
w._x = _x;
w._y = _y;
w.d = d;
i = 0;
while (i < 4) {
_root.fx("Explosion_Ground_Debris", _x, _y);
i++;
}
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip(this);
}
if (_x > 650) {
removeMovieClip(this);
}
Symbol 209 MovieClip [Enemy1_Mc] Frame 3
gotoAndPlay (2);
Symbol 212 MovieClip [Enemy1_Wrack_Mc] Frame 1
vx = -5 * d;
vy = 0;
_xscale = (-100 * d);
Symbol 212 MovieClip [Enemy1_Wrack_Mc] Frame 2
vy = vy + 0.1;
vx = vx * 0.99;
_x = (_x + vx);
_y = (_y + vy);
_rotation = ((Math.atan2(vy, vx) / rad) + 180);
if (_y > 360) {
_root.fx("Explosion_Ground", _x, _y);
removeMovieClip(this);
}
Symbol 212 MovieClip [Enemy1_Wrack_Mc] Frame 3
gotoAndPlay (2);
Symbol 215 MovieClip [Enemy2_Wrack_Mc] Frame 1
vx = -5 * d;
vy = 0;
_xscale = (-100 * d);
Symbol 215 MovieClip [Enemy2_Wrack_Mc] Frame 2
vy = vy + 0.1;
vx = vx * 0.99;
_x = (_x + vx);
_y = (_y + vy);
_rotation = ((Math.atan2(vy, vx) / rad) + 180);
if (_y > 360) {
_root.fx("Explosion_Ground", _x, _y);
removeMovieClip(this);
}
Symbol 215 MovieClip [Enemy2_Wrack_Mc] Frame 3
gotoAndPlay (2);
Symbol 218 MovieClip [Enemy3_Wrack_Mc] Frame 1
vx = -5 * d;
vy = 0;
_xscale = (-100 * d);
Symbol 218 MovieClip [Enemy3_Wrack_Mc] Frame 2
vy = vy + 0.08;
vx = vx * 0.99;
_x = (_x + vx);
_y = (_y + vy);
_rotation = ((Math.atan2(vy, vx) / rad) + 180);
if (_y > 360) {
_root.fx("Explosion_Ground", _x, _y);
removeMovieClip(this);
}
Symbol 218 MovieClip [Enemy3_Wrack_Mc] Frame 3
gotoAndPlay (2);
Symbol 220 MovieClip [Intro] Frame 1
_root.attachMovie("Sky_Mc", "Sky_Mc", 4);
_root.attachMovie("Berge2_Mc", "Mountain2_Mc", 5);
_root.attachMovie("Berge_Mc", "Mountain_Mc", 6);
_root.attachMovie("Ground_Mc", "Ground_Mc", 42);
_root.Ground_Mc._y = 360;
_root.Ground_Mc.cacheAsBitmap = true;
_root.v = 0.5;
i = 0;
this.onEnterFrame = function () {
i++;
if (i > 160) {
_root.title_screen();
removeMovieClip(this);
}
};
Symbol 227 MovieClip Frame 1
stop();