Frame 1
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
stopAllSounds();
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar.gotoAndStop(percentLoaded);
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Frame 2
if (_root.percentLoaded == 100) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 3
stop();
Frame 4
stop();
Frame 5
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Frame 85
stop();
Frame 104
stopAllSounds();
Frame 105
stopAllSounds();
Frame 106
stopAllSounds();
Frame 107
stopAllSounds();
Frame 108
stopAllSounds();
Frame 109
stop();
stopAllSounds();
Frame 115
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Stage.showMenu = false;
Frame 116
_global.Lives = 3;
_global.Scores = 0;
Stage.showMenu = false;
Frame 157
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
_global.Lives = 3;
_global.Scores = 0;
stop();
Stage.showMenu = false;
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Instance of Symbol 188 MovieClip "Pacman" in Frame 157
onClipEvent (load) {
_root.Stuff.text = (((("X:" + _x) + " Y:") + _y) + " Time: ") + getTimer();
_root.Win._visible = false;
_root.Warp1._visible = false;
_root.Warp2._visible = false;
_root.GameOver._visible = false;
_global.NLevel = 2;
DeathTimer = 0;
DeathTimer2 = 0;
DeathTimer3 = 0;
if (_global.Scores >= 80) {
_root.play();
gotoAndStop (158);
}
NPCSpeed = 6;
NPCRNum = 20;
myXSpeed = 6;
myYSpeed = 6;
NPCTime = getTimer();
NPCDir = Math.floor(Math.random() * 4);
AttackNPC = 0;
AttackNPCTimer = 0;
_root.NPCStuff.text = (((("NPCX:" + _root.Monster._x) + " NPCY:") + _root.Monster._y) + " NPCTime: ") + NPCTime;
NPCTime2 = getTimer();
NPCDir2 = Math.floor(Math.random() * 4);
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
NPCTime3 = getTimer();
NPCDir3 = Math.floor(Math.random() * 4);
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
GameStart = 0;
Time = getTimer();
Count = 1;
Dir = 0;
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
StartSong = new Sound(this);
StartSong.attachSound("OpeningSong");
StartSong.start(0, 1);
StartSong.onSoundComplete = function () {
GameStart = 1;
_root.StartT._visible = false;
};
}
on (keyPress "q") {
if (_quality == "LOW") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else if (_quality == "HIGH") {
_quality = "BEST";
} else if (_quality == "BEST") {
_quality = "LOW";
}
}
on (keyPress "Q") {
if (_quality == "LOW") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else if (_quality == "HIGH") {
_quality = "BEST";
} else if (_quality == "BEST") {
_quality = "LOW";
}
}
onClipEvent (enterFrame) {
if (GameStart > 0) {
_root.Stuff.text = (((("X:" + _x) + " Y:") + _y) + " Time: ") + Time;
if (_global.Scores >= 80) {
_root.play();
gotoAndStop (158);
}
with (_root.Monster) {
_root.NPCStuff.text = (((("NPCX:" + _x) + " NPCY:") + _y) + " NPCTime: ") + NPCTime;
if ((NPCTime + 25) < getTimer()) {
if (NPCDir == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
}
NPCTime = getTimer();
}
if (_root.Monster.hitTest(_root.Warp1)) {
_x = "12";
}
if (_root.Monster.hitTest(_root.Warp2)) {
_x = "537";
}
}
with (_root.Monster2) {
if ((NPCTime2 + 25) < getTimer()) {
if (NPCDir2 == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir2 = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir2 = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
}
NPCTime2 = getTimer();
}
if (_root.Monster2.hitTest(_root.Warp1)) {
_x = "12";
}
if (_root.Monster2.hitTest(_root.Warp2)) {
_x = "537";
}
}
with (_root.Monster3) {
_root.NPCStuff.text = (((("NPCX:" + _x) + " NPCY:") + _y) + " NPCTime: ") + NPCTime;
if ((NPCTime3 + 25) < getTimer()) {
if (NPCDir3 == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir3 = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir3 = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
}
NPCTime3 = getTimer();
}
if (_root.Monster3.hitTest(_root.Warp1)) {
_x = "12";
}
if (_root.Monster3.hitTest(_root.Warp2)) {
_x = "537";
}
}
with (_root.Pacman) {
if ((Time + 25) < getTimer()) {
if (Dir == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
_x = _x + myXSpeed;
}
} else if (Dir == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
_x = _x - myXSpeed;
}
} else if (Dir == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
_y = _y - myYSpeed;
}
} else if (Dir == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
_y = _y + myYSpeed;
}
}
Time = getTimer();
}
if (Key.isDown(40)) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax + myYSpeed, true)) {
OldDir = Dir;
Dir = 3;
_rotation = 90;
}
} else if (Key.isDown(38)) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin - myYSpeed, true)) {
OldDir = Dir;
Dir = 2;
_rotation = 270;
}
} else if (Key.isDown(37)) {
if (!_root.Wall.hitTest(getBounds(_root).xMin - myXSpeed, _y, true)) {
OldDir = Dir;
Dir = 1;
_rotation = 180;
}
} else if (Key.isDown(39)) {
if (!_root.Wall.hitTest(getBounds(_root).xMax + myXSpeed, _y, true)) {
OldDir = Dir;
Dir = 0;
_rotation = 0;
}
}
if (this.hitTest(_root.Warp1)) {
_x = "12";
}
if (this.hitTest(_root.Warp2)) {
_x = "537";
}
EatingS = new Sound(this);
EatingS.attachSound("Eating");
EatingFruit = new Sound(this);
EatingFruit.attachSound("EatingFruit");
if (AttackNPC == 1) {
if ((AttackNPCTimer + 10000) < getTimer()) {
AttackNPC = 0;
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9900) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9700) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9300) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9150) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 8500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 8000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 7500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 7000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
}
}
if (AttackNPC2 == 1) {
if ((AttackNPCTimer2 + 10000) < getTimer()) {
AttackNPC2 = 0;
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9900) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9700) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9300) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9150) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 8500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 8000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 7500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 7000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
}
}
if (AttackNPC3 == 1) {
if ((AttackNPCTimer3 + 10000) < getTimer()) {
AttackNPC3 = 0;
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9900) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9700) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9300) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9150) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 8500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 8000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 7500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 7000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
}
}
HitPower = function (PW) {
if (PW._visible == true) {
if (this.hitTest(PW)) {
EatingFruit.start(0, 1);
AttackNPC = 1;
AttackNPCTimer = getTimer();
AttackNPC2 = 1;
AttackNPCTimer2 = getTimer();
AttackNPC3 = 1;
AttackNPCTimer3 = getTimer();
PW._visible = false;
_root.Monster.gotoAndPlay(12);
_root.Monster2.gotoAndPlay(12);
_root.Monster3.gotoAndPlay(12);
}
}
};
HitPower(_root.Power1);
HitPower(_root.Power2);
HitPower(_root.Power3);
HitPoint = function (myMC) {
if (myMC._visible == true) {
if (this.hitTest(myMC)) {
_global.Scores = _global.Scores + 1;
myMC._visible = false;
EatingS.start(0, 1);
}
}
};
HitPoint(_root.Point1);
HitPoint(_root.Point2);
HitPoint(_root.Point3);
HitPoint(_root.Point4);
HitPoint(_root.Point5);
HitPoint(_root.Point6);
HitPoint(_root.Point7);
HitPoint(_root.Point8);
HitPoint(_root.Point9);
HitPoint(_root.Point10);
HitPoint(_root.Point11);
HitPoint(_root.Point12);
HitPoint(_root.Point13);
HitPoint(_root.Point14);
HitPoint(_root.Point15);
HitPoint(_root.Point16);
HitPoint(_root.Point17);
HitPoint(_root.Point18);
HitPoint(_root.Point19);
HitPoint(_root.Point20);
HitPoint(_root.Point21);
HitPoint(_root.Point22);
HitPoint(_root.Point23);
HitPoint(_root.Point24);
HitPoint(_root.Point25);
HitPoint(_root.Point26);
HitPoint(_root.Point27);
HitPoint(_root.Point28);
HitPoint(_root.Point29);
HitPoint(_root.Point30);
HitPoint(_root.Point31);
HitPoint(_root.Point32);
HitPoint(_root.Point33);
HitPoint(_root.Point34);
HitPoint(_root.Point35);
HitPoint(_root.Point36);
HitPoint(_root.Point37);
HitPoint(_root.Point38);
HitPoint(_root.Point39);
HitPoint(_root.Point40);
HitPoint(_root.Point41);
HitPoint(_root.Point42);
HitPoint(_root.Point43);
HitPoint(_root.Point44);
HitPoint(_root.Point45);
HitPoint(_root.Point46);
HitPoint(_root.Point47);
HitPoint(_root.Point48);
HitPoint(_root.Point49);
HitPoint(_root.Point50);
HitPoint(_root.Point51);
HitPoint(_root.Point52);
HitPoint(_root.Point53);
HitPoint(_root.Point54);
HitPoint(_root.Point55);
HitPoint(_root.Point56);
HitPoint(_root.Point57);
HitPoint(_root.Point58);
HitPoint(_root.Point59);
HitPoint(_root.Point60);
HitPoint(_root.Point61);
HitPoint(_root.Point62);
HitPoint(_root.Point63);
HitPoint(_root.Point64);
HitPoint(_root.Point65);
HitPoint(_root.Point66);
HitPoint(_root.Point67);
HitPoint(_root.Point68);
HitPoint(_root.Point69);
HitPoint(_root.Point70);
HitPoint(_root.Point71);
HitPoint(_root.Point72);
HitPoint(_root.Point73);
HitPoint(_root.Point74);
HitPoint(_root.Point75);
HitPoint(_root.Point76);
HitPoint(_root.Point77);
HitPoint(_root.Point78);
HitPoint(_root.Point79);
HitPoint(_root.Point80);
HitPoint(_root.Point81);
HitPoint(_root.Point82);
HitPoint(_root.Point83);
GameEnd = function () {
GameStart = 0;
this.gotoAndPlay(15);
Died = new Sound(this);
Died.attachSound("Died");
Died.start(0, 1);
Dir = 0;
_root.Monster._visible = false;
_root.Monster2._visible = false;
_root.Monster3._visible = false;
if (_global.Lives > 0) {
_global.Lives = _global.Lives - 1;
Died.onSoundComplete = function () {
_root.Monster._visible = true;
_root.Monster2._visible = true;
_root.Monster3._visible = true;
_rotation = 0;
_x = "27.3";
_y = "371.7";
_root.Monster._x = "323.1";
_root.Monster._y = "58.3";
AttackNPC = 0;
AttackNPCTimer = 0;
_root.Monster2._x = "361.3";
_root.Monster2._y = "55.5";
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
_root.Monster3._x = "277.4";
_root.Monster3._y = "56.9";
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
this.gotoAndStop("Menu", 1);
_root.StartT._visible = true;
StartSong.start(0, 1);
_root.Monster.gotoAndPlay(1);
_root.Monster2.gotoAndPlay(1);
_root.Monster3.gotoAndPlay(1);
onEnterFrame = function () {
var _local3 = 1;
while (_local3 <= 3) {
if (_global.Lives >= _local3) {
_root["life" + _local3]._visible = true;
} else {
_root["life" + _local3]._visible = false;
}
_local3++;
}
};
StartSong.onSoundComplete = function () {
GameStart = 1;
_root.StartT._visible = false;
};
};
} else {
_root.GameOver._visible = true;
Died.onSoundComplete = function () {
_root.Pacman._visible = false;
};
_root.Win._visible = true;
GameStart = 0;
}
};
if (_root.Monster._visible == false) {
if ((DeathTimer + 3000) < getTimer()) {
_root.Monster._visible = true;
_root.Monster._x = "418.5";
_root.Monster._y = "121.75";
_root.Monster.gotoAndPlay(1);
AttackNPC = 0;
AttackNPCTimer = 0;
}
}
if (_root.Monster2._visible == false) {
if ((DeathTimer2 + 3000) < getTimer()) {
_root.Monster2._visible = true;
_root.Monster2._x = "418.5";
_root.Monster2._y = "121.75";
_root.Monster2.gotoAndPlay(1);
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
}
}
if (_root.Monster3._visible == false) {
if ((DeathTimer3 + 3000) < getTimer()) {
_root.Monster3._visible = true;
_root.Monster3._x = "418.5";
_root.Monster3._y = "121.75";
_root.Monster3.gotoAndPlay(1);
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
}
}
if (this.hitTest(_root.Monster)) {
if (AttackNPC == 0) {
GameEnd();
} else {
NPCDied = new Sound(this);
NPCDied.attachSound("EatingGhost");
NPCDied.start(0, 1);
DeathTimer = getTimer();
_root.Monster._x = "-20";
_root.Monster._y = "-20";
_root.Monster._visible = false;
}
} else if (this.hitTest(_root.Monster2)) {
if (AttackNPC2 == 0) {
GameEnd();
} else {
NPCDied2 = new Sound(this);
NPCDied2.attachSound("EatingGhost");
NPCDied2.start(0, 1);
DeathTimer2 = getTimer();
_root.Monster2._x = "-20";
_root.Monster2._y = "-20";
_root.Monster2._visible = false;
}
} else if (this.hitTest(_root.Monster3)) {
if (AttackNPC3 == 0) {
GameEnd();
} else {
NPCDied3 = new Sound(this);
NPCDied3.attachSound("EatingGhost");
NPCDied3.start(0, 1);
DeathTimer3 = getTimer();
_root.Monster3._x = "-20";
_root.Monster3._y = "-20";
_root.Monster3._visible = false;
}
}
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
}
}
}
Frame 158
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
stop();
Stage.showMenu = false;
stopAllSounds();
IntMusic = new Sound();
IntMusic.attachSound("Intermission");
IntMusic.start(0, 1);
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Frame 159
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
stop();
Stage.showMenu = false;
onEnterFrame();
var i = 1;
while (i <= 3) {
if (_global.Lives >= i) {
_root["life" + i]._visible = true;
} else {
_root["life" + i]._visible = false;
}
i++;
}
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Instance of Symbol 188 MovieClip "Pacman" in Frame 159
onClipEvent (load) {
_root.Stuff.text = (((("X:" + _x) + " Y:") + _y) + " Time: ") + getTimer();
_root.Win._visible = false;
_root.GameOver._visible = false;
_global.NLevel = 3;
DeathTimer = 0;
DeathTimer2 = 0;
DeathTimer3 = 0;
if (_global.Scores >= 143) {
_root.play();
gotoAndStop (158);
}
NPCSpeed = 6;
NPCRNum = 20;
myXSpeed = 6;
myYSpeed = 6;
NPCTime = getTimer();
NPCDir = 2;
AttackNPC = 0;
AttackNPCTimer = 0;
NPCTime2 = getTimer();
NPCDir2 = 2;
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
NPCTime3 = getTimer();
NPCDir3 = 2;
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
GameStart = 0;
Time = getTimer();
Count = 1;
Dir = 0;
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
StartSong = new Sound(this);
StartSong.attachSound("OpeningSong");
StartSong.start(0, 1);
StartSong.onSoundComplete = function () {
GameStart = 1;
_root.StartT._visible = false;
};
}
on (keyPress "q") {
if (_quality == "LOW") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else if (_quality == "HIGH") {
_quality = "BEST";
} else if (_quality == "BEST") {
_quality = "LOW";
}
}
on (keyPress "Q") {
if (_quality == "LOW") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else if (_quality == "HIGH") {
_quality = "BEST";
} else if (_quality == "BEST") {
_quality = "LOW";
}
}
onClipEvent (enterFrame) {
if (GameStart > 0) {
if (_global.Scores >= 143) {
_root.play();
gotoAndStop (158);
}
with (_root.Monster) {
if ((NPCTime + 25) < getTimer()) {
if (NPCDir == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
}
NPCTime = getTimer();
}
if (NPCDir == 0) {
if (_root.Monster.hitTest(_root.Warp1)) {
_x = "323.3";
}
}
if (NPCDir == 1) {
if (_root.Monster.hitTest(_root.Warp2)) {
NPCDir = 3;
_x = "525.3";
_y = "113";
}
if (_root.Monster.hitTest(_root.Warp11)) {
_x = "89.55";
}
}
if (NPCDir == 2) {
if (_root.Monster.hitTest(_root.Warp3)) {
_y = "334.55";
}
if (_root.Monster.hitTest(_root.Warp22)) {
NPCDir = 0;
_x = "61.5";
_y = "73.6";
}
}
if (NPCDir == 3) {
if (_root.Monster.hitTest(_root.Warp33)) {
_y = "73.6";
}
}
}
with (_root.Monster2) {
if ((NPCTime2 + 25) < getTimer()) {
if (NPCDir2 == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir2 = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir2 = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
}
NPCTime2 = getTimer();
}
if (NPCDir2 == 0) {
if (_root.Monster2.hitTest(_root.Warp1)) {
_x = "323.3";
}
}
if (NPCDir2 == 1) {
if (_root.Monster2.hitTest(_root.Warp2)) {
NPCDir2 = 3;
_x = "525.3";
_y = "113";
}
if (_root.Monster2.hitTest(_root.Warp11)) {
_x = "89.55";
}
}
if (NPCDir2 == 2) {
if (_root.Monster2.hitTest(_root.Warp3)) {
_y = "334.55";
}
if (_root.Monster2.hitTest(_root.Warp22)) {
NPCDir2 = 0;
_x = "61.5";
_y = "73.6";
}
}
if (NPCDir2 == 3) {
if (_root.Monster2.hitTest(_root.Warp33)) {
_y = "73.6";
}
}
}
with (_root.Monster3) {
if ((NPCTime3 + 25) < getTimer()) {
if (NPCDir3 == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir3 = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir3 = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
}
NPCTime3 = getTimer();
}
if (NPCDir3 == 0) {
if (_root.Monster3.hitTest(_root.Warp1)) {
_x = "323.3";
}
}
if (NPCDir3 == 1) {
if (_root.Monster3.hitTest(_root.Warp2)) {
NPCDir3 = 3;
_x = "525.3";
_y = "113";
}
if (_root.Monster3.hitTest(_root.Warp11)) {
_x = "89.55";
}
}
if (NPCDir3 == 2) {
if (_root.Monster3.hitTest(_root.Warp3)) {
_y = "334.55";
}
if (_root.Monster3.hitTest(_root.Warp22)) {
NPCDir3 = 0;
_x = "61.5";
_y = "73.6";
}
}
if (NPCDir3 == 3) {
if (_root.Monster3.hitTest(_root.Warp33)) {
_y = "73.6";
}
}
}
with (_root.Pacman) {
if ((Time + 25) < getTimer()) {
if (Dir == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
_x = _x + myXSpeed;
}
} else if (Dir == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
_x = _x - myXSpeed;
}
} else if (Dir == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
_y = _y - myYSpeed;
}
} else if (Dir == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
_y = _y + myYSpeed;
}
}
Time = getTimer();
}
if (Key.isDown(40)) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax + myYSpeed, true)) {
OldDir = Dir;
Dir = 3;
_rotation = 90;
}
} else if (Key.isDown(38)) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin - myYSpeed, true)) {
OldDir = Dir;
Dir = 2;
_rotation = 270;
}
} else if (Key.isDown(37)) {
if (!_root.Wall.hitTest(getBounds(_root).xMin - myXSpeed, _y, true)) {
OldDir = Dir;
Dir = 1;
_rotation = 180;
}
} else if (Key.isDown(39)) {
if (!_root.Wall.hitTest(getBounds(_root).xMax + myXSpeed, _y, true)) {
OldDir = Dir;
Dir = 0;
_rotation = 0;
}
}
if (Dir == 0) {
if (this.hitTest(_root.Warp1)) {
_x = "323.3";
}
}
if (Dir == 1) {
if (this.hitTest(_root.Warp2)) {
Dir = 3;
_rotation = 90;
_x = "525.3";
_y = "113";
}
if (this.hitTest(_root.Warp11)) {
_x = "89.55";
}
}
if (Dir == 2) {
if (this.hitTest(_root.Warp3)) {
_y = "334.55";
}
if (this.hitTest(_root.Warp22)) {
Dir = 0;
_rotation = 0;
_x = "61.5";
_y = "73.6";
}
}
if (Dir == 3) {
if (this.hitTest(_root.Warp33)) {
_y = "73.6";
}
}
EatingS = new Sound(this);
EatingS.attachSound("Eating");
EatingFruit = new Sound(this);
EatingFruit.attachSound("EatingFruit");
if (AttackNPC == 1) {
if ((AttackNPCTimer + 10000) < getTimer()) {
AttackNPC = 0;
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9900) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9700) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9300) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9150) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 8500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 8000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 7500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 7000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
}
}
if (AttackNPC2 == 1) {
if ((AttackNPCTimer2 + 10000) < getTimer()) {
AttackNPC2 = 0;
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9900) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9700) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9300) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9150) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 8500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 8000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 7500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 7000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
}
}
if (AttackNPC3 == 1) {
if ((AttackNPCTimer3 + 10000) < getTimer()) {
AttackNPC3 = 0;
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9900) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9700) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9300) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9150) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 8500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 8000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 7500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 7000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
}
}
HitPower = function (PW) {
if (PW._visible == true) {
if (this.hitTest(PW)) {
EatingFruit.start(0, 1);
AttackNPC = 1;
AttackNPCTimer = getTimer();
AttackNPC2 = 1;
AttackNPCTimer2 = getTimer();
AttackNPC3 = 1;
AttackNPCTimer3 = getTimer();
PW._visible = false;
_root.Monster.gotoAndPlay(12);
_root.Monster2.gotoAndPlay(12);
_root.Monster3.gotoAndPlay(12);
}
}
};
HitPower(_root.Power1);
HitPower(_root.Power2);
HitPower(_root.Power3);
HitPoint = function (myMC) {
if (myMC._visible == true) {
if (this.hitTest(myMC)) {
_global.Scores = _global.Scores + 1;
myMC._visible = false;
EatingS.start(0, 1);
}
}
};
HitPoint(_root.Point1);
HitPoint(_root.Point2);
HitPoint(_root.Point3);
HitPoint(_root.Point4);
HitPoint(_root.Point5);
HitPoint(_root.Point6);
HitPoint(_root.Point7);
HitPoint(_root.Point8);
HitPoint(_root.Point9);
HitPoint(_root.Point10);
HitPoint(_root.Point11);
HitPoint(_root.Point12);
HitPoint(_root.Point13);
HitPoint(_root.Point14);
HitPoint(_root.Point15);
HitPoint(_root.Point16);
HitPoint(_root.Point17);
HitPoint(_root.Point18);
HitPoint(_root.Point19);
HitPoint(_root.Point20);
HitPoint(_root.Point21);
HitPoint(_root.Point22);
HitPoint(_root.Point23);
HitPoint(_root.Point24);
HitPoint(_root.Point25);
HitPoint(_root.Point26);
HitPoint(_root.Point27);
HitPoint(_root.Point28);
HitPoint(_root.Point29);
HitPoint(_root.Point30);
HitPoint(_root.Point31);
HitPoint(_root.Point32);
HitPoint(_root.Point33);
HitPoint(_root.Point34);
HitPoint(_root.Point35);
HitPoint(_root.Point36);
HitPoint(_root.Point37);
HitPoint(_root.Point38);
HitPoint(_root.Point39);
HitPoint(_root.Point40);
HitPoint(_root.Point41);
HitPoint(_root.Point42);
HitPoint(_root.Point43);
HitPoint(_root.Point44);
HitPoint(_root.Point45);
HitPoint(_root.Point46);
HitPoint(_root.Point47);
HitPoint(_root.Point48);
HitPoint(_root.Point49);
HitPoint(_root.Point50);
HitPoint(_root.Point51);
HitPoint(_root.Point52);
HitPoint(_root.Point53);
HitPoint(_root.Point54);
HitPoint(_root.Point55);
HitPoint(_root.Point56);
HitPoint(_root.Point57);
HitPoint(_root.Point58);
HitPoint(_root.Point59);
HitPoint(_root.Point60);
HitPoint(_root.Point61);
HitPoint(_root.Point62);
HitPoint(_root.Point63);
HitPoint(_root.Point64);
HitPoint(_root.Point65);
HitPoint(_root.Point66);
HitPoint(_root.Point67);
HitPoint(_root.Point68);
HitPoint(_root.Point69);
HitPoint(_root.Point70);
HitPoint(_root.Point71);
HitPoint(_root.Point72);
HitPoint(_root.Point73);
HitPoint(_root.Point74);
HitPoint(_root.Point75);
HitPoint(_root.Point76);
HitPoint(_root.Point77);
HitPoint(_root.Point78);
HitPoint(_root.Point79);
HitPoint(_root.Point80);
HitPoint(_root.Point81);
HitPoint(_root.Point82);
HitPoint(_root.Point83);
GameEnd = function () {
GameStart = 0;
this.gotoAndPlay(15);
Died = new Sound(this);
Died.attachSound("Died");
Died.start(0, 1);
Dir = 0;
_root.Monster._visible = false;
_root.Monster2._visible = false;
_root.Monster3._visible = false;
if (_global.Lives > 0) {
_global.Lives = _global.Lives - 1;
Died.onSoundComplete = function () {
_root.Monster._visible = true;
_root.Monster2._visible = true;
_root.Monster3._visible = true;
_rotation = 0;
_x = "47.3";
_y = "358";
_root.Monster._x = "301.3";
_root.Monster._y = "207.2";
AttackNPC = 0;
AttackNPCTimer = 0;
_root.Monster2._x = "257.9";
_root.Monster2._y = "206.8";
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
_root.Monster3._x = "211.4";
_root.Monster3._y = "207.1";
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
this.gotoAndPlay(1);
_root.StartT._visible = true;
StartSong.start(0, 1);
_root.Monster.gotoAndPlay(1);
_root.Monster2.gotoAndPlay(1);
_root.Monster3.gotoAndPlay(1);
var _local4 = 1;
while (_local4 <= 3) {
if (_global.Lives >= _local4) {
_root["life" + _local4]._visible = true;
} else {
_root["life" + _local4]._visible = false;
}
_local4++;
}
StartSong.onSoundComplete = function () {
GameStart = 1;
_root.StartT._visible = false;
};
};
} else {
_root.GameOver._visible = true;
Died.onSoundComplete = function () {
_root.Pacman._visible = false;
};
_root.Win._visible = true;
GameStart = 0;
}
};
if (_root.Monster._visible == false) {
if ((DeathTimer + 3000) < getTimer()) {
_root.Monster._visible = true;
_root.Monster._x = "301.3";
_root.Monster._y = "207.1";
_root.Monster.gotoAndPlay(1);
AttackNPC = 0;
AttackNPCTimer = 0;
}
}
if (_root.Monster2._visible == false) {
if ((DeathTimer2 + 3000) < getTimer()) {
_root.Monster2._visible = true;
_root.Monster2._x = "257.9";
_root.Monster2._y = "206.8";
_root.Monster2.gotoAndPlay(1);
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
}
}
if (_root.Monster3._visible == false) {
if ((DeathTimer3 + 3000) < getTimer()) {
_root.Monster3._visible = true;
_root.Monster3._x = "211.4";
_root.Monster3._y = "207.1";
_root.Monster3.gotoAndPlay(1);
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
}
}
if (this.hitTest(_root.Monster)) {
if (AttackNPC == 0) {
GameEnd();
} else {
NPCDied = new Sound(this);
NPCDied.attachSound("EatingGhost");
NPCDied.start(0, 1);
DeathTimer = getTimer();
_root.Monster._x = "-20";
_root.Monster._y = "-20";
_root.Monster._visible = false;
NPCDir = 2;
}
} else if (this.hitTest(_root.Monster2)) {
if (AttackNPC2 == 0) {
GameEnd();
} else {
NPCDied2 = new Sound(this);
NPCDied2.attachSound("EatingGhost");
NPCDied2.start(0, 1);
DeathTimer2 = getTimer();
_root.Monster2._x = "-20";
_root.Monster2._y = "-20";
_root.Monster2._visible = false;
NPCDir2 = 2;
}
} else if (this.hitTest(_root.Monster3)) {
if (AttackNPC3 == 0) {
GameEnd();
} else {
NPCDied3 = new Sound(this);
NPCDied3.attachSound("EatingGhost");
NPCDied3.start(0, 1);
DeathTimer3 = getTimer();
_root.Monster3._x = "-20";
_root.Monster3._y = "-20";
_root.Monster3._visible = false;
NPCDir3 = 2;
}
}
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
}
}
}
Frame 160
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
stop();
Stage.showMenu = false;
stopAllSounds();
IntMusic = new Sound();
IntMusic.attachSound("Intermission");
IntMusic.start(0, 1);
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Frame 161
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
stop();
Stage.showMenu = false;
onEnterFrame();
var i = 1;
while (i <= 3) {
if (_global.Lives >= i) {
_root["life" + i]._visible = true;
} else {
_root["life" + i]._visible = false;
}
i++;
}
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Instance of Symbol 188 MovieClip "Pacman" in Frame 161
onClipEvent (load) {
_root.Stuff.text = (((("X:" + _x) + " Y:") + _y) + " Time: ") + getTimer();
_root.Win._visible = false;
_root.GameOver._visible = false;
_root.Win2._visible = false;
_root.Win3._visible = false;
DeathTimer = 0;
DeathTimer2 = 0;
DeathTimer3 = 0;
if (_global.Scores >= 216) {
GameStart = 0;
_root.Win._visible = true;
_root.Win2._visible = true;
}
NPCSpeed = 6;
NPCRNum = 20;
myXSpeed = 6;
myYSpeed = 6;
NPCTime = getTimer();
NPCDir = 3;
AttackNPC = 0;
AttackNPCTimer = 0;
NPCTime2 = getTimer();
NPCDir2 = 3;
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
NPCTime3 = getTimer();
NPCDir3 = 3;
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
GameStart = 0;
Time = getTimer();
Count = 1;
Dir = 0;
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
StartSong = new Sound(this);
StartSong.attachSound("OpeningSong");
StartSong.start(0, 1);
StartSong.onSoundComplete = function () {
GameStart = 1;
_root.StartT._visible = false;
};
}
on (keyPress "q") {
if (_quality == "LOW") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else if (_quality == "HIGH") {
_quality = "BEST";
} else if (_quality == "BEST") {
_quality = "LOW";
}
}
on (keyPress "Q") {
if (_quality == "LOW") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else if (_quality == "HIGH") {
_quality = "BEST";
} else if (_quality == "BEST") {
_quality = "LOW";
}
}
onClipEvent (enterFrame) {
if (GameStart > 0) {
if (_global.Scores >= 216) {
GameStart = 0;
_root.Win._visible = true;
_root.Win2._visible = true;
}
with (_root.Monster) {
if ((NPCTime + 25) < getTimer()) {
if (NPCDir == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
} else if (NPCDir == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir = NPCDir;
do {
i = Math.floor(Math.random() * 4);
NPCDir = i;
} while (i == OldNPCDir);
}
}
NPCTime = getTimer();
}
if (NPCDir == 2) {
if (_root.Monster.hitTest(_root.Warp1)) {
NPCDir = 3;
_x = "496.2";
_y = "73";
}
if (_root.Monster.hitTest(_root.Warp11)) {
NPCDir = 3;
_x = "61.1";
_y = "73";
}
} else if (NPCDir == 3) {
if (_root.Monster.hitTest(_root.Warp2)) {
NPCDir = 2;
_x = "496.2";
_y = "327.4";
}
if (_root.Monster.hitTest(_root.Warp22)) {
NPCDir = 2;
_x = "61.1";
_y = "327.4";
}
}
}
with (_root.Monster2) {
if ((NPCTime2 + 25) < getTimer()) {
if (NPCDir2 == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir2 = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir2 = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
} else if (NPCDir2 == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir2 = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir2 = NPCDir2;
do {
i = Math.floor(Math.random() * 4);
NPCDir2 = i;
} while (i == OldNPCDir2);
}
}
NPCTime2 = getTimer();
}
if (NPCDir2 == 2) {
if (_root.Monster2.hitTest(_root.Warp1)) {
NPCDir2 = 3;
_x = "496.2";
_y = "73";
}
if (_root.Monster2.hitTest(_root.Warp11)) {
NPCDir2 = 3;
_x = "61.1";
_y = "73";
}
} else if (NPCDir2 == 3) {
if (_root.Monster2.hitTest(_root.Warp2)) {
NPCDir2 = 2;
_x = "496.2";
_y = "327.4";
}
if (_root.Monster2.hitTest(_root.Warp22)) {
NPCDir2 = 2;
_x = "61.1";
_y = "327.4";
}
}
}
with (_root.Monster3) {
if ((NPCTime3 + 25) < getTimer()) {
if (NPCDir3 == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir3 = 3;
}
}
_x = _x + NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
NPCDir3 = 3;
}
}
_x = _x - NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 3;
}
}
_y = _y - NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
} else if (NPCDir3 == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
c = Math.floor(Math.random() * NPCRNum);
if (c == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 2;
} else if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
NPCDir3 = 3;
}
}
_y = _y + NPCSpeed;
} else {
OldNPCDir3 = NPCDir3;
do {
i = Math.floor(Math.random() * 4);
NPCDir3 = i;
} while (i == OldNPCDir3);
}
}
NPCTime3 = getTimer();
}
if (NPCDir3 == 2) {
if (_root.Monster3.hitTest(_root.Warp1)) {
NPCDir3 = 3;
_x = "496.2";
_y = "73";
}
if (_root.Monster3.hitTest(_root.Warp11)) {
NPCDir3 = 3;
_x = "61.1";
_y = "73";
}
} else if (NPCDir3 == 3) {
if (_root.Monster3.hitTest(_root.Warp2)) {
NPCDir3 = 2;
_x = "496.2";
_y = "327.4";
}
if (_root.Monster3.hitTest(_root.Warp22)) {
NPCDir3 = 2;
_x = "61.1";
_y = "327.4";
}
}
}
with (_root.Pacman) {
if ((Time + 25) < getTimer()) {
if (Dir == 0) {
if (!_root.Wall.hitTest(getBounds(_root).xMax, _y, true)) {
_x = _x + myXSpeed;
}
} else if (Dir == 1) {
if (!_root.Wall.hitTest(getBounds(_root).xMin, _y, true)) {
_x = _x - myXSpeed;
}
} else if (Dir == 2) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin, true)) {
_y = _y - myYSpeed;
}
} else if (Dir == 3) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax, true)) {
_y = _y + myYSpeed;
}
}
Time = getTimer();
}
if (Key.isDown(40)) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMax + myYSpeed, true)) {
OldDir = Dir;
Dir = 3;
_rotation = 90;
}
} else if (Key.isDown(38)) {
if (!_root.Wall.hitTest(_x, getBounds(_root).yMin - myYSpeed, true)) {
OldDir = Dir;
Dir = 2;
_rotation = 270;
}
} else if (Key.isDown(37)) {
if (!_root.Wall.hitTest(getBounds(_root).xMin - myXSpeed, _y, true)) {
OldDir = Dir;
Dir = 1;
_rotation = 180;
}
} else if (Key.isDown(39)) {
if (!_root.Wall.hitTest(getBounds(_root).xMax + myXSpeed, _y, true)) {
OldDir = Dir;
Dir = 0;
_rotation = 0;
}
}
if (Dir == 2) {
if (this.hitTest(_root.Warp1)) {
Dir = 3;
_rotation = 90;
_x = "496.2";
_y = "71.8";
}
if (this.hitTest(_root.Warp11)) {
Dir = 3;
_rotation = 90;
_x = "61.1";
_y = "71.8";
}
} else if (Dir == 3) {
if (this.hitTest(_root.Warp2)) {
Dir = 2;
_rotation = 270;
_x = "496.2";
_y = "327.4";
}
if (this.hitTest(_root.Warp22)) {
Dir = 2;
_rotation = 270;
_x = "61.1";
_y = "327.4";
}
}
EatingS = new Sound(this);
EatingS.attachSound("Eating");
EatingFruit = new Sound(this);
EatingFruit.attachSound("EatingFruit");
if (AttackNPC == 1) {
if ((AttackNPCTimer + 10000) < getTimer()) {
AttackNPC = 0;
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9900) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9700) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9300) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 9150) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 9000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 8500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 8000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
} else if ((AttackNPCTimer + 7500) < getTimer()) {
_root.Monster.gotoAndPlay(12);
} else if ((AttackNPCTimer + 7000) < getTimer()) {
_root.Monster.gotoAndPlay(1);
}
}
if (AttackNPC2 == 1) {
if ((AttackNPCTimer2 + 10000) < getTimer()) {
AttackNPC2 = 0;
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9900) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9700) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9300) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 9150) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 9000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 8500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 8000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
} else if ((AttackNPCTimer2 + 7500) < getTimer()) {
_root.Monster2.gotoAndPlay(12);
} else if ((AttackNPCTimer2 + 7000) < getTimer()) {
_root.Monster2.gotoAndPlay(1);
}
}
if (AttackNPC3 == 1) {
if ((AttackNPCTimer3 + 10000) < getTimer()) {
AttackNPC3 = 0;
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9900) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9700) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9300) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 9150) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 9000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 8500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 8000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
} else if ((AttackNPCTimer3 + 7500) < getTimer()) {
_root.Monster3.gotoAndPlay(12);
} else if ((AttackNPCTimer3 + 7000) < getTimer()) {
_root.Monster3.gotoAndPlay(1);
}
}
HitPower = function (PW) {
if (PW._visible == true) {
if (this.hitTest(PW)) {
EatingFruit.start(0, 1);
AttackNPC = 1;
AttackNPCTimer = getTimer();
AttackNPC2 = 1;
AttackNPCTimer2 = getTimer();
AttackNPC3 = 1;
AttackNPCTimer3 = getTimer();
PW._visible = false;
_root.Monster.gotoAndPlay(12);
_root.Monster2.gotoAndPlay(12);
_root.Monster3.gotoAndPlay(12);
}
}
};
HitPower(_root.Power1);
HitPower(_root.Power2);
HitPower(_root.Power3);
HitPoint = function (myMC) {
if (myMC._visible == true) {
if (this.hitTest(myMC)) {
_global.Scores = _global.Scores + 1;
myMC._visible = false;
EatingS.start(0, 1);
}
}
};
HitPoint(_root.Point1);
HitPoint(_root.Point2);
HitPoint(_root.Point3);
HitPoint(_root.Point4);
HitPoint(_root.Point5);
HitPoint(_root.Point6);
HitPoint(_root.Point7);
HitPoint(_root.Point8);
HitPoint(_root.Point9);
HitPoint(_root.Point10);
HitPoint(_root.Point11);
HitPoint(_root.Point12);
HitPoint(_root.Point13);
HitPoint(_root.Point14);
HitPoint(_root.Point15);
HitPoint(_root.Point16);
HitPoint(_root.Point17);
HitPoint(_root.Point18);
HitPoint(_root.Point19);
HitPoint(_root.Point20);
HitPoint(_root.Point21);
HitPoint(_root.Point22);
HitPoint(_root.Point23);
HitPoint(_root.Point24);
HitPoint(_root.Point25);
HitPoint(_root.Point26);
HitPoint(_root.Point27);
HitPoint(_root.Point28);
HitPoint(_root.Point29);
HitPoint(_root.Point30);
HitPoint(_root.Point31);
HitPoint(_root.Point32);
HitPoint(_root.Point33);
HitPoint(_root.Point34);
HitPoint(_root.Point35);
HitPoint(_root.Point36);
HitPoint(_root.Point37);
HitPoint(_root.Point38);
HitPoint(_root.Point39);
HitPoint(_root.Point40);
HitPoint(_root.Point41);
HitPoint(_root.Point42);
HitPoint(_root.Point43);
HitPoint(_root.Point44);
HitPoint(_root.Point45);
HitPoint(_root.Point46);
HitPoint(_root.Point47);
HitPoint(_root.Point48);
HitPoint(_root.Point49);
HitPoint(_root.Point50);
HitPoint(_root.Point51);
HitPoint(_root.Point52);
HitPoint(_root.Point53);
HitPoint(_root.Point54);
HitPoint(_root.Point55);
HitPoint(_root.Point56);
HitPoint(_root.Point57);
HitPoint(_root.Point58);
HitPoint(_root.Point59);
HitPoint(_root.Point60);
HitPoint(_root.Point61);
HitPoint(_root.Point62);
HitPoint(_root.Point63);
HitPoint(_root.Point64);
HitPoint(_root.Point65);
HitPoint(_root.Point66);
HitPoint(_root.Point67);
HitPoint(_root.Point68);
HitPoint(_root.Point69);
HitPoint(_root.Point70);
HitPoint(_root.Point71);
HitPoint(_root.Point72);
HitPoint(_root.Point73);
HitPoint(_root.Point74);
HitPoint(_root.Point75);
HitPoint(_root.Point76);
HitPoint(_root.Point77);
HitPoint(_root.Point78);
HitPoint(_root.Point79);
HitPoint(_root.Point80);
HitPoint(_root.Point81);
HitPoint(_root.Point82);
HitPoint(_root.Point83);
GameEnd = function () {
GameStart = 0;
this.gotoAndPlay(15);
Died = new Sound(this);
Died.attachSound("Died");
Died.start(0, 1);
Dir = 0;
_root.Monster._visible = false;
_root.Monster2._visible = false;
_root.Monster3._visible = false;
if (_global.Lives > 0) {
_global.Lives = _global.Lives - 1;
Died.onSoundComplete = function () {
_root.Monster._visible = true;
_root.Monster2._visible = true;
_root.Monster3._visible = true;
_rotation = 0;
_x = "433.4";
_y = "316.9";
_root.Monster._x = "195.3";
_root.Monster._y = "150.9";
AttackNPC = 0;
AttackNPCTimer = 0;
NPCDir = 3;
_root.Monster2._x = "68.8";
_root.Monster2._y = "324.4";
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
NPCDir2 = 3;
_root.Monster3._x = "435.0";
_root.Monster3._y = "160.7";
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
NPCDir3 = 3;
this.gotoAndPlay(1);
_root.StartT._visible = true;
StartSong.start(0, 1);
_root.Monster.gotoAndPlay(1);
_root.Monster2.gotoAndPlay(1);
_root.Monster3.gotoAndPlay(1);
var _local4 = 1;
while (_local4 <= 3) {
if (_global.Lives >= _local4) {
_root["life" + _local4]._visible = true;
} else {
_root["life" + _local4]._visible = false;
}
_local4++;
}
StartSong.onSoundComplete = function () {
GameStart = 1;
_root.StartT._visible = false;
};
};
} else {
_root.GameOver._visible = true;
Died.onSoundComplete = function () {
_root.Pacman._visible = false;
};
_root.Win3._visible = true;
GameStart = 0;
}
};
if (_root.Monster._visible == false) {
if ((DeathTimer + 3000) < getTimer()) {
_root.Monster._visible = true;
_root.Monster._x = "272";
_root.Monster._y = "50";
_root.Monster.gotoAndPlay(1);
AttackNPC = 0;
AttackNPCTimer = 0;
}
}
if (_root.Monster2._visible == false) {
if ((DeathTimer2 + 3000) < getTimer()) {
_root.Monster2._visible = true;
_root.Monster2._x = "272";
_root.Monster2._y = "50";
_root.Monster2.gotoAndPlay(1);
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
}
}
if (_root.Monster3._visible == false) {
if ((DeathTimer3 + 3000) < getTimer()) {
_root.Monster3._visible = true;
_root.Monster3._x = "272";
_root.Monster3._y = "50";
_root.Monster3.gotoAndPlay(1);
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
}
}
if (this.hitTest(_root.Monster)) {
if (AttackNPC == 0) {
GameEnd();
} else {
NPCDied = new Sound(this);
NPCDied.attachSound("EatingGhost");
NPCDied.start(0, 1);
DeathTimer = getTimer();
_root.Monster._x = "-20";
_root.Monster._y = "-20";
_root.Monster._visible = false;
NPCDir = 3;
}
} else if (this.hitTest(_root.Monster2)) {
if (AttackNPC2 == 0) {
GameEnd();
} else {
NPCDied2 = new Sound(this);
NPCDied2.attachSound("EatingGhost");
NPCDied2.start(0, 1);
DeathTimer2 = getTimer();
_root.Monster2._x = "-20";
_root.Monster2._y = "-20";
_root.Monster2._visible = false;
NPCDir2 = 3;
}
} else if (this.hitTest(_root.Monster3)) {
if (AttackNPC3 == 0) {
GameEnd();
} else {
NPCDied3 = new Sound(this);
NPCDied3.attachSound("EatingGhost");
NPCDied3.start(0, 1);
DeathTimer3 = getTimer();
_root.Monster3._x = "-20";
_root.Monster3._y = "-20";
_root.Monster3._visible = false;
NPCDir3 = 3;
}
}
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
}
}
}
Frame 235
function itemHandler(obj, item) {
getURL ("http://www.claytron.net", "_blank");
}
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Claytron's Site", itemHandler));
_root.menu = root_cm;
Frame 355
stop();
Symbol 32 MovieClip Frame 100
gotoAndPlay (2);
Symbol 35 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 42 MovieClip Frame 81
_root.play();
_root.play();
Symbol 65 Button
on (release) {
getURL ("http://www.claytron.net", "_blank");
}
Symbol 70 MovieClip Frame 139
_root.play();
Symbol 81 Button
on (press) {
getURL ("http://newgrounds.com/collection/halloween2006.html", "_blank");
}
Symbol 84 Button
on (press) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 101 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 102 Button
on (release) {
stopAllSounds();
gotoAndPlay (86);
}
Symbol 103 Button
on (release) {
gotoAndPlay (115);
}
Symbol 109 Button
on (release) {
nextFrame();
}
Symbol 154 Button
on (release) {
gotoAndPlay (5);
}
Symbol 188 MovieClip Frame 14
gotoAndPlay (1);
Symbol 193 MovieClip Frame 11
gotoAndPlay (1);
Symbol 193 MovieClip Frame 13
gotoAndPlay (12);
Symbol 196 MovieClip Frame 11
gotoAndPlay (1);
Symbol 196 MovieClip Frame 13
gotoAndPlay (12);
Symbol 198 MovieClip Frame 11
gotoAndPlay (1);
Symbol 198 MovieClip Frame 13
gotoAndPlay (12);
Symbol 210 Button
on (release) {
stopAllSounds();
gotoAndPlay (5);
}
Symbol 216 Button
on (release) {
stopAllSounds();
if (_global.NLevel == 2) {
_root.play();
gotoAndStop (159);
} else if (_global.NLevel == 3) {
_root.play();
gotoAndStop (161);
}
}
Symbol 236 MovieClip Frame 100
stop();
Symbol 240 MovieClip Frame 11
gotoAndPlay (1);
Symbol 240 MovieClip Frame 13
gotoAndPlay (12);
Symbol 243 Button
on (release) {
stopAllSounds();
gotoAndPlay (116);
}
Symbol 249 MovieClip Frame 100
stop();
Symbol 253 MovieClip Frame 11
gotoAndPlay (1);
Symbol 253 MovieClip Frame 13
gotoAndPlay (12);
Symbol 260 Button
on (release) {
stopAllSounds();
gotoAndPlay (235);
}
Symbol 288 Button
on (release) {
stopAllSounds();
gotoAndPlay (5);
}