Frame 1
btn_vapgames.onPress = function () {
getURL ("http://vap.mirgames.ru", "_blank");
};
stop();
onEnterFrame = function () {
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
percent = Math.round((loaded / total) * 100);
if (percent <= 0) {
percent = 0;
}
if (percent >= 100) {
nextFrame();
onEnterFrame = 0;
}
loading_bar.gotoAndStop(percent);
};
Frame 2
function get_id() {
id = id + 1;
if (id > 128) {
id = 0;
}
return(id);
}
function get_eye_pos(obj, point) {
p.x = obj._x;
p.y = obj._y;
p = obj._parent.transform.matrix.transformPoint(p);
p.x = p.x + sviborg._x;
p.y = p.y + sviborg._y;
point.x = p.x;
point.y = p.y;
}
function limit(x, low, hi) {
if (x < low) {
x = low;
} else if (x > hi) {
x = hi;
}
return(x);
}
function line(x1, y1, x2, y2, c, w, a) {
drawing.lineStyle(w, c, a);
drawing.moveTo(x1, y1);
drawing.lineTo(x2, y2);
}
function decal(x, y, a, n) {
if (x > 700) {
return(undefined);
}
m.identity();
m.rotate(a);
m.translate(x, y - 326);
dec.gotoAndStop(n);
bmp.draw(dec, m);
}
function decal_mc(mc) {
if (mc._x > 700) {
return(undefined);
}
m.identity();
m.scale(mc._xscale * 0.01, mc._yscale * 0.01);
m.rotate(mc._rotation);
m.translate(mc._x, mc._y - 326);
bmp.draw(mc, m);
}
function DistPoint(x1, y1, x2, y2) {
dx = x2 - x1;
dy = y2 - y1;
return(Math.sqrt((dx * dx) + (dy * dy)));
}
function DistLine(x1, y1, x2, y2, x, y) {
a = y1 - y2;
b = x2 - x1;
c = (x1 * y2) - (x2 * y1);
return(((a * x) + (b * y)) + c);
}
function direct(x, y) {
dx = x - sviborg._x;
dy = y - sviborg._y;
if (dx > 0) {
a = Math.atan2(dy, dx);
} else {
a = -Math.atan2(dy, -dx);
}
a = Math.atan2(dy, dx);
return((a * radtodeg) + 180);
}
function CollBeams(x, y, r) {
if (!shooting) {
return(false);
}
dn = DistLine(beam.x, beam.y, mpos.x, mpos.y, x, y) / beam_l;
if (Math.abs(dn) > r) {
return(false);
}
dl = -DistLine(beam.x, beam.y, beam.x + normal.x, beam.y + normal.y, x, y);
if (dl < (-r)) {
return(false);
}
if (dl > (beam_l + r)) {
return(false);
}
return(true);
}
function CollSviborg(x, y, r) {
if (DistPoint(x, y, sviborg._x, sviborg._y) < (r + 64)) {
return(true);
}
return(false);
}
function GetDamage(x, y, r) {
if (explosion.age == 1) {
if (DistPoint(x, y, explosion.x, explosion.y) < (r + explosion.r)) {
return(explosion.dmg);
}
}
if (!shooting) {
return(0);
}
if (((x + r) < beam.x) && ((x + r) < mpos.x)) {
return(0);
}
if (((x - r) > beam.x) && ((x - r) > mpos.x)) {
return(0);
}
if (((y + r) < beam.y) && ((y + r) < mpos.y)) {
return(0);
}
if (((y - r) > beam.y) && ((y - r) > mpos.y)) {
return(0);
}
dn = DistLine(beam.x, beam.y, mpos.x, mpos.y, x, y) / beam_l;
if (Math.abs(dn) > r) {
return(0);
}
dl = -DistLine(beam.x, beam.y, beam.x + normal.x, beam.y + normal.y, x, y);
if (dl < (-r)) {
return(0);
}
if (dl > (beam_l + r)) {
return(0);
}
return(beam_damage);
}
function DamageSviborg(dmg, x, y) {
sviborg_life = sviborg_life - dmg;
i = 0;
while (i < 5) {
objects.push(new BloodDrop(x, y, random(20) - 10, -random(10)));
i++;
}
lifebar.gotoAndStop(sviborg_life);
}
function process_sviborg() {
dx = _xmouse - sviborg._x;
dy = _ymouse - sviborg._y;
if (dx > 0) {
a = Math.atan2(dy, dx);
} else {
a = -Math.atan2(dy, -dx);
}
ang = ang + ((a - ang) * 0.2);
sviborg.morda._rotation = ang * 20;
dx = limit(dx, -250, 250);
dy = limit(dy, -250, 260);
sviborg.morda._x = dx * 0.1;
sviborg.morda._y = dy * 0.1;
ax = 1;
ay = 1;
vx = 0;
vy = 0;
if (Key.isDown(83) || (Key.isDown(40))) {
vy = vy + ay;
}
if (Key.isDown(87) || (Key.isDown(38))) {
vy = vy - ay;
}
if (Key.isDown(65) || (Key.isDown(37))) {
vx = vx - ax;
}
if (Key.isDown(68) || (Key.isDown(39))) {
vx = vx + ax;
}
sx = ((sviborg._x - old_x) * 0.95) + vx;
sy = ((sviborg._y - old_y) * 0.95) + vy;
old_x = sviborg._x;
old_y = sviborg._y;
sviborg._x = sviborg._x + sx;
sviborg._y = sviborg._y + sy;
shooting = false;
if (Key.isDown(1)) {
sviborg.morda.mouth.play();
shooting = true;
}
sviborg._x = limit(sviborg._x, 40, 600);
sviborg._y = limit(sviborg._y, 40, 350);
floating = Math.sin(time * 0.25) * 2;
sviborg._y = sviborg._y + floating;
old_y = old_y + floating;
if (shooting) {
get_eye_pos(sviborg.morda.eye1, beam1);
get_eye_pos(sviborg.morda.eye2, beam2);
beam.x = (beam1.x + beam2.x) * 0.5;
beam.y = (beam1.y + beam2.y) * 0.5;
beam_l = DistPoint(beam.x, beam.y, _xmouse, _ymouse);
normal.y = (mpos.x - beam.x) / beam_l;
normal.x = (-(mpos.y - beam.y)) / beam_l;
w = (Math.sin(time) * 2) + 5;
dw = 0;
if (brutality_climax) {
dw = 10;
} else {
line(beam1.x, beam1.y, _xmouse, _ymouse, 16711680, 20, 25);
line(beam2.x, beam2.y, _xmouse, _ymouse, 16711680, 20, 25);
}
line(beam1.x, beam1.y, _xmouse, _ymouse, 16728128, 10 + dw, 70);
line(beam2.x, beam2.y, _xmouse, _ymouse, 16728128, 10 + dw, 70);
w = w + dw;
line(beam1.x, beam1.y, _xmouse, _ymouse, 16777215, w, 95);
line(beam2.x, beam2.y, _xmouse, _ymouse, 16777215, w, 95);
if (brutality_climax) {
decal(_xmouse, _ymouse, 0, 8);
} else {
decal(_xmouse, _ymouse, 0, 1);
}
eye_light1._visible = true;
eye_light2._visible = true;
eye_light1._x = beam1.x;
eye_light1._y = beam1.y;
eye_light2._x = beam2.x;
eye_light2._y = beam2.y;
sviborg.morda.light.play();
} else {
eye_light1._visible = false;
eye_light2._visible = false;
}
sc = (Math.sin(time * 0.25) * 30) + 30;
eye_light1._xscale = (eye_light1._yscale = sc);
eye_light2._xscale = (eye_light2._yscale = sc);
}
function Explosion(x, y, r, dmg) {
explosion.x = x;
explosion.y = y;
explosion.r = r;
explosion.age = 0;
explosion.dmg = dmg;
if (dmg > 50) {
quake = 12.5663706143592;
}
}
function AddKill(k, b) {
kills = kills + k;
if (combo_time < combo_interval) {
combo = combo + 1;
display_combo = combo;
combo_board._visible = true;
combo_board.gotoAndPlay(2);
} else {
combo = 1;
}
AddBrutality((b * combo) * 0.5);
combo_time = 0;
}
function AddBrutality(b) {
if (sviborg_life <= 0) {
return(undefined);
}
if (brutality_climax) {
return(undefined);
}
brutality = brutality + b;
if (brutality > 100) {
brutality = 100;
brutality_climax = true;
sviborg.gotoAndPlay("brutality");
anouncer.gotoAndPlay("brutality");
beam_damage = 8;
}
brutalitybar.gotoAndStop(int(brutality));
}
function StartMeowtime() {
meowtime_anouncer.gotoAndPlay("meowtime_start");
meowtime = 375;
neko_reload = 0;
meowtime_started = true;
}
function StartGame() {
_root.time = 0;
_root.shooting = false;
_root.n_objects = 0;
_root.beam_damage = 1;
_root.sviborg_life = 100;
_root.explosion.x = 0;
_root.explosion.y = 0;
_root.explosion.r = 0;
_root.explosion.age = 0;
_root.explosion.dmg = 0;
_root.brutality = 0;
_root.kills = 0;
_root.combo = 1;
_root.display_combo = 0;
_root.combo_time = 0;
_root.combo_interval = 12;
_root.brutality_climax = false;
_root.meowtime_started = false;
_root.meowtime = 0;
_root.meowtime_tens = 0;
_root.meowtime_units = 0;
_root.hspeed = -2;
_root.quake = 0;
_root.man_reload = 0;
_root.soldier_coef = 10;
_root.neko_reload = 250;
_root.gazel_reload = 800;
_root.ka50_reload = 1600;
_root.meowtime_reload = 3000;
_root.desant_reload = 2500;
anouncer.gotoAndPlay("hello_world");
bmp.scroll(-800, 0);
old_x = 320;
old_y = 240;
sviborg._x = 320;
sviborg._y = 240;
i = 0;
while (i < objects.length) {
objects[i].Kill();
delete objects[i];
objects.splice(i, 1);
i++;
}
onEnterFrame = UpdateGame;
_root.distance = 0;
_root.stat_distance = 0;
_root.time_min = 0;
_root.time_sec = 0;
_root.time_str = "0:0";
}
function UpdateGame() {
if (!meowtime_started) {
if (man_reload < 0) {
man_reload = random(25);
if (((Math.random() * 100) > soldier_coef) || (time < 600)) {
objects.push(new Victim(1));
} else if ((Math.random() * 100) < 50) {
objects.push(new Soldier(1));
} else {
objects.push(new SoldierLeft(1));
}
}
if (neko_reload < 0) {
objects.push(new Neko(1));
neko_reload = 200 + random(200);
}
if (gazel_reload < 0) {
objects.push(new Gaz(1));
gazel_reload = 400 + random(400);
}
if (ka50_reload < 0) {
objects.push(new Ka50(1));
ka50_reload = 500 + random(800);
}
if (meowtime_reload < 0) {
objects.push(new Bonus(StartMeowtime, "meow_time_bonus"));
meowtime_reload = 1200 + random(1000);
}
if (desant_reload < 0) {
i = 0;
while (i < 3) {
objects.push(new Desant(1));
i++;
}
desant_reload = 400 + random(400);
}
man_reload--;
neko_reload--;
gazel_reload--;
ka50_reload--;
meowtime_reload--;
desant_reload--;
combo_time++;
explosion.age++;
if (soldier_coef < 20) {
soldier_coef = soldier_coef + 0.0125;
} else {
soldier_coef = soldier_coef + 0.0025;
}
if (soldier_coef > 50) {
soldier_coef = 50;
}
} else {
meowtime--;
mt_sec = int(meowtime / 25);
meowtime_tens = int(mt_sec / 10);
meowtime_units = mt_sec - (meowtime_tens * 10);
if (neko_reload < 0) {
objects.push(new Neko(1));
neko_reload = 4 + random(4);
}
neko_reload--;
combo_time++;
explosion.age++;
if (meowtime <= 0) {
meowtime_started = false;
meowtime_anouncer.gotoAndPlay("meowtime_end");
}
}
quake = quake - 0.5;
if (quake > 2) {
_root._y = int((Math.sin((-quake) * 3) * quake) * 0.5);
sky._y = -_root._y;
} else {
sky._y = 0;
_root._y = 0;
}
if (combo_time >= combo_interval) {
}
if (brutality_climax) {
brutality = brutality - 0.25;
if (brutality <= 0) {
brutality = 0;
brutality_climax = false;
sviborg.gotoAndPlay("normalize");
beam_damage = 1;
}
brutalitybar.gotoAndStop(int(brutality));
}
drawing.clear();
bmp.scroll(hspeed, 0);
process_sviborg();
mpos.x = _xmouse;
mpos.y = _ymouse;
i = 0;
while (i < objects.length) {
objects[i].Update();
if (!objects[i].Alive()) {
objects[i].Kill();
delete objects[i];
objects.splice(i, 1);
}
i++;
}
n_objects = objects.length;
distance = distance - hspeed;
time++;
sky._x = sky._x - 0.25;
if (sky._x < -640) {
sky._x = 0;
}
mount._x = mount._x - 0.75;
if (mount._x < -640) {
mount._x = 0;
}
asphalt._x = asphalt._x + hspeed;
if (asphalt._x < -128) {
asphalt._x = asphalt._x + 128;
}
if (sviborg_life <= 0) {
sviborg_life = 0;
lifebar.gotoAndStop("die");
sviborg.gotoAndPlay("die");
anouncer.gotoAndPlay("bye");
Explosion(320, 240, 1000, 1000);
hspeed = 0;
leave_speed = 0;
sky._y = 0;
_root._y = 0;
if (meowtime_started) {
meowtime_anouncer.gotoAndPlay("meowtime_end");
}
meowtime = 0;
meowtime_started = false;
stat_distance = int(destance / 33);
it = int(time / 25);
time_min = int(it / 60);
time_sec = it - (time_min * 60);
time_str = (("" + time_min) + ":") + time_sec;
onEnterFrame = GameOver;
return(undefined);
}
}
function GameOver() {
drawing.clear();
eye_light1._visible = false;
eye_light2._visible = false;
leave_speed = leave_speed + 0.25;
sviborg._y = sviborg._y - leave_speed;
explosion.age = 1;
i = 0;
while (i < objects.length) {
objects[i].Update();
if (!objects[i].Alive()) {
objects[i].Kill();
delete objects[i];
objects.splice(i, 1);
}
i++;
}
n_objects = objects.length;
sky._x = sky._x - 0.025;
if (sky._x < -640) {
sky._x = 0;
}
}
_quality = "MEDIUM";
degtorad = (Math.PI/180);
radtodeg = 57.2957795130823;
objects = new Array();
p = new Object();
m = new flash.geom.Matrix();
beam1 = new Object();
beam2 = new Object();
normal1 = new Object();
normal2 = new Object();
beam = new Object();
normal = new Object();
mpos = new Object();
explosion = new Object();
var bmp = (new flash.display.BitmapData(800, 200, true, 0));
decals.attachBitmap(bmp, 2, "auto", false);
id = 0;
ang = 0;
vx = 0;
vy = 0;
old_x = 0;
old_y = 0;
beam_l1 = 1;
beam_l2 = 1;
beam_l = 1;
leave_speed = 0;
nextFrame();
Frame 3
stop();
decals._visible = false;
btn_play.onPress = function () {
decals._visible = true;
StartGame();
gotoAndStop ("game");
};
btn_rtfm.onPress = function () {
gotoAndStop ("rtfm");
};
btn_vapgames.onPress = function () {
getURL ("http://vap.mirgames.ru", "_blank");
};
btn_credits.onPress = function () {
gotoAndStop ("credits");
};
rad_med.gotoAndStop(1);
rad_low.gotoAndStop(1);
if (_quality == "MEDIUM") {
rad_med.gotoAndStop(2);
}
if (_quality == "LOW") {
rad_low.gotoAndStop(2);
}
rad_med.onPress = function () {
_quality = "MEDIUM";
rad_med.gotoAndStop(2);
rad_low.gotoAndStop(1);
};
rad_low.onPress = function () {
_quality = "LOW";
rad_med.gotoAndStop(1);
rad_low.gotoAndStop(2);
};
Frame 4
btn_back.onPress = function () {
gotoAndStop ("menu");
};
Frame 5
btn_vapgames2.onPress = function () {
getURL ("http://vap.mirgames.ru", "_blank");
};
btn_back.onPress = function () {
gotoAndStop ("menu");
};
btn_zudl.onPress = function () {
getURL ("http://www.gamedev.ru/art/forum/?id=66447", "_blank");
};
Frame 7
sviborg._x = 320;
sviborg._y = 240;
Symbol 37 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 1
stop();
Symbol 44 MovieClip [desant] Frame 1
dir = 0;
Symbol 44 MovieClip [desant] Frame 17
gotoAndPlay (1);
Symbol 44 MovieClip [desant] Frame 30
gotoAndPlay (18);
Symbol 44 MovieClip [desant] Frame 31
Symbol 44 MovieClip [desant] Frame 50
stop();
_root.decal_mc(this);
nextFrame();
Symbol 44 MovieClip [desant] Frame 60
dir = dir + 180;
hand._rotation = dir;
gun._rotation = dir;
if (_root.sviborg._x > _x) {
_xscale = -100;
dir = (-dir) - 180;
hand._rotation = dir;
gun._rotation = dir;
} else {
_xscale = 100;
}
Symbol 44 MovieClip [desant] Frame 65
_xscale = 100;
dir = 0;
gotoAndPlay (18);
Symbol 44 MovieClip [desant] Frame 84
gotoAndPlay (70);
Symbol 67 MovieClip Frame 10
stop();
Symbol 69 MovieClip [soldier] Frame 1
dir = 0;
Symbol 69 MovieClip [soldier] Frame 17
gotoAndPlay (1);
Symbol 69 MovieClip [soldier] Frame 30
gotoAndPlay (18);
Symbol 69 MovieClip [soldier] Frame 31
Symbol 69 MovieClip [soldier] Frame 50
stop();
_root.decal_mc(this);
nextFrame();
Symbol 69 MovieClip [soldier] Frame 60
dir = dir + 180;
hand._rotation = dir;
rpg._rotation = dir;
if (_root.sviborg._x > _x) {
_xscale = -100;
dir = (-dir) - 180;
hand._rotation = dir;
rpg._rotation = dir;
} else {
_xscale = 100;
}
Symbol 69 MovieClip [soldier] Frame 72
_xscale = 100;
dir = 0;
gotoAndPlay (18);
Symbol 84 MovieClip [victim] Frame 17
gotoAndPlay (1);
Symbol 84 MovieClip [victim] Frame 30
gotoAndPlay (18);
Symbol 84 MovieClip [victim] Frame 31
if (random(100) < 50) {
_xscale = -100;
}
Symbol 84 MovieClip [victim] Frame 50
stop();
_root.decal_mc(this);
nextFrame();
Symbol 104 MovieClip [rpg_rocket] Frame 1
alive = true;
stop();
Symbol 104 MovieClip [rpg_rocket] Frame 61
alive = false;
stop();
Symbol 104 MovieClip [rpg_rocket] Frame 70
play();
Symbol 104 MovieClip [rpg_rocket] Frame 85
alive = false;
stop();
Symbol 115 MovieClip [gaz] Frame 10
gotoAndPlay (1);
Symbol 115 MovieClip [gaz] Frame 16
_root.decal(_x - 10, _y + 20, 0, 5);
_root.Explosion(_x - 10, _y + 20, 240, 100);
Symbol 115 MovieClip [gaz] Frame 19
_root.decal(_x - 10, _y + 20, 0, 6);
Symbol 115 MovieClip [gaz] Frame 41
stop();
Symbol 127 MovieClip [neko] Frame 9
gotoAndPlay (1);
Symbol 127 MovieClip [neko] Frame 20
Symbol 127 MovieClip [neko] Frame 28
stop();
_root.decal_mc(this);
nextFrame();
Symbol 140 MovieClip [meow_time_bonus] Frame 12
gotoAndPlay (1);
Symbol 140 MovieClip [meow_time_bonus] Frame 20
stop();
Symbol 143 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 178 MovieClip [ka50] Frame 1
stop();
Symbol 178 MovieClip [ka50] Frame 25
stop();
Symbol 178 MovieClip [ka50] Frame 38
_root.Explosion(_x, _y + 30, 30, 30);
Symbol 178 MovieClip [ka50] Frame 40
_root.decal(_x, _y + 90, 0, 5);
_root.decal(_x, _y + 90, 0, 6);
_root.Explosion(_x, _y + 90, 200, 100);
Symbol 178 MovieClip [ka50] Frame 52
stop();
Symbol 183 MovieClip [micro_plasma] Frame 9
gotoAndPlay (1);
Symbol 183 MovieClip [micro_plasma] Frame 30
stop();
Symbol 187 MovieClip [plasma] Frame 9
gotoAndPlay (1);
Symbol 187 MovieClip [plasma] Frame 30
stop();
Symbol 188 MovieClip [desant_gibs] Frame 1
stop();
Symbol 363 MovieClip [__Packages.Obj] Frame 0
class Obj
{
var x, y, life, sprite;
function Obj (_px, _py, _life, _sprite) {
x = _px;
y = _py;
life = _life;
sprite = _sprite;
}
function Kill() {
life = -1;
removeMovieClip(sprite);
}
function Alive() {
return(life > 0);
}
}
Symbol 364 MovieClip [__Packages.BloodDrop] Frame 0
class BloodDrop extends Obj
{
var x, y, vx, vy, dead_line, id, sprite, life;
function BloodDrop (__x, __y, _vx, _vy) {
super();
x = __x;
y = __y;
vx = _vx;
vy = _vy;
dead_line = random(50) + 400;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("blood_drop", "b" + id, id + (dead_line * 500));
sprite._rotation = random(360);
sprite._x = x;
sprite._y = y;
}
function Update() {
x = x + vx;
y = y + vy;
vy = vy + 1;
sprite._rotation = sprite._rotation + 5;
sprite._x = x;
sprite._y = y;
if (y > dead_line) {
_root.decal(x, y, 0, 2);
return(undefined);
}
x = x + _root.hspeed;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["b" + id]);
}
function Alive() {
return(y < dead_line);
}
}
Symbol 365 MovieClip [__Packages.Desant] Frame 0
class Desant extends Obj
{
var x, y, dead_line, life, id, sprite, action, action_reload, vx, vy, reloading;
function Desant (_life) {
super();
x = random(300) + 300;
y = -30 - random(40);
dead_line = random(50) + 400;
life = 40 * _life;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("desant", "z" + id, id + ((dead_line + 22) * 500));
action = 5;
action_reload = random(10) + 20;
vx = (-_root.hspeed) - Math.random();
vy = 4;
reloading = 60;
sprite.gotoAndPlay("fall");
}
function Land() {
action = 1;
sprite.gotoAndPlay("run");
_root.decal(x, y + 16, 0, 7);
vy = 0;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
if (life < 0) {
return(undefined);
}
var _local3 = _root.GetDamage(x, y, 25);
x = x + vx;
y = y + vy;
if (action == 5) {
if (_local3 > 0) {
life = life - _local3;
if (life < 0) {
_root.AddKill(1, 1);
action = 6;
_root.objects.push(new Gib(x, y, random(20) - 10, -random(10), "desant_gibs", 1));
_root.objects.push(new Gib(x, y, random(20) - 10, -random(10), "desant_gibs", 1));
_root.objects.push(new Gib(x, y, random(20) - 10, -random(10), "desant_gibs", 2));
_root.objects.push(new Gib(x, y, random(20) - 10, -random(10), "desant_gibs", 3));
_root.objects.push(new Gib(x, y, random(20) - 10, -random(10), "desant_gibs", 3));
_root.objects.push(new Gib(x, y, random(20) - 10, -random(10), "desant_gibs", 4));
sprite.stop();
return(undefined);
}
}
if (y > dead_line) {
Land();
}
var _local4 = _root.direct(x, y);
sprite.hand.gotoAndStop(73 - int(_local4 * 0.2));
if (reloading <= 0) {
sprite.hand.gun.play();
sprite.dir = _local4;
reloading = 70;
vx = vx - (Math.cos(_local4 * _root.degtorad) * 0.2);
_root.objects.push(new MicroPlasma(x, y, _local4, dead_line + 1));
}
} else {
if (_local3 > 0) {
_root.decal((x + random(20)) - 10, ((y + 20) + random(20)) - 10, 0, 2);
life = life - _local3;
if (life < 0) {
sprite.gotoAndPlay("die");
_root.AddKill(1, 1);
action = 3;
return(undefined);
}
}
if (action_reload < 0) {
action_reload = random(10) + 20;
if (random(150) < 50) {
sprite.gotoAndPlay("run");
action = 1;
vx = ((-random(100)) / 100) - 1;
} else if ((random(100) < 50) || (reloading > 0)) {
sprite.gotoAndPlay("stand");
action = 2;
vx = 0;
} else {
sprite.gotoAndPlay("shoot");
var _local4 = _root.direct(x, y);
sprite.dir = _local4;
action = 4;
vx = 0;
action_reload = 11;
reloading = 50;
_root.objects.push(new MicroPlasma(x, y, _local4));
}
}
}
action_reload--;
reloading--;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["z" + id]);
}
function Alive() {
if (action == 6) {
return(false);
}
if (sprite._currentframe == 51) {
return(false);
}
return(x > -40);
}
}
Symbol 366 MovieClip [__Packages.Gib] Frame 0
class Gib extends Obj
{
var x, y, vx, vy, dead_line, id, sprite, life;
function Gib (__x, __y, _vx, _vy, sprite_name, frame) {
super();
x = __x;
y = __y;
vx = _vx;
vy = _vy;
dead_line = random(50) + 400;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie(sprite_name, "g" + id, id + (dead_line * 500));
sprite.gotoAndStop(frame);
sprite._rotation = random(360);
sprite._x = x;
sprite._y = y;
}
function Update() {
x = x + vx;
y = y + vy;
vy = vy + 1;
sprite._rotation = sprite._rotation + 5;
sprite._x = x;
sprite._y = y;
if (y > dead_line) {
_root.decal(x, y, 0, 2);
_root.decal_mc(sprite);
return(undefined);
}
x = x + _root.hspeed;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["g" + id]);
}
function Alive() {
return(y < dead_line);
}
}
Symbol 367 MovieClip [__Packages.MicroPlasma] Frame 0
class MicroPlasma extends Obj
{
var x, y, dead_line, life, id, sprite, vx, vy;
function MicroPlasma (__x, __y, dir, y_depth) {
super();
x = __x;
y = __y;
dead_line = y_depth;
life = 100;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("micro_plasma", "m" + id, id + (dead_line * 500));
vx = Math.cos(dir * _root.degtorad) * 8;
vy = Math.sin(dir * _root.degtorad) * 8;
x = x + (vx * 3);
y = y + (vy * 3);
sprite._x = x;
sprite._y = y;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
if (life < 0) {
return(undefined);
}
x = x + vx;
y = y + vy;
if ((y + 8) > dead_line) {
life = -1;
sprite.gotoAndPlay("die");
return(undefined);
}
if (_root.CollSviborg(x, y, 4)) {
life = -1;
sprite.gotoAndPlay("die");
_root.DamageSviborg(5, x, y);
}
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["m" + id]);
}
function Alive() {
if (((x < -40) || (x > 680)) || (y < -40)) {
return(false);
}
if (sprite._currentframe == 30) {
return(false);
}
return(true);
}
}
Symbol 368 MovieClip [__Packages.Bonus] Frame 0
class Bonus extends Obj
{
var func, x, y, life, id, sprite, vx;
function Bonus (_func, mc_name) {
super();
func = _func;
x = random(100) + 650;
y = random(300) + 20;
life = 100;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie(mc_name, "b" + id, id + 320000);
vx = -4;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
if (life < 0) {
return(undefined);
}
if (_root.CollSviborg(x, y, 16)) {
func();
sprite.gotoAndPlay("die");
life = -1;
}
vx = ((-random(100)) / 100) - 1;
x = x + vx;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["b" + id]);
}
function Alive() {
if (sprite._currentframe == 20) {
return(false);
}
return(x > -20);
}
}
Symbol 369 MovieClip [__Packages.Gaz] Frame 0
class Gaz extends Obj
{
var x, y, life, id, sprite, vx, action_reload;
function Gaz (_life) {
super();
x = random(100) + 700;
y = random(50) + 390;
life = 50 * _life;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("gaz", "g" + id, id + ((y + 32) * 500));
sprite.gotoAndPlay("run");
vx = ((-random(100)) / 100) - 1;
action_reload = 0;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
if (life < 0) {
return(undefined);
}
var _local3 = _root.GetDamage(x, y, 60);
if (_local3 > 0) {
_root.decal((x + random(20)) - 10, ((y + 20) + random(20)) - 10, 0, 4);
life = life - _local3;
if (life < 0) {
sprite.gotoAndPlay("die");
_root.AddKill(6, 12);
return(undefined);
}
}
vx = ((-random(100)) / 100) - 3;
x = x + vx;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["g" + id]);
}
function Alive() {
return(x > -100);
}
}
Symbol 370 MovieClip [__Packages.Neko] Frame 0
class Neko extends Obj
{
var x, y, life, id, sprite, vx, action_reload;
function Neko (_life) {
super();
x = random(100) + 650;
y = random(50) + 400;
life = 3 * _life;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("neko", "n" + id, id + ((y + 10) * 500));
sprite.gotoAndPlay("run");
vx = ((-random(100)) / 100) - 1;
action_reload = 0;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
if (life < 0) {
return(undefined);
}
var _local3 = _root.GetDamage(x, y, 15);
if (_local3 > 0) {
_root.decal((x + random(10)) - 5, (y + random(10)) - 5, 0, 2);
life = life - _local3;
if (life < 0) {
sprite.gotoAndPlay("die");
_root.AddKill(1, 1);
return(undefined);
}
}
vx = ((-random(100)) / 100) - 1;
x = x + vx;
if (action_reload < 0) {
action_reload = 20 + random(100);
_root.decal(x + 10, y + 8, 0, 3);
}
action_reload = action_reload - 1;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["n" + id]);
}
function Alive() {
if (sprite._currentframe == 29) {
return(false);
}
return(x > -20);
}
}
Symbol 371 MovieClip [__Packages.SoldierLeft] Frame 0
class SoldierLeft extends Obj
{
var x, y, life, id, sprite, action, action_reload, vx, reloading;
function SoldierLeft (_life) {
super();
x = (-random(10)) - 20;
y = random(50) + 400;
life = 30 * _life;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("soldier", "s" + id, id + ((y + 22) * 500));
sprite._xscale = -100;
action = 1;
action_reload = random(10) + 20;
vx = 4;
reloading = 0;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
sprite._xscale = -100;
if (life < 0) {
return(undefined);
}
var _local3 = _root.GetDamage(x, y, 25);
if (_local3 > 0) {
_root.decal((x + random(20)) - 10, ((y + 20) + random(20)) - 10, 0, 2);
life = life - _local3;
if (life < 0) {
sprite.gotoAndPlay("die");
_root.AddKill(1, 1);
action = 3;
return(undefined);
}
}
x = x + vx;
if (action_reload < 0) {
action_reload = random(10) + 20;
if ((random(150) < 100) || (reloading > 0)) {
sprite.gotoAndPlay("run");
action = 1;
vx = (random(100) / 200) + 3;
} else if ((random(100) < 5) || (reloading > 0)) {
sprite.gotoAndPlay("stand");
action = 2;
vx = 0;
} else {
sprite.gotoAndPlay("shoot");
var _local4 = _root.direct(x, y);
sprite.dir = _local4;
action = 4;
vx = 0;
action_reload = 11;
reloading = 50;
_root.objects.push(new RPG(x, y, _local4, y + 21));
}
}
action_reload = action_reload - 1;
reloading = reloading - 1;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["s" + id]);
}
function Alive() {
if (sprite._currentframe == 51) {
return(false);
}
return((x < 680) && (x > -100));
}
}
Symbol 372 MovieClip [__Packages.RPG] Frame 0
class RPG extends Obj
{
var x, y, life, id, sprite;
function RPG (__x, __y, dir, y_depth) {
super();
x = __x;
y = __y;
life = 100;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("rpg_rocket", "r" + id, id + (y_depth * 500));
sprite._rotation = dir;
sprite._x = x;
sprite._y = y;
}
function Update() {
x = x + _root.hspeed;
if (life < 0) {
return(undefined);
}
sprite._x = x;
sprite.nextFrame();
_root.p.x = sprite.rocket._x;
_root.p.y = sprite.rocket._y;
_root.p = sprite.transform.matrix.transformPoint(_root.p);
if (_root.CollSviborg(_root.p.x, _root.p.y, 15)) {
life = -1;
sprite.gotoAndPlay("die");
sprite._x = _root.p.x;
sprite._y = _root.p.y;
_root.DamageSviborg(10, _root.p.x, _root.p.y);
}
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["r" + id]);
}
function Alive() {
if ((sprite._currentframe == 61) || (sprite._currentframe == 85)) {
return(false);
}
return(true);
}
}
Symbol 373 MovieClip [__Packages.Ka50] Frame 0
class Ka50 extends Obj
{
var x, y, life, dead_line, dest_x, dest_y, id, sprite, action, action_reload, vx, reloading, body_dir, vy;
function Ka50 (_life) {
super();
x = random(20) + 770;
y = random(225) + 10;
life = 160 * _life;
dead_line = random(50) + 400;
dest_x = x - 200;
dest_y = y;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("ka50", "k" + id, id + (dead_line * 500));
action = 1;
action_reload = random(10) + 20;
vx = 4;
reloading = 0;
body_dir = 0;
sprite._x = x;
sprite._y = y;
vx = 0;
vy = 0;
}
function Update() {
x = x + _root.hspeed;
if (action == 3) {
sprite._x = x;
sprite._y = y;
return(undefined);
}
x = x + vx;
y = y + vy;
vy = vy + 0.5;
sprite._x = x;
sprite._y = y;
sprite._rotation = sprite._rotation + ((body_dir - sprite._rotation) * 0.1);
if (action == 5) {
body_dir = 0;
vx = -1;
if ((y + 90) > dead_line) {
sprite.gotoAndPlay("die");
action = 3;
}
return(undefined);
}
body_dir = vx * 5;
var _local4 = _root.direct(x, y);
sprite.gun._rotation = (_local4 - sprite._rotation) + 180;
var _local3 = _root.GetDamage(x, y, 60);
if (_local3 > 0) {
life = life - _local3;
sprite.body.play();
if (life < 0) {
sprite.gotoAndPlay("fall");
_root.AddKill(1, 2);
action = 5;
return(undefined);
}
}
if ((Math.abs(x - dest_x) < 40) && (Math.abs(y - dest_y) < 40)) {
dest_x = random(500) + 80;
dest_y = random(225) + 50;
}
if (x < dest_x) {
vx = vx + 0.5;
} else {
vx = vx - 0.5;
}
vy = vy - 0.3;
if (y > dest_y) {
vy = vy - 0.4;
}
vx = _root.limit(vx, -4, 4);
vy = _root.limit(vy, -2, 2);
if (reloading < 0) {
_root.p.x = sprite.gun._x;
_root.p.y = sprite.gun._y;
_root.p = sprite.transform.matrix.transformPoint(_root.p);
sprite.gun.play();
action = 4;
reloading = 50;
_root.objects.push(new Plasma(_root.p.x, _root.p.y, _local4, dead_line + 1));
}
action_reload = action_reload - 1;
reloading = reloading - 1;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["k" + id]);
}
function Alive() {
return(x > -150);
}
}
Symbol 374 MovieClip [__Packages.Plasma] Frame 0
class Plasma extends Obj
{
var x, y, dead_line, life, id, sprite, vx, vy;
function Plasma (__x, __y, dir, y_depth) {
super();
x = __x;
y = __y;
dead_line = y_depth;
life = 100;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("plasma", "p" + id, id + (y_depth * 500));
vx = Math.cos(dir * _root.degtorad) * 8;
vy = Math.sin(dir * _root.degtorad) * 8;
x = x + (vx * 3);
y = y + (vy * 3);
sprite._x = x;
sprite._y = y;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
if (life < 0) {
return(undefined);
}
x = x + vx;
y = y + vy;
if (_root.CollSviborg(x, y, 8)) {
life = -1;
sprite.gotoAndPlay("die");
_root.DamageSviborg(10, x, y);
}
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["p" + id]);
}
function Alive() {
if (((y + 10) > dead_line) && (life > 0)) {
sprite.gotoAndPlay("die");
_root.Explosion(x, y, 50, 48);
life = -1;
return(true);
}
if (((x < -40) || (x > 680)) || (y < -40)) {
return(false);
}
if (sprite._currentframe == 30) {
return(false);
}
return(true);
}
}
Symbol 375 MovieClip [__Packages.Soldier] Frame 0
class Soldier extends Obj
{
var x, y, life, id, sprite, action, action_reload, vx, reloading;
function Soldier (_life) {
super();
x = random(100) + 650;
y = random(50) + 400;
life = 30 * _life;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("soldier", "s" + id, id + ((y + 22) * 500));
action = 1;
action_reload = random(10) + 20;
vx = -0.1;
reloading = 0;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
if (life < 0) {
return(undefined);
}
var _local3 = _root.GetDamage(x, y, 25);
if (_local3 > 0) {
_root.decal((x + random(20)) - 10, ((y + 20) + random(20)) - 10, 0, 2);
life = life - _local3;
if (life < 0) {
sprite.gotoAndPlay("die");
_root.AddKill(1, 1);
action = 3;
return(undefined);
}
}
x = x + vx;
if (action_reload < 0) {
action_reload = random(10) + 20;
if (random(150) < 50) {
sprite.gotoAndPlay("run");
action = 1;
vx = ((-random(100)) / 100) - 1;
} else if ((random(100) < 50) || (reloading > 0)) {
sprite.gotoAndPlay("stand");
action = 2;
vx = 0;
} else {
sprite.gotoAndPlay("shoot");
var _local4 = _root.direct(x, y);
sprite.dir = _local4;
action = 4;
vx = 0;
action_reload = 11;
reloading = 50;
_root.objects.push(new RPG(x, y, _local4, y + 21));
}
}
action_reload--;
reloading--;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["s" + id]);
}
function Alive() {
if (sprite._currentframe == 51) {
return(false);
}
return(x > -40);
}
}
Symbol 376 MovieClip [__Packages.Victim] Frame 0
class Victim extends Obj
{
var x, y, life, id, sprite, action, action_reload, vx;
function Victim (_life) {
super();
x = random(100) + 650;
y = random(50) + 400;
life = 15 * _life;
id = _root.get_id();
sprite = _root.objects_layer.attachMovie("victim", "v" + id, id + ((y + 22) * 500));
action = 1;
action_reload = random(10) + 20;
vx = -0.1;
}
function Update() {
x = x + _root.hspeed;
sprite._x = x;
sprite._y = y;
if (life < 0) {
return(undefined);
}
var _local3 = _root.GetDamage(x, y, 25);
if (_local3 > 0) {
_root.decal((x + random(20)) - 10, ((y + 20) + random(20)) - 10, 0, 2);
life = life - _local3;
if (life < 0) {
sprite.gotoAndPlay("die");
_root.AddKill(1, 1);
action = 3;
return(undefined);
}
}
x = x + vx;
if (action_reload < 0) {
if (random(100) < 50) {
sprite.gotoAndPlay("run");
action = 1;
vx = ((-random(100)) / 100) - 1;
} else {
sprite.gotoAndPlay("stand");
action = 2;
vx = 0;
}
action_reload = random(10) + 20;
}
action_reload = action_reload - 1;
}
function Kill() {
life = -1;
removeMovieClip(_root.objects_layer["v" + id]);
}
function Alive() {
if (sprite._currentframe == 51) {
return(false);
}
return(x > -40);
}
}
Symbol 199 MovieClip Frame 2
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 20
stop();
Symbol 236 MovieClip Frame 20
stop();
Symbol 240 MovieClip Frame 20
stop();
Symbol 258 MovieClip Frame 20
stop();
Symbol 264 MovieClip Frame 32
stop();
Symbol 269 MovieClip Frame 20
stop();
Symbol 292 MovieClip Frame 1
_y = (-281 + random(100));
gotoAndStop(random(_framesloaded + 1));
Symbol 293 MovieClip Frame 1
stop();
onEnterFrame = function () {
_x = (_x + _root.hspeed);
if (_x < -150) {
_x = (660 + random(20));
building.play();
}
};
Symbol 298 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 1
_visible = false;
Symbol 308 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 35
stop();
Symbol 308 MovieClip Frame 61
gotoAndStop (1);
Symbol 308 MovieClip Frame 95
stop();
Symbol 311 MovieClip Frame 2
_x = 0;
_y = 0;
stop();
Symbol 318 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 2
Symbol 322 MovieClip Frame 100
stop();
Symbol 322 MovieClip Frame 110
stop();
Symbol 325 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 100
stop();
Symbol 337 MovieClip Frame 20
stop();
Symbol 338 Button
on (press) {
_root.gotoAndStop("menu");
_parent.gotoAndStop(1);
}
Symbol 341 MovieClip Frame 1
stop();
gotoAndPlay ("hello_world");
Symbol 341 MovieClip Frame 2
stop();
Symbol 341 MovieClip Frame 35
stop();
Symbol 341 MovieClip Frame 69
stop();
Symbol 341 MovieClip Frame 113
stop();
Symbol 341 MovieClip Frame 232
stop();
Symbol 341 MovieClip Frame 283
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 362 MovieClip Frame 1
stop();
Symbol 362 MovieClip Frame 41
stop();
Symbol 362 MovieClip Frame 63
stop();