Frame 1
Stage.height = 500;
Stage.width = 700;
i = -16734;
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:166, td:"166.memecounter.com"};
System.security.allowDomain(kv_mc.kv_v.td);
kv_mc.kv_v.c_so = SharedObject.getLocal(kv_mc.kv_v.c, "/");
kv_mc.kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_mc.kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_mc.kv_v.lurl = ((((((((((("http://" + kv_mc.kv_v.td) + "/tracker.php") + "?c=") + kv_mc.kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_mc.kv_v.d) + "&u=") + (kv_mc.kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_mc.kv_v.fpv;
kv_mc.kv_v.c_so.data.u = true;
kv_mc.kv_v.c_so.flush();
kv_mc.kv_v.t_mc = kv_mc.createEmptyMovieClip("kv_tracker", i - 1);
kv_mc.kv_v.l_mcl = new MovieClipLoader();
if (kv_mc.kv_v.l_mcl.loadClip) {
kv_mc.kv_v.l_mcl.loadClip(kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
} else {
loadMovie (kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
}
Frame 2
function tvc_tracker(url, media_id, format) {
tvc_lv = new LoadVars();
tvc_lv.media = media_id;
tvc_lv.f = format;
trace("media: " + media_id);
return(tvc_lv.sendAndLoad(url, tvc_lv, "get"));
}
stop();
System.security.allowDomain(_parent.url);
strUrl = ((url != null) ? (url) : "http://www.viralchart.com");
_root.tvc_media = 681;
if ((_root.tvc_media != null) && (_root.tvc_media != "")) {
_root.tvc_media = (tvc_tracker(strUrl + "/tracker.php", _root.tvc_media, "F") ? null : (_root.tvc_media));
}
Frame 36
global_snd = new Sound(this);
mute = false;
sound_mc.onPress = function () {
if (!mute) {
mute = true;
global_snd.setVolume(0);
this.gotoAndStop(30);
} else {
mute = false;
global_snd.setVolume(100);
this.gotoAndPlay(1);
}
};
stop();
Frame 37
stop();
Frame 47
gotoAndStop ("beginGame");
Symbol 16 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 1
preloader = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local5 = Math.ceil((_local4 / _local3) * 100);
loaderBar_mc.gotoAndStop(_local5);
if (_local4 == _local3) {
clearInterval(preloaderINT);
_parent.play();
}
};
preloaderINT = setInterval(preloader, 40);
Symbol 33 MovieClip Frame 62
stop();
Symbol 36 MovieClip Frame 174
_root.play();
trace("END");
Symbol 36 MovieClip Frame 175
stop();
Symbol 40 MovieClip Frame 65
stop();
Symbol 41 MovieClip Frame 2
stop();
Instance of Symbol 4 MovieClip in Symbol 41 MovieClip Frame 2
onClipEvent (load) {
this._width = Stage.width;
this._height = Stage.height;
}
Instance of Symbol 6 MovieClip in Symbol 41 MovieClip Frame 2
onClipEvent (load) {
this._width = Stage.width;
this._height = (Stage.height / 5) * 4;
}
Instance of Symbol 8 MovieClip in Symbol 41 MovieClip Frame 2
onClipEvent (load) {
this._width = Stage.width;
this._y = Stage.height / 2;
}
Instance of Symbol 26 MovieClip in Symbol 41 MovieClip Frame 2
onClipEvent (load) {
this._x = Stage.width / 2;
this._y = Stage.height / 2;
}
Symbol 41 MovieClip Frame 3
stop();
Instance of Symbol 34 MovieClip in Symbol 41 MovieClip Frame 3
onClipEvent (load) {
this._x = Stage.width / 2;
this._y = Stage.height / 2;
}
Instance of Symbol 36 MovieClip in Symbol 41 MovieClip Frame 3
onClipEvent (load) {
this._x = Stage.width / 2;
this._y = Stage.height / 2;
}
Instance of Symbol 40 MovieClip in Symbol 41 MovieClip Frame 3
onClipEvent (load) {
this._x = Stage.width / 2;
this._y = (Stage.height / 2) + 60;
}
Symbol 150 MovieClip Frame 80
stop();
Symbol 161 Button
on (release) {
play();
}
Symbol 162 Button
on (release) {
play();
}
Symbol 163 Button
on (release) {
gotoAndStop ("game");
}
Symbol 164 MovieClip Frame 41
stop();
Symbol 164 MovieClip Frame 61
_root.gotoAndStop("game");
Symbol 171 Button
on (release) {
getURL ("http://www.kokodigital.co.uk", _blank);
}
Symbol 175 MovieClip Frame 28
gotoAndPlay ("beginLoop");
Symbol 179 MovieClip Frame 20
gotoAndPlay (1);
Symbol 179 MovieClip Frame 29
stop();
Symbol 185 MovieClip Frame 19
stop();
Symbol 189 Button
on (release) {
getURL ("http://www.fetchnstretch.co.uk/recommend", _blank);
}
Symbol 191 MovieClip Frame 25
stop();
Symbol 206 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 10
stop();
Symbol 214 MovieClip Frame 20
stop();
Symbol 214 MovieClip Frame 30
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 10
stop();
Symbol 220 MovieClip Frame 20
stop();
Symbol 220 MovieClip Frame 30
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 10
stop();
Symbol 224 MovieClip Frame 20
stop();
Symbol 224 MovieClip Frame 30
stop();
Symbol 225 MovieClip Frame 1
stop();
Instance of Symbol 207 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 225 MovieClip Frame 20
if (!setFrame) {
this.whatFrame = 26 + Math.ceil(Math.random() * 12);
setFrame = true;
}
gotoAndPlay(this.whatFrame);
Symbol 225 MovieClip Frame 26
play();
Symbol 225 MovieClip Frame 38
if (!_parent.gameOver) {
gotoAndPlay (26);
}
stop();
Instance of Symbol 207 MovieClip in Symbol 231 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 207 MovieClip in Symbol 234 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 234 MovieClip Frame 25
stop();
Instance of Symbol 207 MovieClip in Symbol 239 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 239 MovieClip Frame 28
stop();
Symbol 240 MovieClip Frame 1
_root.collected = 0;
Symbol 240 MovieClip Frame 90
cityfloor = function () {
r0 = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
r1 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r2 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r3 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r4 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r5 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r6 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r7 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r8 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r9 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r10 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r11 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r12 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r13 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r14 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r15 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r16 = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
r17 = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
};
rows = 18;
cols = 18;
floorStart_x = 350;
floorStart_y = 190;
tileWidth = 18;
tileHeight = 9;
showTiles = false;
numberOfTiles = 0;
depthOffset = 400;
spritesCollected = 0;
buildFloor = function () {
var _local11 = tileWidth;
var _local10 = tileHeight;
r = 0;
while (r < rows) {
var _local9 = floorStart_x - (r * _local11);
var _local8 = floorStart_y + (r * _local10);
c = 0;
while (c < cols) {
var _local5 = ((r * rows) + 1) + c;
var _local6 = "tile" + _local5;
var _local7 = "floor" + _local5;
var _local3 = this["r" + r][c];
this[_local6] = {};
var _local2 = this[_local6];
_local2.depth = _local5;
_local2.x = _local9 + (c * _local11);
_local2.y = _local8 + (c * _local10);
_local2.row = r;
_local2.col = c;
_local2.free = true;
_local2.cont = false;
numberOfTiles++;
if (_local3.doorway == 2) {
_local2.cont = true;
_local2.room = _local3.room;
_local2.doorTarget = _local3.targ;
}
if (_local3 == 1) {
_local2.free = false;
}
if (showTiles) {
duplicateMovieClip (floorTile_mc, _local7, _local5 + 200);
var _local4 = this[_local7];
_local4._x = _local2.x;
_local4._y = _local2.y;
_local4.tileName = _local2.depth;
if (_local3 == 1) {
_local4._visible = false;
}
}
c++;
}
r++;
}
};
cityfloor();
buildFloor();
setExpand = function () {
expandBlock = false;
while (!expandBlock) {
var _local3 = Math.ceil(Math.random() * (numberOfTiles - 1));
var _local4 = (_local3 * 20) + 2;
var _local2 = this["tile" + _local3];
if (_local2.free && (!_local2.expand)) {
expandBlock = true;
_local2.expand = true;
collect_mc._x = _local2.x;
collect_mc._y = _local2.y;
collect_mc.swapDepths(_local4);
trace(_local3);
}
}
};
noOfCones = 0;
placeCone = function () {
expandCone = false;
while (!expandCone) {
var _local3 = Math.ceil(Math.random() * numberOfTiles);
var _local6 = (_local3 * 20) + 3;
var _local2 = this["tile" + _local3];
if (_local2.free && (!_local2.expand)) {
noOfCones++;
var _local4 = ("cone" + noOfCones) + "_mc";
expandCone = true;
_local2.free = false;
duplicateMovieClip (cone_mc, _local4, _local6);
var _local5 = this[_local4];
_local5._x = _local2.x;
_local5._y = _local2.y;
trace("CONE PLACED");
}
}
};
setExpand();
char0 = {};
char0.speed = 7;
char0.speed_x = 0;
char0.speed_y = 0;
char0.dir = 1;
char0.currentTile = 299;
char0.nextTile = 298;
steps = 0;
difficulty = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50];
coneSteps = 0;
coneDiff = 5;
gameOver = false;
moveHead = function () {
currentTile = this["tile" + char0.nextTile];
char0_mc._x = currentTile.x;
char0_mc._y = currentTile.y;
var _local3 = nextTile();
var _local4 = this["tile" + _local3];
_local4.dir = snakeArray[0].dir;
checkSnakeCollision();
if (_local4.free) {
if (currentTile.expand) {
points = points + collectPoints;
yipee_snd.start();
spritesCollected++;
_root.collected = spritesCollected;
star_mc._x = collect_mc._x;
star_mc._y = collect_mc._y;
star_mc.gotoAndPlay(1);
coneSteps++;
if (coneSteps == coneDiff) {
trace("RUNCONES");
placeCone();
coneSteps = 0;
}
setExpand();
buildSnake();
currentTile.expand = false;
if (char0.speed > 3) {
d = 0;
while (d <= difficulty.length) {
if (spritesCollected == difficulty[d]) {
char0.speed--;
}
d++;
}
}
}
defineSnakePos();
var _local6 = _local4.x - this["tile" + snakeArray[0].nextTile].x;
var _local5 = _local4.y - this["tile" + snakeArray[0].nextTile].y;
snakeArray[0].speed_x = _local6 / snakeArray[0].speed;
snakeArray[0].speed_y = _local5 / snakeArray[0].speed;
currentTile.nextTile = _local3;
snakeArray[0].prevTile = char0.nextTile;
snakeArray[0].nextTile = _local3;
char0_mc.swapDepths((_local3 * 20) + 1);
steps = snakeArray[0].speed;
} else {
_root.gameOver_mc.gotoAndPlay(2);
trace("GAMEOVER START AGAIN");
char0.speed_x = 0;
char0.speed_y = 0;
gameOver = true;
delete this.onEnterFrame;
}
};
snakeArray = new Array(char0);
snakeLength = 1;
buildSnake = function () {
var _local4 = ("char" + snakeLength) + "_mc";
var _local2 = snakeArray[snakeLength - 1];
duplicateMovieClip (char0_mc, _local4, (_local2.prevTile * 20) + 1);
var _local5 = this[_local4];
_local5._x = this["tile" + _local2.tile].x;
_local5._y = this["tile" + _local2.tile].y;
this["char" + snakeLength] = {};
var _local3 = this["char" + snakeLength];
_local3.speed_x = _local2.speed_x;
_local3.speed_y = _local2.speed_y;
_local3.nextTile = _local2.prevTile;
snakeArray.push(_local3);
trace(snakeArray);
snakeLength++;
};
buildSnake();
moveSnake = function () {
i = 0;
while (i <= snakeLength) {
this[("char" + i) + "_mc"]._x = this[("char" + i) + "_mc"]._x + snakeArray[i].speed_x;
this[("char" + i) + "_mc"]._y = this[("char" + i) + "_mc"]._y + snakeArray[i].speed_y;
i++;
}
};
snakeDIR = ["", "forward", "right", "back", "left"];
defineSnakePos = function () {
i = snakeLength;
while (i > 0) {
var _local2 = snakeArray[i];
var _local4 = this["tile" + _local2.nextTile];
this[("char" + i) + "_mc"]._x = _local4.x;
this[("char" + i) + "_mc"]._y = _local4.y;
_local2.speed_x = snakeArray[i - 1].speed_x;
_local2.speed_y = snakeArray[i - 1].speed_y;
_local2.nextTile = snakeArray[i - 1].nextTile;
_local2.prevTile = snakeArray[i - 1].prevTile;
var _local5 = this["tile" + _local2.nextTile];
_local2.dir = _local5.dir;
this[("char" + i) + "_mc"].swapDepths((_local2.nextTile * 20) + 1);
if (i == (snakeLength - 1)) {
this[("char" + i) + "_mc"].gotoAndStop("back");
} else if (!this[("char" + i) + "_mc"].setFrame) {
this[("char" + i) + "_mc"].gotoAndPlay("middle");
} else {
this[("char" + i) + "_mc"].play();
}
this[("char" + i) + "_mc"].clip_mc.gotoAndStop(snakeDIR[_local2.dir]);
i--;
}
i = 0;
while (i < snakeLength) {
var _local2 = snakeArray[i];
var _local4 = this["tile" + _local2.prevTile];
var _local3 = this["tile" + _local2.nextTile];
_local4.free = true;
_local3.free = false;
i++;
}
};
moveChar = function () {
if (Key.isDown) {
keyControl();
}
if (steps == 0) {
moveHead();
}
if (!gameOver) {
moveSnake();
}
steps--;
};
keyControl = function () {
if (Key.isDown(37) && (snakeArray[0].currentDIR != 2)) {
snakeArray[0].dir = 4;
}
if (Key.isDown(39) && (snakeArray[0].currentDIR != 4)) {
snakeArray[0].dir = 2;
}
if (Key.isDown(38) && (snakeArray[0].currentDIR != 3)) {
snakeArray[0].dir = 1;
}
if (Key.isDown(40) && (snakeArray[0].currentDIR != 1)) {
snakeArray[0].dir = 3;
}
};
nextTile = function () {
var _local2 = this["tile" + char0.nextTile].row;
var _local3 = this["tile" + char0.nextTile].col;
if (snakeArray[0].dir == 1) {
var _local4 = (((_local2 - 1) * rows) + 1) + _local3;
}
if (snakeArray[0].dir == 3) {
var _local4 = (((_local2 + 1) * rows) + 1) + _local3;
}
if (snakeArray[0].dir == 4) {
var _local4 = char0.nextTile - 1;
}
if (snakeArray[0].dir == 2) {
var _local4 = char0.nextTile + 1;
}
char0_mc.clip_mc.gotoAndStop(snakeDIR[snakeArray[0].dir]);
snakeArray[0].currentDIR = snakeArray[0].dir;
return(_local4);
};
collectPoints = 100;
points = 0;
yipee_snd = new Sound();
yipee_snd.attachSound("yippee");
this.onEnterFrame = function () {
moveChar();
};
stop();
Symbol 243 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 50
_root.play();