Frame 1
if (_framesloaded >= _totalframes) {
gotoAndPlay ("Game");
} else {
_root.loaderMe._xscale = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
gotoAndPlay (1);
}
Frame 6
if (_framesloaded >= _totalframes) {
gotoAndPlay ("Game");
} else {
gotoAndPlay (1);
}
Frame 7
level = 4;
flag = 0;
count = 0;
walls = true;
tWalls = "on";
wormtype.gotoAndStop(3);
tellTarget ("bgsound") {
gotoAndPlay (1);
};
stop();
Frame 8
score = -level;
tail = 1;
head = 8;
xv = 0;
yv = 1;
x = 160;
y = 100;
eaten = true;
eatenb = true;
extend = false;
makeMove = false;
bonus = 0;
abonus = 0;
Frame 9
x = x + (10 * xv);
y = y + (10 * yv);
if (!walls) {
if (x < 30) {
x = 290;
}
if (290 < x) {
x = 30;
}
if (y < 30) {
y = 280;
}
if (280 < y) {
y = 30;
}
}
head++;
duplicateMovieClip ("Snake", head, head);
setProperty(head, _x , x);
setProperty(head, _y , y);
if ((((eval ((("s_" + x) + "_") + y) || (x < 30)) || (290 < x)) || (y < 30)) || (280 < y)) {
gotoAndStop ("Game Over");
}
Set((("s_" + x) + "_") + y, true);
if (extend) {
extend = false;
} else {
Set((("s_" + eval (tail)._x) + "_") + eval (tail)._y, false);
removeMovieClip(tail);
tail++;
}
if ((Food._x == x) && (Food._y == y)) {
eaten = true;
abonus++;
extend = true;
if (yv == -1) {
tellTarget (head) {
gotoAndStop ("Up");
};
}
if (yv == 1) {
tellTarget (head) {
gotoAndStop ("Down");
};
}
if (xv == -1) {
tellTarget (head) {
gotoAndStop ("Left");
};
}
if (xv == 1) {
tellTarget (head) {
gotoAndStop ("Right");
};
}
head++;
duplicateMovieClip ("Snake", head, head);
setProperty(head, _x , x);
setProperty(head, _y , y);
if (yv == -1) {
tellTarget (head) {
gotoAndStop ("Up");
};
}
if (yv == 1) {
tellTarget (head) {
gotoAndStop ("Down");
};
}
if (xv == -1) {
tellTarget (head) {
gotoAndStop ("Left");
};
}
if (xv == 1) {
tellTarget (head) {
gotoAndStop ("Right");
};
}
head++;
duplicateMovieClip ("Snake", head, head);
setProperty(head, _x , x);
setProperty(head, _y , y);
if (yv == -1) {
tellTarget (head) {
gotoAndStop ("Up");
};
}
if (yv == 1) {
tellTarget (head) {
gotoAndStop ("Down");
};
}
if (xv == -1) {
tellTarget (head) {
gotoAndStop ("Left");
};
}
if (xv == 1) {
tellTarget (head) {
gotoAndStop ("Right");
};
}
head++;
duplicateMovieClip ("Snake", head, head);
setProperty(head, _x , x);
setProperty(head, _y , y);
added = 1;
}
if (((bFood._x == x) && (bFood._y == y)) && (bFood._visible == true)) {
eatenb = true;
extend = true;
duplicateMovieClip ("spark", "s_" + head, head + 10);
setProperty("s_" + head, _x , x);
setProperty("s_" + head, _y , y);
}
if (abonus == 5) {
bonus = level * 20;
bFood.gotoAndPlay(1);
bFood._visible = true;
abonus = 0;
}
if (eaten) {
eaten = false;
score = score + level;
if ((10 < score) && (score < 20)) {
tellTarget ("pics") {
gotoAndStop (2);
};
if (flag == 0) {
mySound = new Sound();
mysound.attachSound("sound1.mp3");
mySound.setVolume(15);
mySound.start();
flag = 1;
}
}
if ((20 < score) && (score < 30)) {
tellTarget ("pics") {
gotoAndStop (3);
};
if (flag == 1) {
mySound = new Sound();
mysound.attachSound("sound2.mp3");
mySound.setVolume(15);
mySound.start();
flag = 2;
}
}
if ((30 < score) && (score < 45)) {
tellTarget ("pics") {
gotoAndStop (4);
};
if (flag == 2) {
mySound = new Sound();
mysound.attachSound("sound3.mp3");
mySound.setVolume(15);
mySound.start();
flag = 3;
}
}
if (45 < score) {
tellTarget ("pics") {
gotoAndStop (5);
};
if (flag == 3) {
mySound = new Sound();
mysound.attachSound("sound5.mp3");
mySound.setVolume(15);
mySound.start();
flag = 4;
}
}
if (50 < score) {
level = 5;
}
tellTarget ("Food") {
_x = (10 * (random(26) + 3));
_y = (10 * (random(25) + 3));
};
while (eval ((("s_" + food._x) + "_") + food._y)) {
tellTarget ("Food") {
_x = (10 * (random(26) + 3));
_y = (10 * (random(25) + 3));
};
}
}
if (eatenb) {
eatenb = false;
score = score + 5;
bonus = 0;
tellTarget ("bFood") {
_visible = false;
_x = (10 * (random(26) + 3));
_y = (10 * (random(25) + 3));
};
}
makeMove = false;
if (0 < bonus) {
bonus = bonus - (level / 5);
bonus = int(bonus);
} else {
bonus = "";
tellTarget ("bFood") {
_visible = false;
_x = (10 * (random(26) + 3));
_y = (10 * (random(25) + 3));
};
}
if (yv == -1) {
tellTarget (head) {
gotoAndStop ("HeadUp");
};
}
if (yv == 1) {
tellTarget (head) {
gotoAndStop ("HeadDown");
};
}
if (xv == -1) {
tellTarget (head) {
gotoAndStop ("HeadLeft");
};
}
if (xv == 1) {
tellTarget (head) {
gotoAndStop ("HeadRight");
};
}
if (dir == 1) {
tellTarget (head - 1) {
gotoAndStop ("TopLeft");
};
}
if (dir == 2) {
tellTarget (head - 1) {
gotoAndStop ("Left");
};
}
if (dir == 3) {
tellTarget (head - 1) {
gotoAndStop ("TopRight");
};
}
if (dir == 4) {
tellTarget (head - 1) {
gotoAndStop ("Up");
};
}
if (dir == 5) {
tellTarget (head - 1) {
gotoAndStop ("BottomRight");
};
}
if (dir == 6) {
tellTarget (head - 1) {
gotoAndStop ("Right");
};
}
if (dir == 7) {
tellTarget (head - 1) {
gotoAndStop ("BottomLeft");
};
}
if (dir == 8) {
tellTarget (head - 1) {
gotoAndStop ("Down");
};
}
if (2 < (head - tail)) {
if (getProperty(tail + 1, _currentframe) == 11) {
wTail = 1;
}
if (getProperty(tail + 1, _currentframe) == 12) {
wTail = 2;
}
if (getProperty(tail + 1, _currentframe) == 6) {
wTail = 3;
}
if (getProperty(tail + 1, _currentframe) == 7) {
wTail = 4;
}
if (getProperty(tail + 1, _currentframe) == 5) {
if (getProperty(tail + 2, _currentframe) == 12) {
wTail = 3;
}
if (getProperty(tail + 2, _currentframe) == 7) {
wTail = 1;
}
}
if (getProperty(tail + 1, _currentframe) == 8) {
if (getProperty(tail + 2, _currentframe) == 12) {
wTail = 4;
}
if (getProperty(tail + 2, _currentframe) == 6) {
wTail = 1;
}
}
if (getProperty(tail + 1, _currentframe) == 9) {
if (getProperty(tail + 2, _currentframe) == 11) {
wTail = 4;
}
if (getProperty(tail + 2, _currentframe) == 6) {
wTail = 2;
}
}
if (getProperty(tail + 1, _currentframe) == 10) {
if (getProperty(tail + 2, _currentframe) == 11) {
wTail = 3;
}
if (getProperty(tail + 2, _currentframe) == 7) {
wTail = 2;
}
}
if (wTail == 1) {
tellTarget (tail) {
gotoAndStop ("TailUp");
};
}
if (wTail == 2) {
tellTarget (tail) {
gotoAndStop ("TailDown");
};
}
if (wTail == 3) {
tellTarget (tail) {
gotoAndStop ("TailLeft");
};
}
if (wTail == 4) {
tellTarget (tail) {
gotoAndStop ("TailRight");
};
}
}
if (xv == 1) {
dir = 6;
}
if (xv == -1) {
dir = 2;
}
if (yv == 1) {
dir = 8;
}
if (yv == -1) {
dir = 4;
}
Frame 10
if (level == 5) {
gotoAndPlay ("GameAction");
}
Frame 11
if (level == 4) {
gotoAndPlay ("GameAction");
}
Frame 12
if (level == 3) {
gotoAndPlay ("GameAction");
}
Frame 13
if (level == 2) {
gotoAndPlay ("GameAction");
}
Frame 14
gotoAndPlay ("GameAction");
Frame 16
if ((50 < score) || (1 < count)) {
gotoAndStop (17);
}
count++;
temp = head;
flag = 0;
tellTarget ("pics") {
gotoAndStop (1);
};
level = 4;
while (tail < (temp + 1)) {
setProperty(temp, _alpha , 0);
temp--;
}
Frame 17
temp = head;
while (tail < (temp + 1)) {
setProperty(temp, _alpha , 0);
temp--;
}
mySound.stop();
mySound = new Sound();
mysound.attachSound("ascream1.wav");
mySound.setVolume(300);
mySound.start();
mySound = new Sound();
mysound.attachSound("ascream7.wav");
mySound.setVolume(300);
mySound.start();
Symbol 18 MovieClip [pics] Frame 1
stop();
Symbol 18 MovieClip [pics] Frame 2
stop();
Symbol 18 MovieClip [pics] Frame 3
stop();
Symbol 18 MovieClip [pics] Frame 4
stop();
Symbol 18 MovieClip [pics] Frame 5
stop();
Symbol 32 MovieClip Frame 461
gotoAndPlay (1);
Symbol 64 Button
on (release) {
_root.gotoAndPlay("Init");
}
Symbol 67 Button
on (keyPress "<Up>") {
if ((yv == 0) && (!makeMove)) {
if (xv == -1) {
dir = 7;
}
if (xv == 1) {
dir = 5;
}
yv = -1;
xv = 0;
makeMove = true;
}
}
on (keyPress "<Left>") {
if ((xv == 0) && (!makeMove)) {
if (yv == -1) {
dir = 3;
}
if (yv == 1) {
dir = 5;
}
yv = 0;
xv = -1;
makeMove = true;
}
}
on (keyPress "<Down>") {
if ((yv == 0) && (!makeMove)) {
if (xv == -1) {
dir = 1;
}
if (xv == 1) {
dir = 3;
}
yv = 1;
xv = 0;
makeMove = true;
}
}
on (keyPress "<Right>") {
if ((xv == 0) && (!makeMove)) {
if (yv == -1) {
dir = 1;
}
if (yv == 1) {
dir = 7;
}
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 ("Paused");
}
Symbol 68 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 ("GameAction");
}
Symbol 76 Button
on (release) {
temp = head;
while (tail < (temp + 1)) {
Set((("s_" add getProperty(temp, _x)) add "_") add getProperty(temp, _y), false);
removeMovieClip(temp);
temp--;
}
_root.gotoAndPlay("Init");
}
Symbol 79 Button
on (release) {
temp = head;
while (tail < (temp + 1)) {
Set((("s_" add getProperty(temp, _x)) add "_") add getProperty(temp, _y), false);
removeMovieClip(temp);
temp--;
}
_root.gotoAndPlay("menu");
}
Symbol 99 Button
on (release) {
getURL ("http://www.extremefunnypictures.com/", "_blank");
}
Symbol 101 Button
on (press) {
getURL ("http://www.extremefunnypictures.com/o/sendmrsclaus.htm", "_blank");
}
Symbol 102 MovieClip Frame 69
stop();