Frame 1
copyright1 = "2005 4T2 Multimedia Ltd";
copyright2 = "www.4T2.co.uk";
copyright3 = "Enjoy the code ripper boy - let us know how you get on with it!";
gotoAndPlay (200);
Frame 201
var i = 5000;
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:75, td:"4T2.75.memecounter.com"};
System.security.allowDomain(kv_mc.kv_v.td);
kv_mc.kv_v.c_so = SharedObject.getLocal(kv_mc.kv_v.c, "/");
kv_mc.kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_mc.kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_mc.kv_v.lurl = ((((((((((("http://" + kv_mc.kv_v.td) + "/tracker.php") + "?c=") + kv_mc.kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_mc.kv_v.d) + "&u=") + (kv_mc.kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_mc.kv_v.fpv;
kv_mc.kv_v.c_so.data.u = true;
kv_v.c_so.flush();
kv_mc.kv_v.t_mc = kv_mc.createEmptyMovieClip("kv_tracker", 0);
kv_mc.kv_v.l_mcl = new MovieClipLoader();
if (kv_mc.kv_v.l_mcl.loadClip) {
kv_mc.kv_v.l_mcl.loadClip(kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
} else {
loadMovie (kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
}
function rand(Rstart, Rfinish) {
return(random((Rfinish - Rstart) + 1) + Rstart);
}
function encrypter(original, seed) {
var checksum = 0;
var _local3 = 0;
while (_local3 <= original.length) {
if (!isNaN(original.substr(_local3, 1))) {
checksum = checksum + parseInt(original.substr(_local3, 1), 10);
}
_local3++;
}
if (checksum < 10) {
checksum = String("0000" + checksum);
} else if (checksum < 100) {
checksum = String("000" + checksum);
} else if (checksum < 1000) {
checksum = String("00" + checksum);
} else if (checksum < 10000) {
checksum = String("0" + checksum);
}
var _local1 = String((("ROB" + seed) + original) + checksum);
var _local2 = rand(5, (_local1.length / 2) - 1);
var splitMiddle = rand(8, (_local1.length / 2) - 1);
if ((splitMiddle == _local2) || (splitMiddle == (_local2 * 3))) {
splitMiddle--;
}
if (_local2 > 99) {
_local2 = 99;
}
if (splitMiddle > 99) {
splitMiddle = 99;
}
var splitFreq = rand(10, 99);
_local3 = 0;
while (_local3 < splitFreq) {
_local1 = (String(_local1.substr(_local2, splitMiddle)) + String(_local1.substr(0, _local2))) + String(_local1.substr(splitMiddle + _local2, _local1.length));
_local1 = String(_local1.substr(_local2, _local1.length)) + String(_local1.substring(0, _local2));
_local3++;
}
var TsplitFront = _local2;
if (TsplitFront < 10) {
TsplitFront = String("0" + TsplitFront);
}
var TsplitMiddle = splitMiddle;
if (TsplitMiddle < 10) {
TsplitMiddle = String("0" + TsplitMiddle);
}
_local1 = ((String(_local1) + String(TsplitFront)) + String(TsplitMiddle)) + String(splitFreq);
return(_local1);
}
function encrypt(original, seed) {
var _local1 = original;
var _local2 = seed;
if (_local1.length < 20) {
_local1 = ("ZQa" + _local1) + "EQZXT0123456789";
}
return(encrypter(encrypter(_local1, _local2) + encrypter(_local1, _local2), _local2));
}
function decrypter(original, seed) {
var _local1 = original;
var _local3 = Number(_local1.substr(_local1.length - 6, 2));
var splitMiddle = Number(_local1.substr(_local1.length - 4, 2));
var splitFreq = Number(_local1.substr(_local1.length - 2, 2));
_local1 = String(_local1.substr(0, _local1.length - 6));
var _local2 = 0;
while (_local2 < splitFreq) {
_local1 = _local1.substr(_local1.length - _local3) + _local1.substr(0, _local1.length - _local3);
_local1 = (_local1.substr(splitMiddle, _local3) + _local1.substring(0, splitMiddle)) + _local1.substr(splitMiddle + _local3, _local1.length);
_local2++;
}
var checksum = parseInt(_local1.substr(-5, 5), 10);
var tocheck = 0;
_local2 = 4;
while (_local2 <= (_local1.length - 5)) {
if (!isNaN(_local1.substr(_local2, 1))) {
tocheck = tocheck + parseInt(_local1.substr(_local2, 1), 10);
}
_local2++;
}
if (((_local1.substr(0, 3) == "ROB") && (_local1.substr(3, 1) == seed)) && (checksum == tocheck)) {
return(_local1.substr(4, _local1.length - 9));
}
return(false);
}
function decrypt(original, seed) {
var _local2 = decrypter(original, seed);
var _local3 = decrypter(_local2.substr(0, _local2.length / 2), seed);
var decrypt2 = decrypter(_local2.substr(_local2.length / 2), seed);
if (_local3 == decrypt2) {
var _local1 = _local3;
if (_local1.substr(0, 3) == "ZQa") {
_local1 = _local1.substr(3, _local1.length - 18);
}
return(_local1);
}
return(false);
}
function initiateTrig() {
ALLTHETRIG = new Array();
var _local1 = 0;
while (_local1 <= 360) {
ALLTHETRIG[_local1] = trigstore(_local1);
_local1++;
}
}
function Float(x, y) {
this.x = x;
this.y = y;
}
function distance(x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function trig(angle) {
var _local1 = angle;
var _local2 = Math.floor(_local1 / 360);
_local1 = _local1 - (_local2 * 360);
return(ALLTHETRIG[Math.round(_local1)]);
}
function trigstore(angle) {
var _local1 = angle;
var calc = Math.floor(_local1 / 360);
_local1 = _local1 - (calc * 360);
var _local3;
var _local2;
if ((_local1 >= 0) && (_local1 <= 90)) {
_local3 = Math.cos(rad * (90 - _local1));
_local2 = Math.sin(rad * (90 - _local1));
} else if ((_local1 > 90) and (_local1 <= 180)) {
_local3 = Math.cos(rad * (_local1 - 90));
_local2 = -Math.sin(rad * (_local1 - 90));
} else if ((_local1 > 180) and (_local1 <= 270)) {
_local3 = -Math.sin(rad * (_local1 - 180));
_local2 = -Math.cos(rad * (_local1 - 180));
} else if ((_local1 > 270) and (_local1 <= 360)) {
_local3 = -Math.cos(rad * (_local1 - 270));
_local2 = Math.sin(rad * (_local1 - 270));
}
if (Math.abs(_local3) < 1E-5) {
_local3 = 0;
}
if (Math.abs(_local2) < 1E-5) {
_local2 = 0;
}
return(new Float(_local3, _local2));
}
function limit(value, minimum, maximum) {
var _local1 = value;
if (_local1 > maximum) {
_local1 = maximum;
}
if (_local1 < minimum) {
_local1 = minimum;
}
return(_local1);
}
function reverseTrig(x, y) {
var _local1 = Math.atan(y / x) * 57.2957795130823;
if (x >= 0) {
_local1 = 90 - _local1;
} else {
_local1 = 270 - _local1;
}
if (isNaN(_local1)) {
_local1 = 0;
}
return(_local1);
}
function MIN(a, b) {
if (a < b) {
return(a);
}
return(b);
}
function MAX(a, b) {
if (a > b) {
return(a);
}
return(b);
}
function SGN(a) {
var _local1 = a;
if (_local1 > 0) {
return(1);
}
if (_local1 == 0) {
return(0);
}
if (_local1 < 0) {
return(-1);
}
return(undefined);
}
function exchangeEnergy(a, b) {
var _local1 = b;
var _local2 = a;
var dx = (_local2.posX - _local1.posX);
var dy = (_local2.posY - _local1.posY);
var dist = Math.sqrt((dx * dx) + (dy * dy));
var nabx = (dx / dist);
var naby = (dy / dist);
var tabx = (-naby);
var taby = nabx;
var vait = ((_local2.dx * tabx) + (_local2.dy * taby));
var vain = ((_local2.dx * nabx) + (_local2.dy * naby));
var vbit = ((_local1.dx * tabx) + (_local1.dy * taby));
var vbin = ((_local1.dx * nabx) + (_local1.dy * naby));
var ma = ((_local2.radius * _local2.radius) * _local2.elastic);
var _local3 = (_local1.radius * _local1.radius) * _local1.elastic;
if ((!ma) && (!_local3)) {
ma = 1;
_local3 = 1;
}
var e = 1;
var vafn = ((((_local3 * vbin) * (e + 1)) + (vain * (ma - (e * _local3)))) / (ma + _local3));
var vbfn = ((((ma * vain) * (e + 1)) - (vbin * (ma - (e * _local3)))) / (ma + _local3));
var vaft = vait;
var vbft = vbit;
var xfa = ((vafn * nabx) + (vaft * tabx));
var yfa = ((vafn * naby) + (vbft * taby));
var xfb = ((vbfn * nabx) + (vbft * tabx));
var yfb = ((vbfn * naby) + (vbft * taby));
_local2.dx = limit(xfa, -_local2.maxD, _local2.maxD);
_local2.dy = limit(yfa, -_local2.maxD, _local2.maxD);
_local1.dx = limit(xfb, -_local1.maxD, _local1.maxD);
_local1.dy = limit(yfb, -_local1.maxD, _local1.maxD);
_local2.collide = (_local1.collide = true);
}
resetColorTransform = new Object();
resetColorTransform = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
hiliteColorTransform = new Object();
hiliteColorTransform = {ra:"100", rb:"255", ga:"100", gb:"255", ba:"100", bb:"255", aa:"100", ab:"0"};
loliteColorTransform = new Object();
loliteColorTransform = {ra:"100", rb:"-255", ga:"100", gb:"-255", ba:"100", bb:"-255", aa:"100", ab:"0"};
Array.prototype.shuffle = function () {
var _local1 = this;
var len = _local1.length;
var _local3 = len;
while (_local3--) {
var _local2 = random(len);
var t = _local1[_local3];
_local1[_local3] = _local1[_local2];
_local1[_local2] = t;
}
};
function Radar(parent) {
var _local1 = this;
_local1.parent = parent;
_local1.blips = new Array();
_local1.MC = _local1.parent.MC.blank.attachMovie("radar", "radar", 1);
_local1.width = 300;
_local1.height = 50;
_local1.width2 = _local1.width / 2;
_local1.height2 = _local1.height / 2;
_local1.MC._x = (SCREENX - _local1.width) / 2;
_local1.MC._y = (SCREENY - _local1.height) - 10;
_local1.MC._y = 10;
_local1.mask = _local1.MC.attachMovie("blank", "mask", 2);
_local1.mask._width = _local1.width;
_local1.mask._height = _local1.height;
_local1.MC.setMask(_local1.mask);
}
Radar.prototype.handle = function () {
var _local1 = this;
if (!_local1.parent.parent.level.terrain) {
_local1.MC._visible = false;
} else {
if (!_local1.scaleX) {
_local1.scaleX = _local1.width / _local1.parent.parent.level.terrain.width;
_local1.scaleY = _local1.height / _local1.parent.parent.level.terrain.height;
_local1.MC.window._xscale = SCREENX * _local1.scaleX;
_local1.MC.window._yscale = SCREENY * _local1.scaleY;
_local1.MC.window.swapDepths(1000);
}
_local1.draw();
}
};
Radar.prototype.draw = function () {
var _local1 = this;
_local1.MC._visible = true;
_local1.MC.blips = _local1.MC.createEmptyMovieClip("blips", 1);
for (var _local3 in _local1.blips) {
var _local2 = _local1.MC.blips.attachMovie("blip", "blip" + _local3, _local3);
_local2.gotoAndStop(_local1.blips[_local3].class);
_local2._x = _local1.blips[_local3].posX * _local1.scaleX;
_local2._y = _local1.height2 + (_local1.blips[_local3].posY * _local1.scaleY);
if (_local1.blips[_local3].class == "ball") {
_local2._y = _local2._y + ((_local1.blips[_local3].radius * _local1.scaleY) + 5);
}
if (_local1.blips[_local3].type == "holy") {
_local2.gotoAndStop("friend");
}
}
_local1.blips = new Array();
_local1.MC.window._x = _local1.parent.parent.level.terrain.posX * _local1.scaleX;
_local1.MC.window._y = ((_local1.parent.parent.level.terrain.posY + SCREENY) + SCREENY2) * _local1.scaleY;
};
function Catapult(parent) {
var _local1 = this;
_local1.parent = parent;
_local1.MC = _local1.parent.MCgrfx.attachMovie("catapult", "catapult", 499);
_local1.posX = 300;
_local1.posY = 75;
_local1.armAngle = -90;
_local1.twang = 0;
_local1.MC.aimer._visible = false;
}
Catapult.prototype.handle = function () {
var _local1 = this;
if (_local1.twang) {
_local1.twang--;
_local1.armAngle = 10;
} else if (_local1.parent.isDraggingWeapon) {
_local1.armAngle = _local1.parent.isDraggingWeapon.angle;
} else if (_local1.armAngle >= -90) {
_local1.armAngle = (_local1.armAngle * 0.9) + -9;
}
_local1.draw();
};
Catapult.prototype.draw = function () {
var _local1 = this;
_local1.MC._x = _local1.posX;
_local1.MC._y = _local1.posY + 600;
_local1.MC.line._visible = false;
_local1.MC.arm._rotation = _local1.armAngle;
_local1.MC.arm.pointer._visible = false;
_local1.MC.aimer._visible = false;
if (_local1.parent.isDraggingWeapon) {
if ((_local1.MC.line._xscale < 300) && (_local1.MC.line._yscale < 300)) {
_local1.MC.line._visible = true;
}
_local1.MC.arm.pointer._visible = true;
_local1.MC.arm.pointer._x = _local1.parent.isDraggingWeapon.launchSpeed;
if ((_local1.parent.parent.helpMode && (_local1.armAngle > 275)) && (_local1.armAngle < 355)) {
cursorState = "aim";
_local1.MC.aimer._visible = true;
}
}
};
Catapult.prototype.updateElastic = function (dx, dy) {
this.MC.line._xscale = dx;
this.MC.line._yscale = dy;
};
function Enemy(parent, number, type, progress) {
var _local1 = this;
_local1.class = "enemy";
_local1.active = true;
_local1.parent = parent;
_local1.number = number;
_local1.type = type;
_local1.progress = progress;
_local1.frames = 500;
_local1.pain = 0;
_local1.lastHitBy = false;
_local1.missileFrequency = 0;
if (_local1.type == "black") {
_local1.blood = true;
_local1.speed = 3;
_local1.originalLife = 50;
_local1.brutality = 50;
_local1.score = 50;
}
if (_local1.type == "giant") {
_local1.speed = 1;
_local1.originalLife = 10;
_local1.brutality = 100;
_local1.score = 100;
}
if (_local1.type == "holy") {
_local1.speed = 0;
_local1.originalLife = 10000;
_local1.brutality = 0;
_local1.score = 0;
}
if (_local1.type == "horse") {
_local1.speed = 4;
_local1.originalLife = 10;
_local1.brutality = 15;
_local1.score = 10;
_local1.missileFrequency = 10;
_local1.missileType = "arrow";
}
if (_local1.type == "knight") {
_local1.speed = 2;
_local1.originalLife = 10;
_local1.brutality = 10;
_local1.score = 5;
}
if (_local1.type == "tim") {
_local1.speed = 8;
_local1.originalLife = 50;
_local1.brutality = 75;
_local1.score = 50;
_local1.missileFrequency = 30;
_local1.missileType = "fire";
}
if (_local1.type == "trojan") {
_local1.speed = 2;
_local1.originalLife = 100;
_local1.brutality = 100;
_local1.score = 100;
}
if (_local1.type == "ni") {
_local1.speed = 1;
_local1.originalLife = 10;
_local1.brutality = 5;
_local1.score = 10;
_local1.missileFrequency = 5;
_local1.missileType = "spam";
}
_local1.life = _local1.originalLife;
var _local2 = 1 + ((_local1.parent.parent.level - 1) / 10);
if (_local1.type == "blank") {
_local1.originalLife = 10000;
_local1.speed = 100 * _local2;
_local1.brutality = 0;
}
_local1.speed = _local1.speed / (10000 / _local2);
if ((_local1.parent.parent.level == 1) && (_local1.type != "blank")) {
_local1.speed = 0;
}
_local1.MC = _local1.parent.MCgrfx.attachMovie("enemy", "enemy" + _local1.number, _local1.number + 200);
_local1.MC._y = 875 + random(5);
_local1.MC.stop();
if (_local1.originalLife <= 1000) {
_local1.MChealth = _local1.parent.MCgrfx.attachMovie("health", "health" + _local1.number, _local1.number + 800);
_local1.MChealth._width = _local1.originalLife;
_local1.MChealth._alpha = 50;
}
var _local3;
if ((_local1.type == "knight") || (_local1.type == "horse")) {
_local3 = "_" + OPPO;
}
_local1.MC.sprite.gotoAndStop(_local1.type + _local3);
_local1.MC.sprite.type.stop();
_local1.MC.sprite.hitZone._visible = false;
_local1.height = _local1.MC.sprite._height;
}
Enemy.prototype.handle = function () {
var _local1 = this;
if (!_local1.active) {
} else {
_local1.move();
_local1.draw();
if (_local1.pain) {
_local1.pain--;
_local1.life--;
if (_local1.life <= 0) {
_local1.die();
}
}
}
};
Enemy.prototype.move = function () {
var _local1 = this;
if (_local1.progress < 1) {
if ((_local1.parent.parent.timer > 100) || (_local1.type == "blank")) {
_local1.progress = _local1.progress + _local1.speed;
}
} else if (_local1.type == "blank") {
_local1.progress = 1;
} else {
_local1.progress = 0;
if ((_local1.life >= 10) && (!_local1.pain)) {
_local1.parent.castleHit(_local1.brutality);
}
_local1.destroy();
}
};
Enemy.prototype.collision = function (item) {
var _local1 = this;
var _local2 = item;
if (_local1.pain) {
} else if (!_local1.parent.parent.stillInPlay) {
} else if (!_local1.MC.sprite.hitZone.hitTest(_local2.MC.hitZone)) {
} else if ((_local1.type == "holy") && ((_local2.type == "rabbit") || (_local2.type == "grenade"))) {
} else {
var _local3 = _local1.blood;
_local1.life = _local1.life - _local2.brutality;
if (_local1.life < 10) {
_local1.life = 10;
}
_local1.parent.parent.parent.sfx.play(_local1.type + (random(3) + 1));
if ((_local1.type != "giant") || (_local1.lastHitBy.type == "shrubbery")) {
_local1.pain = 10;
_local1.parent.parent.parent.sfx.play("giant_stop");
}
_local1.lastHitBy = _local2;
if (_local2.launched) {
_local2.impact = true;
}
if (_local1.type == "holy") {
_local1.pain = 50;
_local1.parent.MCgrfx.foot.play();
_local1.parent.parent.parent.sfx.play("foot");
_local1.parent.instantResetView2();
}
if (_local2.type == "rabbit") {
_local1.parent.parent.parent.sfx.play("rabbit" + (random(3) + 1));
_local3 = true;
}
if (_local3) {
_local1.spitBlood();
}
}
};
Enemy.prototype.draw = function () {
var _local1 = this;
_local1.MC.gotoAndStop(Math.ceil(_local1.progress * _local1.frames));
_local1.p = new Float(0, 0);
_local1.MC.sprite.localToGlobal(_local1.p);
_local1.MC.sprite.type._rotation = (0.8 * (-_local1.MC.sprite._rotation)) + ((random(20) - 10) / 10);
_local1.posX = _local1.p.x + _local1.parent.posX;
_local1.posY = _local1.p.y + _local1.parent.posY;
_local1.MChealth._x = _local1.posX;
_local1.MChealth._y = (_local1.p.y + 620) + _local1.parent.posY;
_local1.MChealth.gotoAndStop(Math.ceil((100 * _local1.life) / _local1.originalLife));
if (_local1.type == "black") {
var _local2 = 5 - Math.ceil(_local1.life / 10);
if (_local2) {
_local1.MC.sprite.type.gotoAndStop("pain" + _local2);
}
}
if (((_local1.parent.parent.stillInPlay && (_local1.parent.parent.timer > 100)) && (random(1000) < _local1.missileFrequency)) || (((_local1.parent.parent.timer == 20) && ((_local1.parent.parent.level == 2) || (_local1.parent.parent.level == 7))) && (_local1.missileFrequency > 0))) {
_local1.parent.missiles.push(new Missile(_local1.parent, _local1.parent.missiles.length + 1, _local1.missileType, _local1.posX, _local1.posY - (_local1.MC.sprite._height * 0.25)));
}
if (_local1.type != "blank") {
_local1.parent.parent.parent.hud.radar.blips.push(_local1);
}
var _local3 = new Color(_local1.MC);
if (_local1.pain) {
_local3.setTransform(hiliteColorTransform);
} else {
_local3.setTransform(resetColorTransform);
}
};
Enemy.prototype.destroy = function () {
var _local1 = this;
_local1.active = false;
_local1.MC.removeMovieClip();
_local1.MChealth.removeMovieClip();
_local1.MCthrow.removeMovieClip();
};
Enemy.prototype.die = function () {
var _local1 = this;
_local1.lastHitBy.frag(_local1);
_local1.destroy();
var _local2 = 1;
if (_local1.parent.parent.level >= 10) {
} else {
if (_local1.lastHitBy.kills > 1) {
_local2 = _local1.lastHitBy.kills;
_local1.MC = _local1.parent.MCgrfx.attachMovie("scoreUp", "scoreUp" + _local1.number, _local1.number + 800);
_local1.MC.message.message = "x" + _local2;
_local1.MC._x = _local1.p.x + _local1.parent.posX;
_local1.MC._y = (_local1.p.y + 550) + _local1.parent.posY;
}
_local1.parent.parent.parent.score = _local1.parent.parent.parent.score + (_local2 * _local1.score);
}
};
Enemy.prototype.spitBlood = function () {
var _local1 = this;
var pain = 20;
var _local3 = 0;
while (_local3 <= pain) {
_local1.parent.blood++;
var _local2 = _local1.parent.MCgrfx.attachMovie("blood", "blood" + _local1.parent.blood, _local1.parent.blood + 900);
_local2._x = (_local1.posX + random(10)) - 5;
_local2._y = ((((_local1.p.y + 600) + _local1.parent.posY) - (_local1.MC.sprite._height * 0.5)) + random(20)) - 10;
_local2._xscale = (_local2._yscale = random(50) + 50);
_local2._rotation = random(360);
if (_local1.parent.blood > 100) {
_local1.parent.blood = 0;
}
_local3++;
}
};
function Weapon(parent, number, x, y, type) {
var _local1 = this;
_local1.ox = x;
_local1.oy = y;
_local1.class = "weapon";
_local1.active = true;
_local1.parent = parent;
_local1.number = number;
_local1.posX = (_local1.prevX = x);
_local1.posY = (_local1.prevY = y);
_local1.type = type;
_local1.lastDidSound = 0;
_local1.kills = 0;
_local1.launchSpeed = 0;
_local1.launched = false;
_local1.impact = false;
_local1.frame = "still";
if (_local1.type == "cow") {
_local1.elastic = 0.4;
_local1.radius = 22;
_local1.life = 50;
_local1.reincarnate = false;
_local1.brutality = 0;
_local1.bonus = false;
_local1.band = true;
}
if (_local1.type == "chicken") {
_local1.elastic = 0.6;
_local1.radius = 15;
_local1.life = 75;
_local1.reincarnate = false;
_local1.brutality = 0;
_local1.bonus = false;
_local1.band = true;
}
if (_local1.type == "whale") {
_local1.elastic = 1;
_local1.radius = 35;
_local1.life = 200;
_local1.reincarnate = false;
if (_local1.parent.parent.parent.parent.unlocked >= 2) {
_local1.reincarnate = true;
}
_local1.brutality = 0;
_local1.bonus = true;
_local1.band = false;
}
if (_local1.type == "donkey") {
_local1.elastic = 0.5;
_local1.radius = 20;
_local1.life = 30;
_local1.reincarnate = false;
_local1.brutality = 0;
_local1.bonus = false;
_local1.band = true;
}
if (_local1.type == "grenade") {
_local1.elastic = 0;
_local1.radius = 18;
_local1.life = 30;
_local1.reincarnate = false;
if (_local1.parent.parent.parent.parent.unlocked >= 4) {
_local1.reincarnate = true;
}
_local1.brutality = 1000;
_local1.bonus = true;
_local1.band = false;
}
if (_local1.type == "rabbit") {
_local1.elastic = 0.8;
_local1.radius = 10;
_local1.life = 300;
_local1.reincarnate = false;
if (_local1.parent.parent.parent.parent.unlocked >= 3) {
_local1.reincarnate = true;
}
_local1.brutality = 50;
_local1.bonus = false;
_local1.band = false;
}
if (_local1.type == "shrubbery") {
_local1.elastic = 0;
_local1.radius = 30;
_local1.life = 40;
_local1.reincarnate = true;
_local1.brutality = 0;
_local1.bonus = true;
_local1.band = false;
}
if (_local1.type == "spam") {
_local1.elastic = 0;
_local1.radius = 15;
_local1.life = 10;
_local1.reincarnate = true;
_local1.brutality = 20;
_local1.bonus = true;
_local1.band = false;
}
if (!_local1.parent.parent.helpMode) {
_local1.band = false;
}
_local1.dx = dx;
_local1.dy = dy;
_local1.angle = 0;
_local1.maxD = 40;
_local1.diameter = _local1.radius * 2;
_local1.circumference = _local1.diameter * Math.PI;
_local1.collide = false;
_local1.bungy = 0.95;
_local1.mx = (_local1.my = 0);
_local1.isDragging = false;
_local1.MC = _local1.parent.MCgrfx.attachMovie("weapon", "weapon" + _local1.number, 600 + _local1.number);
_local1.MC.gotoAndStop(_local1.type);
if (_local1.band) {
_local1.bandMC = _local1.parent.MCgrfx.createEmptyMovieClip("band" + _local1.number, 100 + _local1.number);
_local1.bandMC.lineStyle(1, "0xFFFFFF");
_local1.bandMC._y = 600;
}
_local1.MC.parent = _local1;
_local1.MC.hitZone._visible = false;
if ((((random(2) == 1) && (_local1.type != "spam")) && (_local1.type != "whale")) && (_local1.type != "rabbit")) {
_local1.MC._xscale = -100;
}
_local1.draw();
}
Weapon.prototype.handle = function () {
var _local1 = this;
if (!_local1.active) {
if (_local1.bandMC._alpha > 1) {
_local1.bandMC._alpha = _local1.bandMC._alpha * 0.999;
} else {
_local1.bandMC._visible = false;
}
} else if (_local1.impact) {
_local1.life--;
if (!_local1.life) {
_local1.destroy();
return;
}
} else {
if (_local1.launched) {
_local1.collision();
} else if (((!_local1.parent.catapult.twang) && (_local1.parent.parent.stillInPlay)) && (_local1.parent.parent.timer > 100)) {
_local1.drag();
}
_local1.move();
_local1.draw();
}
};
Weapon.prototype.drag = function () {
var _local1 = this;
var dx = ((_xmouse - _local1.posX) + _local1.parent.posX);
var _local3 = (_ymouse - _local1.posY) + _local1.parent.posY;
var d = ((dx * dx) + (_local3 * _local3));
var _local2 = false;
if (d < (_local1.radius * _local1.radius)) {
cursorState = "drag";
if (_local1.parent.parent.helpMode) {
cursorState = "dragHelp";
}
_local2 = true;
if (!_local1.bonus) {
_local1.frame = "grab";
}
}
if (MOUSEDOWN) {
if ((!_local1.parent.isDraggingWeapon) && (_local1.parent.parent.timer > 100)) {
if (_local2) {
_local1.isDragging = true;
}
if (_local1.isDragging) {
_local1.MC.shadow._visible = false;
if (_local1.type != "grenade") {
_local1.parent.parent.parent.sfx.play(_local1.type + (random(3) + 1));
}
_local1.parent.parent.parent.sfx.play("catapult_grab" + (random(5) + 1));
_local1.frame = "grab";
_local1.parent.isDraggingWeapon = _local1;
_local1.parent.focus = _local1;
_local1.parent.catapult.MC.arm.pointer.gotoAndPlay(1);
}
}
} else {
if (_local1.isDragging) {
_local1.launch();
_local1.parent.catapult.twang = 10;
}
_local1.isDragging = false;
}
};
Weapon.prototype.launch = function () {
var _local1 = this;
_local1.dx = _local1.mx / (_local1.radius * 0.2);
_local1.dy = _local1.my / (_local1.radius * 0.2);
_local1.da = ((_local1.dx / _local1.circumference) * 360) * 1;
_local1.launched = true;
_local1.MC.swapDepths(300 + _local1.number);
_local1.frame = "launch";
_local1.parent.isDraggingWeapon = false;
if (_local1.band) {
_local1.bandMC.moveTo(_local1.posX, _local1.posY);
var _local2 = _local1.bandMC.attachMovie("pointerhole", "pointer", 1);
_local2._x = _xmouse + _local1.parent.posX;
_local2._y = _ymouse + _local1.parent.posY;
}
_local1.parent.parent.parent.sfx.play("catapult_fire" + (random(5) + 1));
if (_local1.type == "grenade") {
_local1.parent.parent.parent.sfx.play("grenadelaunch");
}
};
Weapon.prototype.collision = function () {
var _local1 = this;
var i = 0;
while (i < _local1.parent.weapons.length) {
var _local2 = _local1.parent.weapons[i];
if (((((_local2.number == _local1.number) || (_local2.collide)) || (!_local2.launched)) || (!_local2.active)) || (_local2.type == "spam")) {
} else if (!_local1.MC.hitZone.hitTest(_local2.MC.hitZone)) {
_local1.parent.savings++;
} else {
var dx = (_local2.posX - _local1.posX);
var dy = (_local2.posY - _local1.posY);
var _local3 = Math.sqrt((dx * dx) + (dy * dy));
if (_local3 < (_local1.radius + _local2.radius)) {
dx = dx / _local3;
dy = dy / _local3;
_local3 = _local3 - (_local1.radius + _local2.radius);
_local2.posX = _local2.posX - (dx * _local3);
_local2.posY = _local2.posY - (dy * _local3);
exchangeEnergy(_local1, _local2);
_local2.collision();
}
}
i++;
}
for (var i in _local1.parent.shapes.elements) {
_local1.parent.shapes.elements[i].collision(_local1);
}
for (var i in _local1.parent.enemies) {
_local1.parent.enemies[i].collision(_local1);
}
};
Weapon.prototype.move = function () {
var _local1 = this;
if (_local1.launched) {
_local1.dy = _local1.dy + GRAVITY;
}
_local1.prevX = _local1.posX;
_local1.prevY = _local1.posY;
if (_local1.isDragging) {
if (_local1.parent.parent.stillInPlay) {
cursorState = "aim";
if (_local1.parent.parent.helpMode) {
cursorState = "aimHelp";
}
}
_local1.dx = (_local1.dy = 0);
var dx = ((_xmouse + _local1.parent.posX) - _local1.parent.catapult.posX);
var dy = ((_ymouse + _local1.parent.posY) - _local1.parent.catapult.posY);
_local1.parent.catapult.updateElastic(dx, dy);
_local1.launchSpeed = Math.sqrt((dx * dx) + (dy * dy));
_local1.launchSpeed = limit(_local1.launchSpeed, 50, 150);
_local1.angle = reverseTrig(dx, -dy);
if (_local1.angle < 180) {
_local1.angle = 0;
}
if (_local1.angle < 135) {
_local1.angle = _local1.angle + 1000;
}
_local1.angle = limit(_local1.angle, 275, 355);
var _local2 = trig(_local1.angle);
dx = _local2.x * 70;
dy = (-_local2.y) * 70;
_local1.posX = _local1.parent.catapult.posX + dx;
_local1.posY = _local1.parent.catapult.posY + dy;
_local2 = trig(_local1.angle - 85);
_local1.mx = (-_local2.x) * _local1.launchSpeed;
_local1.my = _local2.y * _local1.launchSpeed;
}
_local1.dx = limit(_local1.dx, -_local1.maxD, _local1.maxD);
_local1.dy = limit(_local1.dy, -_local1.maxD, _local1.maxD);
_local1.posX = _local1.posX + _local1.dx;
_local1.posY = _local1.posY + _local1.dy;
_local1.speed = Math.sqrt((_local1.dx * _local1.dx) + (_local1.dy * _local1.dy));
if (_local1.onShape) {
if (_local1.type != "rabbit") {
_local1.dx = _local1.dx * _local1.onShape.friction;
}
if (_local1.elastic == 0) {
_local1.dx = _local1.dx * 0.5;
_local1.dy = _local1.dy * 0.5;
}
}
};
Weapon.prototype.draw = function () {
var _local1 = this;
if (_local1.launched) {
_local1.parent.parent.parent.hud.radar.blips.push(_local1);
_local1.bandMC.lineTo(_local1.posX, _local1.posY);
}
if (_local1.lastDidSound) {
_local1.lastDidSound--;
}
if ((((_local1.onShape && (!_local1.lastDidSound)) && (_local1.type != "rabbit")) && (_local1.speed > 2.5)) && (_local1.parent.parent.stillInPlay)) {
if (_local1.type != "grenade") {
_local1.parent.parent.parent.sfx.play(_local1.type + (random(3) + 1));
}
_local1.parent.parent.parent.sfx.play("hit" + (random(5) + 1));
_local1.lastDidSound = 5;
}
if (_local1.onShape || (_local1.collide)) {
_local1.da = (_local1.dx / _local1.circumference) * 360;
if (_local1.type == "rabbit") {
_local1.da = 0;
_local1.angle = 0;
_local1.MC._xscale = SGN(_local1.dx) * 100;
}
} else {
_local1.da = _local1.da * 0.9;
}
_local1.angle = _local1.angle + _local1.da;
_local1.MC._x = _local1.posX;
_local1.MC._y = _local1.posY + 600;
_local1.MC._rotation = _local1.angle;
_local1.MC.sprite.gotoAndStop(_local1.frame);
if (((!_local1.launched) && (!_local1.isDragging)) && (!_local1.bonus)) {
if (random(50) == 1) {
if (_local1.frame == "still") {
_local1.frame = "grab";
} else {
_local1.frame = "still";
}
}
}
if (_local1.life < 10) {
if (_local1.type == "grenade") {
if (_local1.life == 9) {
_local1.parent.parent.parent.sfx.play("grenadeexplode");
}
_local1.MC = _local1.parent.MCgrfx.attachMovie("explosion", "explosion" + _local1.number, 300 + _local1.number);
_local1.MC.hitZone = _local1.MC;
_local1.MC._x = _local1.posX;
_local1.MC._y = _local1.posY + 600;
_local1.MC.gotoAndStop(11 - _local1.life);
} else {
var _local2 = new Color(_local1.MC);
if (FRAMECOUNTER % 2) {
_local2.setTransform(resetColorTransform);
} else {
_local2.setTransform(loliteColorTransform);
}
}
}
};
Weapon.prototype.destroy = function () {
var _local1 = this;
_local1.MC.removeMovieClip();
_local1.active = false;
if (_local1.reincarnate) {
_local1.rebirth();
}
};
Weapon.prototype.reset = function () {
this.collide = false;
this.onShape = false;
};
Weapon.prototype.rebirth = function () {
var _local1 = this;
_local1.parent.weapons[_local1.number - 1] = new Weapon(_local1.parent, _local1.number, _local1.ox, _local1.oy, _local1.type);
};
Weapon.prototype.frag = function (corpse) {
var _local1 = this;
_local1.kills++;
_local1.parent.parent.parent.totalKills++;
if (_local1.parent.parent.parent.totalKills == 1) {
_local1.parent.parent.parent.sfx.play("firstblood");
}
var _local2 = _local1.kills;
if (_local2 > 5) {
_local2 = 5;
}
_local1.parent.parent.parent.sfx.play("kill" + _local2);
};
function Shapes(parent) {
var _local1 = this;
_local1.parent = parent;
_local1.MC = _local1.parent.MC.createEmptyMovieClip("shapes", 100);
_local1.elements = new Array();
_local1.elements.push(new Line(_local1, 1, false, 0, 0, _local1.parent.width, 0, 1, 1));
_local1.elements.push(new Line(_local1, 2, false, _local1.parent.width, 0, _local1.parent.width, _local1.parent.height + 500, 1, 1));
_local1.elements.push(new Line(_local1, 3, false, _local1.parent.width, _local1.parent.height + 500, 0, _local1.parent.height + 500, 1, 1));
_local1.elements.push(new Line(_local1, 4, false, 0, _local1.parent.height + 500, 0, 0, 1, 1));
_local1.elements.push(new Line(_local1, 8, false, 540, 140, 720, 140, 1, 1));
_local1.elements.push(new Circle(_local1, 1, 50, 125, 125, 1, 1));
_local1.elements.push(new Circle(_local1, 2, 200, 150, 100, 1, 1));
_local1.elements.push(new Circle(_local1, 3, 325, 175, 125, 1, 1));
_local1.elements.push(new Circle(_local1, 4, 450, 100, 110, 1, 1));
_local1.elements.push(new Circle(_local1, 5, 820, 40, 150, 1, 1));
_local1.elements.push(new Circle(_local1, 6, 950, 130, 80, 1, 1));
_local1.elements.push(new Circle(_local1, 7, 1050, 150, 120, 1, 1));
_local1.elements.push(new Circle(_local1, 8, 1220, 140, 180, 1, 1));
_local1.elements.push(new Circle(_local1, 9, 1350, 210, 80, 1, 1));
_local1.elements.push(new Circle(_local1, 10, 1450, 130, 150, 1, 1));
_local1.elements.push(new Circle(_local1, 11, 1520, 200, 120, 1, 1));
_local1.elements.push(new Circle(_local1, 12, 1570, 220, 130, 1, 1));
_local1.elements.push(new Circle(_local1, 13, 1600, 300, 80, 1, 1));
_local1.elements.push(new Circle(_local1, 14, 1750, 300, 150, 1, 1));
_local1.elements.push(new Circle(_local1, 15, 1900, 270, 210, 1, 1));
_local1.elements.push(new Circle(_local1, 16, 2000, 500, 50, 1, 1));
_local1.elements.push(new Circle(_local1, 17, 2465, 750, 500, 1, 1));
}
Line = function (parent, number, twosided, x0, y0, x1, y1, elastic, friction) {
var _local1 = this;
_local1.parent = parent;
_local1.number = number;
_local1.twosided = twosided;
_local1.x0 = x0;
_local1.y0 = SCREENY - y0;
_local1.x1 = x1;
_local1.y1 = SCREENY - y1;
_local1.elastic = elastic;
_local1.friction = 1 - ((1 - friction) / 10);
_local1.dx = _local1.x1 - _local1.x0;
_local1.dy = _local1.y1 - _local1.y0;
_local1.length = Math.sqrt((_local1.dx * _local1.dx) + (_local1.dy * _local1.dy));
_local1.nx = (-_local1.dy) / _local1.length;
_local1.ny = _local1.dx / _local1.length;
if (_local1.twosided) {
_local1.dx2 = _local1.x0 - _local1.x1;
_local1.dy2 = _local1.y0 - _local1.y1;
_local1.nx2 = (-_local1.dy2) / _local1.length;
_local1.ny2 = _local1.dx2 / _local1.length;
}
_local1.MC = _local1.parent.MC.createEmptyMovieClip("line" + _local1.number, 200 + _local1.number);
_local1.draw();
};
Line.prototype.collision = function (item) {
var _local1 = this;
var _local2 = item;
var dx = (_local2.posX - _local1.x0);
var dy = (_local2.posY - _local1.y0);
var r = (((dx * _local1.dx) + (dy * _local1.dy)) / (_local1.length * _local1.length));
if ((r >= 0) && (r <= 1)) {
var od = Math.abs(((_local1.dy * dx) - (_local1.dx * dy)) / _local1.length);
var check = MAX(_local2.speed, _local2.radius);
var _local3 = od - check;
if ((_local3 <= 0) && (_local3 >= (-check))) {
_local3 = od - _local2.radius;
_local2.posX = _local2.posX + (_local1.nx * _local3);
_local2.posY = _local2.posY + (_local1.ny * _local3);
var dp = ((_local2.elastic + _local1.elastic) * ((_local1.nx * _local2.dx) + (_local1.ny * _local2.dy)));
_local2.dx = _local2.dx - (_local1.nx * dp);
_local2.dy = _local2.dy - (_local1.ny * dp);
_local2.onShape = _local1;
_local2.impact = true;
}
}
if (!_local1.twosided) {
} else {
var dx2 = (_local2.posX - _local1.x1);
var dy2 = (_local2.posY - _local1.y1);
var r2 = (((dx2 * _local1.dx2) + (dy2 * _local1.dy2)) / (_local1.length * _local1.length));
if ((r2 >= 0) && (r2 <= 1)) {
var od = Math.abs(((_local1.dy2 * dx2) - (_local1.dx2 * dy2)) / _local1.length2);
var check = MAX(_local2.speed, _local2.radius);
var _local3 = od - check;
if ((_local3 <= 0) && (_local3 >= (-check))) {
_local3 = od - _local2.radius;
_local2.posX = _local2.posX + (_local1.nx2 * _local3);
_local2.posY = _local2.posY + (_local1.ny2 * _local3);
var dp = ((_local2.elastic + _local1.elastic) * ((_local1.nx2 * _local2.dx) + (_local1.ny2 * _local2.dy)));
_local2.dx = _local2.dx - (_local1.nx2 * dp);
_local2.dy = _local2.dy - (_local1.ny2 * dp);
_local2.onShape = _local1;
_local2.impact = true;
}
}
}
};
Line.prototype.intersect = function (what) {
var _local1 = what;
var line1_x1 = this.x0;
var line1_y1 = this.y0;
var line1_x2 = this.x1;
var line1_y2 = this.y1;
var line2_x1 = _local1.prevX;
var line2_y1 = _local1.prevY;
var line2_x2 = _local1.posX;
var line2_y2 = _local1.posY;
var S1x = (line1_x2 - line1_x1);
var S1y = (line1_y2 - line1_y1);
var S2x = (line2_x2 - line2_x1);
var S2y = (line2_y2 - line2_y1);
var div = (((-S2x) * S1y) + (S1x * S2y));
var dx = (line1_x1 - line2_x1);
var dy = (line1_y1 - line2_y1);
var _local3 = (((-S1y) * dx) + (S1x * dy)) / div;
var _local2 = ((S2x * dy) - (S2y * dx)) / div;
if ((((_local3 >= 0) && (_local3 <= 1)) && (_local2 >= 0)) && (_local2 <= 1)) {
var ix = (line1_x1 + (_local2 * S1x));
var iy = (line1_y1 + (_local2 * S1y));
_local1.posX = ix;
_local1.posY = iy;
_local1.dx = _local1.dx - (this.nx * _local3);
_local1.dy = _local1.dy - (this.ny * _local3);
}
};
Line.prototype.draw = function () {
};
Circle = function (parent, number, x, y, radius, elastic, friction) {
var _local1 = this;
_local1.parent = parent;
_local1.number = number;
_local1.posX = x;
_local1.posY = SCREENY - y;
_local1.radius = radius;
_local1.elastic = elastic;
_local1.friction = 1 - ((1 - friction) / 10);
_local1.diameter = _local1.radius * 2;
_local1.MC = _local1.parent.MC.attachMovie("circle", "circle" + _local1.number, 100 + _local1.number);
_local1.draw();
};
Circle.prototype.collision = function (item) {
var _local1 = item;
var _local2 = this;
if (!_local2.MC.hitTest(_local1.MC.hitZone)) {
_local2.parent.parent.savings++;
} else {
var dx = (_local1.posX - _local2.posX);
var dy = (_local1.posY - _local2.posY);
var _local3 = Math.sqrt((dx * dx) + (dy * dy));
if (_local3 < (_local2.radius + _local1.radius)) {
dx = dx / _local3;
dy = dy / _local3;
_local3 = _local3 - (_local2.radius + _local1.radius);
_local1.posX = _local1.posX - (dx * _local3);
_local1.posY = _local1.posY - (dy * _local3);
var dp = ((_local1.elastic + _local2.elastic) * ((dx * _local1.dx) + (dy * _local1.dy)));
var shake = 0;
if (_local1.type != "spam") {
shake = Math.floor((_local1.radius * _local1.speed) / 10);
}
if (shake < 20) {
shake = 0;
}
_local2.parent.parent.shake = _local2.parent.parent.shake + shake;
_local1.dx = _local1.dx - (dx * dp);
_local1.dy = _local1.dy - (dy * dp);
_local1.onShape = _local2;
if (_local1.launched) {
_local1.impact = true;
}
}
}
};
Circle.prototype.draw = function (g) {
var _local1 = this;
_local1.MC._x = _local1.posX;
_local1.MC._y = _local1.posY;
_local1.MC._xscale = (_local1.MC._yscale = _local1.diameter);
};
function Missile(parent, number, type, x, y) {
var _local1 = this;
_local1.parent = parent;
_local1.number = number;
_local1.type = type;
_local1.posX = x;
_local1.posY = y;
_local1.active = true;
if (_local1.type == "fire") {
_local1.speed = 2;
}
if (_local1.type == "arrow") {
_local1.speed = 1;
}
if (_local1.type == "spam") {
_local1.speed = 2;
}
_local1.frame = 1;
_local1.fireNumber = 1;
_local1.MCtrajectory = _local1.parent.MCgrfx.attachMovie("trajectory", "trajectory" + _local1.number, _local1.number + 1100);
_local1.MCtrajectory._x = _local1.posX;
_local1.MCtrajectory._y = _local1.posY + 600;
var _local3 = _local1.posX - 350;
var _local2 = _local1.posY - 50;
_local1.distance = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var angle = reverseTrig(_local3, -_local2);
_local1.MCtrajectory._rotation = angle - 90;
_local1.MCtrajectory._xscale = (_local1.MCtrajectory._yscale = _local1.distance);
_local1.MCmissile = _local1.parent.MCgrfx.attachMovie("missile_" + _local1.type, "missile" + _local1.number, _local1.number + 1200);
_local1.MCmissile.ember.swapDepths(50);
_local1.parent.parent.parent.sfx.play("whoosh" + (random(3) + 1));
}
Missile.prototype.handle = function () {
var _local1 = this;
if (!_local1.active) {
} else {
_local1.move();
_local1.draw();
}
};
Missile.prototype.move = function () {
var _local1 = this;
_local1.frame = _local1.frame + ((5000 / _local1.distance) * _local1.speed);
if (_local1.frame >= 500) {
_local1.parent.castleHit(1);
_local1.destroy();
}
};
Missile.prototype.draw = function () {
var _local1 = this;
_local1.MCtrajectory.gotoAndStop(Math.ceil(_local1.frame));
_local1.p = new Float(0, 0);
_local1.MCtrajectory.position.localToGlobal(_local1.p);
_local1.MCmissile._x = _local1.p.x + _local1.parent.posX;
_local1.MCmissile._y = (_local1.p.y + _local1.parent.posY) + 600;
if (_local1.type == "fire") {
_local1.fireNumber++;
if (_local1.fireNumber > 20) {
_local1.fireNumber = 1;
}
var _local2 = _local1.MCmissile.attachMovie("spit", "spit" + _local1.fireNumber, _local1.fireNumber);
_local2._rotation = (random(100) - _local1.MCmissile._rotation) - 50;
_local2._x = random(20) - 10;
_local2._y = random(20) - 10;
_local2._alpha = random(50) + 50;
_local2._xscale = random(50) + 75;
_local2._yscale = random(50) + 75;
_local1.MCmissile._rotation = _local1.MCmissile._rotation + (random(2) + 3);
} else {
_local1.MCmissile._rotation = _local1.MCtrajectory.position._rotation;
}
};
Missile.prototype.destroy = function () {
var _local1 = this;
_local1.MCtrajectory.removeMovieClip();
_local1.MCmissile.removeMovieClip();
_local1.active = false;
};
function Terrain(parent) {
var _local1 = this;
_local1.parent = parent;
_local1.control = new Control(_local1, 37, 39, 38, 40, 32);
_local1.width = 2000;
_local1.height = 1000;
_local1.ratio1X = 0.66666666;
_local1.ratio1Y = 0.83333333;
_local1.ratio2X = 0.33333333;
_local1.ratio2Y = 0.41666666;
_local1.mistX = 0;
_local1.isDraggingWeapon = false;
_local1.blood = 0;
_local1.keyDisp = 10;
_local1.resetX = 50;
_local1.resetY = -100;
_local1.posX = 2000;
_local1.posY = -240;
_local1.dx = (_local1.dy = 0);
_local1.shake = 0;
_local1.castleLife = _local1.parent.parent.castleLifeLeft;
_local1.castlePain = 0;
_local1.castleBiggestPain = 0;
_local1.MC = _local1.parent.MC.createEmptyMovieClip("terrain", 2);
_local1.MCgrfx = _local1.MC.attachMovie("terrain", "grfx", 1);
_local1.MCgrfx.parent = _local1;
_local1.MCgrfx._y = SCREENY - _local1.height;
_local1.MCgrfx.terrain_3.spam._visible = false;
_local1.MCgrfx.terrain_3.swapDepths(500);
_local1.MCgrfx.castle.stop();
_local1.MCgrfx.castle.flag.gotoAndStop(TEAM);
_local1.MChealth = _local1.MCgrfx.attachMovie("health", "health" + _local1.number, 800);
_local1.MChealth._width = 100;
_local1.MChealth._alpha = 50;
_local1.MChealth._x = 320;
_local1.MChealth._y = 720;
_local1.missiles = new Array();
var cows = 0;
var chickens = 0;
var donkeys = 0;
var spam;
var whale;
var rabbit;
var grenade;
var shrubbery = false;
_local1.enemies = new Array();
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "blank", 0.1));
if (_local1.parent.level == 1) {
cows = 10;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "blank", 0.1));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.5));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.25));
}
if (_local1.parent.level == 2) {
chickens = 5;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.49));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.51));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.5));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.48));
}
if (_local1.parent.level == 3) {
donkeys = 5;
grenade = true;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "holy", 0.6));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.29));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.3));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.31));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.32));
}
if (_local1.parent.level == 4) {
cows = 5;
chickens = 3;
donkeys = 1;
whale = true;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "black", 0.2));
_local1.parent.parent.sfx.play("black_intro");
}
if (_local1.parent.level == 5) {
cows = 0;
chickens = 0;
donkeys = 0;
shrubbery = true;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "giant", 0.6));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", 0.59));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", 0.6));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", 0.61));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", 0.62));
_local1.parent.parent.sfx.play("ni_intro");
}
if (_local1.parent.level == 6) {
cows = 3;
chickens = 3;
donkeys = 3;
shrubbery = true;
rabbit = true;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "trojan", 0.3));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.29));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.3));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.31));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.32));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.59));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.6));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.61));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.62));
}
if (_local1.parent.level == 7) {
cows = 5;
chickens = 3;
donkeys = 1;
spam = true;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "tim", 0.28));
}
if (_local1.parent.level == 8) {
cows = 1;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.35));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.31));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.32));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.33));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.34));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.3));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.36));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.37));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.38));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.39));
}
if (_local1.parent.level == 9) {
cows = 5;
chickens = 5;
donkeys = 5;
rabbit = true;
whale = true;
shrubbery = true;
spam = true;
grenade = true;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "trojan", 0.35));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.31));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.32));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.33));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.34));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.3));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.36));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.37));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.38));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.39));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.4));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.41));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", 0.43));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", 0.43));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", 0.5));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", 0.51));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", 0.54));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", 0.55));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "giant", 0.53));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "black", 0.2));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "tim", 0.1));
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "holy", 0.6));
}
if (_local1.parent.level >= 10) {
cows = 5;
chickens = 5;
donkeys = 5;
whale = true;
shrubbery = true;
spam = true;
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "blank", 0.1));
var _local3 = 1;
while (_local3 <= Math.round(_local1.parent.level / 2)) {
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "knight", (random(50) * 0.01) + 0.3));
_local3++;
}
_local3 = 1;
while (_local3 <= Math.round(_local1.parent.level / 2)) {
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "horse", (random(50) * 0.01) + 0.3));
_local3++;
}
_local3 = 1;
while (_local3 <= Math.round(_local1.parent.level / 4)) {
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "ni", (random(50) * 0.01) + 0.2));
_local3++;
}
_local3 = 1;
while (_local3 <= Math.round(_local1.parent.level / 8)) {
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "holy", (random(80) * 0.01) + 0.1));
_local3++;
}
_local3 = 1;
while (_local3 <= Math.round(_local1.parent.level / 12)) {
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "black", (random(25) * 0.01) + 0.1));
_local3++;
}
_local3 = 1;
while (_local3 <= Math.round(_local1.parent.level / 10)) {
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "giant", (random(30) * 0.01) + 0.3));
_local3++;
}
_local3 = 1;
while (_local3 <= Math.round(_local1.parent.level / 10)) {
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "trojan", (random(20) * 0.01) + 0.1));
_local3++;
}
_local3 = 1;
while (_local3 <= Math.round(_local1.parent.level / 10)) {
_local1.enemies.push(new Enemy(_local1, _local1.enemies.length + 1, "tim", (random(20) * 0.01) + 0.1));
_local3++;
}
}
_local1.weapons = new Array();
var _local2 = new Array();
var ys = new Array();
var _local3 = 1;
while (_local3 <= cows) {
_local2.push("cow");
_local3++;
}
_local3 = 1;
while (_local3 <= chickens) {
_local2.push("chicken");
_local3++;
}
_local3 = 1;
while (_local3 <= donkeys) {
_local2.push("donkey");
_local3++;
}
_local3 = 0;
while (_local3 < _local2.length) {
ys.push(175 + random(150));
_local3++;
}
_local2.shuffle();
ys.sort();
if (_local1.parent.parent.parent.unlocked == 1) {
spam = true;
}
if (_local1.parent.parent.parent.unlocked == 2) {
spam = (whale = true);
}
if (_local1.parent.parent.parent.unlocked == 3) {
spam = (whale = (rabbit = true));
}
if (_local1.parent.parent.parent.unlocked == 4) {
spam = (whale = (rabbit = (grenade = true)));
}
if (spam) {
var x = 250;
var y = 130;
_local3 = 1;
while (_local3 <= 5) {
_local1.weapons.push(new Weapon(_local1, _local1.weapons.length + 1, x, y, "spam"));
_local3++;
}
_local1.MCgrfx.terrain_3.spam._visible = true;
}
if (grenade) {
_local1.weapons.push(new Weapon(_local1, _local1.weapons.length + 1, 130, 160, "grenade"));
}
if (whale) {
_local1.weapons.push(new Weapon(_local1, _local1.weapons.length + 1, 640, 360, "whale"));
}
if (shrubbery) {
_local1.weapons.push(new Weapon(_local1, _local1.weapons.length + 1, 1850, -80, "shrubbery"));
}
if (rabbit) {
_local1.weapons.push(new Weapon(_local1, _local1.weapons.length + 1, 1400, 105, "rabbit"));
}
_local3 = 0;
while (_local3 < _local2.length) {
_local1.weapons.push(new Weapon(_local1, _local1.weapons.length + 1, 50 + random(400), ys[_local3], _local2[_local3]));
_local3++;
}
_local1.catapult = new Catapult(_local1);
_local1.shapes = new Shapes(_local1);
_local1.focus = _local1.enemies[1];
}
Terrain.prototype.handle = function () {
var _local1 = this;
if (_local1.parent.stillInPlay && (_local1.parent.timer > 100)) {
_local1.control.handle();
}
cursorState = "select";
_local1.savings = 0;
_local1.mx = _xmouse - _local1.prevMouseX;
_local1.my = _ymouse - _local1.prevMouseY;
_local1.activeEnemies = 0;
_local1.activeWeapons = 0;
var _local3 = false;
var _local2 = false;
for (var i in _local1.weapons) {
_local1.weapons[i].reset();
}
for (var i in _local1.weapons) {
_local1.weapons[i].handle();
if (_local1.weapons[i].active) {
_local1.activeWeapons++;
}
}
for (var i in _local1.enemies) {
_local1.enemies[i].handle();
if ((_local1.enemies[i].active && (_local1.enemies[i].type != "blank")) && (_local1.enemies[i].type != "holy")) {
_local1.activeEnemies++;
if (_local1.enemies[i].type == "horse") {
_local3 = true;
}
if (_local1.enemies[i].type == "ni") {
_local2 = true;
}
}
}
_local1.castleHandle();
if (!_local1.activeEnemies) {
_local1.parent.win();
}
if (!_local1.activeWeapons) {
for (var i in _local1.enemies) {
if (_local1.enemies[i].type != "holy") {
_local1.enemies[i].speed = 0.01;
}
}
}
for (var i in _local1.missiles) {
_local1.missiles[i].handle();
}
if (_local1.missiles.length >= 100) {
_local1.missiles.shift();
}
_local1.catapult.handle();
if (_local1.focus) {
if (!_local1.focus.active) {
_local1.resetView();
} else {
var ease = 0.8;
var invease = (1 - ease);
var extra = 0;
if (_local1.isDraggingWeapon) {
extra = 0;
}
_local1.dx = (-_local1.posX) + ((_local1.posX * ease) + ((_local1.focus.posX - SCREENX2) * invease));
_local1.dy = (-_local1.posY) + (((_local1.posY + extra) * ease) + ((_local1.focus.posY - SCREENY2) * invease));
}
}
if (((MOUSEDOWN && (!_local1.isDraggingWeapon)) && (_local1.parent.stillInPlay)) && (_local1.parent.timer > 100)) {
_local1.focus = false;
_local1.dx = -_local1.mx;
_local1.dy = -_local1.my;
cursorState = "move";
if (DOUBLECLICK) {
_local1.instantResetView();
DOUBLECLICK = false;
}
}
if ((_local1.shake > 1) && (_local1.parent.stillInPlay)) {
_local1.shake = _local1.shake * 0.75;
} else {
_local1.shake = 0;
}
var shakeDisp = (random(_local1.shake) - (_local1.shake / 2));
if (_local1.control.LEFT) {
_local1.dx = _local1.dx - _local1.keyDisp;
}
if (_local1.control.RIGHT) {
_local1.dx = _local1.dx + _local1.keyDisp;
}
if (_local1.control.UP) {
_local1.dy = _local1.dy - _local1.keyDisp;
}
if (_local1.control.DOWN) {
_local1.dy = _local1.dy + _local1.keyDisp;
}
_local1.posX = _local1.posX + _local1.dx;
_local1.posY = _local1.posY + _local1.dy;
if (_local1.posX < 0) {
_local1.posX = 0;
_local1.dx = 0;
}
if (_local1.posX > (_local1.width - SCREENX)) {
_local1.posX = _local1.width - SCREENX;
_local1.dx = 0;
}
if (_local1.posY > 0) {
_local1.posY = 0;
}
if (_local1.posY < (SCREENY - _local1.height)) {
_local1.posY = SCREENY - _local1.height;
}
_local1.posX = Math.round(_local1.posX);
_local1.posY = Math.round(_local1.posY);
_local1.mistX = (_local1.mistX - _local1.dx) + _local1.parent.level;
if (_local1.mistX < -500) {
_local1.mistX = 0;
}
if (_local1.mistX > 500) {
_local1.mistX = 0;
}
var temp = _local1.posY;
_local1.posY = LIMIT(_local1.posY + shakeDisp, SCREENY - _local1.height, 0);
_local1.dx = _local1.dx * 0.75;
_local1.dy = _local1.dy * 0.75;
_local1.MC._x = -_local1.posX;
_local1.MC._y = -_local1.posY;
_local1.MCgrfx.mist._x = _local1.mistX + _local1.posX;
_local1.MCgrfx.terrain_1._x = _local1.posX * _local1.ratio1X;
_local1.MCgrfx.terrain_1._y = 500 + (_local1.posY * _local1.ratio1Y);
_local1.MCgrfx.terrain_2._x = _local1.posX * _local1.ratio2X;
_local1.MCgrfx.terrain_2._y = 250 + (_local1.posY * _local1.ratio2Y);
_local1.posY = temp;
_local1.prevMouseX = _xmouse;
_local1.prevMouseY = _ymouse;
if (_local1.parent.stillInPlay) {
if (_local3 && (random(100) == 1)) {
_local1.parent.parent.sfx.play("coconuts" + (random(5) + 1));
}
if (_local2 && (random(100) == 1)) {
_local1.parent.parent.sfx.play("ni" + (random(3) + 1));
}
}
};
Terrain.prototype.resetView = function () {
var _local1 = this;
if (!_local1.parent.stillInPlay) {
_local1.focus = false;
}
var _local2 = 0.9;
var _local3 = 1 - _local2;
_local1.dx = (-_local1.posX) + ((_local1.posX * _local2) + (_local1.resetX * _local3));
_local1.dy = (-_local1.posY) + ((_local1.posY * _local2) + (_local1.resetY * _local3));
};
Terrain.prototype.instantResetView = function () {
var _local1 = this;
_local1.dx = (_local1.dy = 0);
_local1.posX = _local1.resetX;
_local1.posY = _local1.resetY;
_local1.focus = false;
};
Terrain.prototype.instantResetView2 = function () {
var _local1 = this;
_local1.dx = (_local1.dy = 0);
_local1.posX = _local1.resetX;
_local1.posY = _local1.resetY - 100;
_local1.focus = false;
};
Terrain.prototype.castleHit = function (pain) {
var _local1 = this;
var _local2 = pain;
if (!_local1.parent.stillInPlay) {
} else {
_local1.castleLife = _local1.castleLife - _local2;
_local1.parent.parent.castleLifeLeft = _local1.castleLife;
_local1.castlePain = 10;
if (_local2 > _local1.castleBiggestPain) {
_local1.castleBiggestPain = _local2;
var _local3 = LIMIT(Math.ceil(_local2 / 10), 1, 3);
_local1.parent.parent.sfx.play("castle" + _local3);
}
}
};
Terrain.prototype.castleHandle = function () {
var _local1 = this;
_local1.MChealth.gotoAndStop(Math.ceil((100 * _local1.castleLife) / 100) + 1);
if (_local1.castleLife <= 0) {
_local1.castleLife = 0;
_local1.parent.lose();
}
_local1.MCgrfx.castle.castle._y = -(_local1.castleLife * 2);
var _local2 = new Color(_local1.MCgrfx.castle);
if (!_local1.castlePain) {
_local2.setTransform(resetColorTransform);
_local1.castleBiggestPain = 0;
} else {
_local2.setTransform(hiliteColorTransform);
_local1.castlePain--;
_local1.MCgrfx.castle.dust.play();
_local1.shake = _local1.shake + (pain * 5);
}
};
Terrain.prototype.doFootStomp = function () {
var _local1 = this;
if (!_local1.parent.stillInPlay) {
} else {
_local1.castleHit(10);
_local1.shake = _local1.shake + 150;
}
};
function Level(parent, level) {
var _local1 = this;
_local1.parent = parent;
_local1.parent.control.active = true;
_local1.MC = _local1.parent.MC.createEmptyMovieClip("mc", 10);
_local1.level = level;
_local1.timer = 0;
_local1.levelUpCounter = 0;
_local1.stillInPlay = true;
_local1.victory = false;
_local1.levelUpCounterMax = 50;
_local1.parent.logger("level" + _local1.level);
_local1.helpMode = false;
if (_local1.level == 1) {
_local1.helpMode = true;
}
_local1.terrain = new Terrain(_local1);
_local1.parent.hud.radar = new Radar(_local1.parent.hud);
_local1.parent.flash();
_local1.parent.sfx.play("music_ingame_start");
if (TEAM == "fr") {
levelIntros[1] = "\"France\"\nAD 787";
levelPrimers[1] = "Catapult cows at\nthe two English knights!";
}
_local1.parent.hud.showMessage(levelIntros[_local1.level]);
if (!levelIntros[_local1.level].length) {
_local1.parent.hud.showMessage("Congratulations!\nBonus Level " + (_local1.level - 9));
}
}
var levelIntros = new Array("", "England\nAD 787", "Knights on horseback approach\nfiring arrows", "Brother Maynard has brought you\nthe Holy Hand Grenade", "'None shall pass.'", "'We are the Knights Who Say \"Ni\"!'", "Fetchez la vache!", "'There are some who call me Tim ...'", "10 knights on horseback ...", "Enjoy all these characters\nand more ...");
var levelPrimers = new Array("", "Catapult cows at\nthe two French knights!", "Defend your castle ...\nusing chickens!", "Hitting him will unleash\ndevestation upon your castle", "'Who dares to challenge\nthe Black Knight?'", "'Bring us ... a shrubbery!'", "'That rabbit has got\na vicious streak.'", "'I am an enchanter and\ncan summon fire!'", "... and only a single cow!", "At SPAMalot\u2122!");
Level.prototype.handle = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer == 60) {
_local1.parent.hud.showMessage(levelPrimers[_local1.level]);
if (!levelPrimers[_local1.level].length) {
_local1.parent.hud.showMessage("Defend your castle!");
}
}
if (_local1.timer == 100) {
_local1.terrain.focus = _local1.terrain.enemies[0];
}
_local1.terrain.handle();
if (!_local1.stillInPlay) {
_local1.outtro();
if (!_local1.terrain.focus) {
_local1.terrain.resetView();
}
}
};
Level.prototype.outtro = function () {
var _local1 = this;
_local1.levelUpCounter++;
if (_local1.levelUpCounter == 1) {
_local1.parent.flash(true);
if (_local1.victory) {
_local1.parent.hud.showMessage("You hath survived this attack ...\nyour quest continues!");
} else {
_local1.parent.hud.showMessage("Your castle layeth in tatters.\nGame over!");
}
}
if (_local1.levelUpCounter > 1) {
if (_local1.victory) {
}
}
if (_local1.levelUpCounter == _local1.levelUpCounterMax) {
if (_local1.victory) {
_local1.parent.levelUp();
} else {
_local1.parent.gameOver();
}
}
};
Level.prototype.win = function () {
var _local1 = this;
if (!_local1.stillInPlay) {
} else {
_local1.victory = true;
_local1.stillInPlay = false;
if (_local1.level < 10) {
_local1.parent.score = _local1.parent.score + (_local1.level * 100);
}
_local1.parent.sfx.play("music_ingame_stop");
}
};
Level.prototype.lose = function () {
var _local1 = this;
if (!_local1.stillInPlay) {
} else {
_local1.victory = false;
_local1.stillInPlay = false;
_local1.parent.sfx.play("music_ingame_stop");
_local1.parent.sfx.play("foot");
_local1.parent.sfx.play(OPPO + (random(6) + 1));
}
};
function Control(parent, left, right, up, down, fire) {
var _local1 = this;
_local1.parent = parent;
_local1.keyLEFT = left;
_local1.keyRIGHT = right;
_local1.keyUP = up;
_local1.keyDOWN = down;
_local1.keyFIRE = fire;
_local1.active = true;
_local1.LEFT = false;
_local1.RIGHT = false;
_local1.UP = false;
_local1.DOWN = false;
_local1.FIRE = false;
}
Control.prototype.handle = function () {
var _local1 = this;
_local1.LEFT = false;
_local1.RIGHT = false;
_local1.UP = false;
_local1.DOWN = false;
_local1.FIRE = false;
if (!_local1.active) {
} else {
if (Key.isDown(_local1.keyLEFT)) {
_local1.LEFT = true;
}
if (Key.isDown(_local1.keyRIGHT)) {
_local1.RIGHT = true;
}
if (Key.isDown(_local1.keyUP)) {
_local1.UP = true;
}
if (Key.isDown(_local1.keyDOWN)) {
_local1.DOWN = true;
}
if (Key.isDown(_local1.keyFIRE)) {
_local1.FIRE = true;
}
if (((_local1.LEFT || (_local1.RIGHT)) || (_local1.UP)) || (_local1.DOWN)) {
_local1.parent.focus = false;
}
}
};
function Hud(parent) {
var _local1 = this;
_local1.parent = parent;
_local1.MC = _local1.parent.MC.attachMovie("hud", "hud", 9996);
_local1.MC.messageUp.stop();
_local1.displayScore = 0;
}
Hud.prototype.handle = function () {
var _local1 = this;
_local1.radar.handle();
if (_local1.parent.score < _local1.displayScore) {
_local1.displayScore = 0;
}
if (_local1.displayScore < _local1.parent.score) {
if (_local1.displayScore < (_local1.parent.score - 10)) {
_local1.displayScore = _local1.displayScore + 10;
} else {
_local1.displayScore++;
}
if (_local1.parent.parent.state == "hidden") {
_local1.parent.parent.sfx.play("scoreup");
}
}
_local1.MC.readout = _local1.parent.fps;
_local1.MC.score = _local1.displayScore;
_local1.MC.level = _local1.parent.currentLevel;
_local1.MC.timer.countdown.gotoAndStop(Math.ceil(_local1.parent.level.timerPercent));
};
Hud.prototype.showMessage = function (message) {
var _local1 = this;
_local1.MC.messageUp.gotoAndPlay(2);
_local1.MC.messageUp.play();
_local1.MC.messageUp.message.message = message;
};
function SFX(parent) {
var _local1 = this;
_local1.parent = parent;
_local1.MC = _local1.parent.MC.attachMovie("soundFX", "soundFX", 3);
_local1.buffer = new Array();
}
SFX.prototype.handle = function () {
var _local1 = this.buffer.shift();
if (_local1.length) {
this.fire(_local1);
}
};
SFX.prototype.play = function (what) {
this.buffer.push(String(what));
};
SFX.prototype.fire = function (what) {
this.MC.gotoAndPlay(what);
};
function Game(parent) {
var _local1 = this;
_local1.parent = parent;
_local1.score = 0;
_local1.MC = _root.createEmptyMovieClip("Game", 1);
_local1.mask = _local1.MC.attachMovie("blank", "blank", 9999);
_local1.mask._width = SCREENX;
_local1.mask._height = SCREENY;
_local1.MC.setMask(_local1.mask);
_local1.hud = new Hud(_local1);
_local1.flasher = _local1.hud.MC.flasher;
_local1.sfx = _local1.parent.sfx;
_local1.castleLifeOriginal = (_local1.castleLifeLeft = 100);
_local1.totalKills = 0;
_local1.comms = new LoadVars();
if (_local1.parent.unlocked > 0) {
_local1.logger("unlock" + _local1.parent.unlocked);
}
_local1.currentLevel = 0;
_local1.levelUp();
}
Game.prototype.handle = function () {
var _local1 = this;
if (Key.isDown(52) && (Key.isDown(50))) {
if (!CHEATMODE) {
_local1.sfx.play("cheater", 100, 0);
}
CHEATMODE = true;
_local1.crackcount = 20;
}
if (CHEATMODE && (!_local1.crackcount)) {
if (Key.isDown(49)) {
_local1.sfx.play("cheater", 100, 0);
_local1.castleLifeLeft = (_local1.level.terrain.castleLife = _local1.castleLifeOriginal);
_local1.crackcount = 20;
}
if (Key.isDown(187)) {
_local1.sfx.play("cheater", 100, 0);
_local1.level.win();
_local1.crackcount = 20;
}
if (Key.isDown(189)) {
_local1.sfx.play("cheater", 100, 0);
_local1.level.lose();
_local1.crackcount = 20;
}
}
if (_local1.crackcount) {
_local1.crackcount--;
}
_local1.fps = _local1.calcFPS();
_local1.hud.handle();
_local1.level.handle();
};
Game.prototype.calcFPS = function () {
var _local1 = this;
_local1.currentTime = getTimer();
_local1.frameDuration = _local1.currentTime - _local1.previousTime;
_local1.previousTime = _local1.currentTime;
return(int(1000 / _local1.frameDuration));
};
Game.prototype.commsSync = function (write) {
trace("PING");
var _local1 = (((("http://" + HTTP_HOST) + "/flashcomms.php?vid=") + VID) + "&dc=") + random(100000);
if (write) {
_local1 = _local1 + ("&input=" + escape(encrypt(this.comms.toString(), SEED)));
}
this.comms.load(_local1);
};
Game.prototype.flash = function (inout) {
if (!inout) {
this.flasher.gotoAndPlay(1);
} else {
this.flasher.gotoAndPlay("in");
}
};
Game.prototype.gameOver = function () {
cursorState = "select";
this.parent.state = "gameover";
this.sfx.play("panel_gameover");
};
Game.prototype.levelUp = function () {
var _local1 = this;
_local1.currentLevel++;
_local1.level = new Level(_local1, _local1.currentLevel);
};
Game.prototype.logger = function (what) {
if (!HTTP_HOST.length) {
} else {
var _local1 = (((("http://" + HTTP_HOST) + "/logger.php?act=log_") + what) + "&dc=") + random(100000);
this.comms.load(_local1);
}
};
function Panel() {
var _local1 = this;
_local1.unlocked = 0;
_local1.activeTeam = "";
_local1.MC = _root.attachMovie("panel", "panel", 2);
_local1.MC.parent = _local1;
_local1.counter = 0;
_local1.state = "intro";
_local1.instructionsPage = 1;
_local1.instructionsPages = 4;
_local1.message = "";
_local1.sfx = new SFX(_local1);
_local1.sfx.play("music_intro_start");
}
Panel.prototype.handle = function () {
var _local1 = this;
_local1.draw();
_local1.game.handle();
_local1.sfx.handle();
};
Panel.prototype.draw = function () {
var _local1 = this;
_local1.MC._visible = true;
_quality = "hight";
if (_local1.state == "hidden") {
_local1.MC._visible = false;
_quality = "medium";
}
if (_local1.state == "gameover") {
_local1.MC.score = _local1.game.score + " points";
}
if (_local1.state == "intro") {
if (_local1.activeTeam == "") {
_local1.MC.splash.head_en._rotation = random(10) - 5;
_local1.MC.splash.head_fr._rotation = random(10) - 5;
}
if (_local1.MC.splash.spam_en._x > -250) {
_local1.MC.splash.spam_en._x = _local1.MC.splash.spam_en._x - 10;
}
if (_local1.MC.splash.spam_fr._x < 500) {
_local1.MC.splash.spam_fr._x = _local1.MC.splash.spam_fr._x + 10;
}
_local1.MC.splash.head_en._y = (_local1.MC.splash.head_fr._y = 320);
_local1.MC.splash.head_en._alpha = (_local1.MC.splash.head_fr._alpha = 100);
if (_local1.activeTeam == "en") {
if (_local1.MC.splash.spam_en._x < 0) {
_local1.MC.splash.spam_en._x = _local1.MC.splash.spam_en._x + 50;
}
_local1.MC.splash.head_en._rotation = random(20) - 10;
_local1.MC.splash.head_fr._rotation = 0;
_local1.MC.splash.head_fr._y = 370;
_local1.MC.splash.head_fr._alpha = 50;
} else if (_local1.activeTeam == "fr") {
if (_local1.MC.splash.spam_fr._x > 250) {
_local1.MC.splash.spam_fr._x = _local1.MC.splash.spam_fr._x - 50;
}
_local1.MC.splash.head_fr._rotation = random(20) - 10;
_local1.MC.splash.head_en._rotation = 0;
_local1.MC.splash.head_en._y = 370;
_local1.MC.splash.head_en._alpha = 50;
}
_local1.MC.splash.spam_en._x = MIN(_local1.MC.splash.spam_en._x, 0);
_local1.MC.splash.spam_fr._x = MAX(_local1.MC.splash.spam_fr._x, 250);
}
_local1.MC.gotoAndStop(_local1.state);
if (_local1.state == "instructions") {
_local1.MC.gotoAndStop(_local1.state + _local1.instructionsPage);
}
_local1.MC.message = _local1.message;
};
Panel.prototype.startGame = function () {
var _local1 = this;
_local1.state = "hidden";
_local1.sfx.play("music_intro_stop");
_local1.game = new Game(_local1);
};
Panel.prototype.pressPlay = function (choice) {
TEAM = choice;
OPPO = "en";
if (TEAM == "en") {
OPPO = "fr";
}
this.startGame();
};
Panel.prototype.pressInstructions = function () {
var _local1 = this;
_local1.sfx.play("stopVocals");
_local1.sfx.play("music_intro_stop");
_local1.sfx.play("panel_instructions");
_local1.sfx.play("coconut" + (random(4) + 1));
_local1.state = "instructions";
_local1.instructionsPage = 1;
};
Panel.prototype.pressUnlock = function () {
var _local1 = this;
_local1.sfx.play("stopVocals");
_local1.sfx.play("music_intro_stop");
_local1.sfx.play("panel_unlock");
_local1.sfx.play("coconut" + (random(4) + 1));
_local1.state = "unlock";
};
Panel.prototype.pressNext = function () {
var _local1 = this;
_local1.sfx.play("coconut" + (random(4) + 1));
if (_local1.instructionsPage < _local1.instructionsPages) {
_local1.instructionsPage++;
}
};
Panel.prototype.pressPrevious = function () {
var _local1 = this;
_local1.sfx.play("coconut" + (random(4) + 1));
if (_local1.instructionsPage > 1) {
_local1.instructionsPage--;
}
};
Panel.prototype.pressContinue = function () {
var _local1 = this;
if (_local1.state == "submitting") {
} else {
_local1.sfx.play("coconut" + (random(4) + 1));
_local1.state = "submitting";
trace("I submit score!");
var _local2 = _root.createEmptyMovieClip("poster", 1000);
_local2.blob = encrypt((((("(score)" + _local1.game.score) + "(unlocked)") + _local1.unlocked) + "(team)") + TEAM, 1);
_local2.act = "parseblob";
_local2.getURL(("http://" + http_host) + "/submit.php", "_self", "post");
}
};
Panel.prototype.pressAgain = function () {
var _local1 = this;
_local1.sfx.play("coconut" + (random(4) + 1));
_local1.sfx.play("music_intro_start");
_local1.state = "intro";
};
Panel.prototype.pressUnlockSubmit = function (stab) {
var _local3 = this;
var _local2 = false;
var _local1 = 0;
while (_local1 < validCodes.length) {
if (String(stab) == String(validCodes[_local1])) {
if (usedCodes[_local1]) {
} else {
usedCodes[_local1] = true;
_local2 = true;
}
break;
}
_local1++;
}
if (stab == "4T2") {
_local3.sfx.play("cheater");
_local2 = true;
}
if (!_local2) {
_local3.sfx.play("hit" + (random(5) + 1));
} else {
_local3.unlocked++;
if (_local3.unlocked > 4) {
_local3.unlocked = 4;
}
_local3.sfx.play("unlock");
_local3.MC.unlock.gotoAndStop(_local3.unlocked + 1);
}
};
validCodes = new Array("037600209571", "037600104029", "037600403221", "037600181716");
usedCodes = new Array(false, false, false, false);
fscommand ("allowscale", false);
fscommand ("showmenu", false);
fscommand ("trapallkeys", true);
_quality = "medium";
HTTP_HOST = _level0.http_host;
if (!HTTP_HOST.length) {
HTTP_HOST = "www.spamspamspamspam.co.uk";
}
VID = _level0.vid;
if (!VID.length) {
VID = "madeupvid";
}
SEED = VID.substr(VID.length - 1, 1);
RAD = (Math.PI/180);
initiateTrig();
SCREENX = 500;
SCREENY = 400;
SCREENX2 = SCREENX / 2;
SCREENY2 = SCREENY / 2;
CHEATMODE = false;
MOUSEDOWN = false;
FRAMECOUNTER = 0;
DOUBLECLICK = false;
MOUSEUPCOUNTER = 0;
GRAVITY = 0.9;
cursor = _root.attachMovie("cursor", "cursor", 100);
cursorState = "select";
panel = new Panel();
onEnterFrame = function () {
FRAMECOUNTER++;
panel.handle();
if (((((!cursorState.length) || (_xmouse < 0)) || (_xmouse > SCREENX)) || (_ymouse < 0)) || (_ymouse > SCREENY)) {
cursor._visible = false;
Mouse.show();
} else {
cursor._visible = true;
Mouse.hide();
cursor.gotoAndStop(cursorState);
}
};
onMouseMove = function () {
cursor._x = _xmouse;
cursor._y = _ymouse;
};
onMouseDown = function () {
MOUSEDOWN = true;
DOUBLECLICK = false;
if ((FRAMECOUNTER - MOUSEUPCOUNTER) < 3) {
DOUBLECLICK = true;
}
};
onMouseUp = function () {
MOUSEDOWN = false;
MOUSEUPCOUNTER = FRAMECOUNTER;
};
stop();
Symbol 3 MovieClip [spit] Frame 21
this.removeMovieClip();
Symbol 63 MovieClip Frame 1
stop();
Symbol 88 Button
on (release, keyPress "h") {
parent.pressInstructions();
}
Symbol 91 Button
on (release, keyPress "u") {
parent.pressUnlock();
}
Symbol 94 Button
on (release, keyPress "<Space>") {
parent.pressPlay("en");
}
on (rollOver) {
this.parent.sfx.play("whoosh" + (random(3) + 1));
if (parent.activeTeam != "en") {
this.parent.sfx.play("stopVocals");
this.parent.sfx.play("en" + (random(6) + 1));
}
parent.activeTeam = "en";
}
on (rollOut) {
parent.activeTeam = "";
}
Symbol 99 Button
on (release, keyPress "f") {
parent.pressPlay("fr");
}
on (rollOver) {
this.parent.sfx.play("whoosh" + (random(3) + 1));
if (parent.activeTeam != "fr") {
this.parent.sfx.play("stopVocals");
this.parent.sfx.play("fr" + (random(6) + 1));
}
parent.activeTeam = "fr";
}
on (rollOut) {
parent.activeTeam = "";
}
Symbol 102 MovieClip Frame 10
stop();
Symbol 109 Button
on (release, keyPress "<Right>") {
parent.pressNext();
}
Symbol 121 MovieClip Frame 10
stop();
Symbol 124 Button
on (release, keyPress "<Left>") {
parent.pressPrevious();
}
Symbol 136 Button
on (release, keyPress "<Space>") {
parent.pressPlay("en");
}
Symbol 140 Button
on (release, keyPress "f") {
parent.pressPlay("fr");
}
Symbol 143 Button
on (release, keyPress "u") {
parent.pressUnlock();
}
Symbol 146 Button
on (release, keyPress "f") {
parent.pressUnlockSubmit(stab);
}
Symbol 163 MovieClip Frame 1
stop();
Symbol 170 Button
on (release) {
parent.pressContinue();
}
Symbol 174 Button
on (release, keyPress "<Space>") {
parent.pressAgain();
}
Symbol 274 MovieClip [soundFX] Frame 1
stop();
Symbol 274 MovieClip [soundFX] Frame 10
play();
Symbol 274 MovieClip [soundFX] Frame 19
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 20
play();
Symbol 274 MovieClip [soundFX] Frame 29
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 35
play();
Symbol 274 MovieClip [soundFX] Frame 44
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 45
play();
Symbol 274 MovieClip [soundFX] Frame 54
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 55
play();
Symbol 274 MovieClip [soundFX] Frame 64
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 65
play();
Symbol 274 MovieClip [soundFX] Frame 74
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 75
play();
Symbol 274 MovieClip [soundFX] Frame 84
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 85
play();
Symbol 274 MovieClip [soundFX] Frame 94
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 95
play();
Symbol 274 MovieClip [soundFX] Frame 104
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 105
play();
Symbol 274 MovieClip [soundFX] Frame 114
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 115
play();
Symbol 274 MovieClip [soundFX] Frame 124
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 125
play();
Symbol 274 MovieClip [soundFX] Frame 134
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 135
play();
Symbol 274 MovieClip [soundFX] Frame 144
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 145
play();
Symbol 274 MovieClip [soundFX] Frame 154
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 155
play();
Symbol 274 MovieClip [soundFX] Frame 164
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 165
play();
Symbol 274 MovieClip [soundFX] Frame 174
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 175
play();
Symbol 274 MovieClip [soundFX] Frame 184
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 185
play();
Symbol 274 MovieClip [soundFX] Frame 194
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 195
play();
Symbol 274 MovieClip [soundFX] Frame 204
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 205
play();
Symbol 274 MovieClip [soundFX] Frame 214
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 215
play();
Symbol 274 MovieClip [soundFX] Frame 224
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 225
play();
Symbol 274 MovieClip [soundFX] Frame 234
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 235
play();
Symbol 274 MovieClip [soundFX] Frame 244
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 245
play();
Symbol 274 MovieClip [soundFX] Frame 254
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 255
play();
Symbol 274 MovieClip [soundFX] Frame 264
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 265
play();
Symbol 274 MovieClip [soundFX] Frame 274
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 275
play();
Symbol 274 MovieClip [soundFX] Frame 284
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 285
play();
Symbol 274 MovieClip [soundFX] Frame 294
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 295
play();
Symbol 274 MovieClip [soundFX] Frame 304
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 305
play();
Symbol 274 MovieClip [soundFX] Frame 314
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 315
play();
Symbol 274 MovieClip [soundFX] Frame 324
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 325
play();
Symbol 274 MovieClip [soundFX] Frame 334
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 335
play();
Symbol 274 MovieClip [soundFX] Frame 344
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 345
play();
Symbol 274 MovieClip [soundFX] Frame 354
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 355
play();
Symbol 274 MovieClip [soundFX] Frame 364
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 365
play();
Symbol 274 MovieClip [soundFX] Frame 374
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 375
play();
Symbol 274 MovieClip [soundFX] Frame 384
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 385
play();
Symbol 274 MovieClip [soundFX] Frame 394
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 395
play();
Symbol 274 MovieClip [soundFX] Frame 404
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 405
play();
Symbol 274 MovieClip [soundFX] Frame 414
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 415
play();
Symbol 274 MovieClip [soundFX] Frame 424
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 425
play();
Symbol 274 MovieClip [soundFX] Frame 434
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 435
play();
Symbol 274 MovieClip [soundFX] Frame 444
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 445
play();
Symbol 274 MovieClip [soundFX] Frame 454
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 455
play();
Symbol 274 MovieClip [soundFX] Frame 464
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 465
play();
Symbol 274 MovieClip [soundFX] Frame 474
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 475
play();
Symbol 274 MovieClip [soundFX] Frame 484
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 485
play();
Symbol 274 MovieClip [soundFX] Frame 494
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 495
play();
Symbol 274 MovieClip [soundFX] Frame 504
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 505
play();
Symbol 274 MovieClip [soundFX] Frame 514
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 515
play();
Symbol 274 MovieClip [soundFX] Frame 524
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 525
play();
Symbol 274 MovieClip [soundFX] Frame 534
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 535
play();
Symbol 274 MovieClip [soundFX] Frame 544
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 545
play();
Symbol 274 MovieClip [soundFX] Frame 554
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 555
play();
Symbol 274 MovieClip [soundFX] Frame 564
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 565
play();
Symbol 274 MovieClip [soundFX] Frame 574
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 575
play();
Symbol 274 MovieClip [soundFX] Frame 584
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 585
play();
Symbol 274 MovieClip [soundFX] Frame 594
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 595
play();
Symbol 274 MovieClip [soundFX] Frame 604
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 605
play();
Symbol 274 MovieClip [soundFX] Frame 614
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 615
play();
Symbol 274 MovieClip [soundFX] Frame 624
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 625
play();
Symbol 274 MovieClip [soundFX] Frame 634
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 635
play();
Symbol 274 MovieClip [soundFX] Frame 644
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 645
play();
Symbol 274 MovieClip [soundFX] Frame 654
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 655
play();
Symbol 274 MovieClip [soundFX] Frame 664
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 665
play();
Symbol 274 MovieClip [soundFX] Frame 674
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 675
play();
Symbol 274 MovieClip [soundFX] Frame 684
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 685
play();
Symbol 274 MovieClip [soundFX] Frame 694
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 695
play();
Symbol 274 MovieClip [soundFX] Frame 704
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 705
play();
Symbol 274 MovieClip [soundFX] Frame 714
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 715
play();
Symbol 274 MovieClip [soundFX] Frame 724
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 725
play();
Symbol 274 MovieClip [soundFX] Frame 734
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 735
play();
Symbol 274 MovieClip [soundFX] Frame 744
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 745
play();
Symbol 274 MovieClip [soundFX] Frame 754
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 755
play();
Symbol 274 MovieClip [soundFX] Frame 764
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 765
play();
Symbol 274 MovieClip [soundFX] Frame 774
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 775
play();
Symbol 274 MovieClip [soundFX] Frame 784
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 785
play();
Symbol 274 MovieClip [soundFX] Frame 794
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 795
play();
Symbol 274 MovieClip [soundFX] Frame 804
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 805
play();
Symbol 274 MovieClip [soundFX] Frame 814
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 815
play();
Symbol 274 MovieClip [soundFX] Frame 824
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 825
play();
Symbol 274 MovieClip [soundFX] Frame 834
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 835
play();
Symbol 274 MovieClip [soundFX] Frame 844
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 845
play();
Symbol 274 MovieClip [soundFX] Frame 854
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 855
play();
Symbol 274 MovieClip [soundFX] Frame 864
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 865
play();
Symbol 274 MovieClip [soundFX] Frame 874
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 875
play();
Symbol 274 MovieClip [soundFX] Frame 884
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 885
play();
Symbol 274 MovieClip [soundFX] Frame 894
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 895
play();
Symbol 274 MovieClip [soundFX] Frame 904
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 905
play();
Symbol 274 MovieClip [soundFX] Frame 914
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 915
play();
Symbol 274 MovieClip [soundFX] Frame 924
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 925
play();
Symbol 274 MovieClip [soundFX] Frame 934
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 935
play();
Symbol 274 MovieClip [soundFX] Frame 944
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 945
play();
Symbol 274 MovieClip [soundFX] Frame 954
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 955
play();
Symbol 274 MovieClip [soundFX] Frame 964
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 965
play();
Symbol 274 MovieClip [soundFX] Frame 974
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 975
play();
Symbol 274 MovieClip [soundFX] Frame 984
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 985
play();
Symbol 274 MovieClip [soundFX] Frame 994
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 995
play();
Symbol 274 MovieClip [soundFX] Frame 1004
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 1005
play();
Symbol 274 MovieClip [soundFX] Frame 1014
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 1015
play();
Symbol 274 MovieClip [soundFX] Frame 1024
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 1025
play();
Symbol 274 MovieClip [soundFX] Frame 1034
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 1035
play();
Symbol 274 MovieClip [soundFX] Frame 1044
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 1045
play();
Symbol 274 MovieClip [soundFX] Frame 1054
gotoAndStop (1);
Symbol 274 MovieClip [soundFX] Frame 1055
play();
Symbol 274 MovieClip [soundFX] Frame 1064
gotoAndStop (1);
Symbol 279 MovieClip [flash] Frame 20
stop();
Symbol 279 MovieClip [flash] Frame 70
stop();
Symbol 297 MovieClip Frame 46
gotoAndStop (1);
Symbol 304 MovieClip [scoreUp] Frame 41
this.removeMovieClip();
Symbol 318 MovieClip Frame 1
stop();
Symbol 326 MovieClip [foot] Frame 1
stop();
Symbol 326 MovieClip [foot] Frame 40
this._parent.parent.doFootStomp();
Symbol 376 MovieClip [pointer] Frame 50
stop();
Symbol 387 MovieClip [explosion] Frame 11
stop();
this.removeMovieClip();
Symbol 401 MovieClip [cursor] Frame 1
stop();
Symbol 417 MovieClip [blood] Frame 20
this.removeMovieClip();