[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 1 (77 B)
loading = "LOAD\n" + Math.floor((100 * getBytesLoaded()) / getBytesTotal());
Frame 2 (67 B)
if (getBytesLoaded() < getBytesTotal()) {
gotoAndPlay (1);
}
Frame 3 (8 B)
stop();
Frame 5 (156 B)
ghostFlag = 0;
ghostSpeed = 5;
levels = 1;
score = 0;
pacDir = 0;
pacX = 0;
pacY = 0;
lives = 0;
pills.pill24.gotoAndStop(2);
fail.gotoAndPlay(2);
Frame 6 (2.2 KiB) ●
if (Key.isdown(27)) {
getURL ("pacman.html");
}
if (Key.isdown(37)) {
pacX = -1;
}
if (Key.isdown(39)) {
pacX = 1;
}
if (Key.isdown(38)) {
pacY = -1;
}
if (Key.isdown(40)) {
pacY = 1;
}
if (grid.hitTest(pac._x + pacX, pac._y + pacY, 1)) {
pac._x = pac._x + pacX;
pac._y = pac._y + pacY;
} else if (!PacDir) {
if (grid.hitTest(pac._x + pacX, pac._y, 1)) {
pac._x = pac._x + pacX;
pacY = 0;
pacDir = 1;
} else if (grid.hitTest(pac._x, pac._y + pacY, 1)) {
pac._y = pac._y + pacY;
pacX = 0;
pacDir = 0;
}
} else if (grid.hitTest(pac._x, pac._y + pacY, 1)) {
pac._y = pac._y + pacY;
pacX = 0;
pacDir = 0;
} else if (grid.hitTest(pac._x + pacX, pac._y, 1)) {
pac._x = pac._x + pacX;
pacY = 0;
pacDir = 1;
}
if (pills.hitTest(pac._x, pac._y, 0)) {
j = 0;
while (4 >= j) {
i = 0;
while (4 >= i) {
if (eval (("pills.pill" + i) + j).hitTest(pac._x, pac._y, 0)) {
eval (("pills.pill" + i) + j).gotoAndStop(2);
score++;
blip1.gotoAndPlay(2);
if (score == ((25 * levels) - 1)) {
j = 0;
while (4 >= j) {
i = 0;
while (4 >= i) {
eval (("pills.pill" + i) + j).gotoAndStop(1);
i++;
}
j++;
}
win.gotoAndPlay(2);
if (2 < ghostSpeed) {
ghostSpeed--;
}
levels++;
}
}
i++;
}
j++;
}
}
ghostFlag++;
if (ghostFlag >= ghostSpeed) {
ghostFlag = 0;
ghostX = 0;
ghostY = 0;
if (pac._x < ghost._x) {
ghostX = -1;
} else if (ghost._x < pac._x) {
ghostX = 1;
}
if (pac._y < ghost._y) {
ghostY = -1;
} else if (ghost._y < pac._y) {
ghostY = 1;
}
if (grid.hitTest(ghost._x + ghostX, ghost._y + ghostY, 1)) {
ghost._x = ghost._x + ghostX;
ghost._y = ghost._y + ghostY;
} else {
if (grid.hitTest(ghost._x + ghostX, ghost._y, 1)) {
ghost._x = ghost._x + ghostX;
}
if (grid.hitTest(ghost._x, ghost._y + ghostY, 1)) {
ghost._y = ghost._y + ghostY;
}
}
}
if (ghost.hitTest(pac._x, pac._y, 0)) {
lives++;
blip2.gotoAndPlay(2);
if (2 < lives) {
gotoAndPlay (8);
} else {
pac._x = 9;
pac._y = 17;
ghost._x = 9;
ghost._y = 1;
pacX = 0;
pacY = 0;
}
}
Frame 7 (17 B)
gotoAndPlay (6);
Frame 8 (17 B)
hiscore = score;
Frame 9 (164 B)
if ((Key.isdown(78) || (Key.isdown(110))) || (Key.isdown(27))) {
getURL ("pacman.html");
} else if (Key.isdown(89) || (Key.isdown(121))) {
gotoAndPlay (4);
}
Frame 10 (17 B)
gotoAndPlay (9);
Symbol 5 Button (47 B)
on (release) {
_parent.gotoAndPlay("start");
}
Symbol 10 MovieClip Frame 148 (8 B)
stop();
Symbol 16 MovieClip Frame 1 (8 B)
stop();
Symbol 25 MovieClip Frame 1 (8 B)
stop();
Symbol 27 MovieClip Frame 1 (8 B)
stop();
Symbol 29 MovieClip Frame 1 (8 B)
stop();
Symbol 31 MovieClip Frame 1 (8 B)
stop();
Symbol 35 Button (34 B)
on (release) {
gotoAndPlay (4);
}
Symbol 38 Button (41 B)
on (release) {
getURL ("pacman.html");
}