Instance of Symbol 33 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.gotoAndStop(2);
} else {
_root.stop();
percLoaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_root.percentLoadedText.text = percLoaded;
this.gotoAndStop(percLoaded);
}
}
Frame 2
function submitcomplete() {
submit.enabled = false;
}
function submitscore() {
score = gameScore;
var anticheat = new LoadVars();
anticheat.score = score;
anticheat.username = _root.UserId;
anticheat.action = "anticheat";
anticheat.onLoad = function () {
chkscore = anticheat.chkscore;
chkusername = anticheat.chkusername;
if ((score != anticheat.chkscore) || (_root.UserId != anticheat.chkusername)) {
status = "Cheating";
} else {
var subscore = new LoadVars();
subscore.score = score;
subscore.username = _root.UserId;
subscore.gameid = _root.GameId;
subscore.ScoreID = _root.retrieveGameInfo.ScoreID;
subscore.gamelevel = gameLevel;
if (_global.gameAward1New == true) {
subscore.award1 = 16;
}
if (_global.gameAward2New == true) {
subscore.award2 = 17;
}
if (_global.gameAward3New == true) {
subscore.award3 = 18;
}
if (_global.gameAward4New == true) {
subscore.award4 = 19;
}
if (_global.gameAward5New == true) {
subscore.award5 = 20;
}
subscore.goldIncome = goldEarned;
subscore.action = "sendscore";
subscore.onLoad = function () {
status = subscore.status;
};
subscore.sendAndLoad("hsfuncs.php?null=" + random(99999), subscore, "POST");
}
};
anticheat.sendAndLoad("hsfuncs.php?null=" + random(99999), anticheat, "POST");
}
Stage.showMenu = false;
GameId = 4;
infoSubmitWaitTime = 0;
gameClickedToPlay = false;
score = _global.score;
var retrieveGameInfo = new LoadVars();
Instance of Symbol 41 MovieClip in Frame 2
onClipEvent (load) {
_root.gameClickedToPlay = true;
_root.retrieveGameInfo.gameid = _root.GameId;
_root.retrieveGameInfo.sendAndLoad("hsfuncsBefore.php?null=" + random(99999), _root.retrieveGameInfo, "POST");
}
onClipEvent (enterFrame) {
if (_root.gameClickedToPlay == true) {
if (_root.retrieveGameInfo.scriptFinished == "true") {
_root.gameClickedToPlay = false;
_root.UserId = _root.retrieveGameInfo.UserId;
if (_root.retrieveGameInfo.award1 == 16) {
_global.gameAward1 = true;
} else {
_global.gameAward1 = false;
}
if (_root.retrieveGameInfo.award2 == 17) {
_global.gameAward2 = true;
} else {
_global.gameAward2 = false;
}
if (_root.retrieveGameInfo.award3 == 18) {
_global.gameAward3 = true;
} else {
_global.gameAward3 = false;
}
if (_root.retrieveGameInfo.award4 == 19) {
_global.gameAward4 = true;
} else {
_global.gameAward4 = false;
}
if (_root.retrieveGameInfo.award5 == 20) {
_global.gameAward5 = true;
} else {
_global.gameAward5 = false;
}
_root.retrieveGameInfo.scriptFinished = "false";
_root.infoSubmitWaitTime = 0;
_root.gotoAndStop(3);
} else {
_root.infoSubmitWaitTime = _root.infoSubmitWaitTime + 1;
}
if (_root.infoSubmitWaitTime == 1) {
this.gotoAndStop(1);
} else if ((_root.infoSubmitWaitTime >= 200) and (_root.infoSubmitWaitTime < 1200)) {
if (_root.infoSubmitWaitTime == 200) {
_root.retrieveGameInfo.sendAndLoad("hsfuncsBefore.php?null=" + random(99999), _root.retrieveGameInfo, "POST");
} else if (_root.infoSubmitWaitTime == 600) {
_root.retrieveGameInfo.sendAndLoad("hsfuncsBefore.php?null=" + random(99999), _root.retrieveGameInfo, "POST");
}
this.gotoAndStop(2);
} else if (_root.infoSubmitWaitTime >= 1200) {
this.gotoAndStop(3);
}
}
}
Frame 3
stop();
Frame 4
Key.removeListener(keyListener);
score = 0;
gameLevel = 1;
gameScore = 0;
scoreIncremented = 0;
goldEarned = 0;
scoreIncrement = 100;
pressedArrows = 0;
_global.gameAward1New = false;
_global.gameAward2New = false;
_global.gameAward3New = false;
_global.gameAward4New = false;
_global.gameAward5New = false;
s_mc._alpha = 100;
len = 2;
gx = 20;
gy = 20;
max = ((gx - 2) * (gy - 2)) - 3;
vx = 0;
vy = 1;
x = 11;
y = 4;
crossGraphic = true;
gameOver = (paused = (moved = false));
levelName = "LEVEL: " + ["PYTHON", "WORM", "SLUG"][level];
var i = 0;
while (i <= gx) {
s_mc.createEmptyMovieClip(i, i);
var j = 0;
while (j <= gy) {
s_mc[i].attachMovie("snake", j, j, {_x:i * 24, _y:j * 24, _visible:false, fuse:0});
j++;
}
i++;
}
makeFood = function () {
do {
fx = int(Math.random() * (gx - 1)) + 1;
fy = int(Math.random() * (gy - 1)) + 1;
} while (s_mc[fx][fy]._visible);
with (s_mc[fx][fy]) {
fuse = 0;
gotoAndStop(2);
_visible = true;
}
};
Instance of Symbol 85 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward1 == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 89 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward2 == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 93 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward3 == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 97 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward4 == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 101 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward5 == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 103 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward2New == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 103 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward3New == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 103 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward4New == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 103 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward5New == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 103 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_global.gameAward1New == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 43
stop();
makeFood();
lc = level;
this.onEnterFrame = function () {
if (paused) {
return(undefined);
}
if (lc) {
lc--;
return(undefined);
}
lc = level;
x = x + vx;
y = y + vy;
if ((x == fx) && (y == fy)) {
score = score + (s_mc[x][y].fuse + 1);
gameLevel = gameLevel + (s_mc[x][y].fuse + 1);
scoreIncremented = Math.round(Math.ceil(scoreIncrement * 100) * (gameLevel / 10));
gameScore = gameScore + scoreIncremented;
scoreIncrement = 100;
len++;
with (s_mc[x][y]) {
fuse = len;
gotoAndStop(1);
}
for (var i in s_mc) {
for (var j in s_mc[i]) {
if (s_mc[i][j]._visible) {
s_mc[i][j].fuse++;
}
}
}
makeFood();
if (_root.gameScore >= 1000000) {
if (_global.gameAward1 == false) {
_global.gameAward1 = true;
_global.gameAward1New = true;
}
}
if (_root.gameLevel >= 60) {
if (_global.gameAward2 == false) {
_global.gameAward2 = true;
_global.gameAward2New = true;
}
}
if (_root.gameScore >= 500000) {
if (_global.gameAward3 == false) {
_global.gameAward3 = true;
_global.gameAward3New = true;
}
}
if (_root.gameScore >= 500000) {
if (_global.gameAward3 == false) {
_global.gameAward3 = true;
_global.gameAward3New = true;
}
}
if (_root.gameLevel >= 30) {
if (_global.gameAward4 == false) {
_global.gameAward4 = true;
_global.gameAward4New = true;
}
}
if ((_root.pressedArrows <= 30) and (_root.gameLevel == 15)) {
if (_global.gameAward5 == false) {
_global.gameAward5 = true;
_global.gameAward5New = true;
}
}
if (_root.gameLevel == 25) {
_root.goldEarned = _root.goldEarned + 1;
}
if (_root.gameLevel == 50) {
_root.goldEarned = _root.goldEarned + 2;
}
if (_root.gameLevel == 75) {
_root.goldEarned = _root.goldEarned + 4;
}
if (_root.gameLevel == 100) {
_root.goldEarned = _root.goldEarned + 8;
}
if (_root.gameLevel == 125) {
_root.goldEarned = _root.goldEarned + 16;
}
if (_root.gameLevel == 150) {
_root.goldEarned = _root.goldEarned + 32;
}
} else if (((((s_mc[x][y]._visible || (x == 0)) || (x == gx)) || (y == 0)) || (y == gy)) || (len > max)) {
gameOver = true;
s_mc._alpha = 25;
Key.removeListener(keyListener);
nextFrame();
delete this.onEnterFrame;
}
with (s_mc[x][y]) {
fuse = len;
_visible = true;
}
moved = false;
updateAfterEvent();
};
keyListener = new Object();
keyListener.onKeyDown = function () {
if (gameOver) {
return(undefined);
}
var _local1 = Key.getCode();
switch (_local1) {
case 32 :
case 80 :
case 112 :
paused = !paused;
s_mc._alpha = (paused ? 25 : 100);
}
if ((!paused) && (!moved)) {
switch (_local1) {
case 38 :
if (vy == 0) {
vx = 0;
vy = -1;
moved = true;
}
break;
case 40 :
if (vy == 0) {
vx = 0;
vy = 1;
moved = true;
}
break;
case 37 :
if (vx == 0) {
vx = -1;
vy = 0;
moved = true;
}
break;
case 39 :
if (vx != 0) {
break;
}
vx = 1;
vy = 0;
moved = true;
}
}
};
Key.addListener(keyListener);
Instance of Symbol 117 MovieClip in Frame 43
onClipEvent (enterFrame) {
if (_parent.scoreIncrement > 0) {
_parent.scoreIncrement = _parent.scoreIncrement - (_parent.scoreIncrement / 50);
}
}
on (keyPress "<Left>") {
_parent.pressedArrows = _parent.pressedArrows + 1;
}
on (keyPress "<Right>") {
_parent.pressedArrows = _parent.pressedArrows + 1;
}
on (keyPress "<Up>") {
_parent.pressedArrows = _parent.pressedArrows + 1;
}
on (keyPress "<Down>") {
_parent.pressedArrows = _parent.pressedArrows + 1;
}
Frame 44
randomVerseNumber = random(14) + 1;
randomVerse = "loading";
switch (randomVerseNumber) {
case 1 :
randomVerse = "'And he said to them, Go you into all the world, and PREACH the gospel to every creature.' \n Mark 16:15";
break;
case 2 :
randomVerse = "'And as ye go, PREACH, saying, The kingdom of heaven is at hand.' \n Matthew 10:7";
break;
case 3 :
randomVerse = "'And this GOSPEL of the kingdom shall be preached in all the world for a witness unto all nations; and then shall the end come.' \n Matthew 24:14";
break;
case 4 :
randomVerse = "'But ye shall receive power, after that the Holy Spirit is come upon you: and you shall be witnesses to me both in Jerusalem, and in all Judaea, and in Samaria, and to the uttermost part of the earth.' \n Matthew 1:8";
break;
case 5 :
randomVerse = "'The fruit of the righteous is a tree of life; and he that winneth SOULS is wise.' \n Proverbs 11:";
break;
case 6 :
randomVerse = "'But to all who did receive him, who believed in his name, he gave the right to become children of God' \n John 1:12";
break;
case 7 :
randomVerse = "'For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life. For God did not send his Son into the world to condemn the world, but in order that the world might be saved through him.' \n John 3:16-17";
break;
case 8 :
randomVerse = "'Let it be known to you therefore, brothers, that through this man forgiveness of sins is proclaimed to you, and by him everyone who believes is freed from everything from which you could not be freed by the law of Moses.' \n Acts 13:39";
break;
case 9 :
randomVerse = "'For I am not ashamed of the gospel, for it is the power of God for salvation to everyone who believes, to the Jew first and also to the Gentiles.' \n Romans 1:16";
break;
case 10 :
randomVerse = "'Therefore, if anyone is in Christ, he is a new creation. The old has passed away; behold, the new has come.' \n 2 Corinthians 5:17";
break;
case 11 :
randomVerse = "'For by grace you have been saved through faith. And this is not your own doing; it is the gift of God, not a result of works, so that no one may boast.' \n Ephesians 2:8-9";
break;
case 12 :
randomVerse = "'For God has not destined us for wrath, but to obtain salvation through our Lord Jesus Christ, who died for us so that whether we are awake or asleep we might live with him.' \n 1 Thessalonians 5:9-10";
break;
case 13 :
randomVerse = "'Though you have not seen him, you love him. Though you do not now see him, you believe in him and rejoice with joy that is inexpressible and filled with glory, obtaining the outcome of your faith, the salvation of your souls.' \n 1 Peter 1:8-9";
break;
case 14 :
randomVerse = "''Jesus said to him, \u201CI am the way, and the truth, and the life. No one comes to the Father except through me.' \n 13:38";
}
randomVerseText.text = randomVerse;
submitscore();
Instance of Symbol 124 MovieClip in Frame 44
onClipEvent (enterFrame) {
_root.statusText.text = _root.status;
if (_root.status == "Information Submitted!") {
this.gotoAndStop(1);
_root.infoSubmitWaitTime = 0;
} else {
_root.infoSubmitWaitTime = _root.infoSubmitWaitTime + 1;
}
if (_root.infoSubmitWaitTime == 1) {
this.gotoAndStop(2);
} else if ((_root.infoSubmitWaitTime >= 200) and (_root.infoSubmitWaitTime < 1200)) {
if (_root.infoSubmitWaitTime == 200) {
_root.submitscore();
} else if (_root.infoSubmitWaitTime == 600) {
_root.submitscore();
}
this.gotoAndStop(3);
} else if (_root.infoSubmitWaitTime >= 1200) {
this.gotoAndStop(4);
}
}
Symbol 6 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 1
stop();
if (_root.gameScore >= 1000000) {
gotoAndStop (5);
} else if (_root.gameLevel >= 60) {
gotoAndStop (4);
} else if (_root.gameScore >= 500000) {
gotoAndStop (3);
} else if (_root.gameLevel >= 30) {
gotoAndStop (2);
}
Instance of Symbol 6 MovieClip in Symbol 29 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(2);
}
Instance of Symbol 6 MovieClip in Symbol 29 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(3);
}
Instance of Symbol 6 MovieClip in Symbol 29 MovieClip Frame 4
onClipEvent (load) {
this.gotoAndStop(4);
}
Instance of Symbol 6 MovieClip in Symbol 29 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(5);
}
Symbol 32 MovieClip [snake] Frame 1
stop();
this.onEnterFrame = function () {
if (_root.lc) {
return(undefined);
}
if ((!_root.gameOver) && (!_root.paused)) {
if (fuse) {
fuse--;
} else {
_visible = false;
}
}
};
Symbol 32 MovieClip [snake] Frame 2
this.onEnterFrame = function () {
if (((!_root.gameOver) && (!_root.paused)) && (fuse)) {
fuse--;
FoodBG._rotation = (Food._rotation = Food._rotation + (fuse / 4));
}
};
Symbol 51 Button
on (release) {
level = 1;
gotoAndPlay ("Game");
}
Symbol 55 Button
on (release) {
level = 0;
gotoAndPlay ("Game");
}
Symbol 59 Button
on (release) {
level = 2;
gotoAndPlay ("Game");
}
Symbol 85 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 2
stop();
Symbol 110 MovieClip Frame 1
function update() {
counted++;
fps = frameCount;
avg = Math.floor((((avg * (counted - 1)) + fps) / counted) * 100) / 100;
fpsText.text = "FPS: " + fps;
avgText.text = "AVG: " + avg;
frameCount = 0;
}
var frameCount = 0;
var fps = 0;
var avg = 0;
var counted = 0;
onEnterFrame = function () {
frameCount++;
};
setInterval(update, 1000);
Symbol 120 Button
on (press) {
_root.gotoAndPlay(1);
}
Symbol 124 MovieClip Frame 1
stop();