Frame 1
Mouse.show();
Frame 2
fscommand ("allowscale", false);
fscommand ("showmenu", false);
fscommand ("about", "Developed by ArtBit");
_global.settings = new Object();
trace("settings.music_volume" + settings.music_volume);
if (settings.quality == undefined) {
_global.settings.quality = "HIGH";
}
if (settings.music_volume == undefined) {
_global.settings.music_volume = 80;
}
_global.settings.speed = new Object();
_global.settings.speed.forward = 8;
_global.settings.speed.backward = 5;
_global.settings.speed.jump = -12;
_global.settings.speed.gravity = 1;
var rnd_seed = 123;
var rn = (new djo.RandomNumber());
rn.SetSeed(rnd_seed);
var fps = (new djo.FPS());
fps.Init(this, 10, 25, 100, 100, 0);
_global.Timer = new jager.Timer();
_global.rad2deg = 57.29578;
_global.deg2rad = (Math.PI/180);
_global.screen = new Object();
_global.screen._width = 700;
_global.screen._height = 400;
_global.dt = 0;
var allsounds = new Sound();
gotoAndPlay ("loaded");
Frame 4
play();
Frame 8
_root.Music.playMenu();
_root.Music.Fade("in");
Mouse.show();
_root["aso#12331"]._visible = false;
Frame 12
Frame 16
stop();
Frame 23
stop();
Frame 27
gotoAndPlay (9);
Frame 33
stop();
Frame 37
gotoAndPlay (9);
Frame 40
Frame 42
_root.createEmptyMovieClip("music", 0);
_root.createEmptyMovieClip("sound", 1);
_root.createEmptyMovieClip("data", 2);
_root.createEmptyMovieClip("aso#43668", 3);
_root.createEmptyMovieClip("aso#12331", 4);
_root.createEmptyMovieClip("mask", 5);
_root["aso#12331"]._visible = false;
_root["aso#12331"]._alpha = 100;
Mouse.hide();
_root["aso#12331"].createEmptyMovieClip("sky", 0);
_root["aso#12331"].createEmptyMovieClip("bg_scape", 1);
_root["aso#12331"].createEmptyMovieClip("bg", 2);
_root["aso#12331"].createEmptyMovieClip("ground_back", 3);
_root["aso#12331"].attachMovie("Player", "aso#49657", 4, {_xscale:110, _yscale:110});
_root["aso#12331"].createEmptyMovieClip("particles", 5);
_root["aso#12331"].createEmptyMovieClip("ground", 6);
_root["aso#12331"].createEmptyMovieClip("aso#18320", 7);
_root["aso#12331"].createEmptyMovieClip("objects", 8);
_root["aso#12331"].createEmptyMovieClip("ground_front", 9);
_root["aso#12331"].createEmptyMovieClip("fx", 10);
_root["aso#12331"].createEmptyMovieClip("fg", 11);
_root["aso#12331"].createEmptyMovieClip("movie", 12);
_root["aso#12331"].movie.attachMovie("MovieSequence", "wide_screen", 0);
_root["aso#12331"].movie.attachMovie("TextWindow", "text_window", 1, {_x:10, _y:380});
_root["aso#12331"].movie.text_window.Init(-50, -50, "textWindow");
_root["aso#12331"].createEmptyMovieClip("gui", 14);
_root["aso#12331"].gui.attachMovie("EnergyBar", "player_energy", 3, {_x:530, _y:380});
_root["aso#12331"].gui.attachMovie("Score", "score", 4, {_x:650, _y:10});
_root["aso#12331"].gui.attachMovie("WeaponsStripe", "weapons", 5, {_x:10, _y:380});
_root["aso#12331"].gui.attachMovie("Cursor", "cursor", 1, {_x:-50, _y:-50});
_root["aso#12331"].gui.attachMovie("Dot", "dot", 2);
var bg_col = new Color(_root["aso#12331"].ground_back);
bg_col.setRGB(3355443);
bg_col = new Color(_root["aso#12331"].ground_front);
bg_col.setRGB(0);
with (_root.mask) {
beginFill(0, 100);
moveTo(0, 0);
lineTo(screen._width, 0);
lineTo(screen._width, screen._height);
lineTo(0, screen._height);
lineTo(0, 0);
endFill();
}
_root["aso#12331"].setMask(_root.mask);
Frame 43
Frame 44
trace("YAY");
_root.data["aso#31690"] = new Object();
_root.data["aso#31690"].pause = false;
_root.data["aso#31690"].stop = false;
_root.data["aso#31690"].score = 0;
_root.data["aso#31690"].addScore = function (amt) {
_root.data["aso#31690"].score = _root.data["aso#31690"].score + amt;
_root["aso#12331"].gui.score.Field.text = "score: " + _root.data["aso#31690"].score;
};
_root.data["aso#31690"].movie = false;
_root.data["aso#31690"].freeze = false;
_root.data["aso#31690"].over = false;
_root.data["aso#31690"].stats = new Object();
_root.data["aso#31690"].stats.shots = 0;
_root.data["aso#31690"].stats.hits = 0;
_root.data["aso#31690"].stats.kills = 0;
_root.keys = new Object();
_root.keys.is_S_down = false;
_root.keys.is_A_down = false;
_root.keys.is_D_down = false;
_root.keys.is_W_down = false;
_root.keys.is_SPACE_down = false;
_root.keys.is_1_down = false;
_root.keys.is_2_down = false;
_root.keys.is_3_down = false;
_root.keys.is_4_down = false;
_root.keys.is_5_down = false;
_root.keys.is_ESC_down = false;
_root.data.cursor = new Object();
_root.data.cursor.pos = new djo.Vector2P(_root._xmouse, _root._ymouse, 0, 0);
_root.data.cursor.koef = 3;
_root["aso#43668"].findNode = function (_arg2, x) {
return(_root["aso#43668"].findNodeRec(_arg2, 0, _arg2.length, x));
};
_root["aso#43668"].findNodeRec = function (_arg3, a, b, x) {
var _local2 = Math.floor((a + b) / 2);
if ((_arg3[_local2]._x <= x) && (_arg3[_local2 + 1]._x >= x)) {
return(_local2);
}
if ((b - 1) == a) {
return(_local2);
}
if (_arg3[_local2]._x <= x) {
return(_root["aso#43668"].findNodeRec(_arg3, _local2, b, x));
}
return(_root["aso#43668"].findNodeRec(_arg3, a, _local2, x));
};
_root["aso#43668"].getY = function (_arg3, x) {
var _local2 = _root["aso#43668"].findNode(_arg3, x);
var _local5 = _arg3[_local2]._y - _arg3[_local2 + 1]._y;
var _local4 = _arg3[_local2]._x - _arg3[_local2 + 1]._x;
return(_arg3[_local2]._y + ((_local5 / _local4) * (x - _arg3[_local2]._x)));
};
Frame 45
_root.data["aso#80994"] = new Object();
_root.data["aso#80994"].length = 50000;
_root.data["aso#80994"].height = 290;
_root.data["aso#80994"].freq = 300;
_root.data["aso#80994"]["aso#88375"] = new Object();
_root.data["aso#80994"]["aso#88375"].x = screen._width / 4;
_root.data["aso#80994"]["aso#88375"].y = (_root.data["aso#80994"].height = 290);
_root.data["aso#80994"].distance = new Object();
_root.data["aso#80994"].distance.x = 0;
_root.data["aso#80994"].distance.events = new Object();
_root.data["aso#80994"].distance.events["aso#75005"] = new Array();
_root.data["aso#80994"].distance.events.Add = function (dx, action) {
var _local2 = new Object();
_local2.x = dx;
_local2.onEvent = action;
_root.data["aso#80994"].distance.events["aso#75005"].push(_local2);
};
_root.data["aso#80994"].distance.events.Check = function () {
var _local2 = _root.data["aso#80994"].distance.events["aso#75005"][0];
if (_root.data["aso#80994"].distance.x > _local2.x) {
trace("Distance event triggered!");
_local2 = _root.data["aso#80994"].distance.events["aso#75005"].shift();
_local2.onEvent();
}
};
_root.data["aso#80994"].slant = new Object();
_root.data["aso#80994"].slant.x = 0;
_root.data["aso#80994"].slant.y = -80;
_root.data["aso#80994"].slant.koef = 0;
_root.data["aso#80994"].slant.angle = 0;
_root.data["aso#80994"].slant.start_angle = 0;
_root.data["aso#80994"].slant.dest_angle = 0;
_root.data["aso#80994"].slant.dest_distance = 0;
_root.data["aso#80994"].slant.distance = 0;
_root.data["aso#80994"].slant.setAngle = function (newAngle, distance) {
var _local2 = _root.data["aso#80994"].slant;
_local2.start_angle = _local2.angle;
_local2.dest_angle = newAngle;
_local2.dest_distance = distance;
_local2.distance = 0;
};
_root.data["aso#80994"].slant.Update = function (amt) {
var _local2 = _root.data["aso#80994"].slant;
_local2.distance = _local2.distance + amt;
if (_local2.distance > _local2.dest_distance) {
_local2.distance = _local2.dest_distance;
}
var _local3 = _local2.distance / _local2.dest_distance;
if (!isNaN(_local3)) {
_local2.angle = _local2.start_angle + ((_local2.dest_angle - _local2.start_angle) * _local3);
_local2.koef = Math.tan(_local2.angle * deg2rad);
}
};
_root.data["aso#80994"].createLevelObject = function (_arg2, y_median, y_range, x_range, speed, linkage, linkage_len, xscale, yscale) {
if (linkage == undefined) {
linkage = "none";
}
o = new Object();
o["aso#37679"] = _arg2;
o.y_median = y_median;
o.y_range = y_range;
o.x_range = x_range;
o.speed = speed;
o.linkage = linkage;
o.linkage_len = linkage_len;
o["aso#75005"] = new Array();
o._xscale = xscale;
o._yscale = yscale;
return(o);
};
_root.data["aso#80994"].generateTerrain = function () {
_root.data["aso#80994"].ground = _root.data["aso#80994"].createLevelObject(_root["aso#12331"].ground, _root.data["aso#80994"].height, 25, 100, 1);
_root.data["aso#80994"].ground_front = _root.data["aso#80994"].createLevelObject(_root["aso#12331"].ground_front, _root.data["aso#80994"].height + 20, 20, 120, 1.3, "Graves", 22, 100, 100);
_root.data["aso#80994"].ground_back = _root.data["aso#80994"].createLevelObject(_root["aso#12331"].ground_back, _root.data["aso#80994"].height - 25, 15, 80, 0.8, "Graves", 22, 50, 50);
_root.data["aso#80994"].bg = _root.data["aso#80994"].createLevelObject(_root["aso#12331"].bg, _root.data["aso#80994"].height - 50, 10, 0, 0.4);
_root.data["aso#80994"].sky = _root.data["aso#80994"].createLevelObject(_root["aso#12331"].sky, (_root.data["aso#80994"].height / 2) - 40, (_root.data["aso#80994"].height / 2) - 80, 200, 0.05, "Sky", 2, 100, 100);
var _local3;
var _local5 = 0;
while (_local5 < 8) {
var _local2 = _root.data["aso#80994"].ground;
var _local4 = _local2.y_range;
_local3 = new Object();
_local3._x = (_local5 - 1) * _root.data["aso#80994"].freq;
_local3._y = (_local2.y_median + rn.Random(-_local4, _local4)) + _root.data["aso#80994"].slant.y;
_root.data["aso#80994"].ground["aso#75005"].push(_local3);
_local2 = _root.data["aso#80994"].ground_front;
_local4 = _local2.y_range;
_local3 = new Object();
_local3._x = ((_local5 * _root.data["aso#80994"].freq) * _local2.speed) + rn.Random(50);
_local3._y = (_local2.y_median + rn.Random(-_local4, _local4)) + _root.data["aso#80994"].slant.y;
_local3.type = Math.floor(rn.Random(_local2.linkage_len)) + 1;
var _local6 = _local2["aso#37679"].getNextHighestDepth();
_local3.attached = _local2["aso#37679"].attachMovie(_local2.linkage, "node" + _local6, _local6, {_xscale:_local2._xscale, _yscale:_local2._yscale});
_local3.attached.gotoAndStop(_local3.type);
_local2["aso#75005"].push(_local3);
_local2 = _root.data["aso#80994"].ground_back;
_local4 = _local2.y_range;
_local3 = new Object();
_local3._x = ((_local5 * _root.data["aso#80994"].freq) * _local2.speed) + rn.Random(50);
_local3._y = (_local2.y_median + rn.Random(-_local4, _local4)) + _root.data["aso#80994"].slant.y;
_local3.type = Math.floor(rn.Random(_local2.linkage_len)) + 1;
_local6 = _local2["aso#37679"].getNextHighestDepth();
_local3.attached = _local2["aso#37679"].attachMovie(_local2.linkage, "node" + _local6, _local6, {_xscale:_local2._xscale, _yscale:_local2._yscale});
_local3.attached.gotoAndStop(_local3.type);
_local2["aso#75005"].push(_local3);
_local2 = _root.data["aso#80994"].bg;
_local4 = _local2.y_range;
_local3 = new Object();
_local3._x = ((_local5 * _root.data["aso#80994"].freq) * _local2.speed) + rn.Random(50);
_local3._y = (_local2.y_median + rn.Random(-_local4, _local4)) + _root.data["aso#80994"].slant.y;
_local3.type = Math.floor(rn.Random(_local2.linkage_len)) + 1;
_local6 = _local2["aso#37679"].getNextHighestDepth();
_local3.attached = _local2["aso#37679"].attachMovie(_local2.linkage, "node" + _local6, _local6, {_xscale:_local2._xscale, _yscale:_local2._yscale});
_local3.attached.gotoAndStop(_local3.type);
_local2["aso#75005"].push(_local3);
_local5++;
}
_local5 = 0;
while (_local5 < 3) {
_local3 = new Object();
var _local2 = _root.data["aso#80994"].sky;
_local3._x = (_local5 * _root.data["aso#80994"].sky.freq) + rn.Random(50);
_local3._y = rn.Random(_root.data["aso#80994"].height) - rn.Random(-10, 10);
_local3.type = Math.floor(rn.Random(_local2.linkage_len)) + 1;
var _local6 = _local2["aso#37679"].getNextHighestDepth();
_local3.attached = _local2["aso#37679"].attachMovie(_local2.linkage, "node" + _local6, _local6);
_local3.attached._x = _local3._x;
_local3.attached._y = _local3._y;
_local3.attached.gotoAndStop(_local3.type);
_local2["aso#75005"].push(_local3);
_local5++;
}
};
_root.data["aso#80994"]["aso#57038"] = function () {
_root.data["aso#80994"].clearObject(_root.data["aso#80994"].ground);
_root.data["aso#80994"].clearObject(_root.data["aso#80994"].ground_front);
_root.data["aso#80994"].clearObject(_root.data["aso#80994"].ground_back);
_root.data["aso#80994"].clearObject(_root.data["aso#80994"].bg);
_root.data["aso#80994"].clearObject(_root.data["aso#80994"].sky);
_root.data["aso#80994"].distance.x = 0;
var _local2 = _root.data["aso#80994"].distance.events["aso#75005"].length;
while (_local2--) {
_root.data["aso#80994"].distance.events["aso#75005"].shift();
}
_root.data["aso#80994"].generateTerrain();
};
_root.data["aso#80994"].clearObject = function (o) {
var _local3 = o["aso#75005"].length;
while (_local3--) {
var _local1 = o["aso#75005"].shift();
_local1.attached.removeMovieClip();
}
trace("After clear:" + o["aso#75005"]);
};
Frame 46
_root.data.events = new Object();
_root.data.events["aso#75005"] = new Array();
_root.data.events.Add = function (_watchObj, _hisVariable, _test, _againstValue, _onEvent) {
trace(((((((((("Adding event(" + _watchObj) + ",") + _hisVariable) + ",") + _test) + ",") + _againstValue) + ",") + _onEvent) + ")");
var _local2 = new Object();
_local2.watchObj = _watchObj;
_local2.hisVariable = _hisVariable;
_local2.test = _test;
_local2.againstValue = _againstValue;
_local2.onEvent = _onEvent;
_root.data.events["aso#75005"].push(_local2);
};
_root.data.events.Check = function () {
var _local3 = _root.data.events["aso#75005"];
var _local5 = _local3.length;
while (_local5--) {
var _local2 = _local3[_local5];
var _local7 = _local2.watchObj[_local2.hisVariable];
var _local6 = _local2.againstValue;
var _local8 = _local2.test;
if (_root["aso#43668"].logicTest(_local7, _local8, _local6)) {
delete _local3[_local5];
_local2.onEvent();
}
}
_local3.sort();
var _local4 = _local3.length;
while ((_local3[_local4 - 1] == undefined) && (_local4 > 0)) {
_local3.pop();
_local4 = _local3.length;
}
};
_root.data.events["aso#57038"] = function () {
var _local2 = _root.data.events["aso#75005"].length;
while (_local2--) {
_root.data.events["aso#75005"].shift();
}
};
Frame 47
_root.data["aso#49657"] = new Object();
_root.data["aso#49657"].max_health = 100;
_root.data["aso#49657"].health = 20;
_root.data["aso#49657"].experience = 0;
_root.data["aso#49657"].accuracy = 50;
_root.data["aso#49657"].magazine = 8;
_root.data["aso#49657"].pos = new djo.Vector2P(150, 300, 0, 0);
_root.data["aso#49657"].jump = 2;
_root.data["aso#49657"].is_busy = false;
_root.data["aso#49657"]["aso#76397"] = false;
_root.data["aso#49657"]["aso#94364"] = false;
_root.data["aso#49657"]["aso#13723"] = false;
_root.data["aso#49657"]["aso#45060"] = false;
_root.data["aso#49657"]["aso#51049"] = false;
_root.data["aso#49657"].wall_forward = new djo.Vector2P();
_root.data["aso#49657"].wall_backward = new djo.Vector2P();
_root.data["aso#49657"].enableAll = function () {
var _local2 = _root.data["aso#49657"];
_local2["aso#94364"] = (_local2["aso#76397"] = (_local2["aso#13723"] = (_local2["aso#51049"] = (_local2["aso#45060"] = true))));
};
_root.data["aso#49657"].disableAll = function () {
var _local2 = _root.data["aso#49657"];
_local2["aso#94364"] = (_local2["aso#76397"] = (_local2["aso#13723"] = (_local2["aso#51049"] = (_local2["aso#45060"] = false))));
};
_root.data["aso#49657"].Hit = function (pos, amt) {
trace("HIT!");
_root.data["aso#49657"].health = _root.data["aso#49657"].health - amt;
if (_root.data["aso#49657"].health < 0) {
_root["aso#43668"].gameOver();
return(undefined);
}
_root["aso#12331"].gui.player_energy.bar._xscale = _root.data["aso#49657"].health;
var _local3 = _root["aso#12331"].particles.getNextHighestDepth();
_root["aso#12331"].particles.attachMovie("small_explode", "smx" + _local3, _local3, {_x:pos.x, _y:pos.y, _xscale:50, _yscale:50});
_root.data.particles.Add("blood", pos.x, pos.y, amt * 5, pos.Angle());
if (_root.data["aso#49657"].health < 0) {
_root["aso#43668"].GameOver();
}
};
_root.data["aso#49657"].Heal = function (amt) {
trace("HEal!");
_root.data["aso#49657"].health = _root.data["aso#49657"].health + amt;
_root.data["aso#49657"].health = ((_root.data["aso#49657"].health > 100) ? 100 : (_root.data["aso#49657"].health));
_root["aso#12331"].gui.player_energy.bar._xscale = _root.data["aso#49657"].health;
};
_root.data["aso#49657"].updateWalls = function () {
var _local2 = _root.data["aso#49657"];
_local2.wall_forward = _root.data["aso#18320"]["aso#00353"].closestFromTheRight();
_local2.wall_forward.x = _local2.wall_forward.x - 20;
_local2.wall_backward = _root.data["aso#18320"]["aso#00353"].closestFromTheLeft();
_local2.wall_backward.x = _local2.wall_backward.x + 20;
};
_root.data["aso#49657"]["aso#69016"] = new Object();
_root.data["aso#49657"]["aso#69016"].limit = new Object();
_root.data["aso#49657"]["aso#69016"].limit.min = 0;
_root.data["aso#49657"]["aso#69016"].limit.max = 0;
_root.data["aso#49657"]["aso#69016"].limit.med = 0;
_root.data["aso#49657"]["aso#69016"].dir = new djo.Vector2P();
_root.data["aso#49657"]["aso#69016"].dir_dot = new djo.Vector2P();
_root.data["aso#49657"]["aso#69016"].show_dir = false;
_root.data["aso#49657"]["aso#69016"].updateDir = function () {
var _local2 = _root.data["aso#49657"]["aso#69016"].dir;
var _local3 = {x:0, y:0};
_root["aso#12331"]["aso#49657"].guns["aso#69016"].gunbase.localToGlobal(_local3);
_local2.x = _local3.x;
_local2.y = _local3.y;
var _local5 = {x:0, y:0};
_root["aso#12331"]["aso#49657"].guns["aso#69016"].guntip.localToGlobal(_local5);
_local2.vx = _local5.x - _local3.x;
_local2.vy = _local5.y - _local3.y;
if (_root.data["aso#49657"]["aso#69016"].show_dir) {
_root["aso#12331"].fx.clear();
var _local4 = new djo.Vector2P();
_local4.Copy(_local2);
_local4.Move();
_local4.Mul(8);
_local4.Plot(_root["aso#12331"].fx, 1, 16724787, 50);
}
};
_root.data["aso#49657"]["aso#69016"].limit.Set = function (nmin, nmax) {
if (nmin == undefined) {
nmin = _root.data["aso#49657"]["aso#69016"].min_ang;
}
if (nmax == undefined) {
nmax = _root.data["aso#49657"]["aso#69016"].max_ang;
}
var _local4 = (nmax + nmin) / 2;
if (_local4 < 0) {
_local4 = _local4 + 360;
}
if (nmin < 0) {
nmin = nmin + 360;
}
if (nmax < 0) {
nmax = nmax + 360;
}
_root.data["aso#49657"]["aso#69016"].limit.min = nmin;
_root.data["aso#49657"]["aso#69016"].limit.max = nmax;
_root.data["aso#49657"]["aso#69016"].limit.med = _local4;
};
_root.data["aso#49657"]["aso#69016"].limit.Set(165, 65);
_root.data["aso#49657"]["aso#69016"].limit.Check = function (nrot, mouse_rot) {
var _local6 = _root.data["aso#49657"]["aso#69016"].limit;
var _local3 = _local6.max;
var _local2 = _local6.min;
var _local8 = _local6.med;
var _local5 = nrot;
var _local7 = true;
if (_local2 > _local3) {
var _local9 = _local3;
_local3 = _local2;
_local2 = _local9;
_local7 = false;
}
if ((_local3 > 270) && (_local2 < 90)) {
if (_local7) {
if ((mouse_rot < _local2) || (mouse_rot > _local3)) {
if (mouse_rot > 270) {
mouse_rot = mouse_rot - 360;
}
_local8 = ((_local3 + _local2) / 2) - 180;
_local5 = ((mouse_rot > _local8) ? (_local2) : (_local3));
}
} else if ((mouse_rot > _local2) && (mouse_rot < _local3)) {
_local8 = (_local3 + _local2) / 2;
_local5 = ((mouse_rot > _local8) ? (_local3) : (_local2));
}
} else if (_local7) {
_local8 = ((_local3 + _local2) / 2) + 180;
if ((mouse_rot > _local3) || (mouse_rot < _local2)) {
if (mouse_rot < _local8) {
_local5 = ((mouse_rot < _local2) ? (_local2) : (_local3));
} else {
_local5 = _local2;
}
}
} else if ((mouse_rot > _local2) && (mouse_rot < _local3)) {
_local8 = (_local3 + _local2) / 2;
_local5 = ((mouse_rot > _local8) ? (_local3) : (_local2));
}
return(_local5);
};
_root.data["aso#49657"]["aso#69016"].type = 0;
_root.data["aso#49657"]["aso#69016"].label = "knives";
_root.data["aso#49657"]["aso#69016"].power = 50;
_root.data["aso#49657"]["aso#69016"].availableTypes = 1;
_root.data["aso#49657"]["aso#69016"].energy = 50;
_root.data["aso#49657"]["aso#69016"].ammo_type = 1;
_root.data["aso#49657"]["aso#69016"].last_shot = -5000;
_root.data["aso#49657"]["aso#69016"].delay = 600;
_root.data["aso#49657"]["aso#69016"].is_shooting = false;
_root.data["aso#49657"]["aso#69016"].min_ang = 250;
_root.data["aso#49657"]["aso#69016"].max_ang = 180;
_root.data["aso#49657"]["aso#69016"].bullets_per_shot = 1;
_root.data["aso#49657"]["aso#69016"].bullets_linkage = "";
_root.data["aso#49657"]["aso#69016"].bullet_speed = 40;
_root.data["aso#49657"]["aso#69016"].availableWeapons = new Array(true, true, false, false, false);
_root.data["aso#49657"]["aso#69016"].Set = function (ntype, slabel, npower, nammo_type, nlast_shot, ndelay, nmin_ang, nmax_ang, ncur_koef, nbullets_per_shot, nbullets_linkage, nbullets_speed) {
var _local2 = _root.data["aso#49657"]["aso#69016"];
_local2.type = ntype;
_local2.label = slabel;
_local2.energy = (_local2.power = npower);
_local2.bullets_linkage = nbullets_linkage;
_local2.bullet_speed = nbullets_speed;
_local2.ammo_type = nammo_type;
_local2.last_shot = nlast_shot;
_local2.delay = ndelay;
_local2.bullets_per_shot = nbullets_per_shot;
_root.data.cursor.koef = ncur_koef;
_local2.min_ang = nmin_ang;
_local2.max_ang = nmax_ang;
};
_root.data["aso#49657"]["aso#69016"].makeAvailable = function (type) {
var _local3 = _root.data["aso#49657"]["aso#69016"].availableWeapons;
_local3[type] = true;
var _local2 = _local3.length;
while (_local2-- , _local2) {
if (_local3[_local2]) {
_root["aso#12331"].gui.weapons.showWeapon(_local2);
} else {
_root["aso#12331"].gui.weapons.hideWeapon(_local2);
}
}
_root.data["aso#49657"]["aso#69016"].last_shot = -10000;
_root.data["aso#49657"]["aso#69016"].changeWeapon(type);
};
_root.data["aso#49657"]["aso#69016"].changeWeapon = function (wpn) {
var _local2 = _root.data["aso#49657"]["aso#69016"];
if ((Timer.now - _local2.last_shot) < _local2.delay) {
return(undefined);
}
if (((wpn == undefined) || (!_root.data["aso#49657"]["aso#69016"].availableWeapons[wpn])) || (wpn == _local2.type)) {
return(undefined);
}
switch (wpn) {
case 1 :
_local2.Set(wpn, "knives", 20, 1, 0, 600, 280, 90, 1, 1, "knife", 40);
_root["aso#12331"].gui.weapons.chooseWeapon(1);
break;
case 2 :
_local2.Set(wpn, "pistol", 40, 1, 0, 800, 250, 180, 2, 1, "bullet", 80);
_root["aso#12331"].gui.weapons.chooseWeapon(2);
break;
case 3 :
_local2.Set(wpn, "dual_pistols", 25, 1, 0, 200, 250, 180, 4, 1, "bullet", 80);
_root["aso#12331"].gui.weapons.chooseWeapon(3);
break;
case 4 :
_local2.Set(wpn, "shotgun", 100, 1, 0, 1000, 175, 65, 8, 3, "", 0);
_root["aso#12331"].gui.weapons.chooseWeapon(4);
}
_root.data["aso#49657"]["aso#69016"].limit.Set();
_root["aso#12331"]["aso#49657"].guns["aso#69016"].weapon = _local2.label;
_root["aso#12331"]["aso#49657"].guns["aso#69016"].gotoAndStop(_local2.label);
};
_root.data["aso#49657"]["aso#57038"] = function () {
_root.data["aso#49657"]["aso#69016"].makeAvailable(1);
_root.data["aso#49657"].max_health = 100;
_root.data["aso#49657"].health = 100;
_root.data["aso#49657"].experience = 0;
_root.data["aso#49657"].accuracy = 50;
_root.data["aso#49657"].magazine = 8;
_root.data["aso#49657"].pos = new djo.Vector2P();
_root.data["aso#49657"].jump = 2;
_root.data["aso#49657"].enableAll();
var _local2 = _arr.length;
while (_local2-- , _local2) {
_root.data["aso#49657"]["aso#69016"].availableWeapons[_local2] = false;
_root["aso#12331"].gui.weapons.hideWeapon(_local2);
}
_root.data["aso#49657"]["aso#69016"].makeAvailable(1);
_root.data["aso#49657"].pos.vx = 0;
_root.data["aso#49657"].pos.vy = 0;
_root.data["aso#49657"].pos.x = 150;
_root.data["aso#49657"].pos.y = _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], _root.data["aso#49657"].pos.x);
_root["aso#12331"]["aso#49657"]._x = _root.data["aso#49657"].pos.x;
_root["aso#12331"]["aso#49657"]._y = _root.data["aso#49657"].pos.y;
_root["aso#12331"]["aso#49657"]._xscale = (_root["aso#12331"]["aso#49657"]._yscale = 60);
_root["aso#12331"]["aso#49657"]["aso#63027"] = "idle";
_root["aso#12331"]["aso#49657"].gotoAndPlay("idle");
};
Frame 48
_root.data["aso#18320"] = new Object();
_root.data["aso#18320"]["aso#94364"] = false;
_root.data["aso#18320"]["aso#25701"] = false;
_root.data["aso#18320"]["aso#06342"] = new jager.Swarm();
_root.data["aso#18320"]["aso#06342"].Init(_root["aso#12331"]["aso#18320"], 400, 100);
_root.data["aso#18320"]["aso#06342"].setCenter(550, 65);
_root.data["aso#18320"]["aso#06342"].curr_size = 0;
_root.data["aso#18320"]["aso#06342"].min_size = 0;
_root.data["aso#18320"]["aso#06342"].max_size = 3;
_root.data["aso#18320"]["aso#06342"].bats_to_add = 0;
_root.data["aso#18320"]["aso#06342"].add_delay = 0;
_root.data["aso#18320"]["aso#06342"].already_adding = false;
_root.data["aso#18320"]["aso#06342"]["aso#25701"] = true;
_root.data["aso#18320"]["aso#06342"].next_swarm_at = 1000;
_root.data["aso#18320"]["aso#06342"].next_swarm_distance = 2400;
_root.data["aso#18320"]["aso#06342"].next_bat_after = 4000;
_root.data["aso#18320"]["aso#06342"].stop_loop_attack = false;
_root.data["aso#18320"]["aso#06342"].adding_bats = false;
_root.data["aso#18320"]["aso#06342"].addBats = function (delay) {
delay = (isNaN(delay) ? 100 : (delay));
var _local2 = _root.data["aso#18320"]["aso#06342"].max_size - _root.data["aso#18320"]["aso#06342"].curr_size;
_local2 = ((_local2 < 0) ? 0 : (_local2));
_root.data["aso#18320"]["aso#06342"].bats_to_add = _root.data["aso#18320"]["aso#06342"].bats_to_add + _local2;
_root.data["aso#18320"]["aso#06342"].add_delay = delay;
if (!_root.data["aso#18320"]["aso#06342"].adding_bats) {
_root.data["aso#18320"]["aso#06342"].keepAddingBats();
}
};
_root.data["aso#18320"]["aso#06342"].keepAddingBats = function () {
if (!_root.data["aso#18320"]["aso#06342"].bats_to_add) {
return(undefined);
}
_root.data["aso#18320"]["aso#06342"].adding_bats = true;
var _local2 = _root.data["aso#18320"]["aso#06342"].addObject(595, -150, 20, "Bat");
_local2.item = _root["aso#43668"].spawnHealthItem();
_local2.last_attack = Timer.relative - 200;
_root.data["aso#18320"]["aso#06342"].curr_size++;
_root.data["aso#18320"]["aso#06342"].bats_to_add--;
if (_root.data["aso#18320"]["aso#06342"].bats_to_add) {
Timer.Add(_root.data["aso#18320"]["aso#06342"].add_delay, _root.data["aso#18320"]["aso#06342"].keepAddingBats);
} else {
_root.data["aso#18320"]["aso#06342"].adding_bats = false;
}
};
_root.data["aso#18320"]["aso#06342"].addBunch = function (num) {
trace("Adding swarm bunch!");
_root.data["aso#18320"]["aso#06342"].bats_to_add = _root.data["aso#18320"]["aso#06342"].bats_to_add + num;
if (!_root.data["aso#18320"]["aso#06342"].adding_bats) {
_root.data["aso#18320"]["aso#06342"].keepAddingBats();
}
};
_root.data["aso#18320"]["aso#06342"].addBatsTimedEvent = function () {
var _local2 = _root.data["aso#18320"]["aso#06342"].curr_size;
if (_local2 < _root.data["aso#18320"]["aso#06342"].max_size) {
_root.data["aso#18320"]["aso#06342"].addObject(595, -150, 20, "Bat");
o.last_attack = Timer.relative - 200;
_root.data["aso#18320"]["aso#06342"].curr_size++;
}
Timer.Add(_root.data["aso#18320"]["aso#06342"].next_bat_after, _root.data["aso#18320"]["aso#06342"].addBatsTimedEvent);
};
_root.data["aso#18320"]["aso#06342"].addBatsDistanceEvent = function () {
var _local2 = _root.data["aso#18320"]["aso#06342"].size;
if (_local2 < _root.data["aso#18320"]["aso#06342"].max_size) {
_root.data["aso#18320"]["aso#06342"].addBats(300);
}
_root.data.events.Add(_root.data["aso#80994"].distance, "x", ">", _root.data["aso#18320"]["aso#06342"].next_swarm_at, _root.data["aso#18320"]["aso#06342"].addBatsDistanceEvent);
_root.data["aso#18320"]["aso#06342"].next_swarm_at = _root.data["aso#80994"].distance.x + _root.data["aso#18320"]["aso#06342"].next_swarm_distance;
};
_root.data["aso#18320"]["aso#06342"].Attack = function (nx, ny, batID) {
var _local4 = _root.data["aso#18320"]["aso#06342"];
var len = 0;
if (isNaN(batID)) {
len = _local4["aso#75005"].length;
len = random(len);
} else {
len = batID;
}
var o = _local4["aso#75005"][len];
trace("o.is_attacking" + o.is_attacking);
if (o.is_attacking) {
return(undefined);
}
var _local5 = Timer.relative - o.last_attack;
trace("time" + _local5);
if (_local5 < 600) {
return(undefined);
}
var start_pos = new Object();
start_pos.x = o.pos.x;
start_pos.y = o.pos.y;
_local4.removeFromSwarm(len);
if (Math.random() > 0.5) {
o.last_attack = Timer.relative;
o.is_attacking = true;
o["aso#37679"].onEnterFrame = function () {
if (!_root.data["aso#18320"]["aso#06342"]["aso#94364"]) {
return(undefined);
}
var _local5 = nx - this._x;
var _local4 = ny - this._y;
o.pos.x = (this._x = this._x + (_local5 / 10));
var _local3 = 1 - ((this._x - start_pos.x) / (nx - start_pos.x));
_local3 = _local3 * _local3;
_local3 = _local3 * _local3;
o.pos.y = (this._y = ny - (_local3 * (ny - start_pos.y)));
if (Math.abs(_local5) < 1) {
o.pos.x = o.pos.x + (2 * (nx - o.pos.x));
nx = start_pos.x;
ny = start_pos.y;
this.onEnterFrame = function () {
if (!_root.data["aso#18320"]["aso#06342"]["aso#94364"]) {
return(undefined);
}
var _local4 = nx - this._x;
var _local3 = ny - this._y;
o.pos.y = (this._y = this._y + (_local3 / 8));
o.pos.x = (this._x = this._x + (_local4 / 8));
if (Math.abs(_local3) < 1) {
delete this.onEnterFrame;
o.is_attacking = false;
o.in_swarm = true;
}
};
}
};
} else {
o["aso#37679"].onEnterFrame = function () {
if (!_root.data["aso#18320"]["aso#06342"]["aso#94364"]) {
return(undefined);
}
var _local3 = -this._x;
o.pos.x = (this._x = this._x + (_local3 / 10));
if (Math.abs(_local3) < 5) {
_root.data["aso#18320"]["aso#06342"].Attack(_root.data["aso#49657"]["aso#69016"].dir.x, _root.data["aso#49657"]["aso#69016"].dir.y, len);
}
};
}
};
_root.data["aso#18320"]["aso#06342"].loopAttack = function () {
if (_root.data["aso#18320"]["aso#06342"].stop_loop_attack) {
return(undefined);
}
if (_root.data["aso#18320"]["aso#06342"].curr_size && (_root.data["aso#18320"]["aso#06342"]["aso#25701"])) {
var _local2 = _root.data["aso#49657"]["aso#69016"].dir;
_root.data["aso#18320"]["aso#06342"].Attack(_local2.x, _local2.y);
}
Timer.Add(2000, _root.data["aso#18320"]["aso#06342"].loopAttack);
};
_root.data["aso#18320"]["aso#06342"].startLoopAttack = function () {
_root.data["aso#18320"]["aso#06342"].stop_loop_attack = false;
Timer.Add(2000, _root.data["aso#18320"]["aso#06342"].loopAttack);
};
_root.data["aso#18320"]["aso#00353"] = new Object();
_root.data["aso#18320"]["aso#00353"]["aso#75005"] = new Array();
_root.data["aso#18320"]["aso#00353"].next_zombie_after = 10000;
_root.data["aso#18320"]["aso#00353"].next_zombie_distance = 3000;
_root.data["aso#18320"]["aso#00353"].max_zombies = 3;
_root.data["aso#18320"]["aso#00353"]["aso#25701"] = false;
_root.data["aso#18320"]["aso#00353"].speed = 1;
_root.data["aso#18320"]["aso#00353"].no_spawned = 0;
_root.data["aso#18320"]["aso#00353"].are_attacking = false;
_root.data["aso#18320"]["aso#00353"].addZombie = function (nx, ny, type) {
var _local7 = _root.data["aso#18320"]["aso#00353"]["aso#75005"].length;
if (_local7 > _root.data["aso#18320"]["aso#00353"].max_zombies) {
return(undefined);
}
trace(((("Adding a zombie at (" + nx) + ",") + ny) + ")");
var _local2 = new Object();
_local2.pos = new djo.Vector2P(nx, ny, -_root.data["aso#18320"]["aso#00353"].speed, 0);
_local2.type = type;
_local2.player_dist = (_local2.aim_dist = 1000);
_local2.energy = 200;
_local2.is_dead = false;
_local2.is_moving = true;
_local2.is_attacking = false;
_local2.id = _root.data["aso#18320"]["aso#00353"].no_spawned++;
_local2.item = _root["aso#43668"].spawnHealthItem();
var _local3 = _root["aso#12331"]["aso#18320"].getNextHighestDepth();
_local2["aso#37679"] = _root["aso#12331"]["aso#18320"].attachMovie("Zombie", "zombie" + _local3, _local3, {_x:nx, _y:ny, _xscale:57, _yscale:57});
_local2["aso#37679"]["aso#63027"] = "walk";
_local2["aso#37679"].facing = "left";
_local2["aso#37679"].gotoAndPlay(random(8) + 1);
_local2["aso#37679"].is_busy = false;
_root.data["aso#18320"]["aso#00353"].randomizeBody(_local2);
var _local6 = _root.data["aso#18320"]["aso#00353"]["aso#75005"].push(_local2);
return(_root.data["aso#18320"]["aso#00353"]["aso#75005"][_local6 - 1]);
};
_root.data["aso#18320"]["aso#00353"].randomizeBody = function (z, type) {
type = (isNaN(type) ? 0 : (type));
type++;
var no_frms = 5;
with (z["aso#37679"]) {
larm_up.gotoAndStop(random(no_frms) + 1);
larm_down.gotoAndStop(random(no_frms) + 1);
rarm_up.gotoAndStop(random(no_frms) + 1);
rarm_down.gotoAndStop(random(no_frms) + 1);
lleg_up.gotoAndStop(random(no_frms) + 1);
lleg_down.gotoAndStop(random(no_frms) + 1);
rleg_up.gotoAndStop(random(no_frms) + 1);
rleg_down.gotoAndStop(random(no_frms) + 1);
body.gotoAndStop(random(no_frms) + 1);
var hd = (random(no_frms) + 2);
head.gotoAndStop(hd);
}
};
_root.data["aso#18320"]["aso#00353"].setBody = function (z, type) {
with (z["aso#37679"]) {
larm_up.gotoAndStop(type);
larm_down.gotoAndStop(type);
rarm_up.gotoAndStop(type);
rarm_down.gotoAndStop(type);
lleg_up.gotoAndStop(type);
lleg_down.gotoAndStop(type);
rleg_up.gotoAndStop(type);
rleg_down.gotoAndStop(type);
body.gotoAndStop(type);
head.gotoAndStop(type);
}
};
_root.data["aso#18320"]["aso#00353"].addZombieTimedEvent = function () {
var _local2 = _root.data["aso#80994"].ground["aso#75005"][_root.data["aso#80994"].ground["aso#75005"].length - 1];
var _local3 = random(4) + 1;
_root.data["aso#18320"]["aso#00353"].addZombie(screen._width + 50, _local2, _local3);
Timer.Add(_root.data["aso#18320"]["aso#00353"].next_zombie_after, _root.data["aso#18320"]["aso#00353"].addZombieTimedEvent);
};
_root.data["aso#18320"]["aso#00353"].Turn = function (z) {
if (z["aso#37679"].is_busy) {
return(undefined);
}
z["aso#37679"].is_busy = true;
z.is_moving = false;
z["aso#37679"].gotoAndPlay("turn");
trace("Changing the direction of the zombie");
Timer.Add(500, function () {
z.pos.vx = _root.data["aso#18320"]["aso#00353"].speed;
if (z["aso#37679"]._xscale > 0) {
z.pos.vx = z.pos.vx * -1;
}
});
};
_root.data["aso#18320"]["aso#00353"].chooseAction = function (zomb) {
if (!_root.data["aso#18320"]["aso#00353"]["aso#25701"]) {
return(undefined);
}
if (zomb.is_dead) {
return(undefined);
}
var _local5 = _root.data["aso#49657"];
var _local3 = zomb.pos.x - _local5.pos.x;
var _local4 = zomb.pos.y - _local5.pos.y;
if (!zomb["aso#37679"].is_busy) {
if (zomb["aso#37679"].facing == "left") {
if (_local3 < 30) {
if (_local3 > 10) {
if (_local4 < 10) {
if (_root.data["aso#18320"]["aso#00353"].are_attacking) {
zomb.is_moving = false;
zomb["aso#63027"] = "idle";
} else {
_root.data["aso#18320"]["aso#00353"].grabAttack(zomb);
}
}
} else if (_local3 < -40) {
_root.data["aso#18320"]["aso#00353"].Turn(zomb);
}
} else {
zomb.is_moving = true;
zomb.is_attacking = false;
zomb["aso#37679"]["aso#63027"] = "walk";
}
} else if (_local3 > -50) {
if (_local3 < 10) {
if (_local4 < 10) {
if (_root.data["aso#18320"]["aso#00353"].are_attacking) {
zomb.is_moving = false;
zomb["aso#63027"] = "idle";
} else {
_root.data["aso#18320"]["aso#00353"].grabAttack(zomb);
}
}
} else if (_local3 > 40) {
_root.data["aso#18320"]["aso#00353"].Turn(zomb);
}
} else {
zomb.is_moving = true;
zomb.is_attacking = false;
zomb["aso#37679"]["aso#63027"] = "walk";
}
}
};
_root.data["aso#18320"]["aso#00353"].grabAttack = function (z) {
if (z.is_attacking) {
return(undefined);
}
if (_root.data["aso#18320"]["aso#00353"].are_attacking) {
z["aso#63027"] = "idle";
z.pos.vx = 0;
return(undefined);
}
trace("Grab attack!");
z.is_attacking = true;
z.is_moving = false;
_root.data["aso#18320"]["aso#00353"].are_attacking = (z.is_attacking = true);
var _local2 = new djo.Vector2P(_root["aso#12331"]["aso#49657"].Head._x, _root["aso#12331"]["aso#49657"].Head._y, 0, 0);
_root.data["aso#49657"].Hit(_local2, 10);
_root["aso#12331"]["aso#49657"]["aso#63027"] = "strugle";
_root["aso#12331"]["aso#49657"].gotoAndPlay("strugle");
_root.data["aso#49657"].is_busy = true;
z.is_busy = true;
z["aso#37679"]["aso#63027"] = "attack_grab";
z["aso#37679"].gotoAndPlay(z["aso#37679"]["aso#63027"]);
Timer.Add(5000, function () {
_root["aso#12331"]["aso#49657"]["aso#63027"] = "strugle_win";
_root["aso#12331"]["aso#49657"].gotoAndPlay("strugle_win");
_root.data["aso#49657"]["aso#69016"].limit.Set();
z.is_moving = false;
z["aso#37679"]["aso#63027"] = "idle";
z["aso#37679"].gotoAndPlay("hit_head");
if (z["aso#37679"].facing == "left") {
z.pos.x = z.pos.x + 50;
} else {
z.pos.x = z.pos.x - 50;
}
_root.data["aso#18320"]["aso#00353"].Wait(z, 700);
});
};
_root.data["aso#18320"]["aso#00353"].Wait = function (z, d) {
trace("Zombie wait!");
Timer.Add(d, function () {
z.is_busy = false;
trace("Zombie wait is over!");
if (!z.is_dead) {
if (z.is_attacking) {
z.is_attacking = false;
_root.data["aso#18320"]["aso#00353"].are_attacking = false;
}
z.is_moving = true;
if (!_root.data["aso#18320"]["aso#00353"].are_attacking) {
_root.data["aso#18320"]["aso#00353"].chooseAction(z);
} else {
z["aso#37679"]["aso#63027"] = "idle";
_root.data["aso#18320"]["aso#00353"].Wait(z, 1500);
}
}
});
};
_root.data["aso#18320"]["aso#00353"].Move = function () {
var _local3 = _root.data["aso#18320"]["aso#00353"]["aso#75005"].length;
var _local4 = _root.data["aso#80994"]["aso#88375"].vx;
while (_local3--) {
var _local2 = _root.data["aso#18320"]["aso#00353"]["aso#75005"][_local3];
_local2.pos.x = _local2.pos.x - _local4;
if (_local2.is_moving && (!_local2["aso#37679"].is_busy)) {
_local2.pos.x = _local2.pos.x + _local2.pos.vx;
}
_local2.pos.y = _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], _local2.pos.x);
if ((_local2["aso#37679"]._x != undefined) && (_local2.pos.x > -250)) {
_local2["aso#37679"]._x = _local2.pos.x;
_local2["aso#37679"]._y = _local2.pos.y;
} else {
_local2["aso#37679"].removeMovieClip();
_root.data["aso#18320"]["aso#00353"].deleteZombie(_local3);
}
}
};
_root.data["aso#18320"]["aso#00353"].addZombieDistanceEvent = function () {
trace("Adding distance event");
var _local2 = _root.data["aso#18320"]["aso#06342"].size;
if (_local2 < _root.data["aso#18320"]["aso#06342"].max_size) {
_root.data["aso#18320"]["aso#06342"].addBats(300);
}
_root.data.events.Add(_root.data["aso#80994"].distance, "x", ">", _root.data["aso#18320"]["aso#06342"].next_swarm_at, _root.data["aso#18320"]["aso#06342"].addBatsDistanceEvent);
_root.data["aso#18320"]["aso#06342"].next_swarm_at = _root.data["aso#80994"].distance.x + _root.data["aso#18320"]["aso#06342"].next_swarm_distance;
};
_root.data["aso#18320"]["aso#00353"].deleteZombie = function (id) {
var _local2 = _root.data["aso#18320"]["aso#00353"]["aso#75005"];
var _local3 = _local2[0];
_local2[0] = _local2[id];
_local2[id] = _local3;
_root.data["aso#18320"]["aso#00353"].count--;
_local2.shift();
};
_root.data["aso#18320"]["aso#00353"].closestFromTheRight = function () {
var _local4 = _root.data["aso#18320"]["aso#00353"]["aso#75005"];
var _local3 = new djo.Vector2P(screen._width, _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], screen._width), 0, 200);
var _local5 = _local4.length;
var _local2 = _local5;
while (_local2--) {
if (_local4[_local2].player_dist < 0) {
_local2++;
if (_local2 < _local5) {
_local3.Copy(_local4[_local2].pos);
if (_local4[_local2].is_dead) {
_local3.vy = 20;
} else {
_local3.vy = 100;
}
return(_local3);
}
return(_local3);
}
}
if (_local5 > 0) {
_local3.Copy(_local4[0].pos);
if (_local4[0].is_dead) {
_local3.vy = 20;
} else {
_local3.vy = 100;
}
return(_local3);
}
return(_local3);
};
_root.data["aso#18320"]["aso#00353"].closestFromTheLeft = function () {
var _local4 = _root.data["aso#18320"]["aso#00353"]["aso#75005"];
var _local5 = _local4.length;
var _local3 = new djo.Vector2P(0, _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], 0), 0, 200);
if (_local5 == 0) {
return(_local3);
}
var _local2 = 0;
while (_local2 < _local5) {
if (_local4[_local2].player_dist >= 0) {
_local2--;
if (_local2 >= 0) {
_local3.Copy(_local4[_local2].pos);
if (_local4[_local2].is_dead) {
_local3.vy = 20;
} else {
_local3.vy = 100;
}
return(_local3);
}
return(_local3);
}
_local2++;
}
_local3.Copy(_local4[_local5 - 1].pos);
if (_local4[_local5 - 1].is_dead) {
_local3.vy = 20;
} else {
_local3.vy = 100;
}
return(_local3);
};
_root.data["aso#18320"]["aso#57038"] = function () {
_root.data["aso#18320"]["aso#06342"].already_adding = false;
_root.data["aso#18320"]["aso#06342"].clearSwarm();
_root.data["aso#18320"]["aso#06342"].Init(_root["aso#12331"]["aso#18320"], 400, 100);
_root.data["aso#18320"]["aso#06342"].setCenter(550, 65);
_root.data["aso#18320"]["aso#06342"].size = 2;
_root.data["aso#18320"]["aso#06342"]["aso#25701"] = true;
_root.data["aso#18320"]["aso#06342"]["aso#94364"] = true;
_root.data["aso#18320"]["aso#00353"]["aso#25701"] = true;
var _local3 = _root.data["aso#18320"]["aso#00353"]["aso#75005"].length;
while (_local3--) {
var _local2 = _root.data["aso#18320"]["aso#00353"]["aso#75005"].shift();
_local2["aso#37679"].removeMovieClip();
}
trace("Zombie array after reset:" + _root.data["aso#18320"]["aso#00353"]["aso#75005"]);
_root.data["aso#18320"]["aso#00353"].no_spawned = 0;
_root.data["aso#18320"]["aso#00353"].max_zombies = 3;
_root.data["aso#18320"]["aso#00353"].speed = 1;
_root.data["aso#18320"]["aso#00353"].no_spawned = 0;
_root.data["aso#18320"]["aso#00353"].are_attacking = false;
_root.data["aso#18320"]["aso#94364"] = true;
};
Frame 49
_root.data.particles = new Object();
_root.data.particles["aso#75005"] = new Object();
_root.data.particles.Add = function (type, x, y, force, ang) {
if ((type == undefined) || (type == "")) {
return(undefined);
}
var _local3;
var _local4;
var _local5;
switch (type) {
case "dirt" :
_local4 = 1 + Math.round(force / 20);
_local5 = 0.174532925199433;
_local3 = _root["aso#43668"].createParticleSet(_root["aso#12331"].particles, x, y, "dirt_particle", _local4, ang, _local5, force, 0.92, 0.7, 1.8, 50, true);
_root.data.particles["aso#75005"][_local3.ime] = _local3;
break;
case "zombie_flesh" :
_local4 = 6;
_local5 = 0.174532925199433;
_local3 = _root["aso#43668"].createParticleSet(_root["aso#12331"].particles, x, y, "dirt_particle", _local4, ang, _local5, force, 0.92, 0.7, 1, 50, true);
_root.data.particles["aso#75005"][_local3.ime] = _local3;
break;
case "blood" :
_local4 = 10;
_local5 = 0.523598775598299;
_local3 = _root["aso#43668"].createParticleSet(_root["aso#12331"].particles, x, y, "blood_particle", _local4, ang, _local5, force / 5, 0.92, 0.7, 0.5, 20, false);
_root.data.particles["aso#75005"][_local3.ime] = _local3;
break;
case "small_explosion" :
var _local8 = _root["aso#12331"].particles.getNextHighestDepth();
var _local10 = _root["aso#12331"].particles.attachMovie("small_explode", "smx" + _local8, _local8, {_x:x, _y:y, _xscale:80, _yscale:80});
_local10.onEnterFrame = function () {
this._x = this._x - _root.data["aso#80994"]["aso#88375"].vx;
};
break;
case "tiny_explosion" :
_local8 = _root["aso#12331"].particles.getNextHighestDepth();
_local10 = _root["aso#12331"].particles.attachMovie("small_explode", "smx" + _local8, _local8, {_x:x, _y:y, _xscale:50, _yscale:50});
_local10.onEnterFrame = function () {
this._x = this._x - _root.data["aso#80994"]["aso#88375"].vx;
};
break;
case "medium_explosion" :
_local8 = _root["aso#12331"].particles.getNextHighestDepth();
_local10 = _root["aso#12331"].particles.attachMovie("small_explode", "smx" + _local8, _local8, {_x:x, _y:y});
_local10.onEnterFrame = function () {
this._x = this._x - _root.data["aso#80994"]["aso#88375"].vx;
};
}
};
_root.data.particles.Update = function () {
for (var _local2 in _root.data.particles["aso#75005"]) {
_root.data.particles["aso#75005"][_local2].Update(_root.data["aso#80994"]["aso#88375"].vx);
}
};
_root.data.particles["aso#57038"] = function () {
var _local2;
do {
_local2 = _root.data.particles["aso#75005"].shift();
_local2.aso#57038();
} while (_local2 != undefined);
};
Frame 50
_root.data.bullets = new Object();
_root.data.bullets["aso#75005"] = new Array();
_root.data.bullets.Add = function (linkage) {
var _local2 = new Object();
_local2.pos = new djo.Vector2P();
_local2.pos.Copy(_root.data["aso#49657"]["aso#69016"].dir);
_local2.pos.Move();
_local2.pos.Normalize();
_local2.pos.Mul(_root.data["aso#49657"]["aso#69016"].bullet_speed);
_local2.pos.plot(_root["aso#12331"].fx);
_local2.is_visible = true;
var _local3 = _root["aso#12331"].particles.getNextHighestDepth();
_local2["aso#37679"] = _root["aso#12331"].particles.attachMovie(linkage, "bullet" + _local3, _local3);
_local2["aso#37679"]._rotation = _root["aso#43668"].vectorAngleDeg(_local2.pos);
_root.data.bullets["aso#75005"].push(_local2);
};
_root.data.bullets.Update = function () {
var _local4 = _root.data.bullets["aso#75005"];
if (!_local4[0].is_visible) {
_local4.shift();
}
var _local3 = 0;
var _local5 = _local4.length;
if (!_local5) {
return(undefined);
}
while (_local3 < _local5) {
var _local2 = _local4[_local3];
if (_local2["aso#37679"] != undefined) {
_local2.pos.x = _local2.pos.x + _local2.pos.vx;
_local2.pos.y = _local2.pos.y + _local2.pos.vy;
_local2["aso#37679"]._x = _local2.pos.x;
_local2["aso#37679"]._y = _local2.pos.y;
_local2.is_visible = _root["aso#43668"].inScreenBoundaries(_local2.pos.x, _local2.pos.y);
if (!_local2.is_visible) {
_local2["aso#37679"].removeMovieClip();
}
}
_local3++;
}
};
_root.data.bullets["aso#57038"] = function () {
var _local3 = _root.data.bullets["aso#75005"].length;
while (_local3--) {
var _local2 = _root.data.bullets["aso#75005"].shift();
_local2["aso#37679"].removeMovieClip();
}
};
Frame 51
_root.data.items = new Object();
_root.data.items["aso#75005"] = new Array();
_root.data.items.linkage = "Items";
_root.data.items["aso#07734"] = _root["aso#12331"].objects;
_root.data.items.no_spawned = 0;
_root.data.items.collect_dist = 10;
_root.data.items.Add = function (nx, ny, itm) {
var _local2 = new Object();
_local2.x = nx;
_local2.y = ny;
trace(((((("\nAdding item(" + _local2.x) + ",") + _local2.y) + ",") + itm) + ")");
_local2.type = itm;
_local2.player_dist = 1000;
switch (itm) {
case 2 :
_local2.onCollect = function () {
_root.data["aso#49657"]["aso#69016"].makeAvailable(2);
};
break;
case 3 :
_local2.onCollect = function () {
_root.data["aso#49657"]["aso#69016"].makeAvailable(3);
};
break;
case 4 :
_local2.onCollect = function () {
_root.data["aso#49657"]["aso#69016"].makeAvailable(4);
};
break;
case 10 :
_local2.onCollect = function () {
_root.data["aso#49657"].Heal(10);
};
break;
case 11 :
_local2.onCollect = function () {
_root.data["aso#49657"].Heal(25);
};
}
var _local3 = _root.data.items["aso#07734"].getNextHighestDepth();
_local2["aso#37679"] = _root.data.items["aso#07734"].attachMovie(_root.data.items.linkage, "item" + _local3, _local3, {_x:_local2.x, _y:_local2.y});
_local2["aso#37679"].gotoAndStop(_local2.type);
_root.data.items.no_spawned++;
_root.data.items["aso#75005"].push(_local2);
};
_root.data.items.Update = function () {
var _local4 = _root.data.items["aso#75005"].length;
if (_local4 < 1) {
return(undefined);
}
while (_local4--) {
var _local3 = _root.data.items["aso#75005"][_local4];
_local3.x = _local3.x - _root.data["aso#80994"]["aso#88375"].vx;
trace((((("before:" + _local3.y) + "o.x=") + _local3.x) + " camera=") + _root.data["aso#80994"]["aso#88375"].vx);
_local3.y = _local3.y + ((_root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], _local3.x) - _local3.y) / 8);
_local3["aso#37679"]._x = _local3.x;
_local3["aso#37679"]._y = _local3.y;
var _local6 = Math.abs(_local3.x - _root.data["aso#49657"].pos.x);
var _local5 = Math.abs(_local3.y - _root.data["aso#49657"].pos.y);
if ((_local6 < _root.data.items.collect_dist) && (_local5 < (_root.data.items.collect_dist * 2))) {
_local3.onCollect();
_local3["aso#37679"].onEnterFrame = function () {
this._xscale = (this._yscale = this._yscale * 1.05);
this._alpha = this._alpha * 0.9;
if (this._alpha < 1) {
this.removeMovieClip();
}
};
_root.data.items.deleteItem(_local4);
}
if (_local3.x < -150) {
_root.data.items.deleteItem(_local4);
}
}
};
_root.data.items.deleteItem = function (id) {
var _local2 = _root.data.items["aso#75005"];
var _local3 = _local2[0];
_local2[0] = _local2[id];
_local2[id] = _local3;
_local2.shift();
};
_root.data.items["aso#57038"] = function () {
var _local3 = _root.data.items["aso#75005"].length;
while (_local3--) {
var _local2 = _root.data.items["aso#75005"].shift();
_local2["aso#37679"].removeMovieClip();
}
};
Frame 52
_root["aso#12331"]._visible = false;
_root["aso#12331"]._alpha = 100;
Mouse.hide();
_root["aso#12331"].gui.dot.onEnterFrame = function () {
this._x = _root._xmouse;
this._y = _root._ymouse;
};
Timer.aso#57038();
_root.data["aso#31690"].over = false;
_root.data["aso#31690"].pause = false;
_root.data["aso#31690"].score = 0;
_root.data["aso#31690"].stats.shots = 0;
_root.data["aso#31690"].stats.hits = 0;
_root.data["aso#31690"].stats.kills = 0;
_root.data["aso#80994"].aso#57038();
_root.Music["aso#82386"] = false;
_root.data.events.aso#57038();
_root.data["aso#49657"].aso#57038();
_root.data["aso#49657"].updateWalls();
_root.data["aso#18320"].aso#57038();
_root.data.particles.aso#57038();
_root.data.bullets.aso#57038();
_root.data.items.aso#57038();
_root.Music.playTutorial();
root.data.cursor.pos.x = -150;
root.data.cursor.pos.y = -150;
_root["aso#12331"].gui.cursor._x = root.data.cursor.pos.x;
_root["aso#12331"].gui.cursor._y = root.data.cursor.pos.y;
_root.data["aso#18320"]["aso#06342"]["aso#25701"] = false;
_root.data["aso#18320"]["aso#06342"]["aso#94364"] = false;
_root.data["aso#18320"]["aso#00353"]["aso#25701"] = false;
_root.data["aso#18320"]["aso#00353"]["aso#94364"] = false;
_root.data["aso#49657"].disableAll();
Frame 61
_root["aso#43668"].skipTutorial = function () {
trace("Skipping tutorial");
var _local4 = _root["aso#12331"].gui.getNextHighestDepth();
var aso#37679 = _root["aso#12331"].gui.attachMovie("MenuButton", "skip_intro", _local4, {_x:350, _y:460, _alpha:0, id:15, onClick:function () {
trace("CLICK");
_root.data["aso#49657"].enableAll();
_root.data["aso#18320"]["aso#94364"] = true;
_root.data["aso#18320"]["aso#06342"].curr_size = 0;
_root.data["aso#18320"]["aso#06342"].max_size = 3;
_root.data["aso#18320"]["aso#06342"].addBunch(3);
_root.data["aso#18320"]["aso#06342"].addBatsTimedEvent();
_root.data["aso#18320"]["aso#06342"]["aso#94364"] = true;
_root.data["aso#18320"]["aso#06342"]["aso#25701"] = true;
_root.data["aso#18320"]["aso#06342"].startLoopAttack();
_root.data["aso#18320"]["aso#00353"]["aso#25701"] = true;
_root.data["aso#18320"]["aso#00353"]["aso#94364"] = true;
_root.data["aso#80994"].distance.x = 0;
_root.data["aso#49657"]["aso#69016"].makeAvailable(2);
_root["aso#43668"].loadLevel1();
_root.Music["aso#82386"] = true;
_root.Music.nextSong("aso#31690");
this.onEnterFrame = function () {
var _local3 = (460 - this._y) / 3;
this._y = this._y + _local3;
if (Math.abs(_local3) < 1) {
this.removeMovieClip();
delete this.onEnterFrame;
_root["aso#12331"].movie.text_window.onStory();
}
};
}});
aso#37679.onEnterFrame = function () {
var _local2 = (365 - aso#37679._y) / 3;
aso#37679._y = aso#37679._y + _local2;
aso#37679._alpha = 100;
if (aso#37679.abs(_local2) < 1) {
delete this.onEnterFrame;
}
};
};
var dlg = ((_root.dlgTutorial = new Array()));
var o = new Object();
o.x = 350;
o.y = 300;
o.msg = "You hear a voice inside your head... \n*click the window to continue";
o.pic = "";
o.style = "holy";
o.onShowAction = _root["aso#43668"].skipTutorial;
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 300;
o.msg = "[Voice]:\nWolfgang... you've finally arrived...\nCan you sense my thoughts?";
o.pic = "1";
o.style = "holy";
o.onShowAction = function () {
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 300;
o.msg = "[Voice]:\nAre you alright?\nCan you walk?\n(press [A] [D] [S])\n*click this window to try it out.";
o.pic = "1";
o.style = "holy";
o.onShowAction = function () {
_root.data["aso#49657"]["aso#94364"] = true;
_root.data["aso#49657"]["aso#13723"] = true;
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 100;
o.y = 100;
o.msg = "*click here to continue...";
o.pic = "";
o.style = "holy";
o.onShowAction = function () {
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 300;
o.msg = "[Voice]:\nDo you think you can jump?\n(press [SPACE] once for a normal jump, or twice for double jump)";
o.pic = "1";
o.style = "holy";
o.onShowAction = function () {
_root.data["aso#49657"]["aso#76397"] = true;
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 300;
o.msg = "[Voice]:\nI'm glad to see you're alright.\nDo you remember how to use your weapons?";
o.pic = "1";
o.style = "holy";
o.onShowAction = function () {
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 300;
o.msg = "[Voice]:\n Move your mouse around you.\nNotice that you cannot aim wherever you want.\nGet used to the limitations of your physical body...\n...once again.";
o.pic = "1";
o.style = "holy";
o.onShowAction = function () {
_root.data["aso#49657"]["aso#51049"] = (_root.data["aso#49657"]["aso#45060"] = true);
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 300;
o.msg = "[Voice]:\n You dropped your gun over there. Go pick it up.\n(move forward ---> )";
o.pic = "1";
o.style = "holy";
o.onShowAction = function () {
var _local3 = screen._width + 100;
var _local2 = _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], _local3);
_local2 = (isNaN(_local2) ? 100 : (_local2));
_root.data.items.Add(_local3, _local2, 2);
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 300;
o.msg = "[Voice]:\n Oh look out! BATS! \n I'll use my mental powers to keep them from attacking you.";
o.pic = "1";
o.style = "holy";
o.onShowAction = function () {
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 100;
o.msg = "[Bats]:\nWarning! Incoming bats.";
o.pic = "3|right";
o.style = "unholy";
o.onShowAction = function () {
};
o.onWrapAction = function () {
Timer.play();
_root.data["aso#18320"]["aso#94364"] = true;
_root.data["aso#18320"]["aso#06342"].addBunch(3);
_root.data["aso#18320"]["aso#06342"].addBatsTimedEvent();
};
dlg.push(o);
o = new Object();
o.x = 100;
o.y = 100;
o.msg = "*click here to continue...";
o.pic = "";
o.style = "holy";
o.onShowAction = function () {
};
o.onWrapAction = function () {
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 300;
o.msg = "[Voice]:\n Ghhhh... \nI cannot hold them no longer!\nYou're too far! Come to me Wolfgang. \nFight your way through the graveyard";
o.pic = "1";
o.style = "holy";
o.onShowAction = function () {
};
o.onWrapAction = function () {
_root.Music.nextSong("aso#31690");
};
dlg.push(o);
o = new Object();
o.x = 350;
o.y = 100;
o.msg = "[Bats]:\nThe spell is broken.\nThe bats will attack you now.";
o.pic = "3|right";
o.style = "unholy";
o.onShowAction = function () {
};
o.onWrapAction = function () {
_root.data["aso#18320"]["aso#06342"]["aso#94364"] = true;
_root.data["aso#18320"]["aso#06342"]["aso#25701"] = true;
_root.data["aso#18320"]["aso#06342"].startLoopAttack();
_root.data["aso#18320"]["aso#00353"]["aso#25701"] = true;
_root.data["aso#18320"]["aso#00353"]["aso#94364"] = true;
_root.data["aso#18320"]["aso#94364"] = true;
_root.data["aso#80994"].distance.x = 0;
_root["aso#43668"].loadLevel1();
_root.Music["aso#82386"] = true;
delete _root["aso#12331"].gui.skip_intro.onClick;
_root["aso#12331"].gui.skip_intro.onEnterFrame = function () {
var _local2 = (460 - this._y) / 3;
this._y = this._y + _local2;
if (Math.abs(_local2) < 1) {
this.removeMovieClip();
delete this.onEnterFrame;
}
};
};
dlg.push(o);
_root["aso#43668"].playDialog = function (dialogArr) {
var TextWindow = _root["aso#12331"].movie.text_window;
_root.data["aso#31690"].movie = true;
_root.data["aso#31690"].freeze = true;
Timer.Pause();
_root["aso#12331"].movie.wide_screen.gotoAndPlay("start");
_root["aso#12331"].movie.wide_screen.onStart = function () {
TextWindow.setEase(2);
TextWindow.setFadeEase(2);
TextWindow.showStory(dialogArr);
};
TextWindow.onStory = function () {
_root["aso#12331"].movie.wide_screen.gotoAndPlay("end");
TextWindow.closeAndHide();
};
_root["aso#12331"].movie.wide_screen.onEnd = function () {
_root.data["aso#31690"].movie = false;
Timer.Play();
};
};
_root["aso#43668"].loadLevel1 = function () {
_root.data["aso#80994"].distance.events["aso#75005"] = new Array();
var _local2 = 200;
var _local3 = _root.data["aso#18320"]["aso#00353"].next_zombie_distance;
while (_local2-- , _local2) {
_root.data["aso#80994"].distance.events.Add(_local2 * _local3, function () {
_root.data["aso#18320"]["aso#00353"].addZombie(screen._width + 50, 200, 1);
});
}
_local3 = _root.data["aso#18320"]["aso#06342"].next_swarm_distance;
_local2 = 133;
while (_local2-- , _local2) {
_root.data["aso#80994"].distance.events.Add(_local2 * _local3, function () {
_root.data["aso#18320"]["aso#06342"].addBats(300);
});
}
_root.data["aso#80994"].distance.events.Add(12500, function () {
_root["aso#43668"].showTimedMessage(5000, 500, 100, "[Wolfgang]:\nHmmmm...\n...a dead policeman?", "", "holy");
var _local2 = _root.data["aso#18320"]["aso#00353"].addZombie(screen._width + 50, 200, 1);
_root.data["aso#18320"]["aso#00353"].setBody(_local2, 10);
_local2.item = 3;
});
_root.data["aso#80994"].distance.events.Add(10000, function () {
_root.data["aso#18320"]["aso#06342"].max_size++;
});
_root.data["aso#80994"].distance.events.Add(15000, function () {
_root["aso#43668"].addBigSwarm(8);
});
_root.data["aso#80994"].distance.events.Add(22000, function () {
_root.data["aso#18320"]["aso#06342"].max_size++;
});
_root.data["aso#80994"].distance.events.Add(25354, function () {
_root["aso#43668"].showTimedMessage(5000, 500, 100, "[Wolfgang]:\nThat zombie hunter has a shotgun...\n I don't think he's gonna need it any more...", "", "holy");
var _local2 = _root.data["aso#18320"]["aso#00353"].addZombie(screen._width + 50, 200, 1);
_root.data["aso#18320"]["aso#00353"].setBody(_local2, 11);
_local2.item = 4;
});
_root.data["aso#80994"].distance.events.Add(28000, function () {
_root["aso#43668"].addBigSwarm(12);
});
_root.data["aso#80994"].distance.events.Add(33000, function () {
_root["aso#43668"].addBigSwarm(16);
});
_root.data["aso#80994"].distance.events.Add(38000, function () {
_root["aso#43668"].addBigSwarm(16);
});
_root.data["aso#80994"].distance.events.Add(50000, function () {
_root["aso#43668"].showTimedMessage(5000, 500, 100, "[Developer]:\nWill be continued by tomorrow...\n I don't think he's gonna need it any more...", "", "holy");
});
_root.data["aso#80994"].distance.events["aso#75005"].sortOn("x", Array.NUMERIC);
};
_root["aso#43668"].addBigSwarm = function (size) {
trace("Adding big swarm!!!");
_root["aso#43668"].showTimedMessage(5000, 500, 100, "[Warning]:\n Large bat swarm ahead!", "3|right", "unholy", function () {
_root.data["aso#18320"]["aso#06342"].addBunch(size);
});
};
Frame 62
_root["aso#43668"].groundHitTest = function (x, y) {
var _local2 = _root["aso#43668"].findNode(aso#75005, x);
y = _root["aso#43668"].getY(aso#75005, x);
};
_root["aso#43668"].getGroundNormal = function (_arg4, x) {
var _local3 = _root["aso#43668"].findNode(_arg4, x);
var _local5 = _arg4[_local3]._y - _arg4[_local3 + 1]._y;
var _local6 = _arg4[_local3]._x - _arg4[_local3 + 1]._x;
var _local2 = new Object();
_local2.pt = new Object();
_local2.pt._x = x;
_local2.pt._y = _arg4[_local3]._y + ((_local5 / _local6) * (x - _arg4[_local3]._x));
_local2.v = new Object();
_local2.v._y = -_local6;
_local2.v._x = _local5;
return(_local2);
};
_root["aso#43668"].getM = function (_arg3, x) {
var _local2 = _root["aso#43668"].findNode(_arg3, x);
var _local5 = _arg3[_local2]._y - _arg3[_local2 + 1]._y;
var _local4 = _arg3[_local2]._x - _arg3[_local2 + 1]._x;
return(_local5 / _local4);
};
_root["aso#43668"].scrollArrItems = function (_arg2, xamt, yamt) {
var _local3 = _arg2.length;
var _local1 = 0;
while (_local1 < _local3) {
_arg2[_local1]._x = _arg2[_local1]._x + xamt;
_arg2[_local1]._y = _arg2[_local1]._y + yamt;
_local1++;
}
};
_root["aso#43668"].updateAttachedArrObjects = function (_arg2) {
var _local3 = _arg2.length;
var _local1 = 0;
while (_local1 < _local3) {
_arg2[_local1].attached._x = _arg2[_local1]._x;
_arg2[_local1].attached._y = _arg2[_local1]._y;
_local1++;
}
};
_root["aso#43668"].scroll = function (xamt, yamt) {
var _local4 = xamt * _root.data["aso#80994"].ground_front.speed;
var _local5 = yamt * _root.data["aso#80994"].ground_front.speed;
var _local6 = xamt * _root.data["aso#80994"].ground_back.speed;
var _local7 = yamt * _root.data["aso#80994"].ground_back.speed;
var _local9 = xamt * _root.data["aso#80994"].bg.speed;
var _local8 = yamt * _root.data["aso#80994"].bg.speed;
_root["aso#43668"].trimAndCreate(_root.data["aso#80994"].ground);
_root["aso#43668"].trimAndCreate(_root.data["aso#80994"].ground_front);
_root["aso#43668"].trimAndCreate(_root.data["aso#80994"].ground_back);
_root["aso#43668"].trimAndCreate(_root.data["aso#80994"].bg);
_root["aso#43668"].trimAndCreate(_root.data["aso#80994"].sky);
_root["aso#43668"].scrollArrItems(_root.data["aso#80994"].ground["aso#75005"], xamt, yamt);
_root["aso#43668"].scrollArrItems(_root.data["aso#80994"].ground_front["aso#75005"], _local4, _local5);
_root["aso#43668"].scrollArrItems(_root.data["aso#80994"].ground_back["aso#75005"], _local6, _local7);
_root["aso#43668"].scrollArrItems(_root.data["aso#80994"].bg["aso#75005"], _local9, _local8);
_root["aso#43668"].scrollArrItems(_root.data["aso#80994"].sky["aso#75005"], xamt / settings.speed.forward, 0);
};
_root["aso#43668"].trimAndCreate = function (o) {
if (o.linkage == "none") {
if (o["aso#75005"][1]._x < 0) {
o["aso#75005"].shift();
_root["aso#43668"].trimAndCreate(o);
}
} else if ((o["aso#75005"][1]._x < 0) && (o["aso#75005"][0]._x < (-o["aso#75005"][0].attached._width))) {
o["aso#75005"][0].attached.removeMovieClip();
o["aso#75005"].shift();
_root["aso#43668"].trimAndCreate(o);
}
var _local6 = o["aso#75005"].length - 1;
if (o["aso#75005"][_local6]._x < (screen._width + (_global.settings.speed.forward * 2))) {
var _local4 = new Object();
var _local5 = o.x_range;
_local4._x = (o["aso#75005"][_local6]._x + (_root.data["aso#80994"].freq * o.speed)) + rn.Random(-_local5, _local5);
_local5 = o.y_range;
_local4._y = (o["aso#75005"][_local6]._y - o.y_median) / 3;
_local4._y = ((o.y_median + _local4._y) + ((_root.data["aso#80994"].slant.koef * (_local4._x - _root.data["aso#80994"]["aso#88375"].x)) / 3)) + rn.Random(-_local5, _local5);
if (o.linkage != "none") {
_local4.type = Math.floor(rn.Random(o.linkage_len)) + 1;
var _local7 = o["aso#37679"].getNextHighestDepth();
_local4.attached = o["aso#37679"].attachMovie(o.linkage, "node" + _local7, _local7, {_xscale:o._xscale, _yscale:o._yscale});
_local4.attached.gotoAndStop(_local4.type);
}
o["aso#75005"].push(_local4);
}
};
_root["aso#43668"].rotateWithEaseA = function (srcRot, destRot, ease) {
if (ease < 1) {
return(0);
}
var _local2 = srcRot - destRot;
if (_local2 > 180) {
destRot = destRot + 360;
} else if (_local2 < -180) {
destRot = destRot - 360;
}
var _local3 = (destRot - srcRot) / ease;
return(_local3);
};
_root["aso#43668"].bounceVector = function (v, w, frict) {
var _local3 = v.projectTo(w);
var _local2 = v.projectTo(w.rightNormal());
_local2.Mul(-1);
v.vx = (_local3.vx + _local2.vx) * frict;
v.vy = (_local3.vy + _local2.vy) * frict;
return(v);
};
_root["aso#43668"].bounceOffGround = function (v, frict) {
var _local5 = _root.data["aso#80994"].ground["aso#75005"];
var _local4 = _root["aso#43668"].findNode(_local5, v.x);
if (_local4 == _local5.length) {
_local4 = _local4 - 2;
}
if (_local4 < 0) {
_local4 = 0;
}
var _local6 = _local5[_local4];
var _local11 = _local5[_local4 + 1];
var _local3 = new djo.Vector2P(_local6._x, _local6._y, _local11._x - _local6._x, _local11._y - _local6._y);
var _local8 = new djo.Vector2P(_local3.x, _local3.y, v.x - _local3.x, v.y - _local3.y);
_local8 = _local8.projectTo(_local3.rightNormal());
var _local9 = v.Magnitude();
var _local7 = ((2 + _local9) - _local8.Magnitude()) / 2;
if (_local9 < 0.2) {
v = v.Intersection(_local3);
} else if (_local7 > 0) {
var _local10 = _local3.leftNormal().Unit();
v.x = v.x + (_local10.vx * _local7);
v.y = v.y + (_local10.vy * _local7);
v = _root["aso#43668"].bounceVector(v, _local3, frict);
}
return(v);
};
_root["aso#43668"].createParticleSet = function (_arg10, x, y, linkage, no_particles, angle, spread, power, damp, friction, g, life, are_bouncable) {
var o = new Object();
o["aso#75005"] = new Array();
o["aso#37679"] = _arg10;
o.x = x;
o.y = y;
o.count = no_particles;
o.angle = angle;
o.spread = spread;
o.linkage = linkage;
o.death = life;
o.life = 0;
o.power = power;
o.damp = damp;
o.friction = friction;
o.g = g;
o.ime = linkage + getTimer();
o.are_bouncable = are_bouncable;
var cnt = 0;
while (cnt < no_particles) {
var _local7 = new Object();
var _local9 = (angle + ((Math.random() * spread) * 2)) - spread;
var _local8 = ((Math.random() * 0.5) * power) + (0.5 * power);
_local7.v = new djo.Vector2P(x, y, _local8 * Math.cos(_local9), _local8 * Math.sin(_local9));
_local7.life = 1;
var _local6 = _arg10.getNextHighestDepth();
_local7["aso#37679"] = _arg10.attachMovie(linkage, "part" + _local6, _local6);
_local7["aso#37679"]._x = x;
_local7["aso#37679"]._y = y;
_local7["aso#37679"]._xscale = (_local7["aso#37679"]._yscale = (Math.random() * 50) + 50);
o["aso#75005"].push(_local7);
cnt++;
}
o.Update = function (amt) {
if ((this.life++) > this.death) {
return(undefined);
}
var _local6 = -1;
cnt = this.count;
while ((_local6++) < cnt) {
var _local4 = this["aso#75005"][_local6];
var _local5 = _local4["aso#37679"];
var _local3 = _local4.v;
if (_local4 != undefined) {
_local3.Mul(this.damp);
_local3.vy = _local3.vy + this.g;
_local3.x = _local3.x + (_local3.vx - amt);
_local3.y = _local3.y + _local3.vy;
_local5._x = _local3.x;
_local5._y = _local3.y;
_local4.life++;
_local5._alpha = (1 - (_local4.life / this.death)) * 100;
if (this.are_bouncable) {
_local3 = _root["aso#43668"].bounceOffGround(_local3, this.friction);
}
}
}
};
o["aso#57038"] = function () {
var _local2 = o["aso#75005"].length;
while (_local2--) {
var _local1 = o["aso#75005"].shift();
_local1["aso#37679"].removeMovieClip();
}
};
return(o);
};
_root["aso#43668"].Shoot = function () {
_root.data["aso#31690"].stats.shots++;
if (_root.data["aso#49657"]["aso#69016"].bullets_linkage != "") {
var _local2 = _root.data["aso#49657"]["aso#69016"].dir.Unit();
_local2.x = (_local2.y = 0);
_root["aso#12331"]["aso#49657"].guns["aso#69016"].guntip.localToGlobal(_local2);
_root.data.bullets.Add(_root.data["aso#49657"]["aso#69016"].bullets_linkage);
}
_root["aso#43668"].checkShootGround();
_root["aso#43668"].checkShootSwarm();
_root["aso#43668"].checkShootZombies();
};
_root["aso#43668"].checkShootGround = function () {
var _local6 = _root.data["aso#80994"].ground["aso#75005"];
var _local4 = 0;
var _local10 = _local6.length;
while (_local4 < (_local10 - 2)) {
var _local5 = new djo.Vector2P();
_local5.Copy(_root.data["aso#49657"]["aso#69016"].dir);
_local5.Mul(12);
var _local8 = new djo.Vector2P(_local6[_local4]._x, _local6[_local4]._y, _local6[_local4 + 1]._x - _local6[_local4]._x, _local6[_local4 + 1]._y - _local6[_local4]._y);
if (_local5.Intersects(_local8)) {
var _local2 = new djo.Vector2P();
_local2.Copy(_local5);
_local2.x = _local2.x + _local2.vx;
_local2.y = _local2.y + _local2.vy;
_local2 = _root["aso#43668"].bounceOffGround(_local2, 2);
var _local7 = _root.data["aso#49657"]["aso#69016"].power;
var _local3 = _local5.Intersection(_local8);
_local3.vx = _local2.vx;
_local3.vy = _local2.vy;
var _local9 = _local2.Angle();
_local2.Mul(0.02);
_local3.Plus(_local2);
_root.data.particles.Add("tiny_explosion", _local3.x, _local3.y, _local7, _local9);
_root.data.particles.Add("dirt", _local3.x, _local3.y, _local7, _local9);
return(undefined);
}
_local4++;
}
};
_root["aso#43668"].checkShootSwarm = function () {
var _local3 = _root.data["aso#18320"]["aso#06342"]["aso#75005"];
var _local9 = ((_root.data["aso#49657"]["aso#69016"].power / 100) * 40) + 10;
var _local5 = _root.data["aso#49657"]["aso#69016"];
var _local4 = new djo.Vector2P();
_local4.Copy(_root.data["aso#49657"]["aso#69016"].dir);
_local4.Move();
var _local8 = 1;
for (var _local10 in _local3) {
if (_local3[_local10].aim_dist < _local9) {
var _local2 = _local3[_local10];
var _local6 = new djo.Vector2P(_local4.x, _local4.y, _local2.pos.x - _local4.x, _local2.pos.y - _local4.y);
var _local7 = _local6.Dot(_local4);
if (_local7 > 0) {
_root.data["aso#31690"].stats.hits++;
_local2.energy = _local2.energy - _local5.energy;
_root.data.particles.Add("small_explosion", _local3[_local10].pos.x, _local3[_local10].pos.y, pwr, ang);
if (_local2.energy < 0) {
_local5.energy = -_local2.energy;
d = _root["aso#12331"].particles.count;
var pwr = _local5.power;
var ang = _local4.Angle();
_root.data.particles.Add("blood", _local3[_local10].pos.x, _local3[_local10].pos.y, pwr, ang);
_root.data["aso#31690"].addScore(50 * _local8);
_local2["aso#37679"].gotoAndPlay("die");
if (_local2.item) {
_root.data.items.Add(_local2["aso#37679"]._x, _local2["aso#37679"]._y, _local2.item);
}
_root.data["aso#31690"].stats.kills++;
_root.data["aso#18320"]["aso#06342"].curr_size--;
_root.data["aso#18320"]["aso#06342"].deleteObject(_local10);
if (_local5.energy < 0) {
return(undefined);
}
_local8++;
}
}
}
}
};
_root["aso#43668"].shootZombiePart = function (z, part) {
if (z.is_dead) {
return(undefined);
}
var _local6 = _root.data["aso#49657"]["aso#69016"];
if (_local6.energy < 0) {
return(undefined);
}
var _local4 = new djo.Vector2P();
var _local5 = _local6.power;
_local4.Copy(_root.data["aso#49657"]["aso#69016"].dir);
_local4.Move();
var _local3 = new djo.Vector2P();
if (part == "head") {
z["aso#37679"].ptHead.localToGlobal(_local3);
} else if (part == "torso") {
z["aso#37679"].ptTorso.localToGlobal(_local3);
} else if (part == "legs") {
z["aso#37679"].ptLegs.localToGlobal(_local3);
}
var _local12 = new djo.Vector2P(_local4.x, _local4.y, _local3.x - _local4.x, _local3.y - _local4.y);
var _local13 = _local12.Dot(_local4);
if (_local13 > 0) {
var _local8 = ((_local4.x > z.pos.x) ? -1 : 1);
_local8 = _local8 * ((z["aso#37679"].facing == "left") ? 1 : -1);
_root.data["aso#31690"].stats.hits++;
var _local9 = 0;
if (part == "head") {
_local9 = _local4.Distance(_local3) / 330;
_local5 = _local5 * (2 + (1 - _local9));
z.energy = z.energy - _local5;
if ((z.energy < 0) && (_local6.power > 24)) {
z["aso#37679"].head.gotoAndPlay(1);
_root.data.particles.Add("zombie_flesh", _local3.x, _local3.y, _local5, _local4.Angle());
}
_local6.energy = _local6.energy - _local5;
z.pos.x = z.pos.x + ((0.05 * _local5) * _local8);
} else if (part == "torso") {
_local9 = _local4.Distance(_local3) / 330;
_local5 = _local5 * (0.7 + (1 - _local9));
z.energy = z.energy - _local5;
_local6.energy = _local6.energy - _local5;
z.pos.x = z.pos.x + ((0.1 * _local5) * _local8);
} else if (part == "legs") {
_local9 = _local4.Distance(_local3);
z.energy = z.energy - (0.3 * _local6.energy);
}
var _local11 = _local4.Angle();
_root.data.particles.Add("small_explosion", _local3.x, _local3.y, _local5, _local11);
_root.data.particles.Add("blood", _local3.x, _local3.y, _local5, _local11);
if ((z["aso#63027"] == "turn") && (z["aso#37679"].is_busy)) {
z.is_moving = false;
z["aso#37679"].is_busy = true;
_root.data["aso#18320"]["aso#00353"].Wait(z, 500);
_root.data["aso#18320"]["aso#00353"].Turn(z);
} else {
z.is_moving = false;
z["aso#37679"].is_busy = true;
_root.data["aso#18320"]["aso#00353"].Wait(z, 500);
}
if (z.energy < 0) {
_local6.energy = -z.energy;
z.is_dead = true;
_root.data["aso#31690"].addScore(300);
var _local10 = random(2) + 1;
_local10 = "die" + _local10;
_root.data["aso#31690"].stats.kills++;
z["aso#37679"].gotoAndPlay(_local10);
if (z.item) {
_root.data.items.Add(z["aso#37679"]._x, z["aso#37679"]._y, z.item);
}
if (_local6.energy < 0) {
return(undefined);
}
score_multiplier++;
} else if (part == "head") {
if (_local8 < 0) {
z["aso#37679"].gotoAndPlay("hit_head_back");
} else {
z["aso#37679"].gotoAndPlay("hit_head");
}
} else if (part == "torso") {
if (_local8 < 0) {
z["aso#37679"].gotoAndPlay("hit_torso_back");
} else {
z["aso#37679"].gotoAndPlay("hit_torso");
}
} else if (part == "legs") {
z["aso#37679"].gotoAndPlay("hit_legs");
}
}
};
_root["aso#43668"].checkShootZombies = function () {
var _local4 = _root.data["aso#18320"]["aso#00353"]["aso#75005"];
var _local3 = ((_root.data["aso#49657"]["aso#69016"].power / 100) * 40) + 10;
var _local6 = 1;
for (var _local5 in _local4) {
var _local2 = _local4[_local5];
if (_local2.aim_head < (_local3 / 2)) {
_root["aso#43668"].shootZombiePart(_local2, "head");
} else if (_local2.aim_torso < (_local3 * 1.5)) {
_root["aso#43668"].shootZombiePart(_local2, "torso");
} else if (_local2.aim_legs < _local3) {
_root["aso#43668"].shootZombiePart(_local2, "legs");
}
}
};
_root["aso#43668"].perpendicularDistance = function (o, w) {
var _local2 = new djo.Vector2P(w.x, w.y, o.x - w.x, o.y - w.y);
var _local1 = w.rightNormal();
var _local5 = _local2.Dot(_local1);
var _local4 = _local1.rawMagnitude();
_local2.vx = (_local5 * _local1.vx) / _local4;
_local2.vy = (_local5 * _local1.vy) / _local4;
var _local6 = _local2.Magnitude();
return(_local6);
};
_root["aso#43668"].updateSwarmDistances = function () {
var _local7 = _root.data["aso#18320"]["aso#06342"]["aso#75005"];
var _local2 = _root.data["aso#49657"]["aso#69016"].dir;
var _local8 = _root.data["aso#49657"];
for (var _local9 in _local7) {
bat = _local7[_local9];
bat.aim_dist = _root["aso#43668"].perpendicularDistance(bat.pos, _local2);
var _local4 = bat.pos.x - _local8.pos.x;
var _local3 = bat.pos.y - _local8.pos.y;
bat.player_dist = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local5 = (new djo.Vector2P(_local2.x, _local2.y)).Distance(bat.pos);
if (((_local5 < 10) && (bat.is_attacking)) && (_root.data["aso#18320"]["aso#06342"]["aso#25701"])) {
bat.is_attacking = false;
var _local6 = new djo.Vector2P(_local2.x, _local2.y, bat.pos.x - _local2.x, bat.pos.y - _local2.y);
_root.data["aso#49657"].Hit(_local6.Mul(0.002), 4);
}
}
_local7.sortOn(["player_dist", "aim_dist"]);
};
_root["aso#43668"].updateZombieDistances = function () {
var _local6 = _root.data["aso#18320"]["aso#00353"]["aso#75005"];
var _local4 = _root.data["aso#49657"]["aso#69016"].dir;
var _local7 = _root.data["aso#49657"];
for (var _local8 in _local6) {
var _local2 = _local6[_local8];
var _local3 = new djo.Vector2P();
_local2["aso#37679"].ptHead.localToGlobal(_local3);
_local2.aim_head = _root["aso#43668"].perpendicularDistance(_local3, _local4);
_local3.x = (_local3.y = 0);
_local2["aso#37679"].ptTorso.localToGlobal(_local3);
_local2.aim_torso = _root["aso#43668"].perpendicularDistance(_local3, _local4);
_local3.x = (_local3.y = 0);
_local2["aso#37679"].ptLegs.localToGlobal(_local3);
_local2.aim_legs = _root["aso#43668"].perpendicularDistance(_local3, _local4);
var _local5 = _local2.pos.x - _local7.pos.x;
_local2.player_dist = _local5;
if (!_local2.is_busy) {
_root.data["aso#18320"]["aso#00353"].chooseAction(_local2);
}
}
_local6.sortOn(["player_dist", "aim_dist"]);
};
_root["aso#43668"].inScreenBoundaries = function (x, y) {
return((((x < screen._width) && (x > 0)) && (y > 0)) && (y < screen._height));
};
_root["aso#43668"].logicTest = function (a, test, b) {
switch (test) {
case "<" :
return(a < b);
case "<=" :
return(a <= b);
case "==" :
return(a == b);
case ">" :
return(a > b);
case ">=" :
return(a >= b);
case "!=" :
return(a != b);
}
if (test.charAt(0) == "~") {
var _local3 = Number(test.substr(1));
return((a > (b - _local3)) && (a < (b + _local3)));
}
};
_root["aso#43668"].fadeOut = function (_arg2, onFinished) {
_arg2.onEnterFrame = function () {
this._alpha = this._alpha - 5;
if (this._alpha < 1) {
onFinished();
delete this.onEnterFrame;
}
};
};
_root["aso#43668"].fadeIn = function (_arg2, onFinished) {
_arg2.onEnterFrame = function () {
this._alpha = this._alpha + 5;
if (this._alpha > 99) {
onFinished();
delete this.onEnterFrame;
}
};
};
_root["aso#43668"].gameOver = function () {
_root.Music.Fade("out");
_root.data["aso#80994"]["aso#88375"].vx = 0;
_root.data["aso#31690"].over = true;
_root.data["aso#18320"]["aso#06342"]["aso#25701"] = false;
_root.data["aso#18320"]["aso#06342"]["aso#94364"] = false;
_root.data["aso#18320"]["aso#06342"].stop_loop_attack = true;
_root.data["aso#18320"]["aso#00353"]["aso#25701"] = false;
_root.data["aso#18320"]["aso#00353"]["aso#94364"] = false;
_root.data["aso#49657"].disableAll();
Timer.clearTimers();
_root["aso#12331"]["aso#49657"].guns["aso#69016"].gotoAndStop(_root.data["aso#49657"]["aso#69016"].label);
_root["aso#12331"]["aso#49657"].guns._rotation = 0;
_root["aso#12331"]["aso#49657"].gotoAndPlay("die");
_root["aso#12331"]["aso#49657"].onEnterFrame = function () {
this._y = this._y + ((_root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], this._x) - this._y) / 4);
};
var TextWindow = _root["aso#12331"].movie.text_window;
_root["aso#12331"].movie.wide_screen.gotoAndPlay("start");
_root["aso#12331"].movie.wide_screen.onStart = function () {
TextWindow.setEase(2);
TextWindow.setFadeEase(2);
var _local2 = Math.round((_root.data["aso#31690"].stats.hits / _root.data["aso#31690"].stats.shots) * 10000) / 100;
var _local3 = ((((((((("GAME OVER\n\nShots : " + _root.data["aso#31690"].stats.shots) + newline) + "Hits : ") + _root.data["aso#31690"].stats.hits) + newline) + "Kills : ") + _root.data["aso#31690"].stats.kills) + "\nAccuracy : ") + _local2) + "%\n\n-click here to continue-";
TextWindow.showMessageAt(350, 200, _local3, "", "holy", undefined, function () {
_root["aso#43668"].fadeOut(_root["aso#12331"], function () {
_root.Music.StopSong();
_root.gotoAndPlay(8);
});
});
};
trace("Game Over");
};
_root["aso#43668"].Pause = function () {
_root.data["aso#31690"].pause = true;
_root.data["aso#18320"]["aso#06342"]["aso#25701"] = false;
_root.data["aso#18320"]["aso#06342"]["aso#94364"] = false;
_root.data["aso#18320"]["aso#06342"].stop_loop_attack = true;
_root.data["aso#18320"]["aso#00353"]["aso#25701"] = false;
_root.data["aso#18320"]["aso#94364"] = false;
_root.data["aso#49657"].disableAll();
_root.data["aso#80994"]["aso#88375"].vx = 0;
Timer.Pause();
var TextWindow = _root["aso#12331"].movie.text_window;
_root["aso#12331"].movie.wide_screen.onEnd = function () {
_root.Music.Fade("in", true);
_root.data["aso#31690"].pause = false;
_root.keys.is_P_down = false;
_root.data["aso#18320"]["aso#06342"]["aso#94364"] = true;
_root.data["aso#18320"]["aso#06342"]["aso#25701"] = true;
_root.data["aso#18320"]["aso#06342"].startLoopAttack();
_root.data["aso#18320"]["aso#00353"]["aso#25701"] = true;
_root.data["aso#18320"]["aso#94364"] = true;
_root.data["aso#49657"].enableAll();
Timer.Play();
};
_root["aso#12331"].movie.wide_screen.onStart = function () {
_root.Music.Fade("out");
TextWindow.setEase(2);
TextWindow.setFadeEase(2);
TextWindow.showMessageAt(350, 200, " PAUSE \n-click here to continue-", "", "holy", undefined, function () {
_root["aso#12331"].movie.wide_screen.gotoAndPlay("end");
});
};
_root["aso#12331"].movie.wide_screen.gotoAndPlay("start");
};
_root["aso#43668"].showTimedMessage = function (time, nx, ny, msg, pic, style, action) {
var TextWindow = _root["aso#12331"].movie.text_window;
o = new Object();
TextWindow.setEase(2);
TextWindow.setFadeEase(2);
var _local2 = function () {
Timer.Add(5000, function () {
TextWindow.fadeOutContent();
action();
});
};
TextWindow.onShown = TextWindow.closeAndHide;
TextWindow.showMessageAt(nx, ny, msg, pic, style, _local2, undefined, false);
};
_root["aso#43668"].spawnHealthItem = function () {
var _local4 = 10 - (_root.data["aso#49657"].health / 10);
var _local3 = 150;
var _local2 = 0;
if (random(_local3) > (_local3 - (2 * _local4))) {
_local2 = 10;
}
if (random(_local3) > (_local3 - _local4)) {
_local2 = 11;
}
trace("Health item =" + _local2);
return(_local2);
};
Frame 63
_root.data.events.Add(Timer, "relative", ">", 1000, function () {
_root["aso#43668"].playDialog(_root.dlgTutorial);
});
Frame 65
_root["aso#43668"].onEnterFrame = function () {
fps.Update();
Timer.Update();
if (_root.data["aso#31690"].pause) {
return(undefined);
}
_root.data.particles.Update();
if (_root.data["aso#18320"]["aso#94364"]) {
_root["aso#43668"].moveEnemies();
}
_root.data.bullets.Update();
_root.data.events.Check();
_root.data["aso#80994"].distance.events.Check();
_root.data.items.Update();
if (_root.data["aso#31690"].over) {
return(undefined);
}
if (_root.keys.is_P_down && (!_root.data["aso#31690"].pause)) {
_root["aso#43668"].Pause();
}
Timer.Check();
var _local5 = 0;
var _local2 = _root.data["aso#49657"];
if (_local2["aso#51049"]) {
_root["aso#43668"].processMouse();
}
_root["aso#43668"].processKeys();
var _local9 = _root.keys.is_A_down;
var _local7 = _root.keys.is_D_down;
var _local8 = _root.keys.is_S_down;
var _local16 = _root.keys.is_W_down;
var _local10 = _root.keys.is_SPACE_down;
var _local13 = _root.keys.is_Q_down;
var _local15 = _root["aso#12331"]["aso#49657"]["aso#63027"];
var _local3 = "";
if (_local16) {
}
if (_local13) {
}
if (!_root.data["aso#49657"].is_busy) {
if (!(((_local9 && (_local7)) && (_local10)) && (_local8))) {
_local3 = "idle";
}
if (_local9) {
var _local6 = settings.speed.backward;
if (_local2.pos.x > (_local2.wall_backward.x + _local6)) {
_local2.pos.vx = -_local6;
} else if (_local2.pos.y < (_local2.wall_backward.y - _local2.wall_backward.vy)) {
_local2.pos.vx = -settings.speed.backward;
} else {
_local2.pos.vx = 0;
_local2.pos.x = _local2.wall_backward.x;
}
_local5 = 0.2 * settings.speed.backward;
_local3 = "run_back";
} else if (_local7) {
var _local6 = settings.speed.forward;
if (_local2.pos.x < (_local2.wall_forward.x - _local6)) {
_local2.pos.vx = _local6;
} else if (_local2.pos.y < (_local2.wall_forward.y - _local2.wall_forward.vy)) {
_local2.pos.vx = _local6;
} else {
trace("Plyr=" + _local2.pos);
trace("Wall=" + _local2.wall_forward);
_local2.pos.vx = 0;
_local2.pos.x = _local2.wall_forward.x;
}
var _local12 = 1 - ((_local2.pos.x * 2) / screen._width);
_local2.pos.vx = _local2.pos.vx * _local12;
_local5 = (_local12 - 1) * _local6;
_local3 = "run";
} else if (_local8) {
_local3 = "crouch";
}
if (_local10 && (_local2["aso#19712"])) {
if (_local2.jump == 1) {
_local3 = ((_local2.pos.vx >= 0) ? "jump_flip_right" : "jump_flip_left");
_root["aso#12331"]["aso#49657"].gotoAndPlay(_local3);
_local2.pos.vy = settings.speed.jump;
_local2["aso#19712"] = false;
_local2.jump = 0;
_local2["aso#69016"].limit.Set(0, 360);
}
if (_local2.jump == 2) {
_local2["aso#19712"] = false;
_local3 = ((_local2.pos.vx >= 0) ? "jump_right" : "jump_left");
_root["aso#12331"]["aso#49657"].gotoAndPlay(_local3);
_local2.pos.vy = settings.speed.jump;
_local2.jump = 1;
}
}
var _local4 = _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], _local2.pos.x);
if ((_local4 > _local2.pos.y) || (_local2.pos.vy < 0)) {
if (_local2.jump == 1) {
if ((_local2.pos.y + _local2.pos.vy) <= _local4) {
_root["aso#12331"]["aso#49657"]["aso#63027"] = ((_local2.pos.vx >= 0) ? "jump_right" : "jump_left");
_local2.pos.y = _local2.pos.y + _local2.pos.vy;
_local2.pos.vy = _local2.pos.vy + settings.speed.gravity;
var _local11 = Math.floor((_local2.pos.vy / settings.speed.jump) * -10) + 64;
if (_root["aso#12331"]["aso#49657"]["aso#63027"] == "jump_left") {
_local11 = _local11 + 22;
}
_root["aso#12331"]["aso#49657"].gotoAndStop(_local11);
} else {
_local2.pos.y = _local4;
_local2.jump = 2;
_local2["aso#19712"] = true;
_local2.pos.vy = 0;
_local3 = "landed";
_root["aso#12331"]["aso#49657"].play();
}
} else if (_local2.jump == 0) {
if ((_local2.pos.y + _local2.pos.vy) <= _local4) {
_root["aso#12331"]["aso#49657"]["aso#63027"] = ((_local2.pos.vx >= 0) ? "jump_flip_right" : "jump_flip_left");
_local2.pos.vy = _local2.pos.vy + settings.speed.gravity;
_local2.pos.y = _local2.pos.y + _local2.pos.vy;
var _local11 = Math.floor((_local2.pos.vy / 17) * 25) + 123;
if (_root["aso#12331"]["aso#49657"]["aso#63027"] == "jump_flip_left") {
_local11 = _local11 + 53;
}
_root["aso#12331"]["aso#49657"].gotoAndStop(_local11);
} else {
_local2.pos.y = _local4;
_local2.jump = 2;
_local2["aso#19712"] = true;
_local2.pos.vy = 0;
_local3 = "landed";
_root["aso#12331"]["aso#49657"].play();
_local2["aso#69016"].limit.Set();
}
} else {
_local2.pos.y = _local4;
_local2.jump = 2;
_local2.pos.vy = 0;
_local2["aso#69016"].limit.Set();
_local2["aso#19712"] = true;
}
} else {
_local2.pos.y = _local4;
_local2.jump = 2;
_local2.pos.vy = 0;
_local2["aso#19712"] = true;
}
_local2.pos.x = _local2.pos.x + _local2.pos.vx;
_root["aso#12331"]["aso#49657"]._x = _local2.pos.x;
_root["aso#12331"]["aso#49657"]._y = _local2.pos.y;
if (_local15 != _local3) {
if (_local2.jump == 2) {
_root["aso#12331"]["aso#49657"]["aso#63027"] = _local3;
_root["aso#12331"]["aso#49657"].gotoAndPlay(_local3);
}
}
_local2.pos.vx = 0;
}
_root.data["aso#80994"]["aso#88375"].vx = -_local5;
_root.data["aso#80994"].distance.x = _root.data["aso#80994"].distance.x - _local5;
var _local17 = _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], _root.data["aso#80994"]["aso#88375"].x);
var _local14 = _local17 - _root.data["aso#80994"]["aso#88375"].y;
_root["aso#43668"].scroll(_local5, -_local14);
_root["aso#43668"].drawLevel();
_local2.updateWalls();
};
_root["aso#43668"].processMouse = function () {
if (!_root.data["aso#49657"]["aso#51049"]) {
return(undefined);
}
var _local7 = new djo.Vector2P(_root._xmouse, _root._ymouse, 0, 0);
var _local2 = _root.data.cursor.pos;
var _local9 = _root.data.cursor.koef;
_local2.x = _local2.x + ((_local2.vx = (_local7.x - _local2.x) / _local9));
_local2.y = _local2.y + ((_local2.vy = (_local7.y - _local2.y) / _local9));
_root.data["aso#49657"]["aso#69016"].updateDir();
var _local6 = _root.data["aso#49657"]["aso#69016"].dir.headTail(_local2);
var _local11 = _root.data["aso#49657"]["aso#69016"].dir.headTail(_local7);
var _local10 = _local11.Magnitude();
var _local3 = _root["aso#12331"]["aso#49657"].guns["aso#69016"]._rotation;
_local3 = _root["aso#43668"].vectorAngleDeg(_local6);
var _local13 = _root["aso#43668"].vectorAngleDeg(_local11);
var _local8 = _root.data["aso#49657"]["aso#69016"].limit.Check(_local3, _local13);
if (_local8 != _local3) {
_local3 = _local8;
var _local12 = _local3 * deg2rad;
var _local15 = (_local10 * Math.cos(_local12)) + _local6.x;
var _local14 = (_local10 * Math.sin(_local12)) + _local6.y;
_local2.x = _local15;
_local2.y = _local14;
}
_root["aso#12331"].gui.cursor._x = _local2.x;
_root["aso#12331"].gui.cursor._y = _local2.y;
_root["aso#12331"]["aso#49657"].guns["aso#69016"]._rotation = _local3;
var _local5 = new djo.Vector2P(0, 0, 0, 0);
_root["aso#12331"]["aso#49657"].Head.localToGlobal(_local5);
_local5 = _local5.headTail(_local2);
var _local4 = _root["aso#43668"].vectorAngleDeg(_local5);
if ((_local4 < 280) && (_local4 > 35)) {
if (_local4 > 245) {
_root["aso#12331"]["aso#49657"].Head.head._rotation = 390 - ((1 - ((280 - _local4) / 30)) * 120);
} else {
_root["aso#12331"]["aso#49657"].Head.head._rotation = 35;
}
} else {
_root["aso#12331"]["aso#49657"].Head.head._rotation = _local4;
}
};
_root["aso#43668"].processKeys = function () {
var _local2 = _root.data["aso#49657"];
if (_local2["aso#94364"]) {
_root.keys.is_A_down = Key.isDown(65);
_root.keys.is_D_down = Key.isDown(68);
}
if (_local2["aso#13723"]) {
_root.keys.is_S_down = Key.isDown(83);
}
_root.keys.is_W_down = Key.isDown(87);
if (_local2["aso#76397"]) {
_root.keys.is_SPACE_down = Key.isDown(32);
}
_root.keys.is_P_down = Key.isDown(80);
_root.keys.is_Q_down = Key.isDown(81);
_root.keys.is_5_down = Key.isDown(53);
_root.keys.is_4_down = Key.isDown(52);
_root.keys.is_3_down = Key.isDown(51);
_root.keys.is_2_down = Key.isDown(50);
_root.keys.is_1_down = Key.isDown(49);
_root.keys.is_ESC_down = Key.isDown(27);
if (_root.keys.is_1_down) {
_root.data["aso#49657"]["aso#69016"].changeWeapon(1);
} else if (_root.keys.is_2_down) {
_root.data["aso#49657"]["aso#69016"].changeWeapon(2);
} else if (_root.keys.is_3_down) {
_root.data["aso#49657"]["aso#69016"].changeWeapon(3);
} else if (_root.keys.is_4_down) {
_root.data["aso#49657"]["aso#69016"].changeWeapon(4);
}
};
_root["aso#43668"].onMouseDown = function () {
if (_root.data["aso#31690"].pause) {
return(undefined);
}
if (_root.data["aso#49657"]["aso#45060"]) {
var _local2 = _root.data["aso#49657"]["aso#69016"].last_shot;
var _local3 = Timer.now;
var _local4 = (_root.data["aso#49657"]["aso#69016"].is_shooting = (_local3 - _local2) < _root.data["aso#49657"]["aso#69016"].delay);
if (!_root.data["aso#49657"]["aso#69016"].is_shooting) {
_root.data["aso#49657"]["aso#69016"].energy = _root.data["aso#49657"]["aso#69016"].power;
_root["aso#12331"]["aso#49657"].guns["aso#69016"].play();
_root.data["aso#49657"]["aso#69016"].last_shot = Timer.now;
}
}
};
_root["aso#43668"].drawTerrain = function (o, col) {
var _local6 = o["aso#37679"];
var _local5 = o["aso#75005"];
_local6.clear();
_local6.beginFill(col, 100);
_local6.moveTo(0, _root["aso#43668"].getY(_local5, 0));
var _local7 = _local5.length - 1;
var _local2 = 0;
while (_local2 < _local7) {
var _local4 = _local5[_local2]._x;
var _local3 = _local5[_local2]._y;
_local6.lineTo(_local4, _local3);
_local2++;
}
_local6.lineTo(screen._width, _root["aso#43668"].getY(_local5, screen._width));
_local6.lineTo(screen._width, screen._height);
_local6.lineTo(0, screen._height);
_local6.endFill();
};
_root["aso#43668"].drawLevel = function () {
_root["aso#43668"].drawTerrain(_root.data["aso#80994"].ground_front, 0);
_root["aso#43668"].drawTerrain(_root.data["aso#80994"].ground, 1579032);
_root["aso#43668"].drawTerrain(_root.data["aso#80994"].ground_back, 3158064);
_root["aso#43668"].drawTerrain(_root.data["aso#80994"].bg, 4079166);
_root["aso#43668"].updateAttachedArrObjects(_root.data["aso#80994"].ground_front["aso#75005"]);
_root["aso#43668"].updateAttachedArrObjects(_root.data["aso#80994"].ground_back["aso#75005"]);
_root["aso#43668"].updateAttachedArrObjects(_root.data["aso#80994"].sky["aso#75005"]);
};
_root["aso#43668"].moveEnemies = function () {
_root.data["aso#18320"]["aso#06342"].processObjects();
_root["aso#43668"].updateSwarmDistances();
_root.data["aso#18320"]["aso#00353"].Move();
_root["aso#43668"].updateZombieDistances();
};
_root["aso#43668"].vectorAngleDeg = function (v) {
return(((v.Angle() * rad2deg) + 360) % 360);
};
Frame 66
_root["aso#12331"]._visible = true;
stop();
Frame 101
stop();
Symbol 10 MovieClip [SmokeParticle] Frame 1
this.cacheAsBitmap = true;
stop();
Symbol 23 MovieClip Frame 40
stop();
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 2
stop();
Symbol 29 MovieClip Frame 3
stop();
Symbol 29 MovieClip Frame 4
stop();
Symbol 33 MovieClip [TextWindow] Frame 1
function easeItOut(startPos, endPos, factor) {
return((endPos - startPos) / factor);
}
function Init(x, y, msg, ease, pictureID, picturePos) {
this.pictureID = pictureID;
this.PictureBox.setPicture(pictureID, picturePos);
this.PictureBox.setPicture(1, picturePos);
trace(((((((("Initializing textWindow:(" + x) + ",") + y) + ",") + msg) + ",") + ease) + ")");
this.ptCenter = new Object({x:x, y:y});
this.setEase(ease);
this.setText(msg);
this.updateContent();
}
function setCenter(x, y) {
trace(((("Setting the center of the window:(" + x) + ",") + y) + ")");
this.ptCenter = new Object({x:x, y:y});
}
function setEase(ease) {
this.easeFactor = ease;
}
function setFadeEase(ease) {
this.fadeEaseFactor = ease;
}
function setPosition(x, y) {
trace(((("Setting the position of the window:(" + x) + ",") + y) + ")");
this._x = x;
this._y = y;
}
function hoverTo(x, y) {
if (isNaN(x)) {
x = this.ptCenter.x;
}
if (isNaN(y)) {
y = this.ptCenter.y;
}
trace(((("Hovering to (" + x) + ",") + y) + ")");
this.dummy = 0;
this.onEnterFrame = function () {
this._x = this._x + ((dx = easeItOut(this._x, x, this.easeFactor)));
this._y = this._y + ((dy = easeItOut(this._y, y, this.easeFactor)));
this.filters = [new flash.filters.BlurFilter(Math.abs(dx), Math.abs(dy), 1)];
this.dummy = this.dummy + easeItOut(this.dummy, 100, this.easeFactor);
if (this.dummy > 99.9) {
this.dummy = 0;
delete this.onEnterFrame;
this.filters = [];
onHover();
}
};
}
function updateContent() {
var _local7 = TextBox._width;
var _local3 = TextBox._height;
var _local6 = (PictureBox._width ? 60 : 0);
var _local5 = (PictureBox._height ? 80 : 0);
var _local2 = 0;
if (_local7) {
_local2 = _local2 + this.padding;
}
if (_local6) {
_local2 = _local2 + this.padding;
}
if (_local2) {
_local2 = _local2 + this.padding;
}
this.winWidth = (_local7 + _local6) + _local2;
_local2 = 0;
if (_local3 || (_local5)) {
_local2 = _local2 + this.padding;
}
if (_local2) {
_local2 = _local2 + this.padding;
}
this.winHeight = ((_local3 > _local5) ? (_local3) : (_local5)) + _local2;
var _local4 = this.winWidth / 2;
var _local8 = this.winHeight / 2;
if (this.pictureID) {
if (this.pictureAlign == "left") {
PictureBox._x = ((-_local4) + this.padding) + (_local6 / 2);
PictureBox._y = ((-_local8) + this.padding) + (_local5 / 2);
TextBox._x = ((-_local4) + (2 * this.padding)) + _local6;
TextBox._y = (-_local3) / 2;
} else if (this.pictureAlign == "right") {
TextBox._x = (-_local4) + this.padding;
TextBox._y = (-_local3) / 2;
PictureBox._x = (((-_local4) + (2 * this.padding)) + _local7) + (_local6 / 2);
PictureBox._y = ((-_local8) + this.padding) + (_local5 / 2);
}
} else {
trace("No picture");
TextBox._x = (-_local7) / 2;
TextBox._y = (-_local3) / 2;
}
this.winTop = -_local8;
this.winLeft = -_local4;
this.winRight = _local4;
this.winBottom = _local8;
}
function setText(msg) {
if ((msg == "") || (msg == undefined)) {
trace("Is msg==''? " + (msg == ""));
TextBox._alpha = (BG._alpha = 0);
BG._width = (topRight._width + topLeft._width) + 5;
BG._height = (topRight._height + bottomRight._height) + 5;
TextBox.Field.autoSize = true;
TextBox.Field.text = "";
return(undefined);
}
TextBox._alpha = 0;
TextBox.Field.wordWrap = false;
TextBox.Field.autoSize = true;
TextBox.Field.text = msg;
}
function setWindowStyle(style) {
if ((style != "") && (style != undefined)) {
this.windowStyle = style;
this.gotoAndStop(this.windowStyle);
}
}
function setPicture(pic) {
var _local3 = pic.split("|");
var _local2 = Number(_local3[0]);
var _local4 = _local3[1];
PictureBox._alpha = 0;
this.pictureID = (isNaN(_local2) ? 0 : (_local2));
this.pictureAlign = ((_local4 == undefined) ? "left" : (_local4));
PictureBox.gotoAndStop(this.pictureID + 1);
}
function setContent(msg, picture, style) {
this.winWidth = (this.winHeight = 0);
setText(msg);
setPicture(picture);
setWindowStyle(style);
updateContent();
}
function fadeInContent() {
if (TextBox.Field.text == "") {
onFadeInContent();
return(undefined);
}
this.onEnterFrame = function () {
TextBox._alpha = TextBox._alpha + ((100 - TextBox._alpha) / fadeEaseFactor);
if (this.pictureID) {
PictureBox._alpha = PictureBox._alpha + ((100 - PictureBox._alpha) / fadeEaseFactor);
}
if (TextBox._alpha > 99) {
TextBox._alpha = (PictureBox._alpha = 100);
delete this.onEnterFrame;
onFadeInContent();
}
};
}
function fadeOutContent() {
if (TextBox.Field.text == "") {
onFadeOutContent();
return(undefined);
}
this.onEnterFrame = function () {
TextBox._alpha = TextBox._alpha + ((-TextBox._alpha) / fadeEaseFactor);
if (this.pictureID) {
PictureBox._alpha = PictureBox._alpha + ((-PictureBox._alpha) / fadeEaseFactor);
}
if (TextBox._alpha <= 0) {
TextBox._alpha = (PictureBox._alpha = 0);
delete this.onEnterFrame;
onFadeOutContent();
}
};
}
function Unwrap() {
if (TextBox.Field.text == "") {
onUnwrap();
return(undefined);
}
this.dummy = 0;
BG._alpha = 10;
this.onEnterFrame = function () {
topLeft._x = topLeft._x + easeItOut(topLeft._x, winLeft, this.easeFactor);
topLeft._y = topLeft._y + easeItOut(topRight._y, winTop, this.easeFactor);
topRight._x = topRight._x + easeItOut(topRight._x, winRight, this.easeFactor);
topRight._y = topRight._y + easeItOut(topRight._y, winTop, this.easeFactor);
bottomLeft._x = bottomLeft._x + easeItOut(bottomLeft._x, winLeft, this.easeFactor);
bottomLeft._y = bottomLeft._y + easeItOut(bottomRight._y, winBottom, this.easeFactor);
bottomRight._x = bottomRight._x + easeItOut(bottomRight._x, winRight, this.easeFactor);
bottomRight._y = bottomRight._y + easeItOut(bottomRight._y, winBottom, this.easeFactor);
BG._width = BG._width + easeItOut(BG._width, this.winWidth, this.easeFactor);
BG._height = BG._height + easeItOut(BG._height, this.winHeight, this.easeFactor);
this.dummy = this.dummy + easeItOut(this.dummy, 100, this.easeFactor);
if (this.dummy > 99.6) {
trace("textWindow is now unwrapped.");
this.dummy = 0;
this.is_wrapped = false;
delete this.onEnterFrame;
onUnwrap();
}
};
}
function Wrap() {
if (TextBox.Field.text == "") {
onWrap();
return(undefined);
}
this.dummy = 100;
this.onEnterFrame = function () {
topLeft._x = topLeft._x + easeItOut(topLeft._x, 0, this.easeFactor);
topLeft._y = topLeft._y + easeItOut(topRight._y, 0, this.easeFactor);
topRight._x = topRight._x + easeItOut(topRight._x, 0, this.easeFactor);
topRight._y = topRight._y + easeItOut(topRight._y, 0, this.easeFactor);
bottomLeft._x = bottomLeft._x + easeItOut(bottomLeft._x, 0, this.easeFactor);
bottomLeft._y = bottomLeft._y + easeItOut(bottomRight._y, 0, this.easeFactor);
bottomRight._x = bottomRight._x + easeItOut(bottomRight._x, 0, this.easeFactor);
bottomRight._y = bottomRight._y + easeItOut(bottomRight._y, 0, this.easeFactor);
BG._width = BG._width + easeItOut(BG._width, 1, this.easeFactor);
BG._height = BG._height + easeItOut(BG._height, 1, this.easeFactor);
this.dummy = this.dummy + easeItOut(this.dummy, 0, this.easeFactor);
if (this.dummy < 0.04) {
delete this.onRelease;
this.dummy = 0;
trace("textWindow is now wrapped.");
this.is_wrapped = true;
delete this.onEnterFrame;
onWrap();
}
};
}
function showMessageAt(x, y, msg, pic, style, on_show_action, on_wrap_action, _is_clickable) {
setContent(msg, pic, style);
this.is_clickable = ((_is_clickable == undefined) ? true : (_is_clickable));
onHover = Unwrap;
onUnwrap = fadeInContent;
trace("Is_clickable=" + this.is_clickable);
onFadeInContent = function () {
if (on_show_action != undefined) {
on_show_action();
}
if (this.is_clickable) {
this.onRelease = function () {
delete this.onRelease;
fadeOutContent();
};
} else {
delete this.onRelease;
}
};
onFadeOutContent = Wrap;
onWrap = function () {
if (on_wrap_action != undefined) {
on_wrap_action();
}
onShown();
};
hoverTo(x, y);
}
function nextMessage() {
this.msgID++;
if (this.msgID < this.arrMsgs.length) {
var _local2 = this.arrMsgs[this.msgID];
this.showMessageAt(_local2.x, _local2.y, _local2.msg, _local2.pic, _local2.style, _local2.onShowAction, _local2.onWrapAction);
} else {
this.onStory();
}
}
function showStory(arrMsgs) {
this.arrMsgs = arrMsgs;
this.msgID = -1;
this.onShown = this.nextMessage;
this.nextMessage();
}
function closeAndHide() {
var _local2 = this.arrMsgs.length;
while (_local2--) {
this.arrMsgs.shift();
}
delete this.onHover;
this.onWrap = function () {
this.setEase(20);
this.hoverTo(-150, -150);
};
this.fadeOutContent();
}
stop();
var ptCenter;
var winTop = 0;
var winLeft = 0;
var winRight = 0;
var winBottom = 0;
var winWidth = 0;
var winHeight = 0;
var easeFactor = 5;
var fadeEaseFactor = 5;
var padding = 10;
var is_wrapped = true;
var dummy = 0;
var msg = "";
var arrMsg;
var msgID = 0;
var pictureID = 0;
var pictureAlign = "left";
var windowStyle = "holy";
var is_clickable = true;
onShown = function () {
trace("onShown event called");
};
onStory = function () {
trace("onStory event called");
};
onHover = function () {
trace("onHover event called");
};
onUnwrap = function () {
trace("onUnwrap event called");
};
onWrap = function () {
trace("onWrap event called");
};
onFadeInContent = function () {
trace("onFadeInContent event called");
};
onFadeOutContent = function () {
trace("onFadeOutContent event called");
};
Symbol 37 MovieClip [blood_particle] Frame 100
this.removeMovieClip();
Symbol 38 MovieClip [dirt_particle] Frame 100
this.removeMovieClip();
Symbol 40 MovieClip [Bat] Frame 1
this["aso#63027"] = "flap";
Symbol 40 MovieClip [Bat] Frame 7
gotoAndPlay(this["aso#63027"]);
Symbol 40 MovieClip [Bat] Frame 11
var curr_ang = this._rotation;
var dest_ang = ((curr_ang + 30) + ((Math.random() * 720) - 360));
var power = _root.data["aso#49657"]["aso#69016"].power;
var veloc = _root.data["aso#49657"]["aso#69016"].dir.Unit();
veloc.Mul((power / 10) + 5);
var step = 0;
var steps = 50;
this.onEnterFrame = function () {
this.veloc.vy = this.veloc.vy + 1.3;
this._x = this._x + this.veloc.vx;
this._y = this._y + this.veloc.vy;
this.curr_ang = this.curr_ang + ((this.curr_ang - this.dest_ang) / 20);
this._rotation = curr_ang;
this._alpha = (1 - (step / steps)) * 100;
if ((this.step++) > this.steps) {
this.removeMovieClip();
}
};
Symbol 40 MovieClip [Bat] Frame 29
stop();
Symbol 68 MovieClip Frame 1
this.weapon = "knives";
gotoAndPlay(this.weapon);
Instance of Symbol 50 MovieClip in Symbol 68 MovieClip Frame 1
onClipEvent (mouseDown) {
_root.b.g.arrow.gotoAndPlay(2);
}
Symbol 68 MovieClip Frame 2
stop();
Symbol 68 MovieClip Frame 4
_root["aso#43668"].Shoot();
Instance of Symbol 50 MovieClip in Symbol 68 MovieClip Frame 7
onClipEvent (mouseDown) {
_root.b.g.arrow.gotoAndPlay(2);
}
Symbol 68 MovieClip Frame 22
gotoAndPlay(this.weapon);
Symbol 68 MovieClip Frame 26
stop();
Symbol 68 MovieClip Frame 29
_root["aso#43668"].Shoot();
Symbol 68 MovieClip Frame 39
gotoAndPlay(this.weapon);
Symbol 68 MovieClip Frame 42
stop();
Symbol 68 MovieClip Frame 44
_root["aso#43668"].Shoot();
Symbol 68 MovieClip Frame 48
stop();
Symbol 68 MovieClip Frame 50
_root["aso#43668"].Shoot();
Symbol 68 MovieClip Frame 54
gotoAndPlay(this.weapon);
Symbol 68 MovieClip Frame 56
stop();
Symbol 68 MovieClip Frame 60
_root["aso#43668"].Shoot();
Symbol 68 MovieClip Frame 90
gotoAndPlay(this.weapon);
Symbol 70 MovieClip [Player] Frame 1
this["aso#63027"] = "idle";
gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 21
gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 35
gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 41
if (this["aso#63027"] == "crouch") {
this.prevFrame();
}
Symbol 70 MovieClip [Player] Frame 45
_root.data["aso#49657"].is_busy = false;
gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 51
gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 54
stop();
Symbol 70 MovieClip [Player] Frame 61
_root.data["aso#49657"]["aso#19712"] = true;
Symbol 70 MovieClip [Player] Frame 75
this["aso#63027"] = "idle";
this.gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 76
stop();
Symbol 70 MovieClip [Player] Frame 83
_root.data["aso#49657"]["aso#19712"] = true;
Symbol 70 MovieClip [Player] Frame 97
this["aso#63027"] = "idle";
this.gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 98
Symbol 70 MovieClip [Player] Frame 150
gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 151
Symbol 70 MovieClip [Player] Frame 201
gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 203
_root.data["aso#49657"]["aso#69016"].limit.Set(285, 290);
Symbol 70 MovieClip [Player] Frame 209
var rnd = Math.floor(Math.random() * 5);
Symbol 70 MovieClip [Player] Frame 210
if (rnd == 1) {
gotoAndPlay(this._currentframe - (rnd * 2));
}
_root.data["aso#49657"]["aso#69016"].limit.Set(270, 275);
Symbol 70 MovieClip [Player] Frame 211
if (rnd == 2) {
gotoAndPlay(this._currentframe - (rnd * 2));
}
_root.data["aso#49657"]["aso#69016"].limit.Set(280, 290);
Symbol 70 MovieClip [Player] Frame 212
if (rnd == 3) {
gotoAndPlay(this._currentframe - (rnd * 2));
}
_root.data["aso#49657"]["aso#69016"].limit.Set(270, 295);
Symbol 70 MovieClip [Player] Frame 213
if (rnd == 4) {
gotoAndPlay(this._currentframe - (rnd * 2));
}
_root.data["aso#49657"]["aso#69016"].limit.Set(275, 275);
Symbol 70 MovieClip [Player] Frame 214
gotoAndPlay ("strugle");
_root.data["aso#49657"]["aso#69016"].limit.Set(290, 295);
Symbol 70 MovieClip [Player] Frame 229
_root.data["aso#49657"].is_busy = false;
this["aso#63027"] = "idle";
gotoAndPlay(this["aso#63027"]);
Symbol 70 MovieClip [Player] Frame 264
stop();
Symbol 93 MovieClip [Graves] Frame 1
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
stop();
Symbol 96 MovieClip Frame 3
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
stop();
Symbol 101 MovieClip Frame 3
stop();
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 106 MovieClip Frame 3
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 2
stop();
Symbol 109 MovieClip Frame 3
stop();
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 2
stop();
Symbol 113 MovieClip Frame 3
stop();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
stop();
Symbol 119 MovieClip Frame 3
stop();
Symbol 126 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 2
stop();
Symbol 126 MovieClip Frame 3
stop();
Symbol 130 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 2
stop();
Symbol 130 MovieClip Frame 3
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 2
stop();
Symbol 133 MovieClip Frame 3
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 2
stop();
Symbol 141 MovieClip Frame 3
stop();
Symbol 141 MovieClip Frame 4
stop();
Symbol 141 MovieClip Frame 5
stop();
Symbol 141 MovieClip Frame 6
stop();
Symbol 141 MovieClip Frame 7
stop();
Symbol 141 MovieClip Frame 8
stop();
Symbol 141 MovieClip Frame 9
stop();
Symbol 141 MovieClip Frame 10
stop();
Symbol 141 MovieClip Frame 11
stop();
Symbol 142 MovieClip [Zombie] Frame 1
this["aso#63027"] = "walk";
this.is_busy = false;
this.facing = "left";
Symbol 142 MovieClip [Zombie] Frame 58
this.gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 92
this.gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 107
if (random(8) < 5) {
gotoAndPlay (100);
}
var ptPart = (new djo.Vector2P());
_root["aso#12331"]["aso#49657"].Head.localToGlobal(ptPart);
var ang = ((4.71238898038469 + Math.random()) - 0.5);
_root.data.particles.Add("blood", ptPart.x, ptPart.y, 50, ang);
Symbol 142 MovieClip [Zombie] Frame 115
this.gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 125
this.gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 148
this.is_busy = false;
gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 171
this.is_busy = false;
gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 184
this.is_busy = false;
gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 197
this.is_busy = false;
gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 210
this.is_busy = false;
gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 211
Symbol 142 MovieClip [Zombie] Frame 221
this._xscale = this._xscale * -1;
this.is_busy = false;
this.facing = ((this._xscale < 0) ? "right" : "left");
Symbol 142 MovieClip [Zombie] Frame 231
this.is_busy = false;
gotoAndPlay(this["aso#63027"]);
Symbol 142 MovieClip [Zombie] Frame 311
stop();
this.removeMovieClip();
Symbol 142 MovieClip [Zombie] Frame 371
stop();
this.removeMovieClip();
Symbol 147 MovieClip [Sky] Frame 1
stop();
Symbol 149 MovieClip [Cursor] Frame 1
onMouseMove = function () {
if ((_root._xmouse - this._x) > 0) {
this._rotation = this._rotation + 1;
} else {
this._rotation = this._rotation - 1;
}
};
Symbol 151 MovieClip [small_explode] Frame 8
this.removeMovieClip();
Symbol 156 MovieClip [MovieSequence] Frame 1
stop();
this.onStart = function () {
};
this.onEnd = function () {
};
Symbol 156 MovieClip [MovieSequence] Frame 29
stop();
onStart();
Symbol 156 MovieClip [MovieSequence] Frame 49
stop();
onEnd();
Symbol 167 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 10
stop();
Symbol 167 MovieClip Frame 20
stop();
Symbol 168 MovieClip Frame 1
gotoAndStop(_parent.weaponID);
Symbol 171 MovieClip Frame 2
stop();
Symbol 172 MovieClip [WeaponsStripe] Frame 1
function deselectWeapon(wpn) {
var _local2 = this["w" + wpn];
_local2.is_selected = false;
_local2.BG.gotoAndPlay("deselect");
}
function selectWeapon(wpn) {
trace("Selecting weapon " + wpn);
var _local2 = this["w" + wpn];
_local2.is_selected = true;
this.selectedWeapon = wpn;
trace(_local2.BG);
_local2.BG.gotoAndPlay("select");
}
function chooseWeapon(wpn) {
deselectWeapon(this.selectedWeapon);
selectWeapon(wpn);
}
function showWeapon(wpn) {
this["w" + wpn].gotoAndStop("visible");
}
function hideWeapon(wpn) {
this["w" + wpn].gotoAndStop("invisible");
}
var selectedWeapon = 1;
Instance of Symbol 171 MovieClip "w1" in Symbol 172 MovieClip [WeaponsStripe] Frame 1
onClipEvent (load) {
this.weaponID = 1;
this.BG.gotoAndPlay("select");
}
Instance of Symbol 171 MovieClip "w3" in Symbol 172 MovieClip [WeaponsStripe] Frame 1
onClipEvent (load) {
this.weaponID = 3;
}
Instance of Symbol 171 MovieClip "w2" in Symbol 172 MovieClip [WeaponsStripe] Frame 1
onClipEvent (load) {
this.weaponID = 2;
}
Instance of Symbol 171 MovieClip "w4" in Symbol 172 MovieClip [WeaponsStripe] Frame 1
onClipEvent (load) {
this.weaponID = 4;
}
Symbol 179 MovieClip [Items] Frame 1
stop();
Symbol 179 MovieClip [Items] Frame 2
stop();
Symbol 179 MovieClip [Items] Frame 3
stop();
Symbol 179 MovieClip [Items] Frame 4
stop();
Symbol 179 MovieClip [Items] Frame 10
stop();
Symbol 179 MovieClip [Items] Frame 11
stop();
Symbol 195 MovieClip Frame 1
this.gotoAndStop(_parent.id);
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 2
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 3
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 4
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 5
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 6
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 7
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 8
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 9
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 10
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 11
stop();
_parent.setHitArea(this._width, this._height);
Symbol 195 MovieClip Frame 15
stop();
_parent.setHitArea(this._width, this._height);
Symbol 198 Button
on (rollOver) {
gotoAndPlay ("rollover");
}
on (release, releaseOutside) {
gotoAndPlay ("press");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
Symbol 199 MovieClip [MenuButton] Frame 1
function setHitArea(w, h) {
Hit._width = w;
Hit._height = h;
}
Symbol 199 MovieClip [MenuButton] Frame 4
stop();
Symbol 199 MovieClip [MenuButton] Frame 10
stop();
Symbol 199 MovieClip [MenuButton] Frame 16
stop();
Symbol 199 MovieClip [MenuButton] Frame 17
onClick();
stop();
Symbol 210 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 216 Button
on (release) {
_root.play();
}
Symbol 217 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 217 MovieClip Frame 2
gotoAndPlay (1);
Symbol 254 MovieClip [__Packages.djo.Vector2P] Frame 0
class djo.Vector2P
{
var x, y, vx, vy, last_time;
function Vector2P (nx, ny, nvx, nvy) {
x = (isNaN(nx) ? 0 : (nx));
y = (isNaN(ny) ? 0 : (ny));
vx = (isNaN(nvx) ? 0 : (nvx));
vy = (isNaN(nvy) ? 0 : (nvy));
last_time = 0;
}
function headTail(v) {
return(new djo.Vector2P(x, y, v.x - x, v.y - y));
}
function Copy(v) {
x = v.x;
y = v.y;
vx = v.vx;
vy = v.vy;
}
function Set(nx, ny, nvx, nvy) {
x = (isNaN(nx) ? 0 : (nx));
y = (isNaN(ny) ? 0 : (ny));
vx = (isNaN(nvx) ? 0 : (nvx));
vy = (isNaN(nvy) ? 0 : (nvy));
}
function aso#57038() {
x = 0;
y = 0;
vx = 0;
vy = 0;
last_time = 0;
}
function Dot(v) {
return((vx * v.vx) + (vy * v.vy));
}
function Cross(v) {
return((vx * v.vy) - (vy * v.vx));
}
function Length() {
return(Math.sqrt((vx * vx) + (vy * vy)));
}
function Plus(v) {
vx = vx + v.vx;
vy = vy + v.vy;
return(this);
}
function Minus(v) {
vx = vx - v.vx;
vy = vy - v.vy;
return(this);
}
function Mul(s) {
vx = vx * s;
vy = vy * s;
return(this);
}
function Distance(v) {
var _local3 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function Unit() {
var _local2 = Magnitude();
var _local4 = 0;
var _local3 = 0;
if (_local2 > 0) {
_local4 = vx / _local2;
_local3 = vy / _local2;
}
return(new djo.Vector2P(x, y, _local4, _local3));
}
function Normalize() {
var _local2 = Magnitude();
var _local4 = 0;
var _local3 = 0;
trace("mag=" + _local2);
if (_local2 > 0) {
vx = vx / _local2;
vy = vy / _local2;
}
}
function Magnitude() {
return(Math.sqrt((vx * vx) + (vy * vy)));
}
function rawMagnitude() {
return((vx * vx) + (vy * vy));
}
function projectTo(v) {
var _local6 = Dot(v);
var _local3 = (v.vx * v.vx) + (v.vy * v.vy);
var _local5 = 0;
var _local4 = 0;
if (_local3 > 0) {
_local5 = (_local6 * v.vx) / _local3;
_local4 = (_local6 * v.vy) / _local3;
}
return(new djo.Vector2P(v.x, v.y, _local5, _local4));
}
function Angle() {
return(Math.atan2(vy, vx));
}
function Plot(_arg2, thick, rgb, alpha) {
_arg2.lineStyle(thick, rgb, alpha);
_arg2.moveTo(x, y);
_arg2.lineTo(x + vx, y + vy);
}
function rightNormal() {
return(new djo.Vector2P(x, y, -vy, vx));
}
function leftNormal() {
return(new djo.Vector2P(x, y, vy, -vx));
}
function Intersection(v) {
var _local8 = new djo.Vector2P(0, 0, v.x - x, v.y - y);
var _local5 = v.Dot(_local8.rightNormal());
var _local4 = v.Dot(rightNormal());
var _local3 = _local5 / _local4;
var _local9 = x + (vx * _local3);
var _local7 = y + (vy * _local3);
var _local6 = new djo.Vector2P(_local9, _local7, 0, 0);
return(_local6);
}
function Intersects(v) {
var _local5 = new djo.Vector2P(0, 0, v.x - x, v.y - y);
var _local4 = v.Dot(_local5.rightNormal());
var _local3 = v.Dot(rightNormal());
var _local7 = _local4 / _local3;
_local5 = new djo.Vector2P(0, 0, x - v.x, y - v.y);
_local4 = Dot(_local5.rightNormal());
_local3 = Dot(v.rightNormal());
var _local6 = _local4 / _local3;
return((((_local7 >= 0) && (_local7 <= 1)) && (_local6 >= 0)) && (_local6 <= 1));
}
function Move(Void) {
x = x + vx;
y = y + vy;
}
function toString() {
return(((((((("Vector2P(" + x) + ",") + y) + " | ") + vx) + ",") + vy) + ")");
}
}
Symbol 255 MovieClip [__Packages.djo.FPS] Frame 0
class djo.FPS
{
var _mc, _text, no_frames, start_time;
function FPS () {
}
function Init(_arg2, x, y, width, height, color) {
_mc = _arg2.createEmptyMovieClip("fps", _arg2.getNextHighestDepth());
_text = CreateTextField(_mc, x, y, width, height, color);
no_frames = 0;
start_time = getTimer();
}
function Restart() {
no_frames = 0;
start_time = getTimer();
_text.text = "FPS: 0";
}
function GetFPS() {
return(((no_frames++) / (getTimer() - start_time)) * 1000);
}
function Update() {
var _local2 = Math.round(((no_frames++) / (getTimer() - start_time)) * 100000) / 100;
_text.text = String("FPS: " + _local2);
}
function CreateTextField(_arg3, x, y, width, height, color) {
_arg3.createTextField("txt_fps", _arg3.getNextHighestDepth(), x, y, width, height);
var _local1 = _arg3.txt_fps;
_local1.selectable = false;
var _local2 = new TextFormat();
_local2.color = color;
_local2.bold = true;
_local1.setNewTextFormat(_local2);
return(_local1);
}
}
Symbol 256 MovieClip [__Packages.djo.RandomNumber] Frame 0
class djo.RandomNumber
{
var _rseed;
function RandomNumber (s) {
if (isNaN(s)) {
s = 1;
}
_rseed = s;
}
function SetSeed(s) {
_rseed = s;
}
function Randomize(s) {
_rseed = getTimer();
}
function Rand(Void) {
_rseed = (_rseed * 1103515245) + 12345;
_rseed = (_rseed & 4294967295) | 1;
return(_rseed);
}
function Random(high, low) {
if (low == undefined) {
low = 0;
}
var _local2 = Rand();
if (_local2 < 0) {
_local2 = _local2 + 4294967296;
}
return(((_local2 * ((high - low) + 1)) / 4294967296) + low);
}
}
Symbol 257 MovieClip [__Packages.jager.Timer] Frame 0
class jager.Timer
{
var aso#75005, last, now, count, relative, no_spawned, frozen, diff;
function Timer () {
aso#75005 = new Array();
last = (now = getTimer());
count = (relative = (no_spawned = 0));
frozen = false;
}
function Update() {
if (frozen) {
last = (now = getTimer());
return(undefined);
}
last = now;
now = getTimer();
diff = now - last;
relative = relative + diff;
}
function Pause() {
trace("Pausing timer.");
frozen = true;
}
function Play() {
trace("Playing timer.");
frozen = false;
}
function Add(to_wait, action) {
count++;
var _local5 = no_spawned++;
var _local3 = new Object({triggerAt:relative + to_wait, Action:action});
var _local2 = aso#75005.push(_local3);
aso#75005.sortOn("triggerAt", Array.NUMERIC);
return(_local2);
}
function Check() {
var _local2 = aso#75005[0];
if (relative > _local2.triggerAt) {
_local2.Action();
aso#75005.shift();
count--;
Check();
}
}
function aso#57038() {
clearTimers();
now = getTimer();
count = (relative = (no_spawned = 0));
frozen = false;
trace("Timer reset.");
}
function clearTimers() {
frozen = true;
var _local2 = aso#75005.length;
while (_local2--) {
aso#75005.shift();
}
frozen = false;
count = 0;
}
function toString() {
var _local2 = "Timer.now =" + relative;
_local2 = ((_local2 + "\nNumber of timers:") + count) + newline;
var _local4 = 0;
for (var _local3 in aso#75005) {
_local2 = (((_local2 + _local3) + " = [triggerAt: ") + aso#75005[_local3].triggerAt) + "]\n";
}
return(_local2);
}
}
Symbol 258 MovieClip [__Packages.jager.Swarm] Frame 0
class jager.Swarm
{
var count, aso#75005, center, width, height, aso#37679;
function Swarm () {
count = 0;
aso#75005 = new Array();
center = new Object({x:0, y:0});
width = (height = 0);
}
function Init(nmc, nwidth, nheight) {
aso#37679 = nmc;
width = nwidth;
height = nheight;
}
function setCenter(nx, ny) {
center.x = nx;
center.y = ny;
}
function addObject(nx, ny, energy, linkage) {
if (nx == undefined) {
nx = 0;
}
if (ny == undefined) {
ny = 0;
}
var _local2 = new Object();
_local2.pos = new Object({x:nx, y:ny});
_local2.dir = new Object({x:0, y:0});
_local2.dest = new Object({x:center.x, y:center.y});
_local2.mod = new Object({x:(Math.random() * 10) - 5, y:(Math.random() * 10) - 5});
_local2.is_dead = false;
_local2.iterations = random(20) + 10;
_local2.iter = 1;
_local2.item = 0;
_local2.in_swarm = true;
_local2.is_attacking = false;
_local2.energy = energy;
_local2.id = aso#37679.getNextHighestDepth();
_local2.last_attack = 0;
_local2["aso#37679"] = aso#37679.attachMovie(linkage, "swarm" + _local2.id, _local2.id);
_local2["aso#37679"]._x = _local2.pos.x;
_local2["aso#37679"]._y = _local2.pos.y;
_local2["aso#37679"].gotoAndPlay(random(4) + 1);
count = aso#75005.push(_local2);
return(aso#75005[count - 1]);
}
function processObject(o) {
if (o.iter > o.iterations) {
o.iter = 1;
o.dest.x = (center.x + (Math.random() * width)) - (width / 2);
o.dest.y = (center.y + (Math.random() * height)) - (height / 2);
} else {
var _local8 = (o.dest.x - o.dir.x) * a;
var _local7 = (o.dest.y - o.dir.y) * a;
var _local4 = o.mod.x + _local8;
var _local3 = o.mod.y + _local7;
var _local6 = _local4 - ((o.dir.x - _local4) * b);
var _local5 = _local3 - ((o.dir.y - _local3) * b);
o.pos.x = o.pos.x + ((o.dir.x - o.pos.x) / 8);
o.pos.y = o.pos.y + ((o.dir.y - o.pos.y) / 8);
o.dir = {x:_local4, y:_local3};
o.mod = {x:_local6, y:_local5};
o.iter++;
}
o["aso#37679"]._x = o.pos.x;
o["aso#37679"]._y = o.pos.y;
}
function processObjects() {
for (var _local2 in aso#75005) {
if (aso#75005[_local2].in_swarm && (!aso#75005[_local2].is_dead)) {
processObject(aso#75005[_local2]);
}
}
}
function toString() {
return(count + " object(s) in swarm.");
}
function deleteFirst() {
var _local2 = aso#75005.shift();
_local2["aso#37679"].removeMovieClip();
}
function removeFromSwarm(i) {
aso#75005[i].in_swarm = false;
}
function deleteObject(i) {
var _local2 = aso#75005[0];
aso#75005[0] = aso#75005[i];
aso#75005[i] = _local2;
count--;
return(aso#75005.shift());
}
function clearSwarm() {
var _local3 = aso#75005.length;
while (_local3--) {
var _local2 = aso#75005.shift();
_local2["aso#37679"].removeMovieClip();
}
}
var a = 0.05;
var b = 0.7;
}
Symbol 224 MovieClip Frame 1
function aso#57038() {
Volume = (maxVolume = settings.music_volume);
var _local1 = -1;
}
function changeVolume(vol) {
trace("changing volume to" + vol);
Volume = vol;
Control.setVolume(vol);
}
function changePan(pan) {
Pan = pan;
Control.setPan(pan);
}
function Fade(type, startIt) {
startIt = ((startIt == undefined) ? false : (startIt));
if (startIt) {
playTrack();
}
var target = settings.music_volume;
if (type == "out") {
target = 0;
}
this.onEnterFrame = function () {
Control.setVolume(Volume);
var _local2 = (target - Volume) / 8;
Volume = Volume + _local2;
if (Math.abs(_local2) < 3) {
Volume = target;
Control.setVolume(Volume);
if (target == 0) {
StopSong();
}
delete this.onEnterFrame;
}
};
}
function StartSong() {
Volume = (maxVolume = settings.music_volume);
changeVolume(Volume);
currTrack = -1;
playTrack();
}
function StopSong() {
trace("Stopping track =" + currTrack);
patterns[currTrack].stop();
}
function playTrack() {
currTrack = ((currTrack < (song.length - 1)) ? (currTrack + 1) : 0);
next_track = song[currTrack];
patterns[next_track].start();
if (aso#82386) {
if ((next_track == 4) || (next_track == 5)) {
var _local2 = screen._width + 150;
var _local3 = _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], _local2);
_root.data["aso#18320"]["aso#00353"].addZombie(_local2, _local3, 2);
_local2 = -50;
_local3 = _root["aso#43668"].getY(_root.data["aso#80994"].ground["aso#75005"], _local2);
_root.data["aso#18320"]["aso#00353"].addZombie(_local2, _local3, 2);
_root.data["aso#18320"]["aso#06342"].addBunch(3);
}
}
patterns[next_track].onSoundComplete = playTrack;
next_track = -1;
}
function playMenu() {
trace("Starting menu music");
StopSong();
song = menu;
StartSong();
}
function playGame() {
trace("Starting game music");
StopSong();
song = aso#31690;
StartSong();
}
function nextSong(sSong) {
switch (sSong) {
case "aso#31690" :
song = aso#31690;
currTrack = -1;
break;
case "menu" :
song = menu;
currTrack = -1;
break;
case "tutorial" :
song = tutorial;
currTrack = -1;
}
}
function playTutorial() {
trace("Starting tutorial music");
StopSong();
song = tutorial;
StartSong();
}
var Control = new Sound(this);
var maxVolume = _root.settings.music_volume;
var Volume = 0;
var Pan = 0;
var aso#82386 = false;
var patterns = new Array();
var next_track = 0;
var song;
var aso#31690 = new Array(2, 2, 1, 1, 3, 4, 1, 2, 2, 1, 5, 1, 1, 2, 2, 1, 1, 2, 3, 5, 1, 1, 1, 1);
var tutorial = new Array(2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1);
var menu = new Array(0, 0, 0);
var currTrack = -1;
var o = new Sound(this);
o.attachSound("mus00");
patterns.push(o);
o = new Sound(this);
o.attachSound("mus01");
patterns.push(o);
o = new Sound(this);
o.attachSound("mus02");
patterns.push(o);
o = new Sound(this);
o.attachSound("mus03");
patterns.push(o);
o = new Sound(this);
o.attachSound("mus04");
patterns.push(o);
o = new Sound(this);
o.attachSound("mus05");
patterns.push(o);
stop();
Symbol 229 MovieClip Frame 1
var num_particles = 20;
var damp = 0.89;
var num_force_fields = 2;
var frames = 0;
var time_started = 0;
var max_life = 250;
var arrParticles;
genParticles = function (num) {
var _local2 = new Array();
var _local3 = num;
while (_local3--) {
_local2.push(genParticle(this.mcParticles));
}
return(_local2);
};
genParticle = function (_arg3) {
var _local1 = new Object();
var _local2 = _arg3.getNextHighestDepth();
_local1["aso#37679"] = _arg3.attachMovie("SmokeParticle", "p" + _local2, _local2);
_local1.pos = new djo.Vector2P();
_local1.pos.x = (Math.random() * 300) - 150;
_local1.pos.y = 50;
_local1.pos.vy = (Math.random() * -2) - 0.2;
_local1.pos.vx = 0;
_local1["aso#37679"]._xscale = (p["aso#37679"]._yscale = random(20) + 80);
_local1.life = random(max_life);
return(_local1);
};
onEnterFrame = function () {
var _local5 = arrParticles.length;
var _local6 = new djo.Vector2P();
while (_local5--) {
var _local2 = arrParticles[_local5];
var _local4 = 3;
while (_local4--) {
var _local3 = this["ff" + _local4];
if (_local4 == 2) {
dx = this._xmouse - _local2.pos.x;
dy = this._ymouse - _local2.pos.y;
} else {
dx = _local3._x - _local2.pos.x;
dy = _local3._y - _local2.pos.y;
}
_local2.pos.vx = _local2.pos.vx - ((50 * dx) / ((dx * dx) + (dy * dy)));
_local2.pos.vx = ((_local2.pos.vx + (Math.random() * 0.4)) - 0.2) * damp;
_local2.pos.Move();
_local2["aso#37679"]._x = _local2.pos.x;
_local2["aso#37679"]._y = _local2.pos.y;
_local2.life++;
_local2["aso#37679"]._alpha = (1 - (_local2.life / max_life)) * 50;
if (_local2.life > max_life) {
_local2.life = 0;
_local2.pos.y = 50;
_local2.pos.vy = ((-Math.random()) * 1.5) - 0.5;
_local2.pos.vx = 0;
_local2.pos.x = (Math.random() * 300) - 150;
_local2["aso#37679"]._xscale = (_local2["aso#37679"]._yscale = random(20) + 100);
}
}
}
};
stop();
arrParticles = genParticles(20);
mcSilhouette.attachMovie("g:Silhouette", "Schatten", mcSilhouette.getNextHighestDepth());
Instance of Symbol 228 MovieClip "ff0" in Symbol 229 MovieClip Frame 1
on (press) {
startDrag (this);
}
on (release, releaseOutside) {
this.stopDrag();
}
Instance of Symbol 228 MovieClip "ff1" in Symbol 229 MovieClip Frame 1
on (press) {
startDrag (this);
}
on (release, releaseOutside) {
this.stopDrag();
}
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 2
stop();
Symbol 241 MovieClip Frame 3
stop();
Symbol 241 MovieClip Frame 4
stop();
Instance of Symbol 199 MovieClip [MenuButton] in Symbol 242 MovieClip Frame 1
onClipEvent (load) {
this.id = 1;
this.onClick = function () {
_root.gotoAndPlay("init");
};
}
Instance of Symbol 199 MovieClip [MenuButton] in Symbol 242 MovieClip Frame 1
onClipEvent (load) {
this.id = 2;
this.onClick = function () {
_root.gotoAndPlay("options");
};
}
Instance of Symbol 199 MovieClip [MenuButton] in Symbol 242 MovieClip Frame 1
onClipEvent (load) {
this.id = 3;
this.onClick = function () {
_root.gotoAndPlay("credits");
};
}
Instance of Symbol 199 MovieClip [MenuButton] in Symbol 242 MovieClip Frame 1
onClipEvent (load) {
this.id = 4;
this.onClick = function () {
getURL ("http://www.newgrounds.com/collection/halloween.html", "_blank");
};
}
Instance of Symbol 199 MovieClip [MenuButton] in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
this.id = 10;
this.onClick = function () {
getURL ("http://artbit.deviantart.com", "_blank");
};
}
Instance of Symbol 199 MovieClip [MenuButton] in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
this.id = 11;
this.onClick = function () {
getURL ("http://dijabolik.deviantart.com", "_blank");
};
}
Instance of Symbol 199 MovieClip [MenuButton] in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
this.id = 6;
this.onClick = function () {
_root.play();
};
}
Symbol 250 MovieClip Frame 1
if (settings.quality == "LOW") {
low._xscale = (low._yscale = 120);
med._xscale = (med._yscale = (high._xscale = (high._yscale = 80)));
} else if (settings.quality == "MEDIUM") {
med._xscale = (med._yscale = 120);
low._xscale = (low._yscale = (high._xscale = (high._yscale = 80)));
} else if (settings.quality == "HIGH") {
high._xscale = (high._yscale = 120);
low._xscale = (low._yscale = (med._xscale = (med._yscale = 80)));
}
volume._x = (settings.music_volume * 2) + 50;
stop();
Instance of Symbol 199 MovieClip [MenuButton] in Symbol 250 MovieClip Frame 1
onClipEvent (load) {
this.id = 6;
this.onClick = function () {
_root.play();
};
}
Instance of Symbol 199 MovieClip [MenuButton] "med" in Symbol 250 MovieClip Frame 1
onClipEvent (load) {
this.id = 8;
this.onClick = function () {
settings.quality = "MEDIUM";
_quality = "MEDIUM";
this._xscale = (this._yscale = 120);
this._parent.low._xscale = (this._parent.low._yscale = 80);
this._parent.high._xscale = (this._parent.high._yscale = 80);
};
}
Instance of Symbol 199 MovieClip [MenuButton] "low" in Symbol 250 MovieClip Frame 1
onClipEvent (load) {
this.id = 9;
this.onClick = function () {
settings.quality = "LOW";
_quality = "LOW";
this._xscale = (this._yscale = 120);
this._parent.med._xscale = (this._parent.med._yscale = 80);
this._parent.high._xscale = (this._parent.high._yscale = 80);
};
}
Instance of Symbol 199 MovieClip [MenuButton] "high" in Symbol 250 MovieClip Frame 1
onClipEvent (load) {
this.id = 7;
this.onClick = function () {
settings.quality = "HIGH";
_quality = "HIGH";
this._xscale = (this._yscale = 120);
this._parent.low._xscale = (this._parent.low._yscale = 80);
this._parent.med._xscale = (this._parent.med._yscale = 80);
};
}
Instance of Symbol 199 MovieClip [MenuButton] "volume" in Symbol 250 MovieClip Frame 1
onClipEvent (load) {
this.id = 5;
this.onClick = function () {
};
}
onClipEvent (mouseDown) {
var vol = ((this._x - 50) / 2);
_root.Music.changeVolume(vol);
settings.music_volume = vol;
}
on (rollOver) {
this.gotoAndPlay("rollover");
}
on (press) {
startDrag (this, true, 50, 130, 250, 130);
}
on (release, releaseOutside) {
var vol = ((this._x - 50) / 2);
_root.Music.changeVolume(vol);
settings.music_volume = vol;
this.stopDrag();
}