Frame 1
ifFrameLoaded (5) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 4
gotoAndPlay (3);
Frame 6
level = "1";
lives = "3";
score = "0";
newlife = "0";
timer = "0";
points = "0";
r0 = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX";
r1 = "X............XX............X";
r2 = "X.XXXX.XXXXX.XX.XXXXX.XXXX.X";
r3 = "XoXXXX.XXXXX.XX.XXXXX.XXXXoX";
r4 = "X.XXXX.XXXXX.XX.XXXXX.XXXX.X";
r5 = "X..........................X";
r6 = "X.XXXX.XX.XXXXXXXX.XX.XXXX.X";
r7 = "X.XXXX.XX.XXXXXXXX.XX.XXXX.X";
r8 = "X......XX....XX....XX......X";
r9 = "XXXXXX.XXXXX-XX-XXXXX.XXXXXX";
r10 = "-----X.XXXXX-XX-XXXXX.X-----";
r11 = "-----X.XX----------XX.X-----";
r12 = "-----X.XX-XXX**XXX-XX.X-----";
r13 = "XXXXXX.XX-XXX--XXX-XX.XXXXXX";
r14 = "T-----.---XXX--XXX---.-----R";
r15 = "XXXXXX.XX-XXX--XXX-XX.XXXXXX";
r16 = "-----X.XX-XXXXXXXX-XX.X-----";
r17 = "-----X.XX----------XX.X-----";
r18 = "-----X.XX-XXXXXXXX-XX.X-----";
r19 = "XXXXXX.XX-XXXXXXXX-XX.XXXXXX";
r20 = "X............XX............X";
r21 = "X.XXXX.XXXXX.XX.XXXXX.XXXX.X";
r22 = "X.XXXX.XXXXX.XX.XXXXX.XXXX.X";
r23 = "Xo..XX.......--.......XX..oX";
r24 = "XXX.XX.XX.XXXXXXXX.XX.XX.XXX";
r25 = "XXX.XX.XX.XXXXXXXX.XX.XX.XXX";
r26 = "X......XX....XX....XX......X";
r27 = "X.XXXXXXXXXX.XX.XXXXXXXXXX.X";
r28 = "X.XXXXXXXXXX.XX.XXXXXXXXXX.X";
r29 = "X..........................X";
r30 = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX";
Frame 7
Set("rangée", "0");
points = "0";
while (rangée < "32") {
col = "0";
objet = eval ("r" add rangée);
while (col < "27") {
bit = substring(objet, col + "1", "1");
if (bit eq ".") {
points = points + "1";
duplicateMovieClip ("/p", (("p_" add col) add "_") add rangée, points);
setProperty((("p_" add col) add "_") add rangée, _x , (col * "16") + "16");
setProperty((("p_" add col) add "_") add rangée, _y , (rangée * "16") + "16");
}
if (bit eq "o") {
points = points + "1";
duplicateMovieClip ("/pil", (("p_" add col) add "_") add rangée, points);
setProperty((("p_" add col) add "_") add rangée, _x , (col * "16") + "16");
setProperty((("p_" add col) add "_") add rangée, _y , (rangée * "16") + "16");
}
col = col + "1";
}
Set("rangée", rangée + "1");
}
px = "54";
py = "92";
vx = "-1";
vy = "0";
svx = "-1";
duplicateMovieClip ("/shpac", "pacman", points + "1");
f1x = "56";
f1y = "56";
f1vx = "1";
Set("mangé1", "0");
duplicateMovieClip ("/fant1", "f1", points + "2");
f2x = "56";
f2y = "60";
f2vy = "-1";
Set("mangé2", "0");
duplicateMovieClip ("/fant2", "f2", points + "3");
f3x = "56";
f3y = "56";
f3vy = "1";
Set("mangé3", "0");
duplicateMovieClip ("/fant3", "f3", points + "4");
f4x = "56";
f4y = "60";
f4vx = "1";
Set("mangé4", "0");
duplicateMovieClip ("/fant4", "f4", points + "5");
status = "0";
bonus = "0";
setProperty("/bonus", _visible , "0");
gameover = "0";
timer = "0";
timerbonus = "0";
Frame 8
iter = "-1";
while (iter < status) {
px4 = int(px / "4");
py4 = int(py / "4");
objet = substring(eval ("r" add py4), px4 + "1", "1");
if ((objet eq ".") or (objet eq "o")) {
points = points - "1";
score = score + "10";
removeMovieClip((("p_" add px4) add "_") add py4);
Set("r" add py4, ((substring(eval ("r" add py4), "1", px4)) add "-") add (substring(eval ("r" add py4), px4 + "2", "29" - px4)));
}
if (objet eq "o") {
timer = "138" - (level * "3");
score = score + "50";
status = "1";
}
if (objet eq "R") {
px = "4";
}
if (objet eq "T") {
px = "104";
}
restox = px - (px4 * "4");
restoy = py - (py4 * "4");
if (restox == "0") {
call("rotation");
vx = svx;
}
if (restoy == "0") {
vy = svy;
}
setProperty("/pacman", _x , (px * "4") + "8");
setProperty("/pacman", _y , (py * "4") + "8");
if (vx == "1") {
pros = "3";
} else {
pros = "0";
}
if (vy == "1") {
prosy = "3";
} else {
prosy = "0";
}
tpx = (px + vx) + pros;
tpy = (py + vy) + prosy;
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if (objet ne "X") {
px = px + vx;
py = py + vy;
}
iter = iter + "1";
}
fanta = "1";
call("fanta1");
fanta = "2";
call("fanta2");
fanta = "3";
call("fanta3");
fanta = "4";
call("fanta4");
if ((points == "122") and (bonus == "0")) {
setProperty("/bonus", _visible , "1");
bonus = "1";
timerbonus = "100";
}
if (((px == "54") and (py == "68")) and (bonus == "1")) {
bonus = "2";
setProperty("/bonus", _visible , "0");
score = (score + "900") + ("200" * level);
}
Frame 9
if (("9999" < score) and (newlife == "0")) {
newlife = "1";
lives = lives + "1";
}
if (status == "1") {
timer = timer - "1";
if ("0" >= timer) {
status = "0";
}
}
if (bonus == "1") {
timerbonus = timerbonus - "1";
if (timerbonus == "0") {
bonus = "2";
setProperty("/bonus", _visible , "0");
}
}
if (points == "0") {
gotoAndPlay (20);
}
if (gameover == "1") {
gotoAndPlay (29);
}
if ((gameover == "0") and ("0" < points)) {
gotoAndPlay (8);
}
Frame 11
Set("rangée", "0");
points = "0";
while (rangée < "32") {
col = "0";
while (col < "27") {
removeMovieClip((("p_" add col) add "_") add rangée);
col = col + "1";
}
Set("rangée", rangée + "1");
}
removeMovieClip("pacman");
removeMovieClip("f1");
removeMovieClip("f2");
removeMovieClip("f3");
removeMovieClip("f4");
setProperty("/bonus", _visible , "0");
Frame 12
if (mangé4 == "0") {
px4 = int(f4x / "4");
py4 = int(f4y / "4");
restox = f4x - (px4 * "4");
restoy = f4y - (py4 * "4");
if ((restox == "0") and (restoy == "0")) {
x = f4x;
y = f4y;
call("evaluate");
xv = f4vx;
yv = f4vy;
call("control");
if (ok == "1") {
f4vx = xvs;
f4vy = yvs;
call("rotationfan");
}
}
setProperty("/f4", _x , (f4x * "4") + "8");
setProperty("/f4", _y , (f4y * "4") + "8");
if (f4vx == "1") {
pros = "3";
} else {
pros = "0";
}
if (f4vy == "1") {
prosy = "3";
} else {
prosy = "0";
}
tpx = (f4x + f4vx) + pros;
tpy = (f4y + f4vy) + prosy;
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if (((objet ne "X") and (objet ne "T")) and (objet ne "R")) {
f4x = f4x + f4vx;
f4y = f4y + f4vy;
} else {
x = f4x;
y = f4y;
call("evaluate");
f4vx = xvs;
f4vy = yvs;
call("rotationfan");
}
if ((((px - f4x) * (px - f4x)) < "10") and (((py - f4y) * (py - f4y)) < "10")) {
if (status == "1") {
score = score + "100";
Set("mangé4", "1");
tellTarget ("/f4") {
gotoAndStop (9);
};
} else {
gameover = "1";
}
}
} else {
if (f4y < "56") {
f4y = f4y + "1";
}
if ("56" < f4y) {
f4y = f4y - "1";
}
if ("56" < f4x) {
f4x = f4x - "1";
}
if (f4x < "56") {
f4x = f4x + "1";
}
setProperty("/f4", _x , (f4x * "4") + "8");
setProperty("/f4", _y , (f4y * "4") + "8");
if ((f4y == "56") and (f4x == "56")) {
Set("mangé4", "0");
}
}
Frame 13
if (mangé3 == "0") {
px4 = int(f3x / "4");
py4 = int(f3y / "4");
restox = f3x - (px4 * "4");
restoy = f3y - (py4 * "4");
if ((restox == "0") and (restoy == "0")) {
x = f3x;
y = f3y;
call("evaluate");
xv = f3vx;
yv = f3vy;
call("control");
if (ok == "1") {
f3vx = xvs;
f3vy = yvs;
call("rotationfan");
}
}
setProperty("/f3", _x , (f3x * "4") + "8");
setProperty("/f3", _y , (f3y * "4") + "8");
if (f3vx == "1") {
pros = "3";
} else {
pros = "0";
}
if (f3vy == "1") {
prosy = "3";
} else {
prosy = "0";
}
tpx = (f3x + f3vx) + pros;
tpy = (f3y + f3vy) + prosy;
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if (((objet ne "X") and (objet ne "T")) and (objet ne "R")) {
f3x = f3x + f3vx;
f3y = f3y + f3vy;
} else {
x = f3x;
y = f3y;
call("evaluate");
f3vx = xvs;
f3vy = yvs;
call("rotationfan");
}
if ((((px - f3x) * (px - f3x)) < "10") and (((py - f3y) * (py - f3y)) < "10")) {
if (status == "1") {
score = score + "100";
Set("mangé3", "1");
tellTarget ("/f3") {
gotoAndStop (9);
};
} else {
gameover = "1";
}
}
} else {
if (f3y < "56") {
f3y = f3y + "1";
}
if ("56" < f3y) {
f3y = f3y - "1";
}
if ("56" < f3x) {
f3x = f3x - "1";
}
if (f3x < "56") {
f3x = f3x + "1";
}
setProperty("/f3", _x , (f3x * "4") + "8");
setProperty("/f3", _y , (f3y * "4") + "8");
if ((f3y == "56") and (f3x == "56")) {
Set("mangé3", "0");
}
}
Frame 14
if (mangé2 == "0") {
px4 = int(f2x / "4");
py4 = int(f2y / "4");
restox = f2x - (px4 * "4");
restoy = f2y - (py4 * "4");
if ((restox == "0") and (restoy == "0")) {
x = f2x;
y = f2y;
call("evaluate");
xv = f2vx;
yv = f2vy;
call("control");
if (ok == "1") {
f2vx = xvs;
f2vy = yvs;
call("rotationfan");
}
}
setProperty("/f2", _x , (f2x * "4") + "8");
setProperty("/f2", _y , (f2y * "4") + "8");
if (f2vx == "1") {
pros = "3";
} else {
pros = "0";
}
if (f2vy == "1") {
prosy = "3";
} else {
prosy = "0";
}
tpx = (f2x + f2vx) + pros;
tpy = (f2y + f2vy) + prosy;
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if (((objet ne "X") and (objet ne "T")) and (objet ne "R")) {
f2x = f2x + f2vx;
f2y = f2y + f2vy;
} else {
x = f2x;
y = f2y;
call("evaluate");
f2vx = xvs;
f2vy = yvs;
call("rotationfan");
}
if ((((px - f2x) * (px - f2x)) < "10") and (((py - f2y) * (py - f2y)) < "10")) {
if (status == "1") {
score = score + "100";
Set("mangé2", "1");
tellTarget ("/f2") {
gotoAndStop (9);
};
} else {
gameover = "1";
}
}
} else {
if (f2y < "56") {
f2y = f2y + "1";
}
if ("56" < f2y) {
f2y = f2y - "1";
}
if ("56" < f2x) {
f2x = f2x - "1";
}
if (f2x < "56") {
f2x = f2x + "1";
}
setProperty("/f2", _x , (f2x * "4") + "8");
setProperty("/f2", _y , (f2y * "4") + "8");
if ((f2y == "56") and (f2x == "56")) {
Set("mangé2", "0");
}
}
Frame 15
if ((vx == "1") and (vy == "0")) {
tellTarget ("pacman") {
gotoAndStop (1);
};
}
if ((vx == "-1") and (vy == "0")) {
tellTarget ("pacman") {
gotoAndStop (2);
};
}
if ((vx == "0") and (vy == "-1")) {
tellTarget ("pacman") {
gotoAndStop (4);
};
}
if ((vx == "0") and (vy == "1")) {
tellTarget ("pacman") {
gotoAndStop (3);
};
}
Frame 16
if (mangé1 == "0") {
px4 = int(f1x / "4");
py4 = int(f1y / "4");
restox = f1x - (px4 * "4");
restoy = f1y - (py4 * "4");
if ((restox == "0") and (restoy == "0")) {
x = f1x;
y = f1y;
call("evaluate");
xv = f1vx;
yv = f1vy;
call("control");
if (ok == "1") {
f1vx = xvs;
f1vy = yvs;
call("rotationfan");
}
}
setProperty("/f1", _x , (f1x * "4") + "8");
setProperty("/f1", _y , (f1y * "4") + "8");
if (f1vx == "1") {
pros = "3";
} else {
pros = "0";
}
if (f1vy == "1") {
prosy = "3";
} else {
prosy = "0";
}
tpx = (f1x + f1vx) + pros;
tpy = (f1y + f1vy) + prosy;
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if (((objet ne "X") and (objet ne "T")) and (objet ne "R")) {
f1x = f1x + f1vx;
f1y = f1y + f1vy;
} else {
x = f1x;
y = f1y;
call("evaluate");
f1vx = xvs;
f1vy = yvs;
call("rotationfan");
}
if ((((px - f1x) * (px - f1x)) < "9") and (((py - f1y) * (py - f1y)) < "9")) {
if (status == "1") {
score = score + "100";
Set("mangé1", "1");
tellTarget ("/f1") {
gotoAndStop (9);
};
} else {
gameover = "1";
}
}
} else {
if (f1y < "56") {
f1y = f1y + "1";
}
if ("56" < f1y) {
f1y = f1y - "1";
}
if ("56" < f1x) {
f1x = f1x - "1";
}
if (f1x < "56") {
f1x = f1x + "1";
}
setProperty("/f1", _x , (f1x * "4") + "8");
setProperty("/f1", _y , (f1y * "4") + "8");
if ((f1y == "56") and (f1x == "56")) {
Set("mangé1", "0");
}
}
Frame 17
Set("possibilités", "0");
tpy = y - "1";
tpx = x;
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if (objet ne "X") {
Set("xv" add possibilités, "0");
Set("yv" add possibilités, "-1");
Set("possibilités", possibilités + "1");
}
tpy = y + "4";
tpx = x;
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if ((objet ne "X") and (objet ne "*")) {
Set("xv" add possibilités, "0");
Set("yv" add possibilités, "1");
Set("possibilités", possibilités + "1");
}
tpy = y;
tpx = x - "1";
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if (((objet ne "X") and (objet ne "T")) and (objet ne "R")) {
Set("xv" add possibilités, "-1");
Set("yv" add possibilités, "0");
Set("possibilités", possibilités + "1");
}
tpy = y;
tpx = x + "4";
objet = substring(eval ("r" add int(tpy / "4")), int(tpx / "4") + "1", "1");
if (((objet ne "X") and (objet ne "T")) and (objet ne "R")) {
Set("xv" add possibilités, "1");
Set("yv" add possibilités, "0");
Set("possibilités", possibilités + "1");
}
choix = random(possibilités);
if (status == "0") {
if ("3" < random("10")) {
bon = random(possibilités);
n = "0";
while (n < possibilités) {
if (((((eval ("xv" add bon) == "1") and (x < px)) or ((eval ("xv" add bon) == "-1") and (px < x))) or ((eval ("yv" add bon) == "1") and (y < py))) or ((eval ("yv" add bon) == "-1") and (py < y))) {
choix = bon;
}
bon = bon + "1";
if (bon == possibilités) {
bon = "0";
}
n = n + "1";
}
}
}
if (status == "1") {
bon = random(possibilités);
n = "0";
while (n < possibilités) {
if (((((eval ("xv" add bon) == "1") and (px < x)) or ((eval ("xv" add bon) == "-1") and (x < px))) or ((eval ("yv" add bon) == "1") and (py < y))) or ((eval ("yv" add bon) == "-1") and (y < py))) {
choix = bon;
}
bon = bon + "1";
if (bon == possibilités) {
bon = "0";
}
n = n + "1";
}
}
xvs = eval ("xv" add choix);
yvs = eval ("yv" add choix);
Frame 18
ok = "1";
if ((((xv == (-xvs)) or (yv == (-yvs))) and ("5" < random("100"))) and (status == "0")) {
ok = "0";
}
Frame 19
if (("1" < timer) and (timer < "45")) {
tellTarget ("/f" add fanta) {
gotoAndStop (10);
};
} else {
xv = eval (("f" add fanta) add "vx");
yv = eval (("f" add fanta) add "vy");
if ((xv == "1") and (yv == "0")) {
tellTarget ("/f" add fanta) {
gotoAndStop("2" + ("4" * /:status));
};
}
if ((xv == "-1") and (yv == "0")) {
tellTarget ("/f" add fanta) {
gotoAndStop("1" + ("4" * /:status));
};
}
if ((xv == "0") and (yv == "1")) {
tellTarget ("/f" add fanta) {
gotoAndStop("3" + ("4" * /:status));
};
}
if ((xv == "0") and (yv == "-1")) {
tellTarget ("/f" add fanta) {
gotoAndStop("4" + ("4" * /:status));
};
}
}
Frame 28
call("clear");
level = level + "1";
r0 = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX";
r1 = "X............XX............X";
r2 = "X.XXXX.XXXXX.XX.XXXXX.XXXX.X";
r3 = "XoXXXX.XXXXX.XX.XXXXX.XXXXoX";
r4 = "X.XXXX.XXXXX.XX.XXXXX.XXXX.X";
r5 = "X..........................X";
r6 = "X.XXXX.XX.XXXXXXXX.XX.XXXX.X";
r7 = "X.XXXX.XX.XXXXXXXX.XX.XXXX.X";
r8 = "X......XX....XX....XX......X";
r9 = "XXXXXX.XXXXX-XX-XXXXX.XXXXXX";
r10 = "-----X.XXXXX-XX-XXXXX.X-----";
r11 = "-----X.XX----------XX.X-----";
r12 = "-----X.XX-XXX**XXX-XX.X-----";
r13 = "XXXXXX.XX-XXX--XXX-XX.XXXXXX";
r14 = "T-----.---XXX--XXX---.-----R";
r15 = "XXXXXX.XX-XXX--XXX-XX.XXXXXX";
r16 = "-----X.XX-XXXXXXXX-XX.X-----";
r17 = "-----X.XX----------XX.X-----";
r18 = "-----X.XX-XXXXXXXX-XX.X-----";
r19 = "XXXXXX.XX-XXXXXXXX-XX.XXXXXX";
r20 = "X............XX............X";
r21 = "X.XXXX.XXXXX.XX.XXXXX.XXXX.X";
r22 = "X.XXXX.XXXXX.XX.XXXXX.XXXX.X";
r23 = "Xo..XX.......--.......XX..oX";
r24 = "XXX.XX.XX.XXXXXXXX.XX.XX.XXX";
r25 = "XXX.XX.XX.XXXXXXXX.XX.XX.XXX";
r26 = "X......XX....XX....XX......X";
r27 = "X.XXXXXXXXXX.XX.XXXXXXXXXX.X";
r28 = "X.XXXXXXXXXX.XX.XXXXXXXXXX.X";
r29 = "X..........................X";
r30 = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX";
gotoAndPlay (7);
Frame 37
call("clear");
lives = lives - "1";
if ("-1" < lives) {
gotoAndPlay (7);
}
Frame 38
lives = "0";
stop();
Symbol 13 Button
on (release) {
gotoAndPlay (6);
}
Symbol 18 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 1
stop();
Symbol 89 Button
on (keyPress "<Up>") {
svy = "-1";
svx = "0";
}
on (keyPress "<Down>") {
svy = "1";
svx = "0";
}
on (keyPress "<Right>") {
svy = "0";
svx = "1";
}
on (keyPress "<Left>") {
svy = "0";
svx = "-1";
}
on (keyPress "<Space>") {
svy = "0";
svx = "0";
}
Symbol 99 MovieClip Frame 1
stop();
Symbol 100 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 1
stop();
Symbol 105 Button
on (release) {
gotoAndPlay (6);
}