Frame 2
var slide = false;
_global.makeblocks = "off";
var drop = -10;
_global.nomake = false;
_global.knockdown = "off";
var l = 0;
_root.fps = 18;
_global.health = 25;
_global.encount = 0;
var r = 0;
var ox = 0;
var oy = 0;
var ldown = false;
_global.getup = false;
_global.blklimit = 65;
var newx = _root.area._x;
var newy = _root.area._y;
_global.i = 1;
_global.health = 25;
stop();
_global.cooldown = 0;
_global.imbalance = 0;
_global.mn = 200;
var jfr = 0;
_global.jk = 450;
Instance of Symbol 34 MovieClip in Frame 2
onClipEvent (load) {
if (gomen == true) {
this.gotoAndPlay(39);
}
}
Frame 5
function checkCollision(p_clip1, p_clip2) {
_global.yenter = null;
_global.yinter = null;
var _local5 = p_clip1.getBounds(_root);
var _local4 = p_clip2.getBounds(_root);
if (((_local5.xMax < _local4.xMin) || (_local4.xMax < _local5.xMin)) || ((_local5.yMax < _local4.yMin) || (_local4.yMax < _local5.yMin))) {
return(false);
}
var _local3 = {};
_local3.xMin = Math.max(_local5.xMin, _local4.xMin);
_local3.xMax = Math.min(_local5.xMax, _local4.xMax);
_local3.yMin = Math.max(_local5.yMin, _local4.yMin);
_local3.yMax = Math.min(_local5.yMax, _local4.yMax);
var _local8 = new flash.display.BitmapData(_local3.xMax - _local3.xMin, _local3.yMax - _local3.yMin, false);
var _local6 = p_clip1.transform.concatenatedMatrix;
_local6.tx = _local6.tx - _local3.xMin;
_local6.ty = _local6.ty - _local3.yMin;
_local8.draw(p_clip1, _local6, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, 255));
_local6 = p_clip2.transform.concatenatedMatrix;
_local6.tx = _local6.tx - _local3.xMin;
_local6.ty = _local6.ty - _local3.yMin;
_local8.draw(p_clip2, _local6, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, 255), "difference");
var _local7 = _local8.getColorBoundsRect(4294967295, 4278255615);
if (_local7.width == 0) {
return(false);
}
_local7.x = _local7.x + _local3.xMin;
_local7.y = _local7.y + _local3.yMin;
if (_local7) {
_global.yenter = _local7.width;
_global.yinter = _local7.height;
return(true);
}
return(false);
}
function spawnbullet() {
duplicateMovieClip (_root.area2.blt, "en" + mn, mn);
_global.cooldown = 5;
_global.shoot = true;
ox = _root.beamguide._x;
oy = _root.beamguide._y;
_root.beamguide._x = _root._xmouse;
_root.beamguide._y = _root._ymouse;
_global.ll = (_root.ply._x + armx) - _root.beamguide._x;
_global.hl = (_root.ply._y + army) - _root.beamguide._y;
_root.area2["en" + mn]._x = ((-_root.area2._x) + _root.ply._x) + armx;
_root.area2["en" + mn]._y = ((-_root.area2._y) + _root.ply._y) + army;
_root.area2["en" + mn]._rotation = ((Math.atan2(hl, ll) * 180) / Math.PI) + 90;
_root.beamguide._x = ox;
_root.beamguide._y = oy;
_global.mn = _global.mn + 1;
if (mn == 320) {
_global.mn = 200;
}
}
function spawnenbullet(dx, dy, rot, type) {
if (type == null) {
type = "enblt";
}
duplicateMovieClip (_root.area3[type], "en" + mn, mn);
_root.area3["en" + mn]._x = dx;
_root.area3["en" + mn]._y = dy - 1;
_root.area3["en" + mn]._rotation = rot;
_global.mn = _global.mn + 1;
if (mn == 320) {
_global.mn = 200;
}
}
function spawnenergy(dx, dy, num) {
rbs = 0;
while (rbs < num) {
duplicateMovieClip (_root.area4.energy, "en" + jk, jk);
_root.area4["en" + jk]._x = dx;
_root.area4["en" + jk]._y = dy;
_root.area4["en" + jk]._rotation = Math.random() * 360;
_root.area4["en" + jk]._alpha = 100;
_global.jk = _global.jk + 1;
if (jk == 680) {
_global.jk = 450;
}
rbs++;
}
}
function spawngenergy(dx, dy, num) {
rbs = 0;
while (rbs < num) {
duplicateMovieClip (_root.area4.genergy, "en" + jk, jk);
_root.area4["en" + jk]._x = dx;
_root.area4["en" + jk]._y = dy;
_root.area4["en" + jk]._rotation = Math.random() * 360;
_root.area4["en" + jk]._alpha = 100;
_global.jk = _global.jk + 1;
if (jk == 680) {
_global.jk = 450;
}
rbs++;
}
}
function spawnblock(tx, ty) {
if (imbalance < 68) {
lll = 0;
while (lll < blklimit) {
if (_root.area["en" + lll]._x == undefined) {
_global.i = lll;
lll = blklimit;
}
lll++;
}
if (_root.area["en" + i]._x != undefined) {
_root.spawnenergy(_root.area["en" + i]._x, _root.area["en" + i]._y, 1);
}
duplicateMovieClip (_root.area.blk, "en" + i, i);
_root.area["en" + i]._x = tx;
_root.area["en" + i]._y = ty;
if ((((_root.checkCollision(_root.area["en" + i], _root.ply.body.toohigh) or _root.checkCollision(_root.area["en" + i], _root.ply.body.middle)) or _root.checkCollision(_root.area["en" + i], _root.area3)) or _root.checkCollision(_root.area["en" + i], _root.area2)) or _root.checkCollision(_root.area["en" + i], _root.area.ground)) {
_root.beamguide.gotoAndStop(1);
removeMovieClip(_root.area["en" + i]);
} else {
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft)) {
if (side2 == "left") {
removeMovieClip(_root.area["en" + i]);
} else {
var _local4 = yenter + 1.6;
var _local3 = _root.area._x;
_global.run = "true";
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright.ini) == false) {
_root.area._x = _root.area._x - _local4;
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft)) {
_root.area._x = _root.area._x - (yenter + 1);
}
if (_root.checkCollision(_root.area, _root.ply.body.tooright)) {
_root.area._x = _root.area._x + (yenter + 1);
if (_root.checkCollision(_root.area, _root.ply.body.tooright) or _root.checkCollision(_root.area, _root.ply.body.tooleft)) {
_root.area._x = _local3;
_global.run = false;
removeMovieClip(_root.area["en" + i]);
}
}
} else {
removeMovieClip(_root.area["en" + i]);
_global.i = _global.i - 1;
}
}
} else if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright)) {
if (side2 == "right") {
removeMovieClip(_root.area["en" + i]);
} else {
var _local4 = yenter + 1.6;
var _local3 = _root.area._x;
_global.run = "true";
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft.ini) == false) {
_root.area._x = _root.area._x + _local4;
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright)) {
_root.area._x = _root.area._x + (yenter + 1);
}
if (_root.checkCollision(_root.area, _root.ply.body.tooleft)) {
_root.area._x = _root.area._x - (yenter + 1);
if (_root.checkCollision(_root.area, _root.ply.body.tooleft) or _root.checkCollision(_root.area, _root.ply.body.tooright)) {
_root.area._x = _local3;
removeMovieClip(_root.area["en" + i]);
}
}
} else {
removeMovieClip(_root.area["en" + i]);
_global.i = _global.i - 1;
}
}
}
if ((_root.checkCollision(_root.area, _root.ply.body.toohigh) or _root.checkCollision(_root.area["en" + i], _root.ply.body.toolow)) and _root.checkCollision(_root.area, _root.ply.body.cantjump)) {
removeMovieClip(_root.area["en" + i]);
}
if ((_root.checkCollision(_root.area["en" + i], _root.ply.toolow) and _root.checkCollision(_root.area, _root.ply.body.cantjump)) or _root.checkCollision(_root.area["en" + i], _root.ply.body.cantjump.noblocks)) {
removeMovieClip(_root.area["en" + i]);
}
}
if (_root.area["en" + i]._x != undefined) {
_root.beamguide.gotoAndStop(2);
_root.beamguide._x = _root._xmouse;
_root.beamguide._y = _root._ymouse;
_root.beamguide._rotation = 0;
_global.ll = (_root.ply._x + armx) - _root.beamguide._x;
_global.hl = (_root.ply._y + army) - _root.beamguide._y;
_root.beamguide._width = Math.sqrt((hl * hl) + (ll * ll)) - 40;
_root.beamguide._rotation = (Math.atan2(hl, ll) * 180) / Math.PI;
_root.beamguide._visible = true;
_root.beamguide._alpha = 100;
}
}
_global.i = _global.i + 1;
if (i > blklimit) {
_global.i = 1;
}
}
function checker(x) {
if (Key.isDown(17)) {
trace(x);
}
}
function plyaction() {
if (health <= 0) {
_global.knockdown = "on";
_root.fps = 9;
}
if (_root.ply._alpha < 100) {
_root.ply._alpha = _root.ply._alpha + 5;
if (_root.ply._alpha > 100) {
_root.ply._alpha = 100;
}
}
if (_root.checkCollision(_root.ply.body.toolow, _root.area) == false) {
if (drop > -35) {
drop = drop - 3.2;
}
if (_root.checkCollision(_root.area, _root.ply.body.canjump) == false) {
var _local3 = false;
if ((_root.ply._currentframe != 3) and (_root.ply._currentframe != 5)) {
_global.jumping = false;
}
} else {
var _local3 = true;
}
} else {
if (drop < 0) {
drop = 0;
}
var _local3 = true;
}
if (jumping == true) {
_global.jumping = false;
drop = 38;
if (side2 == "left") {
l = l + 2;
} else {
r = r + 2;
}
var _local3 = false;
}
if (((jumping != "begin") and (_local3 == false)) and (knockdown == "off")) {
slide = false;
if (drop <= -4) {
if (side2 == "right") {
_root.ply.gotoAndStop(4);
} else {
_root.ply.gotoAndStop(6);
}
}
}
if ((((((_local3 == true) and (drop == 0)) and (Math.abs(r - l) > 1)) and (slide == false)) and (knockdown == "off")) and (jumping != "begin")) {
if (side2 == "left") {
_root.ply.gotoAndStop(2);
} else {
_root.ply.gotoAndStop(1);
}
}
_root.area._y = _root.area._y + (drop / 2.2);
ldown = false;
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
}
}
if (((((knockdown == "on") and (_root.ply._currentframe != 13)) and (_root.ply._currentframe != 14)) and (_root.ply._currentframe != 15)) and (_root.ply._currentframe != 16)) {
if (_root._currentframe == 8) {
_global.health = _global.health - 5;
}
if (side2 == "left") {
_root.ply.gotoAndStop(14);
drop = 24;
var _local3 = false;
r = 36;
l = 0;
} else {
drop = 24;
var _local3 = false;
l = 36;
r = 0;
_root.ply.gotoAndStop(13);
}
_root.area._y = _root.area._y + 10;
}
if (((_root.ply._currentframe == 14) or (_root.ply._currentframe == 13)) and (_local3 == true)) {
if (side2 == "left") {
_root.ply.gotoAndStop(16);
} else {
_root.ply.gotoAndStop(15);
}
}
if (jumping == false) {
if (_root.checkCollision(_root.ply.body.tooright, _root.area) == false) {
if (Key.isDown(68) and (knockdown == "off")) {
ldown = true;
if (r < 11) {
if (r < 1.5) {
r = r + 1.5;
}
r = r + 0.5;
}
if ((_local3 == true) and (drop < 5)) {
if ((l >= r) and (((l - r) > 7) or (slide == true))) {
_root.ply.gotoAndStop(7);
slide = true;
} else {
_root.ply.gotoAndStop(1);
if (slide == true) {
r = 1;
slide = false;
l = 0;
}
}
} else if ((drop <= -15) or ((((((drop > 0) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) and (getup == false))) {
_root.ply.gotoAndStop(4);
_global.side2 = "right";
}
} else if (r > 1.1) {
r = r / 1.08;
} else {
r = 0;
}
} else {
r = 0;
}
if ((r > 14) and (_local3 == true)) {
r = r / 1.2;
}
if (_root.checkCollision(_root.ply.body.tooleft, _root.area) == false) {
if ((Key.isDown(65) and (ldown == false)) and (knockdown == "off")) {
if (l < 11) {
if (l < 1.5) {
l = l + 1.5;
}
l = l + 0.5;
}
if ((_local3 == true) and (drop < 5)) {
if ((r >= l) and (((r - l) > 7) or (slide == true))) {
_root.ply.gotoAndStop(8);
slide = true;
} else {
_root.ply.gotoAndStop(2);
if (slide == true) {
r = 0;
slide = false;
l = 1;
}
}
} else if ((drop <= -15) or ((((((drop > 0) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) and (getup == false))) {
_root.ply.gotoAndStop(6);
_global.side2 = "left";
}
} else if (l > 1.1) {
l = l / 1.08;
} else {
l = 0;
}
} else {
l = 0;
}
}
if ((l > 14) and (_local3 == true)) {
l = l / 1.2;
}
_root.area._x = _root.area._x + l;
_root.area._x = _root.area._x - r;
if ((((((((_local3 == true) and (r < 2)) and (l < 2)) and (jumping == false)) and (drop < 1)) and (drop > -1)) and (slide == false)) and (getup == false)) {
if (knockdown == "off") {
if (side2 == "left") {
_root.ply.gotoAndStop(12);
} else {
_root.ply.gotoAndStop(11);
}
}
}
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area)) {
_root.checkCollision(_root.ply.body.toohigh, _root.area);
_root.area._y = _root.area._y - (yinter + 1);
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area)) {
if (yenter > 4) {
_root.checkCollision(_root.ply.body.toohigh, _root.area);
_root.area._y = _root.area._y - (yinter + 1);
}
}
if (drop >= 0) {
drop = drop * -0.5;
}
}
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
}
}
if (_root.checkCollision(_root.ply.body.tooright.ini, _root.area)) {
_root.area._x = _root.area._x + yenter;
r = 0;
if (_root.checkCollision(_root.ply.body.tooright.ini, _root.area)) {
_root.area._x = _root.area._x + (yenter + 1);
}
}
if (_root.checkCollision(_root.ply.body.tooleft.ini, _root.area)) {
_root.area._x = _root.area._x - yenter;
l = 0;
if (_root.checkCollision(_root.ply.body.tooleft.ini, _root.area)) {
_root.area._x = _root.area._x - (yenter + 1);
}
}
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area) == false) {
newy = _root.area._y;
newx = _root.area._x;
} else {
r = 0;
_root.area._x = newx;
_root.area._y = newy;
drop = 0;
l = 0;
}
if (((((((_local3 == true) and (knockdown == "off")) and (_root.checkCollision(_root.ply.body.cantjump, _root.area) == false)) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) {
if (Key.isDown(87)) {
_global.jumping = "begin";
if (side2 == "right") {
if (slide == true) {
_root.ply.gotoAndStop(9);
drop = 54;
l = 18;
slide = false;
_global.side2 = "left";
} else {
_root.ply.gotoAndStop(3);
}
} else if (slide == true) {
_root.ply.gotoAndStop(10);
drop = 54;
r = 18;
slide = false;
_global.side2 = "right";
} else {
_root.ply.gotoAndStop(5);
}
}
}
_global.bldrop = drop;
_global.blspd = r - l;
_root.area2._x = _root.area._x;
_root.area3._x = _root.area._x;
_root.area2._y = _root.area._y;
_root.area3._y = _root.area._y;
_root.area4._x = _root.area._x;
_root.area4._y = _root.area._y;
_root.area5._x = _root.area._x;
_root.area5._y = _root.area._y;
}
function araction(nam) {
if (_root.area3[nam].destroy == "on") {
removeMovieClip(_root.area3[nam]);
} else if (_root.area3[nam].destroy == "ready") {
_root.area3[nam].destroy = "ready2";
} else if (_root.area3[nam].destroy == "ready2") {
_root.area3[nam].destroy = "ready3";
} else if (_root.area3[nam].destroy == "ready3") {
_root.area3[nam].destroy = "on";
}
_root.area3[nam].timer = _root.area3[nam].timer - 1;
if (_root.area3[nam].timer == 0) {
removeMovieClip(_root.area3[nam]);
_root.area3[nam].timer = 2;
}
_global.rot = _root.area3[nam]._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if (_root.area3[nam].destroy == "off") {
_root.area3[nam]._x = _root.area3[nam]._x - (Math.cos((_root.area3[nam]._rotation * Math.PI) / 180) * 20);
_root.area3[nam]._y = _root.area3[nam]._y - (Math.sin((_root.area3[nam]._rotation * Math.PI) / 180) * 20);
}
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_global.yenter = _global.yenter + 2;
_global.yinter = _global.yinter + 2;
_root.area3[nam].destroy = "ready";
var _local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6.5) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6.5) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_global.yenter = _global.yenter + 2;
_global.yinter = _global.yinter + 2;
_local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6.5) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6.5) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_global.yenter = _global.yenter + 2;
_global.yinter = _global.yinter + 2;
_local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6.5) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6.5) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
}
}
}
if (_root.area3[nam].destroy == "off") {
if (_root.checkCollision(_root.ply.bod, _root.area3[nam])) {
_root.area3[nam].destroy = "ready";
_global.health = _global.health - 1;
_root.area3[nam].gotoAndStop(2);
}
}
}
function bowaction(nam) {
if (_root.area3[nam]._currentframe != 41) {
if ((_root.area3[nam].health <= 0) and (_root.area3[nam]._currentframe < 41)) {
_root.spawnenergy(_root.area3[nam]._x + ((_root.area3[nam]._currentframe * 6) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._y + ((_root.area3[nam]._currentframe * 6) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180)), 1);
if (_root.area3[nam]._currentframe < 29) {
_global.encount = _global.encount - 1;
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = false;
_root.area3[nam].gotoAndPlay(29);
}
} else {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam], _root.area2)) {
if (_root.area3[nam].chase == false) {
_root.area3[nam].play();
_root.area3[nam].chase = true;
}
if (((-1 * _root.area2._x) + _root.ply._x) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x - 7;
} else {
_root.area3[nam]._x = _root.area3[nam]._x + 7;
}
if (((-1 * _root.area2._y) + _root.ply._y) > _root.area3[nam]._y) {
_root.area3[nam]._y = _root.area3[nam]._y - 5;
} else {
_root.area3[nam]._y = _root.area3[nam]._y + 5;
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area2) and (_root.area3[nam].hurt == 0)) and (health > 0)) {
_root.area3[nam].hurt = 15;
_root.area3[nam].bod.play();
_root.area3[nam].health--;
}
}
}
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
_root.area3[nam].bod.play();
} else {
_root.area3[nam].bod.gotoAndStop(1);
}
if ((_root.area3[nam].chase == true) and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 1500)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 15) - _root.area3[nam]._x) < 4) {
_root.area3[nam]._x = ((-1 * _root.area2._x) + _root.ply._x) + 15;
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x + 5;
} else {
_root.area3[nam]._x = _root.area3[nam]._x - 5;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
} else {
_root.area3[nam].oldx = _root.area3[nam]._x;
}
if (Math.abs((((-1 * _root.area2._y) + _root.ply._y) + 30) - _root.area3[nam]._y) < 3) {
_root.area3[nam]._y = ((-1 * _root.area2._y) + _root.ply._y) + 30;
} else if ((((-1 * _root.area2._y) + _root.ply._y) + 30) > _root.area3[nam]._y) {
_root.area3[nam]._y = _root.area3[nam]._y + 4;
} else {
_root.area3[nam]._y = _root.area3[nam]._y - 4;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._y = _root.area3[nam].oldy;
} else {
_root.area3[nam].oldy = _root.area3[nam]._y;
}
var _local4 = (-1 * Math.abs((Math.atan2(((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) - 30, ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) - 12) * 180) / Math.PI)) - 0;
if (Math.abs(_local4 - _root.area3[nam]._rotation) < 8) {
_root.area3[nam]._rotation = _local4;
} else if (_local4 > _root.area3[nam]._rotation) {
_root.area3[nam]._rotation = _root.area3[nam]._rotation + 8;
} else {
_root.area3[nam]._rotation = _root.area3[nam]._rotation - 8;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._rotation = oldrot;
} else {
oldrot = _root.area3[nam]._rotation;
}
if (_root.area3[nam].fire == true) {
_root.spawnenbullet(_root.area3[nam]._x + (31.6 * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._y + (31.4 * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._rotation, "enar");
_root.area3[nam].fire = false;
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 200) {
_root.area3[nam].chase = true;
_root.area3[nam].play();
}
}
}
}
}
function blkaction(nam) {
if (_root.area[nam].destroy != 0) {
if (_root.checkCollision(_root.area[nam], _root.ply.body)) {
removeMovieClip(_root.area[nam]);
}
}
if (_root.area[nam].destroy == 1) {
_root.area[nam].destroy = 2;
_root.area[nam].cd = 13;
_root.spawngenergy(_root.area[nam]._x, _root.area[nam]._y, 1);
}
if (_root.area[nam].destroy == 2) {
_root.area[nam].cd--;
} else if (bstage == 10) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
} else if (_root.checkCollision(_root.area[nam], _root.area2)) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
} else if (_root.checkCollision(_root.area[nam], _root.area3)) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
}
if ((_root.area[nam].destroy == 2) and (_root.area[nam].cd == 0)) {
removeMovieClip(_root.area[nam]);
}
}
function beamaction() {
if (_root.beamguide._alpha <= 0) {
_root.beamguide._alpha = 100;
_root.beamguide._visible = false;
}
if (_root.beamguide._visible == true) {
_root.beamguide._alpha = _root.beamguide._alpha - 10;
if (makeblocks == "on") {
_root.beamguide.gotoAndStop(2);
} else {
_root.beamguide.gotoAndStop(1);
}
_root.beamguide._xscale = _root.beamguide._xscale / 1.1;
} else {
_root.beamguide.gotoAndStop(3);
}
}
function solaction(nam) {
if (_root.area3[nam].health > -55) {
_root.area3[nam].shoot = true;
if (_root.area3[nam].health <= 0) {
if (_root.area3[nam].cooldown == 0) {
_root.spawnenergy(_root.area3[nam]._x, _root.area3[nam]._y, 1);
_root.area3[nam].cooldown = 3;
} else {
_root.area3[nam].cooldown--;
}
if (_root.area3[nam].health == 0) {
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = "off";
_root.area3[nam].shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(6);
} else {
_root.area3[nam].gotoAndStop(7);
}
}
_root.area3[nam].health--;
} else {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam], _root.area2)) {
if (_root.area3[nam].chase == "off") {
_root.area3[nam].play();
_root.area3[nam].chase = "on";
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area2) and (_root.area3[nam].hurt == 0)) and (_root.area3[nam].health > 0)) {
_root.area3[nam].hurt = 11;
_root.area3[nam].health--;
}
}
}
if ((_root.area3[nam].chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 460)) {
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
if (_root.area3[nam].hurt == 10) {
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(9);
} else {
_root.area3[nam].gotoAndStop(8);
}
}
} else {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) < 150) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
if (_root.area3[nam]._currentframe == 4) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(5);
} else {
if (_root.area3[nam]._currentframe == 5) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(4);
}
} else if ((((_root.area3[nam]._currentframe != 4) and (_root.area3[nam]._currentframe != 5)) or (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) > 230)) and (_root.area3[nam].hit <= 0)) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam].shoot = false;
_root.area3[nam]._x = _root.area3[nam]._x + 6;
_root.area3[nam].gotoAndStop(2);
} else {
_root.area3[nam].shoot = false;
_root.area3[nam]._x = _root.area3[nam]._x - 6;
_root.area3[nam].gotoAndStop(3);
}
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area) or (_root.checkCollision(_root.area3[nam].grd, _root.area.ground) == false)) or (yenter < 45)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
_root.area3[nam].hit = 6;
_root.area3[nam].shoot = true;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
if (_root.area3[nam]._currentframe == 4) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(5);
_root.area3[nam].shoot = true;
} else {
if (_root.area3[nam]._currentframe == 5) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(4);
_root.area3[nam].shoot = true;
}
} else {
_root.area3[nam].hit--;
if (_root.area3[nam].hit <= 0) {
_root.area3[nam].oldx = _root.area3[nam]._x;
} else {
_root.area3[nam].shoot = true;
_root.area3[nam]._x = _root.area3[nam].oldx;
}
}
}
} else {
_root.area3[nam].stop();
_root.area3[nam].gotoAndStop(1);
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + ((((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5) * (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5)))) < 250) {
_root.area3[nam].chase = "on";
_root.area3[nam].play();
}
}
}
if (_root.area3[nam].shoot == true) {
_root.area3[nam].gunprog = _root.area3[nam].gunprog + 1;
} else {
_root.area3[nam].gunprog = 1;
}
}
}
function gaction(nam) {
if (_root.area3[nam].health > -55) {
if (_root.area3[nam].health <= 0) {
if (_root.area3[nam].cooldown == 0) {
_root.spawnenergy(_root.area3[nam]._x, _root.area3[nam]._y, 1);
_root.area3[nam].cooldown = 3;
} else {
_root.area3[nam].cooldown--;
}
if (_root.area3[nam].health == 0) {
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = "off";
shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(6);
} else {
_root.area3[nam].gotoAndStop(7);
}
}
_root.area3[nam].health--;
} else if ((_root.area3[nam].chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 700)) {
if (_root.area3[nam]._currentframe != 1) {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam].body, _root.area2) and (_root.area3[nam].health > 0)) {
_root.area3[nam].hurt = 10;
_root.area3[nam].health--;
}
}
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
_root.area3[nam].bod.gotoAndStop(2);
if (_root.area3[nam].hurt == 9) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(8);
} else {
_root.area3[nam].gotoAndStop(9);
}
}
} else {
_root.area3[nam].bod.gotoAndStop(1);
if ((_root.area3[nam]._currentframe != 4) and (_root.area3[nam]._currentframe != 5)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) < 170) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(5);
} else {
_root.area3[nam].gotoAndStop(4);
}
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x + 7.5;
_root.area3[nam].gotoAndStop(2);
} else {
_root.area3[nam]._x = _root.area3[nam]._x - 7.5;
_root.area3[nam].gotoAndStop(3);
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area) or (_root.checkCollision(_root.area3[nam].grd, _root.area.ground) == false)) or (yenter < 45)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(5);
} else {
_root.area3[nam].gotoAndStop(4);
}
} else {
_root.area3[nam].oldx = _root.area3[nam]._x;
}
}
}
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + ((((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5) * (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5)))) < 250) {
_root.area3[nam].chase = "on";
_root.area3[nam].body.play();
}
}
}
}
_global.destroyheadblocks = "off";
var slide = false;
_global.makeblocks = "off";
var drop = -10;
_global.nomake = false;
_global.knockdown = "off";
var l = 0;
_root.fps = 18;
_global.health = 25;
_global.encount = 0;
var r = 0;
var ox = 0;
var oy = 0;
var ldown = false;
_root._quality = "MEDIUM";
_global.getup = false;
_global.blklimit = 65;
var newx = _root.area._x;
var newy = _root.area._y;
_global.i = 1;
_global.health = 25;
stop();
_global.plytype = "basic";
_global.cooldown = 0;
_global.imbalance = 0;
_global.mn = 200;
var jfr = 0;
_global.jk = 450;
_root.stop();
Instance of Symbol 43 MovieClip in Frame 5
onClipEvent (load) {
this.opaqueBackground = 13421772 /* 0xCCCCCC */;
}
onClipEvent (enterFrame) {
this._x = (_root.area._x / 3) - 650;
this._y = (_root.area._y / 3) - 900;
}
Instance of Symbol 61 MovieClip "beamguide" in Frame 5
onClipEvent (enterFrame) {
_root.beamaction();
}
Instance of Symbol 128 MovieClip "ply" in Frame 5
onClipEvent (load) {
this._name = "ply";
this._alpha = 0;
}
onClipEvent (enterFrame) {
_root.plyaction();
}
Instance of Symbol 138 MovieClip "area" in Frame 5
onClipEvent (load) {
var blktimer = 0;
}
onClipEvent (mouseDown) {
blktimer = 4;
}
onClipEvent (mouseUp) {
blktimer = 0;
if (((knockdown == "off") and (makeblocks == "off")) and (cooldown <= 0)) {
_root.spawnbullet();
_global.plyfire = 2;
_global.makeblocks = "off";
}
_global.makeblocks = "off";
}
onClipEvent (enterFrame) {
if ((nomake == false) and (imbalance < blklimit)) {
if (blktimer > 0) {
if (blktimer > 1) {
blktimer--;
} else {
_global.makeblocks = "on";
}
}
} else {
_global.makeblocks = "off";
}
if (plyfire > 1) {
_global.plyfire = _global.plyfire + 1;
if (plyfire > 4) {
_global.plyfire = 1;
}
}
_global.h = ((_root._ymouse - _root.ply._y) - army) - bdy;
_global.len = ((_root._xmouse - _root.ply._x) - armx) - bdx;
if (cooldown > -10) {
_global.cooldown = _global.cooldown - 1;
}
if (makeblocks == "on") {
_root.spawnblock((-1 * _root.area._x) + _root._xmouse, (-1 * _root.area._y) + _root._ymouse);
}
}
Instance of Symbol 154 MovieClip in Frame 5
onClipEvent (enterFrame) {
this.gotoAndStop(imbalance);
}
Instance of Symbol 158 MovieClip in Frame 5
onClipEvent (enterFrame) {
this.gotoAndStop(health);
}
Instance of Symbol 160 MovieClip in Frame 5
onClipEvent (load) {
var oldh = health;
}
onClipEvent (enterFrame) {
if (oldh > health) {
this.play();
}
oldh = health;
}
Frame 6
stop();
stopAllSounds();
Frame 7
stop();
_root.l = 0;
_global.imbalance = 0;
_root.r = 0;
_global.makeblocks = "off";
Instance of Symbol 177 MovieClip in Frame 7
onClipEvent (load) {
this.opaqueBackground = 13421772 /* 0xCCCCCC */;
}
onClipEvent (enterFrame) {
this._x = (_root.area._x / 3.3) - 750;
this._y = (_root.area._y / 3.3) - 1200;
}
Instance of Symbol 61 MovieClip "beamguide" in Frame 7
onClipEvent (enterFrame) {
_root.beamaction();
}
Instance of Symbol 128 MovieClip "ply" in Frame 7
onClipEvent (load) {
this._name = "ply";
this._alpha = 0;
_root.drop = 10;
}
onClipEvent (enterFrame) {
_root.plyaction();
}
Instance of Symbol 245 MovieClip "area" in Frame 7
onClipEvent (load) {
var blktimer = 0;
}
onClipEvent (mouseDown) {
blktimer = 4;
}
onClipEvent (mouseUp) {
blktimer = 0;
if (((knockdown == "off") and (makeblocks == "off")) and (cooldown <= 0)) {
_root.spawnbullet();
_global.plyfire = 2;
_global.makeblocks = "off";
}
_global.makeblocks = "off";
}
onClipEvent (enterFrame) {
if ((nomake == false) and (imbalance < blklimit)) {
if (blktimer > 0) {
if (blktimer > 1) {
blktimer--;
} else {
_global.makeblocks = "on";
}
}
} else {
_global.makeblocks = "off";
}
if (plyfire > 1) {
_global.plyfire = _global.plyfire + 1;
if (plyfire > 4) {
_global.plyfire = 1;
}
}
_global.h = ((_root._ymouse - _root.ply._y) - army) - bdy;
_global.len = ((_root._xmouse - _root.ply._x) - armx) - bdx;
if (cooldown > -10) {
_global.cooldown = _global.cooldown - 1;
}
if (makeblocks == "on") {
_root.spawnblock((-1 * _root.area._x) + _root._xmouse, (-1 * _root.area._y) + _root._ymouse);
}
}
Instance of Symbol 154 MovieClip in Frame 7
onClipEvent (enterFrame) {
this.gotoAndStop(imbalance);
}
Instance of Symbol 158 MovieClip in Frame 7
onClipEvent (enterFrame) {
this.gotoAndStop(health);
}
Instance of Symbol 160 MovieClip in Frame 7
onClipEvent (load) {
var oldh = health;
}
onClipEvent (enterFrame) {
if (oldh > health) {
if (nodamage == true) {
_global.health = oldh;
}
this.play();
}
oldh = health;
}
Frame 8
stop();
_global.imbalance = 0;
_root.l = 0;
_root.r = 0;
_global.makeblocks = "off";
_global.cooldown = -10;
_global.health = 25;
Instance of Symbol 249 MovieClip in Frame 8
onClipEvent (load) {
this.opaqueBackground = 13421772 /* 0xCCCCCC */;
}
onClipEvent (enterFrame) {
this._x = (_root.area._x / 2) - 650;
this._y = (_root.area._y / 2) - 900;
}
Instance of Symbol 252 MovieClip "area" in Frame 8
onClipEvent (load) {
var blktimer = 0;
}
onClipEvent (mouseDown) {
blktimer = 4;
}
onClipEvent (mouseUp) {
blktimer = 0;
if (((knockdown == "off") and (makeblocks == "off")) and (cooldown <= 0)) {
_root.spawnbullet();
_global.plyfire = 2;
_global.makeblocks = "off";
}
_global.makeblocks = "off";
}
onClipEvent (enterFrame) {
if ((nomake == false) and (imbalance < blklimit)) {
if (blktimer > 0) {
if (blktimer > 1) {
blktimer--;
} else {
_global.makeblocks = "on";
}
}
} else {
_global.makeblocks = "off";
}
if (plyfire > 1) {
_global.plyfire = _global.plyfire + 1;
if (plyfire > 4) {
_global.plyfire = 1;
}
}
_global.h = ((_root._ymouse - _root.ply._y) - army) - bdy;
_global.len = ((_root._xmouse - _root.ply._x) - armx) - bdx;
if (cooldown > -10) {
_global.cooldown = _global.cooldown - 1;
}
if (makeblocks == "on") {
_root.spawnblock((-1 * _root.area._x) + _root._xmouse, (-1 * _root.area._y) + _root._ymouse);
}
}
Instance of Symbol 331 MovieClip in Frame 8
onClipEvent (enterFrame) {
this.gotoAndStop(50 - _root.area3.boss.health);
}
Frame 9
stop();
stopAllSounds();
Instance of Symbol 137 MovieClip "blk" in Frame 9
onClipEvent (load) {
var destroy = 0;
var cd = 0;
if (run == "true") {
if (_root.checkCollision(this, _root.ply.body.tooleft) or _root.checkCollision(this, _root.ply.body.tooright)) {
_global.run = false;
removeMovieClip(this);
}
}
}
onClipEvent (enterFrame) {
_root.blkaction(this._name);
}
Frame 10
stop();
stopAllSounds();
Frame 11
stop();
_global.imbalance = 0;
_global.makeblocks = "off";
_global.cooldown = -10;
_global.health = 25;
Instance of Symbol 357 MovieClip "area5" in Frame 11
onClipEvent (load) {
this.opaqueBackground = 13421772 /* 0xCCCCCC */;
}
onClipEvent (enterFrame) {
this._x = _root.area._x;
this._y = _root.area._y;
}
Instance of Symbol 393 MovieClip "area3" in Frame 11
onClipEvent (enterFrame) {
this._x = _root.area._x;
this._y = _root.area._y;
}
Instance of Symbol 61 MovieClip "beamguide" in Frame 11
onClipEvent (enterFrame) {
_root.beamaction();
}
Instance of Symbol 128 MovieClip "ply" in Frame 11
onClipEvent (load) {
this._name = "ply";
this._alpha = 0;
_root.drop = 10;
}
onClipEvent (enterFrame) {
_root.plyaction();
}
Instance of Symbol 416 MovieClip "area" in Frame 11
onClipEvent (load) {
var blktimer = 0;
}
onClipEvent (mouseDown) {
blktimer = 4;
}
onClipEvent (mouseUp) {
blktimer = 0;
if (((knockdown == "off") and (makeblocks == "off")) and (cooldown <= 0)) {
_root.spawnbullet();
_global.plyfire = 2;
_global.makeblocks = "off";
}
_global.makeblocks = "off";
}
onClipEvent (enterFrame) {
if ((nomake == false) and (imbalance < blklimit)) {
if (blktimer > 0) {
if (blktimer > 1) {
blktimer--;
} else {
_global.makeblocks = "on";
}
}
} else {
_global.makeblocks = "off";
}
if (plyfire > 1) {
_global.plyfire = _global.plyfire + 1;
if (plyfire > 4) {
_global.plyfire = 1;
}
}
_global.h = ((_root._ymouse - _root.ply._y) - army) - bdy;
_global.len = ((_root._xmouse - _root.ply._x) - armx) - bdx;
if (cooldown > -10) {
_global.cooldown = _global.cooldown - 1;
}
if (makeblocks == "on") {
_root.spawnblock((-1 * _root.area._x) + _root._xmouse, (-1 * _root.area._y) + _root._ymouse);
}
}
Instance of Symbol 154 MovieClip in Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(imbalance);
}
Instance of Symbol 158 MovieClip in Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(health);
}
Instance of Symbol 160 MovieClip in Frame 11
onClipEvent (load) {
var oldh = health;
}
onClipEvent (enterFrame) {
if (oldh > health) {
if (nodamage == true) {
_global.health = oldh;
}
this.play();
}
oldh = health;
}
Frame 12
stop();
_global.makeblocks = "off";
_global.cooldown = -10;
stopAllSounds();
Frame 13
stop();
_global.imbalance = 0;
_global.health = 25;
_global.makeblocks = "off";
_global.cooldown = -10;
Instance of Symbol 427 MovieClip "area5" in Frame 13
onClipEvent (load) {
this.opaqueBackground = 13421772 /* 0xCCCCCC */;
}
onClipEvent (enterFrame) {
this._x = _root.area._x;
this._y = _root.area._y;
}
Instance of Symbol 178 MovieClip "area2" in Frame 13
onClipEvent (enterFrame) {
this._x = _root.area._x;
this._y = _root.area._y;
}
Instance of Symbol 429 MovieClip "area3" in Frame 13
onClipEvent (enterFrame) {
this._x = _root.area._x;
this._y = _root.area._y;
}
Instance of Symbol 61 MovieClip "beamguide" in Frame 13
onClipEvent (enterFrame) {
_root.beamaction();
}
Instance of Symbol 128 MovieClip "ply" in Frame 13
onClipEvent (load) {
this._name = "ply";
this._alpha = 0;
_root.drop = 10;
}
onClipEvent (enterFrame) {
_root.plyaction();
}
Instance of Symbol 482 MovieClip "area" in Frame 13
onClipEvent (load) {
var blktimer = 0;
}
onClipEvent (mouseDown) {
blktimer = 4;
}
onClipEvent (mouseUp) {
blktimer = 0;
if (((knockdown == "off") and (makeblocks == "off")) and (cooldown <= 0)) {
_root.spawnbullet();
_global.plyfire = 2;
_global.makeblocks = "off";
}
_global.makeblocks = "off";
}
onClipEvent (enterFrame) {
if ((nomake == false) and (imbalance < blklimit)) {
if (blktimer > 0) {
if (blktimer > 1) {
blktimer--;
} else {
_global.makeblocks = "on";
}
}
} else {
_global.makeblocks = "off";
}
if (plyfire > 1) {
_global.plyfire = _global.plyfire + 1;
if (plyfire > 4) {
_global.plyfire = 1;
}
}
_global.h = ((_root._ymouse - _root.ply._y) - army) - bdy;
_global.len = ((_root._xmouse - _root.ply._x) - armx) - bdx;
if (cooldown > -10) {
_global.cooldown = _global.cooldown - 1;
}
if (makeblocks == "on") {
_root.spawnblock((-1 * _root.area._x) + _root._xmouse, (-1 * _root.area._y) + _root._ymouse);
}
}
Instance of Symbol 154 MovieClip in Frame 13
onClipEvent (enterFrame) {
this.gotoAndStop(imbalance);
}
Instance of Symbol 158 MovieClip in Frame 13
onClipEvent (enterFrame) {
this.gotoAndStop(health);
}
Instance of Symbol 160 MovieClip in Frame 13
onClipEvent (load) {
var oldh = health;
}
onClipEvent (enterFrame) {
if (oldh > health) {
if (nodamage == true) {
_global.health = oldh;
}
this.play();
}
oldh = health;
}
Frame 14
stop();
_global.imbalance = 0;
_global.health = 25;
_global.makeblocks = "off";
_global.blockclear = false;
_global.cooldown = -10;
stopAllSounds();
Instance of Symbol 490 MovieClip "area5" in Frame 14
onClipEvent (load) {
this.opaqueBackground = 13421772 /* 0xCCCCCC */;
}
onClipEvent (enterFrame) {
this._x = _root.area._x;
this._y = _root.area._y;
}
Instance of Symbol 519 MovieClip "area3" in Frame 14
onClipEvent (enterFrame) {
this._x = _root.area._x;
this._y = _root.area._y;
}
Instance of Symbol 522 MovieClip "area" in Frame 14
onClipEvent (load) {
var blktimer = 0;
}
onClipEvent (mouseDown) {
blktimer = 4;
}
onClipEvent (mouseUp) {
blktimer = 0;
if (((knockdown == "off") and (makeblocks == "off")) and (cooldown <= 0)) {
_root.spawnbullet();
_global.plyfire = 2;
_global.makeblocks = "off";
}
_global.makeblocks = "off";
}
onClipEvent (enterFrame) {
if ((nomake == false) and (imbalance < blklimit)) {
if (blktimer > 0) {
if (blktimer > 1) {
blktimer--;
} else {
_global.makeblocks = "on";
}
}
} else {
_global.makeblocks = "off";
}
if (plyfire > 1) {
_global.plyfire = _global.plyfire + 1;
if (plyfire > 4) {
_global.plyfire = 1;
}
}
_global.h = ((_root._ymouse - _root.ply._y) - army) - bdy;
_global.len = ((_root._xmouse - _root.ply._x) - armx) - bdx;
if (cooldown > -10) {
_global.cooldown = _global.cooldown - 1;
}
if (makeblocks == "on") {
_root.spawnblock((-1 * _root.area._x) + _root._xmouse, (-1 * _root.area._y) + _root._ymouse);
}
}
Instance of Symbol 154 MovieClip in Frame 14
onClipEvent (enterFrame) {
this.gotoAndStop(imbalance);
}
Instance of Symbol 525 MovieClip in Frame 14
onClipEvent (enterFrame) {
this.gotoAndStop(30 - _root.area3.boss.health);
}
Frame 15
function checkCollision(p_clip1, p_clip2) {
_global.yenter = null;
_global.yinter = null;
var _local5 = p_clip1.getBounds(_root);
var _local4 = p_clip2.getBounds(_root);
if (((_local5.xMax < _local4.xMin) || (_local4.xMax < _local5.xMin)) || ((_local5.yMax < _local4.yMin) || (_local4.yMax < _local5.yMin))) {
return(false);
}
var _local3 = {};
_local3.xMin = Math.max(_local5.xMin, _local4.xMin);
_local3.xMax = Math.min(_local5.xMax, _local4.xMax);
_local3.yMin = Math.max(_local5.yMin, _local4.yMin);
_local3.yMax = Math.min(_local5.yMax, _local4.yMax);
var _local8 = new flash.display.BitmapData(_local3.xMax - _local3.xMin, _local3.yMax - _local3.yMin, false);
var _local6 = p_clip1.transform.concatenatedMatrix;
_local6.tx = _local6.tx - _local3.xMin;
_local6.ty = _local6.ty - _local3.yMin;
_local8.draw(p_clip1, _local6, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, 255));
_local6 = p_clip2.transform.concatenatedMatrix;
_local6.tx = _local6.tx - _local3.xMin;
_local6.ty = _local6.ty - _local3.yMin;
_local8.draw(p_clip2, _local6, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, 255), "difference");
var _local7 = _local8.getColorBoundsRect(4294967295, 4278255615);
if (_local7.width == 0) {
return(false);
}
_local7.x = _local7.x + _local3.xMin;
_local7.y = _local7.y + _local3.yMin;
if (_local7) {
_global.yenter = _local7.width;
_global.yinter = _local7.height;
return(true);
}
return(false);
}
function spawnbullet() {
duplicateMovieClip (_root.area2.blt, "en" + mn, mn);
_global.cooldown = 5;
_global.shoot = true;
ox = _root.beamguide._x;
oy = _root.beamguide._y;
_root.beamguide._x = _root._xmouse;
_root.beamguide._y = _root._ymouse;
_global.ll = (_root.ply._x + armx) - _root.beamguide._x;
_global.hl = (_root.ply._y + army) - _root.beamguide._y;
_root.area2["en" + mn]._x = ((-_root.area2._x) + _root.ply._x) + armx;
_root.area2["en" + mn]._y = ((-_root.area2._y) + _root.ply._y) + army;
_root.area2["en" + mn]._rotation = ((Math.atan2(hl, ll) * 180) / Math.PI) + 90;
_root.beamguide._x = ox;
_root.beamguide._y = oy;
_global.mn = _global.mn + 1;
if (mn == 320) {
_global.mn = 200;
}
}
function spawnenbullet(dx, dy, rot, type) {
if (type == null) {
type = "enblt";
}
duplicateMovieClip (_root.area3[type], "en" + mn, mn);
_root.area3["en" + mn]._x = dx;
_root.area3["en" + mn]._y = dy - 1;
_root.area3["en" + mn]._rotation = rot;
_global.mn = _global.mn + 1;
if (mn == 320) {
_global.mn = 200;
}
}
function spawnenergy(dx, dy, num) {
rbs = 0;
while (rbs < num) {
duplicateMovieClip (_root.area4.energy, "en" + jk, jk);
_root.area4["en" + jk]._x = dx;
_root.area4["en" + jk]._y = dy;
_root.area4["en" + jk]._rotation = Math.random() * 360;
_root.area4["en" + jk]._alpha = 100;
_global.jk = _global.jk + 1;
if (jk == 680) {
_global.jk = 450;
}
rbs++;
}
}
function spawngenergy(dx, dy, num) {
rbs = 0;
while (rbs < num) {
duplicateMovieClip (_root.area4.genergy, "en" + jk, jk);
_root.area4["en" + jk]._x = dx;
_root.area4["en" + jk]._y = dy;
_root.area4["en" + jk]._rotation = Math.random() * 360;
_root.area4["en" + jk]._alpha = 100;
_global.jk = _global.jk + 1;
if (jk == 680) {
_global.jk = 450;
}
rbs++;
}
}
function spawnblock(tx, ty) {
if (imbalance < 68) {
lll = 0;
while (lll < blklimit) {
if (_root.area["en" + lll]._x == undefined) {
_global.i = lll;
lll = blklimit;
}
lll++;
}
if (_root.area["en" + i]._x != undefined) {
_root.spawnenergy(_root.area["en" + i]._x, _root.area["en" + i]._y, 1);
}
duplicateMovieClip (_root.area.blk, "en" + i, i);
_root.area["en" + i]._x = tx;
_root.area["en" + i]._y = ty;
if ((((_root.checkCollision(_root.area["en" + i], _root.ply.body.toohigh) or _root.checkCollision(_root.area["en" + i], _root.ply.body.middle)) or _root.checkCollision(_root.area["en" + i], _root.area3)) or _root.checkCollision(_root.area["en" + i], _root.area2)) or _root.checkCollision(_root.area["en" + i], _root.area.ground)) {
_root.beamguide.gotoAndStop(1);
removeMovieClip(_root.area["en" + i]);
} else {
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft)) {
if (side2 == "left") {
removeMovieClip(_root.area["en" + i]);
} else {
var _local4 = yenter + 1.6;
var _local3 = _root.area._x;
_global.run = "true";
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright.ini) == false) {
_root.area._x = _root.area._x - _local4;
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft)) {
_root.area._x = _root.area._x - (yenter + 1);
}
if (_root.checkCollision(_root.area, _root.ply.body.tooright)) {
_root.area._x = _root.area._x + (yenter + 1);
if (_root.checkCollision(_root.area, _root.ply.body.tooright) or _root.checkCollision(_root.area, _root.ply.body.tooleft)) {
_root.area._x = _local3;
_global.run = false;
removeMovieClip(_root.area["en" + i]);
}
}
} else {
removeMovieClip(_root.area["en" + i]);
_global.i = _global.i - 1;
}
}
} else if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright)) {
if (side2 == "right") {
removeMovieClip(_root.area["en" + i]);
} else {
var _local4 = yenter + 1.6;
var _local3 = _root.area._x;
_global.run = "true";
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft.ini) == false) {
_root.area._x = _root.area._x + _local4;
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright)) {
_root.area._x = _root.area._x + (yenter + 1);
}
if (_root.checkCollision(_root.area, _root.ply.body.tooleft)) {
_root.area._x = _root.area._x - (yenter + 1);
if (_root.checkCollision(_root.area, _root.ply.body.tooleft) or _root.checkCollision(_root.area, _root.ply.body.tooright)) {
_root.area._x = _local3;
removeMovieClip(_root.area["en" + i]);
}
}
} else {
removeMovieClip(_root.area["en" + i]);
_global.i = _global.i - 1;
}
}
}
if ((_root.checkCollision(_root.area, _root.ply.body.toohigh) or _root.checkCollision(_root.area["en" + i], _root.ply.body.toolow)) and _root.checkCollision(_root.area, _root.ply.body.cantjump)) {
removeMovieClip(_root.area["en" + i]);
}
if ((_root.checkCollision(_root.area["en" + i], _root.ply.toolow) and _root.checkCollision(_root.area, _root.ply.body.cantjump)) or _root.checkCollision(_root.area["en" + i], _root.ply.body.cantjump.noblocks)) {
removeMovieClip(_root.area["en" + i]);
}
}
if (_root.area["en" + i]._x != undefined) {
_root.beamguide.gotoAndStop(2);
_root.beamguide._x = _root._xmouse;
_root.beamguide._y = _root._ymouse;
_root.beamguide._rotation = 0;
_global.ll = (_root.ply._x + armx) - _root.beamguide._x;
_global.hl = (_root.ply._y + army) - _root.beamguide._y;
_root.beamguide._width = Math.sqrt((hl * hl) + (ll * ll)) - 40;
_root.beamguide._rotation = (Math.atan2(hl, ll) * 180) / Math.PI;
_root.beamguide._visible = true;
_root.beamguide._alpha = 100;
}
}
_global.i = _global.i + 1;
if (i > blklimit) {
_global.i = 1;
}
}
function checker(x) {
if (Key.isDown(17)) {
trace(x);
}
}
function plyaction() {
if (health <= 0) {
_root.gotoAndStop(14);
}
if (_root.ply._alpha < 100) {
_root.ply._alpha = _root.ply._alpha + 5;
if (_root.ply._alpha > 100) {
_root.ply._alpha = 100;
}
}
if (_root.checkCollision(_root.ply.body.toolow, _root.area) == false) {
if (drop > -35) {
drop = drop - 3.2;
}
if (_root.checkCollision(_root.area, _root.ply.body.canjump) == false) {
var _local3 = false;
if ((_root.ply._currentframe != 3) and (_root.ply._currentframe != 5)) {
_global.jumping = false;
}
} else {
var _local3 = true;
}
} else {
if (drop < 0) {
drop = 0;
}
var _local3 = true;
}
if (jumping == true) {
_global.jumping = false;
drop = 38;
if (side2 == "left") {
l = l + 2;
} else {
r = r + 2;
}
var _local3 = false;
}
if (((jumping != "begin") and (_local3 == false)) and (knockdown == "off")) {
slide = false;
if (drop <= -4) {
if (side2 == "right") {
_root.ply.gotoAndStop(4);
} else {
_root.ply.gotoAndStop(6);
}
}
}
if ((((((_local3 == true) and (drop == 0)) and (Math.abs(r - l) > 1)) and (slide == false)) and (knockdown == "off")) and (jumping != "begin")) {
if (side2 == "left") {
_root.ply.gotoAndStop(2);
} else {
_root.ply.gotoAndStop(1);
}
}
_root.area._y = _root.area._y + (drop / 2.2);
ldown = false;
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
}
}
if (((((knockdown == "on") and (_root.ply._currentframe != 13)) and (_root.ply._currentframe != 14)) and (_root.ply._currentframe != 15)) and (_root.ply._currentframe != 16)) {
if (_root._currentframe == 7) {
_global.health = _global.health - 5;
}
if (side2 == "left") {
_root.ply.gotoAndStop(14);
drop = 24;
var _local3 = false;
r = 36;
l = 0;
} else {
drop = 24;
var _local3 = false;
l = 36;
r = 0;
_root.ply.gotoAndStop(13);
}
_root.area._y = _root.area._y + 10;
}
if (((_root.ply._currentframe == 14) or (_root.ply._currentframe == 13)) and (_local3 == true)) {
if (side2 == "left") {
_root.ply.gotoAndStop(16);
} else {
_root.ply.gotoAndStop(15);
}
}
if (jumping == false) {
if (_root.checkCollision(_root.ply.body.tooright, _root.area) == false) {
if (Key.isDown(68) and (knockdown == "off")) {
ldown = true;
if (r < 11) {
if (r < 1.5) {
r = r + 1.5;
}
r = r + 0.5;
}
if ((_local3 == true) and (drop < 5)) {
if ((l >= r) and (((l - r) > 7) or (slide == true))) {
_root.ply.gotoAndStop(7);
slide = true;
} else {
_root.ply.gotoAndStop(1);
if (slide == true) {
r = 1;
slide = false;
l = 0;
}
}
} else if ((drop <= -15) or ((((((drop > 0) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) and (getup == false))) {
_root.ply.gotoAndStop(4);
_global.side2 = "right";
}
} else if (r > 1.1) {
r = r / 1.08;
} else {
r = 0;
}
} else {
r = 0;
}
if ((r > 14) and (_local3 == true)) {
r = r / 1.2;
}
if (_root.checkCollision(_root.ply.body.tooleft, _root.area) == false) {
if ((Key.isDown(65) and (ldown == false)) and (knockdown == "off")) {
if (l < 11) {
if (l < 1.5) {
l = l + 1.5;
}
l = l + 0.5;
}
if ((_local3 == true) and (drop < 5)) {
if ((r >= l) and (((r - l) > 7) or (slide == true))) {
_root.ply.gotoAndStop(8);
slide = true;
} else {
_root.ply.gotoAndStop(2);
if (slide == true) {
r = 0;
slide = false;
l = 1;
}
}
} else if ((drop <= -15) or ((((((drop > 0) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) and (getup == false))) {
_root.ply.gotoAndStop(6);
_global.side2 = "left";
}
} else if (l > 1.1) {
l = l / 1.08;
} else {
l = 0;
}
} else {
l = 0;
}
}
if ((l > 14) and (_local3 == true)) {
l = l / 1.2;
}
_root.area._x = _root.area._x + l;
_root.area._x = _root.area._x - r;
if ((((((((_local3 == true) and (r < 2)) and (l < 2)) and (jumping == false)) and (drop < 1)) and (drop > -1)) and (slide == false)) and (getup == false)) {
if (knockdown == "off") {
if (side2 == "left") {
_root.ply.gotoAndStop(12);
} else {
_root.ply.gotoAndStop(11);
}
}
}
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area)) {
_root.checkCollision(_root.ply.body.toohigh, _root.area);
_root.area._y = _root.area._y - (yinter + 1);
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area)) {
if (yenter > 4) {
_root.checkCollision(_root.ply.body.toohigh, _root.area);
_root.area._y = _root.area._y - (yinter + 1);
}
}
if (drop >= 0) {
drop = drop * -0.5;
}
}
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
}
}
if (_root.checkCollision(_root.ply.body.tooright.ini, _root.area)) {
_root.area._x = _root.area._x + yenter;
r = 0;
if (_root.checkCollision(_root.ply.body.tooright.ini, _root.area)) {
_root.area._x = _root.area._x + (yenter + 1);
}
}
if (_root.checkCollision(_root.ply.body.tooleft.ini, _root.area)) {
_root.area._x = _root.area._x - yenter;
l = 0;
if (_root.checkCollision(_root.ply.body.tooleft.ini, _root.area)) {
_root.area._x = _root.area._x - (yenter + 1);
}
}
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area) == false) {
newy = _root.area._y;
newx = _root.area._x;
} else {
r = 0;
_root.area._x = newx;
_root.area._y = newy;
drop = 0;
l = 0;
}
if (((((((_local3 == true) and (knockdown == "off")) and (_root.checkCollision(_root.ply.body.cantjump, _root.area) == false)) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) {
if (Key.isDown(87)) {
_global.jumping = "begin";
if (side2 == "right") {
if (slide == true) {
_root.ply.gotoAndStop(9);
drop = 54;
l = 18;
slide = false;
_global.side2 = "left";
} else {
_root.ply.gotoAndStop(3);
}
} else if (slide == true) {
_root.ply.gotoAndStop(10);
drop = 54;
r = 18;
slide = false;
_global.side2 = "right";
} else {
_root.ply.gotoAndStop(5);
}
}
}
_global.bldrop = drop;
_global.blspd = r - l;
_root.area2._x = _root.area._x;
_root.area3._x = _root.area._x;
_root.area2._y = _root.area._y;
_root.area3._y = _root.area._y;
_root.area4._x = _root.area._x;
_root.area4._y = _root.area._y;
_root.area5._x = _root.area._x;
_root.area5._y = _root.area._y;
}
function araction(nam) {
if (_root.area3[nam].destroy == "on") {
removeMovieClip(_root.area3[nam]);
} else if (_root.area3[nam].destroy == "ready") {
_root.area3[nam].destroy = "ready2";
} else if (_root.area3[nam].destroy == "ready2") {
_root.area3[nam].destroy = "ready3";
} else if (_root.area3[nam].destroy == "ready3") {
_root.area3[nam].destroy = "on";
}
_root.area3[nam].timer = _root.area3[nam].timer - 1;
if (_root.area3[nam].timer == 0) {
removeMovieClip(_root.area3[nam]);
_root.area3[nam].timer = 2;
}
_global.rot = _root.area3[nam]._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if (_root.area3[nam].destroy == "off") {
_root.area3[nam]._x = _root.area3[nam]._x - (Math.cos((_root.area3[nam]._rotation * Math.PI) / 180) * 20);
_root.area3[nam]._y = _root.area3[nam]._y - (Math.sin((_root.area3[nam]._rotation * Math.PI) / 180) * 20);
}
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_global.yenter = _global.yenter + 2;
_global.yinter = _global.yinter + 2;
_root.area3[nam].destroy = "ready";
var _local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6.5) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6.5) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_global.yenter = _global.yenter + 2;
_global.yinter = _global.yinter + 2;
_local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6.5) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6.5) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_global.yenter = _global.yenter + 2;
_global.yinter = _global.yinter + 2;
_local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6.5) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6.5) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
}
}
}
if (_root.area3[nam].destroy == "off") {
if (_root.checkCollision(_root.ply.bod, _root.area3[nam])) {
_root.area3[nam].destroy = "ready";
_global.health = _global.health - 1;
_root.area3[nam].gotoAndStop(2);
}
}
}
function bowaction(nam) {
if (_root.area3[nam]._currentframe != 41) {
if ((_root.area3[nam].health <= 0) and (_root.area3[nam]._currentframe < 41)) {
_root.spawnenergy(_root.area3[nam]._x + ((_root.area3[nam]._currentframe * 6) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._y + ((_root.area3[nam]._currentframe * 6) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180)), 1);
if (_root.area3[nam]._currentframe < 29) {
_global.encount = _global.encount - 1;
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = false;
_root.area3[nam].gotoAndPlay(29);
}
} else {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam], _root.area2)) {
if (_root.area3[nam].chase == false) {
_root.area3[nam].play();
_root.area3[nam].chase = true;
}
if (((-1 * _root.area2._x) + _root.ply._x) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x - 7;
} else {
_root.area3[nam]._x = _root.area3[nam]._x + 7;
}
if (((-1 * _root.area2._y) + _root.ply._y) > _root.area3[nam]._y) {
_root.area3[nam]._y = _root.area3[nam]._y - 5;
} else {
_root.area3[nam]._y = _root.area3[nam]._y + 5;
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area2) and (_root.area3[nam].hurt == 0)) and (health > 0)) {
_root.area3[nam].hurt = 15;
_root.area3[nam].bod.play();
_root.area3[nam].health--;
}
}
}
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
_root.area3[nam].bod.play();
} else {
_root.area3[nam].bod.gotoAndStop(1);
}
if ((_root.area3[nam].chase == true) and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 1500)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 15) - _root.area3[nam]._x) < 4) {
_root.area3[nam]._x = ((-1 * _root.area2._x) + _root.ply._x) + 15;
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x + 5;
} else {
_root.area3[nam]._x = _root.area3[nam]._x - 5;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
} else {
_root.area3[nam].oldx = _root.area3[nam]._x;
}
if (Math.abs((((-1 * _root.area2._y) + _root.ply._y) + 30) - _root.area3[nam]._y) < 3) {
_root.area3[nam]._y = ((-1 * _root.area2._y) + _root.ply._y) + 30;
} else if ((((-1 * _root.area2._y) + _root.ply._y) + 30) > _root.area3[nam]._y) {
_root.area3[nam]._y = _root.area3[nam]._y + 4;
} else {
_root.area3[nam]._y = _root.area3[nam]._y - 4;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._y = _root.area3[nam].oldy;
} else {
_root.area3[nam].oldy = _root.area3[nam]._y;
}
var _local4 = (-1 * Math.abs((Math.atan2(((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) - 30, ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) - 12) * 180) / Math.PI)) - 0;
if (Math.abs(_local4 - _root.area3[nam]._rotation) < 8) {
_root.area3[nam]._rotation = _local4;
} else if (_local4 > _root.area3[nam]._rotation) {
_root.area3[nam]._rotation = _root.area3[nam]._rotation + 8;
} else {
_root.area3[nam]._rotation = _root.area3[nam]._rotation - 8;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._rotation = oldrot;
} else {
oldrot = _root.area3[nam]._rotation;
}
if (_root.area3[nam].fire == true) {
_root.spawnenbullet(_root.area3[nam]._x + (31.6 * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._y + (31.4 * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._rotation, "enar");
_root.area3[nam].fire = false;
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 200) {
_root.area3[nam].chase = true;
_root.area3[nam].play();
}
}
}
}
}
function blkaction(nam) {
if (_root.area[nam].destroy != 0) {
if (_root.checkCollision(_root.area[nam], _root.ply.body)) {
removeMovieClip(_root.area[nam]);
}
}
if (_root.area[nam].destroy == 1) {
_root.area[nam].destroy = 2;
_root.area[nam].cd = 13;
_root.spawngenergy(_root.area[nam]._x, _root.area[nam]._y, 1);
}
if (_root.area[nam].destroy == 2) {
_root.area[nam].cd--;
} else if (bstage == 10) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
} else if (_root.checkCollision(_root.area[nam], _root.area2)) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
} else if (_root.checkCollision(_root.area[nam], _root.area3)) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
}
if ((_root.area[nam].destroy == 2) and (_root.area[nam].cd == 0)) {
removeMovieClip(_root.area[nam]);
}
}
function beamaction() {
if (_root.beamguide._alpha <= 0) {
_root.beamguide._alpha = 100;
_root.beamguide._visible = false;
}
if (_root.beamguide._visible == true) {
_root.beamguide._alpha = _root.beamguide._alpha - 10;
if (makeblocks == "on") {
_root.beamguide.gotoAndStop(2);
} else {
_root.beamguide.gotoAndStop(1);
}
_root.beamguide._xscale = _root.beamguide._xscale / 1.1;
} else {
_root.beamguide.gotoAndStop(3);
}
}
function solaction(nam) {
if (_root.area3[nam].health > -55) {
_root.area3[nam].shoot = true;
if (_root.area3[nam].health <= 0) {
if (_root.area3[nam].cooldown == 0) {
_root.spawnenergy(_root.area3[nam]._x, _root.area3[nam]._y, 1);
_root.area3[nam].cooldown = 3;
} else {
_root.area3[nam].cooldown--;
}
if (_root.area3[nam].health == 0) {
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = "off";
_root.area3[nam].shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(6);
} else {
_root.area3[nam].gotoAndStop(7);
}
}
_root.area3[nam].health--;
} else {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam], _root.area2)) {
if (_root.area3[nam].chase == "off") {
_root.area3[nam].play();
_root.area3[nam].chase = "on";
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area2) and (_root.area3[nam].hurt == 0)) and (_root.area3[nam].health > 0)) {
_root.area3[nam].hurt = 11;
_root.area3[nam].health--;
}
}
}
if ((_root.area3[nam].chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 700)) {
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
if (_root.area3[nam].hurt == 10) {
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(9);
} else {
_root.area3[nam].gotoAndStop(8);
}
}
} else {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) < 150) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
if (_root.area3[nam]._currentframe == 4) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(5);
} else {
if (_root.area3[nam]._currentframe == 5) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(4);
}
} else if ((((_root.area3[nam]._currentframe != 4) and (_root.area3[nam]._currentframe != 5)) or (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) > 230)) and (_root.area3[nam].hit <= 0)) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam].shoot = false;
_root.area3[nam]._x = _root.area3[nam]._x + 6;
_root.area3[nam].gotoAndStop(2);
} else {
_root.area3[nam].shoot = false;
_root.area3[nam]._x = _root.area3[nam]._x - 6;
_root.area3[nam].gotoAndStop(3);
}
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area) or (_root.checkCollision(_root.area3[nam].grd, _root.area.ground) == false)) or (yenter < 45)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
_root.area3[nam].hit = 6;
_root.area3[nam].shoot = true;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
if (_root.area3[nam]._currentframe == 4) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(5);
_root.area3[nam].shoot = true;
} else {
if (_root.area3[nam]._currentframe == 5) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(4);
_root.area3[nam].shoot = true;
}
} else {
_root.area3[nam].hit--;
if (_root.area3[nam].hit <= 0) {
_root.area3[nam].oldx = _root.area3[nam]._x;
} else {
_root.area3[nam].shoot = true;
_root.area3[nam]._x = _root.area3[nam].oldx;
}
}
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + ((((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5) * (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5)))) < 250) {
_root.area3[nam].chase = "on";
_root.area3[nam].play();
}
}
}
if (_root.area3[nam].shoot == true) {
_root.area3[nam].gunprog = _root.area3[nam].gunprog + 1;
} else {
_root.area3[nam].gunprog = 1;
}
}
}
function gaction(nam) {
if (_root.area3[nam].health > -55) {
if (_root.area3[nam].health <= 0) {
if (_root.area3[nam].cooldown == 0) {
_root.spawnenergy(_root.area3[nam]._x, _root.area3[nam]._y, 1);
_root.area3[nam].cooldown = 3;
} else {
_root.area3[nam].cooldown--;
}
if (_root.area3[nam].health == 0) {
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = "off";
shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(6);
} else {
_root.area3[nam].gotoAndStop(7);
}
}
_root.area3[nam].health--;
} else if ((_root.area3[nam].chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 700)) {
if (_root.area3[nam]._currentframe != 1) {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam].body, _root.area2) and (_root.area3[nam].health > 0)) {
_root.area3[nam].hurt = 10;
_root.area3[nam].health--;
}
}
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
_root.area3[nam].bod.gotoAndStop(2);
if (_root.area3[nam].hurt == 9) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(8);
} else {
_root.area3[nam].gotoAndStop(9);
}
}
} else {
_root.area3[nam].bod.gotoAndStop(1);
if ((_root.area3[nam]._currentframe != 4) and (_root.area3[nam]._currentframe != 5)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) < 170) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(5);
} else {
_root.area3[nam].gotoAndStop(4);
}
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x + 7.5;
_root.area3[nam].gotoAndStop(2);
} else {
_root.area3[nam]._x = _root.area3[nam]._x - 7.5;
_root.area3[nam].gotoAndStop(3);
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area) or (_root.checkCollision(_root.area3[nam].grd, _root.area.ground) == false)) or (yenter < 45)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(5);
} else {
_root.area3[nam].gotoAndStop(4);
}
} else {
_root.area3[nam].oldx = _root.area3[nam]._x;
}
}
}
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + ((((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5) * (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5)))) < 250) {
_root.area3[nam].chase = "on";
_root.area3[nam].body.play();
}
}
}
}
_global.destroyheadblocks = "off";
var slide = false;
_global.makeblocks = "off";
var drop = -10;
_global.nomake = false;
_global.knockdown = "off";
var l = 0;
_global.encount = 0;
var r = 0;
var ox = 0;
var oy = 0;
var ldown = false;
_global.getup = false;
_global.blklimit = 65;
var newx = _root.area._x;
var newy = _root.area._y;
_global.i = 1;
_global.health = 25;
stop();
_global.plytype = "basic";
_global.cooldown = 0;
_global.imbalance = 0;
_global.mn = 200;
var jfr = 0;
_global.jk = 450;
stop();
Frame 16
function checkForCollision(p_clip1, p_clip2) {
var _local4 = p_clip1.getBounds(_root);
var _local3 = p_clip2.getBounds(_root);
if (((_local4.xMax < _local3.xMin) || (_local3.xMax < _local4.xMin)) || ((_local4.yMax < _local3.yMin) || (_local3.yMax < _local4.yMin))) {
return(null);
}
var _local2 = {};
_local2.xMin = Math.max(_local4.xMin, _local3.xMin);
_local2.xMax = Math.min(_local4.xMax, _local3.xMax);
_local2.yMin = Math.max(_local4.yMin, _local3.yMin);
_local2.yMax = Math.min(_local4.yMax, _local3.yMax);
var _local7 = new flash.display.BitmapData(_local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin, false);
var _local5 = p_clip1.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip1, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, 255));
_local5 = p_clip2.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip2, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, 255), "difference");
var _local6 = _local7.getColorBoundsRect(4294967295, 4278255615);
if (_local6.width == 0) {
return(null);
}
_local6.x = _local6.x + _local2.xMin;
_local6.y = _local6.y + _local2.yMin;
return(_local6);
}
function checkCollision(m, t) {
var _local2 = checkForCollision(m, t);
if (_local2) {
} else {
_global.yinter = 0;
_global.yenter = 0;
}
if (_local2 == null) {
return(false);
}
_global.yenter = _local2.width;
_global.yinter = _local2.height;
return(true);
}
function spawnbullet() {
duplicateMovieClip (_root.area2.blt, "en" + mn, mn);
_global.cooldown = 5;
_global.shoot = true;
ox = _root.beamguide._x;
oy = _root.beamguide._y;
_root.beamguide._x = _root._xmouse;
_root.beamguide._y = _root._ymouse;
_global.ll = (_root.ply._x + armx) - _root.beamguide._x;
_global.hl = (_root.ply._y + army) - _root.beamguide._y;
_root.area2["en" + mn]._x = ((-_root.area2._x) + _root.ply._x) + armx;
_root.area2["en" + mn]._y = ((-_root.area2._y) + _root.ply._y) + army;
_root.area2["en" + mn]._rotation = ((Math.atan2(hl, ll) * 180) / Math.PI) + 90;
_root.beamguide._x = ox;
_root.beamguide._y = oy;
_global.mn = _global.mn + 1;
if (mn == 320) {
_global.mn = 200;
}
}
function spawnenbullet(dx, dy, rot, type) {
if (type == null) {
type = "enblt";
}
duplicateMovieClip (_root.area3[type], "en" + mn, mn);
_root.area3["en" + mn]._x = dx;
_root.area3["en" + mn]._y = dy - 1;
_root.area3["en" + mn]._rotation = rot;
_global.mn = _global.mn + 1;
if (mn == 320) {
_global.mn = 200;
}
}
function spawnenergy(dx, dy, num) {
rbs = 0;
while (rbs < num) {
duplicateMovieClip (_root.area4.energy, "en" + jk, jk);
_root.area4["en" + jk]._x = dx;
_root.area4["en" + jk]._y = dy;
_root.area4["en" + jk]._rotation = Math.random() * 360;
_root.area4["en" + jk]._alpha = 100;
_global.jk = _global.jk + 1;
if (jk == 680) {
_global.jk = 450;
}
rbs++;
}
}
function spawngenergy(dx, dy, num) {
rbs = 0;
while (rbs < num) {
duplicateMovieClip (_root.area4.genergy, "en" + jk, jk);
_root.area4["en" + jk]._x = dx;
_root.area4["en" + jk]._y = dy;
_root.area4["en" + jk]._rotation = Math.random() * 360;
_root.area4["en" + jk]._alpha = 100;
_global.jk = _global.jk + 1;
if (jk == 680) {
_global.jk = 450;
}
rbs++;
}
}
function spawnblock(tx, ty) {
if (imbalance < 68) {
lll = 0;
while (lll < blklimit) {
if (_root.area["en" + lll]._x == undefined) {
_global.i = lll;
lll = blklimit;
}
lll++;
}
if (_root.area["en" + i]._x != undefined) {
_root.spawnenergy(_root.area["en" + i]._x, _root.area["en" + i]._y, 1);
}
duplicateMovieClip (_root.area.blk, "en" + i, i);
_root.area["en" + i]._x = tx;
_root.area["en" + i]._y = ty;
if ((((_root.checkCollision(_root.area["en" + i], _root.ply.body.toohigh) or _root.checkCollision(_root.area["en" + i], _root.ply.body.middle)) or _root.checkCollision(_root.area["en" + i], _root.area3)) or _root.checkCollision(_root.area["en" + i], _root.area2)) or _root.checkCollision(_root.area["en" + i], _root.area.ground)) {
_root.beamguide.gotoAndStop(1);
removeMovieClip(_root.area["en" + i]);
} else {
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft)) {
if (side2 == "left") {
removeMovieClip(_root.area["en" + i]);
} else {
var _local4 = yenter + 1.6;
var _local3 = _root.area._x;
_global.run = "true";
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright.ini) == false) {
_root.area._x = _root.area._x - _local4;
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft)) {
_root.area._x = _root.area._x - (yenter + 1);
}
if (_root.checkCollision(_root.area, _root.ply.body.tooright)) {
_root.area._x = _root.area._x + (yenter + 1);
if (_root.checkCollision(_root.area, _root.ply.body.tooright) or _root.checkCollision(_root.area, _root.ply.body.tooleft)) {
_root.area._x = _local3;
_global.run = false;
removeMovieClip(_root.area["en" + i]);
}
}
} else {
removeMovieClip(_root.area["en" + i]);
_global.i = _global.i - 1;
}
}
} else if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright)) {
if (side2 == "right") {
removeMovieClip(_root.area["en" + i]);
} else {
var _local4 = yenter + 1.6;
var _local3 = _root.area._x;
_global.run = "true";
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft.ini) == false) {
_root.area._x = _root.area._x + _local4;
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright)) {
_root.area._x = _root.area._x + (yenter + 1);
}
if (_root.checkCollision(_root.area, _root.ply.body.tooleft)) {
_root.area._x = _root.area._x - (yenter + 1);
if (_root.checkCollision(_root.area, _root.ply.body.tooleft) or _root.checkCollision(_root.area, _root.ply.body.tooright)) {
_root.area._x = _local3;
removeMovieClip(_root.area["en" + i]);
}
}
} else {
removeMovieClip(_root.area["en" + i]);
_global.i = _global.i - 1;
}
}
}
if ((_root.checkCollision(_root.area, _root.ply.body.toohigh) or _root.checkCollision(_root.area["en" + i], _root.ply.body.toolow)) and _root.checkCollision(_root.area, _root.ply.body.cantjump)) {
removeMovieClip(_root.area["en" + i]);
}
if ((_root.checkCollision(_root.area["en" + i], _root.ply.toolow) and _root.checkCollision(_root.area, _root.ply.body.cantjump)) or _root.checkCollision(_root.area["en" + i], _root.ply.body.cantjump.noblocks)) {
removeMovieClip(_root.area["en" + i]);
}
}
if (_root.area["en" + i]._x != undefined) {
_root.beamguide.gotoAndStop(2);
_root.beamguide._x = _root._xmouse;
_root.beamguide._y = _root._ymouse;
_root.beamguide._rotation = 0;
_global.ll = (_root.ply._x + armx) - _root.beamguide._x;
_global.hl = (_root.ply._y + army) - _root.beamguide._y;
_root.beamguide._width = Math.sqrt((hl * hl) + (ll * ll)) - 40;
_root.beamguide._rotation = (Math.atan2(hl, ll) * 180) / Math.PI;
_root.beamguide._visible = true;
_root.beamguide._alpha = 100;
}
}
_global.i = _global.i + 1;
if (i > blklimit) {
_global.i = 1;
}
}
function checker(x) {
if (Key.isDown(17)) {
trace(x);
}
}
function plyaction() {
if (_root.ply._alpha < 100) {
_root.ply._alpha = _root.ply._alpha + 5;
if (_root.ply._alpha > 100) {
_root.ply._alpha = 100;
}
}
if (_root.checkCollision(_root.ply.body.toolow, _root.area) == false) {
if (drop > -35) {
drop = drop - 3.2;
}
if (_root.checkCollision(_root.area, _root.ply.body.canjump) == false) {
var _local3 = false;
if ((_root.ply._currentframe != 3) and (_root.ply._currentframe != 5)) {
_global.jumping = false;
}
} else {
var _local3 = true;
}
} else {
if (drop < 0) {
drop = 0;
}
var _local3 = true;
}
if (jumping == true) {
_global.jumping = false;
drop = 38;
if (side2 == "left") {
l = l + 2;
} else {
r = r + 2;
}
var _local3 = false;
}
if (((jumping != "begin") and (_local3 == false)) and (knockdown == "off")) {
slide = false;
if (drop <= -4) {
if (side2 == "right") {
_root.ply.gotoAndStop(4);
} else {
_root.ply.gotoAndStop(6);
}
}
}
if ((((((_local3 == true) and (drop == 0)) and (Math.abs(r - l) > 1)) and (slide == false)) and (knockdown == "off")) and (jumping != "begin")) {
if (side2 == "left") {
_root.ply.gotoAndStop(2);
} else {
_root.ply.gotoAndStop(1);
}
}
_root.area._y = _root.area._y + (drop / 2.2);
ldown = false;
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
}
}
if (((((knockdown == "on") and (_root.ply._currentframe != 13)) and (_root.ply._currentframe != 14)) and (_root.ply._currentframe != 15)) and (_root.ply._currentframe != 16)) {
if (_root._currentframe == 7) {
_global.health = _global.health - 5;
}
if (side2 == "left") {
_root.ply.gotoAndStop(14);
drop = 24;
var _local3 = false;
r = 35;
l = 0;
} else {
drop = 24;
var _local3 = false;
l = 35;
r = 0;
_root.ply.gotoAndStop(13);
}
_root.area._y = _root.area._y + 10;
}
if (((_root.ply._currentframe == 14) or (_root.ply._currentframe == 13)) and (_local3 == true)) {
if (side2 == "left") {
_root.ply.gotoAndStop(16);
} else {
_root.ply.gotoAndStop(15);
}
}
if (jumping == false) {
if (_root.checkCollision(_root.ply.body.tooright, _root.area) == false) {
if (Key.isDown(68) and (knockdown == "off")) {
ldown = true;
if (r < 11) {
if (r < 1.5) {
r = r + 1.5;
}
r = r + 0.5;
}
if ((_local3 == true) and (drop < 5)) {
if ((l >= r) and (((l - r) > 7) or (slide == true))) {
_root.ply.gotoAndStop(7);
slide = true;
} else {
_root.ply.gotoAndStop(1);
if (slide == true) {
r = 1;
slide = false;
l = 0;
}
}
} else if ((drop <= -15) or ((((((drop > 0) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) and (getup == false))) {
_root.ply.gotoAndStop(4);
_global.side2 = "right";
}
} else if (r > 1.1) {
r = r / 1.08;
} else {
r = 0;
}
} else {
r = 0;
}
if ((r > 14) and (_local3 == true)) {
r = r / 1.2;
}
if (_root.checkCollision(_root.ply.body.tooleft, _root.area) == false) {
if ((Key.isDown(65) and (ldown == false)) and (knockdown == "off")) {
if (l < 11) {
if (l < 1.5) {
l = l + 1.5;
}
l = l + 0.5;
}
if ((_local3 == true) and (drop < 5)) {
if ((r >= l) and (((r - l) > 7) or (slide == true))) {
_root.ply.gotoAndStop(8);
slide = true;
} else {
_root.ply.gotoAndStop(2);
if (slide == true) {
r = 0;
slide = false;
l = 1;
}
}
} else if ((drop <= -15) or ((((((drop > 0) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) and (getup == false))) {
_root.ply.gotoAndStop(6);
_global.side2 = "left";
}
} else if (l > 1.1) {
l = l / 1.08;
} else {
l = 0;
}
} else {
l = 0;
}
}
if ((l > 14) and (_local3 == true)) {
l = l / 1.2;
}
_root.area._x = _root.area._x + l;
_root.area._x = _root.area._x - r;
if ((((((((_local3 == true) and (r < 2)) and (l < 2)) and (jumping == false)) and (drop < 1)) and (drop > -1)) and (slide == false)) and (getup == false)) {
if (knockdown == "off") {
if (side2 == "left") {
_root.ply.gotoAndStop(12);
} else {
_root.ply.gotoAndStop(11);
}
}
}
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area)) {
_root.checkCollision(_root.ply.body.toohigh, _root.area);
_root.area._y = _root.area._y - (yinter + 1);
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area)) {
if (yenter > 4) {
_root.checkCollision(_root.ply.body.toohigh, _root.area);
_root.area._y = _root.area._y - (yinter + 1);
}
}
if (drop >= 0) {
drop = drop * -0.5;
}
}
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
}
}
if (_root.checkCollision(_root.ply.body.tooright.ini, _root.area)) {
_root.area._x = _root.area._x + yenter;
r = 0;
if (_root.checkCollision(_root.ply.body.tooright.ini, _root.area)) {
_root.area._x = _root.area._x + (yenter + 1);
}
}
if (_root.checkCollision(_root.ply.body.tooleft.ini, _root.area)) {
_root.area._x = _root.area._x - yenter;
l = 0;
if (_root.checkCollision(_root.ply.body.tooleft.ini, _root.area)) {
_root.area._x = _root.area._x - (yenter + 1);
}
}
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area) == false) {
newy = _root.area._y;
newx = _root.area._x;
} else {
r = 0;
_root.area._x = newx;
_root.area._y = newy;
drop = 0;
l = 0;
}
if (((((((_local3 == true) and (knockdown == "off")) and (_root.checkCollision(_root.ply.body.cantjump, _root.area) == false)) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) {
if (Key.isDown(87)) {
_global.jumping = "begin";
if (side2 == "right") {
if (slide == true) {
_root.ply.gotoAndStop(9);
drop = 54;
l = 18;
slide = false;
_global.side2 = "left";
} else {
_root.ply.gotoAndStop(3);
}
} else if (slide == true) {
_root.ply.gotoAndStop(10);
drop = 54;
r = 18;
slide = false;
_global.side2 = "right";
} else {
_root.ply.gotoAndStop(5);
}
}
}
_global.bldrop = drop;
_global.blspd = r - l;
_root.area2._x = _root.area._x;
_root.area3._x = _root.area._x;
_root.area2._y = _root.area._y;
_root.area3._y = _root.area._y;
_root.area4._x = _root.area._x;
_root.area4._y = _root.area._y;
_root.area5._x = _root.area._x;
_root.area5._y = _root.area._y;
}
function araction(nam) {
if (_root.area3[nam].destroy == "on") {
removeMovieClip(_root.area3[nam]);
} else if (_root.area3[nam].destroy == "ready") {
_root.area3[nam].destroy = "ready2";
} else if (_root.area3[nam].destroy == "ready2") {
_root.area3[nam].destroy = "ready3";
} else if (_root.area3[nam].destroy == "ready3") {
_root.area3[nam].destroy = "on";
}
_root.area3[nam].timer = _root.area3[nam].timer - 1;
if (_root.area3[nam].timer == 0) {
removeMovieClip(_root.area3[nam]);
_root.area3[nam].timer = 2;
}
_global.rot = _root.area3[nam]._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if (_root.area3[nam].destroy == "off") {
_root.area3[nam]._x = _root.area3[nam]._x - (Math.cos((_root.area3[nam]._rotation * Math.PI) / 180) * 20);
_root.area3[nam]._y = _root.area3[nam]._y - (Math.sin((_root.area3[nam]._rotation * Math.PI) / 180) * 20);
}
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_root.area3[nam].destroy = "ready";
var _local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
}
}
if (_root.area3[nam].destroy == "off") {
if (_root.checkCollision(_root.ply.bod, _root.area3[nam])) {
_root.area3[nam].destroy = "ready";
_global.health = _global.health - 1;
_root.area3[nam].gotoAndStop(2);
}
}
}
function bowaction(nam) {
if (_root.area3[nam]._currentframe != 41) {
if ((_root.area3[nam].health <= 0) and (_root.area3[nam]._currentframe < 41)) {
_root.spawnenergy(_root.area3[nam]._x + ((_root.area3[nam]._currentframe * 6) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._y + ((_root.area3[nam]._currentframe * 6) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180)), 1);
if (_root.area3[nam]._currentframe < 29) {
_global.encount = _global.encount - 1;
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = false;
_root.area3[nam].gotoAndPlay(29);
}
} else {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam], _root.area2)) {
if (_root.area3[nam].chase == false) {
_root.area3[nam].play();
_root.area3[nam].chase = true;
}
if (((-1 * _root.area2._x) + _root.ply._x) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x - 7;
} else {
_root.area3[nam]._x = _root.area3[nam]._x + 7;
}
if (((-1 * _root.area2._y) + _root.ply._y) > _root.area3[nam]._y) {
_root.area3[nam]._y = _root.area3[nam]._y - 5;
} else {
_root.area3[nam]._y = _root.area3[nam]._y + 5;
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area2) and (_root.area3[nam].hurt == 0)) and (health > 0)) {
_root.area3[nam].hurt = 15;
_root.area3[nam].bod.play();
_root.area3[nam].health--;
}
}
}
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
_root.area3[nam].bod.play();
} else {
_root.area3[nam].bod.gotoAndStop(1);
}
if ((_root.area3[nam].chase == true) and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 1500)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 15) - _root.area3[nam]._x) < 4) {
_root.area3[nam]._x = ((-1 * _root.area2._x) + _root.ply._x) + 15;
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x + 5;
} else {
_root.area3[nam]._x = _root.area3[nam]._x - 5;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
} else {
_root.area3[nam].oldx = _root.area3[nam]._x;
}
if (Math.abs((((-1 * _root.area2._y) + _root.ply._y) + 30) - _root.area3[nam]._y) < 3) {
_root.area3[nam]._y = ((-1 * _root.area2._y) + _root.ply._y) + 30;
} else if ((((-1 * _root.area2._y) + _root.ply._y) + 30) > _root.area3[nam]._y) {
_root.area3[nam]._y = _root.area3[nam]._y + 4;
} else {
_root.area3[nam]._y = _root.area3[nam]._y - 4;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._y = _root.area3[nam].oldy;
} else {
_root.area3[nam].oldy = _root.area3[nam]._y;
}
var _local4 = (-1 * Math.abs((Math.atan2(((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) - 30, ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) - 12) * 180) / Math.PI)) - 0;
if (Math.abs(_local4 - _root.area3[nam]._rotation) < 8) {
_root.area3[nam]._rotation = _local4;
} else if (_local4 > _root.area3[nam]._rotation) {
_root.area3[nam]._rotation = _root.area3[nam]._rotation + 8;
} else {
_root.area3[nam]._rotation = _root.area3[nam]._rotation - 8;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._rotation = oldrot;
} else {
oldrot = _root.area3[nam]._rotation;
}
if (_root.area3[nam].fire == true) {
_root.spawnenbullet(_root.area3[nam]._x + (31.6 * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._y + (31.4 * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._rotation, "enar");
_root.area3[nam].fire = false;
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 200) {
_root.area3[nam].chase = true;
_root.area3[nam].play();
}
}
}
}
}
function blkaction(nam) {
if (_root.area[nam].destroy != 0) {
if (_root.checkCollision(_root.area[nam], _root.ply.body)) {
removeMovieClip(_root.area[nam]);
}
}
if (_root.area[nam].destroy == 1) {
_root.area[nam].destroy = 2;
_root.area[nam].cd = 13;
_root.spawngenergy(_root.area[nam]._x, _root.area[nam]._y, 1);
}
if (_root.area[nam].destroy == 2) {
_root.area[nam].cd--;
} else if (bstage == 10) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
} else if (_root.checkCollision(_root.area[nam], _root.area2)) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
} else if (_root.checkCollision(_root.area[nam], _root.area3)) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
}
if ((_root.area[nam].destroy == 2) and (_root.area[nam].cd == 0)) {
removeMovieClip(_root.area[nam]);
}
}
function beamaction() {
if (_root.beamguide._alpha <= 0) {
_root.beamguide._alpha = 100;
_root.beamguide._visible = false;
}
if (_root.beamguide._visible == true) {
_root.beamguide._alpha = _root.beamguide._alpha - 10;
if (makeblocks == "on") {
_root.beamguide.gotoAndStop(2);
} else {
_root.beamguide.gotoAndStop(1);
}
_root.beamguide._xscale = _root.beamguide._xscale / 1.1;
} else {
_root.beamguide.gotoAndStop(3);
}
}
function solaction(nam) {
if (_root.area3[nam].health > -55) {
_root.area3[nam].shoot = true;
if (_root.area3[nam].health <= 0) {
if (_root.area3[nam].cooldown == 0) {
_root.spawnenergy(_root.area3[nam]._x, _root.area3[nam]._y, 1);
_root.area3[nam].cooldown = 3;
} else {
_root.area3[nam].cooldown--;
}
if (_root.area3[nam].health == 0) {
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = "off";
_root.area3[nam].shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(6);
} else {
_root.area3[nam].gotoAndStop(7);
}
}
_root.area3[nam].health--;
} else {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam], _root.area2)) {
if (_root.area3[nam].chase == "off") {
_root.area3[nam].play();
_root.area3[nam].chase = "on";
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area2) and (_root.area3[nam].hurt == 0)) and (_root.area3[nam].health > 0)) {
_root.area3[nam].hurt = 11;
_root.area3[nam].health--;
}
}
}
if ((_root.area3[nam].chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 700)) {
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
if (_root.area3[nam].hurt == 10) {
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(9);
} else {
_root.area3[nam].gotoAndStop(8);
}
}
} else {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) < 150) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
if (_root.area3[nam]._currentframe == 4) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(5);
} else {
if (_root.area3[nam]._currentframe == 5) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(4);
}
} else if ((((_root.area3[nam]._currentframe != 4) and (_root.area3[nam]._currentframe != 5)) or (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) > 230)) and (_root.area3[nam].hit <= 0)) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam].shoot = false;
_root.area3[nam]._x = _root.area3[nam]._x + 6;
_root.area3[nam].gotoAndStop(2);
} else {
_root.area3[nam].shoot = false;
_root.area3[nam]._x = _root.area3[nam]._x - 6;
_root.area3[nam].gotoAndStop(3);
}
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area) or (_root.checkCollision(_root.area3[nam].grd, _root.area.ground) == false)) or (yenter < 45)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
_root.area3[nam].hit = 6;
_root.area3[nam].shoot = true;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
if (_root.area3[nam]._currentframe == 4) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(5);
_root.area3[nam].shoot = true;
} else {
if (_root.area3[nam]._currentframe == 5) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(4);
_root.area3[nam].shoot = true;
}
} else {
_root.area3[nam].hit--;
if (_root.area3[nam].hit <= 0) {
_root.area3[nam].oldx = _root.area3[nam]._x;
} else {
_root.area3[nam].shoot = true;
_root.area3[nam]._x = _root.area3[nam].oldx;
}
}
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + ((((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5) * (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5)))) < 250) {
_root.area3[nam].chase = "on";
_root.area3[nam].play();
}
}
}
if (_root.area3[nam].shoot == true) {
_root.area3[nam].gunprog = _root.area3[nam].gunprog + 1;
} else {
_root.area3[nam].gunprog = 1;
}
}
}
function gaction(nam) {
if (_root.area3[nam].health > -55) {
if (_root.area3[nam].health <= 0) {
if (_root.area3[nam].cooldown == 0) {
_root.spawnenergy(_root.area3[nam]._x, _root.area3[nam]._y, 1);
_root.area3[nam].cooldown = 3;
} else {
_root.area3[nam].cooldown--;
}
if (_root.area3[nam].health == 0) {
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = "off";
shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(6);
} else {
_root.area3[nam].gotoAndStop(7);
}
}
_root.area3[nam].health--;
} else if ((_root.area3[nam].chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 700)) {
if (_root.area3[nam]._currentframe != 1) {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam].body, _root.area2) and (_root.area3[nam].health > 0)) {
_root.area3[nam].hurt = 10;
_root.area3[nam].health--;
}
}
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
_root.area3[nam].bod.gotoAndStop(2);
if (_root.area3[nam].hurt == 9) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(8);
} else {
_root.area3[nam].gotoAndStop(9);
}
}
} else {
_root.area3[nam].bod.gotoAndStop(1);
if ((_root.area3[nam]._currentframe != 4) and (_root.area3[nam]._currentframe != 5)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) < 170) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(5);
} else {
_root.area3[nam].gotoAndStop(4);
}
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x + 7.5;
_root.area3[nam].gotoAndStop(2);
} else {
_root.area3[nam]._x = _root.area3[nam]._x - 7.5;
_root.area3[nam].gotoAndStop(3);
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area) or (_root.checkCollision(_root.area3[nam].grd, _root.area.ground) == false)) or (yenter < 45)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(5);
} else {
_root.area3[nam].gotoAndStop(4);
}
} else {
_root.area3[nam].oldx = _root.area3[nam]._x;
}
}
}
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + ((((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5) * (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5)))) < 250) {
_root.area3[nam].chase = "on";
_root.area3[nam].body.play();
}
}
}
}
_global.destroyheadblocks = "off";
var slide = false;
_global.makeblocks = "off";
var drop = -10;
_global.knockdown = "off";
var l = 0;
_global.encount = 0;
var r = 0;
var ox = 0;
var oy = 0;
var ldown = false;
_global.getup = false;
_global.blklimit = 65;
var newx = _root.area._x;
var newy = _root.area._y;
_global.i = 1;
_global.health = 25;
stop();
_global.plytype = "basic";
_global.cooldown = 0;
_global.imbalance = 0;
_global.mn = 200;
var jfr = 0;
_global.jk = 450;
Frame 17
function checkForCollision(p_clip1, p_clip2) {
var _local4 = p_clip1.getBounds(_root);
var _local3 = p_clip2.getBounds(_root);
if (((_local4.xMax < _local3.xMin) || (_local3.xMax < _local4.xMin)) || ((_local4.yMax < _local3.yMin) || (_local3.yMax < _local4.yMin))) {
return(null);
}
var _local2 = {};
_local2.xMin = Math.max(_local4.xMin, _local3.xMin);
_local2.xMax = Math.min(_local4.xMax, _local3.xMax);
_local2.yMin = Math.max(_local4.yMin, _local3.yMin);
_local2.yMax = Math.min(_local4.yMax, _local3.yMax);
var _local7 = new flash.display.BitmapData(_local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin, false);
var _local5 = p_clip1.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip1, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, 255));
_local5 = p_clip2.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip2, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, 255), "difference");
var _local6 = _local7.getColorBoundsRect(4294967295, 4278255615);
if (_local6.width == 0) {
return(null);
}
_local6.x = _local6.x + _local2.xMin;
_local6.y = _local6.y + _local2.yMin;
return(_local6);
}
function checkCollision(m, t) {
var _local2 = checkForCollision(m, t);
if (_local2) {
} else {
_global.yinter = 0;
_global.yenter = 0;
}
if (_local2 == null) {
return(false);
}
_global.yenter = _local2.width;
_global.yinter = _local2.height;
return(true);
}
function spawnbullet() {
duplicateMovieClip (_root.area2.blt, "en" + mn, mn);
_global.cooldown = 5;
_global.shoot = true;
ox = _root.beamguide._x;
oy = _root.beamguide._y;
_root.beamguide._x = _root._xmouse;
_root.beamguide._y = _root._ymouse;
_global.ll = (_root.ply._x + armx) - _root.beamguide._x;
_global.hl = (_root.ply._y + army) - _root.beamguide._y;
_root.area2["en" + mn]._x = ((-_root.area2._x) + _root.ply._x) + armx;
_root.area2["en" + mn]._y = ((-_root.area2._y) + _root.ply._y) + army;
_root.area2["en" + mn]._rotation = ((Math.atan2(hl, ll) * 180) / Math.PI) + 90;
_root.beamguide._x = ox;
_root.beamguide._y = oy;
_global.mn = _global.mn + 1;
if (mn == 320) {
_global.mn = 200;
}
}
function spawnenbullet(dx, dy, rot, type) {
if (type == null) {
type = "enblt";
}
duplicateMovieClip (_root.area3[type], "en" + mn, mn);
_root.area3["en" + mn]._x = dx;
_root.area3["en" + mn]._y = dy - 1;
_root.area3["en" + mn]._rotation = rot;
_global.mn = _global.mn + 1;
if (mn == 320) {
_global.mn = 200;
}
}
function spawnenergy(dx, dy, num) {
rbs = 0;
while (rbs < num) {
duplicateMovieClip (_root.area4.energy, "en" + jk, jk);
_root.area4["en" + jk]._x = dx;
_root.area4["en" + jk]._y = dy;
_root.area4["en" + jk]._rotation = Math.random() * 360;
_root.area4["en" + jk]._alpha = 100;
_global.jk = _global.jk + 1;
if (jk == 680) {
_global.jk = 450;
}
rbs++;
}
}
function spawngenergy(dx, dy, num) {
rbs = 0;
while (rbs < num) {
duplicateMovieClip (_root.area4.genergy, "en" + jk, jk);
_root.area4["en" + jk]._x = dx;
_root.area4["en" + jk]._y = dy;
_root.area4["en" + jk]._rotation = Math.random() * 360;
_root.area4["en" + jk]._alpha = 100;
_global.jk = _global.jk + 1;
if (jk == 680) {
_global.jk = 450;
}
rbs++;
}
}
function spawnblock(tx, ty) {
if (imbalance < 68) {
lll = 0;
while (lll < blklimit) {
if (_root.area["en" + lll]._x == undefined) {
_global.i = lll;
lll = blklimit;
}
lll++;
}
if (_root.area["en" + i]._x != undefined) {
_root.spawnenergy(_root.area["en" + i]._x, _root.area["en" + i]._y, 1);
}
duplicateMovieClip (_root.area.blk, "en" + i, i);
_root.area["en" + i]._x = tx;
_root.area["en" + i]._y = ty;
if ((((_root.checkCollision(_root.area["en" + i], _root.ply.body.toohigh) or _root.checkCollision(_root.area["en" + i], _root.ply.body.middle)) or _root.checkCollision(_root.area["en" + i], _root.area3)) or _root.checkCollision(_root.area["en" + i], _root.area2)) or _root.checkCollision(_root.area["en" + i], _root.area.ground)) {
_root.beamguide.gotoAndStop(1);
removeMovieClip(_root.area["en" + i]);
} else {
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft)) {
if (side2 == "left") {
removeMovieClip(_root.area["en" + i]);
} else {
var _local4 = yenter + 1.6;
var _local3 = _root.area._x;
_global.run = "true";
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright.ini) == false) {
_root.area._x = _root.area._x - _local4;
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft)) {
_root.area._x = _root.area._x - (yenter + 1);
}
if (_root.checkCollision(_root.area, _root.ply.body.tooright)) {
_root.area._x = _root.area._x + (yenter + 1);
if (_root.checkCollision(_root.area, _root.ply.body.tooright) or _root.checkCollision(_root.area, _root.ply.body.tooleft)) {
_root.area._x = _local3;
_global.run = false;
removeMovieClip(_root.area["en" + i]);
}
}
} else {
removeMovieClip(_root.area["en" + i]);
_global.i = _global.i - 1;
}
}
} else if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright)) {
if (side2 == "right") {
removeMovieClip(_root.area["en" + i]);
} else {
var _local4 = yenter + 1.6;
var _local3 = _root.area._x;
_global.run = "true";
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooleft.ini) == false) {
_root.area._x = _root.area._x + _local4;
if (_root.checkCollision(_root.area["en" + i], _root.ply.body.tooright)) {
_root.area._x = _root.area._x + (yenter + 1);
}
if (_root.checkCollision(_root.area, _root.ply.body.tooleft)) {
_root.area._x = _root.area._x - (yenter + 1);
if (_root.checkCollision(_root.area, _root.ply.body.tooleft) or _root.checkCollision(_root.area, _root.ply.body.tooright)) {
_root.area._x = _local3;
removeMovieClip(_root.area["en" + i]);
}
}
} else {
removeMovieClip(_root.area["en" + i]);
_global.i = _global.i - 1;
}
}
}
if ((_root.checkCollision(_root.area, _root.ply.body.toohigh) or _root.checkCollision(_root.area["en" + i], _root.ply.body.toolow)) and _root.checkCollision(_root.area, _root.ply.body.cantjump)) {
removeMovieClip(_root.area["en" + i]);
}
if ((_root.checkCollision(_root.area["en" + i], _root.ply.toolow) and _root.checkCollision(_root.area, _root.ply.body.cantjump)) or _root.checkCollision(_root.area["en" + i], _root.ply.body.cantjump.noblocks)) {
removeMovieClip(_root.area["en" + i]);
}
}
if (_root.area["en" + i]._x != undefined) {
_root.beamguide.gotoAndStop(2);
_root.beamguide._x = _root._xmouse;
_root.beamguide._y = _root._ymouse;
_root.beamguide._rotation = 0;
_global.ll = (_root.ply._x + armx) - _root.beamguide._x;
_global.hl = (_root.ply._y + army) - _root.beamguide._y;
_root.beamguide._width = Math.sqrt((hl * hl) + (ll * ll)) - 40;
_root.beamguide._rotation = (Math.atan2(hl, ll) * 180) / Math.PI;
_root.beamguide._visible = true;
_root.beamguide._alpha = 100;
}
}
_global.i = _global.i + 1;
if (i > blklimit) {
_global.i = 1;
}
}
function checker(x) {
if (Key.isDown(17)) {
trace(x);
}
}
function plyaction() {
if (_root.ply._alpha < 100) {
_root.ply._alpha = _root.ply._alpha + 5;
if (_root.ply._alpha > 100) {
_root.ply._alpha = 100;
}
}
if (_root.checkCollision(_root.ply.body.toolow, _root.area) == false) {
if (drop > -35) {
drop = drop - 3.2;
}
if (_root.checkCollision(_root.area, _root.ply.body.canjump) == false) {
var _local3 = false;
if ((_root.ply._currentframe != 3) and (_root.ply._currentframe != 5)) {
_global.jumping = false;
}
} else {
var _local3 = true;
}
} else {
if (drop < 0) {
drop = 0;
}
var _local3 = true;
}
if (jumping == true) {
_global.jumping = false;
drop = 38;
if (side2 == "left") {
l = l + 2;
} else {
r = r + 2;
}
var _local3 = false;
}
if (((jumping != "begin") and (_local3 == false)) and (knockdown == "off")) {
slide = false;
if (drop <= -4) {
if (side2 == "right") {
_root.ply.gotoAndStop(4);
} else {
_root.ply.gotoAndStop(6);
}
}
}
if ((((((_local3 == true) and (drop == 0)) and (Math.abs(r - l) > 1)) and (slide == false)) and (knockdown == "off")) and (jumping != "begin")) {
if (side2 == "left") {
_root.ply.gotoAndStop(2);
} else {
_root.ply.gotoAndStop(1);
}
}
_root.area._y = _root.area._y + (drop / 2.2);
ldown = false;
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
}
}
if (((((knockdown == "on") and (_root.ply._currentframe != 13)) and (_root.ply._currentframe != 14)) and (_root.ply._currentframe != 15)) and (_root.ply._currentframe != 16)) {
if (_root._currentframe == 7) {
_global.health = _global.health - 5;
}
if (side2 == "left") {
_root.ply.gotoAndStop(14);
drop = 24;
var _local3 = false;
r = 35;
l = 0;
} else {
drop = 24;
var _local3 = false;
l = 35;
r = 0;
_root.ply.gotoAndStop(13);
}
_root.area._y = _root.area._y + 10;
}
if (((_root.ply._currentframe == 14) or (_root.ply._currentframe == 13)) and (_local3 == true)) {
if (side2 == "left") {
_root.ply.gotoAndStop(16);
} else {
_root.ply.gotoAndStop(15);
}
}
if (jumping == false) {
if (_root.checkCollision(_root.ply.body.tooright, _root.area) == false) {
if (Key.isDown(68) and (knockdown == "off")) {
ldown = true;
if (r < 11) {
if (r < 1.5) {
r = r + 1.5;
}
r = r + 0.5;
}
if ((_local3 == true) and (drop < 5)) {
if ((l >= r) and (((l - r) > 7) or (slide == true))) {
_root.ply.gotoAndStop(7);
slide = true;
} else {
_root.ply.gotoAndStop(1);
if (slide == true) {
r = 1;
slide = false;
l = 0;
}
}
} else if ((drop <= -15) or ((((((drop > 0) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) and (getup == false))) {
_root.ply.gotoAndStop(4);
_global.side2 = "right";
}
} else if (r > 1.1) {
r = r / 1.08;
} else {
r = 0;
}
} else {
r = 0;
}
if ((r > 14) and (_local3 == true)) {
r = r / 1.2;
}
if (_root.checkCollision(_root.ply.body.tooleft, _root.area) == false) {
if ((Key.isDown(65) and (ldown == false)) and (knockdown == "off")) {
if (l < 11) {
if (l < 1.5) {
l = l + 1.5;
}
l = l + 0.5;
}
if ((_local3 == true) and (drop < 5)) {
if ((r >= l) and (((r - l) > 7) or (slide == true))) {
_root.ply.gotoAndStop(8);
slide = true;
} else {
_root.ply.gotoAndStop(2);
if (slide == true) {
r = 0;
slide = false;
l = 1;
}
}
} else if ((drop <= -15) or ((((((drop > 0) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) and (getup == false))) {
_root.ply.gotoAndStop(6);
_global.side2 = "left";
}
} else if (l > 1.1) {
l = l / 1.08;
} else {
l = 0;
}
} else {
l = 0;
}
}
if ((l > 14) and (_local3 == true)) {
l = l / 1.2;
}
_root.area._x = _root.area._x + l;
_root.area._x = _root.area._x - r;
if ((((((((_local3 == true) and (r < 2)) and (l < 2)) and (jumping == false)) and (drop < 1)) and (drop > -1)) and (slide == false)) and (getup == false)) {
if (knockdown == "off") {
if (side2 == "left") {
_root.ply.gotoAndStop(12);
} else {
_root.ply.gotoAndStop(11);
}
}
}
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area)) {
_root.checkCollision(_root.ply.body.toohigh, _root.area);
_root.area._y = _root.area._y - (yinter + 1);
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area)) {
if (yenter > 4) {
_root.checkCollision(_root.ply.body.toohigh, _root.area);
_root.area._y = _root.area._y - (yinter + 1);
}
}
if (drop >= 0) {
drop = drop * -0.5;
}
}
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
if (_root.checkCollision(_root.ply.body.toolow.ini, _root.area)) {
_root.area._y = _root.area._y + (yinter + 1);
}
}
if (_root.checkCollision(_root.ply.body.tooright.ini, _root.area)) {
_root.area._x = _root.area._x + yenter;
r = 0;
if (_root.checkCollision(_root.ply.body.tooright.ini, _root.area)) {
_root.area._x = _root.area._x + (yenter + 1);
}
}
if (_root.checkCollision(_root.ply.body.tooleft.ini, _root.area)) {
_root.area._x = _root.area._x - yenter;
l = 0;
if (_root.checkCollision(_root.ply.body.tooleft.ini, _root.area)) {
_root.area._x = _root.area._x - (yenter + 1);
}
}
if (_root.checkCollision(_root.ply.body.toohigh.hcontact, _root.area) == false) {
newy = _root.area._y;
newx = _root.area._x;
} else {
r = 0;
_root.area._x = newx;
_root.area._y = newy;
drop = 0;
l = 0;
}
if (((((((_local3 == true) and (knockdown == "off")) and (_root.checkCollision(_root.ply.body.cantjump, _root.area) == false)) and (_root.ply._currentframe != 3)) and (_root.ply._currentframe != 5)) and (_root.ply._currentframe != 9)) and (_root.ply._currentframe != 10)) {
if (Key.isDown(87)) {
_global.jumping = "begin";
if (side2 == "right") {
if (slide == true) {
_root.ply.gotoAndStop(9);
drop = 54;
l = 18;
slide = false;
_global.side2 = "left";
} else {
_root.ply.gotoAndStop(3);
}
} else if (slide == true) {
_root.ply.gotoAndStop(10);
drop = 54;
r = 18;
slide = false;
_global.side2 = "right";
} else {
_root.ply.gotoAndStop(5);
}
}
}
_global.bldrop = drop;
_global.blspd = r - l;
_root.area2._x = _root.area._x;
_root.area3._x = _root.area._x;
_root.area2._y = _root.area._y;
_root.area3._y = _root.area._y;
_root.area4._x = _root.area._x;
_root.area4._y = _root.area._y;
_root.area5._x = _root.area._x;
_root.area5._y = _root.area._y;
}
function araction(nam) {
if (_root.area3[nam].destroy == "on") {
removeMovieClip(_root.area3[nam]);
} else if (_root.area3[nam].destroy == "ready") {
_root.area3[nam].destroy = "ready2";
} else if (_root.area3[nam].destroy == "ready2") {
_root.area3[nam].destroy = "ready3";
} else if (_root.area3[nam].destroy == "ready3") {
_root.area3[nam].destroy = "on";
}
_root.area3[nam].timer = _root.area3[nam].timer - 1;
if (_root.area3[nam].timer == 0) {
removeMovieClip(_root.area3[nam]);
_root.area3[nam].timer = 2;
}
_global.rot = _root.area3[nam]._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if (_root.area3[nam].destroy == "off") {
_root.area3[nam]._x = _root.area3[nam]._x - (Math.cos((_root.area3[nam]._rotation * Math.PI) / 180) * 20);
_root.area3[nam]._y = _root.area3[nam]._y - (Math.sin((_root.area3[nam]._rotation * Math.PI) / 180) * 20);
}
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_root.area3[nam].destroy = "ready";
var _local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
if (_root.checkCollision(_root.area, _root.area3[nam])) {
_local4 = Math.sqrt((yenter * yenter) + (yinter * yinter));
_root.area3[nam]._x = _root.area3[nam]._x + ((_local4 + 6) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180));
_root.area3[nam]._y = _root.area3[nam]._y + ((_local4 + 6) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180));
}
}
if (_root.area3[nam].destroy == "off") {
if (_root.checkCollision(_root.ply.bod, _root.area3[nam])) {
_root.area3[nam].destroy = "ready";
_global.health = _global.health - 1;
_root.area3[nam].gotoAndStop(2);
}
}
}
function bowaction(nam) {
if (_root.area3[nam]._currentframe != 41) {
if ((_root.area3[nam].health <= 0) and (_root.area3[nam]._currentframe < 41)) {
_root.spawnenergy(_root.area3[nam]._x + ((_root.area3[nam]._currentframe * 6) * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._y + ((_root.area3[nam]._currentframe * 6) * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180)), 1);
if (_root.area3[nam]._currentframe < 29) {
_global.encount = _global.encount - 1;
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = false;
_root.area3[nam].gotoAndPlay(29);
}
} else {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam], _root.area2)) {
if (_root.area3[nam].chase == false) {
_root.area3[nam].play();
_root.area3[nam].chase = true;
}
if (((-1 * _root.area2._x) + _root.ply._x) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x - 7;
} else {
_root.area3[nam]._x = _root.area3[nam]._x + 7;
}
if (((-1 * _root.area2._y) + _root.ply._y) > _root.area3[nam]._y) {
_root.area3[nam]._y = _root.area3[nam]._y - 5;
} else {
_root.area3[nam]._y = _root.area3[nam]._y + 5;
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area2) and (_root.area3[nam].hurt == 0)) and (health > 0)) {
_root.area3[nam].hurt = 15;
_root.area3[nam].bod.play();
_root.area3[nam].health--;
}
}
}
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
_root.area3[nam].bod.play();
} else {
_root.area3[nam].bod.gotoAndStop(1);
}
if ((_root.area3[nam].chase == true) and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 1500)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 15) - _root.area3[nam]._x) < 4) {
_root.area3[nam]._x = ((-1 * _root.area2._x) + _root.ply._x) + 15;
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x + 5;
} else {
_root.area3[nam]._x = _root.area3[nam]._x - 5;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
} else {
_root.area3[nam].oldx = _root.area3[nam]._x;
}
if (Math.abs((((-1 * _root.area2._y) + _root.ply._y) + 30) - _root.area3[nam]._y) < 3) {
_root.area3[nam]._y = ((-1 * _root.area2._y) + _root.ply._y) + 30;
} else if ((((-1 * _root.area2._y) + _root.ply._y) + 30) > _root.area3[nam]._y) {
_root.area3[nam]._y = _root.area3[nam]._y + 4;
} else {
_root.area3[nam]._y = _root.area3[nam]._y - 4;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._y = _root.area3[nam].oldy;
} else {
_root.area3[nam].oldy = _root.area3[nam]._y;
}
var _local4 = (-1 * Math.abs((Math.atan2(((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) - 30, ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) - 12) * 180) / Math.PI)) - 0;
if (Math.abs(_local4 - _root.area3[nam]._rotation) < 8) {
_root.area3[nam]._rotation = _local4;
} else if (_local4 > _root.area3[nam]._rotation) {
_root.area3[nam]._rotation = _root.area3[nam]._rotation + 8;
} else {
_root.area3[nam]._rotation = _root.area3[nam]._rotation - 8;
}
if (_root.checkCollision(_root.area3[nam].bod, _root.area.ground)) {
_root.area3[nam]._rotation = oldrot;
} else {
oldrot = _root.area3[nam]._rotation;
}
if (_root.area3[nam].fire == true) {
_root.spawnenbullet(_root.area3[nam]._x + (31.6 * Math.cos((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._y + (31.4 * Math.sin((_root.area3[nam]._rotation * Math.PI) / 180)), _root.area3[nam]._rotation, "enar");
_root.area3[nam].fire = false;
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 200) {
_root.area3[nam].chase = true;
_root.area3[nam].play();
}
}
}
}
}
function blkaction(nam) {
if (_root.area[nam].destroy != 0) {
if (_root.checkCollision(_root.area[nam], _root.ply.body)) {
removeMovieClip(_root.area[nam]);
}
}
if (_root.area[nam].destroy == 1) {
_root.area[nam].destroy = 2;
_root.area[nam].cd = 13;
_root.spawngenergy(_root.area[nam]._x, _root.area[nam]._y, 1);
}
if (_root.area[nam].destroy == 2) {
_root.area[nam].cd--;
} else if (bstage == 10) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
} else if (_root.checkCollision(_root.area[nam], _root.area2)) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
} else if (_root.checkCollision(_root.area[nam], _root.area3)) {
_root.area[nam].destroy = 1;
_root.area[nam].gotoAndPlay(2);
}
if ((_root.area[nam].destroy == 2) and (_root.area[nam].cd == 0)) {
removeMovieClip(_root.area[nam]);
}
}
function beamaction() {
if (_root.beamguide._alpha <= 0) {
_root.beamguide._alpha = 100;
_root.beamguide._visible = false;
}
if (_root.beamguide._visible == true) {
_root.beamguide._alpha = _root.beamguide._alpha - 10;
if (makeblocks == "on") {
_root.beamguide.gotoAndStop(2);
} else {
_root.beamguide.gotoAndStop(1);
}
_root.beamguide._xscale = _root.beamguide._xscale / 1.1;
} else {
_root.beamguide.gotoAndStop(3);
}
}
function solaction(nam) {
if (_root.area3[nam].health > -55) {
_root.area3[nam].shoot = true;
if (_root.area3[nam].health <= 0) {
if (_root.area3[nam].cooldown == 0) {
_root.spawnenergy(_root.area3[nam]._x, _root.area3[nam]._y, 1);
_root.area3[nam].cooldown = 3;
} else {
_root.area3[nam].cooldown--;
}
if (_root.area3[nam].health == 0) {
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = "off";
_root.area3[nam].shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(6);
} else {
_root.area3[nam].gotoAndStop(7);
}
}
_root.area3[nam].health--;
} else {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam], _root.area2)) {
if (_root.area3[nam].chase == "off") {
_root.area3[nam].play();
_root.area3[nam].chase = "on";
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area2) and (_root.area3[nam].hurt == 0)) and (_root.area3[nam].health > 0)) {
_root.area3[nam].hurt = 11;
_root.area3[nam].health--;
}
}
}
if ((_root.area3[nam].chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 700)) {
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
if (_root.area3[nam].hurt == 10) {
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(9);
} else {
_root.area3[nam].gotoAndStop(8);
}
}
} else {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) < 150) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
if (_root.area3[nam]._currentframe == 4) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(5);
} else {
if (_root.area3[nam]._currentframe == 5) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(4);
}
} else if ((((_root.area3[nam]._currentframe != 4) and (_root.area3[nam]._currentframe != 5)) or (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) > 230)) and (_root.area3[nam].hit <= 0)) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam].shoot = false;
_root.area3[nam]._x = _root.area3[nam]._x + 6;
_root.area3[nam].gotoAndStop(2);
} else {
_root.area3[nam].shoot = false;
_root.area3[nam]._x = _root.area3[nam]._x - 6;
_root.area3[nam].gotoAndStop(3);
}
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area) or (_root.checkCollision(_root.area3[nam].grd, _root.area.ground) == false)) or (yenter < 45)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
_root.area3[nam].hit = 6;
_root.area3[nam].shoot = true;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
if (_root.area3[nam]._currentframe == 4) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(5);
_root.area3[nam].shoot = true;
} else {
if (_root.area3[nam]._currentframe == 5) {
_root.area3[nam].gunprog = 1;
}
_root.area3[nam].gotoAndStop(4);
_root.area3[nam].shoot = true;
}
} else {
_root.area3[nam].hit--;
if (_root.area3[nam].hit <= 0) {
_root.area3[nam].oldx = _root.area3[nam]._x;
} else {
_root.area3[nam].shoot = true;
_root.area3[nam]._x = _root.area3[nam].oldx;
}
}
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + ((((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5) * (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5)))) < 250) {
_root.area3[nam].chase = "on";
_root.area3[nam].play();
}
}
}
if (_root.area3[nam].shoot == true) {
_root.area3[nam].gunprog = _root.area3[nam].gunprog + 1;
} else {
_root.area3[nam].gunprog = 1;
}
}
}
function gaction(nam) {
if (_root.area3[nam].health > -55) {
if (_root.area3[nam].health <= 0) {
if (_root.area3[nam].cooldown == 0) {
_root.spawnenergy(_root.area3[nam]._x, _root.area3[nam]._y, 1);
_root.area3[nam].cooldown = 3;
} else {
_root.area3[nam].cooldown--;
}
if (_root.area3[nam].health == 0) {
_global.blklimit = _global.blklimit + 1;
_root.area3[nam].chase = "off";
shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(6);
} else {
_root.area3[nam].gotoAndStop(7);
}
}
_root.area3[nam].health--;
} else if ((_root.area3[nam].chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) * ((_root.area2._x + _root.area3[nam]._x) - _root.ply._x)))) < 700)) {
if (_root.area3[nam]._currentframe != 1) {
if (_root.area3[nam].hurt == 0) {
if (_root.checkCollision(_root.area3[nam].body, _root.area2) and (_root.area3[nam].health > 0)) {
_root.area3[nam].hurt = 10;
_root.area3[nam].health--;
}
}
if (_root.area3[nam].hurt > 0) {
_root.area3[nam].hurt--;
_root.area3[nam].bod.gotoAndStop(2);
if (_root.area3[nam].hurt == 9) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(8);
} else {
_root.area3[nam].gotoAndStop(9);
}
}
} else {
_root.area3[nam].bod.gotoAndStop(1);
if ((_root.area3[nam]._currentframe != 4) and (_root.area3[nam]._currentframe != 5)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - _root.area3[nam]._x) < 170) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(5);
} else {
_root.area3[nam].gotoAndStop(4);
}
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > _root.area3[nam]._x) {
_root.area3[nam]._x = _root.area3[nam]._x + 7.5;
_root.area3[nam].gotoAndStop(2);
} else {
_root.area3[nam]._x = _root.area3[nam]._x - 7.5;
_root.area3[nam].gotoAndStop(3);
}
if ((_root.checkCollision(_root.area3[nam].bod, _root.area) or (_root.checkCollision(_root.area3[nam].grd, _root.area.ground) == false)) or (yenter < 45)) {
_root.area3[nam]._x = _root.area3[nam].oldx;
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > _root.area3[nam]._x) {
_root.area3[nam].gotoAndStop(5);
} else {
_root.area3[nam].gotoAndStop(4);
}
} else {
_root.area3[nam].oldx = _root.area3[nam]._x;
}
}
}
}
} else {
_root.area3[nam].stop();
if (Math.abs(Math.sqrt((((_root.area2._y + _root.area3[nam]._y) - _root.ply._y) * ((_root.area2._y + _root.area3[nam]._y) - _root.ply._y)) + ((((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5) * (((_root.area2._x + _root.area3[nam]._x) - _root.ply._x) + 5)))) < 250) {
_root.area3[nam].chase = "on";
_root.area3[nam].body.play();
}
}
}
}
_global.destroyheadblocks = "off";
var slide = false;
_global.makeblocks = "off";
var drop = -10;
_global.knockdown = "off";
var l = 0;
_global.encount = 0;
var r = 0;
var ox = 0;
var oy = 0;
var ldown = false;
_global.getup = false;
_global.blklimit = 65;
var newx = _root.area._x;
var newy = _root.area._y;
_global.i = 1;
_global.health = 25;
stop();
_global.plytype = "basic";
_global.cooldown = 0;
_global.imbalance = 0;
_global.mn = 200;
var jfr = 0;
_global.jk = 450;
stopAllSounds();
Symbol 13 Button
on (release) {
_root.play();
}
Symbol 14 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 14 MovieClip Frame 2
gotoAndPlay (1);
Symbol 26 Button
on (release) {
this._parent.play();
_global.targy = 4;
}
Symbol 29 Button
on (release) {
this._parent.play();
_global.targy = 3;
}
Symbol 32 Button
on (release) {
this._parent.play();
_global.targy = 2;
}
Symbol 34 MovieClip Frame 85
stop();
Symbol 34 MovieClip Frame 86
stopAllSounds();
Symbol 34 MovieClip Frame 166
_root.gotoAndStop(targy + 1);
stopAllSounds();
Symbol 38 Button
on (release) {
gotoAndStop (2);
_global.gomen = true;
}
Symbol 55 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 6
stop();
Instance of Symbol 47 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply)) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 49 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 3000) {
if (_root.checkCollision(this, _root.ply)) {
this._y = 3001;
_root.tut.gotoAndPlay(8);
}
}
}
Instance of Symbol 49 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 3000) {
if (_root.checkCollision(this, _root.ply)) {
this._y = 3001;
_root.tut.gotoAndPlay(22);
}
}
}
Instance of Symbol 49 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 3000) {
if (_root.checkCollision(this, _root.ply)) {
this._y = 3001;
_root.tut.gotoAndPlay(36);
}
}
}
Instance of Symbol 49 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 3000) {
if (_root.checkCollision(this, _root.ply)) {
this._y = 3001;
_root.tut.gotoAndPlay(50);
}
}
}
Instance of Symbol 49 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 3000) {
if (_root.checkCollision(this, _root.ply)) {
this._y = 3001;
_root.tut.gotoAndPlay(64);
}
}
}
Instance of Symbol 49 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 3000) {
if (_root.checkCollision(this, _root.ply)) {
this._y = 3001;
_root.tut.gotoAndPlay(78);
}
}
}
Instance of Symbol 49 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 3000) {
if (_root.checkCollision(this, _root.ply)) {
this._y = 3001;
_root.tut.gotoAndPlay(92);
}
}
}
Instance of Symbol 49 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 3000) {
if (_root.checkCollision(this, _root.ply)) {
this._y = 3001;
_root.tut.gotoAndPlay(106);
}
}
}
Instance of Symbol 51 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply)) {
_root.play();
}
}
Instance of Symbol 55 MovieClip "blt" in Symbol 56 MovieClip Frame 1
onClipEvent (load) {
var timer = 40;
var s = (blspd / 2);
var d = bldrop;
this.stop();
if (this._name != "blt") {
this.play();
}
var destroy = "off";
this._x = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * 0.3);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 0.3);
}
onClipEvent (enterFrame) {
if (destroy == "on") {
removeMovieClip(this);
} else if (destroy == "ready") {
destroy = "ready2";
} else if (destroy == "ready2") {
destroy = "ready3";
} else if (destroy == "ready3") {
destroy = "ready4";
} else if (destroy == "ready4") {
destroy = "on";
} else {
timer = timer - 1;
if (timer == 0) {
removeMovieClip(this);
}
_global.rot = this._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if ((_root.checkCollision(_root.area, this) or _root.checkCollision(_root.area3, this)) and (destroy == "off")) {
destroy = "ready";
this.gotoAndPlay(2);
} else {
this._x = this._x + ((Math.cos(((this._rotation + 90) * Math.PI) / 180) * 19) + s);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 19);
if ((_root.checkCollision(_root.area, this) or _root.checkCollision(_root.area3, this)) and (destroy == "off")) {
destroy = "ready";
this.gotoAndPlay(2);
} else {
this._x = this._x + ((Math.cos(((this._rotation + 90) * Math.PI) / 180) * 19) + s);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 19);
}
}
}
}
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 3
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 16
gotoAndPlay (1);
Symbol 96 MovieClip Frame 16
gotoAndPlay (1);
Symbol 101 MovieClip Frame 16
gotoAndPlay (1);
Symbol 102 MovieClip Frame 16
gotoAndPlay (1);
Symbol 105 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 1
stop();
Instance of Symbol 108 MovieClip in Symbol 109 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(plyfire);
}
Instance of Symbol 109 MovieClip in Symbol 110 MovieClip Frame 1
onClipEvent (load) {
if ((makeblocks == "off") and (cooldown == -10)) {
this._visible = false;
} else {
this._visible = true;
}
if (armtype == 1) {
if (side2 == "left") {
_global.armx = (this._x + this._parent._x) + this._parent._parent._x;
} else {
_global.armx = (this._x - this._parent._x) + this._parent._parent._x;
}
} else if (side2 == "left") {
_global.armx = (this._x - this._parent._x) + this._parent._parent._x;
} else {
_global.armx = (this._x + this._parent._x) + this._parent._parent._x;
}
_global.army = (-5 + this._parent._y) + this._parent._parent._y;
_global.h = (_root._ymouse - _root.ply._y) - army;
_global.len = (_root._xmouse - _root.ply._x) - armx;
if (side2 == "left") {
this._rotation = (((-Math.atan2(h, len)) * 180) / Math.PI) + 90;
} else {
this._rotation = ((Math.atan2(h, len) * 180) / Math.PI) - 90;
}
_global.armrot = this._rotation;
}
onClipEvent (enterFrame) {
if ((makeblocks == "off") and (cooldown == -10)) {
this._visible = false;
} else {
this._visible = true;
if (etype == -1) {
this.gotoAndStop(2);
} else if (etype == 1) {
this.gotoAndStop(1);
}
if (armtype == 1) {
if (side2 == "left") {
_global.armx = (this._x + this._parent._x) + this._parent._parent._x;
} else {
_global.armx = (this._x - this._parent._x) + this._parent._parent._x;
}
} else if (side2 == "left") {
_global.armx = (this._x - this._parent._x) + this._parent._parent._x;
} else {
_global.armx = (this._x + this._parent._x) + this._parent._parent._x;
}
_global.army = (-5 + this._parent._y) + this._parent._parent._y;
_global.h = (_root._ymouse - _root.ply._y) - army;
_global.len = (_root._xmouse - _root.ply._x) - armx;
if (side2 == "left") {
this._rotation = (((-Math.atan2(h, len)) * 180) / Math.PI) + 90;
} else {
this._rotation = ((Math.atan2(h, len) * 180) / Math.PI) - 90;
}
_global.armrot = this._rotation;
}
}
Instance of Symbol 101 MovieClip in Symbol 111 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Instance of Symbol 102 MovieClip in Symbol 111 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Symbol 111 MovieClip Frame 16
gotoAndPlay (1);
Instance of Symbol 115 MovieClip in Symbol 116 MovieClip Frame 1
onClipEvent (load) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Instance of Symbol 117 MovieClip in Symbol 118 MovieClip Frame 1
onClipEvent (load) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Symbol 119 MovieClip Frame 1
_global.jumping = "begin";
Symbol 119 MovieClip Frame 7
_global.jumping = true;
Symbol 119 MovieClip Frame 19
stop();
Instance of Symbol 115 MovieClip in Symbol 119 MovieClip Frame 19
onClipEvent (load) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Symbol 120 MovieClip Frame 1
stop();
Instance of Symbol 115 MovieClip in Symbol 120 MovieClip Frame 1
onClipEvent (load) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Symbol 122 MovieClip Frame 5
_global.armtype = 1;
stop();
Symbol 123 MovieClip Frame 6
gotoAndPlay (7);
Symbol 123 MovieClip Frame 9
_global.armtype = 2;
Symbol 123 MovieClip Frame 20
gotoAndPlay (21);
Symbol 123 MovieClip Frame 21
stop();
Instance of Symbol 115 MovieClip in Symbol 123 MovieClip Frame 21
onClipEvent (load) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Symbol 124 MovieClip Frame 1
stop();
Instance of Symbol 115 MovieClip in Symbol 124 MovieClip Frame 1
onClipEvent (load) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Symbol 126 MovieClip Frame 1
_global.nomake = true;
Symbol 127 MovieClip Frame 1
_global.nodamage = false;
Symbol 127 MovieClip Frame 16
if (health <= 0) {
_root.gotoAndStop(17);
}
Symbol 127 MovieClip Frame 35
_global.nodamage = false;
_global.nomake = false;
_global.knockdown = "off";
stop();
Instance of Symbol 115 MovieClip in Symbol 127 MovieClip Frame 35
onClipEvent (load) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Symbol 128 MovieClip Frame 1
stop();
_global.armtype = 2;
_global.side2 = "right";
_global.pos = "rwalk";
Instance of Symbol 82 MovieClip "body" in Symbol 128 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 111 MovieClip "bod" in Symbol 128 MovieClip Frame 1
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Symbol 128 MovieClip Frame 2
stop();
_global.armtype = 2;
_global.side2 = "left";
_global.pos = "lwalk";
Symbol 128 MovieClip Frame 3
_global.armtype = 1;
_global.side2 = "right";
Instance of Symbol 119 MovieClip "bod" in Symbol 128 MovieClip Frame 3
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Symbol 128 MovieClip Frame 4
_global.armtype = 1;
Instance of Symbol 120 MovieClip "bod" in Symbol 128 MovieClip Frame 4
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Symbol 128 MovieClip Frame 5
_global.armtype = 1;
_global.side2 = "left";
Instance of Symbol 119 MovieClip "bod" in Symbol 128 MovieClip Frame 5
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Symbol 128 MovieClip Frame 6
_global.armtype = 1;
Instance of Symbol 120 MovieClip "bod" in Symbol 128 MovieClip Frame 6
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Symbol 128 MovieClip Frame 7
_global.armtype = 2;
_global.side2 = "left";
Instance of Symbol 122 MovieClip "bod" in Symbol 128 MovieClip Frame 7
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Symbol 128 MovieClip Frame 8
_global.armtype = 2;
_global.side2 = "right";
Symbol 128 MovieClip Frame 9
_global.armtype = 2;
Instance of Symbol 123 MovieClip "bod" in Symbol 128 MovieClip Frame 9
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
_global.side2 = "right";
}
Symbol 128 MovieClip Frame 10
_global.armtype = 2;
Instance of Symbol 123 MovieClip "bod" in Symbol 128 MovieClip Frame 10
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
_global.side2 = "left";
}
Symbol 128 MovieClip Frame 11
_global.armtype = 1;
Instance of Symbol 124 MovieClip "bod" in Symbol 128 MovieClip Frame 11
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Symbol 128 MovieClip Frame 12
_global.armtype = 1;
Instance of Symbol 126 MovieClip "bod" in Symbol 128 MovieClip Frame 13
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Instance of Symbol 127 MovieClip "bod" in Symbol 128 MovieClip Frame 15
onClipEvent (enterFrame) {
_global.bdy = this._y;
_global.bdx = this._x;
}
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 32
stop();
Instance of Symbol 132 MovieClip in Symbol 133 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this._currentframe == 1) and _root.checkCollision(this, _root.area2)) {
this.play();
}
}
Symbol 137 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 24
stop();
Instance of Symbol 137 MovieClip "blk" in Symbol 138 MovieClip Frame 24
onClipEvent (load) {
var destroy = 0;
var cd = 0;
if (run == "true") {
if (_root.checkCollision(this, _root.ply.body.tooleft) or _root.checkCollision(this, _root.ply.body.tooright)) {
_global.run = false;
removeMovieClip(this);
}
}
}
onClipEvent (enterFrame) {
_root.blkaction(this._name);
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 11
stop();
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 10
stop();
Symbol 148 MovieClip Frame 1
stop();
Instance of Symbol 143 MovieClip "energy" in Symbol 150 MovieClip Frame 1
onClipEvent (load) {
var rotlimit = 12;
if (_root.ply._alpha < 100) {
removeMovieClip(this);
_global.imbalance = 0;
}
var cd = "off";
_global.imbalance = _global.imbalance + 1;
}
onClipEvent (enterFrame) {
if (this._name != "energy") {
var xdd = (((_root.area4._x + this._x) - _root.ply._x) - 10);
var ydd = (((_root.area4._y + this._y) - _root.ply._y) - 50);
var mydistance = Math.sqrt((xdd * xdd) + (ydd * ydd));
if ((mydistance < 35) and (cd == "off")) {
var cd = 12;
_global.imbalance = _global.imbalance - 1;
this.gotoAndPlay(2);
}
if (cd == "off") {
var rot = ((Math.atan2(((_root.area4._y + this._y) - _root.ply._y) - 50, ((_root.area4._x + this._x) - _root.ply._x) - 10) * 180) / Math.PI);
var rotdiff = (this._rotation - rot);
if (rotdiff >= 180) {
rotdiff = rotdiff - 360;
}
if (rotdiff <= -180) {
rotdiff = rotdiff + 360;
}
if (Math.abs(rotdiff) < rotlimit) {
this._rotation = rot;
} else {
rotlimit = rotlimit + 0.2;
if (rotdiff < 0) {
this._rotation = this._rotation + rotlimit;
} else {
this._rotation = this._rotation - rotlimit;
}
}
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 18);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 18);
} else {
cd = cd - 1;
if (cd == 0) {
removeMovieClip(this);
}
}
}
}
Instance of Symbol 145 MovieClip "genergy" in Symbol 150 MovieClip Frame 1
onClipEvent (load) {
var cd = "off";
}
onClipEvent (enterFrame) {
if (this._name != "genergy") {
var xdd = (((_root.area4._x + this._x) - _root.ply._x) - 10);
var ydd = (((_root.area4._y + this._y) - _root.ply._y) - 50);
var mydistance = Math.sqrt((xdd * xdd) + (ydd * ydd));
if ((mydistance < 30) and (cd == "off")) {
var cd = 12;
this.gotoAndPlay(2);
}
if (cd == "off") {
var rot = ((Math.atan2(((_root.area4._y + this._y) - _root.ply._y) - 50, ((_root.area4._x + this._x) - _root.ply._x) - 10) * 180) / Math.PI);
this._rotation = rot;
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 25);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 25);
} else {
cd = cd - 1;
if (cd == 0) {
removeMovieClip(this);
}
}
}
}
Instance of Symbol 149 MovieClip in Symbol 150 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _root.area3.wk1._x;
this._y = _root.area3.wk1._y;
this.gotoAndStop(_root.area3.wk1._currentframe);
if (_root.area3.wk1.shoot == true) {
this.gun.gotoAndStop(1);
} else {
this.gun.gotoAndStop(2);
}
}
Instance of Symbol 149 MovieClip in Symbol 150 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _root.area3.wk2._x;
this._y = _root.area3.wk2._y;
this.gotoAndStop(_root.area3.wk2._currentframe);
if (_root.area3.wk2.shoot == true) {
this.gun.gotoAndStop(1);
} else {
this.gun.gotoAndStop(2);
}
}
Instance of Symbol 149 MovieClip in Symbol 150 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _root.area3.wk3._x;
this._y = _root.area3.wk3._y;
this.gotoAndStop(_root.area3.wk3._currentframe);
if (_root.area3.wk3.shoot == true) {
this.gun.gotoAndStop(1);
} else {
this.gun.gotoAndStop(2);
}
}
Symbol 160 MovieClip Frame 1
stop();
Symbol 170 MovieClip Frame 7
stop();
Symbol 170 MovieClip Frame 21
stop();
Symbol 170 MovieClip Frame 35
stop();
Symbol 170 MovieClip Frame 49
stop();
Symbol 170 MovieClip Frame 63
stop();
Symbol 170 MovieClip Frame 77
stop();
Symbol 170 MovieClip Frame 91
stop();
Symbol 170 MovieClip Frame 105
stop();
Symbol 170 MovieClip Frame 150
stop();
Symbol 176 MovieClip Frame 190
_root.gotoAndStop(7);
Instance of Symbol 47 MovieClip in Symbol 178 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root._currentframe < 8) {
if (_root.checkCollision(this, _root.ply)) {
stopAllSounds();
_root.play();
}
} else {
this._visible = false;
}
}
Instance of Symbol 55 MovieClip "blt" in Symbol 178 MovieClip Frame 1
onClipEvent (load) {
var timer = 19;
var s = (blspd / 2);
var d = bldrop;
if (this._name != "blt") {
this.play();
this._visible = true;
} else {
this.stop();
this._visible = false;
}
var destroy = "off";
this._x = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * 0.3);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 0.3);
}
onClipEvent (enterFrame) {
if (this._name != "blt") {
this._visible = true;
if (destroy == "on") {
removeMovieClip(this);
} else if (destroy == "ready") {
destroy = "ready2";
} else if (destroy == "ready2") {
destroy = "ready3";
} else if (destroy == "ready3") {
destroy = "ready4";
} else if (destroy == "ready4") {
destroy = "on";
} else {
timer = timer - 1;
if (timer == 0) {
removeMovieClip(this);
}
_global.rot = this._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if ((_root.checkCollision(_root.area, this) or _root.checkCollision(_root.area3, this)) and (destroy == "off")) {
destroy = "ready";
this.gotoAndPlay(2);
} else {
this._x = this._x + ((Math.cos(((this._rotation + 90) * Math.PI) / 180) * 19) + s);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 19);
if ((_root.checkCollision(_root.area, this) or _root.checkCollision(_root.area3, this)) and (destroy == "off")) {
destroy = "ready";
this.gotoAndPlay(2);
} else {
this._x = this._x + ((Math.cos(((this._rotation + 90) * Math.PI) / 180) * 19) + s);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 19);
}
}
}
} else {
this.stop();
this._visible = false;
}
}
Symbol 183 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 1
stop();
Instance of Symbol 183 MovieClip "bod" in Symbol 197 MovieClip Frame 14
onClipEvent (load) {
this._parent.fire = true;
}
Symbol 197 MovieClip Frame 28
gotoAndPlay (1);
Symbol 197 MovieClip Frame 41
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 19
stop();
Instance of Symbol 204 MovieClip "gn" in Symbol 205 MovieClip Frame 19
onClipEvent (load) {
var rot = 0;
var cooldwn = 0;
}
onClipEvent (enterFrame) {
if (Math.abs(Math.sqrt((((_root.area2._y + this._parent._y) - _root.ply._y) * ((_root.area2._y + this._parent._y) - _root.ply._y)) + (((_root.area2._x + this._parent._x) - _root.ply._x) * ((_root.area2._x + this._parent._x) - _root.ply._x)))) < 600) {
if (cooldwn == 0) {
cooldwn = 30;
this.play();
_root.spawnenbullet(this._parent._x - (23.5 * Math.cos(((this._rotation + 90) * Math.PI) / 180)), this._parent._y - (23.5 * Math.sin(((this._rotation + 90) * Math.PI) / 180)), this._rotation + 90, "missl");
} else {
cooldwn = cooldwn - 1;
}
rot = (-90 + Math.abs((Math.atan2(((_root.area2._y + this._parent._y) - _root.ply._y) - 54.3, ((_root.area2._x + this._parent._x) - _root.ply._x) - 23.5) * 180) / Math.PI)) - 0;
if (Math.abs(rot - this._rotation) < 7) {
this._rotation = rot;
} else if (rot > this._rotation) {
this._rotation = this._rotation + 7;
} else {
this._rotation = this._rotation - 7;
}
}
}
Symbol 227 MovieClip Frame 20
gotoAndPlay (1);
Symbol 228 MovieClip Frame 20
gotoAndPlay (1);
Symbol 229 MovieClip Frame 20
gotoAndPlay (1);
Symbol 230 MovieClip Frame 20
gotoAndPlay (1);
Instance of Symbol 223 MovieClip "rang" in Symbol 231 MovieClip Frame 1
onClipEvent (load) {
var hit = 0;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent.shoot == true) {
this.gotoAndStop(this._parent._parent._parent.gunprog);
if (_root.checkCollision(_root.ply, this)) {
_global.health = _global.health - 1;
this._parent._parent._parent.gunprog = 1;
} else if (_root.checkCollision(this, _root.area)) {
if (hit == 0) {
this._parent._parent._parent.gunprog = 1;
hit = 2;
} else {
hit--;
this._parent._parent._parent.gunprog = this._parent._parent._parent.gunprog - 1;
}
}
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 223 MovieClip "rang" in Symbol 232 MovieClip Frame 1
onClipEvent (load) {
var hit = 0;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent.shoot == true) {
this.gotoAndStop(this._parent._parent._parent.gunprog);
if (_root.checkCollision(_root.ply, this)) {
_global.health = _global.health - 1;
this._parent._parent._parent.gunprog = 1;
} else if (_root.checkCollision(this, _root.area)) {
if (hit == 0) {
this._parent._parent._parent.gunprog = 1;
hit = 2;
} else {
hit--;
this._parent._parent._parent.gunprog = this._parent._parent._parent.gunprog - 1;
}
}
} else {
this.gotoAndStop(1);
}
}
Symbol 237 MovieClip Frame 53
stop();
Symbol 238 MovieClip Frame 12
_parent.gotoAndStop(2);
Instance of Symbol 223 MovieClip "rang" in Symbol 239 MovieClip Frame 1
onClipEvent (load) {
var hit = 0;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent.shoot == true) {
this.gotoAndStop(this._parent._parent._parent.gunprog);
if (_root.checkCollision(_root.ply, this)) {
_global.health = _global.health - 1;
this._parent._parent._parent.gunprog = 1;
} else if (_root.checkCollision(this, _root.area)) {
if (hit == 0) {
this._parent._parent._parent.gunprog = 1;
hit = 2;
} else {
hit--;
this._parent._parent._parent.gunprog = this._parent._parent._parent.gunprog - 1;
}
}
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 180 MovieClip "enar" in Symbol 240 MovieClip Frame 1
onClipEvent (load) {
var timer = 85;
this._alpha = 100;
this.gotoAndStop(1);
var destroy = "off";
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 4);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 4);
}
onClipEvent (enterFrame) {
_root.araction(this._name);
}
Instance of Symbol 197 MovieClip "bow1" in Symbol 240 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 12;
var chase = false;
var hurt = 0;
var health = 2;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = false;
}
onClipEvent (enterFrame) {
_root.bowaction(this._name);
}
Instance of Symbol 197 MovieClip "bow4" in Symbol 240 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 12;
var chase = false;
var hurt = 0;
var health = 2;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = false;
}
onClipEvent (enterFrame) {
_root.bowaction(this._name);
}
Instance of Symbol 239 MovieClip "wk1" in Symbol 240 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 3;
var hit = 0;
var oldx = this._x;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
_root.solaction(this._name);
}
Instance of Symbol 197 MovieClip "bow" in Symbol 240 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 12;
var chase = false;
var hurt = 0;
var health = 2;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = false;
}
onClipEvent (enterFrame) {
_root.bowaction(this._name);
}
Instance of Symbol 197 MovieClip "bows" in Symbol 240 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 12;
var chase = false;
var hurt = 0;
var health = 2;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = false;
}
onClipEvent (enterFrame) {
_root.bowaction(this._name);
}
Instance of Symbol 239 MovieClip "wk2" in Symbol 240 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 3;
var hit = 0;
var oldx = this._x;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
_root.solaction(this._name);
}
Instance of Symbol 239 MovieClip "wk3" in Symbol 240 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 3;
var hit = 0;
var oldx = this._x;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
_root.solaction(this._name);
}
Instance of Symbol 137 MovieClip "blk" in Symbol 245 MovieClip Frame 1
onClipEvent (load) {
var destroy = "off";
var cd = 0;
if (run == "true") {
if (_root.checkCollision(this, _root.ply.body.tooleft) or _root.checkCollision(this, _root.ply.body.tooright)) {
_global.run = false;
removeMovieClip(this);
}
}
if (_root.checkCollision(this, _root.area2)) {
var destroy = "on";
this.gotoAndPlay(2);
} else if (_root.checkCollision(this, _root.area3)) {
var destroy = "on";
this.gotoAndPlay(2);
}
}
onClipEvent (enterFrame) {
if (destroy != "off") {
if (_root.checkCollision(this, _root.ply.body)) {
removeMovieClip(this);
}
}
if (destroy == "on") {
destroy = "ready";
cd = 13;
_root.spawngenergy(this._x, this._y, 1);
}
if (destroy == "ready") {
cd--;
} else if (_root.checkCollision(this, _root.area2)) {
var destroy = "on";
this.gotoAndPlay(2);
} else if (_root.checkCollision(this, _root.area3)) {
var destroy = "on";
this.gotoAndPlay(2);
}
if ((destroy == "ready") and (cd == 0)) {
removeMovieClip(this);
}
}
Instance of Symbol 143 MovieClip "energy" in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
var rotlimit = 12;
if (_root.ply._alpha < 100) {
removeMovieClip(this);
_global.imbalance = 0;
}
var cd = "off";
_global.imbalance = _global.imbalance + 1;
}
onClipEvent (enterFrame) {
if (this._name != "energy") {
var xdd = (((_root.area4._x + this._x) - _root.ply._x) - 10);
var ydd = (((_root.area4._y + this._y) - _root.ply._y) - 50);
var mydistance = Math.sqrt((xdd * xdd) + (ydd * ydd));
if ((mydistance < 35) and (cd == "off")) {
var cd = 12;
_global.imbalance = _global.imbalance - 1;
this.gotoAndPlay(2);
}
if (cd == "off") {
var rot = ((Math.atan2(((_root.area4._y + this._y) - _root.ply._y) - 50, ((_root.area4._x + this._x) - _root.ply._x) - 10) * 180) / Math.PI);
var rotdiff = (this._rotation - rot);
if (rotdiff >= 180) {
rotdiff = rotdiff - 360;
}
if (rotdiff <= -180) {
rotdiff = rotdiff + 360;
}
if (Math.abs(rotdiff) < rotlimit) {
this._rotation = rot;
} else {
rotlimit = rotlimit + 0.2;
if (rotdiff < 0) {
this._rotation = this._rotation + rotlimit;
} else {
this._rotation = this._rotation - rotlimit;
}
}
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 17);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 17);
} else {
cd = cd - 1;
if (cd == 0) {
removeMovieClip(this);
}
}
}
}
Instance of Symbol 145 MovieClip "genergy" in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
var cd = "off";
}
onClipEvent (enterFrame) {
if (this._name != "genergy") {
var xdd = (((_root.area4._x + this._x) - _root.ply._x) - 10);
var ydd = (((_root.area4._y + this._y) - _root.ply._y) - 50);
var mydistance = Math.sqrt((xdd * xdd) + (ydd * ydd));
if ((mydistance < 30) and (cd == "off")) {
var cd = 12;
this.gotoAndPlay(2);
}
if (cd == "off") {
var rot = ((Math.atan2(((_root.area4._y + this._y) - _root.ply._y) - 50, ((_root.area4._x + this._x) - _root.ply._x) - 10) * 180) / Math.PI);
this._rotation = rot;
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 25);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 25);
} else {
cd = cd - 1;
if (cd == 0) {
removeMovieClip(this);
}
}
}
}
Instance of Symbol 149 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _root.area3.wk1._x;
this._y = _root.area3.wk1._y;
this.gotoAndStop(_root.area3.wk1._currentframe);
if (_root.area3.wk1.shoot == true) {
this.gun.gotoAndStop(1);
} else {
this.gun.gotoAndStop(2);
}
}
Instance of Symbol 149 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _root.area3.wk2._x;
this._y = _root.area3.wk2._y;
this.gotoAndStop(_root.area3.wk2._currentframe);
if (_root.area3.wk2.shoot == true) {
this.gun.gotoAndStop(1);
} else {
this.gun.gotoAndStop(2);
}
}
Instance of Symbol 149 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _root.area3.wk3._x;
this._y = _root.area3.wk3._y;
this.gotoAndStop(_root.area3.wk3._currentframe);
if (_root.area3.wk3.shoot == true) {
this.gun.gotoAndStop(1);
} else {
this.gun.gotoAndStop(2);
}
}
Instance of Symbol 137 MovieClip "blk" in Symbol 252 MovieClip Frame 1
onClipEvent (load) {
var destroy = 0;
var cd = 0;
if (run == "true") {
if (_root.checkCollision(this, _root.ply.body.tooleft) or _root.checkCollision(this, _root.ply.body.tooright)) {
_global.run = false;
removeMovieClip(this);
}
}
}
onClipEvent (enterFrame) {
_root.blkaction(this._name);
}
Symbol 263 MovieClip Frame 1
if (walking == "off") {
stop();
}
Symbol 273 MovieClip Frame 24
gotoAndPlay (2);
Symbol 285 MovieClip Frame 110
_global.cr = "off";
Symbol 298 MovieClip Frame 64
stop();
Symbol 300 MovieClip Frame 78
_global.bstage = 1;
Instance of Symbol 311 MovieClip in Symbol 313 MovieClip Frame 1
onClipEvent (load) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((makeblocks == "on") or (cooldown > -10)) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
Instance of Symbol 313 MovieClip in Symbol 315 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply.bod)) {
_global.knockdown = "on";
}
}
Instance of Symbol 313 MovieClip in Symbol 315 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply.bod)) {
_global.knockdown = "on";
}
}
Instance of Symbol 313 MovieClip in Symbol 315 MovieClip Frame 5
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply.bod)) {
_global.knockdown = "on";
if (_root.area3.boss._currentframe == 8) {
_global.side2 = "left";
} else {
_global.side2 = "right";
}
}
}
Instance of Symbol 313 MovieClip in Symbol 315 MovieClip Frame 5
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply.bod)) {
_global.knockdown = "on";
if (_root.area3.boss._currentframe == 8) {
_global.side2 = "left";
} else {
_global.side2 = "right";
}
}
}
Instance of Symbol 313 MovieClip in Symbol 315 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply.bod)) {
_global.knockdown = "on";
if (_root.area3.boss._currentframe == 8) {
_global.side2 = "right";
} else {
_global.side2 = "left";
}
}
}
Instance of Symbol 313 MovieClip in Symbol 315 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply.bod)) {
_global.knockdown = "on";
if (_root.area3.boss._currentframe == 8) {
_global.side2 = "right";
} else {
_global.side2 = "left";
}
}
}
Symbol 315 MovieClip Frame 32
_global.bstage = 2;
Symbol 315 MovieClip Frame 51
_global.bstage = 3;
Symbol 321 MovieClip Frame 31
_global.bstage = 10;
Symbol 321 MovieClip Frame 83
_global.bstage = 11;
Symbol 325 MovieClip Frame 12
stop();
Symbol 326 MovieClip Frame 1
_global.encount = -1;
Instance of Symbol 180 MovieClip "enar" in Symbol 326 MovieClip Frame 1
onClipEvent (load) {
var timer = 85;
this._alpha = 100;
this.gotoAndStop(1);
var destroy = "off";
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 4);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 4);
}
onClipEvent (enterFrame) {
_root.araction(this._name);
}
Instance of Symbol 322 MovieClip "boss" in Symbol 326 MovieClip Frame 1
onClipEvent (load) {
var begincycle = true;
var fr = 2;
var oldx = this._x;
var hurt = 0;
var health = 49;
var oldy = this._y;
}
onClipEvent (enterFrame) {
if (health > 1) {
if (hurt == 0) {
if (_root.checkCollision(this, _root.area2)) {
hurt = 7;
health--;
}
} else {
hurt--;
}
if (begincycle == true) {
begincycle = "done";
dir = "left";
cond = 2;
act = 3;
fr = 3;
blimit = 0;
countdown = 10;
}
this.gotoAndStop(fr);
if ((cond == 2) or (cond == 3)) {
if (dir == "left") {
if (this._x > -626) {
this._x = this._x - 13;
} else {
dir = "stop";
var fdir = "left";
}
} else if (dir == "right") {
if (this._x <= -626) {
this._x = this._x + 13;
} else {
dir = "stop";
var fdir = "right";
}
}
}
if (cond == 1) {
if (dir == "left") {
if (this._x > -1058) {
this._x = this._x - 13;
} else {
dir = "stop";
var fdir = "right";
}
} else if (dir == "right") {
if (this._x < 300) {
this._x = this._x + 13;
} else {
dir = "stop";
var fdir = "left";
}
}
}
if ((dir == "stop") and (countdown > 0)) {
countdown = countdown - 1;
}
if (countdown == 0) {
mtime = mtime - 1;
if (act == 1) {
act = 0;
cond = 0;
if (encount < 1) {
fr = 5;
_global.cr = "on";
} else if (this._x < 0) {
fr = 11;
} else {
fr = 10;
}
}
if (act == 2) {
fr = 6;
_root.spawnenbullet(this._x - 30, this._y + 52, blimit, "bar");
_root.spawnenbullet(this._x + 40, this._y + 52, 180 + blimit, "bar");
blimit = blimit + 12;
if (blimit == 360) {
blimit = 0;
cond = 1;
dir = fdir;
fr = 3;
act = 1;
countdown = 10;
}
}
if (act == 3) {
fr = 7;
act = 0;
_global.bstage = 0;
}
}
if (bstage == 1) {
oldx = this._x;
oldy = this._y;
if (side2 == "left") {
fr = 9;
this._x = ((-1 * _root.area2._x) + _root.ply._x) - 110;
} else {
fr = 8;
this._x = ((-1 * _root.area2._x) + _root.ply._x) + 110;
}
this._y = ((-1 * _root.area2._y) + _root.ply._y) - 10;
_global.bstage = 1.5;
} else if (bstage == 2) {
this._x = oldx;
this._y = oldy;
_global.bstage = 2.5;
} else if (bstage == 3) {
_global.bstage = 0;
dir = fdir;
act = 1;
countdown = 10;
cond = 1;
fr = 3;
}
if ((fr == 5) and (cr == "off")) {
_root.spawnenbullet(this._x - 110, this._y + 100, 0, "bows");
fr = 3;
dir = fdir;
cond = Math.round(Math.random()) + 2;
countdown = 10;
act = cond;
}
if (bstage == 10) {
if (fr == 10) {
_root.spawnenergy(this._x + 25, this._y + 55, 2);
} else {
_root.spawnenergy(this._x - 25, this._y + 55, 2);
}
}
if (bstage == 11) {
_global.bstage = 0;
fr = 3;
dir = fdir;
cond = Math.round(Math.random()) + 2;
countdown = 10;
act = cond;
}
} else {
_root.play();
}
}
Instance of Symbol 325 MovieClip "bar" in Symbol 326 MovieClip Frame 1
onClipEvent (load) {
var timer = 85;
this._alpha = 100;
this.gotoAndPlay(1);
var destroy = "off";
if (this._name == "bar") {
this.stop();
}
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 4);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 4);
}
onClipEvent (enterFrame) {
if (destroy == "on") {
removeMovieClip(this);
} else if (destroy == "ready") {
var destroy = "ready2";
this._alpha = this._alpha - 20;
} else if (destroy == "ready2") {
var destroy = "ready3";
this._alpha = this._alpha - 20;
} else if (destroy == "ready3") {
var destroy = "ready4";
this._alpha = this._alpha - 20;
} else if (destroy == "ready4") {
var destroy = "on";
}
timer = timer - 1;
if (timer == 0) {
removeMovieClip(this);
}
_global.rot = this._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if (destroy == "off") {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 13);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 13);
if (_root.checkCollision(_root.area, this)) {
var destroy = "ready";
}
if (destroy == "off") {
if (_root.checkCollision(_root.ply.bod, this)) {
_global.health = _global.health - 1;
var destroy = "ready";
this.gotoAndStop(2);
}
}
}
}
Instance of Symbol 197 MovieClip "bows" in Symbol 326 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 12;
if (this._name != "bows") {
var chase = true;
} else {
this.stop();
}
_global.encount = _global.encount + 1;
var hurt = 0;
var health = 2;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = false;
}
onClipEvent (enterFrame) {
if (this._name != "bows") {
if ((bstage == 10) and (health > 0)) {
health = 0;
}
_root.bowaction(this._name);
}
}
Symbol 331 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 364
_root.play();
Instance of Symbol 352 MovieClip in Symbol 354 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.area._x < -6400) {
_root.play();
}
}
Symbol 356 MovieClip Frame 225
_root.play();
Symbol 360 MovieClip Frame 1
stop();
Symbol 362 MovieClip Frame 20
stop();
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 19
_parent.gotoAndStop(2);
Symbol 374 MovieClip Frame 54
_parent.gotoAndStop(2);
Symbol 383 MovieClip Frame 54
_parent.gotoAndStop(2);
Symbol 388 MovieClip Frame 39
_root.golemmade = 0;
_root.lvl.violet._alpha = 100;
Symbol 388 MovieClip Frame 40
_root.golemmade = 0;
_root.lvl.violet._alpha = 100;
Symbol 388 MovieClip Frame 41
stop();
_parent._x = -5000;
_parent.gotoAndStop(1);
Symbol 389 MovieClip Frame 10
_parent.gotoAndStop(2);
Symbol 390 MovieClip Frame 10
_parent.gotoAndStop(3);
Symbol 392 MovieClip Frame 1
stop();
Instance of Symbol 383 MovieClip in Symbol 392 MovieClip Frame 4
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply)) {
_global.health = _global.health - 0.6;
_global.knockdown = "on";
_global.side2 = "right";
}
}
Instance of Symbol 383 MovieClip in Symbol 392 MovieClip Frame 5
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply)) {
_global.health = _global.health - 0.6;
_global.knockdown = "on";
_global.side2 = "left";
}
}
Instance of Symbol 180 MovieClip "enar" in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var timer = 85;
this._alpha = 100;
this.gotoAndStop(1);
var destroy = "off";
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 4);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 4);
}
onClipEvent (enterFrame) {
_root.araction(this._name);
}
Instance of Symbol 360 MovieClip "enblt" in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var timer = 80;
this._alpha = 100;
this.gotoAndStop(1);
var destroy = "off";
this._x = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * 4);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 4);
}
onClipEvent (enterFrame) {
if (destroy == "on") {
removeMovieClip(this);
} else if (destroy == "ready") {
var destroy = "on";
}
timer = timer - 1;
if (timer == 0) {
removeMovieClip(this);
}
_global.rot = this._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
this._x = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * 19);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 19);
if (_root.checkCollision(_root.area, this) and (destroy == "off")) {
var destroy = "ready";
this.gotoAndStop(2);
}
if (_root.checkCollision(_root.ply.bod, this) and (destroy == "off")) {
var destroy = "ready";
this.gotoAndStop(2);
}
}
Instance of Symbol 197 MovieClip "bow1" in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 12;
var chase = false;
var hurt = 0;
var health = 2;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = false;
}
onClipEvent (enterFrame) {
_root.bowaction(this._name);
}
Instance of Symbol 362 MovieClip "missl" in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var rot = 0;
var destroy = 0;
var hea = 0;
var orot = this._rotation;
var timer = 200;
this._x = this._x - (Math.cos((orot * Math.PI) / 180) * 40);
this._y = this._y - (Math.sin((orot * Math.PI) / 180) * 40);
}
onClipEvent (enterFrame) {
if (_root.checkCollision(_root.ply.bod, this) and (destroy == 0)) {
var destroy = 13;
_global.health = _global.health - 1;
this.gotoAndPlay(21);
}
if (destroy > 0) {
destroy--;
if (destroy == 0) {
_root.spawnenergy(this._x, this._y, 3);
removeMovieClip(this);
}
} else {
if (_root.checkCollision(this, _root.area) == false) {
if (hea > 0) {
hea--;
}
this._x = this._x - (Math.cos((orot * Math.PI) / 180) * 7);
this._y = this._y - (Math.sin((orot * Math.PI) / 180) * 7);
} else {
if (hea < 20) {
hea++;
}
if (hea == 20) {
removeMovieClip(this);
}
}
this.gotoAndStop(hea + 1);
timer--;
if (timer == 0) {
removeMovieClip(this);
}
}
}
Instance of Symbol 239 MovieClip "wk1" in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 3;
var hit = 0;
var oldx = this._x;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
_root.solaction(this._name);
}
Instance of Symbol 197 MovieClip "bows" in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 12;
var chase = false;
var hurt = 0;
var health = 2;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = false;
}
onClipEvent (enterFrame) {
_root.bowaction(this._name);
}
Instance of Symbol 239 MovieClip "wk2" in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 3;
var hit = 0;
var oldx = this._x;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
_root.solaction(this._name);
}
Instance of Symbol 205 MovieClip in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var chase = false;
}
onClipEvent (enterFrame) {
if (chase == false) {
if (Math.abs(Math.sqrt((((_root.area2._y + this._y) - _root.ply._y) * ((_root.area2._y + this._y) - _root.ply._y)) + (((_root.area2._x + this._x) - _root.ply._x) * ((_root.area2._x + this._x) - _root.ply._x)))) < 200) {
chase = true;
this.play();
}
}
}
Instance of Symbol 392 MovieClip in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
this.stop();
var hurt = 0;
var health = 4;
var hit = 0;
var oldx = this._x;
}
onClipEvent (enterFrame) {
_root.gaction(this._name);
}
Instance of Symbol 392 MovieClip in Symbol 393 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
this.stop();
var hurt = 0;
var health = 4;
var hit = 0;
var oldx = this._x;
}
onClipEvent (enterFrame) {
_root.gaction(this._name);
}
Instance of Symbol 137 MovieClip "blk" in Symbol 416 MovieClip Frame 1
onClipEvent (load) {
var destroy = "off";
var cd = 0;
if (run == "true") {
if (_root.checkCollision(this, _root.ply.body.tooleft) or _root.checkCollision(this, _root.ply.body.tooright)) {
_global.run = false;
removeMovieClip(this);
}
}
if (_root.checkCollision(this, _root.area2)) {
var destroy = "on";
this.gotoAndPlay(2);
} else if (_root.checkCollision(this, _root.area3)) {
var destroy = "on";
this.gotoAndPlay(2);
}
}
onClipEvent (enterFrame) {
if (destroy != "off") {
if (_root.checkCollision(this, _root.ply.body)) {
removeMovieClip(this);
}
}
if (destroy == "on") {
destroy = "ready";
cd = 13;
_root.spawngenergy(this._x, this._y, 1);
}
if (destroy == "ready") {
cd--;
} else if (_root.checkCollision(this, _root.area2)) {
var destroy = "on";
this.gotoAndPlay(2);
} else if (_root.checkCollision(this, _root.area3)) {
var destroy = "on";
this.gotoAndPlay(2);
}
if ((destroy == "ready") and (cd == 0)) {
removeMovieClip(this);
}
}
Symbol 421 MovieClip Frame 156
_root.play();
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 423 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 425 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.area._x < -1940) and (_root.area._y > -10)) {
_root.play();
}
}
Symbol 428 MovieClip Frame 1
stop();
Instance of Symbol 383 MovieClip in Symbol 428 MovieClip Frame 4
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply)) {
_global.health = _global.health - 0.6;
_global.knockdown = "on";
_global.side2 = "right";
}
}
Instance of Symbol 383 MovieClip in Symbol 428 MovieClip Frame 5
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply)) {
_global.health = _global.health - 0.6;
_global.knockdown = "on";
_global.side2 = "left";
}
}
Instance of Symbol 180 MovieClip "enar" in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var timer = 105;
this.gotoAndStop(1);
var destroy = "off";
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 4);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 4);
}
onClipEvent (enterFrame) {
_root.araction(this._name);
}
Instance of Symbol 239 MovieClip "wk1" in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 3;
var hit = 0;
var oldx = this._x;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
_root.solaction(this._name);
}
Instance of Symbol 197 MovieClip "bows" in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 12;
var chase = false;
var hurt = 0;
var health = 2;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = false;
}
onClipEvent (enterFrame) {
_root.bowaction(this._name);
}
Instance of Symbol 239 MovieClip "wk3" in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 3;
var hit = 0;
var oldx = this._x;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
_root.solaction(this._name);
}
Instance of Symbol 392 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
this.stop();
var hurt = 0;
var health = 4;
var hit = 0;
var oldx = this._x;
}
onClipEvent (enterFrame) {
_root.gaction(this._name);
}
Instance of Symbol 392 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 4;
var hit = 0;
var oldx = this._x;
var oldy = this._y;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
if (health > -55) {
shoot = true;
if (health <= 0) {
if (cooldown == 0) {
_root.spawnenergy(this._x, this._y, 1);
cooldown = 3;
} else {
cooldown--;
}
if (health == 0) {
_global.blklimit = _global.blklimit + 1;
var chase = "off";
shoot = false;
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > this._x) {
this.gotoAndStop(6);
} else {
this.gotoAndStop(7);
}
}
health--;
} else if ((chase == "on") and (Math.abs(Math.sqrt((((_root.area2._y + this._y) - _root.ply._y) * ((_root.area2._y + this._y) - _root.ply._y)) + (((_root.area2._x + this._x) - _root.ply._x) * ((_root.area2._x + this._x) - _root.ply._x)))) < 700)) {
if (this._currentframe != 1) {
if (hurt == 0) {
if (_root.checkCollision(this.body, _root.area2) and (health > 0)) {
var hurt = 10;
health--;
}
}
if (hurt > 0) {
hurt--;
this.bod.gotoAndStop(2);
if (hurt == 9) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > this._x) {
this.gotoAndStop(8);
} else {
this.gotoAndStop(9);
}
}
} else {
this.bod.gotoAndStop(1);
if ((this._currentframe != 4) and (this._currentframe != 5)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 7) - this._x) < 170) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 7) > this._x) {
this.gotoAndStop(5);
} else {
this.gotoAndStop(4);
}
} else if (hit <= 0) {
if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > this._x) {
shoot = false;
this._x = this._x + 7.5;
this.gotoAndStop(2);
} else {
shoot = false;
this._x = this._x - 7.5;
this.gotoAndStop(3);
}
}
if ((_root.checkCollision(this.bod, _root.area) or (_root.checkCollision(this.grd, _root.area.ground) == false)) or (yenter < 45)) {
this._x = oldx;
shoot = true;
if ((((-1 * _root.area3._x) + _root.ply._x) + 7) > this._x) {
this.gotoAndStop(5);
shoot = true;
} else {
this.gotoAndStop(4);
shoot = true;
}
} else {
hit--;
if (hit <= 0) {
oldx = this._x;
} else {
shoot = true;
this._x = oldx;
}
}
}
}
}
} else {
this.stop();
if (Math.abs(Math.sqrt((((_root.area2._y + this._y) - _root.ply._y) * ((_root.area2._y + this._y) - _root.ply._y)) + ((((_root.area2._x + this._x) - _root.ply._x) + 5) * (((_root.area2._x + this._x) - _root.ply._x) + 5)))) < 250) {
var chase = "on";
this.body.play();
}
}
if (shoot == true) {
gunprog = gunprog + 1;
} else {
gunprog = 1;
}
}
}
Instance of Symbol 392 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
this.stop();
var hurt = 0;
var health = 4;
var hit = 0;
var oldx = this._x;
}
onClipEvent (enterFrame) {
_root.gaction(this._name);
}
Instance of Symbol 428 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
this.stop();
var hurt = 0;
var health = 4;
var hit = 0;
var oldx = this._x;
}
onClipEvent (enterFrame) {
_root.gaction(this._name);
}
Instance of Symbol 239 MovieClip "wk2" in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
var gunprog = 1;
this.stop();
var shoot = false;
var hurt = 0;
var health = 3;
var hit = 0;
var oldx = this._x;
var oldrot = this._rotation;
var fire = "off";
}
onClipEvent (enterFrame) {
_root.solaction(this._name);
}
Instance of Symbol 392 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var chase = "off";
this.stop();
var hurt = 0;
var health = 4;
var hit = 0;
var oldx = this._x;
}
onClipEvent (enterFrame) {
_root.gaction(this._name);
}
Symbol 480 MovieClip Frame 1
stop();
Instance of Symbol 432 MovieClip in Symbol 480 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.jak)) {
_root.menu.life.nextFrame();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.jak)) {
if (_root.jak._xscale > 0) {
_root.ground._x = _root.ground._x + 30;
} else {
_root.ground._x = _root.ground._x - 30;
}
}
}
Symbol 480 MovieClip Frame 2
stop();
Symbol 480 MovieClip Frame 3
stop();
Symbol 480 MovieClip Frame 4
stop();
Symbol 480 MovieClip Frame 5
stop();
Symbol 480 MovieClip Frame 33
stop();
Instance of Symbol 480 MovieClip "boulder" in Symbol 481 MovieClip Frame 1
onClipEvent (load) {
var hurt = 0;
}
onClipEvent (enterFrame) {
if ((hurt == 0) and (this._currentframe < 6)) {
if (_root.checkCollision(this, _root.area2)) {
this.play();
hurt = 9;
}
}
if (hurt > 0) {
hurt--;
}
}
Instance of Symbol 480 MovieClip in Symbol 481 MovieClip Frame 1
onClipEvent (load) {
var hurt = 0;
}
onClipEvent (enterFrame) {
if ((hurt == 0) and (this._currentframe < 6)) {
if (_root.checkCollision(this, _root.area2)) {
this.play();
hurt = 9;
}
}
if (hurt > 0) {
hurt--;
}
}
Instance of Symbol 137 MovieClip "blk" in Symbol 482 MovieClip Frame 1
onClipEvent (load) {
var destroy = "off";
var cd = 0;
if (run == "true") {
if (_root.checkCollision(this, _root.ply.body.tooleft) or _root.checkCollision(this, _root.ply.body.tooright)) {
_global.run = false;
removeMovieClip(this);
}
}
if (_root.checkCollision(this, _root.area2)) {
var destroy = "on";
this.gotoAndPlay(2);
} else if (_root.checkCollision(this, _root.area3)) {
var destroy = "on";
this.gotoAndPlay(2);
}
}
onClipEvent (enterFrame) {
if (destroy != "off") {
if (_root.checkCollision(this, _root.ply.body)) {
removeMovieClip(this);
}
}
if (destroy == "on") {
destroy = "ready";
cd = 13;
_root.spawngenergy(this._x, this._y, 1);
}
if (destroy == "ready") {
cd--;
} else if (_root.checkCollision(this, _root.area2)) {
var destroy = "on";
this.gotoAndPlay(2);
} else if (_root.checkCollision(this, _root.area3)) {
var destroy = "on";
this.gotoAndPlay(2);
}
if ((destroy == "ready") and (cd == 0)) {
removeMovieClip(this);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 488 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.checkCollision(this, _root.ply)) {
_global.health = _global.health - 2;
}
}
Instance of Symbol 55 MovieClip "blt" in Symbol 491 MovieClip Frame 1
onClipEvent (load) {
var timer = 19;
var s = (blspd / 2);
var d = bldrop;
this.stop();
if (this._name != "blt") {
this.play();
}
var destroy = "off";
this._x = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * 0.3);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 0.3);
}
onClipEvent (enterFrame) {
if (destroy == "on") {
removeMovieClip(this);
} else if (destroy == "ready") {
destroy = "ready2";
} else if (destroy == "ready2") {
destroy = "ready3";
} else if (destroy == "ready3") {
destroy = "ready4";
} else if (destroy == "ready4") {
destroy = "on";
} else {
timer = timer - 1;
if (timer == 0) {
removeMovieClip(this);
}
_global.rot = this._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if ((_root.checkCollision(_root.area, this) or _root.checkCollision(_root.area3, this)) and (destroy == "off")) {
destroy = "ready";
this.gotoAndPlay(2);
} else {
this._x = this._x + ((Math.cos(((this._rotation + 90) * Math.PI) / 180) * 19) + s);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 19);
if ((_root.checkCollision(_root.area, this) or _root.checkCollision(_root.area3, this)) and (destroy == "off")) {
destroy = "ready";
this.gotoAndPlay(2);
} else {
this._x = this._x + ((Math.cos(((this._rotation + 90) * Math.PI) / 180) * 19) + s);
this._y = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * 19);
}
}
}
}
Symbol 495 MovieClip Frame 12
stop();
Symbol 504 MovieClip Frame 1
function control() {
if (hasControls == true) {
if (currentXLocations[index + 1] != undefined) {
_x = currentXLocations[index];
_y = currentYLocations[index];
_rotation = currentRotations[index];
index++;
return(undefined);
}
hasControls = false;
}
}
hasControls = false;
index = 0;
Symbol 510 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 1
stop();
Symbol 517 MovieClip Frame 1
stop();
Instance of Symbol 495 MovieClip "enar" in Symbol 519 MovieClip Frame 1
onClipEvent (load) {
var timer = 145;
this._alpha = 100;
this.gotoAndPlay(1);
var destroy = "off";
if (this._name == "enar") {
this.stop();
}
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 4);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 4);
}
onClipEvent (enterFrame) {
if (blockclear == true) {
destroy = "ready";
}
if (destroy == "on") {
removeMovieClip(this);
} else if (destroy == "ready") {
var destroy = "ready2";
this._alpha = this._alpha - 20;
} else if (destroy == "ready2") {
var destroy = "ready3";
this._alpha = this._alpha - 20;
} else if (destroy == "ready3") {
var destroy = "ready4";
this._alpha = this._alpha - 20;
} else if (destroy == "ready4") {
var destroy = "on";
}
timer = timer - 1;
if (timer == 0) {
removeMovieClip(this);
}
_global.rot = this._rotation;
if (rot < 0) {
_global.rot = _global.rot + 360;
}
if (destroy == "off") {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 13);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 13);
if (_root.checkCollision(_root.area, this)) {
var destroy = "ready";
}
if (destroy == "off") {
if (_root.checkCollision(_root.ply.bod, this)) {
_global.health = _global.health - 0.5;
var destroy = "ready";
this.gotoAndStop(13);
}
}
}
}
Instance of Symbol 518 MovieClip "boss" in Symbol 519 MovieClip Frame 1
onClipEvent (load) {
var cooldown = 0;
var act = 1;
var hurt = 0;
var mtimer = 90;
var boost = 1;
var timer = 0;
var rot = 0;
var orot = 0;
var health = 30;
var fire = false;
var oldx = this._x;
var oldy = this._y;
}
onClipEvent (enterFrame) {
if (health == 0) {
stopAllSounds();
_root.play();
}
if (cooldown > 0) {
cooldown--;
}
if (hurt == 0) {
if (_root.checkCollision(this, _root.area2)) {
hurt = 7;
health--;
}
} else {
hurt--;
}
if (act == 1) {
if (((_root.area3._x + this._x) - _root.ply._x) > 0) {
this.bod.gotoAndStop(2);
} else {
this.bod.gotoAndStop(1);
}
boost = 1;
if (Math.abs(Math.sqrt((((_root.area2._y + this._y) - _root.ply._y) * ((_root.area2._y + this._y) - _root.ply._y)) + (((_root.area2._x + this._x) - _root.ply._x) * ((_root.area2._x + this._x) - _root.ply._x)))) < 250) {
if (fire == false) {
rot = (Math.atan2(((_root.area2._y + this._y) - _root.ply._y) - 50, ((_root.area2._x + this._x) - _root.ply._x) - 15) * 180) / Math.PI;
if (rot < 0) {
rot = rot + 360;
}
orot = rot;
fire = true;
}
} else if (Math.abs(Math.sqrt((((_root.area2._y + this._y) - _root.ply._y) * ((_root.area2._y + this._y) - _root.ply._y)) + (((_root.area2._x + this._x) - _root.ply._x) * ((_root.area2._x + this._x) - _root.ply._x)))) > 450) {
act = 2;
fire = false;
}
} else if (act == 2) {
boost = 2.9;
if (((_root.area3._x + this._x) - _root.ply._x) > 0) {
this.bod.gotoAndStop(4);
} else {
this.bod.gotoAndStop(3);
}
if (Math.abs(Math.sqrt((((_root.area2._y + this._y) - _root.ply._y) * ((_root.area2._y + this._y) - _root.ply._y)) + (((_root.area2._x + this._x) - _root.ply._x) * ((_root.area2._x + this._x) - _root.ply._x)))) < 285) {
act = 1;
}
}
if ((fire == false) or (act != 1)) {
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 12) - this._x) < (5 * boost)) {
this._x = ((-1 * _root.area2._x) + _root.ply._x) + 12;
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > this._x) {
this._x = this._x + (5 * boost);
} else {
this._x = this._x - (5 * boost);
}
if (_root.checkCollision(this.bod, _root.area.ground)) {
this._x = oldx;
boost = 1;
} else {
oldx = this._x;
}
if (Math.abs((((-1 * _root.area2._y) + _root.ply._y) + 35) - this._y) < (4 * boost)) {
this._y = ((-1 * _root.area2._y) + _root.ply._y) + 35;
} else if ((((-1 * _root.area2._y) + _root.ply._y) + 35) > this._y) {
this._y = this._y + (4 * boost);
} else {
this._y = this._y - (4 * boost);
}
if (_root.checkCollision(this.bod, _root.area.ground)) {
this._y = oldy;
boost = 1;
} else {
oldy = this._y;
}
} else {
boost = 0.1;
if (Math.abs((((-1 * _root.area2._y) + _root.ply._y) + 35) - this._y) < (4 * boost)) {
this._y = ((-1 * _root.area2._y) + _root.ply._y) + 35;
} else if ((((-1 * _root.area2._y) + _root.ply._y) + 35) > this._y) {
this._y = this._y + (4 * boost);
} else {
this._y = this._y - (4 * boost);
}
if (_root.checkCollision(this.bod, _root.area.ground)) {
this._y = oldy;
boost = 1.1;
} else {
oldy = this._y;
}
if (Math.abs((((-1 * _root.area2._x) + _root.ply._x) + 12) - this._x) < (5 * boost)) {
this._x = ((-1 * _root.area2._x) + _root.ply._x) + 12;
} else if ((((-1 * _root.area2._x) + _root.ply._x) + 12) > this._x) {
this._x = this._x + (5 * boost);
} else {
this._x = this._x - (5 * boost);
}
if (_root.checkCollision(this.bod, _root.area.ground)) {
this._x = oldx;
} else {
oldx = this._x;
}
if (cooldown <= 0) {
if (orot < 0) {
orot = orot + 360;
}
rot = (Math.atan2(((_root.area2._y + this._y) - _root.ply._y) - 50, ((_root.area2._x + this._x) - _root.ply._x) - 12) * 180) / Math.PI;
if (rot < 0) {
rot = rot + 360;
}
if ((Math.abs(rot - orot) < 10) or (Math.abs((rot - orot) - 360) > 10)) {
orot = rot;
} else {
_root.checker(rot);
_root.checker(orot);
if (((rot - orot) > 180) or ((orot > rot) and ((orot - rot) < 180))) {
orot = orot - 10;
} else {
orot = orot + 10;
}
}
_root.spawnenbullet(this._x, this._y, orot, "enar");
this.bod.eye1.gotoAndPlay(2);
this.bod.eye2.gotoAndPlay(2);
cooldown = 5;
}
}
this.bod.play();
}
Instance of Symbol 480 MovieClip in Symbol 521 MovieClip Frame 1
onClipEvent (load) {
var hurt = 0;
}
onClipEvent (enterFrame) {
if ((hurt == 0) and (this._currentframe < 6)) {
if (_root.checkCollision(this, _root.area2)) {
this.play();
hurt = 10;
}
}
if (hurt > 0) {
hurt--;
}
}
Instance of Symbol 137 MovieClip "blk" in Symbol 522 MovieClip Frame 1
onClipEvent (load) {
var destroy = 0;
var cd = 0;
if (run == "true") {
if (_root.checkCollision(this, _root.ply.body.tooleft) or _root.checkCollision(this, _root.ply.body.tooright)) {
_global.run = false;
removeMovieClip(this);
}
}
}
onClipEvent (enterFrame) {
if ((blockclear == true) and (destroy == 0)) {
destroy = 1;
}
_root.blkaction(this._name);
}
Instance of Symbol 143 MovieClip "energy" in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
var rotlimit = 12;
if (_root.ply._alpha < 100) {
removeMovieClip(this);
_global.imbalance = 0;
}
var cd = "off";
_global.imbalance = _global.imbalance + 1;
}
onClipEvent (enterFrame) {
if (this._name != "energy") {
var xdd = (((_root.area4._x + this._x) - _root.ply._x) - 10);
var ydd = (((_root.area4._y + this._y) - _root.ply._y) - 50);
var mydistance = Math.sqrt((xdd * xdd) + (ydd * ydd));
if ((mydistance < 35) and (cd == "off")) {
var cd = 12;
_global.imbalance = _global.imbalance - 1;
this.gotoAndPlay(2);
}
if (cd == "off") {
var rot = ((Math.atan2(((_root.area4._y + this._y) - _root.ply._y) - 50, ((_root.area4._x + this._x) - _root.ply._x) - 10) * 180) / Math.PI);
var rotdiff = (this._rotation - rot);
if (rotdiff >= 180) {
rotdiff = rotdiff - 360;
}
if (rotdiff <= -180) {
rotdiff = rotdiff + 360;
}
if (Math.abs(rotdiff) < rotlimit) {
this._rotation = rot;
} else {
rotlimit = rotlimit + 0.2;
if (rotdiff < 0) {
this._rotation = this._rotation + rotlimit;
} else {
this._rotation = this._rotation - rotlimit;
}
}
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 17);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 17);
} else {
cd = cd - 1;
if (cd == 0) {
removeMovieClip(this);
}
}
}
}
Instance of Symbol 145 MovieClip "genergy" in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
var cd = "off";
}
onClipEvent (enterFrame) {
if (this._name != "genergy") {
var xdd = (((_root.area4._x + this._x) - _root.ply._x) - 10);
var ydd = (((_root.area4._y + this._y) - _root.ply._y) - 50);
var mydistance = Math.sqrt((xdd * xdd) + (ydd * ydd));
if ((mydistance < 30) and (cd == "off")) {
var cd = 12;
this.gotoAndPlay(2);
}
if (cd == "off") {
var rot = ((Math.atan2(((_root.area4._y + this._y) - _root.ply._y) - 50, ((_root.area4._x + this._x) - _root.ply._x) - 10) * 180) / Math.PI);
this._rotation = rot;
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * 25);
this._y = this._y - (Math.sin((this._rotation * Math.PI) / 180) * 25);
} else {
cd = cd - 1;
if (cd == 0) {
removeMovieClip(this);
}
}
}
}
Symbol 525 MovieClip Frame 1
stop();
Symbol 525 MovieClip Frame 29
Symbol 528 MovieClip Frame 2
stop();
Symbol 530 MovieClip Frame 1
function control() {
if (hasControls == true) {
if (currentXLocations[index + 1] != undefined) {
_x = currentXLocations[index];
_y = currentYLocations[index];
_rotation = currentRotations[index];
index++;
return(undefined);
}
hasControls = false;
}
}
hasControls = false;
index = 0;
Symbol 531 MovieClip Frame 1
stop();
Symbol 532 MovieClip Frame 1
stop();
Symbol 544 MovieClip Frame 1
stop();
Instance of Symbol 486 MovieClip in Symbol 549 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 549 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 549 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 486 MovieClip in Symbol 549 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.screen)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Symbol 549 MovieClip Frame 444
_root.play();
Symbol 551 Button
on (release) {
gotoAndStop (2);
_global.gomen = true;
}
Symbol 552 MovieClip Frame 93
stop();