Frame 1
MochiAd.showPreGameAd({id:"4a17d35b20151b38", res:"650x450"});
mochi.MochiServices.connect("4a17d35b20151b38");
stop();
myMenu_cm = new ContextMenu();
myMenu_cm.hideBuiltInItems();
_root.menu = myMenu_cm;
Frame 3
_root.createEmptyMovieClip("menuloopmov", 195);
menulop = new Sound(menuloopmov);
menulop.attachSound("menuloop");
_root.createEmptyMovieClip("gameloopmov", 196);
gamelop = new Sound(gameloopmov);
gamelop.attachSound("gameloop");
gamelop.setVolume(50);
_root.createEmptyMovieClip("gamebingmov", 197);
gamebing = new Sound(gamebingmov);
gamebing.attachSound("bing");
_root.createEmptyMovieClip("gamebongmov", 198);
gamebong = new Sound(gamebongmov);
gamebong.attachSound("bong");
_root.createEmptyMovieClip("gamestringmov", 199);
gamestring = new Sound(gamestringmov);
gamestring.attachSound("string");
gamestring.setVolume(250);
_root.createEmptyMovieClip("gameticmov", 192);
gametic = new Sound(gameticmov);
gametic.attachSound("tic");
gametic.setVolume(70);
_root.createEmptyMovieClip("gameloop2mov", 194);
gamelop2 = new Sound(gameloop2mov);
gamelop2.attachSound("gameloop2");
gamelop2.setVolume(70);
_root.createEmptyMovieClip("gameloop3mov", 193);
gamelop3 = new Sound(gameloop3mov);
gamelop3.attachSound("gameloop3");
gamelop3.setVolume(50);
_root.createEmptyMovieClip("gameextramov", 191);
gameextra = new Sound(gameextramov);
gameextra.attachSound("stra");
gameextra.setVolume(110);
stopAllSounds();
Frame 5
function myClosefunction() {
goready = true;
_root.gotoAndStop(5);
}
function myDisplayFunction() {
goready = false;
}
stop();
sharedObj = SharedObject.getLocal("ouroboroskookie");
_root.attachMovie("cursorID", "cursor", 700000000);
cursor._x = _xmouse;
cursor._y = _ymouse;
Mouse.hide();
initial = false;
initchecked = false;
levelnom = 1;
points = 0;
timechange = 0.03333;
scoremov.swapDepths(1020);
manu = true;
menustart = false;
wind = false;
custchck = false;
customchoices = false;
controltxt._visible = false;
menumov.enterbtn._visible = false;
menumov.namein._visible = false;
menumov.nameborder._visible = false;
menumov.instmov._visible = false;
menumov.perstxt._visible = false;
menumov.combo._visible = false;
goready = true;
corncov._visible = false;
custom = false;
totalscore = 0;
losed = false;
paws = false;
keys = true;
mouse = false;
totalwin = false;
lvlnarm = 0;
qual = 3;
control = 1;
contmax = 2;
backdown = false;
gamelopplay = false;
gamelop2play = false;
justmenu = false;
btncheck = false;
cbtncheck = false;
qbtncheck = false;
sbtncheck = false;
mbtncheck = false;
barout._visible = false;
topbars._visible = false;
scobo._visible = false;
menutxt._visible = false;
lvltitle._visible = false;
instxt._visible = false;
lengthgoal._visible = false;
infchance._visible = false;
infspeed._visible = false;
timething._visible = false;
mines._visible = false;
targets._visible = false;
uptxt._visible = false;
downtxt._visible = false;
entertxt._visible = false;
lvlinfo = false;
level1 = false;
invulnerable = false;
if (sharedObj.data.checked == true) {
playername = sharedObj.data.playername;
levelnum = sharedObj.data.levelnum;
lvl1high = sharedObj.data.lvl1high;
lvl1max = sharedObj.data.lvl1max;
lvl2high = sharedObj.data.lvl2high;
lvl2max = sharedObj.data.lvl2max;
lvl3high = sharedObj.data.lvl3high;
lvl3max = sharedObj.data.lvl3max;
lvl4high = sharedObj.data.lvl4high;
lvl4max = sharedObj.data.lvl4max;
lvl5high = sharedObj.data.lvl5high;
lvl5max = sharedObj.data.lvl5max;
lvl6high = sharedObj.data.lvl6high;
lvl6max = sharedObj.data.lvl6max;
lvl7high = sharedObj.data.lvl7high;
lvl7max = sharedObj.data.lvl7max;
lvl8high = sharedObj.data.lvl8high;
lvl8max = sharedObj.data.lvl8max;
lvl9high = sharedObj.data.lvl9high;
lvl9max = sharedObj.data.lvl9max;
lvl10high = sharedObj.data.lvl10high;
lvl10max = sharedObj.data.lvl10max;
lvl11high = sharedObj.data.lvl11high;
lvl11max = sharedObj.data.lvl11max;
lvl12high = sharedObj.data.lvl12high;
lvl12max = sharedObj.data.lvl12max;
lvl13high = sharedObj.data.lvl13high;
lvl13max = sharedObj.data.lvl13max;
lvl14high = sharedObj.data.lvl14high;
lvl14max = sharedObj.data.lvl14max;
} else {
playername = undefined;
levelnum = 1;
lvl1high = 0;
lvl1max = 0;
lvl2high = 0;
lvl2max = 0;
lvl3high = 0;
lvl3max = 0;
lvl4high = 0;
lvl4max = 0;
lvl5high = 0;
lvl5max = 0;
lvl6high = 0;
lvl6max = 0;
lvl7high = 0;
lvl7max = 0;
lvl8high = 0;
lvl8max = 0;
lvl9high = 0;
lvl9max = 0;
lvl10high = 0;
lvl10max = 0;
lvl11high = 0;
lvl11max = 0;
lvl12high = 0;
lvl12max = 0;
lvl13high = 0;
lvl13max = 0;
lvl14high = 0;
lvl14max = 0;
}
p = 1;
while (p < 15) {
_root["level" + p] = false;
p++;
}
menumov.ouroboros2._visible = false;
menumov.ouroboros._visible = true;
uninitialize = function () {
barout._visible = false;
topbars._visible = false;
thing._visible = false;
thing2._visible = false;
thing3._visible = false;
thing4._visible = false;
shot = true;
gamelop.stop();
gamelop2.stop();
gamelop3.stop();
_root.num = 0;
paws = false;
invulnerable = false;
removeMovieClip(snake);
removeMovieClip(triangle);
k = 0;
while (k < goalnum) {
removeMovieClip(_root["goal" + k]);
k++;
}
k = 0;
while (k < extranum) {
removeMovieClip(_root["extra" + k]);
k++;
}
m = 0;
while (m < minenum) {
removeMovieClip(_root["mine" + m]);
m++;
}
laze = 0;
while (laze < 6) {
removeMovieClip(_root["laser" + laze]);
laze++;
}
s = 1;
while (s < (snakenum + 1)) {
removeMovieClip(_root["snake" + s]);
s++;
}
j = 0;
while (j < 2) {
removeMovieClip(_root["infshot" + j]);
j++;
}
};
win = function () {
_root.uninitialize();
lvltitle._visible = true;
lengthgoal._visible = true;
timething._visible = true;
uptxt._visible = true;
downtxt._visible = true;
menutxt._visible = true;
lvltitle.text = "Objective Complete";
timething.text = "Final Length: " + showscore;
lengthgoal.text = "Longest Chain: " + maxscore;
if (level1 == true) {
level1 = false;
level2 = true;
instxt._visible = true;
instxt.text = "Your level score is the sum\nof your final length and longest chain";
if (lvl1high < showscore) {
lvl1high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl1high;
}
if (lvl1max < maxscore) {
lvl1max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl1max;
}
if (levelnum < 2) {
levelnum = 2;
}
totalscore1 = lvl1high + lvl1max;
} else if (level2 == true) {
level2 = false;
level3 = true;
if (lvl2high < showscore) {
lvl2high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl2high;
}
if (lvl2max < maxscore) {
lvl2max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl2max;
}
targets._visible = true;
targets.text = "Mines hit: " + hitmine;
if (levelnum < 3) {
levelnum = 3;
}
} else if (level3 == true) {
level3 = false;
level4 = true;
if (lvl3high < showscore) {
lvl3high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl3high;
}
if (lvl3max < maxscore) {
lvl3max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl3max;
}
if (levelnum < 4) {
levelnum = 4;
}
} else if (level4 == true) {
level4 = false;
level5 = true;
if (lvl4high < showscore) {
lvl4high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl4high;
}
if (lvl4max < maxscore) {
lvl4max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl4max;
}
targets._visible = true;
targets.text = "Snakes killed: " + snakeskild;
if (levelnum < 5) {
levelnum = 5;
}
} else if (level5 == true) {
level5 = false;
level6 = true;
if (lvl5high < showscore) {
lvl5high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl5high;
}
if (lvl5max < maxscore) {
lvl5max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl5max;
}
if (levelnum < 6) {
levelnum = 6;
}
} else if (level6 == true) {
level6 = false;
level7 = true;
if (lvl6high < showscore) {
lvl6high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl6high;
}
if (lvl6max < maxscore) {
lvl6max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl6max;
}
targets._visible = true;
targets.text = "Ghost length: " + (showscore - snakecompscore);
if (levelnum < 7) {
levelnum = 7;
}
} else if (level7 == true) {
level7 = false;
level8 = true;
if (lvl7high < showscore) {
lvl7high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl7high;
}
if (lvl7max < maxscore) {
lvl7max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl7max;
}
if (levelnum < 8) {
levelnum = 8;
}
} else if (level8 == true) {
level8 = false;
level9 = true;
if (lvl8high < showscore) {
lvl8high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl8high;
}
if (lvl8max < maxscore) {
lvl8max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl8max;
}
if (levelnum < 9) {
levelnum = 9;
}
} else if (level9 == true) {
level9 = false;
level10 = true;
if (lvl9high < showscore) {
lvl9high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl9high;
}
if (lvl9max < maxscore) {
lvl9max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl9max;
}
if (levelnum < 10) {
levelnum = 10;
}
} else if (level10 == true) {
level10 = false;
level11 = true;
if (lvl10high < showscore) {
lvl10high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl10high;
}
if (lvl10max < maxscore) {
lvl10max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl10max;
}
if (levelnum < 11) {
levelnum = 11;
}
} else if (level11 == true) {
level11 = false;
level12 = true;
if (lvl11high < showscore) {
lvl11high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl11high;
}
if (lvl11max < maxscore) {
lvl11max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl11max;
}
targets._visible = true;
targets.text = "Ghost length: " + (showscore - snakecompscore);
if (levelnum < 12) {
levelnum = 12;
}
} else if (level12 == true) {
level12 = false;
level13 = true;
if (lvl12high < showscore) {
lvl12high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl12high;
}
if (lvl12max < maxscore) {
lvl12max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl12max;
}
if (levelnum < 13) {
levelnum = 13;
}
} else if (level13 == true) {
level13 = false;
level14 = true;
if (lvl13high < showscore) {
lvl13high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl13high;
}
if (lvl13max < maxscore) {
lvl13max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl13max;
}
targets._visible = true;
targets.text = "Snakes killed: " + snakeskild;
if (levelnum < 14) {
levelnum = 14;
}
} else if (level14 == true) {
level14 = false;
totalwin = true;
if (lvl14high < showscore) {
lvl14high = showscore;
infchance._visible = true;
infchance.text = "New Personal Length Record!";
} else {
infchance._visible = true;
infchance.text = "Personal Length Record: " + lvl14high;
}
if (lvl14max < maxscore) {
lvl14max = maxscore;
infspeed._visible = true;
infspeed.text = "New Personal Longest Chain Record!";
} else {
infspeed._visible = true;
infspeed.text = "Personal Longest Chain Record: " + lvl14max;
}
targets._visible = true;
targets.text = "Ghost length: " + (showscore - snakecompscore);
levelnum = 15;
} else if (custom == true) {
subtext._visible = false;
sublvlscore._visible = false;
uptxt._visible = false;
}
sublvlscore._visible = true;
totalscore = _root[("lvl" + levelnom) + "max"] + _root[("lvl" + levelnom) + "high"];
subtext._visible = true;
subtext.text = totalscore;
sharedObj.data.checked = true;
sharedObj.data.playername = playername;
sharedObj.data.levelnum = levelnum;
sharedObj.data.lvl1high = lvl1high;
sharedObj.data.lvl1max = lvl1max;
sharedObj.data.lvl2high = lvl2high;
sharedObj.data.lvl2max = lvl2max;
sharedObj.data.lvl3high = lvl3high;
sharedObj.data.lvl3max = lvl3max;
sharedObj.data.lvl4high = lvl4high;
sharedObj.data.lvl4max = lvl4max;
sharedObj.data.lvl5high = lvl5high;
sharedObj.data.lvl5max = lvl5max;
sharedObj.data.lvl6high = lvl6high;
sharedObj.data.lvl6max = lvl6max;
sharedObj.data.lvl7high = lvl7high;
sharedObj.data.lvl7max = lvl7max;
sharedObj.data.lvl8high = lvl8high;
sharedObj.data.lvl8max = lvl8max;
sharedObj.data.lvl9high = lvl9high;
sharedObj.data.lvl9max = lvl9max;
sharedObj.data.lvl10high = lvl10high;
sharedObj.data.lvl10max = lvl10max;
sharedObj.data.lvl11high = lvl11high;
sharedObj.data.lvl11max = lvl11max;
sharedObj.data.lvl12high = lvl12high;
sharedObj.data.lvl12max = lvl12max;
sharedObj.data.lvl13high = lvl13high;
sharedObj.data.lvl13max = lvl13max;
sharedObj.data.lvl14high = lvl14high;
sharedObj.data.lvl14max = lvl14max;
sharedObj.flush();
wind = true;
};
lose = function () {
lvltitle._visible = true;
lengthgoal._visible = true;
timething._visible = true;
menutxt._visible = true;
lvltitle.text = "Objective Incomplete";
timething.text = "Final Length: " + showscore;
lengthgoal.text = "Longest Chain: " + maxscore;
if (losestring != undefined) {
targets._visible = true;
targets.text = losestring;
}
if (lvlbeaten == true) {
uptxt._visible = true;
infchance._visible = true;
infspeed._visible = true;
infchance.text = "Personal Length Record: " + _root[("lvl" + levelnom) + "high"];
infspeed.text = "Personal Longest Chain Record: " + _root[("lvl" + levelnom) + "max"];
if (level1 == true) {
instxt._visible = true;
instxt.text = "Your level score is the sum\nof your final length and longest chain";
}
} else {
uptxt._visible = false;
infchance._visible = false;
infspeed._visible = false;
}
if (died == true) {
lvltitle.text = "You Died";
infchance._visible = false;
infspeed._visible = false;
targets._visible = false;
if (custom == false) {
timething.text = "Personal Length Record: " + _root[("lvl" + levelnom) + "high"];
lengthgoal.text = "Personal Longest Chain Record: " + _root[("lvl" + levelnom) + "max"];
}
}
downtxt._visible = true;
_root.uninitialize();
losed = true;
};
chain = function (snak, p) {
if (p != 1) {
dx = snak["pt" + p]._x - snak["pt" + (p - 1)]._x;
dy = snak["pt" + p]._y - snak["pt" + (p - 1)]._y;
angle = Math.atan2(dy, dx);
snak["pt" + p]._x = snak["pt" + (p - 1)]._x + (Math.cos(angle) * d);
snak["pt" + p]._y = snak["pt" + (p - 1)]._y + (Math.sin(angle) * d);
snak["pt" + p]._xscale = ((30 / num) * (num - p)) + 60;
snak["pt" + p]._yscale = ((30 / num) * (num - p)) + 60;
snak["pt" + p].num = p;
} else {
dx = snak["pt" + p]._x - pt0._x;
dy = snak["pt" + p]._y - pt0._y;
angle = Math.atan2(dy, dx);
snak["pt" + p]._x = pt0._x + (Math.cos(angle) * d);
snak["pt" + p]._y = pt0._y + (Math.sin(angle) * d);
snak["pt" + p]._xscale = ((30 / num) * (num - p)) + 60;
snak["pt" + p]._yscale = ((30 / num) * (num - p)) + 60;
snak["pt" + p].num = p;
}
};
chainbad = function (snak, p) {
if (p != 1) {
rx = snak["ipoint" + p]._x - snak["ipoint" + (p - 1)]._x;
ry = snak["ipoint" + p]._y - snak["ipoint" + (p - 1)]._y;
changle = Math.atan2(ry, rx);
snak["ipoint" + p]._x = snak["ipoint" + (p - 1)]._x + (Math.cos(changle) * d);
snak["ipoint" + p]._y = snak["ipoint" + (p - 1)]._y + (Math.sin(changle) * d);
snak["ipoint" + p]._xscale = ((30 / snak.num) * (snak.num - p)) + 60;
snak["ipoint" + p]._yscale = ((30 / snak.num) * (snak.num - p)) + 60;
snak["ipoint" + p].num = p;
} else {
rx = snak["ipoint" + p]._x - snak.redhead._x;
ry = snak["ipoint" + p]._y - snak.redhead._y;
changle = Math.atan2(ry, rx);
snak["ipoint" + p]._x = snak.redhead._x + (Math.cos(changle) * d);
snak["ipoint" + p]._y = snak.redhead._y + (Math.sin(changle) * d);
snak["ipoint" + p]._xscale = ((30 / snak.num) * (snak.num - p)) + 60;
snak["ipoint" + p]._yscale = ((30 / snak.num) * (snak.num - p)) + 60;
snak["ipoint" + p].num = p;
}
};
gotHit = function () {
gamebing.start();
if (snake["pt" + p].infected == false) {
snake.attachMovie("pf", "pf" + p, p + 1000, {_x:snake["pt" + p]._x, _y:snake["pt" + p]._y});
} else {
snake.attachMovie("inpf", "pf" + p, p + 1000, {_x:snake["pt" + p]._x, _y:snake["pt" + p]._y});
infnum--;
}
removeMovieClip(snake["pt" + p]);
_root.HIT++;
_root.oldnum = _root.num;
_root.num = p;
newinfnum = 0;
score = _root.num - startnum;
};
mineHit = function () {
if (_root.num == 1) {
died = true;
lose();
} else if (_root.num > 4) {
p = _root.num - 1;
while (p > (_root.num - 5)) {
gamebing.start();
snake.attachMovie("pf", "pf" + p, p + 2500, {_x:snake["pt" + p]._x, _y:snake["pt" + p]._y});
removeMovieClip(snake["pt" + p]);
p--;
}
score = score - 4;
} else if (_root.num <= 4) {
p = _root.num - 1;
while (p > 0) {
gamebing.start();
snake.attachMovie("pf", "pf" + p, p + 2500, {_x:snake["pt" + p]._x, _y:snake["pt" + p]._y});
removeMovieClip(snake["pt" + p]);
p--;
}
score = score - (_root.num - 1);
}
};
extraHit = function () {
p = 1;
while (p < num) {
snake["pt" + p].infected = false;
p++;
}
p = 1;
while (p < 5) {
snake.attachMovie("pt", "pt" + num, 150 + num, {_x:Math.random() * 650, _y:Math.random() * 450});
num++;
score++;
p++;
}
};
infMineHit = function () {
if (_root["snake" + s].num > 5) {
p = _root["snake" + s].num - 1;
while (p > (_root["snake" + s].num - 5)) {
gamebing.start();
_root["snake" + s].attachMovie("inpf", "ikpf" + p, p + 7300, {_x:_root["snake" + s]["ipoint" + p]._x, _y:_root["snake" + s]["ipoint" + p]._y});
removeMovieClip(_root["snake" + s]["ipoint" + p]);
p--;
}
_root["snake" + s].num = _root["snake" + s].num - 4;
} else if (_root["snake" + s].num <= 5) {
p = _root["snake" + s].num - 1;
while (p > 0) {
gamebing.start();
_root["snake" + s].attachMovie("inpf", "ikpf" + p, p + 7300, {_x:_root["snake" + s]["ipoint" + p]._x, _y:_root["snake" + s]["ipoint" + p]._y});
removeMovieClip(_root["snake" + s]["ipoint" + p]);
p--;
}
_root["snake" + s].num = _root["snake" + s].num - (_root["snake" + s].num - 1);
}
};
_root.onEnterFrame = function () {
cursor._x = _xmouse;
cursor._y = _ymouse;
updateAfterEvent();
onMouseDown = function () {
Mouse.hide();
};
if (Key.isDown(16)) {
} else {
sbtncheck = false;
}
if (Key.isDown(67) && (cbtncheck == true)) {
if (control < contmax) {
control++;
} else {
control = 1;
}
if (control == 1) {
keys = true;
mouse = false;
} else if (control == 2) {
keys = false;
mouse = true;
}
cbtncheck = false;
}
if (Key.isDown(67)) {
} else {
cbtncheck = true;
}
if ((Key.isDown(81) && (qbtncheck == true)) && (playername != undefined)) {
if (qual < 3) {
qual++;
} else {
qual = 1;
}
if (qual == 1) {
_quality = "low";
} else if (qual == 2) {
_quality = "medium";
} else {
_quality = "high";
}
qbtncheck = false;
}
if (Key.isDown(81)) {
} else {
qbtncheck = true;
}
if (((Key.isDown(77) && (mbtncheck == true)) && (menulop.getVolume() == 100)) && (playername != undefined)) {
menulop.setVolume(0);
gamelop.setVolume(0);
gamelop2.setVolume(0);
gamelop3.setVolume(0);
gamebing.setVolume(0);
gamebong.setVolume(0);
gameextra.setVolume(0);
gametic.setVolume(0);
gamestring.setVolume(0);
mbtncheck = false;
} else if (((Key.isDown(77) && (mbtncheck == true)) && (menulop.getVolume() == 0)) && (playername != undefined)) {
menulop.setVolume(100);
gamelop.setVolume(50);
gamelop2.setVolume(70);
gamelop3.setVolume(50);
gamestring.setVolume(250);
gameextra.setVolume(110);
gamebing.setVolume(100);
gamebong.setVolume(100);
gametic.setVolume(70);
mbtncheck = false;
}
if (Key.isDown(77)) {
} else {
mbtncheck = true;
}
menumov.blackover._visible = false;
cursor._visible = true;
if (menumov.ouroboros._visible == true) {
menumov.perstxt._visible = true;
menumov.perstxt.itxt.text = "User: " + playername;
menumov.backbtn._visible = false;
menumov.combo._visible = true;
} else {
menumov.perstxt._visible = false;
}
if (playername == undefined) {
controltxt._visible = true;
menumov.enterbtn._visible = true;
menumov.namein._visible = true;
menumov.nameborder._visible = true;
menumov.ouroboros._visible = false;
menumov.highscorebtn._visible = false;
menumov.perstxt._visible = false;
menumov.title._visible = false;
menumov.combo._visible = false;
if (Key.isDown(13) && (menumov.namein.text != "")) {
menumov.namein._visible = false;
menumov.nameborder._visible = false;
menumov.enterbtn._visible = false;
menumov.ouroboros._visible = true;
menumov.highscorebtn._visible = true;
menumov.combo._visible = true;
menumov.title._visible = true;
controltxt._visible = false;
playername = menumov.namein.text;
menumov.ouroboros._rotation = 0;
menumov.ouroboros2._rotation = 0;
}
menumov.enterbtn.onPress = function () {
if (menumov.namein.text != "") {
menumov.namein._visible = false;
menumov.nameborder._visible = false;
menumov.enterbtn._visible = false;
menumov.ouroboros._visible = true;
menumov.highscorebtn._visible = true;
menumov.title._visible = true;
playername = menumov.namein.text;
menumov.ouroboros._rotation = 0;
menumov.ouroboros2._rotation = 0;
menumov.combo._visible = true;
controltxt._visible = false;
}
};
}
if (menustart == false) {
menulop.start(0, 9999999);
menumov.lvlthang._visible = false;
menumov.custombtn._visible = false;
menumov.winmov._visible = false;
menumov.custommenu._visible = false;
menustart = true;
menumov.backbtn._visible = false;
menumov.highmov._visible = false;
}
if (totalwin == true) {
menumov.winmov._visible = true;
menumov.ouroboros._visible = false;
menumov.ouroboros2._visible = false;
menumov.lvlthang._visible = false;
menumov.custombtn._visible = true;
menumov.custommenu._visible = false;
menumov.title._visible = false;
menumov.backbtn._visible = true;
menumov.combo._visible = false;
}
if (justmenu == false) {
k = 0;
while (k < 200) {
sizrandom = Math.random() * 100;
menumov.attachMovie("menupoint", "mpt" + k, k, {_x:Math.random() * 650, _y:Math.random() * 450, _xscale:sizrandom, _yscale:sizrandom});
k++;
}
justmenu = true;
}
if ((customchoices == true) && (custchck == false)) {
menumov.combo._visible = false;
menumov.backbtn._visible = true;
menumov.custommenu._visible = true;
menumov.winmov._visible = false;
menumov.ouroboros._visible = false;
menumov.ouroboros2._visible = false;
menumov.lvlthang._visible = false;
menumov.custombtn._visible = false;
menumov.highscorebtn._visible = false;
menumov.title._visible = false;
custchck = true;
totalwin = false;
cper = 0;
snum = 0;
gnum = 0;
cnum = 0;
rnum = 0;
pnum = 0;
mnum = 0;
tnum = 0;
tlnum = 0;
onum = 0;
menumov.custommenu.sval.text = snum;
menumov.custommenu.gval.text = gnum;
menumov.custommenu.pval.text = pnum;
menumov.custommenu.mval.text = mnum;
menumov.custommenu.tval.text = tnum + 1;
menumov.custommenu.tlval.text = (tlnum + 1) + " seconds";
menumov.custommenu.oval.text = onum;
menumov.custommenu.rval.text = rnum + "/10sec";
menumov.custommenu.cval.text = "0%";
}
if (customchoices == true) {
menumov.custommenu.sbar._xscale = Math.round((snum / 10) * 100);
menumov.custommenu.sbehindbar.onPress = function () {
snum = Math.round(((_xmouse - menumov.custommenu.sbar._x) - menumov.custommenu._x) / 6);
menumov.custommenu.sval.text = snum;
};
menumov.custommenu.gbar._xscale = Math.round((gnum / 5) * 100);
menumov.custommenu.gbehindbar.onPress = function () {
gnum = Math.round(((_xmouse - menumov.custommenu.gbar._x) - menumov.custommenu._x) / 12);
menumov.custommenu.gval.text = gnum;
};
menumov.custommenu.pbar._xscale = Math.round(pnum * 100);
menumov.custommenu.pbehindbar.onPress = function () {
pnum = Math.round(((_xmouse - menumov.custommenu.pbar._x) - menumov.custommenu._x) / 60);
menumov.custommenu.pval.text = pnum;
};
menumov.custommenu.mbar._xscale = Math.round((mnum / 50) * 100);
menumov.custommenu.mbehindbar.onPress = function () {
mnum = Math.round((((_xmouse - menumov.custommenu.mbar._x) - menumov.custommenu._x) / 60) * 50);
menumov.custommenu.mval.text = mnum;
};
menumov.custommenu.tbar._xscale = Math.round((tnum / 49) * 100);
menumov.custommenu.tbehindbar.onPress = function () {
tnum = Math.round((((_xmouse - menumov.custommenu.tbar._x) - menumov.custommenu._x) / 60) * 49);
menumov.custommenu.tval.text = tnum + 1;
};
menumov.custommenu.tlbar._xscale = Math.round((tlnum / 119) * 100);
menumov.custommenu.tlbehindbar.onPress = function () {
tlnum = Math.round((((_xmouse - menumov.custommenu.tlbar._x) - menumov.custommenu._x) * 119) / 60);
menumov.custommenu.tlval.text = (tlnum + 1) + " seconds";
};
menumov.custommenu.obar._xscale = Math.round((onum / 100) * 100);
menumov.custommenu.obehindbar.onPress = function () {
onum = Math.round((((_xmouse - menumov.custommenu.obar._x) - menumov.custommenu._x) / 60) * 100);
menumov.custommenu.oval.text = onum;
};
menumov.custommenu.cbar._xscale = Math.round((cnum / 4) * 100);
menumov.custommenu.cbehindbar.onPress = function () {
cnum = Math.round((((_xmouse - menumov.custommenu.cbar._x) - menumov.custommenu._x) / 60) * 4);
if (cnum == 0) {
menumov.custommenu.cval.text = "0%";
cper = 0;
} else if (cnum == 1) {
menumov.custommenu.cval.text = "10%";
cper = 10;
} else if (cnum == 2) {
menumov.custommenu.cval.text = "20%";
cper = 20;
} else if (cnum == 3) {
menumov.custommenu.cval.text = "33%";
cper = 33;
} else {
menumov.custommenu.cval.text = "50%";
cper = 50;
}
};
menumov.custommenu.rbar._xscale = Math.round((rnum / 20) * 100);
menumov.custommenu.rbehindbar.onPress = function () {
rnum = Math.round((((_xmouse - menumov.custommenu.rbar._x) - menumov.custommenu._x) / 60) * 20);
menumov.custommenu.rval.text = rnum + "/10sec";
};
menumov.custommenu.cstart.onPress = function () {
lvlinfo = true;
customchoices = false;
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
custom = true;
};
}
menumov.ouroboros.swapDepths(1000);
menumov.playbtn.swapDepths(1001);
menumov.title.swapDepths(1002);
menumov.ouroboros2.swapDepths(1004);
menumov.lvlthang.swapDepths(1006);
menumov.highscorebtn.swapDepths(1007);
menumov.custombtn.swapDepths(1008);
menumov.winmov.swapDepths(1009);
menumov.custommenu.swapDepths(1010);
menumov.backbtn.swapDepths(1011);
menumov.namein.swapDepths(1012);
menumov.enterbtn.swapDepths(1013);
menumov.nameborder.swapDepths(1014);
menumov._visible = true;
menumov.highmov.swapDepths(1015);
menumov.perstxt.swapDepths(999);
menumov.instmov.swapDepths(1017);
menumov.combo.swapDepths(1018);
menumov.ouroboros.playbtn.onPress = function () {
menumov.ouroboros._visible = false;
menumov.ouroboros2._visible = true;
menumov.lvlthang._visible = true;
menumov.perstxt._visible = false;
menumov.custombtn._visible = true;
menumov.backbtn._visible = true;
};
menumov.ouroboros.instbtn.onPress = function () {
menumov.ouroboros._visible = false;
menumov.title._visible = false;
menumov.custombtn._visible = false;
menumov.backbtn._visible = false;
menumov.instmov._visible = true;
};
if (menumov.instmov._visible == true) {
menumov.combo._visible = false;
menumov.instmov.nxtbtn.onPress = function () {
menumov.instmov.gotoAndStop(menumov.instmov._currentframe + 1);
};
menumov.instmov.bbtn.onPress = function () {
menumov.instmov.gotoAndStop(menumov.instmov._currentframe - 1);
};
if (Key.isDown(27)) {
menumov.ouroboros._visible = true;
menumov.title._visible = true;
menumov.combo._visible = true;
menumov.custombtn._visible = true;
menumov.backbtn._visible = false;
menumov.instmov.gotoAndStop(1);
menumov.instmov._visible = false;
menumov.highmov._visible = false;
}
}
menumov.backbtn.onPress = function () {
if (menumov.ouroboros2._visible == true) {
menumov.ouroboros._visible = true;
menumov.ouroboros2._visible = false;
menumov.custombtn._visible = false;
menumov.highscorebtn._visible = true;
menumov.lvlthang._visible = false;
menumov.custommenu.visible = false;
menumov.winmov._visible = false;
menumov.backbtn._visible = false;
menumov.combo._visible = true;
} else if (menumov.custommenu._visible == true) {
totalwin = false;
menumov.ouroboros2._visible = true;
menumov.title._visible = true;
menumov.custombtn._visible = true;
menumov.custommenu._visible = false;
menumov.lvlthang._visible = true;
menumov.winmov._visible = false;
menumov.highscorebtn._visible = true;
customchoices = false;
custchck = false;
menumov.combo._visible = true;
} else if (totalwin == true) {
totalwin = false;
menumov.ouroboros2._visible = true;
menumov.title._visible = true;
menumov.custombtn._visible = true;
menumov.custommenu._visible = false;
menumov.lvlthang._visible = true;
menumov.winmov._visible = false;
menumov.highscorebtn._visible = true;
menumov.combo._visible = true;
} else if ((menumov.highmov._visible == true) && (goready == true)) {
menumov.title._visible = true;
menumov.ouroboros._visible = true;
menumov.custombtn._visible = true;
menumov.highscorebtn._visible = true;
menumov.highmov._visible = false;
menumov.combo._visible = true;
}
};
menumov.highscorebtn.onPress = function () {
totalwin = false;
menumov.custommenu._visible = false;
menumov.combo._visible = false;
custom = false;
customchoices = false;
menumov.highbtn._visible = true;
menumov.ouroboros._visible = false;
menumov.ouroboros2._visible = false;
menumov.lvlthang._visible = false;
menumov.highscorebtn._visible = false;
menumov.title._visible = false;
menumov.custombtn._visible = false;
menumov.winmov._visible = false;
menumov.backbtn._visible = true;
menumov.highmov._visible = true;
scobo._visible = true;
};
if (keys == true) {
menumov.combo.mousebtn._alpha = 50;
menumov.combo.keybtn._alpha = 100;
menumov.combo.adbtn._alpha = 50;
} else if (mouse == true) {
menumov.combo.mousebtn._alpha = 100;
menumov.combo.keybtn._alpha = 50;
menumov.combo.adbtn._alpha = 50;
}
if (levelnum < 15) {
t = levelnum;
while (t < 15) {
menumov.highmov["sumsub" + t]._visible = false;
t++;
}
t = levelnum - 1;
while (t > 0) {
menumov.highmov["sumsub" + t]._visible = true;
t--;
}
delete menumov.combo.mousebtn.onPress;
delete menumov.combo.keybtn.onPress;
contmax = 1;
} else {
t = 1;
while (t < 15) {
menumov.highmov["sumsub" + t]._visible = true;
t++;
}
menumov.combo.mousebtn.onPress = function () {
mouse = true;
keys = false;
adbtn = false;
};
menumov.combo.keybtn.onPress = function () {
keys = true;
mouse = false;
adbtn = false;
};
contmax = 2;
}
if (menumov.highmov._visible == true) {
t = 1;
while (t < 15) {
menumov.highmov["txt" + t].text = "Score: " + (_root[("lvl" + t) + "max"] + _root[("lvl" + t) + "high"]);
countscore = countscore + (_root[("lvl" + t) + "max"] + _root[("lvl" + t) + "high"]);
t++;
}
menumov.highmov.pers2.usetxt.text = "User: " + playername;
menumov.highmov.resbtn.onPress = function () {
menumov.highmov._visible = false;
menumov.backbtn._visible = false;
playername = undefined;
levelnum = 1;
lvl1high = 0;
lvl1max = 0;
lvl2high = 0;
lvl2max = 0;
lvl3high = 0;
lvl3max = 0;
lvl4high = 0;
lvl4max = 0;
lvl5high = 0;
lvl5max = 0;
lvl6high = 0;
lvl6max = 0;
lvl7high = 0;
lvl7max = 0;
lvl8high = 0;
lvl8max = 0;
lvl9high = 0;
lvl9max = 0;
lvl10high = 0;
lvl10max = 0;
lvl11high = 0;
lvl11max = 0;
lvl12high = 0;
lvl12max = 0;
lvl13high = 0;
lvl13max = 0;
lvl14high = 0;
lvl14max = 0;
sharedObj.data.checked = false;
sharedObj.data.playername = playername;
sharedObj.data.levelnum = levelnum;
sharedObj.data.lvl1high = lvl1high;
sharedObj.data.lvl1max = lvl1max;
sharedObj.data.lvl2high = lvl2high;
sharedObj.data.lvl2max = lvl2max;
sharedObj.data.lvl3high = lvl3high;
sharedObj.data.lvl3max = lvl3max;
sharedObj.data.lvl4high = lvl4high;
sharedObj.data.lvl4max = lvl4max;
sharedObj.data.lvl5high = lvl5high;
sharedObj.data.lvl5max = lvl5max;
sharedObj.data.lvl6high = lvl6high;
sharedObj.data.lvl6max = lvl6max;
sharedObj.data.lvl7high = lvl7high;
sharedObj.data.lvl7max = lvl7max;
sharedObj.data.lvl8high = lvl8high;
sharedObj.data.lvl8max = lvl8max;
sharedObj.data.lvl9high = lvl9high;
sharedObj.data.lvl9max = lvl9max;
sharedObj.data.lvl10high = lvl10high;
sharedObj.data.lvl10max = lvl10max;
sharedObj.data.lvl11high = lvl11high;
sharedObj.data.lvl11max = lvl11max;
sharedObj.data.lvl12high = lvl12high;
sharedObj.data.lvl12max = lvl12max;
sharedObj.data.lvl13high = lvl13high;
sharedObj.data.lvl13max = lvl13max;
sharedObj.data.lvl14high = lvl14high;
sharedObj.data.lvl14max = lvl14max;
sharedObj.flush();
};
sumscore = countscore;
menumov.highmov.txttot.text = sumscore;
countscore = 0;
if (sumscore == 0) {
menumov.highmov.sumsub._visible = false;
} else {
menumov.highmov.sumsub._visible = true;
}
menumov.highmov.sumsub.onPress = function () {
mochi.MochiScores.showLeaderboard({boardID:"c26f478f55be491d", score:sumscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub1.onPress = function () {
totalscore = lvl1max + lvl1high;
mochi.MochiScores.showLeaderboard({boardID:"9a0c8e1b84c508e2", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub2.onPress = function () {
totalscore = lvl2max + lvl2high;
mochi.MochiScores.showLeaderboard({boardID:"26e20b6eb2885621", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub3.onPress = function () {
totalscore = lvl3max + lvl3high;
mochi.MochiScores.showLeaderboard({boardID:"915d6f3887bf51ff", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub4.onPress = function () {
totalscore = lvl4max + lvl4high;
mochi.MochiScores.showLeaderboard({boardID:"698da389cb4ea2de", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub5.onPress = function () {
totalscore = lvl5max + lvl5high;
mochi.MochiScores.showLeaderboard({boardID:"72555487b241aaf4", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub6.onPress = function () {
totalscore = lvl6max + lvl6high;
mochi.MochiScores.showLeaderboard({boardID:"bf4738c044796f80", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub7.onPress = function () {
totalscore = lvl7max + lvl7high;
mochi.MochiScores.showLeaderboard({boardID:"8158542620093a3a", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub8.onPress = function () {
totalscore = lvl8max + lvl8high;
mochi.MochiScores.showLeaderboard({boardID:"3f71308c48561b6f", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub9.onPress = function () {
totalscore = lvl9max + lvl9high;
mochi.MochiScores.showLeaderboard({boardID:"233700e8385270e8", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub10.onPress = function () {
totalscore = lvl10max + lvl10high;
mochi.MochiScores.showLeaderboard({boardID:"4c04bd7154180008", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub11.onPress = function () {
totalscore = lvl11max + lvl11high;
mochi.MochiScores.showLeaderboard({boardID:"cfbd44581ff95d8d", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub12.onPress = function () {
totalscore = lvl12max + lvl12high;
mochi.MochiScores.showLeaderboard({boardID:"bd3e63d86ec93f24", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub13.onPress = function () {
totalscore = lvl13max + lvl13high;
mochi.MochiScores.showLeaderboard({boardID:"338884409980f89c", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
menumov.highmov.sumsub14.onPress = function () {
totalscore = lvl14max + lvl14high;
mochi.MochiScores.showLeaderboard({boardID:"06d344a737833065", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
};
}
if (levelnum > 14) {
menumov.custombtn._alpha = 100;
menumov.custombtn.onPress = function () {
customchoices = true;
};
} else if (levelnum <= 14) {
menumov.custombtn._alpha = 50;
delete menumov.custombtn.onPress;
}
menumov.ouroboros._rotation = menumov.ouroboros._rotation - 0.2;
menumov.ouroboros2._rotation = menumov.ouroboros2._rotation - 0.2;
// unexpected jump
if (manu == false) {
menumov._visible = false;
if (lvlinfo == true) {
if ((objcheck == false) || (objcheck == undefined)) {
arch = new Object();
Key.addListener(arch);
objcheck = true;
}
justmenu = false;
uptxt._visible = true;
menutxt._visible = false;
lvltitle._visible = true;
instxt._visible = true;
lengthgoal._visible = true;
infchance._visible = true;
infspeed._visible = true;
timething._visible = true;
downtxt._visible = false;
uptxt._visible = false;
entertxt._visible = true;
thing._visible = false;
barout._visible = false;
topbars._visible = false;
thing2._visible = false;
thing3._visible = false;
thing4._visible = false;
targets._visible = true;
mines._visible = true;
sublvlscore._visible = false;
subtext._visible = false;
paws = false;
if (level1 == true) {
if (levelnum > 1) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
if (keys == true) {
instxt.text = "Turn your snake with the Right and Left arrow keys\n or A and D Keys. Hold Shift to slow down time.\nPress Space to shoot.";
} else if (mouse == true) {
instxt.text = "Move your mouse and your snake will follow.\nHold Shift to go slow with a sharper turning radius.\nPress Space to shoot.";
}
lvltitle.text = "Snake Pilot Practice";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: final length of 10";
infchance.text = "Chance of Infection: 0%";
infspeed.text = "Rate of Infection: 0/sec";
targets.text = "Targets: 10";
mines.text = "Mines: 0";
} else if (level2 == true) {
if (levelnum > 2) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
instxt.text = "The dark red orbs are Mines. If you hit one, it\nwill blow off your last four orbs.\nAvoid them, unless you have an infection to get rid of.";
lvltitle.text = "Mines";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: final length of 10";
infchance.text = "Chance of Infection: 0%";
infspeed.text = "Rate of Infection: 0/sec";
targets.text = "Targets: 20";
mines.text = "Mines: 10";
} else if (level3 == true) {
if (levelnum > 3) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
instxt.text = "With every orb you collect, there is a chance of infection\nIf your last orb is red, you are infected\nGet rid of it by charging it or shooting it off";
lvltitle.text = "Infections";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: final length of 10";
infchance.text = "Chance of Infection: 20%";
infspeed.text = "Rate of Infection: 1/4sec";
targets.text = "Targets: 20";
mines.text = "Mines: 1";
} else if (level4 == true) {
if (levelnum > 4) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
instxt.text = "When you cut off an infection of two or more red orbs,\nit turns into an enemy snake. Kill an enemy\nsnake by charging or shooting it's first orb.";
lvltitle.text = "Snakes";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: final length of 10, kill the 5 snakes";
infchance.text = "Chance of Infection: 10%";
infspeed.text = "Rate of Infection: 1/5sec";
targets.text = "Targets: 15";
mines.text = "Mines: 0";
} else if (level5 == true) {
if (levelnum > 5) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
instxt.text = "Hint: Take it slow. (shift)";
lvltitle.text = "Minefield";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: final length of 10";
infchance.text = "Chance of Infection: 0%";
infspeed.text = "Rate of Infection: 0/sec";
targets.text = "Targets: 15";
mines.text = "Mines: 40";
} else if (level6 == true) {
if (levelnum > 6) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
instxt.text = "Ghosts collect the same orbs you do.\nThey cannot be hurt.";
lvltitle.text = "Ghost Rivalry";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: greater final length than ghost";
infchance.text = "Chance of Infection: 0%";
infspeed.text = "Rate of Infection: 0/sec";
targets.text = "Targets: 5";
mines.text = "Mines: 0";
} else if (level7 == true) {
if (levelnum > 7) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
instxt.text = "By the way, those golden orbs you've been seeing are helpful.\nThey give you 4 orbs at once, and they get\nof any infections. Get them.";
lvltitle.text = "Ghost Gang";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: final length of 15";
infchance.text = "Chance of Infection: 0%";
infspeed.text = "Rate of Infection: 0/sec";
targets.text = "Targets: 3";
mines.text = "Mines: 0";
} else if (level8 == true) {
if (levelnum > 8) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
instxt.text = "Predators chase your last orb constantly.\nThey cannot be hurt\nHint: Don't make sharp turns.";
lvltitle.text = "Predator";
timething.text = "Time Limit: 1:00";
lengthgoal.text = "Objective: final length of 25";
infchance.text = "Chance of Infection: 10%";
infspeed.text = "Rate of Infection: 1/4sec";
targets.text = "Targets: 25";
mines.text = "Mines: 10";
} else if (level9 == true) {
if (levelnum > 9) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
lvltitle.text = "Ghost Trio and Predator";
timething.text = "Time Limit: 0:40";
lengthgoal.text = "Objective: final length of 15";
infchance.text = "Chance of Infection: 0%";
infspeed.text = "Rate of Infection: 0/sec";
targets.text = "Targets: 5";
mines.text = "Mines: 5";
} else if (level10 == true) {
if (levelnum > 10) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
lvltitle.text = "Minefield Predator";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: final length of 15";
infchance.text = "Chance of Infection: 0%";
infspeed.text = "Rate of Infection: 0/sec";
targets.text = "Targets: 20";
mines.text = "Mines: 40";
} else if (level11 == true) {
if (levelnum > 11) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
lvltitle.text = "Rival and Predator";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: greater final length than ghost";
infchance.text = "Chance of Infection: 0%";
infspeed.text = "Rate of Infection: 0/sec";
targets.text = "Targets: 10";
mines.text = "Mines: 5";
} else if (level12 == true) {
if (levelnum > 12) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
lvltitle.text = "Medley";
timething.text = "Time Limit: 1:00";
lengthgoal.text = "Objective: final length of 10";
infchance.text = "Chance of Infection: 20%";
infspeed.text = "Rate of Infection: 1/2sec";
targets.text = "Targets: 5";
mines.text = "Mines: 20";
} else if (level13 == true) {
if (levelnum > 13) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
instxt.text = "Rate of infection is pretty high on this one.\nGet ready to cut off that infection as soon as it starts";
lvltitle.text = "Snakes and Rapid Infection";
timething.text = "Time Limit: 0:30";
lengthgoal.text = "Objective: final length of 15, kill the five snakes";
infchance.text = "Chance of Infection: 20%";
infspeed.text = "Rate of Infection: 1/sec";
targets.text = "Targets: 20";
mines.text = "Mines: 10";
} else if (level14 == true) {
if (levelnum > 14) {
lvlbeaten = true;
} else {
lvlbeaten = false;
}
lvltitle.text = "The Last Rivalry";
timething.text = "Time Limit: 1:00";
lengthgoal.text = "Objective: greater final length than ghost";
infchance.text = "Chance of Infection: 10%";
infspeed.text = "Rate of Infection: 1/2sec";
targets.text = "Targets: 5";
mines.text = "Mines: 15";
} else if (custom == true) {
lvltitle.text = "Custom Level";
timething.text = ("Time Limit: " + (tlnum + 1)) + " seconds";
lengthgoal.text = "Objective: final length of " + onum;
infchance.text = ("Chance of Infection: " + cper) + "%";
infspeed.text = ("Rate of Infection: " + rnum) + "/10sec";
targets.text = "Targets: " + (tnum + 1);
mines.text = "Mines: " + mnum;
}
if ((sbtncheck == false) && (spbtncheck == false)) {
arch.onKeyDown = function () {
uptxt._visible = false;
sublvlscore._visible = false;
entertxt._visible = false;
instxt.text = "";
lvlinfo = false;
initial = true;
targets._visible = false;
mines._visible = false;
lvltitle._visible = false;
instxt._visible = false;
lengthgoal._visible = false;
infchance._visible = false;
infspeed._visible = false;
timething._visible = false;
slowamount = 100;
Key.removeListener(arch);
objcheck = false;
};
}
}
if (wind == true) {
if (keys == true) {
} else if (mouse == true) {
}
sublvlscore.onPress = function () {
if (level1 == true) {
} else if (level2 == true) {
mochi.MochiScores.showLeaderboard({boardID:"9a0c8e1b84c508e2", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level3 == true) {
mochi.MochiScores.showLeaderboard({boardID:"26e20b6eb2885621", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level4 == true) {
mochi.MochiScores.showLeaderboard({boardID:"915d6f3887bf51ff", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level5 == true) {
mochi.MochiScores.showLeaderboard({boardID:"698da389cb4ea2de", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level6 == true) {
mochi.MochiScores.showLeaderboard({boardID:"72555487b241aaf4", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level7 == true) {
mochi.MochiScores.showLeaderboard({boardID:"bf4738c044796f80", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level8 == true) {
mochi.MochiScores.showLeaderboard({boardID:"8158542620093a3a", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level9 == true) {
mochi.MochiScores.showLeaderboard({boardID:"3f71308c48561b6f", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level10 == true) {
mochi.MochiScores.showLeaderboard({boardID:"233700e8385270e8", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level11 == true) {
mochi.MochiScores.showLeaderboard({boardID:"4c04bd7154180008", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level12 == true) {
mochi.MochiScores.showLeaderboard({boardID:"cfbd44581ff95d8d", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level13 == true) {
mochi.MochiScores.showLeaderboard({boardID:"bd3e63d86ec93f24", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (level14 == true) {
mochi.MochiScores.showLeaderboard({boardID:"338884409980f89c", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
} else if (totalwin == true) {
mochi.MochiScores.showLeaderboard({boardID:"06d344a737833065", score:totalscore, name:playername, onClose:myClosefunction, onDisplay:myDisplayFunction});
}
};
if ((keys == true) && (goready == true)) {
uptxt.text = "Press Space to Continue";
downtxt.text = "Press Shift to Replay";
if ((Key.isDown(32) && (custom == false)) && (spbtncheck == false)) {
if (totalwin == true) {
manu = true;
wind = false;
} else {
levelnom++;
lvlinfo = true;
wind = false;
}
spbtncheck = true;
} else if (Key.isDown(16) && (sbtncheck == false)) {
if (level1 == true) {
} else if (level2 == true) {
level2 = false;
level1 = true;
} else if (level3 == true) {
level3 = false;
level2 = true;
} else if (level4 == true) {
level4 = false;
level3 = true;
} else if (level5 == true) {
level5 = false;
level4 = true;
} else if (level6 == true) {
level6 = false;
level5 = true;
} else if (level7 == true) {
level7 = false;
level6 = true;
} else if (level8 == true) {
level8 = false;
level7 = true;
} else if (level9 == true) {
level9 = false;
level8 = true;
} else if (level10 == true) {
level10 = false;
level9 = true;
} else if (level11 == true) {
level11 = false;
level10 = true;
} else if (level12 == true) {
level12 = false;
level11 = true;
} else if (level13 == true) {
level13 = false;
level12 = true;
} else if (level14 == true) {
level13 = true;
level14 = false;
} else if (custom == true) {
custom = true;
}
lvlinfo = true;
wind = false;
sbtncheck = true;
}
}
if (Key.isDown(27) && (goready == true)) {
level1 = false;
level2 = false;
level3 = false;
level4 = false;
level5 = false;
level6 = false;
level7 = false;
level8 = false;
level9 = false;
level10 = false;
level11 = false;
level12 = false;
level13 = false;
level14 = false;
losed = false;
manu = true;
wind = false;
if (custom == true) {
customchoices = true;
custchck = true;
custom = false;
}
}
}
if (losed == true) {
if ((keys == true) && (goready == true)) {
uptxt.text = "Press Space to Continue";
downtxt.text = "Press Shift to Replay";
if (Key.isDown(16) && (sbtncheck == false)) {
lvlinfo = true;
losed = false;
sbtncheck = true;
} else if (Key.isDown(32) && (spbtncheck == false)) {
if (lvlbeaten == true) {
levelnom++;
if (level1 == true) {
level2 = true;
level1 = false;
} else if (level2 == true) {
level3 = true;
level2 = false;
} else if (level3 == true) {
level4 = true;
level3 = false;
} else if (level4 == true) {
level5 = true;
level4 = false;
} else if (level5 == true) {
level6 = true;
level5 = false;
} else if (level6 == true) {
level7 = true;
level6 = false;
} else if (level7 == true) {
level8 = true;
level7 = false;
} else if (level8 == true) {
level9 = true;
level8 = false;
} else if (level9 == true) {
level10 = true;
level9 = false;
} else if (level10 == true) {
level11 = true;
level10 = false;
} else if (level11 == true) {
level12 = true;
level11 = false;
} else if (level12 == true) {
level13 = true;
level12 = false;
} else if (level13 == true) {
level14 = true;
level13 = false;
} else if (level14 == true) {
level14 = false;
}
lvlinfo = true;
losed = false;
spbtncheck = true;
}
}
}
if (Key.isDown(27) && (goready == true)) {
level1 = false;
level2 = false;
level3 = false;
level4 = false;
level5 = false;
level6 = false;
level7 = false;
level8 = false;
level9 = false;
level10 = false;
level11 = false;
level12 = false;
level13 = false;
level14 = false;
losed = false;
manu = true;
wind = false;
}
}
if ((initial == true) && (initchecked == false)) {
barout._visible = true;
topbars._visible = true;
thing._visible = true;
thing2._visible = true;
thing3._visible = true;
thing4._visible = true;
d = 15;
p = 0;
gravity = 0.8;
vely = 0;
speed = 0;
speedstart = 3.5;
ang = 0;
rot = 13;
snakenom = 0;
deg2rad = (Math.PI/180);
HIT = 0;
score = 0;
startnum = 5;
num = startnum;
died = false;
oldnum = 0;
infnum = 0;
newinfnum = 0;
maxscore = 0;
showscore = 0;
infshotnum = 0;
infchances = 2;
ghostnum = 0;
prednum = 0;
snakecompscore = 0;
hitmine = 0;
gun = 0;
losestring = " ";
timer = false;
timerup = false;
timerdown = false;
enemyhit = false;
shot = false;
snakeninc = 0;
snakespeed = 3;
ghostspeed = 7;
inftime = 0;
_root.newnum = 0;
snakeskild = 0;
sec = 0;
msec = 0;
min = 0;
limit = 0;
enemyrot = 10;
snakerot = 10;
predrot = 6;
laserspeed = 15;
laserlength = 5;
inf = 0;
finalscore = 0;
checked = false;
meta = 0;
goalnum = 50;
minenum = 50;
extranum = 1;
snakenuminc = false;
infchecked = false;
leaderchecked = false;
time = 0;
shotinit = 0;
enemy = 0;
b = 0;
snakenum = 1;
headhit = false;
laserhit = false;
_root.createEmptyMovieClip("snake", 50000);
_root.attachMovie("pt", "pt0", 150, {_x:Math.round(Stage.width / 2), _y:Math.round(Stage.height / 2), _alpha:0});
p = 1;
while (p < num) {
snake.attachMovie("pt", "pt" + p, 150 + p, {_x:0, _y:0});
snake["pt" + p].num = p;
if (p != 1) {
dx = snake["pt" + p]._x - snake["pt" + (p - 1)]._x;
dy = snake["pt" + p]._y - snake["pt" + (p - 1)]._y;
angle = Math.atan2(dy, dx);
snake["pt" + p]._x = Math.round(snake["pt" + (p - 1)]._x + (Math.cos(angle) * d));
snake["pt" + p]._y = Math.round(snake["pt" + (p - 1)]._y + (Math.sin(angle) * d));
} else {
dx = snake["pt" + p]._x - pt0._x;
dy = snake["pt" + p]._y - pt0._y;
angle = Math.atan2(dy, dx);
snake["pt" + p]._x = Math.round(pt0._x + (Math.cos(angle) * d));
snake["pt" + p]._y = Math.round(pt0._y + (Math.sin(angle) * d));
snake["pt" + p]._xscale = (100 / num) * (num - p);
snake["pt" + p]._yscale = (100 / num) * (num - p);
}
p++;
}
_root.attachMovie("triangleID", "triangle", 5000);
if (level1 == true) {
startime = 30;
lvlgoal = 10;
infsped = 9999;
gamelop.start(0, 99999);
gamelopplay = true;
lvlnarm = 1;
goalnum = 10;
minenum = 0;
} else if (level2 == true) {
startime = 30;
infchances = 1E20;
lvlgoal = 10;
infsped = 9999;
gamelop.start(0, 99999);
gamelopplay = true;
lvlnarm = 2;
goalnum = 20;
minenum = 10;
} else if (level3 == true) {
startime = 30;
infchances = 4;
lvlgoal = 10;
infsped = 4;
gamelop.start(0, 99999);
gamelopplay = true;
lvlnarm = 3;
goalnum = 20;
minenum = 1;
} else if (level4 == true) {
startime = 30;
infchances = 9;
lvlgoal = 10;
infsped = 5;
gamelop.start(0, 99999);
gamelopplay = true;
lvlnarm = 4;
goalnum = 15;
minenum = 0;
snakeninc = 5;
ghostnum = 0;
prednum = 0;
} else if (level5 == true) {
startime = 30;
infchances = 1E29;
lvlgoal = 10;
infsped = 99999 /* 0x01869F */;
gamelop.start(0, 99999);
gamelopplay = true;
lvlnarm = 5;
goalnum = 15;
minenum = 40;
} else if (level6 == true) {
startime = 30;
infchances = 1E27;
lvlgoal = 2;
infsped = 9999;
gamelop2.start(0, 99999);
gamelop2play = true;
lvlnarm = 6;
goalnum = 5;
minenum = 0;
snakeninc = 1;
ghostnum = 1;
prednum = 0;
invulnerable = true;
snakespeed = 10;
ghostspeed = 6;
snakerot = 10;
} else if (level7 == true) {
startime = 30;
infchances = 1E25;
lvlgoal = 15;
infsped = 9999;
gamelop2.start(0, 99999);
gamelop2play = true;
lvlnarm = 7;
goalnum = 3;
minenum = 0;
snakeninc = 5;
ghostnum = 3;
prednum = 0;
invulnerable = true;
snakespeed = 5;
ghostspeed = 6;
} else if (level8 == true) {
snakeninc = 1;
prednum = 1;
ghostnum = 0;
startime = 60;
infchances = 9;
lvlgoal = 25;
infsped = 4;
gamelop2.start(0, 99999);
gamelop2play = true;
lvlnarm = 8;
goalnum = 25;
minenum = 10;
snakespeed = 5;
} else if (level9 == true) {
snakeninc = 6;
ghostnum = 3;
prednum = 1;
startime = 40;
infchances = 1E36;
lvlgoal = 15;
infsped = 99999 /* 0x01869F */;
gamelop2.start(0, 99999);
gamelop2play = true;
lvlnarm = 9;
goalnum = 5;
minenum = 5;
snakespeed = 5;
ghostspeed = 8;
} else if (level10 == true) {
snakeninc = 1;
prednum = 1;
snakespeed = 4;
startime = 30;
infchances = 1E20;
lvlgoal = 15;
infsped = 9999;
gamelop2.start(0, 99999);
gamelop2play = true;
lvlnarm = 10;
goalnum = 20;
minenum = 40;
} else if (level11 == true) {
snakeninc = 5;
prednum = 1;
ghostnum = 1;
startime = 30;
infchances = 1E25;
lvlgoal = 2;
infsped = 9999;
gamelop.start(0, 99999);
gamelopplay = true;
lvlnarm = 11;
goalnum = 10;
minenum = 5;
ghostspeed = 6;
snakespeed = 5;
predrot = 5;
snakerot = 12;
} else if (level12 == true) {
snakeninc = 5;
ghostnum = 2;
prednum = 1;
startime = 60;
infchances = 4;
lvlgoal = 10;
infsped = 2;
gamelop.start(0, 99999);
gamelopplay = true;
lvlnarm = 12;
minenum = 20;
goalnum = 5;
} else if (level13 == true) {
snakeninc = 6;
prednum = 1;
ghostnum = 0;
startime = 30;
infchances = 4;
lvlgoal = 15;
infsped = 1;
minenum = 10;
goalnum = 20;
gamelop3.start(0, 99999);
gamelop3play = true;
lvlnarm = 13;
} else if (level14 == true) {
snakeninc = 5;
ghostnum = 1;
prednum = 1;
startime = 30;
infchances = 20;
lvlgoal = 2;
infsped = 5;
gamelop3.start(0, 99999);
gamelop3play = true;
lvlnarm = 14;
minenum = 15;
goalnum = 10;
ghostspeed = 5;
snakerot = 8;
} else if (custom == true) {
snakeninc = (gnum + pnum) + snum;
ghostnum = gnum;
prednum = pnum;
startime = tlnum + 1;
if (cnum == 0) {
infchances = 1E32;
} else if (cnum == 1) {
infchances = 9;
} else if (cnum == 2) {
infchances = 4;
} else if (cnum == 3) {
infchances = 2;
} else {
infchances = 1;
}
lvlgoal = onum;
infsped = Math.round(rnum / 10);
gamelop.start(0, 99999);
gamelopplay = true;
minenum = mnum;
goalnum = tnum + 1;
ghostspeed = 7;
snakespeed = 5;
snakerot = 10;
predrot = 10;
}
othernom = prednum + ghostnum;
meta = 0;
while (meta < goalnum) {
_root.attachMovie("goalID", "goal" + meta, 50000000 + meta, {_x:(Math.random() * (Stage.width - 5)) + 2.5, _y:(Math.random() * (Stage.height - 45)) + 22.5});
meta++;
}
mini = 0;
while (mini < minenum) {
_root.attachMovie("mineID", "mine" + mini, 40000000 + mini, {_x:(Math.random() * (Stage.width - 5)) + 2.5, _y:(Math.random() * (Stage.height - 45)) + 22.5});
mini++;
}
k = 0;
while (k < 200) {
removeMovieClip(menumov["mpt" + k]);
k++;
}
timer = true;
timerup = false;
timerdown = true;
limit = 800;
if (timerdown == true) {
min = Math.floor(startime / 60);
sec = startime - (min * 60);
} else {
min = 0;
sec = 0;
}
initial = false;
initchecked = false;
}
if (paws == false) {
finalscore = (("maximum length" + maxscore) + " final length") + num;
if (timer == true) {
if (timerup == true) {
if (sec < 60) {
sec = sec + timechange;
} else {
min++;
sec = 0;
}
if (sec > 60) {
sec = 0;
min++;
}
}
if (timerdown == true) {
if (sec > 0) {
sec = sec - timechange;
} else {
min--;
sec = 59.999;
}
if ((Math.abs(min * 60) + sec) < 0) {
min = 0;
sec = 0;
msec = 0;
timerdown = false;
if (level4 == true) {
if ((snakeskild >= 5) && (showscore >= lvlgoal)) {
win();
} else {
losestring = "Snakes killed: " + snakeskild;
lose();
}
} else if (level6 == true) {
if (snakecompscore > 0) {
win();
} else {
losestring = "Ghost Final Length: " + snake1.num;
lose();
}
} else if (level11 == true) {
if (snakecompscore > 0) {
win();
} else {
losestring = "Ghost Final Length: " + snake1.num;
lose();
}
} else if (level13 == true) {
if ((snakeskild >= 5) && (showscore >= lvlgoal)) {
win();
} else {
losestring = "Snakes killed: " + snakeskild;
lose();
}
} else if (level14 == true) {
if (snakecompscore > 0) {
win();
} else {
losestring = "Ghost Final Length: " + snake1.num;
lose();
}
} else if (showscore >= lvlgoal) {
win();
} else if (showscore < lvlgoal) {
lose();
}
}
}
msec = Math.floor(100 * (sec - Math.floor(sec)));
if ((sec > 10) && (msec > 10)) {
time = (((min + ":") + Math.floor(sec)) + ":") + msec;
} else if ((sec > 10) && (msec < 10)) {
time = (((min + ":") + Math.floor(sec)) + ":0") + msec;
} else if ((sec < 10) && (msec > 10)) {
time = (((min + ":0") + Math.floor(sec)) + ":") + msec;
} else if ((sec < 10) && (msec < 10)) {
time = (((min + ":0") + Math.floor(sec)) + ":0") + msec;
}
}
if ((Math.floor((min * 60) + sec) == limit) && (timer == true)) {
timer = false;
}
thing.text = time;
triangle._x = pt0._x;
triangle._y = pt0._y;
triangle._rotation = ang;
if (snake.hitTest(pt0._x, pt0._y, true) == true) {
headhit = true;
} else {
headhit = false;
}
a = 0;
while (a < b) {
if (snake.hitTest(_root["laser" + a]._x, _root["laser" + a]._y, true) == true) {
laserhit = true;
} else {
laserhit = false;
}
a++;
}
k = 0;
while (k < meta) {
if (_root["goal" + k].hitTest(pt0._x, pt0._y, true) == true) {
_root.attachMovie("waves", "waves" + k, 300 + k, {_x:_root["goal" + k]._x, _y:_root["goal" + k]._y});
gamestring.start();
s = 1;
while (s < (snakenum + 1)) {
if (k == _root["snake" + s].goalrand) {
_root["snake" + s].anglechecked = false;
}
s++;
}
if (infnum == 0) {
snake.attachMovie("pt", "pt" + num, 150 + num, {_x:0, _y:0});
infrandom = Math.round(Math.random() * infchances);
if (((infrandom == infchances) && (num > 4)) && (level1 == false)) {
snake["pt" + num].infected = true;
inf = num;
infnum++;
}
} else if (infnum > 0) {
snake.attachMovie("pt", "pt" + num, 150 + num, {_x:0, _y:0});
snake["pt" + num].infected = true;
}
removeMovieClip(_root["goal" + k]);
_root.attachMovie("goalID", "goal" + k, 50000000 + k, {_x:(Math.random() * (Stage.width - 5)) + 2.5, _y:(Math.random() * (Stage.height - 45)) + 22.5});
score++;
k = meta;
}
k++;
}
num = score + startnum;
if (custom == true) {
_root.thing2.text = "Custom Level";
} else {
_root.thing2.text = "Level " + lvlnarm;
}
_root.thing3.text = "Length: " + showscore;
if (((level6 == true) || (level11 == true)) || (level14 == true)) {
_root.thing4.text = "Rival Length: " + (showscore - snakecompscore);
} else {
_root.thing4.text = "Goal Length: " + lvlgoal;
}
m = 0;
while (m < minenum) {
if (_root["mine" + m].hitTest(pt0._x, pt0._y, true) == true) {
_root.attachMovie("rtblowID", "mineb" + m, 40200000 + m, {_x:_root["mine" + m]._x, _y:_root["mine" + m]._y});
hitmine++;
removeMovieClip(_root["mine" + m]);
_root.attachMovie("mineID", "mine" + m, 40000000 + m, {_x:(Math.random() * (Stage.width - 5)) + 2.5, _y:(Math.random() * (Stage.height - 45)) + 22.5});
mineHit();
m = minenum;
}
m++;
}
num = score + startnum;
e = 0;
while (e < extranum) {
if (_root["extra" + e].hitTest(pt0._x, pt0._y, true) == true) {
gameextra.start();
_root.attachMovie("mineblowID", "extrablow" + e, 8000 + e, {_x:_root["extra" + e]._x, _y:_root["extra" + e]._y});
extraHit();
removeMovieClip(_root["extra" + e]);
}
e++;
}
showscore = ((score + startnum) - 1) - infnum;
if (showscore > maxscore) {
maxscore = showscore;
}
snakecompscore = showscore - (snake1.num - 1);
infnum = 0;
s = 1;
while (s < snakenum) {
s++;
}
p = 1;
while (p < num) {
chain(snake, p);
if (snake["pt" + p].infected == true) {
infnum++;
}
if (headhit == true) {
if (oldnum == 0) {
if ((Math.sqrt(Math.pow(pt0._x - snake["pt" + p]._x, 2) + Math.pow(pt0._y - snake["pt" + p]._y, 2)) < (pt0._width / 2)) && (p > 4)) {
gotHit();
}
}
}
s = 1;
while (s < snakenum) {
if (_root.snake.hitTest(_root["snake" + s].redhead._x, _root["snake" + s].redhead._y, true) == true) {
_root["snake" + s].enemyhit = true;
} else {
_root["snake" + s].enemyhit = false;
}
if ((_root["snake" + s].enemyhit == true) && (_root.oldnum == 0)) {
if (Math.sqrt(Math.pow(_root["snake" + s].redhead._x - snake["pt" + p]._x, 2) + Math.pow(_root["snake" + s].redhead._y - snake["pt" + p]._y, 2)) < (pt0._width / 2)) {
if (_root["snake" + s].ghost == false) {
gotHit();
} else if (_root["snake" + s].pred == true) {
gotHit();
}
}
_root["snake" + s].enemyhit = false;
}
s++;
}
a = 0;
while (a < b) {
if (oldnum == 0) {
if (Math.sqrt(Math.pow(_root["laser" + a]._x - snake["pt" + p]._x, 2) + Math.pow(_root["laser" + a]._y - snake["pt" + p]._y, 2)) < pt0._width) {
gotHit();
removeMovieClip(_root["laser" + a]);
}
}
a++;
}
p++;
}
if (snakenuminc == true) {
p = 1;
while (p < _root["snake" + _root.snakenum].num) {
_root["snake" + _root.snakenum].attachMovie("infpt", "ipoint" + p, 30000 + p, {_x:_root["array" + p][0] - _root["snake" + _root.snakenum]._x, _y:_root["array" + p][1] - _root["snake" + _root.snakenum]._y, _xscale:_root["array" + p][2], _yscale:_root["array" + p][3]});
p++;
}
_root.snakenum++;
_root.snakenom++;
snakenuminc = false;
}
if (snakeninc > 0) {
_root.createEmptyMovieClip("snake" + _root.snakenum, 30000 + _root.snakenum);
_root["snake" + _root.snakenum]._x = 0;
_root["snake" + _root.snakenum]._y = 0;
_root["snake" + _root.snakenum].ang = 0;
_root["snake" + _root.snakenum].oldnum = 0;
_root["snake" + _root.snakenum].anglechecked = false;
_root["snake" + _root.snakenum].attachMovie("redtriangleID", "redhead", 1, {_x:(Math.random() * (Stage.width - 5)) + 10, _y:(Math.random() * (Stage.height - 40)) + 20});
_root["snake" + _root.snakenum].num = 5;
_root["snake" + _root.snakenum].kild = false;
_root["snake" + _root.snakenum].enemyhit = false;
if (ghostnum > 0) {
_root["snake" + _root.snakenum].ghost = true;
_root["snake" + _root.snakenum].pred = false;
ghostnum--;
} else if (prednum > 0) {
_root["snake" + _root.snakenum].pred = true;
_root["snake" + _root.snakenum].ghost = true;
prednum--;
} else {
_root["snake" + _root.snakenum].pred = false;
_root["snake" + _root.snakenum].ghost = false;
}
snakenuminc = true;
snakeninc--;
}
if (snakenum > 1) {
s = 1;
while (s < (snakenum + 1)) {
_root["snake" + s].speed = 5;
if ((_root["snake" + s].ghost == true) && (_root["snake" + s].pred == false)) {
_root["snake" + s].redhead._x = _root["snake" + s].redhead._x + (ghostspeed * Math.cos(_root["snake" + s].ang));
_root["snake" + s].redhead._y = _root["snake" + s].redhead._y + (ghostspeed * Math.sin(_root["snake" + s].ang));
} else {
_root["snake" + s].redhead._x = _root["snake" + s].redhead._x + (snakespeed * Math.cos(_root["snake" + s].ang));
_root["snake" + s].redhead._y = _root["snake" + s].redhead._y + (snakespeed * Math.sin(_root["snake" + s].ang));
}
_root["snake" + s].redhead._rotation = _root["snake" + s].ang / deg2rad;
_root["snake" + s].headhit = false;
if (_root["snake" + s].hitTest(pt0._x, pt0._y, true) == true) {
_root["snake" + s].headhit = true;
}
g = 1;
while (g < _root["snake" + s].num) {
chainbad(_root["snake" + s], g);
g++;
}
k = 0;
while (k < meta) {
if (_root["goal" + k].hitTest(_root["snake" + s].redhead._x, _root["snake" + s].redhead._y, true) == true) {
gamestring.start();
_root.attachMovie("waves", "waves" + k, 300 + k, {_x:_root["goal" + k]._x, _y:_root["goal" + k]._y});
_root["snake" + s].dang = Math.atan2(_root["snake" + s]["ipoint" + (_root["snake" + s].num - 2)]._x - _root["snake" + s]["ipoint" + (_root["snake" + s].num - 1)]._x, _root["snake" + s]["ipoint" + (_root["snake" + s].num - 2)]._y - _root["snake" + s]["ipoint" + (_root["snake" + s].num - 1)]._y) / deg2rad;
_root["snake" + s].attachMovie("infpt", "ipoint" + _root["snake" + s].num, 30000 + _root["snake" + s].num, {_x:_root["snake" + s]["ipoint" + (_root["snake" + s].num - 1)]._x + Math.cos(_root["snake" + s].dang), _y:_root["snake" + s]["ipoint" + (_root["snake" + s].num - 1)]._y + Math.sin(_root["snake" + s].dang)});
removeMovieClip(_root["goal" + k]);
_root.attachMovie("goalID", "goal" + k, 50000000 + k, {_x:(Math.random() * (Stage.width - 5)) + 2.5, _y:(Math.random() * (Stage.height - 45)) + 22.5});
_root["snake" + s].num++;
s = 1;
while (s < (snakenum + 1)) {
if (k == _root["snake" + s].goalrand) {
_root["snake" + s].anglechecked = false;
}
s++;
}
}
k++;
}
if (GREATBIGDEAL == true) {
if (_root["snake" + s].ghost == false) {
m = 0;
while (m < minenum) {
if (_root["mine" + m].hitTest(_root["snake" + s].redhead._x, _root["snake" + s].redhead._y, true) == true) {
_root.attachMovie("rtblowID", "mineb" + m, 40200000 + m, {_x:_root["mine" + m]._x, _y:_root["mine" + m]._y});
infMineHit();
removeMovieClip(_root["mine" + m]);
_root.attachMovie("mineID", "mine" + m, 40000000 + m, {_x:(Math.random() * (Stage.width - 30)) + 15, _y:(Math.random() * (Stage.height - 30)) + 15});
m = minenum;
}
m++;
}
}
}
if ((_root["snake" + s].num < 2) && (_root["snake" + s].num != 0)) {
gamebing.start();
_root["snake" + s].attachMovie("rtblowID", "ipf", 3000, {_x:_root["snake" + s].redhead._x, _y:_root["snake" + s].redhead._y});
removeMovieClip(_root["snake" + s].redhead);
p = 0;
while (p < _root["snake" + s].num) {
_root["snake" + s]["ipoint" + p].dead = true;
p++;
}
_root["snake" + s].num = 0;
_root["snake" + s].kild = true;
snakenom--;
snakeskild++;
}
if (_root["snake" + s].kild == true) {
p = 1;
while (p < 20) {
_root["snake" + s]["ipoint" + p].dead = true;
p++;
}
}
if (_root["snake" + s].ghost == false) {
p = 1;
while (p < _root["snake" + s].num) {
if (_root["snake" + s].headhit == true) {
if (Math.sqrt(Math.pow(pt0._x - _root["snake" + s]["ipoint" + p]._x, 2) + Math.pow(pt0._y - _root["snake" + s]["ipoint" + p]._y, 2)) < pt0._width) {
gamebing.start();
_root["snake" + s].attachMovie("inpf", "ipf" + p, p + 3000, {_x:_root["snake" + s]["ipoint" + p]._x, _y:_root["snake" + s]["ipoint" + p]._y});
removeMovieClip(_root["snake" + s]["ipoint" + p]);
_root["snake" + s].oldnum = _root["snake" + s].num;
_root["snake" + s].num = p;
}
}
if (_root["snake" + s].oldnum == 0) {
a = 0;
while (a < b) {
if (Math.sqrt(Math.pow(_root["laser" + a]._x - _root["snake" + s]["ipoint" + p]._x, 2) + Math.pow(_root["laser" + a]._y - _root["snake" + s]["ipoint" + p]._y, 2)) < pt0._width) {
gamebing.start();
_root["snake" + s].attachMovie("inpf", "ipf" + p, p + 3000, {_x:_root["snake" + s]["ipoint" + p]._x, _y:_root["snake" + s]["ipoint" + p]._y});
removeMovieClip(_root["snake" + s]["ipoint" + p]);
removeMovieClip(_root["laser" + a]);
_root["snake" + s].oldnum = _root["snake" + s].num;
_root["snake" + s].num = p;
a = b;
}
a++;
}
}
p++;
}
}
if (_root["snake" + s].oldnum != 0) {
a = _root["snake" + s].num;
while (a < _root["snake" + s].oldnum) {
_root["snake" + s]["ipoint" + a].dead = true;
a++;
}
_root["snake" + s].oldnum = 0;
}
if (_root["snake" + s].anglechecked == false) {
_root["snake" + s].goalrand = Math.round(Math.random() * (goalnum - 1));
_root["snake" + s].idang = 90;
_root["snake" + s].anglechecked = true;
_root["snake" + s].init = (_root.min * 60) + _root.sec;
}
if (Math.abs(_root["snake" + s].init - ((_root.min * 60) + _root.sec)) > 4) {
_root["snake" + s].anglechecked = false;
}
if (_root["snake" + s].pred == false) {
_root["snake" + s].gx = _root["snake" + s].redhead._x - _root["goal" + _root["snake" + s].goalrand]._x;
_root["snake" + s].gy = _root["snake" + s].redhead._y - _root["goal" + _root["snake" + s].goalrand]._y;
}
if (_root["snake" + s].pred == true) {
if (_root.num > 1) {
_root["snake" + s].idang = (-Math.atan2(_root["snake" + s].redhead._x - snake["pt" + (_root.num - 1)]._x, _root["snake" + s].redhead._y - snake["pt" + (_root.num - 1)]._y)) - (Math.PI/2);
} else if (_root.num == 1) {
_root["snake" + s].idang = (-Math.atan2(_root["snake" + s].redhead._x - pt0._x, _root["snake" + s].redhead._y - pt0._y)) - (Math.PI/2);
}
enemyrot = predrot;
} else {
enemyrot = snakerot;
}
if ((Math.abs(_root["snake" + s].ang - _root["snake" + s].idang) / deg2rad) > 1) {
if (_root["snake" + s].pred == false) {
_root["snake" + s].idang = (-Math.atan2(_root["snake" + s].gx, _root["snake" + s].gy)) - (Math.PI/2);
}
if (_root["snake" + s].ang < 0) {
_root["snake" + s].ang = _root["snake" + s].ang + (360 * deg2rad);
}
if (_root["snake" + s].idang < 0) {
_root["snake" + s].idang = _root["snake" + s].idang + (360 * deg2rad);
}
if (_root["snake" + s].ang >= (360 * deg2rad)) {
_root["snake" + s].ang = 0;
}
if (_root["snake" + s].idang >= (360 * deg2rad)) {
_root["snake" + s].idang = 0;
}
if (_root["snake" + s].ang < _root["snake" + s].idang) {
if (Math.abs(_root["snake" + s].ang - _root["snake" + s].idang) < (180 * deg2rad)) {
_root["snake" + s].ang = _root["snake" + s].ang + (enemyrot * deg2rad);
} else {
_root["snake" + s].ang = _root["snake" + s].ang - (enemyrot * deg2rad);
}
} else if (_root["snake" + s].ang > _root["snake" + s].idang) {
if (Math.abs(_root["snake" + s].ang - _root["snake" + s].idang) < (180 * deg2rad)) {
_root["snake" + s].ang = _root["snake" + s].ang - (enemyrot * deg2rad);
} else {
_root["snake" + s].ang = _root["snake" + s].ang + (enemyrot * deg2rad);
}
}
} else {
_root["snake" + s].ang = _root["snake" + s].idang;
}
s++;
}
}
if (infnum > 0) {
if (infchecked == false) {
inftimeinit = (min * 60) + sec;
infchecked = true;
}
if (Math.abs(((min * 60) + sec) - inftimeinit) > infsped) {
snake["pt" + (inf - 1)].infected = true;
inf = inf - 1;
infnum++;
infchecked = false;
}
} else if (infnum == 0) {
inf = 0;
infchecked = false;
}
if (keys == true) {
if (Key.isDown(39)) {
ang = ang + rot;
} else if (Key.isDown(68)) {
ang = ang + rot;
}
if (Key.isDown(37)) {
ang = ang - rot;
} else if (Key.isDown(65)) {
ang = ang - rot;
}
} else if (mouse == true) {
idang = ((-Math.atan2(_xmouse - pt0._x, _ymouse - pt0._y)) / deg2rad) + 90;
if (idang < 0) {
idang = idang + 360;
}
if (idang >= 360) {
idang = 0;
}
if (Math.abs(ang - idang) > 10) {
if (ang < idang) {
if (Math.abs(ang - idang) < 180) {
ang = ang + rot;
} else {
ang = ang - rot;
}
} else if (ang > idang) {
if (Math.abs(ang - idang) < 180) {
ang = ang - rot;
} else {
ang = ang + rot;
}
}
} else {
ang = idang;
}
}
if (Key.isDown(32)) {
spbtncheck = true;
if (shot == false) {
gamebong.start();
if (b > 5) {
b = 0;
}
lasername = "laser" + b;
laserdepth = 4000 + b;
_root.createEmptyMovieClip(lasername, laserdepth);
_root["laser" + b].moveTo((-laserlength) / 2, 0);
_root["laser" + b].lineStyle(2, 16777215, 100);
_root["laser" + b].lineTo(laserlength / 2, 0);
_root["laser" + b]._x = pt0._x;
_root["laser" + b]._y = pt0._y;
_root["laser" + b]._rotation = ang;
_root["laser" + b].ang = ang;
_root["laser" + b].ric = 0;
_root["laser" + b].speed = 1;
shotinit = (min * 60) + sec;
shot = true;
b++;
}
}
if (ang < 0) {
ang = ang + 360;
}
if ((ang >= 360) || (ang <= -360)) {
ang = 0;
}
if (Math.abs(((min * 60) + sec) - shotinit) >= 0.5) {
shot = false;
shotinit = 0;
}
j = 0;
while (j < 2) {
_root["infshot" + j].speed = 1;
_root["infshot" + j]._x = _root["infshot" + j]._x + ((15 * Math.cos(deg2rad * _root["infshot" + j].ang)) * _root["infshot" + j].speed);
_root["infshot" + j]._y = _root["infshot" + j]._y + ((15 * Math.sin(deg2rad * _root["infshot" + j].ang)) * _root["infshot" + j].speed);
_root["infshot" + j]._rotation = _root["infshot" + j].ang;
if ((((_root["infshot" + j]._x < 0) || (_root["infshot" + j]._x > Stage.width)) || (_root["infshot" + j]._y < 20)) || (_root["infshot" + j]._y > (Stage.height - 20))) {
attachMovie("redexp", "redexp" + j, 4020 + j, {_x:_root["infshot" + j]._x, _y:_root["infshot" + j]._y});
removeMovieClip(_root["infshot" + j]);
}
if (oldnum == 0) {
p = 0;
while (p < num) {
if (Math.sqrt(Math.pow(_root["infshot" + j]._x - snake["pt" + p]._x, 2) + Math.pow(_root["infshot" + j]._y - snake["pt" + p]._y, 2)) < pt0._width) {
gamebing.start();
_root.attachMovie("pf", "pf" + p, p + 1000, {_x:snake["pt" + p]._x, _y:snake["pt" + p]._y});
if (snake["pt" + p].infected == true) {
infnum--;
}
removeMovieClip(snake["pt" + p]);
_root.oldnum = _root.num;
_root.num = p;
newinfnum = 0;
score = _root.num - startnum;
j = 2;
}
p++;
}
}
j++;
}
laze = 0;
while (laze < 6) {
if ((((_root["laser" + laze]._x < 0) || (_root["laser" + laze]._x > Stage.width)) || (_root["laser" + laze]._y < 20)) || (_root["laser" + laze]._y > (Stage.height - 20))) {
gametic.start();
if (_root["laser" + laze].ric == 1) {
attachMovie("exp", "exp" + laze, 4000 + laze, {_x:_root["laser" + laze]._x, _y:_root["laser" + laze]._y});
removeMovieClip(_root["laser" + laze]);
}
if (_root["laser" + laze]._x < 0) {
_root["laser" + laze]._x = 0;
if ((_root["laser" + laze].ang > 170) && (_root["laser" + laze].ang < 190)) {
attachMovie("exp", "exp" + laze, 4000 + laze, {_x:_root["laser" + laze]._x, _y:_root["laser" + laze]._y});
removeMovieClip(_root["laser" + laze]);
}
_root["laser" + laze].ang = _root["laser" + laze].ang + 180;
_root["laser" + laze].ang = _root["laser" + laze].ang * -1;
_root["laser" + laze].speed = 0.7;
_root["laser" + laze].ric++;
} else if (_root["laser" + laze]._x > Stage.width) {
_root["laser" + laze]._x = Stage.width;
if ((_root["laser" + laze].ang > 350) || (_root["laser" + laze].ang < 10)) {
attachMovie("exp", "exp" + laze, 4000 + laze, {_x:_root["laser" + laze]._x, _y:_root["laser" + laze]._y});
removeMovieClip(_root["laser" + laze]);
}
_root["laser" + laze].ang = _root["laser" + laze].ang + 180;
_root["laser" + laze].ang = _root["laser" + laze].ang * -1;
_root["laser" + laze].speed = 0.7;
_root["laser" + laze].ric++;
} else if (_root["laser" + laze]._y < 20) {
_root["laser" + laze]._y = 20;
if ((_root["laser" + laze].ang > 250) && (_root["laser" + laze].ang < 280)) {
attachMovie("exp", "exp" + laze, 4000 + laze, {_x:_root["laser" + laze]._x, _y:_root["laser" + laze]._y});
removeMovieClip(_root["laser" + laze]);
}
_root["laser" + laze].ang = _root["laser" + laze].ang + 360;
_root["laser" + laze].ang = _root["laser" + laze].ang * -1;
_root["laser" + laze].speed = 0.7;
_root["laser" + laze].ric++;
} else if (_root["laser" + laze]._y > (Stage.height - 20)) {
_root["laser" + laze]._y = Stage.height - 20;
if ((_root["laser" + laze].ang > 80) && (_root["laser" + laze].ang < 100)) {
attachMovie("exp", "exp" + laze, 4000 + laze, {_x:_root["laser" + laze]._x, _y:_root["laser" + laze]._y});
removeMovieClip(_root["laser" + laze]);
}
_root["laser" + laze].ang = _root["laser" + laze].ang + 360;
_root["laser" + laze].ang = _root["laser" + laze].ang * -1;
_root["laser" + laze].speed = 0.7;
_root["laser" + laze].ric++;
}
}
_root["laser" + laze]._x = _root["laser" + laze]._x + ((laserspeed * Math.cos(deg2rad * _root["laser" + laze].ang)) * _root["laser" + laze].speed);
_root["laser" + laze]._y = _root["laser" + laze]._y + ((laserspeed * Math.sin(deg2rad * _root["laser" + laze].ang)) * _root["laser" + laze].speed);
_root["laser" + laze]._rotation = _root["laser" + laze].ang;
laze++;
}
if (triangle._x < 5) {
pt0._x = 6;
if ((ang > 90) && (ang < 180)) {
ang = 89;
} else if ((ang < 270) && (ang >= 180)) {
ang = 271;
}
} else if (triangle._x > (Stage.width - 5)) {
pt0._x = Stage.width - 6;
if (((ang > 270) && (ang < 360)) || (ang == 0)) {
ang = 269;
} else if ((ang > 0) && (ang < 90)) {
ang = 91;
}
} else if (triangle._y < 25) {
pt0._y = 26;
if ((ang > 270) && (ang < 360)) {
ang = 1;
} else if ((ang <= 270) && (ang > 180)) {
ang = 179;
}
} else if (triangle._y > (Stage.height - 25)) {
pt0._y = Stage.height - 26;
if ((ang > 90) && (ang < 180)) {
ang = 181;
} else if ((ang <= 90) && (ang > 0)) {
ang = 359;
}
}
barout.barinbar._xscale = slowamount;
if (slowamount <= 0) {
if (slowed == true) {
snakespeed = snakespeed * 2;
ghostspeed = ghostspeed * 2;
laserspeed = 15;
rot = 10;
speed = speedstart + 3.5;
slowed = false;
timechange = 0.03333;
}
overage = true;
}
if (overage == true) {
if (slowamount < 100) {
slowamount = slowamount + 1;
} else {
slowamount = 100;
}
}
if (Key.isDown(16)) {
sbtncheck = true;
if (speedchange == false) {
speed = speedstart;
snakespeed = snakespeed / 2;
ghostspeed = ghostspeed / 2;
speedchange = true;
laserspeed = 7.5;
timechange = 0.016665;
slowed = true;
rot = 8;
}
if ((overage == false) || (overage == undefined)) {
if (slowamount > 0) {
slowamount = slowamount - 1;
} else {
slowamount = 0;
}
}
} else {
overage = false;
if (slowamount < 100) {
slowamount = slowamount + 1;
} else {
slowamount = 100;
}
speedchange = false;
if (slowed == true) {
snakespeed = snakespeed * 2;
ghostspeed = ghostspeed * 2;
slowed = false;
}
timechange = 0.03333;
laserspeed = 15;
rot = 10;
speed = speedstart + 3.5;
}
pt0._x = pt0._x + (speed * Math.cos(deg2rad * ang));
pt0._y = pt0._y + (speed * Math.sin(deg2rad * ang));
if (oldnum != 0) {
a = num;
while (a < oldnum) {
snake["pt" + a].dead = true;
if (snake["pt" + a].infected == true) {
snake["pt" + a].num = snake["pt" + a].num - num;
if (leaderchecked == false) {
_root.newnum = snake["pt" + a].num;
snake["pt" + a].leader = true;
leaderchecked = true;
} else {
snake["pt" + a].leader = false;
}
newinfnum++;
}
a++;
}
leaderchecked = false;
oldnum = 0;
}
}
if ((((wind == false) && (losed == false)) && (manu == false)) && (lvlinfo == false)) {
if (paws == false) {
extrarandom = Math.round(Math.random() * 300);
if (extrarandom == 300) {
_root.attachMovie("extraID", "extra" + extranum, 30000000 + extranum, {_x:(Math.random() * (Stage.width - 5)) + 2.5, _y:(Math.random() * (Stage.height - 45)) + 22.5});
extranum++;
}
}
corncov._visible = true;
if (keys == true) {
cursor._visible = false;
cursor._rotation = 0;
} else if (mouse == true) {
cursor._visible = true;
cursor._rotation = ang;
}
if (Key.isDown(82)) {
uninitialize();
lvlinfo = true;
}
if (Key.isDown(27)) {
uninitialize();
manu = true;
level1 = false;
level2 = false;
level3 = false;
level4 = false;
level5 = false;
level6 = false;
level7 = false;
level8 = false;
level9 = false;
level10 = false;
level11 = false;
level12 = false;
level13 = false;
level14 = false;
if (custom == true) {
customchoices = true;
}
custom = false;
}
if ((Key.isDown(80) && (paws == false)) && (btncheck == true)) {
e = 0;
while (e < extranum) {
_root["extra" + e].stop();
e++;
}
paws = true;
gamelop2.stop();
gamelop.stop();
gamelop3.stop();
lengthgoal._visible = true;
lengthgoal.text = "Paused";
btncheck = false;
} else if ((Key.isDown(80) && (paws == true)) && (btncheck == true)) {
e = 0;
while (e < extranum) {
_root["extra" + e].play();
e++;
}
paws = false;
if (gamelop2play == true) {
gamelop2.start(0, 99999);
} else if (gamelopplay == true) {
gamelop.start(0, 99999);
} else if (gamelop3play == true) {
gamelop3.start(0, 99999);
}
lengthgoal._visible = false;
btncheck = false;
}
if (Key.isDown(80)) {
backdown = true;
} else {
backdown = false;
btncheck = true;
}
} else {
cursor._rotation = 0;
cursor._visible = true;
shot = true;
}
if (Key.isDown(32)) {
} else {
spbtncheck = false;
}
num = score + startnum;
if ((snakeninc == 0) && (snakenuminc == false)) {
if (snakenom == 0) {
snakenum = 1;
} else if (snakenom == othernom) {
snakenum = othernom + 1;
}
}
}
};
Symbol 9 MovieClip [pf] Frame 30
removeMovieClip(this);
Symbol 14 MovieClip [exp] Frame 5
removeMovieClip(this);
Symbol 16 MovieClip [menupoint] Frame 1
this.groove = new Color(this);
this.onEnterFrame = function () {
this._y = this._y + (0.01 * this._xscale);
if (this._y > (Stage.height + 10)) {
this._y = -10;
this._alpha = 100;
}
};
Symbol 20 MovieClip [ipt] Frame 1
this.vely = 0;
this.onEnterFrame = function () {
if (this._y < (Stage.height - 12.95)) {
this.vely = this.vely + _root.gravity;
this._y = this._y + vely;
} else {
this._y = Stage.height - 12.95;
_root.gamebing.start();
j = 0;
while (j < 2) {
_root.createEmptyMovieClip("infshot" + j, 20000 + j);
_root["infshot" + j].moveTo(-2.5, 0);
_root["infshot" + j].lineStyle(2, 13632002, 100);
_root["infshot" + j].lineTo(2.5, 0);
_root["infshot" + j]._x = this._x;
_root["infshot" + j]._y = this._y;
if (j == 0) {
_root["infshot" + j].ang = 225;
} else if (j == 1) {
_root["infshot" + j].ang = 315;
}
infshotnum = 3;
j++;
}
removeMovieClip(this);
}
};
Symbol 25 MovieClip [redexp] Frame 5
removeMovieClip(this);
Symbol 29 MovieClip [redtriangleID] Frame 1
this.stop();
this.onEnterFrame = function () {
if ((_parent.ghost == true) && (_parent.pred == true)) {
this.gotoAndStop(3);
} else if ((_parent.ghost == true) && (_parent.pred == false)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
};
Symbol 33 MovieClip [infpt] Frame 1
this.vely = 0;
this.dead = false;
this.stop();
this.onEnterFrame = function () {
if (this.dead == true) {
this._alpha = this._alpha - ((1 / this.num) * 50);
if (this._alpha < 70) {
_root.gamebing.start();
_root.attachMovie("inpf", "inpf" + this.num, 6000 + this.num, {_x:this._x, _y:this._y});
removeMovieClip(this);
}
}
if ((_parent.ghost == true) && (_parent.pred == true)) {
this.gotoAndStop(3);
} else if ((_parent.ghost == true) && (_parent.pred == false)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (_parent.kild == true) {
this.dead = true;
}
};
Symbol 36 MovieClip [waves] Frame 13
removeMovieClip(this);
Symbol 40 MovieClip [extraID] Frame 101
removeMovieClip(this);
Symbol 46 MovieClip [inpf] Frame 30
removeMovieClip(this);
Symbol 55 MovieClip [mineblowID] Frame 30
removeMovieClip(this);
Symbol 64 MovieClip [rtblowID] Frame 30
removeMovieClip(this);
Symbol 303 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 304 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.35");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static function addLinkEvent(url, burl, btn, onClick) {
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
var _local3;
var _local2 = new LoadVars();
var timeout = 1500;
var t0 = getTimer();
var ping = this.createEmptyMovieClip("ping", 777);
this.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
delete this.ping;
getURL (url + s, "_blank");
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
delete this.ping;
getURL (burl, "_blank");
}
};
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
if (onClick != undefined) {
onClick();
}
};
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 305 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 85 MovieClip [pt] Frame 1
stop();
this.vely = 0;
this.grav = _root.gravity;
this.checked = false;
this.dead = false;
if (this.infected == undefined) {
this.infected = false;
}
this.hitcircle._xscale = 100 / (this._xscale / 100);
this.hitcircle._yscale = 100 / (this._yscale / 100);
this.onEnterFrame = function () {
if (this.dead == true) {
if (this.infected == false) {
this._alpha = this._alpha - ((1 / (this.num - _root.num)) * 50);
if (this._alpha < 80) {
_root.gamebing.start();
_root.attachMovie("pf", "pf" + this.num, 5000 + this.num, {_x:this._x, _y:this._y});
removeMovieClip(this);
}
} else if (this.infected == true) {
if ((this.checked == false) && (_root.infnum > 0)) {
_root.infnum--;
this.checked = true;
}
if (_root.newinfnum == 1) {
_root.attachMovie("ipt", "ipt", 10000, {_x:this._x, _y:this._y, _xscale:this._xscale, _yscale:this._yscale});
removeMovieClip(this);
} else if (_root.newinfnum > 1) {
if (this.leader == true) {
_root.createEmptyMovieClip("snake" + _root.snakenum, 30000 + _root.snakenum);
_root["snake" + _root.snakenum]._x = 0;
_root["snake" + _root.snakenum]._y = 0;
_root["snake" + _root.snakenum].ang = 0;
_root["snake" + _root.snakenum].oldnum = 0;
_root["snake" + _root.snakenum].anglechecked = false;
_root["snake" + _root.snakenum].attachMovie("redtriangleID", "redhead", 1, {_x:this._x, _y:this._y});
_root["snake" + _root.snakenum].num = _root.newinfnum;
_root["snake" + _root.snakenum].kild = false;
_root["snake" + _root.snakenum].ghost = false;
_root["snake" + _root.snakenum].pred = false;
_root["snake" + _root.snakenum].enemyhit = false;
removeMovieClip(this);
} else if (this.leader == false) {
_root["array" + (this.num - _root.newnum)] = [this._x, this._y, this._xscale, this._yscale];
removeMovieClip(this);
}
snakenuminc = true;
}
}
}
if (this.num > _root.num) {
this.dead = true;
}
if (this.infected == true) {
this.gotoAndStop(2);
} else if (this.infected == false) {
this.gotoAndStop(1);
}
};
Symbol 164 MovieClip Frame 1
stop();
Symbol 181 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level1 = true;
_root.levelnom = 1;
_root.lvlinfo = true;
};
if (_root.levelnum == 1) {
this._alpha = 100;
} else {
this._alpha = 60;
}
};
Symbol 183 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 2) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level2 = true;
_root.levelnom = 2;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 2) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 2) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level2 = true;
_root.levelnom = 2;
_root.lvlinfo = true;
};
}
};
Symbol 185 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 3) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level3 = true;
_root.levelnom = 3;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 3) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 3) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level3 = true;
_root.levelnom = 3;
_root.lvlinfo = true;
};
}
};
Symbol 187 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 4) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level4 = true;
_root.levelnom = 4;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 4) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 4) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level4 = true;
_root.levelnom = 4;
_root.lvlinfo = true;
};
}
};
Symbol 189 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 5) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level5 = true;
_root.levelnom = 5;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 5) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 5) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level5 = true;
_root.levelnom = 5;
_root.lvlinfo = true;
};
}
};
Symbol 191 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 6) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level6 = true;
_root.levelnom = 6;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 6) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 6) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level6 = true;
_root.levelnom = 6;
_root.lvlinfo = true;
};
}
};
Symbol 193 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 7) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level7 = true;
_root.levelnom = 7;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 7) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 7) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level7 = true;
_root.levelnom = 7;
_root.lvlinfo = true;
};
}
};
Symbol 195 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 8) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level8 = true;
_root.levelnom = 8;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 8) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 8) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level8 = true;
_root.levelnom = 8;
_root.lvlinfo = true;
};
}
};
Symbol 197 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 9) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level9 = true;
_root.levelnom = 9;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 9) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 9) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level9 = true;
_root.levelnom = 9;
_root.lvlinfo = true;
};
}
};
Symbol 199 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 10) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level10 = true;
_root.levelnom = 10;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 10) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 10) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level10 = true;
_root.levelnom = 10;
_root.lvlinfo = true;
};
}
};
Symbol 201 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 11) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level11 = true;
_root.levelnom = 11;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 11) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 11) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level11 = true;
_root.levelnom = 11;
_root.lvlinfo = true;
};
}
};
Symbol 203 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 12) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level12 = true;
_root.levelnom = 12;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 12) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 12) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level12 = true;
_root.levelnom = 12;
_root.lvlinfo = true;
};
}
};
Symbol 205 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 13) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level13 = true;
_root.levelnom = 13;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 13) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 13) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level13 = true;
_root.levelnom = 13;
_root.lvlinfo = true;
};
}
};
Symbol 207 MovieClip Frame 1
this._alpha = 60;
this.onEnterFrame = function () {
this._rotation = -_parent._rotation;
if (_root.levelnum > 14) {
this._alpha = 60;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level14 = true;
_root.levelnom = 14;
_root.lvlinfo = true;
};
} else if (_root.levelnum < 14) {
this._alpha = 15;
delete this.onPress;
}
if (_root.levelnum == 14) {
this._alpha = 100;
this.onPress = function () {
_root.manu = false;
k = 0;
while (k < 200) {
_root.removeMovieClip(_root.menumov["mpt" + k]);
k++;
}
_root.level14 = true;
_root.levelnom = 14;
_root.lvlinfo = true;
};
}
};