Frame 1
quality = 0;
stop();
Instance of Symbol 36 MovieClip "loadbar" in Frame 1
onClipEvent (load) {
done = false;
_width = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 200);
}
onClipEvent (enterFrame) {
_width = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 200);
if ((_root.getBytesLoaded() / _root.getBytesTotal()) == 1) {
done = true;
}
_root.Loaded.text = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
}
Instance of Symbol 50 MovieClip "cout" in Frame 1
onClipEvent (load) {
debugging = false;
FullOut = "";
out = "";
output.text = "";
c = 0;
wit = 0;
}
onClipEvent (enterFrame) {
output.text = output.text + FullOut.charAt(c);
if (c < FullOut.length) {
c++;
}
if (Key.isDown(86)) {
i = 1;
while (i < 5) {
output.text = output.text + FullOut.charAt(c);
if (c < FullOut.length) {
c++;
}
i++;
}
if ((c == FullOut.length) && (_root.obs)) {
FullOut = "";
output.text = "";
out = "";
c = 0;
}
}
}
Frame 2
quality = 2;
pxc = 0;
pyc = 0;
lev = [];
score = 0;
obs = false;
stop();
Instance of Symbol 85 MovieClip "player" in Frame 2
onClipEvent (load) {
function hurt(damage) {
if (damagetimer == 0) {
HP = HP - damage;
damagetimer = 24;
if (HP <= 0) {
HP = 0;
removeMovieClip(this);
unloadMovie (this);
}
}
}
function shoot(damage) {
shotnum++;
if (shotnum > 3) {
shotnum = 0;
}
fire = _root.attachMovie("playershot", "playershot" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
fire.dmg = damage;
fire._x = _x + (dir * 23);
fire._y = _y - 3;
fire._x = fire._x + (xspeed * 1.1);
if (Key.isDown(38)) {
fire._y = fire._y - 65;
fire._x = fire._x - (10 * dir);
fire._rotation = -90;
} else if (Key.isDown(40)) {
fire._y = fire._y + 53;
fire._x = fire._x - (16 * dir);
fire._rotation = -90;
} else {
fire._x = fire._x + (50 * dir);
}
_root.shot.push(this);
for (var _local3 in _root.shot) {
if ((_root.shot[_local3]._visible = false)) {
_root.shot.splice(_local3, 1);
}
}
if (Key.isDown(38)) {
fire.dir = 3;
} else if (Key.isDown(40)) {
fire.dir = 4;
} else if (dir == -1) {
fire.dir = 2;
} else if (dir == 1) {
fire.dir = 1;
}
if (_root.quality >= 2) {
cas = _root.attachMovie("casing", "casing" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
cas._x = _x + (dir * 5);
cas._y = _y - 10;
if (Key.isDown(38) || (Key.isDown(40))) {
cas._rotation = 90;
}
}
}
subyspeed = 0;
(pyc = 0);
dashtimer = 0;
dashing = 0;
dashdir = 0;
(looking = false);
(lp = false);
shottimer = 0;
playerwidth = _xscale;
lev = [];
enemies = [];
yspeed = 0;
grav = 2;
jmod = 1.125;
onfloor = false;
runspeed = 10;
runaccel = 1.5;
xspeed = 0;
jumpspeed = 15;
jumpcounter = 0;
dir = 1;
hitcount = 0;
casenumber = 0;
shotnum = 0;
gothit = false;
weapon = 1;
fdown = false;
firing = false;
switching = false;
sdown = false;
HP = 50;
damagetimer = 0;
if (_root.cout.debugging) {
damagetimer = 1;
}
(PUL = false);
(canright = true);
}
onClipEvent (enterFrame) {
if (Key.isDown(86)) {
if (!looking) {
look = true;
_root.obs = true;
looking = true;
} else if (looking) {
_root.obs = false;
look = false;
}
} else {
looking = false;
look = false;
}
if (dashtimer > 0) {
dashtimer--;
}
if (((rp || (lp)) && (dashtimer == 0)) && (dashing <= 0)) {
dashtimer = 6;
} else if ((((dashtimer > 0) && (rp || (lp))) && (dashing <= -12)) && (onfloor)) {
dashtimer = 24;
if (rp) {
dashdir = 1;
}
if (lp) {
dashdir = -1;
}
dashing = 6;
}
dashing--;
if (damagetimer > 0) {
damagetimer--;
if (((damagetimer % 4) == 1) || ((damagetimer % 4) == 2)) {
_visible = false;
} else {
_visible = true;
}
}
if (Key.isDown(67)) {
if (switching) {
sdown = false;
} else if ((!sdown) && (!switching)) {
sdown = true;
switching = true;
}
} else {
sdown = false;
switching = false;
}
if (sdown) {
weapon++;
if (weapon > 3) {
weapon = 1;
}
}
if (Key.isDown(88)) {
if (firing) {
fdown = false;
} else if ((!fdown) && (!firing)) {
fdown = true;
firing = true;
}
} else {
fdown = false;
firing = false;
}
for (var i in hitinds) {
if (hitinds[i]._visible == false) {
hitinds.splice(i, 1);
}
}
subyspeed = yspeed;
while (yspeed < -10) {
_y = (_y + 10);
yspeed = yspeed + 10;
canright = true;
canleft = true;
frontbox.hit = false;
backbox.hit = false;
footbox.hit = false;
for (var i in lev) {
if (footbox.hitTest(lev[i])) {
for (var i in lev) {
if (lev[i].hitTest(this)) {
while (lev[i].hitTest(footbox)) {
_y = (_y-1);
}
onfloor = true;
if (yspeed < 0) {
yspeed = 0;
subyspeed = 0;
}
}
}
footbox._y = footbox._y + 5;
onfloor = false;
for (var i in lev) {
if (lev[i].hitTest(this)) {
onfloor = true;
}
}
footbox._y = footbox._y - 5;
}
if (frontbox.hitTest(lev[i])) {
frontbox.hit = true;
if (backbox.hit == false) {
if (dir == -1) {
_x = (_x+1);
canleft = false;
} else if (dir == 1) {
_x = (_x-1);
canright = false;
}
if ((dir == 1) && (xspeed > 0)) {
xspeed = 0;
} else if ((dir == -1) && (xspeed < 0)) {
xspeed = 0;
}
}
}
if (backbox.hitTest(lev[i])) {
backbox.hit = true;
if (lev[i].hitTest(this)) {
if (dir == -1) {
_x = (_x+1);
} else if (dir == 1) {
_x = (_x-1);
}
if ((dir == 1) && (xspeed < 0)) {
xspeed = 0;
} else if ((dir == -1) && (xspeed > 0)) {
xspeed = 0;
}
}
}
}
}
_y = (_y - yspeed);
yspeed = subyspeed;
canright = true;
canleft = true;
frontbox.hit = false;
backbox.hit = false;
footbox.hit = false;
for (var i in lev) {
if (footbox.hitTest(lev[i])) {
for (var i in lev) {
if (lev[i].hitTest(this)) {
if (backbox.hitTest(lev[i])) {
backbox._y = backbox._y - 50;
while (backbox.hitTest(lev[i])) {
_x = (_x + dir);
if ((dir == 1) && (xspeed < 0)) {
xspeed = 0;
}
if ((dir == -1) && (xspeed > 0)) {
xspeed = 0;
}
}
backbox._y = backbox._y + 50;
}
while (lev[i].hitTest(footbox)) {
_y = (_y-1);
}
onfloor = true;
if (yspeed < 0) {
yspeed = 0;
subyspeed = 0;
}
}
}
footbox._y = footbox._y + 5;
onfloor = false;
for (var i in lev) {
if (lev[i].hitTest(this)) {
onfloor = true;
}
}
footbox._y = footbox._y - 5;
}
if (frontbox.hitTest(lev[i])) {
frontbox.hit = true;
if (backbox.hit == false) {
if (dir == -1) {
_x = (_x+1);
canleft = false;
} else if (dir == 1) {
_x = (_x-1);
canright = false;
}
if ((dir == 1) && (xspeed > 0)) {
xspeed = 0;
} else if ((dir == -1) && (xspeed < 0)) {
xspeed = 0;
}
}
}
if (backbox.hitTest(lev[i])) {
backbox.hit = true;
if (lev[i].hitTest(this)) {
if (dir == -1) {
_x = (_x+1);
} else if (dir == 1) {
_x = (_x-1);
}
if ((dir == 1) && (xspeed < 0)) {
xspeed = 0;
} else if ((dir == -1) && (xspeed > 0)) {
xspeed = 0;
}
}
}
}
footbox._y = footbox._y + 5;
onfloor = false;
for (var i in lev) {
if (lev[i].hitTest(footbox)) {
onfloor = true;
}
}
footbox._y = footbox._y - 5;
if (Key.isDown(39) && (canright)) {
if ((!rd) && (!rp)) {
rp = true;
rd = true;
} else if (rp && (rd)) {
rp = false;
}
dir = 1;
_xscale = playerwidth;
if (onfloor) {
if (xspeed < 0) {
xspeed = 0;
}
xspeed = xspeed + runaccel;
} else if (!onfloor) {
xspeed = xspeed + (runaccel * 0.75);
}
} else if (Key.isDown(37) && (canleft)) {
if ((!ld) && (!lp)) {
lp = true;
ld = true;
} else if (lp && (ld)) {
lp = false;
}
dir = -1;
_xscale = (-playerwidth);
if (onfloor) {
if (xspeed > 0) {
xspeed = 0;
}
xspeed = xspeed - runaccel;
} else if (!onfloor) {
xspeed = xspeed - (runaccel * 0.75);
}
} else if (dashing <= 0) {
if (onfloor) {
if (xspeed > 0) {
xspeed = xspeed * 0.7;
}
if (xspeed < 0) {
xspeed = xspeed * 0.7;
}
if ((xspeed < 1) && (xspeed > -1)) {
xspeed = 0;
}
}
}
if (!Key.isDown(37)) {
ld = false;
lp = false;
}
if (!Key.isDown(39)) {
rd = false;
rp = false;
}
if (Key.isDown(90)) {
if (onfloor) {
_y = (_y - 5);
yspeed = jumpspeed;
}
if (yspeed >= 0) {
yspeed = yspeed * jmod;
}
onfloor = false;
}
shottimer++;
if (weapon == 3) {
if (fdown && (shottimer > 12)) {
shottimer = 0;
shoot(20);
cas._xscale = 200;
cas._yscale = 200;
}
}
if (weapon == 2) {
if (fdown && (shottimer > 5)) {
shottimer = 0;
shoot(3);
if (Key.isDown(38) || (Key.isDown(40))) {
shoot(3);
fire._x = fire._x - 7;
shoot(3);
fire._x = fire._x + 7;
} else {
shoot(3);
fire._y = fire._y - 7;
shoot(3);
fire._y = fire._y + 7;
}
}
}
if (weapon == 1) {
if (Key.isDown(88) && (shottimer >= 3)) {
shottimer = 0;
shoot(5);
}
}
if ((dashing <= 0) && (onfloor)) {
if (xspeed > runspeed) {
xspeed = runspeed;
}
if (xspeed < (-runspeed)) {
xspeed = -runspeed;
}
}
_x = (_x + xspeed);
if (!onfloor) {
yspeed = yspeed - grav;
}
if (dashing <= 0) {
if (xspeed > runspeed) {
xspeed = runspeed;
} else if (xspeed < (-runspeed)) {
xspeed = -runspeed;
}
}
if ((((!onfloor) || (Key.isDown(39))) || (Key.isDown(37))) || (dashing > 0)) {
this.gotoAndStop(2);
if (Key.isDown(38)) {
body.torso.gotoAndStop(2);
}
if (Key.isDown(40)) {
body.torso.gotoAndStop(3);
}
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 89 MovieClip in Frame 2
onClipEvent (load) {
score = 0;
}
onClipEvent (enterFrame) {
if (score < _root.score) {
if (score < (_root.score - 100000)) {
score = score + 100000;
} else if (score < (_root.score - 10000)) {
score = score + 10000;
} else if (score < (_root.score - 1000)) {
score = score + 1000;
} else if (score <= (_root.score - 100)) {
score = score + 100;
} else if (score < (_root.score - 10)) {
score = score + 10;
} else {
score++;
}
}
}
Instance of Symbol 109 MovieClip "lev" in Frame 2
onClipEvent (enterFrame) {
_root.player.pxc = _root.player._x - _x;
_root.player.pyc = _root.player._y - _y;
if (_root.player._x != 400) {
_x = (_x - (_root.player._x - 400));
_root.player._x = 400;
}
if (_root.player._y != 250) {
_y = (_y - (_root.player._y - 250));
_root.player._y = 250;
}
_root.levgraphics._x = _x;
_root.levgraphics._y = _y;
}
Instance of Symbol 110 MovieClip in Frame 2
onClipEvent (enterFrame) {
_width = ((_root.player.HP / 50) * 100);
}
Instance of Symbol 111 MovieClip "fader" in Frame 2
onClipEvent (load) {
fading = false;
_alpha = 100;
}
onClipEvent (enterFrame) {
if ((!fading) && (_alpha > 0)) {
_alpha = (_alpha - 10);
} else if (fading) {
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
}
}
Instance of Symbol 34 MovieClip [testspawned] in Frame 2
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
if (_root.player.HP <= 0) {
timer++;
if (timer >= 48) {
_root.gotoAndStop(7);
}
}
}
Instance of Symbol 113 MovieClip "cout" in Frame 3
onClipEvent (load) {
FullOut = "Nice job dying, stupid.";
out = "";
output.text = "";
c = 0;
}
onClipEvent (enterFrame) {
output.text = output.text + FullOut.charAt(c);
if (c < FullOut.length) {
c++;
}
}
Symbol 2 MovieClip [casing] Frame 1
#initclip 12
Object.registerClass("casing", casing);
#endinitclip
Symbol 5 MovieClip [scoreindicator] Frame 43
stop();
this.removeMovieClip(this);
this.unloadMovie(this);
Symbol 7 MovieClip [hitindicator] Frame 1
#initclip 6
Object.registerClass("hitindicator", hitindicator);
#endinitclip
Symbol 7 MovieClip [hitindicator] Frame 2
stop();
Symbol 8 MovieClip [playershot] Frame 1
#initclip 7
Object.registerClass("playershot", playershot);
#endinitclip
Symbol 9 MovieClip [enemyshot1] Frame 1
#initclip 8
Object.registerClass("enemyshot1", enemyshot);
#endinitclip
Instance of Symbol 15 MovieClip in Symbol 16 MovieClip [stats] Frame 1
onClipEvent (enterFrame) {
_width = _parent._parent.hp;
}
Instance of Symbol 17 MovieClip "particle" in Symbol 18 MovieClip [particle1] Frame 1
onClipEvent (load) {
_visible = false;
spd = 5 + random(10);
mini = -20;
max = 40;
_rotation = (_rotation + (mini + random(max)));
}
onClipEvent (enterFrame) {
_visible = true;
if (_root.player._x != 400) {
_x = (_x - (_root.player._x - 400));
}
if (_root.player._y != 250) {
_y = (_y - (_root.player._y - 250));
}
_x = (_x + (Math.cos((this._rotation * Math.PI) / 180) * spd));
_y = (_y + (Math.sin((this._rotation * Math.PI) / 180) * spd));
spd--;
if (spd < 1) {
unloadMovie (_parent);
removeMovieClip(_parent);
}
}
Symbol 18 MovieClip [particle1] Frame 23
unloadMovie (this);
removeMovieClip(this);
Symbol 20 MovieClip [RoboGrunt1Head] Frame 1
#initclip 9
Object.registerClass("RoboGrunt1Head", robogib);
#endinitclip
Symbol 22 MovieClip [RoboGrunt1Arm] Frame 1
#initclip 10
Object.registerClass("RoboGrunt1Arm", robogib);
#endinitclip
Symbol 24 MovieClip [RoboGrunt1Leg] Frame 1
#initclip 11
Object.registerClass("RoboGrunt1Leg", robogib);
#endinitclip
Symbol 32 MovieClip [ExplosionSmall] Frame 8
stop();
Symbol 42 Button
on (release) {
if (_root.loadbar.done) {
_root.gotoAndStop(2);
}
}
Symbol 46 Button
on (release) {
if (_root.cout.debugging == false) {
_root.cout.debugging = true;
_root.cout.output.text = "";
_root.cout.c = 0;
_root.cout.FullOut = "DEBUGGING MODE IS NOW ACTIVATED";
} else if (_root.cout.debugging == true) {
_root.cout.debugging = false;
_root.cout.output.text = "";
_root.cout.c = 0;
_root.cout.FullOut = "DEBUGGING MODE HAS BEEN DEACTIVATED";
}
}
Symbol 50 MovieClip Frame 2
stop();
Symbol 53 Button
on (release) {
_root.gotoAndStop(1);
}
Symbol 114 MovieClip [__Packages.hitindicator] Frame 0
class hitindicator extends MovieClip
{
var xspeed, yspeed, timer, ind, _x, _y, unloadMovie, removeMovieClip;
function hitindicator () {
super();
}
function onLoad() {
xspeed = -1 + (Math.random() * 2);
yspeed = 10 + (Math.random() * 5);
timer = 0;
ind = -damage;
}
function onEnterFrame() {
ind = -damage;
_x = _x + xspeed;
_y = _y - yspeed;
if (yspeed > 0) {
yspeed = yspeed * 0.8;
}
timer++;
if (timer < -12) {
timer = -12;
}
if (timer >= 24) {
unloadMovie();
removeMovieClip();
}
}
var damage = 0;
}
Symbol 115 MovieClip [__Packages.playershot] Frame 0
class playershot extends MovieClip
{
var _x, _y, removeMovieClip, unloadMovie, dir, _rotation, o, _width, dmg, _parent;
function playershot () {
super();
}
function onEnterFrame() {
if (_root.player._x != 400) {
_x = _x - (_root.player._x - 400);
}
if (_root.player._y != 250) {
_y = _y - (_root.player._y - 250);
}
timer++;
if (timer >= 24) {
removeMovieClip();
unloadMovie();
}
if (dir == 1) {
_x = _x + speed;
}
if (dir == 2) {
_x = _x - speed;
}
if (dir == 3) {
_rotation = 90;
_y = _y - speed;
}
if (dir == 4) {
_rotation = -90;
_y = _y + speed;
}
for (var _local5 in _root.player.lev) {
if (_root.player.lev[_local5].hitTest(this)) {
hit = true;
while (_root.player.lev[_local5].hitTest(this)) {
if (dir == 1) {
_x--;
} else if (dir == 2) {
_x++;
} else if (dir == 3) {
_y++;
} else if (dir == 4) {
_y--;
}
}
if (dir == 1) {
o = 0;
while (o < 10) {
var _local3 = _root.attachMovie("particle1", "particle1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = (_x + _width) - 10;
_local3._y = _y;
_local3._x = _local3._x - (2 * _root.player.xspeed);
_local3._y = _local3._y + (2 * _root.player.yspeed);
_local3.particle._rotation = 180;
o++;
}
} else if (dir == 2) {
o = 0;
while (o < 10) {
var _local3 = _root.attachMovie("particle1", "particle1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x - _width;
_local3._y = _y;
_local3._x = _local3._x - (2 * _root.player.xspeed);
_local3._y = _local3._y + (2 * _root.player.yspeed);
o++;
}
} else if (dir == 3) {
o = 0;
while (o < 10) {
var _local3 = _root.attachMovie("particle1", "particle1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y + _width;
_local3._x = _local3._x - (2 * _root.player.xspeed);
_local3._y = _local3._y + (2 * _root.player.yspeed);
_local3.particle._rotation = 90;
o++;
}
} else if (dir == 4) {
o = 0;
while (o < 10) {
var _local3 = _root.attachMovie("particle1", "particle1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x - 10;
_local3._y = (_y + _width) + 20;
_local3._x = _local3._x - (2 * _root.player.xspeed);
_local3._y = _local3._y + (2 * _root.player.yspeed);
_local3.particle._rotation = -90;
o++;
}
}
removeMovieClip();
unloadMovie();
}
}
for (var _local5 in _root.player.enemies) {
if (_root.player.enemies[_local5].hitbox.hitTest(this)) {
while (_root.player.enemies[_local5].hitbox.hitTest(this)) {
if (dir == 1) {
_x--;
} else if (dir == 2) {
_x++;
} else if (dir == 3) {
_y++;
} else if (dir == 4) {
_y--;
}
}
if (dir == 1) {
o = 0;
while (o < 10) {
var _local3 = _root.attachMovie("particle1", "particle1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = (_x + _width) - 10;
_local3._y = _y;
_local3._x = _local3._x - (2 * _root.player.xspeed);
_local3._y = _local3._y + (2 * _root.player.yspeed);
o++;
}
} else if (dir == 2) {
o = 0;
while (o < 10) {
var _local3 = _root.attachMovie("particle1", "particle1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x - _width;
_local3._y = _y;
_local3._x = _local3._x - (2 * _root.player.xspeed);
_local3._y = _local3._y + (2 * _root.player.yspeed);
_local3.particle._rotation = 180;
o++;
}
} else if (dir == 3) {
o = 0;
while (o < 10) {
var _local3 = _root.attachMovie("particle1", "particle1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y + _width;
_local3._x = _local3._x - (2 * _root.player.xspeed);
_local3._y = _local3._y + (2 * _root.player.yspeed);
_local3.particle._rotation = _local3.particle._rotation + -90;
o++;
}
} else if (dir == 4) {
o = 0;
while (o < 10) {
var _local3 = _root.attachMovie("particle1", "particle1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x - 10;
_local3._y = (_y + _width) + 20;
_local3._x = _local3._x - (2 * _root.player.xspeed);
_local3._y = _local3._y + (2 * _root.player.yspeed);
_local3.particle._rotation = _local3.particle._rotation + 90;
o++;
}
}
_root.player.enemies[_local5].damaged = _root.player.enemies[_local5].damaged + dmg;
if (_root.player.enemies[_local5].hp <= dmg) {
var _local4 = _parent.attachMovie("scoreindicator", "scoreindicator" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth());
_local4._x = _x;
_local4._y = _y;
_local4.score = _root.player.enemies[_local5].score;
_root.score = _root.score + _root.player.enemies[_local5].score;
}
if (!_root.player.enemies[_local5].statted) {
_root.player.enemies[_local5].attachMovie("stats", "stats" + _root.player.enemies[_local5].getNextHighestDepth(), _root.player.enemies[_local5].getNextHighestDepth());
_root.player.enemies[_local5].statted = true;
}
unloadMovie();
removeMovieClip();
}
}
}
var timer = 0;
var speed = 40;
var hit = false;
}
Symbol 116 MovieClip [__Packages.enemyshot] Frame 0
class enemyshot extends MovieClip
{
var _x, spd, _rotation, _y, removeMovieClip, unloadMovie;
function enemyshot () {
super();
}
function onEnterFrame() {
_x = _x + (Math.cos((_rotation * Math.PI) / 180) * spd);
_y = _y + (Math.sin((_rotation * Math.PI) / 180) * spd);
if (_root.player._x != 400) {
_x = _x - (_root.player._x - 400);
}
if (_root.player._y != 250) {
_y = _y - (_root.player._y - 250);
}
counter++;
if (counter >= countlim) {
removeMovieClip();
unloadMovie();
}
for (var _local3 in _root.player.lev) {
if (_root.player.lev[_local3].hitTest(this)) {
counter = 241;
}
}
if (_root.player.hitbox.hitTest(this)) {
_root.player.hurt(dmg);
removeMovieClip();
unloadMovie();
}
}
var dmg = 5;
var grav = 0;
var countlim = 240;
var counter = 0;
}
Symbol 117 MovieClip [__Packages.robogib] Frame 0
class robogib extends MovieClip
{
var rotspeed, stalled, counter, removeMovieClip, unloadMovie, _x, _y, _rotation;
function robogib () {
super();
}
function onLoad() {
rotspeed = Math.round(Math.random() * 20);
xspeed = Math.round(Math.random() * 10) - 5;
yspeed = -5 - Math.round(Math.random() * 10);
stalled = 1;
counter = 0;
}
function onEnterFrame() {
counter++;
if (counter >= 48) {
removeMovieClip();
unloadMovie();
removeMovieClip(this);
unloadMovie(this);
}
if (stalled == 1) {
_x = _x + xspeed;
_y = _y + yspeed;
_rotation = _rotation - rotspeed;
yspeed = yspeed * 0.95;
yspeed = yspeed + grav;
for (var _local3 in _root.player.lev) {
if (_root.player.lev[_local3].hitTest(this)) {
if (counter < 44) {
counter = 46;
}
}
}
}
}
var xspeed = 0;
var yspeed = 0;
var grav = 3;
}
Symbol 118 MovieClip [__Packages.casing] Frame 0
class casing extends MovieClip
{
var rotspeed, _x, stalled, counter, removeMovieClip, _y, _rotation;
function casing () {
super();
}
function onLoad() {
rotspeed = Math.round(Math.random() * 20);
xspeed = _root.player.dir * Math.round(Math.random() * -5);
yspeed = -5 - Math.round(Math.random() * 10);
if (Key.isDown(38) || (Key.isDown(40))) {
yspeed = Math.round(Math.random() * -5);
xspeed = _root.player.dir * (5 + Math.round(Math.random() * 10));
}
if (Key.isDown(38)) {
xspeed = -xspeed;
}
if (Key.isDown(40)) {
_x = _x + (_root.player.dir * 10);
}
stalled = 1;
counter = 0;
}
function onEnterFrame() {
counter++;
if (counter >= 48) {
removeMovieClip();
}
if (_root.player._x != 400) {
_x = _x - (_root.player._x - 400);
}
if (_root.player._y != 250) {
_y = _y - (_root.player._y - 250);
}
if (stalled == 1) {
_x = _x + xspeed;
_y = _y + yspeed;
_rotation = _rotation - rotspeed;
yspeed = yspeed * 0.95;
yspeed = yspeed + grav;
for (var _local3 in _root.player.lev) {
if (_root.player.lev[_local3].hitTest(this)) {
counter = 50;
}
}
}
}
var xspeed = 0;
var yspeed = 0;
var grav = 3;
}
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 2
stop();
Symbol 62 MovieClip Frame 3
stop();
Instance of Symbol 62 MovieClip "torso" in Symbol 65 MovieClip Frame 1
onClipEvent (load) {
if (Key.isDown(38)) {
gotoAndStop (2);
} else if (Key.isDown(40)) {
gotoAndStop (3);
} else {
gotoAndStop (1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
gotoAndStop (2);
} else if (Key.isDown(40)) {
gotoAndStop (3);
} else {
gotoAndStop (1);
}
}
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 2
stop();
Symbol 79 MovieClip Frame 3
stop();
Symbol 79 MovieClip Frame 4
stop();
Symbol 79 MovieClip Frame 5
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 2
stop();
Symbol 83 MovieClip Frame 3
stop();
Instance of Symbol 79 MovieClip "legs" in Symbol 84 MovieClip Frame 1
onClipEvent (enterFrame) {
if (root.player.dashing > 0) {
gotoAndStop (5);
frame = 5;
} else if (_root.player.onfloor) {
if (this._currentframe != 1) {
gotoAndStop (1);
frame = 1;
}
} else if (_root.player.yspeed > 2) {
gotoAndStop (2);
frame = 2;
} else if ((_root.player.yspeed >= -2) && (_root.player.yspeed <= 2)) {
gotoAndStop (3);
frame = 3;
} else if (_root.player.yspeed < -2) {
gotoAndStop (4);
frame = 4;
}
}
Instance of Symbol 83 MovieClip "torso" in Symbol 84 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
gotoAndStop (2);
} else if (Key.isDown(40)) {
gotoAndStop (3);
} else {
gotoAndStop (1);
}
}
Symbol 85 MovieClip Frame 1
stop();
Instance of Symbol 57 MovieClip "hitbox" in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 58 MovieClip "footbox" in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
if (_root.cout.debugging) {
_visible = true;
}
}
Instance of Symbol 58 MovieClip "backbox" in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
if (_root.cout.debugging) {
_visible = true;
}
hit = false;
}
Instance of Symbol 58 MovieClip "frontbox" in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
if (_root.cout.debugging) {
_visible = true;
}
hit = false;
}
Instance of Symbol 58 MovieClip "headbox" in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
if (_root.cout.debugging) {
_visible = true;
}
}
onClipEvent (enterFrame) {
for (var i in _root.player.lev) {
if (_root.player.lev[i].hitTest(this)) {
_root.player._y++;
if (_root.player.yspeed > 0) {
_root.player.yspeed = 0;
}
}
}
}
Symbol 85 MovieClip Frame 2
stop();
Instance of Symbol 90 MovieClip "blocker" in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
if (_root.cout.debugging) {
_visible = true;
}
_root.player.lev.push(this);
}
Symbol 94 MovieClip Frame 2
stop();
Instance of Symbol 96 MovieClip "hitbox" in Symbol 108 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 109 MovieClip Frame 1
stop();
Instance of Symbol 91 MovieClip in Symbol 109 MovieClip Frame 1
onClipEvent (load) {
this.blocker.bt = 1;
}
Instance of Symbol 108 MovieClip in Symbol 109 MovieClip Frame 1
onClipEvent (load) {
lev = _root.player.lev;
yspeed = 0;
xspeed = 0;
grav = 1;
_root.player.enemies.push(this);
hp = 300;
dir = 0;
ori = -1;
look = -1;
xpos = _parent._x + _x;
ypos = _parent._y + _y;
damaged = 0;
behav = 0;
gothit = false;
time = 0;
dead = false;
score = 3384765 /* 0x33A5BD */;
}
onClipEvent (enterFrame) {
_xscale = (100 * look);
gothit = false;
xpos = _parent._x + _x;
ypos = _parent._y + _y;
if (behav == 0) {
if (yspeed < 0) {
gotoAndStop (3);
} else if (yspeed == 0) {
gotoAndStop (4);
}
time++;
if (time >= 24) {
if (xpos < _root.player._x) {
ori = 1;
look = 1;
}
if (xpos >= _root.player._x) {
ori = -1;
look = -1;
}
if (Math.random() > 0.6) {
time = 0;
behav = 4;
} else if ((_root.player._y > (ypos - (this._height / 2))) && (_root.player._y < (ypos + (this._height / 2)))) {
if (Math.abs(xpos - _root.player._x) < 200) {
behav = 2;
time = 0;
} else {
behav = 1;
time = 0;
}
} else {
yspeed = 15;
_y = (_y-1);
behav = 3;
}
}
} else if (behav == 1) {
if (ori == 1) {
gotoAndStop (1);
if (xpos > _root.player._x) {
behav = 1.1;
}
xspeed = xspeed + 5;
if (xspeed > 50) {
xspeed = 50;
}
} else if (ori == -1) {
gotoAndStop (1);
if (xpos < _root.player._x) {
behav = 1.1;
}
xspeed = xspeed - 5;
if (xspeed < -50) {
xspeed = -50;
}
}
} else if (behav == 1.1) {
xspeed = xspeed - (10 * ori);
if ((xspeed > -10) && (xspeed < 10)) {
xspeed = 0;
}
if (xspeed == 0) {
behav = 1.2;
yspeed = 20;
_y = (_y-1);
gotoAndStop (2);
}
} else if (behav == 1.2) {
if (yspeed == 0) {
onfloor = true;
behav = 1.3;
look = look * -1;
}
} else if (behav == 1.3) {
yspeed = 0;
xspeed = 0;
time++;
if (time == 4) {
gotoAndStop (8);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 61);
shot._y = ypos - 19;
shot._rotation = 90;
shot._rotation = shot._rotation + (ori * 90);
shot.spd = 30;
}
if (time == 8) {
gotoAndStop (9);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 53);
shot._y = ypos + 3;
shot._rotation = 90;
shot._rotation = shot._rotation + (ori * 70);
shot.spd = 30;
}
if (time == 12) {
gotoAndStop (10);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 41);
shot._y = ypos + 26;
shot._rotation = 90;
shot._rotation = shot._rotation + (ori * 45);
shot.spd = 30;
}
if (time == 16) {
gotoAndStop (11);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 3);
shot._y = ypos + 45;
shot._rotation = 90;
shot.spd = 30;
}
if (time == 24) {
time = 0;
behav = 0;
}
} else if (behav == 2) {
time++;
if (time == 4) {
gotoAndStop (4);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 61);
shot._y = ypos - 17;
shot._rotation = -90;
shot._rotation = shot._rotation + (ori * 90);
shot.spd = 30;
}
if (time == 8) {
gotoAndStop (5);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 57);
shot._y = ypos - 44;
shot._rotation = -90;
shot._rotation = shot._rotation + (ori * 60);
shot.spd = 30;
}
if (time == 12) {
gotoAndStop (6);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 36);
shot._y = ypos - 65;
shot._rotation = -90;
shot._rotation = shot._rotation + (ori * 30);
shot.spd = 30;
}
if (time == 16) {
gotoAndStop (7);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos;
shot._y = ypos - 75;
shot._rotation = -90;
shot.spd = 30;
}
if (time == 24) {
time = 0;
yspeed = 20;
_y = (_y-1);
behav = 2.1;
}
} else if (behav == 2.1) {
gotoAndStop (2);
if (yspeed == 0) {
behav = 2.2;
onground = true;
}
} else if (behav == 2.2) {
yspeed = 0;
xspeed = 0;
time++;
if (time == 4) {
gotoAndStop (8);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 61);
shot._y = ypos - 19;
shot._rotation = 90;
shot._rotation = shot._rotation - (ori * 90);
shot.spd = 30;
}
if (time == 8) {
gotoAndStop (9);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 53);
shot._y = ypos + 3;
shot._rotation = 90;
shot._rotation = shot._rotation - (ori * 70);
shot.spd = 30;
}
if (time == 12) {
gotoAndStop (10);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 41);
shot._y = ypos + 26;
shot._rotation = 90;
shot._rotation = shot._rotation - (ori * 45);
shot.spd = 30;
}
if (time == 16) {
gotoAndStop (11);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 3);
shot._y = ypos + 45;
shot._rotation = 90;
shot.spd = 30;
}
if (time == 24) {
time = 0;
behav = 0;
}
} else if (behav == 3) {
gotoAndStop (2);
time = 0;
if (yspeed == 0) {
behav = 3.1;
}
} else if (behav == 3.1) {
yspeed = 0;
xspeed = 0;
time++;
if (time == 4) {
gotoAndStop (8);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 61);
shot._y = ypos - 19;
shot._rotation = 90;
shot._rotation = shot._rotation + ((-ori) * 90);
shot.spd = 30;
}
if (time == 8) {
gotoAndStop (9);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 53);
shot._y = ypos + 3;
shot._rotation = 90;
shot._rotation = shot._rotation + ((-ori) * 70);
shot.spd = 30;
}
if (time == 12) {
gotoAndStop (10);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 41);
shot._y = ypos + 26;
shot._rotation = 90;
shot._rotation = shot._rotation + ((-ori) * 45);
shot.spd = 30;
}
if (time == 16) {
gotoAndStop (11);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 3);
shot._y = ypos + 45;
shot._rotation = 90;
shot.spd = 30;
}
if (time == 24) {
time = 0;
behav = 3.2;
}
} else if (behav == 3.2) {
yspeed = 0;
time++;
if (time == 2) {
gotoAndStop (12);
time = 0;
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 50);
shot._y = ypos + 53;
shot._rotation = 90;
shot.spd = 30;
}
if (ori == 1) {
if (xpos > _root.player._x) {
behav = 3.3;
}
xspeed = xspeed + 5;
if (xspeed > 50) {
xspeed = 50;
}
} else if (ori == -1) {
if (xpos < _root.player._x) {
behav = 3.3;
}
xspeed = xspeed - 5;
if (xspeed < -50) {
xspeed = -50;
}
}
} else if (behav == 3.3) {
time++;
gotoAndStop (12);
if (time == 2) {
time = 0;
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 33);
shot._y = ypos + 53;
shot._rotation = 90;
shot.spd = 30;
}
yspeed = 0;
xspeed = xspeed - (10 * ori);
if ((xspeed > -10) && (xspeed < 10)) {
xspeed = 0;
}
if (xspeed == 0) {
behav = 3.4;
look = look * -1;
}
} else if (behav == 3.4) {
yspeed = 0;
xspeed = 0;
time++;
if (time == 4) {
gotoAndStop (8);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 61);
shot._y = ypos - 19;
shot._rotation = 90;
shot._rotation = shot._rotation + (ori * 90);
shot.spd = 30;
}
if (time == 8) {
gotoAndStop (9);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 53);
shot._y = ypos + 3;
shot._rotation = 90;
shot._rotation = shot._rotation + (ori * 70);
shot.spd = 30;
}
if (time == 12) {
gotoAndStop (10);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 41);
shot._y = ypos + 26;
shot._rotation = 90;
shot._rotation = shot._rotation + (ori * 45);
shot.spd = 30;
}
if (time == 16) {
gotoAndStop (11);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 3);
shot._y = ypos + 45;
shot._rotation = 90;
shot.spd = 30;
}
if (time == 24) {
behav = 0;
time = 0;
}
} else if (behav == 4) {
time++;
if (time == 2) {
gotoAndStop (4);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 61);
shot._y = ypos - 17;
shot._rotation = -90;
shot._rotation = shot._rotation + (ori * 90);
shot.spd = 30;
}
if (time == 4) {
gotoAndStop (5);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 57);
shot._y = ypos - 44;
shot._rotation = -90;
shot._rotation = shot._rotation + (ori * 60);
shot.spd = 30;
}
if (time == 6) {
gotoAndStop (6);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos + (ori * 36);
shot._y = ypos - 65;
shot._rotation = -90;
shot._rotation = shot._rotation + (ori * 30);
shot.spd = 30;
}
if (time == 8) {
gotoAndStop (7);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos;
shot._y = ypos - 75;
shot._rotation = -90;
shot.spd = 30;
look = look * -1;
}
if (time == 10) {
gotoAndStop (6);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 36);
shot._y = ypos - 65;
shot._rotation = -90;
shot._rotation = shot._rotation - (ori * 30);
shot.spd = 30;
}
if (time == 12) {
gotoAndStop (5);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 57);
shot._y = ypos - 44;
shot._rotation = -90;
shot._rotation = shot._rotation - (ori * 60);
shot.spd = 30;
}
if (time == 14) {
gotoAndStop (4);
shot = _root.attachMovie("enemyshot1", "enemyshot1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
shot._x = xpos - (ori * 61);
shot._y = ypos - 17;
shot._rotation = -90;
shot._rotation = shot._rotation - (ori * 90);
shot.spd = 30;
}
if (time == 16) {
time = 0;
behav = 0;
}
}
if (!onfloor) {
_y = (_y - (yspeed * 1.5));
yspeed = yspeed - grav;
}
_x = (_x + (xspeed * 1.5));
onfloor = false;
if (_root.player.hitbox.hitTest(this.hitbox)) {
_root.player.hurt(10);
}
if (damaged > 0) {
var hit = _parent.attachMovie("hitindicator", "hitindicator" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth());
hit.damage = -damaged;
hit._x = _x;
hit._y = _y;
hp = hp - damaged;
damaged = 0;
}
if ((hp <= 0) && (!dead)) {
unloadMovie (this);
removeMovieClip(this);
}
for (var i in lev) {
if (lev[i].hitTest(this.hitbox)) {
gothit = true;
if (lev[i].bt == 2) {
while (lev[i].hitTest(this.hitbox)) {
_x = (_x-1);
dir = -1;
}
} else if (lev[i].bt == 3) {
while (lev[i].hitTest(this.hitbox)) {
_x = (_x+1);
dir = 1;
}
} else if (lev[i].bt == 4) {
while (lev[i].hitTest(this.hitbox)) {
_y = (_y+1);
}
} else if (lev[i].bt == 1) {
yspeed = 0;
onfloor = true;
while (lev[i].hitTest(this.hitbox)) {
_y = (_y-1);
}
_y = (_y+1);
}
}
}
}
Instance of Symbol 91 MovieClip in Symbol 109 MovieClip Frame 1
onClipEvent (load) {
this.blocker.bt = 2;
}
Instance of Symbol 91 MovieClip in Symbol 109 MovieClip Frame 1
onClipEvent (load) {
this.blocker.bt = 3;
}
Symbol 113 MovieClip Frame 2
stop();