Frame 1
Stage.showMenu = false;
Frame 2
_global.Lives = 3;
_global.Scores = 0;
Stage.showMenu = false;
Frame 42
stop();
Frame 43
stop();
Stage.showMenu = false;
Instance of Symbol 141 MovieClip "Pacman" in Frame 43
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;
if (_global.Scores >= 80) {
_root.play();
gotoAndStop (44);
}
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 (44);
}
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 = "418.5";
_root.Monster._y = "121.75";
AttackNPC = 0;
AttackNPCTimer = 0;
_root.Monster2._x = "418.5";
_root.Monster2._y = "121.75";
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
_root.Monster3._x = "418.5";
_root.Monster3._y = "121.75";
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);
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 (this.hitTest(_root.Monster)) {
if (AttackNPC == 0) {
GameEnd();
} else {
NPCDied = new Sound(this);
NPCDied.attachSound("EatingGhost");
NPCDied.start(0, 1);
_root.Monster._x = "418.5";
_root.Monster._y = "121.75";
_root.Monster.gotoAndPlay(1);
AttackNPC = 0;
AttackNPCTimer = 0;
}
} else if (this.hitTest(_root.Monster2)) {
if (AttackNPC2 == 0) {
GameEnd();
} else {
NPCDied2 = new Sound(this);
NPCDied2.attachSound("EatingGhost");
NPCDied2.start(0, 1);
_root.Monster2._x = "418.5";
_root.Monster2._y = "121.75";
_root.Monster2.gotoAndPlay(1);
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
}
} else if (this.hitTest(_root.Monster3)) {
if (AttackNPC3 == 0) {
GameEnd();
} else {
NPCDied3 = new Sound(this);
NPCDied3.attachSound("EatingGhost");
NPCDied3.start(0, 1);
_root.Monster3._x = "418.5";
_root.Monster3._y = "121.75";
_root.Monster3.gotoAndPlay(1);
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
}
}
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
}
}
}
Frame 44
stop();
Stage.showMenu = false;
stopAllSounds();
IntMusic = new Sound();
IntMusic.attachSound("Intermission");
IntMusic.start(0, 1);
Frame 45
stop();
Stage.showMenu = false;
Instance of Symbol 141 MovieClip "Pacman" in Frame 45
onClipEvent (load) {
_root.Stuff.text = (((("X:" + _x) + " Y:") + _y) + " Time: ") + getTimer();
_root.Win._visible = false;
_root.GameOver._visible = false;
_global.NLevel = 3;
if (_global.Scores >= 143) {
_root.play();
gotoAndStop (44);
}
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 (44);
}
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 = "293";
_root.Monster._y = "224";
AttackNPC = 0;
AttackNPCTimer = 0;
_root.Monster2._x = "293";
_root.Monster2._y = "224";
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
_root.Monster3._x = "293";
_root.Monster3._y = "224";
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);
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 (this.hitTest(_root.Monster)) {
if (AttackNPC == 0) {
GameEnd();
} else {
NPCDied = new Sound(this);
NPCDied.attachSound("EatingGhost");
NPCDied.start(0, 1);
_root.Monster._x = "293";
_root.Monster._y = "224";
_root.Monster.gotoAndPlay(1);
NPCDir = 2;
AttackNPC = 0;
AttackNPCTimer = 0;
}
} else if (this.hitTest(_root.Monster2)) {
if (AttackNPC2 == 0) {
GameEnd();
} else {
NPCDied2 = new Sound(this);
NPCDied2.attachSound("EatingGhost");
NPCDied2.start(0, 1);
_root.Monster2._x = "293";
_root.Monster2._y = "224";
_root.Monster2.gotoAndPlay(1);
NPCDir2 = 2;
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
}
} else if (this.hitTest(_root.Monster3)) {
if (AttackNPC3 == 0) {
GameEnd();
} else {
NPCDied3 = new Sound(this);
NPCDied3.attachSound("EatingGhost");
NPCDied3.start(0, 1);
_root.Monster3._x = "293";
_root.Monster3._y = "224";
_root.Monster3.gotoAndPlay(1);
NPCDir3 = 2;
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
}
}
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
}
}
}
Frame 46
stop();
Stage.showMenu = false;
stopAllSounds();
IntMusic = new Sound();
IntMusic.attachSound("Intermission");
IntMusic.start(0, 1);
Frame 47
stop();
Stage.showMenu = false;
Instance of Symbol 141 MovieClip "Pacman" in Frame 47
onClipEvent (load) {
_root.Stuff.text = (((("X:" + _x) + " Y:") + _y) + " Time: ") + getTimer();
_root.Win._visible = false;
_root.GameOver._visible = false;
_root.Win2._visible = false;
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 = "275";
_y = "180.8";
_root.Monster._x = "264";
_root.Monster._y = "34.2";
AttackNPC = 0;
AttackNPCTimer = 0;
NPCDir = 3;
_root.Monster2._x = "264";
_root.Monster2._y = "34.2";
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
NPCDir2 = 3;
_root.Monster3._x = "264";
_root.Monster3._y = "34.2";
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);
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 (this.hitTest(_root.Monster)) {
if (AttackNPC == 0) {
GameEnd();
} else {
NPCDied = new Sound(this);
NPCDied.attachSound("EatingGhost");
NPCDied.start(0, 1);
_root.Monster._x = "264";
_root.Monster._y = "34.2";
_root.Monster.gotoAndPlay(1);
AttackNPC = 0;
AttackNPCTimer = 0;
NPCDir = 3;
}
} else if (this.hitTest(_root.Monster2)) {
if (AttackNPC2 == 0) {
GameEnd();
} else {
NPCDied2 = new Sound(this);
NPCDied2.attachSound("EatingGhost");
NPCDied2.start(0, 1);
_root.Monster2._x = "264";
_root.Monster2._y = "34.2";
_root.Monster2.gotoAndPlay(1);
AttackNPC2 = 0;
AttackNPCTimer2 = 0;
NPCDir2 = 3;
}
} else if (this.hitTest(_root.Monster3)) {
if (AttackNPC3 == 0) {
GameEnd();
} else {
NPCDied3 = new Sound(this);
NPCDied3.attachSound("EatingGhost");
NPCDied3.start(0, 1);
_root.Monster3._x = "264";
_root.Monster3._y = "34.2";
_root.Monster3.gotoAndPlay(1);
AttackNPC3 = 0;
AttackNPCTimer3 = 0;
NPCDir3 = 3;
}
}
_root.Score.text = _global.Scores;
_root.Lives.text = _global.Lives;
}
}
}
Frame 48
Stage.showMenu = false;
Frame 349
stop();
Frame 350
stop();
Stage.showMenu = false;
Symbol 37 MovieClip Frame 6
stop();
Symbol 41 Button
on (release) {
_root.play();
}
Symbol 49 MovieClip Frame 2
Symbol 49 MovieClip Frame 120
stop();
Symbol 50 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 50 MovieClip Frame 2
gotoAndPlay (1);
Symbol 50 MovieClip Frame 3
stopAllSounds();
Symbol 52 Button
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";
}
}
on (keyPress "m") {
trace(globalVolume.getVolume());
if (_root.globalvolume.getVolume() > 0) {
_root.globalvolume.setVolume(0);
} else {
_root.globalvolume.setVolume(100);
}
}
Symbol 60 Button
on (release) {
gotoAndPlay (48);
stopAllSounds();
}
Symbol 62 Button
on (release) {
stopAllSounds();
gotoAndPlay (350);
}
Symbol 64 Button
on (release) {
stopAllSounds();
gotoAndPlay (43);
}
Symbol 82 Button
on (release) {
stopAllSounds();
gotoAndPlay (43);
}
Symbol 90 MovieClip Frame 11
stop();
Symbol 141 MovieClip Frame 14
gotoAndPlay (1);
Symbol 155 MovieClip Frame 11
gotoAndPlay (1);
Symbol 155 MovieClip Frame 13
gotoAndPlay (12);
Symbol 158 MovieClip Frame 11
gotoAndPlay (1);
Symbol 158 MovieClip Frame 13
gotoAndPlay (12);
Symbol 169 Button
on (release) {
stopAllSounds();
gotoAndPlay (2);
}
Symbol 177 Button
on (release) {
stopAllSounds();
if (_global.NLevel == 2) {
_root.play();
gotoAndStop (45);
} else if (_global.NLevel == 3) {
_root.play();
gotoAndStop (47);
}
}
Symbol 192 MovieClip Frame 11
gotoAndPlay (1);
Symbol 192 MovieClip Frame 13
gotoAndPlay (12);
Symbol 203 MovieClip Frame 11
gotoAndPlay (1);
Symbol 203 MovieClip Frame 13
gotoAndPlay (12);
Symbol 206 Button
on (release) {
stopAllSounds();
gotoAndPlay (48);
}
Symbol 212 Button
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";
}
}
Symbol 216 Button
on (release) {
gotoAndPlay (2);
stopAllSounds();
}
Symbol 219 Button
on (release) {
stopAllSounds();
gotoAndPlay (2);
}