Frame 1
stop();
Frame 4
_root.noSound = 0;
Frame 138
_root.elementArr = new Array();
_root.elementArr.mower = "An uncontrollable tool is always a problem but this lunatic lawnmower is in a grass of it's own. Avoid it's maniac machinations on your hallowed turf if you don't want to get cut down to size.";
_root.elementArr.shears = "Shear terror lurks around the edges of your turf, watch out for these scissoring saboteurs if you don't want to lose your toes!";
_root.elementArr.sand = "Make life a beach for your turf thieving terrors. Stop them completely for a brief time with a spadeful of sand.";
_root.elementArr.biogro = "No drugs testing in the grass growing game so pile on the Bio-Gro at every chance you get. You'll double the speed you can turf at.";
_root.elementArr.boots = "One of these days these boots are gonna walk all over you. Pick them up in this case and you'll slow your enemies down for a while. BUT not the lawnmowers!";
_root.elementArr.jester = "As if your job wasn't tough enough some joker of a fan has sneaked into the stadium looking for souvenirs. He'll take your turf away piece by piece if you let him.";
_root.elementArr.mole = "Those pesky moles are your main adversary, they'll tunnel around any unturfed area just waiting to poke their pointy noses out where they don't belong.";
_root.elementArr.pacman = "That's you, the grumpy groundsman. Armed only with your flatcap, roll up, and a huge pile of turf, not to mention an equally huge bad mood you must lay the new surface as fast as you can in time for Saturday's big match.";
_root.elementArr.grog = "You're a grumpy git at the best of times but a wee dram of groundsman's grog turn you into a turf tinkerer's worst nightmare. This power up pick-me-up allows you to literally eat your opponents for breakfast!";
_root.dontMove = 1;
_root.showIntro = function (wot) {
_root.introTxt = _root.elementArr[wot];
};
_root.percTurfed = " 0%";
_root.goText = "";
_root.level = 0;
_root.livesLeft = 5;
_root.totalScore = 0;
_root.soundOn._visible = true;
_root.soundOff._visible = false;
if (_root.noSound == 1) {
stopAllSounds();
_root.soundOn._visible = false;
_root.soundOff._visible = true;
}
_root.howManyShears = 0;
toggleSound = function () {
if (_root.noSound == 0) {
trace(_root.noSound);
_root.noSound = 1;
stopAllSounds();
_root.soundOff._visible = true;
_root.soundOn._visible = false;
} else {
trace(_root.noSound);
_root.noSound = 0;
_root.soundOn._visible = true;
_root.music.gotoAndPlay(1);
_root.soundOff._visible = false;
}
};
sbutton.onPress = function () {
toggleSound();
};
_root.playSound = function (snd) {
if (_root.noSound == 0) {
var _local2 = _root[snd]._currentframe + 1;
_root[snd].gotoAndPlay(_local2);
}
};
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
Array.prototype.contains = function (input) {
for (var _local3 in this) {
if (this[_local3] == input) {
return(1);
}
}
return(0);
};
stop();
Instance of Symbol 40 MovieClip [jester] in Frame 138
on (rollOver) {
_root.showIntro("jester");
}
on (rollOut) {
_root.introTxt = "";
}
Instance of Symbol 99 MovieClip in Frame 138
on (rollOver) {
_root.showIntro("pacman");
}
on (rollOut) {
_root.introTxt = "";
}
Instance of Symbol 36 MovieClip [mole] in Frame 138
on (rollOver) {
_root.showIntro("mole");
}
on (rollOut) {
_root.introTxt = "";
}
Instance of Symbol 34 MovieClip [biogro] in Frame 138
on (rollOver) {
_root.showIntro("biogro");
}
on (rollOut) {
_root.introTxt = "";
}
Instance of Symbol 32 MovieClip [shears] in Frame 138
on (rollOver) {
_root.showIntro("shears");
}
on (rollOut) {
_root.introTxt = "";
}
Instance of Symbol 28 MovieClip [mower] in Frame 138
on (rollOver) {
_root.showIntro("mower");
}
on (rollOut) {
_root.introTxt = "";
}
Instance of Symbol 24 MovieClip [sand] in Frame 138
on (rollOver) {
_root.showIntro("sand");
}
on (rollOut) {
_root.introTxt = "";
}
Instance of Symbol 22 MovieClip [hipflask] in Frame 138
on (rollOver) {
_root.showIntro("grog");
}
on (rollOut) {
_root.introTxt = "";
}
Frame 139
_root.lastHit = "";
_root.dontMove = 1;
_root.currentHit = "";
_root.started = 0;
_root.checkingFill = 0;
_root.howManyShears = 0;
_root.howManyghosts = 0;
_root.howManyjesters = 0;
_root.howManyMowers = 0;
_root.mowersOn = 0;
_root.bonusOn = 0;
_root.pacman.gotoAndPlay("right");
_root.pacman.speedX = 20;
_root.pacman.speedY = 20;
_root.doubleSpeed = 0;
_root.doingFill = 0;
_root.pacEat = 0;
_root.bonusSafe = 0;
_root.currentBonuses = new Array();
_root.percTurfed = " 0%";
_root.lastPac = "";
_root.pacDying = 0;
_root.levelBonusDone = 0;
if (_root.noSound == 1) {
stopAllSounds();
}
t = 0;
while (t < 20) {
tx = 0;
while (tx < 28) {
var tNum = (((tx * 20) + "t") + (t * 20));
_root.grid.attachMovie("tile", "tileg" + tNum, _root.grid.getNextHighestDepth(), {_x:tx * 20, _y:t * 20});
tx++;
}
t++;
}
r = 0;
while (r < 20) {
var RtimesTwenty = (r * 20);
_root.grid["tileg0t" + RtimesTwenty].gotoAndStop(2);
_root.grid["tileg540t" + RtimesTwenty].gotoAndStop(2);
r++;
}
k = 1;
while (k < 27) {
var KtimesTwenty = (k * 20);
_root.grid[("tileg" + KtimesTwenty) + "t0"].gotoAndStop(2);
_root.grid[("tileg" + KtimesTwenty) + "t380"].gotoAndStop(2);
k++;
}
ghostRand = function (type, gst) {
var _local3 = Math.floor(Math.random() * 24) + 2;
var _local4 = Math.floor(Math.random() * 16) + 2;
_local3 = _local3 * 20;
_local4 = _local4 * 20;
_root[(type + "") + gst]._x = _local3;
_root[(type + "") + gst]._y = _local4;
_root[(type + "") + gst].lastGoodArrX = new Array();
_root[(type + "") + gst].lastGoodArrY = new Array();
if (type != bonus) {
_root[("howMany" + type) + "s"]++;
}
};
shearDirArr = new Array("right", "left", "down");
_root.shearsRand = function (sNum) {
var _local3 = Math.floor(Math.random() * 3);
_root["shears" + sNum].dir = shearDirArr[_local3];
if (shearDirArr[_local3] == "right") {
_root["shears" + sNum]._y = 20;
_root["shears" + sNum]._x = (Math.floor(Math.random() * 24) + 2) * 20;
}
if (shearDirArr[_local3] == "left") {
_root["shears" + sNum]._y = 380;
_root["shears" + sNum]._x = (Math.floor(Math.random() * 24) + 2) * 20;
}
if (shearDirArr[_local3] == "down") {
_root["shears" + sNum]._x = 540;
_root["shears" + sNum]._y = (Math.floor(Math.random() * 16) + 2) * 20;
}
};
switch (_root.level) {
case 1 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
break;
case 2 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
_root.howManyShears = 1;
break;
case 3 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
shearsRand(1);
_root.howManyShears = 1;
_root.howManyMowers = 1;
hmm = 1;
while (hmm <= _root.howManyMowers) {
_root["mower" + hmm]._visible = false;
hmm++;
}
break;
case 4 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
ghostRand("jester", 1);
_root.howManyShears = 1;
_root.howManyMowers = 1;
hmm = 1;
while (hmm <= _root.howManyMowers) {
_root["mower" + hmm]._visible = false;
hmm++;
}
_root.jestersOn = 1;
break;
case 5 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
ghostRand("ghost", 3);
ghostRand("jester", 1);
_root.howManyShears = 2;
_root.howManyMowers = 1;
hmm = 1;
while (hmm <= _root.howManyMowers) {
_root["mower" + hmm]._visible = false;
hmm++;
}
_root.jestersOn = 1;
break;
case 6 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
ghostRand("ghost", 3);
ghostRand("jester", 1);
_root.howManyShears = 2;
_root.howManyMowers = 2;
hmm = 1;
while (hmm <= _root.howManyMowers) {
_root["mower" + hmm]._visible = false;
hmm++;
}
_root.jestersOn = 1;
break;
case 7 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
ghostRand("ghost", 3);
ghostRand("jester", 1);
ghostRand("jester", 2);
_root.howManyShears = 2;
_root.howManyMowers = 2;
hmm = 1;
while (hmm <= _root.howManyMowers) {
_root["mower" + hmm]._visible = false;
hmm++;
}
_root.jestersOn = 1;
break;
case 8 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
ghostRand("ghost", 3);
ghostRand("jester", 1);
ghostRand("jester", 2);
_root.howManyShears = 3;
_root.howManyMowers = 2;
hmm = 1;
while (hmm <= _root.howManyMowers) {
_root["mower" + hmm]._visible = false;
hmm++;
}
_root.jestersOn = 1;
break;
case 9 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
ghostRand("ghost", 3);
ghostRand("jester", 1);
ghostRand("jester", 2);
_root.howManyShears = 3;
_root.howManyMowers = 3;
hmm = 1;
while (hmm <= _root.howManyMowers) {
_root["mower" + hmm]._visible = false;
hmm++;
}
_root.jestersOn = 1;
break;
case 10 :
ghostRand("ghost", 1);
ghostRand("ghost", 2);
ghostRand("ghost", 3);
ghostRand("jester", 1);
ghostRand("jester", 2);
ghostRand("jester", 3);
_root.howManyShears = 3;
_root.howManyMowers = 3;
hmm = 1;
while (hmm <= _root.howManyMowers) {
_root["mower" + hmm]._visible = false;
hmm++;
}
_root.jestersOn = 1;
}
bonusArr = new Array("biogro", "hipflask", "sand");
doBonusAction = function (bType, n) {
trace("doBonusAction");
switch (bType) {
case "biogro" :
_root.doubleSpeed = 1;
_root.deleteBonus(bType, n);
_root.playSound("biosound");
break;
case "hipflask" :
hmm = 1;
while (hmm <= _root.howManyMowers) {
trueBlue = new Color(_root["mower" + hmm]);
trueBlue.setTint(51, 51, 255, 50);
hmm++;
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
trueBlue = new Color(_root["ghost" + hmg]);
trueBlue.setTint(51, 51, 255, 50);
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
trueBlue = new Color(_root["jester" + hmj]);
trueBlue.setTint(51, 51, 255, 50);
hmj++;
}
sr = 1;
while (sr <= _root.howManyShears) {
trueBlue = new Color(_root["shears" + sr]);
trueBlue.setTint(51, 51, 255, 50);
sr++;
}
_root.pacEat = 1;
_root.playSound("flask");
_root.deleteBonus(bType, n);
break;
case "sand" :
_root.dontMove = 2;
_root.deleteBonus(bType, n);
_root.playSound("spade");
}
_root["bonusKillInterv" + n] = setInterval(_root.killBonus, 7000, bType, n);
};
_root.deleteBonus = function (bt, bn) {
trace(("deleteBonus: " + bt) + bn);
there = -1;
cb = 0;
while (cb < _root.currentBonuses.length) {
if (_root.currentBonuses[cb] == (bt + bn)) {
there = cb;
}
cb++;
}
if (there != -1) {
_root.currentBonuses.splice(there, 1);
}
};
_root.bonusRand = function (bNum) {
trace("bonusRand: " + bNum);
if (_root._currentframe == 9) {
if (_root.level > 4) {
_root.levelBonusDone++;
clearInterval(_root.bonusInterv);
}
var _local5 = Math.floor(Math.random() * 3);
var _local3 = Math.floor(Math.random() * 24) + 2;
var _local4 = Math.floor(Math.random() * 16) + 2;
_local3 = _local3 * 20;
_local4 = _local4 * 20;
type = bonusArr[_local5];
_root.attachMovie(type, type + bNum, _root.grid.getNextHighestDepth(), {_x:_local3, _y:_local4});
_root.currentBonuses.push(type + bNum);
_root.bonusSafe = 1;
_root["bonusSafeInterv" + bNum] = setInterval(_root.bonusUnSafe, 3000, bNum);
_root[type + bNum].onEnterFrame = function () {
if (this.hitTest(_root.pacman)) {
doBonusAction(type, bNum);
this.removeMovieClip();
}
if (_root.bonusSafe == 0) {
hmm = 1;
while (hmm <= _root.howManyMowers) {
if (this.hitTest(_root["mower" + hmm].hB)) {
this.removeMovieClip();
}
hmm++;
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
if (this.hitTest(_root["ghost" + hmg])) {
this.removeMovieClip();
}
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
if (this.hitTest(_root["jester" + hmj].hB)) {
this.removeMovieClip();
}
hmj++;
}
}
};
}
_root.bonusUnSafe = function (nummer) {
trace("bonusUnSafe");
clearInterval(_root["bonusSafeInterv" + nummer]);
_root.bonusSafe = 0;
};
_root.killBonus = function (tipo, numero) {
trace(("killBonus: " + tipo) + numero);
clearInterval(_root["bonusKillInterv" + numero]);
switch (tipo) {
case "boots" :
hmm = 1;
while (hmm <= _root.howManyMowers) {
trace((("_root[\"mower\"+hmm]._x" + _root["mower" + hmm]._x) + " _root[\"mower\"+hmm]._y ") + _root["mower" + hmm]._y);
_root["mower" + hmm].speedX = 5;
_root["mower" + hmm].speedY = 5;
hmm++;
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
_root["ghost" + hmg].speedX = 5;
_root["ghost" + hmg].speedY = 5;
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
_root["jester" + hmj].speedX = 5;
_root["jester" + hmj].speedY = 5;
hmj++;
}
break;
case "biogro" :
_root.doubleSpeed = 0;
break;
case "hipflask" :
hmm = 1;
while (hmm <= _root.howManyMowers) {
trueBlue = new Color(_root["mower" + hmm]);
trueBlue.setTint(0, 0, 0, 0);
hmm++;
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
trueBlue = new Color(_root["ghost" + hmg]);
trueBlue.setTint(0, 0, 0, 0);
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
trueBlue = new Color(_root["jester" + hmj]);
trueBlue.setTint(0, 0, 0, 0);
hmj++;
}
sr = 1;
while (sr <= _root.howManyShears) {
trueBlue = new Color(_root["shears" + sr]);
trueBlue.setTint(0, 0, 0, 0);
sr++;
}
_root.pacEat = 0;
break;
case "sand" :
_root.dontMove = 0;
}
};
};
_root.currentRoute = new Array();
_root.checkRoute = function (tyle) {
if (_root.currentRoute.contains(tyle)) {
_root.pacDie();
}
};
_root.clearRoute = function () {
trace("clearRoute");
_root.currentRoute.length = 0;
};
_root.checkFill = function () {
trace("checkFill");
_root.doingFill = 1;
if (_root.dontMove == 0) {
_root.dontMove = 1;
}
p = 1;
while (p <= _root.howManyghosts) {
if (_root["ghost" + p]._visible == true) {
var _local2 = _root["ghost" + p]._x.toString();
_local2 = _local2.slice(0, _local2.length - 1);
var _local3 = _root["ghost" + p]._y.toString();
_local3 = _local3.slice(0, _local3.length - 1);
if ((int(_local2) % 2) != 0) {
_local2 = int(_local2) + 1;
_local2 = _local2 + "0";
} else {
_local2 = _local2 + "0";
}
if ((int(_local3) % 2) != 0) {
_local3 = int(_local3) + 1;
_local3 = _local3 + "0";
} else {
_local3 = _local3 + "0";
}
_root.grid[(("tileg" + _local2) + "t") + _local3].gotoAndStop("blockHead");
_root["ghost" + p]._x = int(_local2);
_root["ghost" + p]._y = int(_local3);
}
p++;
}
_root.dfInterval = setInterval(_root.doFill, 100);
};
_root.doFill = function () {
trace("do fill");
clearInterval(_root.dfInterval);
_root.fillArr = new Array();
_root.filledSquares = 0;
alreadyCount = 0;
fy = 1;
while (fy <= 19) {
yy = fy * 20;
fx = 1;
while (fx <= 26) {
xx = fx * 20;
if (_root.grid[(("tileg" + xx) + "t") + yy]._currentframe == 1) {
_root.fillArr.push((("tileg" + xx) + "t") + yy);
} else if (_root.grid[(("tileg" + xx) + "t") + yy]._currentframe != 2) {
_root.grid[(("tileg" + xx) + "t") + yy].gotoAndStop(1);
}
if ((((fx != 0) && (fy != 0)) && (fx != 540)) && (fy != 380)) {
if (_root.grid[(("tileg" + xx) + "t") + yy]._currentframe == 2) {
_root.filledSquares++;
}
} else {
alreadyCount++;
}
fx++;
}
fy++;
}
_root.shearsOnRoute = 0;
fa = 0;
while (fa < _root.fillArr.length) {
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[_root.fillArr[fa]])) {
_root.grid[_root.fillArr[fa]].gotoAndStop("sheared");
}
sr++;
}
fa++;
}
_root.sOInterval = setInterval(_root.shearedOff, 100);
};
_root.shearedOff = function () {
trace("shearedOff");
takeOutArr = new Array();
clearInterval(_root.sOInterval);
fb = 0;
while (fb < _root.fillArr.length) {
if (_root.grid[_root.fillArr[fb]]._currentframe == 1) {
hmg = 1;
while (hmg <= _root.howManyghosts) {
var _local2 = 0;
if (_root.grid[_root.fillArr[fb]].hitTest(_root["ghost" + hmg])) {
_local2 = 1;
}
hmg++;
}
if (_local2 == 0) {
_root.grid[_root.fillArr[fb]].gotoAndStop(2);
_root.filledSquares++;
}
} else {
_root.grid[_root.fillArr[fb]].gotoAndStop(1);
takeOutArr.push(fillArr[fb]);
}
fb++;
}
to = 0;
while (to < takeOutArr.length) {
fc = 0;
while (fc < _root.fillArr.length) {
if (takeOutArr[to] == _root.fillArr[fc]) {
_root.fillArr.splice(fc, 1);
}
fc++;
}
to++;
}
takeOutArr.length = 0;
var _local5 = Math.round(((_root.filledSquares - alreadyCount) / 503) * 100);
_root.percTurfed = "";
if (_local5 < 10) {
_root.percTurfed = " ";
}
_root.percTurfed = _root.percTurfed + (_local5 + "%");
if ((((_root.level > 2) && (_root.mowersOn < _root.howManyMowers)) && (_local5 > 10)) && (_root.fillArr.length != 0)) {
var _local6 = Math.floor(Math.random() * (((_root.fillArr.length - 1) - 0) + 1)) + 0;
_root["mower" + (_root.mowersOn + 1)]._x = _root.grid[_root.fillArr[_local6]]._x;
_root["mower" + (_root.mowersOn + 1)]._y = _root.grid[_root.fillArr[_local6]]._y;
if ((_root["mower" + (_root.mowersOn + 1)]._x == _root.pacman._x) && (_root["mower" + (_root.mowersOn + 1)]._y == _root.pacman._y)) {
_local6 = Math.floor(Math.random() * (((_root.fillArr.length - 1) - 0) + 1)) + 0;
_root["mower" + (_root.mowersOn + 1)]._x = _root.grid[_root.fillArr[_local6]]._x;
_root["mower" + (_root.mowersOn + 1)]._y = _root.grid[_root.fillArr[_local6]]._y;
}
_root["mower" + (_root.mowersOn + 1)]._visible = true;
_root.mowersOn++;
}
if (((_root.level < 5) && (_root.bonusOn < 1)) && (_root.fillArr.length > 80)) {
_root.bonusOn++;
_root.bonusRand(_root.bonusOn);
} else if (((_root.level > 4) && (_root.bonusOn < 2)) && (_root.fillArr.length > 60)) {
_root.bonusOn++;
_root.bonusRand(_root.bonusOn);
}
_root.fillArr.length = 0;
if (_local5 < 80) {
if (_root.dontMove == 1) {
_root.dontMove = 0;
}
_root.started = 0;
} else {
_root.gotoAndStop("levelUp");
}
r = 0;
while (r < 20) {
var _local3 = r * 20;
_root.grid["tileg0t" + _local3].gotoAndStop(2);
_root.grid["tileg540t" + _local3].gotoAndStop(2);
r++;
}
k = 1;
while (k < 27) {
var _local4 = k * 20;
_root.grid[("tileg" + _local4) + "t0"].gotoAndStop(2);
_root.grid[("tileg" + _local4) + "t380"].gotoAndStop(2);
k++;
}
_root.doingFill = 0;
};
_root.checkBounds = function (nom) {
if (_root[nom]._visible == true) {
if (nom.substr(0, nom.length - 1) != "mower") {
if (_root[nom]._x < 20) {
_root[nom]._x = 20;
}
if (_root[nom]._x > 520) {
_root[nom]._x = 520;
}
if (_root[nom]._y < 20) {
_root[nom]._y = 20;
}
if (_root[nom]._y > 360) {
_root[nom]._y = 360;
}
var _local5 = 2;
} else {
if (this._visible == true) {
if (_root[nom]._x < 0) {
_root[nom]._x = 0;
}
if (_root[nom]._x > 540) {
_root[nom]._x = 540;
}
if (_root[nom]._y < 0) {
_root[nom]._y = 0;
}
if (_root[nom]._y > 380) {
_root[nom]._y = 380;
}
}
var _local5 = 1;
}
if (nom.substr(0, nom.length - 1) != "jester") {
if (_root.grid[(("tileg" + _root[nom]._x) + "t") + _root[nom]._y]._currentframe == _local5) {
_root[nom]._x = _root[nom].lastGoodX;
_root[nom]._y = _root[nom].lastGoodY;
return("stuck");
}
var _local4 = _root[nom]._x.toString();
var _local6 = _local4.substr(2, 1);
if (_local6 == 0) {
_local4 = _local4.slice(0, _local4.length - 1);
if ((int(_local4) % 2) == 0) {
_root[nom].lastGoodX = _root[nom]._x;
_root[nom].lastGoodY = _root[nom]._y;
}
}
}
}
};
_root.pacDie = function (sOrNot) {
_root.pacDying = 1;
if (_root.livesLeft == 1) {
_root.gotoAndStop("gameOver");
} else {
stopAllSounds();
_root.playSound("twonk");
_root.started = 0;
_root.dontMove = 1;
if (sOrNot != null) {
sr = 1;
while (sr <= _root.howManyShears) {
if ((sOrNot != ("shears" + sr)) && (_root["shears" + sr].onRoute != 1)) {
_root["shears" + sr].onRoute = 0;
}
sr++;
}
}
dr = _root.currentRoute.length;
while (dr >= 0) {
_root.grid[_root.currentRoute[dr]].gotoAndPlay("wilt");
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[_root.currentRoute[dr]])) {
_root["shears" + sr].onRoute = 1;
}
sr++;
}
dr--;
}
_root.pacman.gotoAndPlay("dPac");
_root.lastPac = "";
_root.clearRoute();
}
};
_root.pacman._x = 10;
_root.startLevel = function () {
trace("startLevel");
Key.removeListener(_root.pacListener);
Mouse.removeListener(_root.pacMListener);
_root.levNotice._visible = false;
_root.enemies._visible = false;
_root.dontMove = 0;
s = 1;
while (s <= _root.howManyShears) {
_root.shearsRand(s);
_root["shears" + s].gotoAndPlay(2);
s++;
}
var _local2 = (Math.floor(Math.random() * 11) + 5) * 1000;
if (_root.level > 4) {
_root.bonusInterv = setInterval(_root.bonusRand, _local2, _root.bonusOn);
}
trace("bonusTime" + _local2);
_root.levelStartTime = getTimer();
};
_root.pacListener = new Object();
_root.pacListener.onKeyDown = function () {
_root.gotoAndStop("go");
_root.startLevel();
};
Key.addListener(_root.pacListener);
_root.pacMListener = new Object();
_root.pacMListener.onMouseDown = function () {
_root.gotoAndStop("go");
_root.startLevel();
};
Mouse.addListener(_root.pacMListener);
stop();
Instance of Symbol 20 MovieClip [ghost2] "ghost2" in Frame 139
onClipEvent (load) {
speedX = 5;
speedY = 5;
this.gNum = this._name.substr(5, 1);
this.lastVert = 0;
this.lastSide = 0;
this.lastDirDone = 0;
}
onClipEvent (enterFrame) {
if (((_root.dontMove == 0) && (_root.howManyghosts >= this.gNum)) && (this._visible == true)) {
this.lastDirDone = 0;
if ((this._x == 20) || (this._x == 520)) {
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
speedX = -speedX;
this.lastDirDone = 1;
}
if ((this._y == 20) || (this._y == 360)) {
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
speedY = -speedY;
this.lastDirDone = 1;
}
if (this.lastDirDone == 0) {
if (_root.checkBounds(this._name) == "stuck") {
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
this.lastDirDone = 1;
}
}
if ((this.lastVert == 0) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y + 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y - 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 0) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y + 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if (this.lastDirDone == 0) {
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
}
speedY = -speedY;
this.lastVert = 1;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
}
speedY = -speedY;
this.lastVert = 0;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 1;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 0;
}
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if (((this._visible == true) && (this.hitTest(_root.pacman))) && (_root.grid[(("tileg" + pacX) + "t") + pacY]._currentframe != 2)) {
if (_root.pacEat == 0) {
_root.pacDie();
} else {
trace("pacEat: " + this._name);
this._x = -100;
this._y = -100;
this._visible = false;
}
}
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
if (this._name != ("ghost" + hmg)) {
if (this.hitTest(_root["ghost" + hmg])) {
if (this.gNum < hmg) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
if (this._name != ("jester" + hmj)) {
if (this.hitTest(_root["jester" + hmj].hB)) {
if (this.gNum < hmj) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmj++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Instance of Symbol 20 MovieClip [ghost2] "ghost3" in Frame 139
onClipEvent (load) {
speedX = 5;
speedY = 5;
this.gNum = this._name.substr(5, 1);
this.lastVert = 0;
this.lastSide = 0;
this.lastDirDone = 0;
}
onClipEvent (enterFrame) {
if (((_root.dontMove == 0) && (_root.howManyghosts >= this.gNum)) && (this._visible == true)) {
this.lastDirDone = 0;
if ((this._x == 20) || (this._x == 520)) {
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
speedX = -speedX;
this.lastDirDone = 1;
}
if ((this._y == 20) || (this._y == 360)) {
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
speedY = -speedY;
this.lastDirDone = 1;
}
if (this.lastDirDone == 0) {
if (_root.checkBounds(this._name) == "stuck") {
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
this.lastDirDone = 1;
}
}
if ((this.lastVert == 0) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y + 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y - 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 0) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y + 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if (this.lastDirDone == 0) {
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
}
speedY = -speedY;
this.lastVert = 1;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
}
speedY = -speedY;
this.lastVert = 0;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 1;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 0;
}
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if (((this._visible == true) && (this.hitTest(_root.pacman))) && (_root.grid[(("tileg" + pacX) + "t") + pacY]._currentframe != 2)) {
if (_root.pacEat == 0) {
_root.pacDie();
} else {
trace("pacEat: " + this._name);
this._x = -100;
this._y = -100;
this._visible = false;
}
}
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
if (this._name != ("ghost" + hmg)) {
if (this.hitTest(_root["ghost" + hmg])) {
if (this.gNum < hmg) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
if (this._name != ("jester" + hmj)) {
if (this.hitTest(_root["jester" + hmj].hB)) {
if (this.gNum < hmj) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmj++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Instance of Symbol 156 MovieClip "ghost1" in Frame 139
onClipEvent (load) {
speedX = 5;
speedY = 5;
this.gNum = this._name.substr(5, 1);
this.lastVert = 0;
this.lastSide = 0;
this.lastDirDone = 0;
}
onClipEvent (enterFrame) {
if (((_root.dontMove == 0) && (_root.howManyghosts >= this.gNum)) && (this._visible == true)) {
this.lastDirDone = 0;
if ((this._x == 20) || (this._x == 520)) {
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
speedX = -speedX;
this.lastDirDone = 1;
}
if ((this._y == 20) || (this._y == 360)) {
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
speedY = -speedY;
this.lastDirDone = 1;
}
if (this.lastDirDone == 0) {
if (_root.checkBounds(this._name) == "stuck") {
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
this.lastDirDone = 1;
}
}
if ((this.lastVert == 0) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y + 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y - 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 0) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y + 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 2) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if (this.lastDirDone == 0) {
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
}
speedY = -speedY;
this.lastVert = 1;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
}
speedY = -speedY;
this.lastVert = 0;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 1;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 0;
}
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if (((this._visible == true) && (this.hitTest(_root.pacman))) && (_root.grid[(("tileg" + pacX) + "t") + pacY]._currentframe != 2)) {
if (_root.pacEat == 0) {
_root.pacDie();
} else {
trace("pacEat: " + this._name);
this._x = -100;
this._y = -100;
this._visible = false;
}
}
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
if (this._name != ("ghost" + hmg)) {
if (this.hitTest(_root["ghost" + hmg])) {
if (this.gNum < hmg) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
if (this._name != ("jester" + hmj)) {
if (this.hitTest(_root["jester" + hmj].hB)) {
if (this.gNum < hmj) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmj++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Instance of Symbol 32 MovieClip [shears] "shears1" in Frame 139
onClipEvent (load) {
shearSpeed = 2;
this.onRoute = 0;
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (this._visible == true)) {
switch (dir) {
case "right" :
this._rotation = 90;
if (_root.grid[(("tileg" + this._x) + "t") + this._y]._currentframe == 2) {
this.onRoute = 0;
dir = "down";
} else if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "up";
} else {
this.lastDir;
if (this._x < 540) {
this._x = this._x + shearSpeed;
}
}
} else if (this._x < 540) {
this._x = this._x + shearSpeed;
}
break;
case "left" :
this._rotation = 270;
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 2) {
this.onRoute = 0;
dir = "up";
} else if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "down";
} else {
dir = this.lastDir;
if (this._x != 20) {
this._x = this._x - shearSpeed;
}
}
} else if (this._x != 20) {
this._x = this._x - shearSpeed;
}
break;
case "down" :
this._rotation = 180;
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
this.onRoute = 0;
dir = "left";
} else if (_root.grid[(("tileg" + this._x) + "t") + this._y]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "right";
} else {
dir = this.lastDir;
if (this._y != 380) {
this._y = this._y + shearSpeed;
}
}
} else if (this._y != 380) {
this._y = this._y + shearSpeed;
}
break;
case "up" :
this._rotation = 0;
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
this.onRoute = 0;
dir = "right";
} else if (_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "left";
} else {
dir = this.lastDir;
if (this._y != 20) {
this._y = this._y - shearSpeed;
}
}
} else {
if (this._y == 20) {
break;
}
this._y = this._y - shearSpeed;
}
}
this.lastDir = dir;
if ((this._visible == true) && (this.hitTest(_root.pacman))) {
if ((_root.pacman._x == 10) && (_root.pacman._y == 10)) {
} else if (_root.pacDying != 1) {
if (_root.pacEat == 0) {
_root.pacDie(this._name);
this.onRoute = 1;
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
}
}
Instance of Symbol 32 MovieClip [shears] "shears2" in Frame 139
onClipEvent (load) {
shearSpeed = 2;
this.onRoute = 0;
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (this._visible == true)) {
switch (dir) {
case "right" :
this._rotation = 90;
if (_root.grid[(("tileg" + this._x) + "t") + this._y]._currentframe == 2) {
this.onRoute = 0;
dir = "down";
} else if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "up";
} else {
this.lastDir;
if (this._x < 540) {
this._x = this._x + shearSpeed;
}
}
} else if (this._x < 540) {
this._x = this._x + shearSpeed;
}
break;
case "left" :
this._rotation = 270;
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 2) {
this.onRoute = 0;
dir = "up";
} else if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "down";
} else {
dir = this.lastDir;
if (this._x != 20) {
this._x = this._x - shearSpeed;
}
}
} else if (this._x != 20) {
this._x = this._x - shearSpeed;
}
break;
case "down" :
this._rotation = 180;
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
this.onRoute = 0;
dir = "left";
} else if (_root.grid[(("tileg" + this._x) + "t") + this._y]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "right";
} else {
dir = this.lastDir;
if (this._y != 380) {
this._y = this._y + shearSpeed;
}
}
} else if (this._y != 380) {
this._y = this._y + shearSpeed;
}
break;
case "up" :
this._rotation = 0;
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
this.onRoute = 0;
dir = "right";
} else if (_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "left";
} else {
dir = this.lastDir;
if (this._y != 20) {
this._y = this._y - shearSpeed;
}
}
} else {
if (this._y == 20) {
break;
}
this._y = this._y - shearSpeed;
}
}
this.lastDir = dir;
if ((this._visible == true) && (this.hitTest(_root.pacman))) {
if ((_root.pacman._x == 10) && (_root.pacman._y == 10)) {
} else if (_root.pacDying != 1) {
if (_root.pacEat == 0) {
_root.pacDie(this._name);
this.onRoute = 1;
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
}
}
Instance of Symbol 32 MovieClip [shears] "shears3" in Frame 139
onClipEvent (load) {
shearSpeed = 2;
this.onRoute = 0;
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (this._visible == true)) {
switch (dir) {
case "right" :
this._rotation = 90;
if (_root.grid[(("tileg" + this._x) + "t") + this._y]._currentframe == 2) {
this.onRoute = 0;
dir = "down";
} else if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "up";
} else {
this.lastDir;
if (this._x < 540) {
this._x = this._x + shearSpeed;
}
}
} else if (this._x < 540) {
this._x = this._x + shearSpeed;
}
break;
case "left" :
this._rotation = 270;
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 2) {
this.onRoute = 0;
dir = "up";
} else if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "down";
} else {
dir = this.lastDir;
if (this._x != 20) {
this._x = this._x - shearSpeed;
}
}
} else if (this._x != 20) {
this._x = this._x - shearSpeed;
}
break;
case "down" :
this._rotation = 180;
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
this.onRoute = 0;
dir = "left";
} else if (_root.grid[(("tileg" + this._x) + "t") + this._y]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "right";
} else {
dir = this.lastDir;
if (this._y != 380) {
this._y = this._y + shearSpeed;
}
}
} else if (this._y != 380) {
this._y = this._y + shearSpeed;
}
break;
case "up" :
this._rotation = 0;
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
this.onRoute = 0;
dir = "right";
} else if (_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 1) {
if (this.onRoute == 0) {
dir = "left";
} else {
dir = this.lastDir;
if (this._y != 20) {
this._y = this._y - shearSpeed;
}
}
} else {
if (this._y == 20) {
break;
}
this._y = this._y - shearSpeed;
}
}
this.lastDir = dir;
if ((this._visible == true) && (this.hitTest(_root.pacman))) {
if ((_root.pacman._x == 10) && (_root.pacman._y == 10)) {
} else if (_root.pacDying != 1) {
if (_root.pacEat == 0) {
_root.pacDie(this._name);
this.onRoute = 1;
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
}
}
Instance of Symbol 40 MovieClip [jester] "jester1" in Frame 139
onClipEvent (load) {
speedX = -5;
speedY = -5;
this.knockBlock = function (x, y) {
if ((((x != 0) && (x != 540)) && (y != 0)) && (y != 380)) {
_root.grid[(("tileg" + x) + "t") + y].gotoAndStop(1);
}
};
this.jNum = this._name.substr(6, 1);
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (_root.howManyjesters >= this.jNum)) {
if (this._x < 20) {
this.x = 20;
speedX = -speedX;
}
if (this._x > 520) {
this.x = 520;
speedX = -speedX;
}
if (this._y < 20) {
this.x = 20;
speedY = -speedY;
}
if (this._y > 360) {
this.x = 360;
speedY = -speedY;
}
_root.checkBounds(this._name);
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x, this._y + 20);
}
}
speedY = -speedY;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x, this._y - 20);
}
}
speedY = -speedY;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x + 20, this._y);
}
}
speedX = -speedX;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x - 20, this._y);
}
}
speedX = -speedX;
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if (((this._visible == true) && (this.hB.hitTest(_root.pacman))) && (_root.grid[(("tileg" + pacX) + "t") + pacY]._currentframe != 2)) {
if (_root.pacEat == 0) {
_root.pacDie();
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
if (this._name != ("ghost" + hmg)) {
if (this.hB.hitTest(_root["ghost" + hmg])) {
speedX = -speedX;
speedY = -speedY;
}
}
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
if (this._name != ("jester" + hmj)) {
if (this.hB.hitTest(_root["jester" + hmj].hB)) {
speedX = -speedX;
speedY = -speedY;
}
}
hmj++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Instance of Symbol 40 MovieClip [jester] "jester2" in Frame 139
onClipEvent (load) {
speedX = -5;
speedY = -5;
this.knockBlock = function (x, y) {
if ((((x != 0) && (x != 540)) && (y != 0)) && (y != 380)) {
_root.grid[(("tileg" + x) + "t") + y].gotoAndStop(1);
}
};
this.jNum = this._name.substr(6, 1);
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (_root.howManyjesters >= this.jNum)) {
if (this._x < 20) {
this.x = 20;
speedX = -speedX;
}
if (this._x > 520) {
this.x = 520;
speedX = -speedX;
}
if (this._y < 20) {
this.x = 20;
speedY = -speedY;
}
if (this._y > 360) {
this.x = 360;
speedY = -speedY;
}
_root.checkBounds(this._name);
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x, this._y + 20);
}
}
speedY = -speedY;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x, this._y - 20);
}
}
speedY = -speedY;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x + 20, this._y);
}
}
speedX = -speedX;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x - 20, this._y);
}
}
speedX = -speedX;
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if (((this._visible == true) && (this.hB.hitTest(_root.pacman))) && (_root.grid[(("tileg" + pacX) + "t") + pacY]._currentframe != 2)) {
if (_root.pacEat == 0) {
_root.pacDie();
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
if (this._name != ("ghost" + hmg)) {
if (this.hB.hitTest(_root["ghost" + hmg])) {
speedX = -speedX;
speedY = -speedY;
}
}
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
if (this._name != ("jester" + hmj)) {
if (this.hB.hitTest(_root["jester" + hmj].hB)) {
speedX = -speedX;
speedY = -speedY;
}
}
hmj++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Instance of Symbol 40 MovieClip [jester] "jester3" in Frame 139
onClipEvent (load) {
speedX = -5;
speedY = -5;
this.knockBlock = function (x, y) {
if ((((x != 0) && (x != 540)) && (y != 0)) && (y != 380)) {
_root.grid[(("tileg" + x) + "t") + y].gotoAndStop(1);
}
};
this.jNum = this._name.substr(6, 1);
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (_root.howManyjesters >= this.jNum)) {
if (this._x < 20) {
this.x = 20;
speedX = -speedX;
}
if (this._x > 520) {
this.x = 520;
speedX = -speedX;
}
if (this._y < 20) {
this.x = 20;
speedY = -speedY;
}
if (this._y > 360) {
this.x = 360;
speedY = -speedY;
}
_root.checkBounds(this._name);
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x, this._y + 20);
}
}
speedY = -speedY;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x, this._y - 20);
}
}
speedY = -speedY;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x + 20, this._y);
}
}
speedX = -speedX;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
var noShears = 0;
var noMower = 0;
sr = 1;
while (sr <= _root.howManyShears) {
if (_root["shears" + sr].hitTest(_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y])) {
noShears = 1;
}
sr++;
}
mr = 1;
while (mr <= _root.howManyMowers) {
if (_root["mowers" + mr].hitTest(_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y])) {
noMower = 1;
}
mr++;
}
if ((noShears == 0) && (noMower == 0)) {
this.knockBlock(this._x - 20, this._y);
}
}
speedX = -speedX;
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if (((this._visible == true) && (this.hB.hitTest(_root.pacman))) && (_root.grid[(("tileg" + pacX) + "t") + pacY]._currentframe != 2)) {
if (_root.pacEat == 0) {
_root.pacDie();
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
if (this._name != ("ghost" + hmg)) {
if (this.hB.hitTest(_root["ghost" + hmg])) {
speedX = -speedX;
speedY = -speedY;
}
}
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
if (this._name != ("jester" + hmj)) {
if (this.hB.hitTest(_root["jester" + hmj].hB)) {
speedX = -speedX;
speedY = -speedY;
}
}
hmj++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Instance of Symbol 28 MovieClip [mower] "mower1" in Frame 139
onClipEvent (load) {
speedX = 5;
speedY = 5;
this.mNum = this._name.substr(5, 1);
this.lastVert = 0;
this.lastSide = 0;
this.lastDirDone = 0;
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (_root.howManyMowers >= this.mNum)) {
this.lastDirDone = 0;
if ((this._x == 0) || (this._x == 540)) {
speedX = -speedX;
this.lastDirDone = 1;
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
if ((this._y == 0) || (this._y == 380)) {
speedY = -speedY;
this.lastDirDone = 1;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
}
if (_root.checkBounds(this._name) == "stuck") {
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
this.lastDirDone = 1;
}
if ((this.lastVert == 0) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y + 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y - 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 0) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y + 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if (this.lastDirDone == 0) {
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
}
speedY = -speedY;
this.lastVert = 1;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
}
speedY = -speedY;
this.lastVert = 0;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 1;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 0;
}
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if ((this._visible == true) && (this.hB.hitTest(_root.pacman))) {
if ((_root.pacman._x == 10) && (_root.pacman._y == 10)) {
} else if (_root.pacEat == 0) {
_root.pacDie();
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
hmm = 1;
while (hmm <= _root.howManyMowers) {
if (this._name != ("mower" + hmm)) {
if (this.mNum < hmm) {
if (this.hB.hitTest(_root["mower" + hmm].hB)) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmm++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Instance of Symbol 28 MovieClip [mower] "mower2" in Frame 139
onClipEvent (load) {
speedX = 5;
speedY = 5;
this.mNum = this._name.substr(5, 1);
this.lastVert = 0;
this.lastSide = 0;
this.lastDirDone = 0;
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (_root.howManyMowers >= this.mNum)) {
this.lastDirDone = 0;
if ((this._x == 0) || (this._x == 540)) {
speedX = -speedX;
this.lastDirDone = 1;
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
if ((this._y == 0) || (this._y == 380)) {
speedY = -speedY;
this.lastDirDone = 1;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
}
if (_root.checkBounds(this._name) == "stuck") {
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
this.lastDirDone = 1;
}
if ((this.lastVert == 0) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y + 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y - 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 0) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y + 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if (this.lastDirDone == 0) {
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
}
speedY = -speedY;
this.lastVert = 1;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
}
speedY = -speedY;
this.lastVert = 0;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 1;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 0;
}
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if ((this._visible == true) && (this.hB.hitTest(_root.pacman))) {
if ((_root.pacman._x == 10) && (_root.pacman._y == 10)) {
} else if (_root.pacEat == 0) {
_root.pacDie();
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
hmm = 1;
while (hmm <= _root.howManyMowers) {
if (this._name != ("mower" + hmm)) {
if (this.mNum < hmm) {
if (this.hB.hitTest(_root["mower" + hmm].hB)) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmm++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Instance of Symbol 28 MovieClip [mower] "mower3" in Frame 139
onClipEvent (load) {
speedX = 5;
speedY = 5;
this.mNum = this._name.substr(5, 1);
this.lastVert = 0;
this.lastSide = 0;
this.lastDirDone = 0;
}
onClipEvent (enterFrame) {
if ((_root.dontMove == 0) && (_root.howManyMowers >= this.mNum)) {
this.lastDirDone = 0;
if ((this._x == 0) || (this._x == 540)) {
speedX = -speedX;
this.lastDirDone = 1;
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
if ((this._y == 0) || (this._y == 380)) {
speedY = -speedY;
this.lastDirDone = 1;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
}
if (_root.checkBounds(this._name) == "stuck") {
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
this.lastDirDone = 1;
}
if ((this.lastVert == 0) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y + 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 0)) {
if ((_root.grid[(("tileg" + (this._x + 20)) + "t") + (this._y - 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 0) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y + 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if ((this.lastVert == 1) && (this.lastSide == 1)) {
if ((_root.grid[(("tileg" + (this._x - 20)) + "t") + (this._y - 20)]._currentframe == 1) && ((_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 2) && (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 2))) {
this.lastDirDone = 1;
speedY = -speedY;
speedX = -speedX;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
if (this.lastDirDone == 0) {
if (_root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y + 20));
}
speedY = -speedY;
this.lastVert = 1;
}
if (_root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + this._x) + "t") + (this._y - 20));
}
speedY = -speedY;
this.lastVert = 0;
}
if (_root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x + 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 1;
}
if (_root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._currentframe == 1) {
if (_root.pacEat == 0) {
_root.checkRoute((("tileg" + (this._x - 20)) + "t") + this._y);
}
speedX = -speedX;
this.lastSide = 0;
}
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.pacDying != 1) {
if ((this._visible == true) && (this.hB.hitTest(_root.pacman))) {
if ((_root.pacman._x == 10) && (_root.pacman._y == 10)) {
} else if (_root.pacEat == 0) {
_root.pacDie();
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
}
hmm = 1;
while (hmm <= _root.howManyMowers) {
if (this._name != ("mower" + hmm)) {
if (this.mNum < hmm) {
if (this.hB.hitTest(_root["mower" + hmm].hB)) {
speedX = -speedX;
speedY = -speedY;
if (this.lastVert == 0) {
this.lastVert = 1;
} else {
this.lastVert = 0;
}
if (this.lastSide == 0) {
this.lastSide = 1;
} else {
this.lastSide = 0;
}
}
}
}
hmm++;
}
this._x = this._x + speedX;
this._y = this._y + speedY;
}
}
Frame 140
trace(_root.currentBonuses);
cb = 0;
while (cb < _root.currentBonuses.length) {
_root[_root.currentBonuses[cb]].removeMovieClip();
cb++;
}
if (_root.level != 10) {
_root.level++;
}
if (_root.level != 1) {
s = 1;
while (s <= _root.howManyShears) {
_root["shears" + s]._x = -500;
s++;
}
_root.goText = ((_root.percTurfed + " turfed on Level ") + (_root.level - 1)) + "\r";
clearInterval(_root.bonusInterv);
levelSecs = getTimer() - _root.levelStartTime;
_root.totalScore = Math.floor(_root.totalScore + (_root.filledSquares + (_root.filledSquares / ((levelSecs / 1000) / 4))));
}
t = 0;
while (t < 19) {
tx = 0;
while (tx < 26) {
var tNum = (((tx * 20) + "t") + (t * 20));
_root.enemyIntroCover.attachMovie("tile", "tilee" + tNum, _root.enemyIntroCover.getNextHighestDepth(), {_x:tx * 20, _y:t * 20});
tx++;
}
t++;
}
introEnemy = function (eNum, eName, w, h) {
_root.enemies["enemy" + eNum].attachMovie(eName, eNum + eName, 0);
_root.enemies["enemy" + eNum]._width = w;
_root.enemies["enemy" + eNum]._height = h;
_root.enemies["enemy" + eNum].onRollOver = function () {
_root.showIntro(eName);
};
_root.enemies["enemy" + eNum].onRollOut = function () {
_root.introTxt = "";
};
if (eNum == 4) {
_root.enemies["enemy" + eNum]._y = _root.enemies["enemy" + eNum]._y - 5;
}
};
switch (_root.level) {
case 1 :
introEnemy(1, "mole", 35, 35);
break;
case 2 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
break;
case 3 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
introEnemy(3, "mower", 35, 45);
break;
case 4 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
introEnemy(3, "mower", 35, 45);
introEnemy(4, "jester", 35, 35);
break;
case 5 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
introEnemy(3, "mower", 35, 45);
introEnemy(4, "jester", 35, 35);
break;
case 6 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
introEnemy(3, "mower", 35, 45);
introEnemy(4, "jester", 35, 35);
break;
case 7 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
introEnemy(3, "mower", 35, 45);
introEnemy(4, "jester", 35, 35);
break;
case 8 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
introEnemy(3, "mower", 35, 45);
introEnemy(4, "jester", 35, 35);
break;
case 9 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
introEnemy(3, "mower", 35, 45);
introEnemy(4, "jester", 35, 35);
break;
case 10 :
introEnemy(1, "mole", 35, 35);
introEnemy(2, "shears", 22, 45);
introEnemy(3, "mower", 35, 45);
introEnemy(4, "jester", 35, 35);
}
_root.goText = _root.goText + (("Level " + _root.level) + " - Prepare to turf!");
stopAllSounds();
_root.playSound("cheer");
_root.luListener = new Object();
_root.luListener.onKeyDown = function () {
if ((((Key.getCode() != 37) && (Key.getCode() != 39)) && (Key.getCode() != 38)) && (Key.getCode() != 40)) {
Key.removeListener(_root.luListener);
Mouse.removeListener(_root.luMListener);
_root.gotoAndStop("go");
}
};
Key.addListener(_root.luListener);
_root.luMListener = new Object();
_root.luMListener.onMouseDown = function () {
Key.removeListener(_root.luListener);
Mouse.removeListener(_root.luMListener);
_root.gotoAndStop("go");
};
Mouse.addListener(_root.luMListener);
stop();
Instance of Symbol 176 MovieClip "levNotice" in Frame 140
on (press) {
this._visible = false;
_root.gotoAndStop("go");
_root.startLevel();
}
Frame 141
stopAllSounds();
_root.playSound("wrong");
trace(_root.currentBonuses);
cb = 0;
while (cb < _root.currentBonuses.length) {
_root[_root.currentBonuses[cb]].removeMovieClip();
cb++;
}
bo = 0;
while (bo <= _root.bonusOn) {
clearInterval(_root["bonusInterv" + bo]);
bo++;
}
t = 0;
while (t < 20) {
tx = 0;
while (tx < 28) {
var tNum = (((tx * 20) + "t") + (t * 20));
_root.grid["tileg" + tNum].removeMovieClip();
tx++;
}
t++;
}
t = 0;
while (t < 19) {
tx = 0;
while (tx < 26) {
var tNum = (((tx * 20) + "t") + (t * 20));
_root.enemyIntroCover["tilee" + tNum].removeMovieClip();
tx++;
}
t++;
}
_root.started = 0;
_root.dontMove = 1;
_root.lastPac = "";
_root.clearRoute();
_root.goText = "Game Over";
_root.lastHit = "";
_root.dontMove = 1;
_root.currentHit = "";
_root.started = 0;
_root.checkingFill = 0;
_root.howManyShears = 0;
_root.howManyghosts = 0;
_root.howManyjesters = 0;
_root.howManyMowers = 0;
_root.mowersOn = 0;
_root.bonusOn = 0;
_root.level = 0;
stop();
Instance of Symbol 176 MovieClip in Frame 141
on (press) {
this._visible = false;
_root.dontMove = 0;
}
Symbol 5 MovieClip Frame 10
stop();
Symbol 14 MovieClip [tile] Frame 1
stop();
Symbol 14 MovieClip [tile] Frame 2
stop();
Symbol 14 MovieClip [tile] Frame 3
this.above = _root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._name;
this.sideRight = _root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._name;
this.sideLeft = _root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._name;
this.below = _root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._name;
if (_root.grid[this.above]._currentframe == 1) {
_root.grid[this.above].gotoAndStop("blockHead");
}
if (_root.grid[this.sideLeft]._currentframe == 1) {
_root.grid[this.sideLeft].gotoAndStop("blockHead");
}
if (_root.grid[this.sideRight]._currentframe == 1) {
_root.grid[this.sideRight].gotoAndStop("blockHead");
}
if (_root.grid[this.below]._currentframe == 1) {
_root.grid[this.below].gotoAndStop("blockHead");
}
stop();
Symbol 14 MovieClip [tile] Frame 4
this.above = _root.grid[(("tileg" + this._x) + "t") + (this._y - 20)]._name;
this.sideRight = _root.grid[(("tileg" + (this._x - 20)) + "t") + this._y]._name;
this.sideLeft = _root.grid[(("tileg" + (this._x + 20)) + "t") + this._y]._name;
this.below = _root.grid[(("tileg" + this._x) + "t") + (this._y + 20)]._name;
if (_root.grid[this.above]._currentframe == 1) {
_root.grid[this.above].gotoAndStop("sheared");
}
if (_root.grid[this.sideLeft]._currentframe == 1) {
_root.grid[this.sideLeft].gotoAndStop("sheared");
}
if (_root.grid[this.sideRight]._currentframe == 1) {
_root.grid[this.sideRight].gotoAndStop("sheared");
}
if (_root.grid[this.below]._currentframe == 1) {
_root.grid[this.below].gotoAndStop("sheared");
}
stop();
Symbol 16 MovieClip [goodLoop] Frame 375
stop();
Symbol 32 MovieClip [shears] Frame 1
stop();
Symbol 32 MovieClip [shears] Frame 10
this.gotoAndPlay(2);
Symbol 48 MovieClip Frame 7
gotoAndPlay (1);
Symbol 51 MovieClip Frame 32
gotoAndPlay (1);
Symbol 56 MovieClip Frame 1
doneLoading = 0;
stop();
Instance of Symbol 53 MovieClip "bkgd" in Symbol 56 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.doneLoading == 0) {
total = _parent._parent.getBytesTotal();
isLoaded = _parent._parent.getBytesLoaded();
p = 100 * (isLoaded / total);
_parent.bytes = ((int(isLoaded / 1000) + " KB of ") + int(total / 1000)) + " KB";
_parent.percent = Number(p) + "% LOADED";
_parent.bar._xscale = p;
if (isLoaded == total) {
_root.gotoAndPlay("loaded");
_parent.gotoAndStop("off");
_parent.doneLoading = 1;
} else {
_parent._parent.gotoAndPlay(1);
}
}
}
Symbol 60 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?cdgtid=ppag", "_blank");
}
Symbol 66 MovieClip Frame 30
stop();
Symbol 80 MovieClip Frame 36
gotoAndPlay (1);
Symbol 90 MovieClip Frame 25
_root.playSound("twonk");
stop();
Symbol 99 MovieClip Frame 10
this.gotoAndPlay("left");
Symbol 99 MovieClip Frame 20
this.gotoAndPlay("right");
Symbol 109 Button
on (release) {
_root.gotoAndStop("levelUp");
}
Symbol 118 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?cdgtid=ppag", "_blank");
}
Symbol 131 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 152 MovieClip Frame 10
this.gotoAndPlay("left");
Symbol 152 MovieClip Frame 20
this.gotoAndPlay("right");
Symbol 152 MovieClip Frame 21
_root.playSound("fall");
trace("diePac");
Symbol 152 MovieClip Frame 25
trace("diePac2");
Symbol 152 MovieClip Frame 26
trace("diePac3");
fy = 0;
while (fy <= 19) {
yy = fy * 20;
fx = 0;
while (fx <= 26) {
xx = fx * 20;
if (_root.grid[(("tileg" + xx) + "t") + yy]._currentframe > 4) {
_root.grid[(("tileg" + xx) + "t") + yy].gotoAndStop(1);
}
fx++;
}
fy++;
}
Symbol 152 MovieClip Frame 35
_root.pacman.gotoAndStop("right");
trace("diePac4");
if (_root.livesLeft != 1) {
_root.pacman._rotation = 0;
_root.pacman._x = 10;
_root.pacman._y = 10;
_root.dontMove = 0;
_root["life" + _root.livesLeft]._visible = false;
if (_root.noSound == 0) {
_root.music.gotoAndPlay(1);
}
_root.livesLeft--;
_root.pacDying = 0;
} else {
_root.gotoAndStop("gameOver");
}
Symbol 153 MovieClip Frame 2
if (_root.pacDying == 0) {
if ((_root.dontMove != 1) && (_root.doingFill != 1)) {
pressingKey = 0;
movePac = function (dir) {
switch (dir) {
case "right" :
if (_root.pacman._x != 550) {
_root.pacman._x = _root.pacman._x + _root.pacman.speedX;
_root.grid[_root.lastPac].gotoAndStop(2);
_root.currentRoute.push(_root.lastPac);
_root.lastPacKey = "right";
}
break;
case "left" :
if (_root.pacman._x != 10) {
_root.pacman._x = _root.pacman._x - _root.pacman.speedX;
_root.grid[_root.lastPac].gotoAndStop(2);
_root.currentRoute.push(_root.lastPac);
_root.lastPacKey = "left";
}
break;
case "down" :
if (_root.pacman._y != 390) {
_root.pacman._y = _root.pacman._y + _root.pacman.speedY;
_root.grid[_root.lastPac].gotoAndStop(2);
_root.currentRoute.push(_root.lastPac);
_root.lastPacKey = "down";
}
break;
case "up" :
if (_root.pacman._y == 10) {
break;
}
_root.pacman._y = _root.pacman._y - _root.pacman.speedY;
_root.grid[_root.lastPac].gotoAndStop(2);
_root.currentRoute.push(_root.lastPac);
_root.lastPacKey = "up";
}
};
if (Key.isDown(39) && (pressingKey == 0)) {
if ((_root.started == 0) || ((_root.started == 1) && (_root.lastPacKey != "left"))) {
_root.pacman.gotoAndPlay("right");
_root.pacman._rotation = 0;
movePac("right");
}
pressingKey = 1;
} else if (Key.isDown(37) && (pressingKey == 0)) {
if ((_root.started == 0) || ((_root.started == 1) && (_root.lastPacKey != "right"))) {
_root.pacman.gotoAndPlay("left");
_root.pacman._rotation = 0;
movePac("left");
}
pressingKey = 1;
} else if (Key.isDown(40) && (pressingKey == 0)) {
if ((_root.started == 0) || ((_root.started == 1) && (_root.lastPacKey != "up"))) {
_root.pacman.gotoAndPlay("right");
_root.pacman._rotation = 90;
movePac("down");
}
pressingKey = 1;
} else if (Key.isDown(38) && (pressingKey == 0)) {
if ((_root.started == 0) || ((_root.started == 1) && (_root.lastPacKey != "down"))) {
_root.pacman.gotoAndPlay("left");
_root.pacman._rotation = 90;
movePac("up");
}
pressingKey = 1;
}
if ((_root.started == 1) && (pressingKey == 0)) {
movePac(_root.lastPacKey);
}
pacX = _root.pacman._x - 10;
pacY = _root.pacman._y - 10;
if (_root.grid[(("tileg" + pacX) + "t") + pacY]._currentframe == 1) {
if (_root.lastPac.currentframe != 1) {
_root.started = 1;
}
_root.lastPac = (("tileg" + pacX) + "t") + pacY;
} else if (_root.started == 1) {
if (_root.currentRoute.contains((("tileg" + pacX) + "t") + pacY)) {
_root.pacDie();
} else {
_root.lastPacKey = "";
if (_root.doingFill == 0) {
_root.checkFill();
}
_root.clearRoute();
_root.lastPac = "";
}
}
}
if (_root.doubleSpeed == 1) {
this.gotoAndPlay(1);
}
if (_root.dontMove == 2) {
if (_root.pacDying == 0) {
hmm = 1;
while (hmm <= _root.howManyMowers) {
if (_root.pacman.hitTest(_root["mower" + hmm])) {
_root.pacDie();
}
hmm++;
}
hmg = 1;
while (hmg <= _root.howManyghosts) {
if (_root.pacman.hitTest(_root["ghost" + hmg])) {
_root.pacDie();
}
hmg++;
}
hmj = 1;
while (hmj <= _root.howManyjesters) {
if (_root.pacman.hitTest(_root["jester" + hmj])) {
_root.pacDie();
}
hmj++;
}
sr = 1;
while (sr <= _root.howManyShears) {
if (_root.pacman.hitTest(_root["shears" + sr])) {
_root.pacDie();
}
sr++;
}
}
}
}
Symbol 156 MovieClip Frame 6
Symbol 191 Button
on (release) {
_root.gotoAndStop("begin");
}
Symbol 195 MovieClip Frame 1
stop();