Frame 1
function myFirstItemHandler() {
getURL ("mailto:xeonzinc@msn.com?Subject=Basic Training Feedback");
}
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem("Email Author", myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
_root.menu = my_cm;
var song_sound = new Sound();
song_sound.attachSound("click");
Instance of Symbol 53 MovieClip in Frame 1
onClipEvent (enterFrame) {
this._x = 141.6;
this._y = 162.3;
this._height = 52;
this._width = 3.169 * _root.percentage;
}
Frame 2
tbytes = getBytesTotal();
bloaded = getBytesLoaded();
_root.percentage = Math.ceil((100 / tbytes) * bloaded) + "%";
if (tbytes != bloaded) {
gotoAndPlay (1);
} else {
gotoAndPlay (3);
}
Frame 3
stop();
Frame 4
var song_sound = new Sound();
song_sound.attachSound("click");
stop();
Frame 5
stop();
Frame 6
stop();
Instance of Symbol 124 MovieClip in Frame 6
on (release) {
getURL ("http://www.newgrounds.com/audio/view.php?id=982090&sub=34965", "_blank");
}
Instance of Symbol 124 MovieClip in Frame 6
on (release) {
getURL ("http://www.newgrounds.com/audio/view.php?id=339805&sub=19476", "_blank");
}
Frame 7
stop();
Frame 8
_root.levela = function () {
_root.wind = Math.ceil(100 * (Math.random() * 3)) / 100;
w = Math.sqrt(_root.wind * _root.wind);
_root.windy.win._width = 70.3333333333333 * w;
_root.windy.win._y = (-_root.windy.win._height) / 2;
if (_root.wind <= 0) {
_root.windy.win._rotation = 180;
_root.windy.win._x = -_root.windy.win._width;
} else {
_root.windy.win._rotation = 0;
_root.windy.win._x = 0;
}
if (_root.level == null) {
_root.level = 1;
_root.score = 0;
_root.clust = 0;
_root.clust2 = 0;
_root.golds = 0;
_root.silvers = 0;
_root.bronzes = 0;
_root.civs = 1;
_root.ha = 0;
_root.gameo = false;
_root.levelo = false;
_root.missileno = 1;
_root.missiles = random(3) + 1;
_root.power = 0;
_root.rotated = 0;
_root.ammo1 = 8;
_root.ammo2 = 0;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.shoots = ((_root.ammo1 + _root.ammo2) + _root.ammo3) + _root.ammo4;
_root.shots = eval ("_root.ammo" + _root.ammo);
_root.moved = 0;
_root.count = 0;
_root.flying = false;
_root.follow = false;
_root.targets = 2;
_root.targetsd = _root.targets;
_root.moved = 0;
i = 1;
while (i <= _root.targets) {
Set(("_root.target" + i) + "._x", eval (("_root.land." + i) + "._x"));
Set(("_root.target" + i) + "._y", stageH + eval (("_root.land." + i) + "._y"));
Set("_root.targeta" + i, true);
duplicateMovieClip ("_root.follow", i, 50 + i);
duplicateMovieClip ("_root.followl", "l" + i, 60 + i);
Set(("_root.l" + i) + ".nam", i);
if (CollisionDetection.checkForCollision(eval ("_root.target" + i), _root.my_mc)) {
while (CollisionDetection.checkForCollision(eval ("_root.target" + i), _root.my_mc)) {
eval ("_root.target" + i)._y = eval ("_root.target" + i)._y - 1;
}
eval ("_root.target" + i)._y = eval ("_root.target" + i)._y + 1;
} else if (CollisionDetection.checkForCollision(eval ("_root.target" + i), _root.my_mc2)) {
while (CollisionDetection.checkForCollision(eval ("_root.target" + i), _root.my_mc2)) {
eval ("_root.target" + i)._y = eval ("_root.target" + i)._y - 1;
}
eval ("_root.target" + i)._y = eval ("_root.target" + i)._y + 1;
}
i++;
}
i = 1;
while (i <= _root.civs) {
Set(("_root.civ" + i) + "._x", eval (("_root.land.c" + i) + "._x"));
Set(("_root.civ" + i) + "._y", stageH + eval (("_root.land.c" + i) + "._y"));
i++;
}
}
if (_root.level < 5) {
if (_root.level == 2) {
_root.ammo1 = 7;
_root.ammo2 = 0;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 2;
_root.civs = 0;
} else if (_root.level == 3) {
_root.ammo1 = 9;
_root.ammo2 = 0;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 3;
_root.civs = 0;
} else if (_root.level == 4) {
_root.ammo1 = 8;
_root.ammo2 = 0;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 2;
_root.civs = 0;
}
} else if (_root.level < 10) {
if (_root.level == 5) {
_root.ammo1 = 6;
_root.ammo2 = 0;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 2;
_root.civs = 0;
} else if (_root.level == 6) {
_root.ammo1 = 3;
_root.ammo2 = 3;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 2;
_root.civs = 0;
} else if (_root.level == 7) {
_root.ammo1 = 0;
_root.ammo2 = 4;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 2;
_root.targets = 2;
_root.civs = 0;
} else if (_root.level == 8) {
_root.ammo1 = 0;
_root.ammo2 = 5;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 2;
_root.targets = 2;
_root.civs = 2;
} else if (_root.level == 9) {
_root.ammo1 = 2;
_root.ammo2 = 2;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 2;
_root.civs = 0;
}
} else if (_root.level < 15) {
if (_root.level == 10) {
_root.ammo1 = 8;
_root.ammo2 = 6;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 3;
_root.civs = 0;
} else if (_root.level == 11) {
_root.ammo1 = 2;
_root.ammo2 = 0;
_root.ammo3 = 3;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 2;
_root.civs = 1;
} else if (_root.level == 12) {
_root.ammo1 = 2;
_root.ammo2 = 1;
_root.ammo3 = 5;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 3;
_root.civs = 2;
} else if (_root.level == 13) {
_root.ammo1 = 4;
_root.ammo2 = 2;
_root.ammo3 = 2;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 3;
_root.civs = 1;
} else if (_root.level == 14) {
_root.ammo1 = 0;
_root.ammo2 = 0;
_root.ammo3 = 6;
_root.ammo4 = 0;
_root.ammo = 3;
_root.targets = 2;
_root.civs = 0;
}
} else if (_root.level <= 20) {
if (_root.level == 15) {
_root.ammo1 = 4;
_root.ammo2 = 2;
_root.ammo3 = 2;
_root.ammo4 = 0;
_root.ammo = 1;
_root.targets = 2;
_root.civs = 0;
} else if (_root.level == 16) {
_root.ammo1 = 0;
_root.ammo2 = 0;
_root.ammo3 = 0;
_root.ammo4 = 3;
_root.ammo = 4;
_root.targets = 3;
_root.civs = 0;
} else if (_root.level == 17) {
_root.ammo1 = 3;
_root.ammo2 = 2;
_root.ammo3 = 1;
_root.ammo4 = 3;
_root.ammo = 1;
_root.targets = 3;
_root.civs = 2;
} else if (_root.level == 18) {
_root.ammo1 = 6;
_root.ammo2 = 2;
_root.ammo3 = 5;
_root.ammo4 = 2;
_root.ammo = 1;
_root.targets = 3;
_root.civs = 0;
} else if (_root.level == 19) {
_root.ammo1 = 6;
_root.ammo2 = 4;
_root.ammo3 = 4;
_root.ammo4 = 4;
_root.ammo = 1;
_root.targets = 3;
_root.civs = 1;
} else if (_root.level == 20) {
_root.ammo1 = 4;
_root.ammo2 = 2;
_root.ammo3 = 2;
_root.ammo4 = 2;
_root.ammo = 1;
_root.targets = 3;
_root.civs = 2;
}
}
};
function remove(nam, rad, xx, yy, civ) {
var myCT = (new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0));
var myMatrix = (new flash.geom.Matrix());
rads = (rad * Math.PI) / 180;
myMatrix.rotate(rads);
if (civ != null) {
myMatrix.translate((xx + (eval (nam + "._x") * 0.168)) - eval (nam + ".tot"), yy + (eval (nam + "._y") * 0.168));
} else if (xx == null) {
myMatrix.translate(eval (nam + "._x") - eval (nam + ".tot"), eval (nam + "._y"));
} else {
myMatrix.translate((xx + eval (nam + "._x")) - eval (nam + ".tot"), yy + eval (nam + "._y"));
}
_root.myBmp.draw(nam, myMatrix, myCT, "erase");
i = 1;
while (eval (("_root.target" + i) + "c") != null) {
Set(("_root.target" + i) + "c", 1);
i++;
}
}
_root.tracks = 2;
_root.trac = 2;
_root.mute = false;
_root.muteed._visible = false;
i = 1;
while (i <= 3) {
duplicateMovieClip ("_root.ociv" + i, "civ" + i, 600 + i);
i++;
}
i = 1;
while (i <= 3) {
duplicateMovieClip ("_root.otarget" + i, "target" + i, 700 + i);
i++;
}
var myCT = (new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0));
this.blendMode = "layer";
var stageW = 600;
var stageH = 300;
var my_mc = this.createEmptyMovieClip("mc", 2);
var myBmp = (new flash.display.BitmapData(2400, stageH, true, 0));
my_mc.attachBitmap(myBmp, 0, "never", false);
var landMatrix = (new flash.geom.Matrix());
landMatrix.translate(0, stageH);
myBmp.draw(land, landMatrix, myCT);
var my_mc2 = this.createEmptyMovieClip("mc2", 3);
var myBmp2 = (new flash.display.BitmapData(2400, stageH, true, 0));
my_mc2.attachBitmap(myBmp2, 0, "never", false);
var land2Matrix = (new flash.geom.Matrix());
land2Matrix.translate(0, stageH);
myBmp2.draw(land2, land2Matrix, myCT);
_root.fire = function () {
i = 1;
while (i <= _root.missiles) {
duplicateMovieClip ("missile", "missile" + _root.missileno, 1000 + _root.missileno);
setProperty("missile" + _root.missileno, _x , random(stageW + 100) - 50);
setProperty("missile" + _root.missileno, _y , -50 - random(100));
_root.missileno++;
i++;
}
};
_root.fire2 = function () {
if (_root.ammo == 1) {
duplicateMovieClip ("2missile", "missile" + _root.missileno, 1000 + _root.missileno);
} else if (_root.ammo == 2) {
duplicateMovieClip ("3missile", "missile" + _root.missileno, 1000 + _root.missileno);
} else if (_root.ammo == 3) {
duplicateMovieClip ("4missile", "missile" + _root.missileno, 1000 + _root.missileno);
} else if (_root.ammo == 4) {
_root.toot = 0;
_root.ha = 0;
duplicateMovieClip ("5missile", "missile" + _root.missileno, 1000 + _root.missileno);
setProperty("missile" + _root.missileno, _x , _root.player._x);
setProperty("missile" + _root.missileno, _y , _root.player._y);
setProperty("missile" + _root.missileno, _rotation , _root.rotated);
_root.missileno++;
duplicateMovieClip ("6missile", "missile" + _root.missileno, 1000 + _root.missileno);
setProperty("missile" + _root.missileno, _x , _root.player._x);
setProperty("missile" + _root.missileno, _y , _root.player._y);
setProperty("missile" + _root.missileno, _rotation , _root.rotated);
_root.missileno++;
duplicateMovieClip ("7missile", "missile" + _root.missileno, 1000 + _root.missileno);
}
setProperty("missile" + _root.missileno, _x , _root.player._x);
setProperty("missile" + _root.missileno, _y , _root.player._y);
setProperty("missile" + _root.missileno, _rotation , _root.rotated);
_root.missileno++;
Set("_root.ammo" + _root.ammo, eval ("_root.ammo" + _root.ammo) - 1);
_root.shots = eval ("_root.ammo" + _root.ammo);
if (_root.shots == 0) {
c = 0;
i = 1;
while (i <= 4) {
_root.shots = eval ("_root.ammo" + i);
if (_root.shots > 0) {
c++;
}
i++;
}
if (c > 0) {
l = 1;
_root.shots = eval ("_root.ammo" + _root.ammo);
while (_root.shots == 0) {
_root.ammo = l;
_root.shots = eval ("_root.ammo" + l);
l++;
}
} else {
_root.gameo = true;
_root.cause = "Out Of Ammo";
_root.shots = 0;
_root.ammo = -5;
}
}
_root.flying = true;
};
_root.levelcomp = function () {
_root.shost = ((_root.ammo1 + _root.ammo2) + _root.ammo3) + _root.ammo4;
scor = _root.shost * (100 / _root.shoots);
if (scor > 40) {
_root.curmedal = "Gold";
_root.golds++;
_root.info.medalt.gotoAndStop(1);
} else if (scor > 25) {
_root.curmedal = "Silver";
_root.silvers++;
_root.info.medalt.gotoAndStop(2);
} else {
_root.curmedal = "Bronze";
_root.bronzes++;
_root.info.medalt.gotoAndStop(3);
}
_root.mes2 = ("You Got A " + _root.curmedal) + " Medal";
if (_root.level < 20) {
_root.mes = "You Have Completed Mission " + _root.level;
_root.info._visible = true;
_root.info.gotoAndStop(1);
} else if (_root.level == 20) {
_root.info._visible = true;
_root.info.gotoAndStop(3);
}
};
_root.gameover = function () {
_root.info._visible = true;
_root.info.gotoAndStop(2);
};
_root.nextlevel = function () {
_root.info._visible = false;
_root.gameo = false;
_root.levelo = false;
var errMatrix = (new flash.geom.Matrix());
errMatrix.scale(100, 100);
myBmp.draw(err, errMatrix, myCT, "erase");
_root.land.gotoAndPlay(_root.level);
myBmp.draw(land, landMatrix, myCT);
myBmp2.draw(err, errMatrix, myCT, "erase");
_root.land2.gotoAndPlay(_root.level);
myBmp2.draw(land2, land2Matrix, myCT);
_root.missileno = 1;
_root.power = 0;
_root.rotated = 0;
_root.moved = 0;
_root.count = 0;
_root.homey = -1000;
i = 1;
while (i <= _root.targets) {
removeMovieClip(eval (i));
removeMovieClip(eval ("l" + i));
i++;
}
i = 1;
while (i <= _root.targets) {
Set(("_root.target" + i) + "._y", -1000);
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i).gotoAndStop(1);
Set(("_root.civ" + i) + "._y", -1000);
i++;
}
if (_root.level == 1) {
_root.ammo1 = 8;
_root.ammo2 = 0;
_root.ammo3 = 0;
_root.ammo4 = 0;
_root.ammo = 1;
_root.wind = Math.ceil(100 * (Math.random() * 3)) / 100;
_root.targets = 2;
_root.civs = 1;
w = Math.sqrt(_root.wind * _root.wind);
_root.windy.win._width = 70.3333333333333 * w;
_root.windy.win._y = (-_root.windy.win._height) / 2;
if (_root.wind <= 0) {
_root.windy.win._rotation = 180;
_root.windy.win._x = -_root.windy.win._width;
} else {
_root.windy.win._rotation = 0;
_root.windy.win._x = 0;
}
} else {
_root.levela();
}
_root.shoots = ((_root.ammo1 + _root.ammo2) + _root.ammo3) + _root.ammo4;
i = 1;
while (i <= _root.targets) {
Set(("_root.target" + i) + "._x", eval (("_root.land." + i) + "._x"));
Set(("_root.target" + i) + "._y", stageH + eval (("_root.land." + i) + "._y"));
Set("_root.targeta" + i, true);
duplicateMovieClip ("_root.follow", i, 50 + i);
duplicateMovieClip ("_root.followl", "l" + i, 60 + i);
Set(("_root.l" + i) + ".nam", i);
if (CollisionDetection.checkForCollision(eval ("_root.target" + i), _root.my_mc)) {
while (CollisionDetection.checkForCollision(eval ("_root.target" + i), _root.my_mc)) {
eval ("_root.target" + i)._y = eval ("_root.target" + i)._y - 1;
}
eval ("_root.target" + i)._y = eval ("_root.target" + i)._y + 1;
} else if (CollisionDetection.checkForCollision(eval ("_root.target" + i), _root.my_mc2)) {
while (CollisionDetection.checkForCollision(eval ("_root.target" + i), _root.my_mc2)) {
eval ("_root.target" + i)._y = eval ("_root.target" + i)._y - 1;
}
eval ("_root.target" + i)._y = eval ("_root.target" + i)._y + 1;
}
i++;
}
i = 1;
while (i <= _root.civs) {
Set(("_root.civ" + i) + "._x", eval (("_root.land.c" + i) + "._x"));
Set(("_root.civ" + i) + "._y", stageH + eval (("_root.land.c" + i) + "._y"));
i++;
}
_root.targetsd = _root.targets;
_root.flying = false;
_root.follow = false;
_root.shots = eval ("_root.ammo" + _root.ammo);
};
_root.restart = function () {
_root.info._visible = false;
_root.missileno = 1;
_root.power = 0;
_root.rotated = 0;
_root.moved = 0;
_root.count = 0;
};
_root.levela();
stop();
Instance of Symbol 147 MovieClip "butts" in Frame 8
onClipEvent (load) {
if (this._name != "but") {
duplicateMovieClip (this, "but", 10112);
this._y = -1000;
}
}
Instance of Symbol 160 MovieClip "player" in Frame 8
on (keyPress "<Space>") {
if ((_root.follow == false) && (tot != 0)) {
_root.my_mc._x = _root.my_mc._x - tot;
_root.my_mc2._x = _root.my_mc2._x - tot;
_root.my_mc3._x = _root.my_mc3._x - tot;
_root.player._x = _root.player._x - tot;
_root.moved = _root.moved - tot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - tot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - tot;
i++;
}
tot = 0;
} else if (((((_root.flying == false) && (_root.info._visible == false)) && (_root.power == 0)) && ((_root.shots > 0) || (_root.shots == null))) && (_root.moved == 0)) {
_root.power = _root.power + 6;
fsong_sound.start(0, 1);
}
}
on (keyPress "s") {
if (_root.level < 20) {
_root.level++;
}
}
on (keyPress "<Left>") {
if ((((_root.follow == false) && (tot <= -5)) && (_root.power == 0)) && (_root.flying == false)) {
q = 2;
_root.my_mc._x = _root.my_mc._x + h;
_root.my_mc2._x = _root.my_mc2._x + h;
_root.my_mc3._x = _root.my_mc3._x + h;
_root.player._x = _root.player._x + h;
_root.moved = _root.moved + h;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x + h;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x + h;
i++;
}
tot = tot + h;
if (h < 15) {
h++;
}
}
}
on (keyPress "<Right>") {
if ((((_root.follow == false) && (tot >= (-_root.land._width))) && (_root.power == 0)) && (_root.flying == false)) {
q = 2;
_root.my_mc._x = _root.my_mc._x - h;
_root.my_mc2._x = _root.my_mc2._x - h;
_root.my_mc3._x = _root.my_mc3._x - h;
_root.player._x = _root.player._x - h;
_root.moved = _root.moved - h;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - h;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - h;
i++;
}
tot = tot - h;
if (h < 15) {
h++;
}
}
}
on (keyPress "1") {
if (_root.ammo1 != 0) {
_root.ammo = 1;
_root.shots = _root.ammo1;
}
}
on (keyPress "2") {
if (_root.ammo2 != 0) {
_root.ammo = 2;
_root.shots = _root.ammo2;
}
}
on (keyPress "3") {
if (_root.ammo3 != 0) {
_root.ammo = 3;
_root.shots = _root.ammo3;
}
}
on (keyPress "4") {
if (_root.ammo4 != 0) {
_root.ammo = 4;
_root.shots = _root.ammo4;
}
}
onClipEvent (load) {
h = 5;
tot = 0;
q = 0;
var fsong_sound = new Sound();
fsong_sound.attachSound("fireball");
}
onClipEvent (enterFrame) {
if (q > 0) {
q--;
} else {
h = 5;
}
if (_root.levelo != true) {
t = 0;
i = 1;
while (i <= _root.targets) {
if (eval ("_root.targeta" + i) == false) {
t++;
}
i++;
}
}
if ((eval ("_root.ammo" + _root.ammo) <= 0) && (_root.gameo == false)) {
i = 1;
while (i <= 0) {
_root.shots = eval ("_root.ammo" + i);
if (_root.shots > 0) {
_root.ammo = i;
i = 7;
}
i++;
}
}
if (((_root.ammo < 0) && (_root.flying == false)) && (_root.follow == false)) {
_root.gameo = true;
_root.cause = "Out Of Ammo";
_root.shots = 0;
}
if (t == _root.targets) {
if (_root.gameo == true) {
_root.gameo = false;
}
_root.levelo = true;
}
if ((((_root.ammo < 0) && (_root.info._visible == false)) && (_root.flying == false)) && (_root.follow == false)) {
_root.gameover();
}
if (Key.isDown(32)) {
if ((((_root.flying == false) && (_root.power != 0)) && (_root.info._visible == false)) && ((_root.shots > 0) || (_root.shots == null))) {
if (_root.power <= 100) {
_root.power = _root.power + 6;
} else {
_root.fire2();
}
}
} else if ((((_root.flying == false) && (_root.info._visible == false)) && (_root.power > 0)) && ((_root.shots > 0) || (_root.shots == null))) {
_root.fire2();
}
if (Key.isDown(38) && (_root.rotated > -80)) {
if (_root.flying == false) {
_root.rotated = _root.rotated - 4;
}
}
if (Key.isDown(40) && (_root.rotated < 80)) {
if (_root.flying == false) {
_root.rotated = _root.rotated + 4;
}
}
}
Instance of Symbol 165 MovieClip "otarget1" in Frame 8
onClipEvent (load) {
v = 0;
a = 0.2;
c = 0;
Set(("_root." + this._name) + "c", 1);
position = function () {
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
} else if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
}
};
}
onClipEvent (enterFrame) {
if (this._name == "target1") {
if ((_root.pooss == true) && (c == 0)) {
position();
c++;
} else if (c != 0) {
_root.pooss = false;
c = 0;
}
if ((this._currentframe == 1) && (eval (("_root." + this._name) + "c") > 0)) {
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
Set(("_root." + this._name) + "c", 0);
v = 0;
} else if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
Set(("_root." + this._name) + "c", 0);
v = 0;
} else {
this._y = this._y + v;
v = v + a;
}
}
}
}
Instance of Symbol 92 MovieClip "2missile" in Frame 8
onClipEvent (load) {
tot = 0;
velocity = _root.power / 4;
degang = this._rotation + 90;
radians = (degang * Math.PI) / 180;
_root.power = 0;
g = 0.981;
m = 0.5;
v = velocity * Math.cos(radians);
v = -v;
h = velocity * Math.sin(radians);
ar = 7;
re = Math.sqrt((h * h) + (v * v));
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
remove = function () {
_root.flying = false;
_root.follow = false;
_root.my_mc._x = _root.my_mc._x - tot;
_root.my_mc2._x = _root.my_mc2._x - tot;
_root.my_mc3._x = _root.my_mc3._x - tot;
_root.player._x = _root.player._x - tot;
_root.moved = _root.moved - tot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - tot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - tot;
i++;
}
removeMovieClip(this);
};
}
onClipEvent (enterFrame) {
if (this._name != "2missile") {
if (this._currentframe == 1) {
if ((_root.follow == false) && (this._x > 200)) {
_root.follow = true;
tot = 0;
}
h = h + (_root.wind / 10);
v = v + g;
this._x = this._x + h;
this._y = this._y + v;
re = Math.sqrt((h * h) + (v * v));
if (this._y > _root.stageH) {
remove();
}
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
if (_root.follow == true) {
h2 = Math.round(h * 10) / 10;
h3 = h;
h = h2;
_root.my_mc._x = _root.my_mc._x - h;
_root.my_mc2._x = _root.my_mc2._x - h;
_root.my_mc3._x = _root.my_mc3._x - h;
_root.player._x = _root.player._x - h;
_root.moved = _root.moved - h;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - h;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - h;
i++;
}
this._x = this._x - h;
tot = tot - h;
h = h3;
}
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
i = 1;
while (i <= _root.targets) {
if (this.hitTest(eval ("_root.target" + i)) && (eval (("_root.target" + i) + "._currentframe") == 1)) {
while (this.hitTest(eval ("_root.target" + i))) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
eval ("_root.target" + i).gotoAndPlay(2);
this.gotoAndPlay(2);
Set("_root.targeta" + i, false);
_root.targetsd = _root.targetsd - 1;
}
i++;
}
}
}
}
Instance of Symbol 165 MovieClip "otarget2" in Frame 8
onClipEvent (load) {
v = 0;
a = 0.2;
c = 0;
Set(("_root." + this._name) + "c", 1);
position = function () {
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
} else if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
}
};
}
onClipEvent (enterFrame) {
if (this._name == "target2") {
if ((_root.pooss == true) && (c == 0)) {
position();
c++;
} else if (c != 0) {
_root.pooss = false;
c = 0;
}
if ((this._currentframe == 1) && (eval (("_root." + this._name) + "c") > 0)) {
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
Set(("_root." + this._name) + "c", 0);
v = 0;
} else if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
Set(("_root." + this._name) + "c", 0);
v = 0;
} else {
this._y = this._y + v;
v = v + a;
}
}
}
}
Instance of Symbol 180 MovieClip in Frame 8
onClipEvent (load) {
if (this._name != "weap") {
duplicateMovieClip (this, "weap", 10000);
this._y = -1000;
}
}
Instance of Symbol 226 MovieClip "linfo" in Frame 8
onClipEvent (load) {
if (this._name != "info") {
duplicateMovieClip (this, "info", 12000);
this._y = -500;
} else {
this._visible = false;
}
}
Instance of Symbol 98 MovieClip "3missile" in Frame 8
onClipEvent (load) {
tot = 0;
fuel = 100;
velocity = _root.power / 4;
degang = this._rotation + 90;
radians = (degang * Math.PI) / 180;
_root.power = 0;
g = 0;
m = 0.5;
f = 0;
v = velocity * Math.cos(radians);
v = -v;
h = velocity * Math.sin(radians);
ar = 7;
hmove = 0;
vmove = 0;
re = Math.sqrt((h * h) + (v * v));
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
remove = function () {
_root.flying = false;
_root.follow = false;
_root.my_mc._x = _root.my_mc._x - tot;
_root.my_mc2._x = _root.my_mc2._x - tot;
_root.my_mc3._x = _root.my_mc3._x - tot;
_root.player._x = _root.player._x - tot;
_root.moved = _root.moved - tot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - tot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - tot;
i++;
}
removeMovieClip(this);
};
}
onClipEvent (enterFrame) {
if (this._name != "3missile") {
if (this._currentframe == 1) {
fuel = fuel - 0.4;
f = f + 0.5;
if ((_root.follow == false) && (this._x > 200)) {
_root.follow = true;
tot = 0;
}
dx = _root.homex - ((this._x - (this._width / 2)) - _root.moved);
dy = _root.homey - (this._y - (this._height / 2));
a = Math.atan2(dx, dy);
b = Math.atan2(h, v);
velo = Math.sqrt((h * h) + (v * v));
if (f > 15) {
cheng = b - a;
p = 0;
if (cheng > Math.PI) {
cheng = (Math.PI*2) - cheng;
p = 1;
}
if (cheng < -3.14159265358979) {
cheng = (Math.PI*2) + cheng;
p = 1;
}
chenge = cheng * (f / 90);
if (p == 1) {
newag = b + chenge;
} else {
newag = b - chenge;
}
h = velo * Math.sin(newag);
v = velo * Math.cos(newag);
} else {
h = h + ((_root.wind / 10) + hmove);
v = v + (g + vmove);
}
if ((((dx < 15) && (dy < 15)) && (dx > -15)) && (dy > -15)) {
this.gotoAndPlay(2);
}
if (fuel <= 0) {
v = v - vmove;
}
if (h > 20) {
h = 20;
}
if (v > 20) {
v = 20;
}
this._x = this._x + h;
this._y = this._y + v;
re = Math.sqrt((h * h) + (v * v));
if (this._y > _root.stageH) {
remove();
}
if ((v == null) || (h == null)) {
remove();
}
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
if (_root.follow == true) {
h2 = Math.round(h * 10) / 10;
h3 = h;
h = h2;
_root.my_mc._x = _root.my_mc._x - h;
_root.my_mc2._x = _root.my_mc2._x - h;
_root.my_mc3._x = _root.my_mc3._x - h;
_root.player._x = _root.player._x - h;
_root.moved = _root.moved - h;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - h;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - h;
i++;
}
this._x = this._x - h;
tot = tot - h;
h = h3;
}
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
i = 1;
while (i <= _root.targets) {
if (this.hitTest(eval ("_root.target" + i)) && (eval (("_root.target" + i) + "._currentframe") == 1)) {
while (this.hitTest(eval ("_root.target" + i))) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
eval ("_root.target" + i).gotoAndPlay(2);
this.gotoAndPlay(2);
Set("_root.targeta" + i, false);
_root.targetsd = _root.targetsd - 1;
}
i++;
}
}
}
}
Instance of Symbol 232 MovieClip "posit2" in Frame 8
onClipEvent (load) {
if (this._name != "posit") {
duplicateMovieClip (this, "posit", 10001);
this._y = -1000;
}
}
onClipEvent (enterFrame) {
if (this._name == "posit") {
if (_root.ammo == 2) {
this._x = _root._xmouse;
this._y = _root._ymouse;
} else {
this._x = -200;
}
}
}
on (release) {
if (_root.ammo == 2) {
if (_root.flying == false) {
this.gotoAndPlay(2);
_root.homex = _root._xmouse - _root.moved;
_root.homey = _root._ymouse;
}
}
}
Instance of Symbol 234 MovieClip "currpos2" in Frame 8
onClipEvent (load) {
if (this._name != "currpos") {
duplicateMovieClip (this, "currpos", 10002);
this._y = -1000;
}
c = 0;
}
onClipEvent (enterFrame) {
if ((_root.follow == false) && (_root.flying == false)) {
c = 0;
if (_root.ammo != 2) {
_root.homex = null;
}
}
if (_root.ammo == 2) {
c = 1;
}
if ((this._name == "currpos") && (c == 1)) {
this._x = _root.homex + _root.moved;
this._y = _root.homey;
} else {
this._x = 1000;
}
}
Instance of Symbol 237 MovieClip "arror" in Frame 8
onClipEvent (load) {
if (this._name != "arror") {
duplicateMovieClip (this, "arror", 10104);
this._y = -1000;
} else {
this._y = 0;
this._visible = false;
}
}
onClipEvent (enterFrame) {
if ((eval ("_root.missile" + (_root.missileno - 1))._y <= -10) && (eval ("_root.missile" + (_root.missileno - 1))._currentframe == 1)) {
this._visible = true;
this._x = eval ("_root.missile" + (_root.missileno - 1))._x;
distance = Math.ceil(-eval ("_root.missile" + (_root.missileno - 1))._y);
} else {
this._visible = false;
}
}
Instance of Symbol 240 MovieClip "follow" in Frame 8
onClipEvent (load) {
this._visible = false;
this._x = _root.stageW - 15;
}
onClipEvent (enterFrame) {
if ((eval ("_root.target" + this._name)._x >= (_root.stageW - 10)) && (eval ("_root.target" + this._name)._currentframe == 1)) {
this._visible = true;
this._y = eval ("_root.target" + this._name)._y;
distance = Math.ceil(eval ("_root.target" + this._name)._x - this._x);
} else {
distance = 0;
this._visible = false;
}
}
Instance of Symbol 245 MovieClip "wi" in Frame 8
onClipEvent (load) {
if (this._name != "windy") {
duplicateMovieClip (this, "windy", 10103);
this._y = -1000;
}
}
Instance of Symbol 95 MovieClip "4missile" in Frame 8
onClipEvent (load) {
tot = 0;
velocity = _root.power / 4;
degang = this._rotation + 90;
radians = (degang * Math.PI) / 180;
_root.power = 0;
g = 0.4;
m = 0.5;
v = velocity * Math.cos(radians);
v = -v;
h = velocity * Math.sin(radians);
ar = 7;
re = Math.sqrt((h * h) + (v * v));
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
remove = function () {
_root.flying = false;
_root.follow = false;
_root.my_mc._x = _root.my_mc._x - tot;
_root.my_mc2._x = _root.my_mc2._x - tot;
_root.my_mc3._x = _root.my_mc3._x - tot;
_root.player._x = _root.player._x - tot;
_root.moved = _root.moved - tot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - tot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - tot;
i++;
}
removeMovieClip(this);
};
chan = 1;
}
onClipEvent (enterFrame) {
if (this._name != "4missile") {
if (this._currentframe == 1) {
if (Key.isDown(37)) {
h = h - chan;
}
if (Key.isDown(39)) {
h = h + chan;
}
if (Key.isDown(40)) {
v = v + chan;
}
if (Key.isDown(38)) {
v = v - chan;
}
if ((_root.follow == false) && (this._x > 200)) {
_root.follow = true;
tot = 0;
}
h = h + (_root.wind / 10);
v = v + g;
if (v > 12) {
v = 12;
} else if (v < -12) {
v = -12;
}
if (h > 12) {
h = 12;
} else if (h < -12) {
h = -12;
}
this._x = this._x + h;
this._y = this._y + v;
re = Math.sqrt((h * h) + (v * v));
if (this._y > _root.stageH) {
remove();
}
if (this._x < 0) {
remove();
}
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
if (_root.follow == true) {
h2 = Math.round(h * 10) / 10;
h3 = h;
h = h2;
_root.my_mc._x = _root.my_mc._x - h;
_root.my_mc2._x = _root.my_mc2._x - h;
_root.my_mc3._x = _root.my_mc3._x - h;
_root.player._x = _root.player._x - h;
_root.moved = _root.moved - h;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - h;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - h;
i++;
}
this._x = this._x - h;
tot = tot - h;
h = h3;
}
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
i = 1;
while (i <= _root.targets) {
if (this.hitTest(eval ("_root.target" + i)) && (eval (("_root.target" + i) + "._currentframe") == 1)) {
while (this.hitTest(eval ("_root.target" + i))) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
eval ("_root.target" + i).gotoAndPlay(2);
this.gotoAndPlay(2);
Set("_root.targeta" + i, false);
_root.targetsd = _root.targetsd - 1;
}
i++;
}
}
}
}
Instance of Symbol 165 MovieClip "otarget3" in Frame 8
onClipEvent (load) {
v = 0;
a = 0.2;
c = 0;
Set(("_root." + this._name) + "c", 1);
position = function () {
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
} else if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
}
};
}
onClipEvent (enterFrame) {
if (this._name == "target3") {
if ((_root.pooss == true) && (c == 0)) {
position();
c++;
} else if (c != 0) {
_root.pooss = false;
c = 0;
}
if ((this._currentframe == 1) && (eval (("_root." + this._name) + "c") > 0)) {
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
Set(("_root." + this._name) + "c", 0);
v = 0;
} else if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._y = this._y - 1;
}
this._y = this._y + 1;
Set(("_root." + this._name) + "c", 0);
v = 0;
} else {
this._y = this._y + v;
v = v + a;
}
}
}
}
Instance of Symbol 248 MovieClip "followl" in Frame 8
onClipEvent (load) {
this._visible = false;
this._x = 10;
}
onClipEvent (enterFrame) {
if (eval ("_root.target" + this.nam)._x <= -10) {
this._visible = true;
this._y = eval ("_root.target" + this.nam)._y;
distance = -Math.ceil(eval ("_root.target" + this.nam)._x - this._x);
} else {
distance = 0;
this._visible = false;
}
}
Instance of Symbol 101 MovieClip "5missile" in Frame 8
onClipEvent (load) {
tot = 0;
velocity = _root.power / 4;
degang = this._rotation + 90;
radians = (degang * Math.PI) / 180;
_root.clust++;
if (_root.clust == 3) {
_root.power = 0;
_root.clust = 0;
}
g = 0.981;
m = 0.5;
v = velocity * Math.cos(radians);
v = -v;
h = velocity * Math.sin(radians);
ar = 7;
re = Math.sqrt((h * h) + (v * v));
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
remove = function () {
_root.clust2++;
if (_root.clust2 == 3) {
_root.clust2 = 0;
_root.flying = false;
_root.follow = false;
_root.my_mc._x = _root.my_mc._x - _root.toot;
_root.my_mc2._x = _root.my_mc2._x - _root.toot;
_root.my_mc3._x = _root.my_mc3._x - _root.toot;
_root.player._x = _root.player._x - _root.toot;
_root.moved = _root.moved - _root.toot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - _root.toot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - _root.toot;
i++;
}
}
removeMovieClip(this);
};
}
onClipEvent (enterFrame) {
if (this._name != "5missile") {
if (this._currentframe == 1) {
h = h + (_root.wind / 10);
v1 = v;
v = v + g;
v2 = v;
if ((v1 <= 0) && (v2 > 0)) {
h = h + 2;
v = v + 1;
}
this._x = this._x + h;
this._y = this._y + v;
re = Math.sqrt((h * h) + (v * v));
if (this._y > _root.stageH) {
remove();
}
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
if (_root.follow == true) {
this._x = this._x - _root.ha;
}
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
i = 1;
while (i <= _root.targets) {
if (this.hitTest(eval ("_root.target" + i)) && (eval (("_root.target" + i) + "._currentframe") <= 15)) {
while (this.hitTest(eval ("_root.target" + i))) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
eval ("_root.target" + i).gotoAndPlay(2);
this.gotoAndPlay(2);
Set("_root.targeta" + i, false);
_root.targetsd = _root.targetsd - 1;
}
i++;
}
}
}
}
Instance of Symbol 101 MovieClip "7missile" in Frame 8
onClipEvent (load) {
tot = 0;
velocity = _root.power / 4;
degang = this._rotation + 90;
radians = (degang * Math.PI) / 180;
_root.clust++;
if (_root.clust == 3) {
_root.power = 0;
_root.clust = 0;
}
g = 0.981;
m = 0.5;
v = velocity * Math.cos(radians);
v = -v;
h = velocity * Math.sin(radians);
ar = 7;
re = Math.sqrt((h * h) + (v * v));
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
remove = function () {
_root.clust2++;
if (_root.clust2 == 3) {
_root.clust2 = 0;
_root.flying = false;
_root.follow = false;
_root.my_mc._x = _root.my_mc._x - _root.toot;
_root.my_mc2._x = _root.my_mc2._x - _root.toot;
_root.my_mc3._x = _root.my_mc3._x - _root.toot;
_root.player._x = _root.player._x - _root.toot;
_root.moved = _root.moved - _root.toot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - _root.toot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - _root.toot;
i++;
}
}
removeMovieClip(this);
};
}
onClipEvent (enterFrame) {
if (this._name != "7missile") {
if (this._currentframe == 1) {
if ((_root.follow == false) && (this._x > 200)) {
_root.follow = true;
tot = 0;
}
h = h + (_root.wind / 10);
_root.ha = h;
v = v + g;
this._x = this._x + h;
this._y = this._y + v;
re = Math.sqrt((h * h) + (v * v));
if (this._y > _root.stageH) {
remove();
}
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
if (_root.follow == true) {
h2 = Math.round(h * 10) / 10;
h3 = h;
h = h2;
_root.my_mc._x = _root.my_mc._x - h;
_root.my_mc2._x = _root.my_mc2._x - h;
_root.my_mc3._x = _root.my_mc3._x - h;
_root.player._x = _root.player._x - h;
_root.moved = _root.moved - h;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - h;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - h;
i++;
}
this._x = this._x - _root.ha;
tot = tot - h;
h = h3;
_root.toot = tot;
}
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
i = 1;
while (i <= _root.targets) {
if (this.hitTest(eval ("_root.target" + i)) && (eval (("_root.target" + i) + "._currentframe") <= 15)) {
while (this.hitTest(eval ("_root.target" + i))) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
eval ("_root.target" + i).gotoAndPlay(2);
this.gotoAndPlay(2);
Set("_root.targeta" + i, false);
_root.targetsd = _root.targetsd - 1;
}
i++;
}
}
}
}
Instance of Symbol 101 MovieClip "6missile" in Frame 8
onClipEvent (load) {
tot = 0;
c = 0;
velocity = _root.power / 4;
degang = this._rotation + 90;
radians = (degang * Math.PI) / 180;
_root.clust++;
if (_root.clust == 3) {
_root.power = 0;
_root.clust = 0;
}
g = 0.981;
m = 0.5;
v = velocity * Math.cos(radians);
v = -v;
h = velocity * Math.sin(radians);
ar = 7;
re = Math.sqrt((h * h) + (v * v));
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
remove = function () {
_root.clust2++;
if (_root.clust2 == 3) {
_root.clust2 = 0;
_root.flying = false;
_root.follow = false;
_root.my_mc._x = _root.my_mc._x - _root.toot;
_root.my_mc2._x = _root.my_mc2._x - _root.toot;
_root.my_mc3._x = _root.my_mc3._x - _root.toot;
_root.player._x = _root.player._x - _root.toot;
_root.moved = _root.moved - _root.toot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - _root.toot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - _root.toot;
i++;
}
}
removeMovieClip(this);
};
}
onClipEvent (enterFrame) {
if (this._name != "6missile") {
if (this._currentframe == 1) {
h = h + (_root.wind / 10);
v1 = v;
v = v + g;
v2 = v;
if (((v1 <= 0) && (v2 > 0)) && (c == 0)) {
h = h - 2;
v = v - 1;
c = 1;
}
this._x = this._x + h;
this._y = this._y + v;
re = Math.sqrt((h * h) + (v * v));
if (this._y > _root.stageH) {
remove();
}
ang = (180 * Math.acos(v / re)) / Math.PI;
if (h > 0) {
this._rotation = -ang;
} else {
this._rotation = ang;
}
if (_root.follow == true) {
this._x = this._x - _root.ha;
}
if (CollisionDetection.checkForCollision(this, _root.my_mc)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
if (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
while (CollisionDetection.checkForCollision(this, _root.my_mc2)) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
this.gotoAndPlay(2);
}
i = 1;
while (i <= _root.targets) {
if (this.hitTest(eval ("_root.target" + i)) && (eval (("_root.target" + i) + "._currentframe") <= 15)) {
while (this.hitTest(eval ("_root.target" + i))) {
this._x = this._x - (h / 10);
this._y = this._y - (v / 10);
}
this._x = this._x + (h / 10);
this._y = this._y + (v / 10);
eval ("_root.target" + i).gotoAndPlay(2);
this.gotoAndPlay(2);
Set("_root.targeta" + i, false);
_root.targetsd = _root.targetsd - 1;
}
i++;
}
}
}
}
Instance of Symbol 250 MovieClip "muteeed" in Frame 8
onClipEvent (load) {
if (this._name != "muteed") {
duplicateMovieClip (this, "muteed", 10115);
this._y = -1000;
} else {
this._visible = false;
}
}
Symbol 11 MovieClip Frame 1
ang = random(360);
siz = random(70);
_rotation = ang;
_yscale = (10 + siz);
_xscale = _yscale;
Symbol 11 MovieClip Frame 6
tot = eval (("_root.missile" + (_root.missileno - 1)) + ".tot");
namm = eval ((("_root." + _parent._name) + ".") + this._name);
i = 1;
while (i <= _root.civs) {
if (this.hitTest(eval ("_root.civ" + i))) {
eval ("_root.civ" + i).gotoAndPlay(2);
_root.gameo = true;
_root.cause = "You Hit A Civilian";
}
i++;
}
_root.remove(namm, _parent._rotation + this._rotation, _parent._x, _parent._y);
Symbol 11 MovieClip Frame 21
stop();
Symbol 12 MovieClip [expl] Frame 1
var explos = new Sound();
explos.attachSound("explode2");
explos.start(0, 1);
Symbol 12 MovieClip [expl] Frame 45
_root.count = 0;
removeMovieClip(this);
Symbol 17 MovieClip Frame 1
ang = random(360);
siz = 8 + (random(100) * 7);
_rotation = ang;
_yscale = (10 + siz);
_xscale = _yscale;
Symbol 17 MovieClip Frame 6
tot = eval (("_root.missile" + (_root.missileno - 1)) + ".tot");
namm = eval ((("_root." + _parent._name) + ".") + this._name);
_root.remove(namm, 0, _parent._x, _parent._y, 1);
Symbol 17 MovieClip Frame 21
stop();
Symbol 18 MovieClip Frame 1
stop();
Symbol 18 MovieClip Frame 2
var songss_sound = new Sound();
songss_sound.attachSound("scream");
songss_sound.start(0, 1);
Symbol 18 MovieClip Frame 36
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 2
stop();
Symbol 45 MovieClip Frame 3
stop();
Symbol 45 MovieClip Frame 4
stop();
Symbol 45 MovieClip Frame 5
stop();
Symbol 45 MovieClip Frame 6
stop();
Symbol 45 MovieClip Frame 7
stop();
Symbol 45 MovieClip Frame 8
stop();
Symbol 45 MovieClip Frame 9
stop();
Symbol 45 MovieClip Frame 10
stop();
Symbol 45 MovieClip Frame 11
stop();
Symbol 45 MovieClip Frame 12
stop();
Symbol 45 MovieClip Frame 13
stop();
Symbol 45 MovieClip Frame 14
stop();
Symbol 45 MovieClip Frame 15
stop();
Symbol 45 MovieClip Frame 16
stop();
Symbol 45 MovieClip Frame 17
stop();
Symbol 45 MovieClip Frame 18
stop();
Symbol 45 MovieClip Frame 19
stop();
Symbol 45 MovieClip Frame 20
stop();
Symbol 46 MovieClip [Land] Frame 1
stop();
Symbol 46 MovieClip [Land] Frame 2
stop();
Symbol 46 MovieClip [Land] Frame 3
stop();
Symbol 46 MovieClip [Land] Frame 4
stop();
Symbol 46 MovieClip [Land] Frame 5
stop();
Symbol 46 MovieClip [Land] Frame 6
stop();
Symbol 46 MovieClip [Land] Frame 7
stop();
Symbol 46 MovieClip [Land] Frame 8
stop();
Symbol 46 MovieClip [Land] Frame 9
stop();
Symbol 46 MovieClip [Land] Frame 10
stop();
Symbol 46 MovieClip [Land] Frame 11
stop();
Symbol 46 MovieClip [Land] Frame 12
stop();
Symbol 46 MovieClip [Land] Frame 13
stop();
Symbol 46 MovieClip [Land] Frame 14
stop();
Symbol 46 MovieClip [Land] Frame 15
stop();
Symbol 46 MovieClip [Land] Frame 16
stop();
Symbol 252 MovieClip [__Packages.CollisionDetection] Frame 0
class CollisionDetection
{
function CollisionDetection () {
}
static function checkForCollision(p_clip1, p_clip2, p_alphaTolerance, p_scope) {
if (p_alphaTolerance == undefined) {
p_alphaTolerance = 255;
}
if (p_scope == undefined) {
p_scope = _root;
}
var _local4 = p_clip1.getBounds(p_scope);
var _local3 = p_clip2.getBounds(p_scope);
if (((_local4.xMax < _local3.xMin) || (_local3.xMax < _local4.xMin)) || ((_local4.yMax < _local3.yMin) || (_local3.yMax < _local4.yMin))) {
return(null);
}
var _local2 = {};
_local2.xMin = Math.max(_local4.xMin, _local3.xMin);
_local2.xMax = Math.min(_local4.xMax, _local3.xMax);
_local2.yMin = Math.max(_local4.yMin, _local3.yMin);
_local2.yMax = Math.min(_local4.yMax, _local3.yMax);
var _local9 = new flash.display.BitmapData(_local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin, false);
var _local5 = p_clip1.transform.matrix;
_local5.tx = p_clip1._x - _local2.xMin;
_local5.ty = p_clip1._y - _local2.yMin;
_local9.draw(p_clip1, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance));
_local5 = p_clip2.transform.matrix;
_local5.tx = p_clip2._x - _local2.xMin;
_local5.ty = p_clip2._y - _local2.yMin;
_local9.draw(p_clip2, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance), "difference");
var _local6 = _local9.getColorBoundsRect(4294967295, 4278255615);
if (_local6.width == 0) {
return(null);
}
_local6.x = _local6.x + _local2.xMin;
_local6.y = _local6.y + _local2.yMin;
return(_local6);
}
}
Symbol 61 Button
on (release) {
song_sound.start(0, 1);
gotoAndPlay (4);
}
Symbol 69 Button
on (release) {
song_sound.start(0, 1);
gotoAndPlay (7);
}
Symbol 74 Button
on (release) {
song_sound.start(0, 1);
gotoAndPlay (5);
}
Symbol 79 Button
on (release) {
song_sound.start(0, 1);
gotoAndPlay (6);
}
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 2
_root.flying = false;
_root.attachMovie("expl", "expl" + _root.count, 5000 + _root.count);
var oint = {x:this.point._x, y:this.point._y};
this.localToGlobal(oint);
_root["expl" + _root.count]._x = oint.x;
_root["expl" + _root.count]._y = oint.y;
_root.count = _root.count + 1;
Symbol 92 MovieClip Frame 21
_root.my_mc._x = _root.my_mc._x - this.tot;
_root.my_mc2._x = _root.my_mc2._x - this.tot;
_root.my_mc3._x = _root.my_mc3._x - this.tot;
_root.player._x = _root.player._x - this.tot;
_root.moved = _root.moved - this.tot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - tot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - tot;
i++;
}
_root.follow = false;
if (_root.levelo == true) {
_root.levelcomp();
c = 1;
} else if (_root.gameo == true) {
_root.gameover();
}
_root.gameo = false;
removeMovieClip(this);
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 2
_root.flying = false;
_root.attachMovie("expl", "expl" + _root.count, 5000 + _root.count);
var oint = {x:this.point._x, y:this.point._y};
this.localToGlobal(oint);
_root["expl" + _root.count]._x = oint.x;
_root["expl" + _root.count]._y = oint.y;
_root.count = _root.count + 1;
Symbol 95 MovieClip Frame 20
_root.my_mc._x = _root.my_mc._x - this.tot;
_root.my_mc2._x = _root.my_mc2._x - this.tot;
_root.my_mc3._x = _root.my_mc3._x - this.tot;
_root.player._x = _root.player._x - this.tot;
_root.moved = _root.moved - this.tot;
_root.follow = false;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - tot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - tot;
i++;
}
if (_root.levelo == true) {
_root.levelcomp();
c = 1;
} else if (_root.gameo == true) {
_root.gameover();
}
_root.gameo = false;
removeMovieClip(this);
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 2
_root.flying = false;
_root.attachMovie("expl", "expl" + _root.count, 5000 + _root.count);
var oint = {x:this.point._x, y:this.point._y};
this.localToGlobal(oint);
_root["expl" + _root.count]._x = oint.x;
_root["expl" + _root.count]._y = oint.y;
_root.count = _root.count + 1;
Symbol 98 MovieClip Frame 20
_root.my_mc._x = _root.my_mc._x - this.tot;
_root.my_mc2._x = _root.my_mc2._x - this.tot;
_root.my_mc3._x = _root.my_mc3._x - this.tot;
_root.player._x = _root.player._x - this.tot;
_root.moved = _root.moved - this.tot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - tot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - tot;
i++;
}
_root.follow = false;
if (_root.ammo2 == 0) {
_root.homex = null;
}
if (_root.levelo == true) {
_root.levelcomp();
c = 1;
} else if (_root.gameo == true) {
_root.gameover();
}
_root.gameo = false;
removeMovieClip(this);
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
_root.flying = false;
_root.attachMovie("expl", "expl" + _root.count, 5000 + _root.count);
var oint = {x:this.point._x, y:this.point._y};
this.localToGlobal(oint);
_root["expl" + _root.count]._x = oint.x;
_root["expl" + _root.count]._y = oint.y;
_root.count = _root.count + 1;
Symbol 101 MovieClip Frame 21
_root.clust2++;
if (_root.clust2 == 3) {
_root.clust2 = 0;
_root.my_mc._x = _root.my_mc._x - _root.toot;
_root.my_mc2._x = _root.my_mc2._x - _root.toot;
_root.my_mc3._x = _root.my_mc3._x - _root.toot;
_root.player._x = _root.player._x - _root.toot;
_root.moved = _root.moved - _root.toot;
i = 1;
while (i <= _root.targets) {
eval ("_root.target" + i)._x = eval ("_root.target" + i)._x - _root.toot;
i++;
}
i = 1;
while (i <= _root.civs) {
eval ("_root.civ" + i)._x = eval ("_root.civ" + i)._x - _root.toot;
i++;
}
_root.follow = false;
if (_root.levelo == true) {
_root.levelcomp();
c = 1;
} else if (_root.gameo == true) {
_root.gameover();
}
_root.gameo = false;
}
removeMovieClip(this);
Symbol 118 Button
on (release) {
song_sound.start(0, 1);
gotoAndPlay (4);
}
Symbol 129 Button
on (release) {
song_sound.start(0, 1);
gotoAndPlay (8);
}
Symbol 136 Button
on (release) {
song_sound.start(0, 1);
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
} else if (_root._quality == "HIGH") {
_root._quality = "BEST";
} else if (_root._quality == "BEST") {
_root._quality = "LOW";
}
}
Symbol 141 Button
on (release) {
if (_root.tracks > _root.trac) {
_root.trac++;
} else {
_root.trac = 1;
}
if (_root.trac == 2) {
song_sound22.setVolume(100);
song_sound22.attachSound("track2");
} else if (_root.trac == 3) {
song_sound22.attachSound("track3");
} else if (_root.trac == 1) {
song_sound22.attachSound("track1");
song_sound22.setVolume(100);
}
song_sound22.stop();
if (_root.mute == false) {
song_sound22.start(0, 9999);
}
}
Symbol 146 Button
on (release) {
if (_root.mute == true) {
_root.mute = false;
song_sound22.start(0, 9999);
_root.muteed._visible = false;
} else {
_root.mute = true;
song_sound22.stop();
_root.muteed._visible = true;
}
}
Symbol 147 MovieClip Frame 1
var song_sound22 = new Sound();
song_sound22.attachSound("track2");
song_sound22.setVolume(100);
song_sound22.start(0, 9999);
Instance of Symbol 155 MovieClip in Symbol 156 MovieClip Frame 1
onClipEvent (load) {
ow = this._width;
oh = this._height;
}
onClipEvent (enterFrame) {
this._width = ow * (_root.power / 100);
this._height = oh * (_root.power / 100);
}
Instance of Symbol 156 MovieClip "fire" in Symbol 160 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = _root.rotated;
}
Symbol 165 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 2
var songsd_sound = new Sound();
songsd_sound.attachSound("targy");
songsd_sound.start(0, 1);
Symbol 165 MovieClip Frame 20
this._y = 1000;
Instance of Symbol 169 MovieClip in Symbol 180 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = -0.5 + ((_root.ammo - 1) * 77.9);
}
Instance of Symbol 179 MovieClip in Symbol 180 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ammo4 == 0) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 179 MovieClip in Symbol 180 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ammo3 == 0) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 179 MovieClip in Symbol 180 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ammo2 == 0) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 179 MovieClip in Symbol 180 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ammo1 == 0) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 189 Button
on (release) {
song_sound.start(0, 1);
_root.level++;
_root.nextlevel();
}
Symbol 193 Button
on (release) {
song_sound.start(0, 1);
_root.cause = "";
_root.nextlevel();
if (_root.curmedal == "Bronze") {
_root.bronzes--;
} else if (_root.curmedal == "Silver") {
_root.silvers--;
} else if (_root.curmedal == "Gold") {
_root.golds--;
}
}
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 2
stop();
Symbol 203 MovieClip Frame 3
stop();
Symbol 208 Button
on (release) {
song_sound.start(0, 1);
_root.cause = "";
_root.nextlevel();
}
Symbol 225 Button
on (release) {
song_sound.start(0, 1);
gotoAndPlay (1);
}
Symbol 226 MovieClip Frame 1
stop();
Instance of Symbol 203 MovieClip "medalt" in Symbol 226 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.info._visible == true) {
if (_root.curmedal == "Gold") {
this.gotoAndStop(1);
} else if (_root.curmedal == "Silver") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
}
}
Symbol 226 MovieClip Frame 2
stop();
Symbol 226 MovieClip Frame 3
scooor = ((_root.golds * 3) + (_root.silvers * 2)) + _root.bronzes;
if (scooor < 25) {
_root.rank = "Private";
} else if (scooor < 30) {
_root.rank = "Corporal";
} else if (scooor < 35) {
_root.rank = "Sergeant";
} else if (scooor < 40) {
_root.rank = "Sergeant Major";
} else if (scooor < 45) {
_root.rank = "Lieutenant";
} else if (scooor < 50) {
_root.rank = "Captain";
} else if (scooor < 55) {
_root.rank = "Major";
} else if (scooor < 60) {
_root.rank = "Colonel";
}
stop();
Symbol 232 MovieClip Frame 1
Instance of Symbol 229 MovieClip in Symbol 232 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.homex < 0) || (_root.homex == null)) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 234 MovieClip Frame 1