Frame 1
stop();
Frame 3
playing = 0;
_root.createEmptyMovieClip("invo", 900);
invo = new Sound(invo);
invo.attachSound("invo");
_root.createEmptyMovieClip("bgstart", 901);
bgstart = new Sound(bgstart);
bgstart.attachSound("bgstart");
_root.createEmptyMovieClip("bg1", 902);
bg1 = new Sound(bg1);
bg1.attachSound("bg1");
_root.createEmptyMovieClip("bg2", 903);
bg2 = new Sound(bg2);
bg2.attachSound("bg2");
_root.createEmptyMovieClip("bg3", 904);
bg3 = new Sound(bg3);
bg3.attachSound("bg3");
_root.createEmptyMovieClip("bgend", 905);
bgend = new Sound(bgend);
bgend.attachSound("bgend");
_root.createEmptyMovieClip("mortar", 906);
mortar = new Sound(mortar);
mortar.attachSound("mortar");
_root.createEmptyMovieClip("chomp", 907);
chomp = new Sound(chomp);
chomp.attachSound("chomp");
chomp.setVolume(50);
vol = 50;
bgm = new Array();
bgm = [bgstart, bg1, bg2, bg3];
if (playing == 0) {
bgm[0].start(0, 9999);
playing = 1;
}
Frame 4
function levreset() {
goval = 0;
cratehit = 0;
gonum = 0;
zomkilled = 0;
zcreated = 0;
zcreatelimit = 7;
newlev = 0;
speed = speed - 0.75;
}
dogf = new Array();
dogf = [0, 0, 0, 0, 0, 0, 0];
dogx = new Array();
dogx = [-50, -50, -50, -50, -50, -50, -50];
dogy = new Array();
dogy = [-50, -50, -50, -50, -50, -50, -50];
offscreen = -50;
zomkilledtot = 0;
play();
Frame 5
gotoAndPlay ("start");
Frame 6
function gunpoint() {
xdiff = gx - target._x;
ydiff = gy - target._y;
gunro = ((Math.atan2(ydiff, xdiff) * 180) / Math.PI) - 90;
if (gunro > 35) {
gunro = 35;
} else if ((gunro < 0) && (gunro > -180)) {
gunro = 0;
} else if (gunro < -180) {
gunro = 35;
}
gun._rotation = gunro;
ag = _rotation;
updateAfterEvent();
}
function targetmove() {
target._x = _xmouse;
target._y = _ymouse;
gunpoint();
}
function countinc() {
count++;
if (count > 100) {
count = 0;
}
}
function powerscale() {
gun.power._alpha = 100;
}
function dogcalc() {
if (dogf[0] == 0) {
dogf[0] = 1;
dogstart = 0;
} else if (dogf[1] == 0) {
dogf[1] = 1;
dogstart = 1;
} else if (dogf[2] == 0) {
dogf[2] = 1;
dogstart = 2;
} else if (dogf[3] == 0) {
dogf[3] = 1;
dogstart = 3;
} else if (dogf[4] == 0) {
dogf[4] = 1;
dogstart = 4;
} else if (dogf[5] == 0) {
dogf[5] = 1;
dogstart = 5;
} else if (dogf[6] == 0) {
dogf[6] = 1;
dogstart = 6;
} else {
reloading.play();
}
tx = target._x;
ty = target._y;
finalvel = finalvel + 10;
dvel = finalvel / veldivider;
dydif = gy - ty;
dydif = Math.sqrt(dydif * dydif);
dxdif = tx - gx;
if (dxdif > (dydif * 0.7)) {
dxdif = dydif * 0.7;
}
dh = Math.sqrt((dxdif * dxdif) + (dydif * dydif));
ratio = dvel / dh;
dxmove = dxdif * ratio;
dymove = (dydif * ratio) * -1;
dogs[dogstart]._x = gx + (dxmove * 4);
dogs[dogstart]._y = gy + (dymove * 4);
dogx[dogstart] = dxmove;
dogy[dogstart] = dymove;
}
function dogmove() {
i = 0;
while (i < 7) {
if (dogf[i] == 1) {
dx1 = dogs[i]._x;
dy1 = dogs[i]._y;
dogs[i]._x = dogs[i]._x + dogx[i];
dogy[i] = dogy[i] + gravity;
dogs[i]._y = dogs[i]._y + dogy[i];
dx2 = dogs[i]._x;
dy2 = dogs[i]._y;
dogtomove = dogs[i];
if (dogs[i]._y >= (gy + 15)) {
dogf[i] = 0;
dogs[i]._x = offscreen;
dogs[i]._y = offscreen;
}
dxdiff = dx1 - dx2;
dydiff = dy1 - dy2;
dogrot = dogs[i]._rotation;
dognextrot = ((Math.atan2(dydiff, dxdiff) * 180) / Math.PI) - 180;
dogdiff = dogrot - dognextrot;
if ((dogdiff < -10) || (dogdiff > 10)) {
dogs[i]._rotation = dognextrot;
}
}
i++;
}
}
function lcchange() {
newlev = 1;
if (diff == 1) {
ammo = 9000;
} else if (diff == 2) {
ammo = 30;
} else if (diff == 3) {
ammo = ammo + 5;
}
level++;
bg.play();
}
gravity = 0.6;
veldivider = 1.7;
gx = gun._x;
gy = gun._y;
score = Math.round(score);
scoredisp = "Score " + score;
ammodisp = "Dogs " + ammo;
dogs = new Array();
dogs = [d0, d1, d2, d3, d4, d5, d6];
function kittycounter() {
if (zcreated < zpl) {
melons[gonum].go = 1;
melons[gonum]._y = gy + 12;
melons[gonum].rotdone = 0;
if (((kcount >= 2) || (gonum < melstartval)) && (zcreatelimit > 0)) {
gonum++;
zcreated++;
zcreatelimit--;
kcount = 0;
speed = speed + 0.25;
}
if (level == 0) {
if ((kcount >= 2) && (zcreatelimit == 0)) {
kcount = 0;
speed = speed + 0.25;
}
}
}
}
function kittymove() {
i = 0;
while (i < 7) {
if (melons[i].go == 1) {
if (melons[i].rotdone != 1) {
melons[i].chomp._rotation = (Math.random() - 0.5) * 30;
}
if (((melons[i].movethis == 0) && (melons[i].reset == 1)) && (zcreated < zpl)) {
zcreated++;
melons[i]._x = (Math.random() * (Stage.width - 250)) + 250;
melons[i].movethis = 1;
melons[i].reset = 0;
melons[i].gotoAndPlay(1);
}
if (melons[i].movethis == 1) {
if (melons[i]._x > gx) {
melons[i]._x = melons[i]._x - speed;
}
}
if (melons[i]._x < gx) {
goval = 1;
munch[i]._x = melons[i]._x;
munch[i]._y = melons[i]._y - 35;
munch[i].play();
gameover.finalscore = "You scored " + Math.round(score);
if (level >= 1) {
gameover.zomleft = ("There were " + (90 - zomkilledtot)) + " zombies left to kill";
gotoAndPlay ("go");
} else if (zomkilledtot == 1) {
lctext = ("You killed " + zomkilledtot) + " zombie before being nibbled";
gotoAndPlay ("end");
} else {
lctext = ("You killed " + zomkilledtot) + " zombies before being nibbled";
gotoAndPlay ("end");
}
}
j = 0;
while (j < 7) {
if (dogf[j] == 1) {
if (melons[i].hit != 1) {
if (melons[i].hitTest(dogs[j])) {
chomp.start(0, 1);
zomkilled++;
zomkilledtot++;
kcount++;
scores[i].score = Math.round(melons[i]._x);
scores[i].play();
scores[i]._x = melons[i]._x + 35;
scores[i]._y = melons[i]._y - 35;
melons[i].hit = 1;
melons[i].gotoAndPlay("chomp");
score = score + melons[i]._x;
score = Math.round(score);
scoredisp = "Score " + score;
if (zomkilled >= zpl) {
if (level == 3) {
lctext = ("Level " + level) + " survived";
gotoAndPlay ("end");
} else {
lctext = ("Level " + level) + " survived";
gotoAndPlay ("lcloop");
}
}
}
}
}
j++;
}
}
i++;
}
}
melons = new Array();
melons = [m0, m1, m2, m3, m4, m5, m6];
scores = new Array();
scores = [s0, s1, s2, s3, s4, s5, s6];
munch = new Array();
munch = [mun0, mun1, mun2, mun3, mun4, mun5, mun6];
Instance of Symbol 141 MovieClip "crate" in Frame 6
onClipEvent (enterFrame) {
if (_root.cratehit == 1) {
k = 0;
while (k < 7) {
if (_root.dogs[k].hitTest(_root.crate)) {
_root.crate.gotoAndStop("stop");
_root.cratehit = 2;
_root.ammo = _root.ammo + _root.cratefill;
}
k++;
}
}
}
Frame 7
if (playing == 0) {
bgm[level - 1].stop();
bgm[level].start(0, 9999);
playing = 1;
}
kittycounter();
kittymove();
_root.onEnterFrame = function () {
targetmove();
countinc();
dogmove();
if (gunpow > 0) {
test = 1;
gun.power._yscale = count;
} else {
test = 0;
gun.power._yscale = 0;
}
if ((ammo <= cratelevel) && (cratehit == 0)) {
crate.gotoAndPlay(1);
crate._y = gy + 15;
cratehit = 1;
}
if (cratehit == 2) {
cratehit = 0;
cratetextmc._x = _root.crate._x;
cratetextmc._y = _root.gy - 15;
cratetextmc.gotoAndPlay(1);
}
if (ammo <= 0) {
ooa.play();
} else {
ooa.stop();
}
if (goval == 1) {
gameover._alpha = 100;
} else {
gameover._alpha = 0;
}
if (newlev == 1) {
levreset();
}
};
Frame 8
gotoAndPlay ("loop");
Frame 9
if (endplay != 1) {
stopAllSounds();
bgstart.start(0, 9999);
endplay = 1;
}
gun.power._alpha = 0;
play();
Frame 10
gotoAndPlay ("go");
Frame 11
lccount++;
if (lccount >= 80) {
lccount = 0;
gotoAndPlay ("loop");
lcchange();
playing = 0;
}
Frame 12
gotoAndPlay ("lcloop");
Frame 13
if (endplay != 1) {
stopAllSounds();
bgend.start(0, 9999);
endplay = 1;
}
score = Math.round(score);
Frame 14
stop();
highscoretitle = tablename + " HIGH SCORES";
submitButton.onRelease = function () {
sendData = new LoadVars();
sendData.playerOutput = _root.playerInput.text;
sendData.scoreOutput = _root.scoreInput.text;
sendData.tablename = _root.tablename;
statusText.text = "Sending data\nPlease wait";
sendData.onLoad = function () {
if (sendData.result == "added") {
statusText.text = "Player score added";
_root.playerInput.text = "";
_root.scoreInput.text = "";
gotoAndStop ("highscores");
} else {
statusText.text = "Error adding score";
}
};
sendData.sendAndLoad("http://www.matazone.co.uk/mitgame/insertScoremitgame.php", sendData, "POST");
};
Frame 15
stop();
loadData = new LoadVars();
statusText.text = "Loading scoreboard\nPlease wait";
if (tablename == "easy") {
loadData.onLoad = function () {
if (loadData.result == "okay") {
statusText.text = "";
var _local1 = 0;
while (_local1 <= (loadData.rows - 1)) {
positionText.text = positionText.text + ((_local1 + 1) + newline);
playerText.text = playerText.text + (loadData["player" + _local1] + newline);
scoreText.text = scoreText.text + (loadData["score" + _local1] + newline);
_local1++;
}
} else {
statusText.text = "Error loading data.";
}
};
loadData.load("http://www.matazone.co.uk/mitgame/showScoresmitgameeasy.php?" + Math.round(Math.random() * 1000000));
} else if (tablename == "normal") {
loadData.onLoad = function () {
if (loadData.result == "okay") {
statusText.text = "";
var _local1 = 0;
while (_local1 <= (loadData.rows - 1)) {
positionText.text = positionText.text + ((_local1 + 1) + newline);
playerText.text = playerText.text + (loadData["player" + _local1] + newline);
scoreText.text = scoreText.text + (loadData["score" + _local1] + newline);
_local1++;
}
} else {
statusText.text = "Error loading data.";
}
};
loadData.load("http://www.matazone.co.uk/mitgame/showScoresmitgamenormal.php?" + Math.round(Math.random() * 1000000));
} else if (tablename == "hard") {
loadData.onLoad = function () {
if (loadData.result == "okay") {
statusText.text = "";
var _local1 = 0;
while (_local1 <= (loadData.rows - 1)) {
positionText.text = positionText.text + ((_local1 + 1) + newline);
playerText.text = playerText.text + (loadData["player" + _local1] + newline);
scoreText.text = scoreText.text + (loadData["score" + _local1] + newline);
_local1++;
}
} else {
statusText.text = "Error loading data.";
}
};
loadData.load("http://www.matazone.co.uk/mitgame/showScoresmitgamehard.php?" + Math.round(Math.random() * 1000000));
} else if (tablename == "imposs") {
loadData.onLoad = function () {
if (loadData.result == "okay") {
statusText.text = "";
var _local1 = 0;
while (_local1 <= (loadData.rows - 1)) {
positionText.text = positionText.text + ((_local1 + 1) + newline);
playerText.text = playerText.text + (loadData["player" + _local1] + newline);
scoreText.text = scoreText.text + (loadData["score" + _local1] + newline);
_local1++;
}
} else {
statusText.text = "Error loading data.";
}
};
loadData.load("http://www.matazone.co.uk/mitgame/showScoresmitgameimposs.php?" + Math.round(Math.random() * 1000000));
} else if (tablename == "endurance") {
loadData.onLoad = function () {
if (loadData.result == "okay") {
statusText.text = "";
var _local1 = 0;
while (_local1 <= (loadData.rows - 1)) {
positionText.text = positionText.text + ((_local1 + 1) + newline);
playerText.text = playerText.text + (loadData["player" + _local1] + newline);
scoreText.text = scoreText.text + (loadData["score" + _local1] + newline);
_local1++;
}
} else {
statusText.text = "Error loading data.";
}
};
loadData.load("http://www.matazone.co.uk/mitgame/showScoresmitgameendurance.php?" + Math.round(Math.random() * 1000000));
} else {
statusText.text = "Either the tables are buggered or\nyou're not playing on matazone dot co dot uk";
}
stop();
Symbol 32 Button
on (release) {
_root.play();
}
Symbol 33 MovieClip Frame 1
_root.stop();
PercentLoaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
_root.play();
}
Symbol 33 MovieClip Frame 2
gotoAndPlay (1);
Symbol 33 MovieClip Frame 3
stop();
Symbol 40 Button
on (release) {
getURL ("http://www.matazone.co.uk/theotherside.html");
}
Symbol 56 Button
on (release) {
ammo = 20;
ammocrates = true;
level = 0;
diff = 0;
tablename = "endurance";
score = 0;
cratelevel = 10;
cratefill = 10;
cratetext = cratefill + " MORE DOGS!";
zpl = 999999999 /* 0x3B9AC9FF */;
speed = 1;
melstartval = 1;
newlev = 1;
stopAllSounds();
bgm[1].start(0, 9999);
playing = 1;
gotoAndPlay ("intro");
}
Symbol 59 Button
on (release) {
ammo = 10;
ammocrates = true;
level = 1;
diff = 3;
tablename = "hard";
score = 0;
cratelevel = 10;
cratefill = 5;
cratetext = cratefill + " MORE DOGS!";
speed = 1.75;
zpl = 30;
melstartval = 3;
newlev = 1;
stopAllSounds();
bgm[1].start(0, 9999);
playing = 1;
gotoAndPlay ("intro");
}
Symbol 62 Button
on (release) {
ammo = 20;
ammocrates = true;
level = 1;
diff = 2;
tablename = "normal";
score = 0;
cratelevel = 10;
cratefill = 10;
cratetext = cratefill + " MORE DOGS!";
speed = 1.4;
zpl = 30;
melstartval = 2;
newlev = 1;
stopAllSounds();
bgm[1].start(0, 9999);
playing = 1;
gotoAndPlay ("intro");
}
Symbol 65 Button
on (release) {
ammo = 9000;
ammocrates = false;
level = 1;
diff = 1;
tablename = "easy";
score = 0;
cratelevel = 4000;
cratefill = 4000;
cratetext = cratefill + " MORE DOGS!";
speed = 1;
zpl = 30;
melstartval = 1;
newlev = 1;
stopAllSounds();
bgm[1].start(0, 9999);
playing = 1;
gotoAndPlay ("intro");
}
Symbol 69 Button
on (release) {
ammo = 50;
ammocrates = false;
level = 1;
diff = 4;
tablename = "imposs";
score = 0;
cratelevel = -2;
cratefill = 0;
cratetext = cratefill + " MORE DOGS!";
speed = 2;
zpl = 30;
melstartval = 4;
newlev = 1;
stopAllSounds();
bgm[1].start(0, 9999);
playing = 1;
gotoAndPlay ("intro");
}
Symbol 74 Button
on (release) {
_root.play();
}
Symbol 112 MovieClip Frame 1
hit = 0;
Symbol 112 MovieClip Frame 8
reset = 0;
movethis = 0;
hit = 0;
Symbol 112 MovieClip Frame 14
movethis = 1;
Symbol 112 MovieClip Frame 15
stop();
Symbol 112 MovieClip Frame 16
movethis = 0;
Symbol 112 MovieClip Frame 31
reset = 1;
hit = 0;
stop();
Symbol 131 MovieClip Frame 1
_root.stop();
Symbol 131 MovieClip Frame 463
_root.stop();
_root.play();
Symbol 136 MovieClip Frame 46
stop();
Symbol 141 MovieClip Frame 13
stop();
Symbol 141 MovieClip Frame 14
stop();
Symbol 141 MovieClip Frame 15
stop();
Symbol 141 MovieClip Frame 16
stop();
Symbol 141 MovieClip Frame 17
stop();
Symbol 141 MovieClip Frame 18
stop();
Symbol 141 MovieClip Frame 19
stop();
Symbol 141 MovieClip Frame 20
stop();
Symbol 141 MovieClip Frame 21
stop();
Symbol 151 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 31
gotoAndPlay ("mloop");
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 50
gotoAndPlay ("loop");
Symbol 159 MovieClip Frame 1
stop();
Symbol 161 Button
on (press) {
if ((ammo > 0) && (goval == 0)) {
count = 0;
powerscale();
gunpow = 1;
}
}
on (release) {
if ((ammo > 0) && (goval == 0)) {
finalvel = count;
gun.power._alpha = 0;
gunpow = 0;
ammo--;
dogcalc();
mortar.start(0, 1);
ammodisp = "Dogs " + ammo;
} else {
gun.power._alpha = 0;
}
}
on (releaseOutside) {
if ((ammo > 0) && (goval == 0)) {
finalvel = count;
gun.power._alpha = 0;
gunpow = 0;
ammo--;
dogcalc();
mortar.start(0, 1);
ammodisp = "Dogs " + ammo;
} else {
gun.power._alpha = 0;
}
}
Symbol 165 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 2
stop();
Symbol 165 MovieClip Frame 3
stop();
Symbol 169 Button
on (release) {
getURL ("http://www.matazone.co.uk/menus/mittensmenu.html");
}
Symbol 171 Button
on (release) {
gotoAndPlay ("start");
endplay = 0;
}
Symbol 187 MovieClip Frame 351
stop();
Symbol 188 Button
on (release) {
getURL ("http://www.matazone.co.uk/menus/mittensmenu.html");
}