Frame 1
ifFrameLoaded (57) {
gotoAndStop (4);
}
Frame 3
gotoAndPlay (1);
Frame 4
score = 0;
stop();
Frame 51
Snake._visible = false;
score = 0;
tail = 1;
head = 3;
xv = 0;
yv = 1;
x = 160;
y = 100;
eaten = true;
extend = false;
makeMove = false;
Frame 52
x = x + (10 * xv);
y = y + (10 * yv);
head++;
duplicateMovieClip ("Snake", head, head);
setProperty(head, _x , x);
setProperty(head, _y , y);
if ((((eval ((("s_" + x) + "_") + y) || (x < 20)) || (300 < x)) || (y < 20)) || (290 < y)) {
gotoAndStop (57);
}
Set((("s_" + x) + "_") + y, true);
if (extend) {
extend = false;
score++;
} else {
Set((("s_" + eval (tail)._x) + "_") + eval (tail)._y, false);
removeMovieClip(tail);
tail++;
}
if ((Food._x == x) && (Food._y == y)) {
eaten = true;
extend = true;
}
if (eaten) {
Sound.gotoAndPlay(2);
eaten = false;
tellTarget ("Food") {
_x = (10 * (random(28) + 2));
_y = (10 * (random(27) + 2));
};
}
makeMove = false;
Frame 53
if (level == 3) {
gotoAndPlay (52);
}
Frame 54
if (level == 2) {
gotoAndPlay (52);
}
Frame 55
gotoAndPlay (52);
Frame 57
temp = head;
while (tail < (temp + 1)) {
setProperty(temp, _alpha , 33);
temp--;
}
Symbol 7 Button
on (release) {
getURL ("http://www.neave.com/webgames/", "_blank");
}
Symbol 13 Button
on (release) {
level = 1;
levName = "SLUG";
play();
}
Symbol 15 Button
on (release) {
level = 2;
levName = "WORM";
play();
}
Symbol 17 Button
on (release) {
level = 3;
levName = "PYTHON";
play();
}
Symbol 29 Button
on (keyPress "<Up>") {
if ((yv == 0) && (!makeMove)) {
yv = -1;
xv = 0;
makeMove = true;
}
}
on (keyPress "<Left>") {
if ((xv == 0) && (!makeMove)) {
yv = 0;
xv = -1;
makeMove = true;
}
}
on (keyPress "<Down>") {
if ((yv == 0) && (!makeMove)) {
yv = 1;
xv = 0;
makeMove = true;
}
}
on (keyPress "<Right>") {
if ((xv == 0) && (!makeMove)) {
yv = 0;
xv = 1;
makeMove = true;
}
}
on (keyPress "<Space>") {
temp = head;
while (tail < (temp + 1)) {
setProperty(temp, _alpha , 33);
temp--;
}
setProperty("Food", _alpha , 33);
gotoAndStop (56);
}
Symbol 30 MovieClip Frame 1
stop();
Symbol 31 Button
on (keyPress "<Space>") {
temp = head;
while (Number(tail) < Number(Number(temp) + 1)) {
setProperty(temp, _alpha , 100);
temp = temp - 1;
}
setProperty("/Food", _alpha , 100);
gotoAndPlay (53);
}
Symbol 33 Button
on (release, keyPress "<Space>") {
temp = head;
while (tail < (temp + 1)) {
Set((("s_" add getProperty(temp, _x)) add "_") add getProperty(temp, _y), false);
removeMovieClip(temp);
temp--;
}
play();
}