Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("bb844b66", this, 10301, true);
numdeath = 0;
menumusicstart = true;
pac = false;
lets_call_it_cookie = SharedObject.getLocal("feronato");
numlevel = 0;
createdlevel = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
win1 = false;
win2 = false;
win3 = false;
win4 = false;
win5 = false;
win6 = false;
win7 = false;
win8 = false;
win9 = false;
win10 = false;
Frame 2
stop();
MochiAd.showPreGameAd({id:"da747644d9a2e0eb", res:"400x500", background:0, color:22015, outline:3986850, no_bg:true});
stop();
if (_root.menumusicstart == true) {
play();
}
Frame 4
Loaded = (getBytesLoaded() / getBytesTotal()) * 100;
Loaded = (getBytesLoaded() / getBytesTotal()) * 100;
_root.loader.LoadBar._xscale = Loaded;
Frame 5
if (Loaded == 100) {
play();
} else {
gotoAndPlay (4);
}
Frame 16
stop();
death = false;
Frame 18
menumusicstart = false;
Frame 264
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
stop();
Frame 277
stop();
Frame 289
gotoAndPlay ("menu");
Frame 301
stop();
Frame 310
gotoAndPlay ("menu");
Frame 322
stop();
Frame 332
gotoAndPlay ("storychallenge");
Frame 333
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
game.clip.attachMovie("char", "char", 10000);
char.clip = game.clip.char;
char.x = 30;
char.y = 300;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level0 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
myMap = level0;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
_root.game.clip.char._x = _root.game.clip.char._x + 500;
numdeath = 0;
gotoAndPlay ("menu");
Frame 334
gotoAndPlay ("b1");
Frame 335
lets_call_it_cookie.data.counter = 1;
Instance of Symbol 227 MovieClip in Frame 335
onClipEvent (enterFrame) {
_root.levelnum.text = _root.numlevel;
_root.deathnum.text = _root.numdeath;
}
Frame 336
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 30;
char.y = 300;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 1;
level2 = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 3, 0, 0, 0, 4], [3, 0, 0, 0, 0, 0, 1, 3, 1, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0, 4], [3, 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 336
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b2");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(32)) {
_root.gotoAndPlay("b1");
_root.death = false;
_root.numdeath = _root.numdeath + 1;
}
}
}
Frame 337
lets_call_it_cookie.data.counter = 2;
Frame 338
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 14.6666666666667;
char.y = 338.666666666667;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 2;
level2 = [[3, 3, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 3, 3, 0, 0, 3, 3, 3, 3, 0, 0, 0, 3, 3, 0, 3], [3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 2, 0, 3], [3, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 0, 1, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 1, 0, 3], [0, 0, 2, 2, 1, 0, 3, 0, 0, 0, 0, 3, 2, 2, 2, 0, 2, 0, 0, 3], [0, 1, 0, 0, 2, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [1, 1, 0, 0, 0, 2, 2, 0, 0, 0, 3, 3, 0, 0, 1, 0, 0, 0, 1, 3], [0, 0, 0, 0, 0, 3, 3, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0, 1, 0, 0, 2, 1, 2, 0, 3], [2, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 1, 0, 0, 0, 3, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 3, 3, 0, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [1, 1, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4], [3, 3, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 1, 1]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 338
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b3");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b2");
_root.death = false;
}
}
}
Frame 339
lets_call_it_cookie.data.counter = 3;
Frame 340
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 10;
char.y = 350;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 3;
level2 = [[3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3], [0, 0, 0, 3, 3, 3, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3], [6, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 1, 0, 1, 3, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 3], [1, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 2, 3, 1, 3, 0, 0, 0, 6, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3], [3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3], [3, 1, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3], [5, 0, 1, 0, 0, 0, 3, 0, 0, 2, 0, 2, 0, 1, 0, 0, 0, 1, 3, 3], [1, 1, 3, 2, 2, 2, 3, 2, 1, 3, 1, 3, 1, 3, 2, 2, 2, 3, 3, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 340
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b4");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b3");
_root.death = false;
}
}
}
Frame 341
lets_call_it_cookie.data.counter = 4;
Frame 342
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 25.3333333333333;
char.y = 41.3333333333333;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 4;
level2 = [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3], [0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 3], [0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 6, 6, 6, 6, 6, 6, 3, 0, 0, 3], [0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 2, 3, 2, 3, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 6, 0, 3], [0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 3, 0, 1, 0, 0, 0, 3], [1, 0, 6, 1, 0, 1, 0, 1, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 6, 3], [0, 0, 0, 3, 2, 3, 2, 3, 2, 2, 3, 0, 3, 3, 0, 3, 0, 0, 0, 3], [2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 3], [0, 0, 0, 0, 0, 3, 0, 0, 6, 0, 3, 0, 2, 2, 2, 3, 0, 0, 0, 3], [0, 0, 1, 0, 1, 3, 2, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 342
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b5");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b4");
_root.death = false;
}
}
}
Frame 343
lets_call_it_cookie.data.counter = 5;
Frame 344
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 14.666666666666;
char.y = 40;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 5;
level2 = [[3, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 6, 0, 6, 0, 6, 0, 6, 0, 0, 0, 0, 0, 3], [1, 1, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 3, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 3, 0, 3], [0, 0, 0, 0, 6, 0, 0, 1, 3, 2, 3, 2, 3, 2, 3, 0, 0, 3, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 2, 2, 3, 0, 3], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 0, 3], [0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 3, 3, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3], [0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 3], [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 3], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3], [0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3], [0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [1, 1, 3, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 4], [3, 3, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 344
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b6");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b5");
_root.death = false;
}
}
}
Frame 345
lets_call_it_cookie.data.counter = 6;
Frame 346
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 10;
char.y = 324;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 6;
level2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3], [0, 0, 1, 6, 0, 6, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 3, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 3, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 6, 2, 3, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 1, 0, 3], [0, 0, 3, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 6, 0, 0, 3, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3], [0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 6, 3, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 3, 3, 0, 3], [0, 3, 3, 0, 0, 0, 3, 3, 0, 3, 0, 3, 0, 0, 0, 3, 3, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3], [1, 6, 6, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3], [3, 0, 0, 0, 6, 0, 0, 0, 0, 3, 2, 2, 2, 2, 2, 2, 3, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3], [3, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 346
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b7");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b6");
_root.death = false;
}
}
}
Frame 347
lets_call_it_cookie.data.counter = 7;
Frame 348
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 15;
char.y = 355;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 7;
level2 = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4], [3, 3, 0, 0, 0, 3, 3, 6, 0, 0, 1, 1, 0, 0, 0, 3, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 2, 1, 2, 3, 0, 0, 0, 3], [0, 3, 3, 2, 2, 2, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 3], [3, 3, 3, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 3, 3, 0, 0, 0, 0, 3, 0, 0, 3, 3, 0, 3, 3, 3, 0, 0, 0, 3], [0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3], [3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 3, 3], [5, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3], [1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 348
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b8");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b7");
_root.death = false;
}
}
}
Frame 349
lets_call_it_cookie.data.counter = 8;
Frame 350
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 13.66;
char.y = 357.66;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 8;
level2 = [[3, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 3, 3, 0, 0, 3, 6, 1, 1, 1, 0, 1, 1, 1, 0, 0, 3], [0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 2, 0, 3, 3, 3, 3, 6, 0, 2, 0, 0, 0, 0, 2, 0, 0, 3], [0, 0, 1, 3, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 0, 4], [6, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 6, 0, 6, 0, 0, 6, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3], [3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3], [5, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3], [1, 1, 1, 3, 2, 2, 2, 2, 3, 3, 1, 2, 2, 3, 1, 2, 1, 2, 1, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 350
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b9");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b8");
_root.death = false;
}
}
}
Frame 351
lets_call_it_cookie.data.counter = 9;
Frame 352
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 13.66;
char.y = 353;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 9;
level2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 3, 0, 0, 0, 3], [0, 1, 0, 0, 0, 0, 3, 2, 2, 3, 0, 0, 3, 0, 0, 3, 0, 0, 0, 3], [0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 3, 0, 0, 0, 3], [0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 3], [0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 3], [0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 2, 0, 4], [0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 0, 0, 0, 3, 3, 0, 3], [0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 1, 0, 0, 3, 3, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 3], [5, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 3], [5, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 3], [1, 1, 3, 3, 1, 2, 2, 2, 2, 2, 2, 2, 1, 3, 1, 2, 3, 1, 2, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 352
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b10");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b9");
_root.death = false;
}
}
}
Frame 353
lets_call_it_cookie.data.counter = 10;
Frame 354
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 11;
char.y = 15;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 10;
level2 = [[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [3, 2, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 3], [2, 0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3], [0, 1, 0, 0, 1, 1, 0, 2, 3, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 2, 0, 0, 1, 0, 0, 0, 3], [0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 2, 0, 0, 2, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 3], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3], [2, 0, 0, 0, 0, 3, 2, 2, 2, 2, 0, 0, 0, 1, 1, 1, 0, 3, 0, 3], [0, 0, 0, 1, 2, 3, 3, 3, 3, 3, 3, 0, 0, 3, 3, 3, 0, 0, 6, 3], [1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3], [3, 0, 3, 0, 6, 1, 1, 1, 0, 0, 1, 1, 0, 3, 0, 0, 0, 0, 0, 3], [3, 0, 3, 6, 2, 0, 0, 0, 0, 0, 3, 3, 0, 3, 0, 0, 0, 0, 1, 3], [3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 3, 0, 3, 2, 1, 0, 0, 0, 3], [3, 1, 1, 1, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 2, 2, 2, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 354
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b11");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b10");
_root.death = false;
}
}
}
Frame 355
lets_call_it_cookie.data.counter = 11;
Frame 356
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 11;
char.y = 25;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 11;
level2 = [[3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 6, 0, 6, 0, 0, 6, 0, 3], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 2, 0, 3], [3, 3, 1, 2, 0, 0, 0, 0, 2, 2, 6, 0, 0, 0, 0, 0, 1, 0, 0, 3], [3, 3, 3, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3], [3, 3, 3, 0, 0, 0, 0, 0, 3, 0, 6, 0, 0, 0, 0, 0, 2, 0, 0, 3], [3, 3, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 6, 0, 3], [0, 0, 0, 0, 0, 2, 3, 2, 3, 2, 6, 0, 0, 2, 0, 0, 3, 0, 0, 3], [0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 2, 0, 6, 2, 0, 0, 3, 0, 6, 3], [0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 3], [0, 2, 1, 0, 0, 3, 0, 1, 0, 1, 0, 3, 6, 2, 0, 0, 3, 6, 0, 3], [0, 0, 3, 2, 2, 3, 0, 0, 2, 0, 0, 2, 0, 2, 0, 0, 3, 0, 0, 3], [1, 0, 3, 3, 3, 3, 6, 0, 3, 0, 0, 3, 6, 2, 0, 0, 3, 0, 6, 3], [3, 0, 0, 0, 0, 3, 0, 0, 2, 0, 0, 2, 0, 2, 0, 0, 3, 0, 0, 3], [0, 0, 1, 0, 2, 3, 6, 0, 3, 1, 0, 3, 6, 2, 0, 0, 3, 6, 0, 3], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3], [3, 0, 1, 0, 0, 1, 1, 2, 2, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 4], [3, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 4], [3, 3, 3, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 356
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b12");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b11");
_root.death = false;
}
}
}
Frame 357
lets_call_it_cookie.data.counter = 12;
Frame 358
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 13;
char.y = 35;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 12;
level2 = [[3, 3, 3, 3, 0, 3, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 2, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 1, 1, 1, 1, 0, 1, 3], [5, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, 3], [1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 0, 0, 3], [3, 3, 0, 1, 1, 3, 0, 0, 1, 0, 3, 0, 0, 0, 1, 0, 3, 0, 3, 3], [3, 0, 6, 0, 0, 2, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 3, 0, 0, 3], [0, 0, 0, 0, 0, 0, 6, 0, 1, 0, 0, 0, 0, 0, 1, 1, 3, 0, 3, 3], [0, 1, 0, 1, 0, 0, 0, 2, 3, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 3], [0, 3, 0, 3, 2, 3, 0, 0, 0, 2, 3, 3, 3, 2, 2, 2, 0, 3, 3, 3], [0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 3, 0, 3, 0, 1, 1, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 0, 0, 3], [2, 0, 2, 0, 1, 3, 3, 1, 0, 1, 1, 2, 0, 2, 0, 3, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 2, 0, 0, 2, 2, 3], [1, 0, 1, 0, 0, 1, 0, 0, 1, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 1, 3, 0, 1, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 3], [3, 2, 2, 1, 2, 1, 0, 0, 3, 0, 1, 0, 3, 0, 0, 0, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 1, 1, 3, 2, 3, 2, 3, 2, 2, 1, 3, 3, 3, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 358
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b13");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b12");
_root.death = false;
}
}
}
Frame 359
lets_call_it_cookie.data.counter = 13;
Frame 360
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 13;
char.y = 340;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 13;
level2 = [[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 4], [5, 6, 6, 6, 6, 6, 0, 6, 2, 6, 2, 6, 6, 0, 1, 3, 3, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 4], [5, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 2, 0, 3, 0, 0, 0, 0, 4], [5, 2, 0, 0, 6, 0, 0, 2, 0, 2, 0, 2, 0, 0, 3, 0, 0, 0, 0, 4], [5, 2, 6, 2, 0, 0, 1, 3, 1, 3, 1, 3, 0, 1, 3, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 4], [5, 2, 0, 0, 2, 0, 0, 0, 0, 1, 0, 6, 0, 3, 0, 0, 0, 0, 0, 4], [5, 0, 6, 6, 0, 2, 0, 0, 0, 2, 0, 0, 2, 3, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 6, 0, 0, 0, 1, 3, 1, 0, 3, 3, 0, 0, 0, 0, 0, 4], [5, 0, 0, 2, 0, 2, 1, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 3, 0, 0, 2, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 6, 6, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 2, 0, 0, 0, 3, 6, 0, 6, 0, 3, 6, 0, 6, 6, 6, 0, 0, 0, 4], [5, 0, 6, 0, 0, 3, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 2, 2, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 2, 2, 2, 4], [5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 360
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b14");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b13");
_root.death = false;
}
}
}
Frame 361
lets_call_it_cookie.data.counter = 14;
Frame 362
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 13;
char.y = 350;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 14;
level2 = [[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3, 0, 3, 0, 3], [5, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3, 0, 3, 0, 3, 0, 3], [5, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 362
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b15");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b14");
_root.death = false;
}
}
}
Frame 363
lets_call_it_cookie.data.counter = 15;
Frame 364
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 13;
char.y = 350;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 15;
level2 = [[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3, 0, 3, 0, 3], [5, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3, 0, 3, 0, 3, 0, 3], [5, 0, 0, 0, 2, 0, 3, 0, 0, 1, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3], [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 364
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("b16");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.numdeath = _root.numdeath + 1;
_root.gotoAndPlay("b15");
_root.death = false;
}
}
}
Frame 365
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
game.clip.attachMovie("char", "char", 10000);
char.clip = game.clip.char;
char.x = 30;
char.y = 300;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level0 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level1 = createdlevel;
myMap = level0;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
_root.game.clip.char._x = _root.game.clip.char._x + 500;
stopAllSounds();
gotoAndPlay ("endscene");
lets_call_it_cookie.data.counter = 16;
Instance of Symbol 227 MovieClip in Frame 366
onClipEvent (enterFrame) {
_root.levelnum.text = _root.numlevel;
}
Frame 367
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 20;
char.y = 345;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 1;
level2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 3, 3], [0, 0, 0, 0, 1, 1, 3, 3, 0, 0, 3, 3, 0, 0, 0, 3, 3, 0, 3, 3], [0, 0, 1, 1, 3, 3, 3, 3, 0, 0, 3, 3, 0, 0, 0, 3, 3, 0, 3, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 367
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("t2");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("t1");
_root.death = false;
}
}
}
Frame 369
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 20;
char.y = 345;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 2;
level2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 6, 0, 0, 6, 0, 6, 0, 6, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 3], [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 3, 3, 1, 0, 0, 0, 0, 3], [3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 1, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 369
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("t3");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("t2");
_root.death = false;
}
}
}
Frame 371
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 20;
char.y = 345;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 3;
level2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 6, 3, 0, 0, 0, 0, 6, 3, 0, 0, 0, 0, 6, 3, 3, 3], [0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 3], [0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 3], [1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 371
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("t4");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("t3");
_root.death = false;
}
}
}
Frame 373
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 20;
char.y = 345;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 4;
level2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1], [3, 3, 3, 2, 2, 3, 3, 3, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 373
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("t5");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("t4");
_root.death = false;
}
}
}
Frame 375
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 20;
char.y = 345;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
numlevel = 5;
level2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]];
death = false;
myMap = level2;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
game.tile5 = {walkable:true, frame:6};
game.tile6 = {walkable:true, frame:7, cloud:true};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 375
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
_root.gotoAndPlay("t6");
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("t5");
_root.death = false;
}
}
}
Frame 376
gotoAndPlay ("storymode");
Frame 377
win = false;
if (pacunlock == undefined) {
if (lets_call_it_cookie.data.chal1 == true) {
if (lets_call_it_cookie.data.chal2 == true) {
if (lets_call_it_cookie.data.chal3 == true) {
if (lets_call_it_cookie.data.chal4 == true) {
if (lets_call_it_cookie.data.chal5 == true) {
if (lets_call_it_cookie.data.chal6 == true) {
if (lets_call_it_cookie.data.chal7 == true) {
if (lets_call_it_cookie.data.chal8 == true) {
if (lets_call_it_cookie.data.chal9 == true) {
if (lets_call_it_cookie.data.chal10 == true) {
paclock = false;
pacunlock = true;
gotoAndPlay ("congrats");
}
}
}
}
}
}
}
}
}
}
}
if (lets_call_it_cookie.data.chal1 == true) {
win1 = true;
}
if (lets_call_it_cookie.data.chal2 == true) {
win2 = true;
}
if (lets_call_it_cookie.data.chal3 == true) {
win3 = true;
}
if (lets_call_it_cookie.data.chal4 == true) {
win4 = true;
}
if (lets_call_it_cookie.data.chal5 == true) {
win5 = true;
}
if (lets_call_it_cookie.data.chal6 == true) {
win6 = true;
}
if (lets_call_it_cookie.data.chal7 == true) {
win7 = true;
}
if (lets_call_it_cookie.data.chal8 == true) {
win8 = true;
}
if (lets_call_it_cookie.data.chal9 == true) {
win9 = true;
}
if (lets_call_it_cookie.data.chal10 == true) {
win10 = true;
}
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
game.clip.attachMovie("char", "char", 10000);
char.clip = game.clip.char;
char.x = 30;
char.y = 300;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level0 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level1 = createdlevel;
myMap = level0;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
_root.game.clip.char._x = _root.game.clip.char._x + 500;
Instance of Symbol 253 MovieClip "dragger" in Frame 377
onClipEvent (load) {
dragging = false;
}
onClipEvent (enterFrame) {
if (dragging == true) {
this._y = _root._ymouse;
if (this._y < 125) {
this._y = 125.1;
}
if (this._y > 435) {
this._y = 434.9;
}
}
}
Frame 378
stop();
Instance of Symbol 317 MovieClip in Frame 378
onClipEvent (enterFrame) {
this._y = ((this._y + (-1.6 * _root.dragger._y)) + 280) / 2;
}
Frame 379
win = false;
createdby = "arcticswirl clock";
diff = "the staircase";
Frame 380
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 85.3333333333333;
char.y = 361.333333333333;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level1 = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0], [3, 2, 2, 0, 2, 0, 2, 0, 2, 0, 3, 3, 0, 0, 3, 3, 0, 0, 0, 0], [3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 0, 0, 0, 0, 3, 3, 0, 0, 0], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 3, 0, 0, 3], [3, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3], [3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3]];
death = false;
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 380
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c1");
_root.death = false;
}
}
if (_root.win == true) {
_root.win1 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal1 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 381
win = false;
createdby = "sock puppet clock";
diff = "the sock puppet challenge";
Frame 382
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 60.6666666666667;
char.y = 352.666666666667;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level1 = [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 3, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3], [3, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 3], [3, 0, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 3], [3, 0, 0, 3, 3, 3, 3, 3, 3, 2, 0, 0, 2, 3, 3, 3, 0, 0, 0, 3], [3, 3, 0, 0, 3, 3, 3, 3, 0, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 3], [3, 3, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3], [3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2], [3, 3, 3, 3, 3, 0, 3, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3], [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 3, 3, 3], [2, 2, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 4, 3], [0, 2, 0, 0, 2, 1, 2, 2, 2, 1, 2, 2, 0, 0, 2, 0, 0, 2, 3, 3], [1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1]];
death = false;
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 382
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c2");
_root.death = false;
}
}
if (_root.win == true) {
_root.win2 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal2 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 383
win = false;
createdby = "gingerbread clock";
diff = "descent";
Frame 384
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 30.6666666666667;
char.y = 29.666666666667;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level1 = [[3, 3, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3], [2, 4, 2, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3], [0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3], [1, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 1, 2, 2, 1, 1, 1, 2, 3, 1, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 0, 0, 0, 0], [0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 1, 3, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 0], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 3, 3, 1, 1, 0, 0, 1, 2, 2, 1, 2, 1, 0, 0, 0, 0], [3, 3, 3, 3, 3, 3, 3, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2], [3, 3, 3, 3, 3, 3, 3, 1, 2, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3]];
death = false;
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 384
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c3");
_root.death = false;
}
}
if (_root.win == true) {
_root.win3 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal3 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 385
win = false;
createdby = "archon clock";
diff = "the cave of annoying jumps!";
Frame 386
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 41.3333333333333;
char.y = 38.6666666666667;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level1 = [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2], [3, 3, 3, 2, 3, 3, 3, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1], [3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 2, 2, 2, 2, 2, 3, 3, 0, 0, 3], [3, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 3], [0, 0, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3], [0, 1, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 3], [0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 3], [3, 0, 3, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 3, 0, 0, 3], [0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 3, 3, 0, 0, 3], [0, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, 0, 0, 3], [0, 0, 3, 3, 3, 3, 3, 3, 4, 0, 3, 0, 0, 0, 0, 3, 3, 0, 0, 3], [0, 0, 3, 0, 0, 0, 3, 3, 3, 0, 3, 0, 1, 0, 0, 3, 3, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 2, 0, 3], [0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 3, 0, 0, 1, 0, 0, 3, 3, 0, 3], [0, 0, 3, 3, 2, 3, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3], [2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 1, 1, 1, 1, 1, 3]];
death = false;
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 386
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c4");
_root.death = false;
}
}
if (_root.win == true) {
_root.win4 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal4 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 387
win = false;
createdby = "ankh clock";
diff = "the chasm";
Frame 388
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 21.3333333333333;
char.y = 360;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level1 = [[0, 0, 0, 0, 0, 0, 0, 4, 3, 0, 2, 0, 2, 2, 0, 0, 0, 0, 2, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1], [0, 0, 0, 0, 0, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3], [0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 0, 2, 0, 3, 0, 0, 0, 0], [0, 3, 3, 2, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 0, 0, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0], [0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 2, 3, 3, 0, 0, 0, 0, 0, 3, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3], [3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 2, 3, 3, 3, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0], [1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 2, 2]];
death = false;
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 388
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c5");
_root.death = false;
}
}
if (_root.win == true) {
_root.win5 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal5 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 389
win = false;
createdby = "ankh clock";
diff = "underground";
Frame 390
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 365;
char.y = 1;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level1 = [[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 4, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 1, 1, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [3, 3, 3, 3, 3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 3, 0, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 2, 3, 3, 0, 0, 0, 3, 0], [0, 3, 3, 3, 0, 0, 0, 0, 3, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0], [0, 3, 3, 3, 3, 3, 2, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0], [0, 3, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3, 3], [0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 4, 0], [0, 3, 0, 0, 3, 3, 0, 3, 3, 2, 3, 2, 3, 3, 3, 3, 0, 3, 3, 0], [0, 3, 0, 0, 0, 0, 3, 0, 0, 3, 3, 3, 0, 0, 0, 3, 2, 3, 0, 0], [0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3], [0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 3, 2, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0], [0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 3, 3, 0, 0, 0, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]];
death = false;
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 390
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c6");
_root.death = false;
}
}
if (_root.win == true) {
_root.win6 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal6 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 391
win = false;
createdby = "ankh clock";
diff = "two paths";
Frame 392
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 10.33;
char.y = 3.67;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
death = false;
level1 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 0, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0], [0, 0, 3, 0, 0, 0, 0, 3, 1, 1, 1, 0, 3, 2, 2, 2, 2, 2, 3, 0], [0, 3, 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0, 3, 1, 1, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0], [0, 3, 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0], [0, 3, 3, 0, 0, 0, 0, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 0, 3], [0, 0, 0, 0, 3, 0, 0, 3, 1, 0, 0, 1, 3, 0, 3, 2, 2, 2, 2, 2], [0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 3, 0, 0, 0, 3, 3, 3, 3], [0, 0, 0, 0, 0, 0, 3, 3, 1, 1, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 0, 3, 1, 0, 0, 1, 3, 3, 0, 0, 3, 0, 0, 0], [0, 0, 0, 0, 0, 3, 0, 3, 1, 1, 1, 0, 3, 2, 2, 2, 2, 2, 0, 0], [3, 0, 1, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3]];
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 392
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c7");
_root.death = false;
}
}
if (_root.win == true) {
_root.win7 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal7 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 393
win = false;
createdby = "renegade clock";
diff = "renegade challenge";
Frame 394
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 4.33;
char.y = 334.33;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
death = false;
level1 = [[0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 0, 0, 0, 0, 0], [0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 1, 1], [0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0], [0, 0, 0, 1, 3, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 3, 0, 1, 0, 0], [0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0], [0, 1, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1], [0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0], [1, 0, 0, 0, 3, 0, 2, 0, 0, 2, 2, 0, 0, 2, 3, 0, 0, 0, 1, 0], [0, 0, 0, 1, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0], [0, 1, 0, 0, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 1], [0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0], [0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0], [0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 3, 0], [1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0], [0, 0, 1, 0, 3, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 2, 3, 0, 0], [0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0], [0, 1, 0, 3, 3, 2, 2, 2, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 0], [1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2]];
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 394
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c8");
_root.death = false;
}
}
if (_root.win == true) {
_root.win8 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal8 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 395
win = false;
createdby = "ankh clock";
diff = "the floating pit";
Frame 396
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 392;
char.y = 212;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
death = false;
level1 = [[0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 3, 0, 2, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 3, 0, 3, 0, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 3, 3, 3, 3, 3, 0, 3, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 3, 4, 3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0], [2, 3, 3, 3, 3, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0], [0, 0, 3, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 3, 0, 3, 3, 1, 1, 0, 1, 3, 1, 1, 1, 1, 1, 0], [3, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 1], [0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3], [0, 0, 3, 3, 3, 2, 2, 2, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 0, 3], [3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 3, 0, 3], [0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0], [0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2]];
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 396
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c9");
_root.death = false;
}
}
if (_root.win == true) {
_root.win9 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal9 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 397
win = false;
createdby = "airport extreme";
diff = "sky bridge";
Frame 398
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = 134.33;
char.y = 345;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
death = false;
level1 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 3, 3, 0, 3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 3, 0, 3, 2, 2, 2, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0], [0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3], [3, 3, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 3, 3, 3, 0, 3], [0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 3, 3, 0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0], [0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0], [3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4]];
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:8};
game.tile5 = {walkable:true, frame:6};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 398
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if (_root.death == false) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if (_root.death == false) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if (_root.death == false) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("c10");
_root.death = false;
}
}
if (_root.win == true) {
_root.win10 = true;
_root.gotoAndPlay("hub");
_root.lets_call_it_cookie.data.chal10 = true;
}
_root.createdbytext.text = "created by " + _root.createdby;
_root.difftext.text = _root.diff;
}
Frame 400
stop();
if (paclock == false) {
_root.expac.gotoAndStop(2);
}
if (pac == false) {
_root.exsbc.gotoAndStop(2);
} else if (pac == true) {
_root.expac.gotoAndStop(3);
}
if (_root.bonuslock == false) {
_root.bonusgame.gotoAndPlay(2);
}
Frame 401
stop();
paclock = false;
Frame 1169
stopAllSounds();
menumusicstart = true;
gotoAndPlay ("t1");
Frame 2643
stop();
menumusicstart = true;
bonuslock = false;
Frame 2644
sbcx = 443.666666666667;
sbcy = 307.666666666667;
death = false;
win = false;
_root.youwon._alpha = 0;
newlevel = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
Frame 2645
stop();
sbcstart._alpha = 100;
myMap = level0;
Instance of Symbol 464 MovieClip "col1" in Frame 2645
onClipEvent (enterFrame) {
num1 = 0;
}
Instance of Symbol 464 MovieClip "col2" in Frame 2645
onClipEvent (enterFrame) {
num1 = 1;
}
Instance of Symbol 464 MovieClip "col3" in Frame 2645
onClipEvent (enterFrame) {
num1 = 2;
}
Instance of Symbol 464 MovieClip "col4" in Frame 2645
onClipEvent (enterFrame) {
num1 = 3;
}
Instance of Symbol 464 MovieClip "col5" in Frame 2645
onClipEvent (enterFrame) {
num1 = 4;
}
Instance of Symbol 464 MovieClip "col6" in Frame 2645
onClipEvent (enterFrame) {
num1 = 5;
}
Instance of Symbol 464 MovieClip "col7" in Frame 2645
onClipEvent (enterFrame) {
num1 = 6;
}
Instance of Symbol 464 MovieClip "col8" in Frame 2645
onClipEvent (enterFrame) {
num1 = 7;
}
Instance of Symbol 464 MovieClip "col9" in Frame 2645
onClipEvent (enterFrame) {
num1 = 8;
}
Instance of Symbol 464 MovieClip "col10" in Frame 2645
onClipEvent (enterFrame) {
num1 = 9;
}
Instance of Symbol 464 MovieClip "col11" in Frame 2645
onClipEvent (enterFrame) {
num1 = 10;
}
Instance of Symbol 464 MovieClip "col12" in Frame 2645
onClipEvent (enterFrame) {
num1 = 11;
}
Instance of Symbol 464 MovieClip "col13" in Frame 2645
onClipEvent (enterFrame) {
num1 = 12;
}
Instance of Symbol 464 MovieClip "col14" in Frame 2645
onClipEvent (enterFrame) {
num1 = 13;
}
Instance of Symbol 464 MovieClip "col15" in Frame 2645
onClipEvent (enterFrame) {
num1 = 14;
}
Instance of Symbol 464 MovieClip "col16" in Frame 2645
onClipEvent (enterFrame) {
num1 = 15;
}
Instance of Symbol 464 MovieClip "col17" in Frame 2645
onClipEvent (enterFrame) {
num1 = 16;
}
Instance of Symbol 464 MovieClip "col18" in Frame 2645
onClipEvent (enterFrame) {
num1 = 17;
}
Instance of Symbol 464 MovieClip "col19" in Frame 2645
onClipEvent (enterFrame) {
num1 = 18;
}
Instance of Symbol 464 MovieClip "col20" in Frame 2645
onClipEvent (enterFrame) {
num1 = 19;
}
Instance of Symbol 584 MovieClip in Frame 2645
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
_root.play();
}
}
onClipEvent (load) {
coli = 1;
while (coli < 21) {
rowi = 1;
while (rowi < 21) {
namecol = "col" + coli;
namerow = "row" + rowi;
lesscol = coli - 1;
lessrow = rowi - 1;
gotonumber = _root.createdlevel[lesscol][lessrow] + 1;
_root[namecol][namerow].gotoAndStop(gotonumber);
rowi++;
}
coli++;
}
_root.sbcstart._x = (_root.sbcx * 0.75) + 15;
_root.sbcstart._y = (_root.sbcy * 0.75) + 15;
}
Frame 2646
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
if (pac == false) {
game.clip.attachMovie("char", "char", 10000);
} else if (pac == true) {
game.clip.attachMovie("char2", "char", 10000);
}
char.clip = game.clip.char;
char.x = _root.sbcx;
char.y = _root.sbcy;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
sbcstart._alpha = 0;
level1 = createdlevel;
myMap = level1;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile6 = {walkable:true, frame:7, cloud:true};
game.tile7 = {walkable:true, frame:8};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
stop();
Instance of Symbol 69 MovieClip [empty] "controller" in Frame 2646
onClipEvent (enterFrame) {
var dirx = 0;
var diry = 0;
if (Key.isDown(38)) {
}
if (Key.isDown(40)) {
}
if (Key.isDown(37)) {
if ((_root.death == false) && (_root.win == false)) {
dirx = -1;
}
}
if (Key.isDown(39)) {
if ((_root.death == false) && (_root.win == false)) {
dirx = 1;
}
}
if (Key.isDown(32) and (!_root.char.jump)) {
if ((_root.death == false) && (_root.win == false)) {
_root.char.jump = true;
_root.char.jumpspeed = _root.char.jumpstart;
}
}
if ((dirx != 0) or (diry != 0)) {
_root.walk(dirx, diry, _root.char, _root.char.speed);
}
if (_root.char.jump) {
_root.jump(_root.char);
}
if (_root.game.clip.char._x > 390) {
}
if (_root.win == true) {
_root.youwon._x = 200;
death = false;
}
if (_root.death == true) {
_root.game.clip.char.gotoAndStop("death");
if (Key.isDown(82)) {
_root.gotoAndPlay("leback");
_root.death = false;
_root.win = false;
}
}
}
Instance of Symbol 589 MovieClip "youwon" in Frame 2646
onClipEvent (enterFrame) {
if (_root.win == true) {
this._x = 200;
} else {
this._x = -354;
}
}
Frame 2647
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var _local6 = map[0].length;
var _local7 = map.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = game["tile" + map[_local4][_local3]];
game.clip.attachMovie("tile", _local2, (_local4 * 100) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
game.clip.attachMovie("char", "char", 10000);
char.clip = game.clip.char;
char.x = 30;
char.y = 300;
char.width = char.clip._width / 2;
char.height = char.clip._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function lookCloud(ob) {
var _local2 = game[(("t_" + ob.downY) + "_") + ob.leftX].cloud;
var _local4 = game[(("t_" + ob.downY) + "_") + ob.rightX].cloud;
var _local3 = game[(("t_" + ob.upY) + "_") + ob.leftX].cloud;
var _local5 = game[(("t_" + ob.upY) + "_") + ob.rightX].cloud;
if ((_local2 or _local4) and (!(_local3 or _local5))) {
return(true);
}
return(false);
}
function walk(dirx, diry, ob, speed) {
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
if (ob.jump) {
ob.jumpspeed = 0;
}
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
if (ob.jump and lookCloud(ob)) {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
} else {
ob.y = ob.y + (speed * diry);
}
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
if (ob.jump) {
ob.jump = false;
}
}
if (speed > 21) {
speed = 21;
}
}
getMyCorners(ob.x + (speed * dirx), ob.y, ob);
if (dirx == -1) {
_root.game.clip.char.gotoAndStop("walkl");
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
_root.game.clip.char.gotoAndStop("walkr");
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed - ob.gravity;
if (ob.jumpspeed > 0) {
walk(0, -1, ob, ob.jumpspeed);
} else if (ob.jumpspeed < 0) {
walk(0, 1, ob, -ob.jumpspeed);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y, ob);
if ((ob.downleft and ob.downright) and (!lookCloud(ob))) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
level0 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level1 = createdlevel;
myMap = level0;
game = {tileW:20, tileH:20};
game.tile0 = {walkable:true, frame:1};
game.tile1 = {walkable:false, frame:2};
game.tile2 = {walkable:true, frame:3, cloud:true};
game.tile3 = {walkable:false, frame:4};
game.tile4 = {walkable:true, frame:5};
char = {xtile:2, ytile:1, speed:4, jumpstart:15, gravity:2, jump:false};
buildMap(myMap);
fall(char);
_root.game.clip.char._x = _root.game.clip.char._x + 500;
gotoAndPlay (2645);
Frame 2648
death = false;
gotoAndPlay (2646);
Frame 3513
gotoAndPlay ("menu");
menumusicstart = true;
Frame 3515
stopAllSounds();
bonusmusicstart = true;
Frame 3516
stop();
arsu = 0;
Instance of Symbol 599 MovieClip in Frame 3516
onClipEvent (load) {
go = false;
increase = 0;
}
onClipEvent (enterFrame) {
increase = increase + 0.01;
if (go == false) {
var willigo = random(15);
}
if (willigo == 0) {
go = true;
this._x = this._x + (10 + increase);
}
if (this._x >= 800) {
_root.arsu = _root.arsu + 1;
this._y = random(400);
this._x = -400;
go = false;
}
}
Instance of Symbol 599 MovieClip in Frame 3516
onClipEvent (load) {
go = false;
increase = 0;
}
onClipEvent (enterFrame) {
increase = increase + 0.01;
if (go == false) {
var willigo = random(15);
}
if (willigo == 0) {
go = true;
this._x = this._x - (10 + increase);
}
if (this._x <= -800) {
_root.arsu = _root.arsu + 1;
this._y = random(400);
this._x = 800;
go = false;
}
}
Instance of Symbol 599 MovieClip in Frame 3516
onClipEvent (load) {
go = false;
increase = 0;
}
onClipEvent (enterFrame) {
increase = increase + 0.01;
if (go == false) {
var willigo = random(15);
}
if (willigo == 0) {
go = true;
this._x = this._x - (10 + increase);
}
if (this._x <= -800) {
_root.arsu = _root.arsu + 1;
this._y = random(400);
this._x = 800;
go = false;
}
}
Instance of Symbol 599 MovieClip in Frame 3516
onClipEvent (load) {
go = false;
increase = 0;
}
onClipEvent (enterFrame) {
increase = increase + 0.01;
if (go == false) {
var willigo = random(15);
}
if (willigo == 0) {
go = true;
this._x = this._x + (10 + increase);
}
if (this._x >= 800) {
_root.arsu = _root.arsu + 1;
this._y = random(400);
this._x = -400;
go = false;
}
}
Frame 3517
stop();
Instance of Symbol 599 MovieClip "wind2" in Frame 3517
onClipEvent (load) {
go = false;
increase = 0;
}
onClipEvent (enterFrame) {
increase = increase + 0.01;
if (go == false) {
var willigo = random(15);
}
if (willigo == 0) {
go = true;
this._x = this._x + (10 + increase);
}
if (this._x >= 800) {
_root.arsu = _root.arsu + 1;
this._y = random(400);
this._x = -400;
go = false;
}
}
Instance of Symbol 599 MovieClip "wind1" in Frame 3517
onClipEvent (load) {
go = false;
increase = 0;
}
onClipEvent (enterFrame) {
increase = increase + 0.01;
if (go == false) {
var willigo = random(15);
}
if (willigo == 0) {
go = true;
this._x = this._x - (10 + increase);
}
if (this._x <= -800) {
_root.arsu = _root.arsu + 1;
this._y = random(400);
this._x = 800;
go = false;
}
}
Instance of Symbol 612 MovieClip "bar" in Frame 3517
onClipEvent (load) {
increase = 0;
lose = false;
deathincrease = 1;
}
onClipEvent (enterFrame) {
if (lose == false) {
var tempx = this._x;
this._x = _root._xmouse;
this._y = _root._ymouse;
var newx = this._x;
var rotatex = ((newx - tempx) - (this._rotation / 25));
if (rotatex > 10) {
rotatex = 10;
}
if (rotatex < -10) {
rotatex = -10;
}
this._rotation = this._rotation - (rotatex / 2);
if (this.hitTest(_root.wind1)) {
this._rotation = this._rotation - (2 * increase);
}
if (this.hitTest(_root.wind3)) {
this._rotation = this._rotation - (2 * increase);
}
if (this.hitTest(_root.wind2)) {
this._rotation = this._rotation + (2 * increase);
}
increase = increase + 0.005;
if ((this._rotation >= 100) || (this._rotation <= -100)) {
lose = true;
}
}
if (lose == true) {
deathincrease = deathincrease + 5;
this._y = this._y + deathincrease;
this._rotation = this._rotation * 1.04;
if (this._y >= 500) {
_root.play();
deathincrease = 1;
}
}
}
Instance of Symbol 599 MovieClip "wind3" in Frame 3517
onClipEvent (load) {
go = false;
increase = 0;
}
onClipEvent (enterFrame) {
increase = increase + 0.01;
if (go == false) {
var willigo = random(15);
}
if (willigo == 0) {
go = true;
this._x = this._x - (10 + increase);
}
if (this._x <= -800) {
_root.arsu = _root.arsu + 1;
this._y = random(400);
this._x = 800;
go = false;
}
}
Frame 3518
stop();
_root.survived.text = arsu;
Symbol 7 MovieClip Frame 1
if (_parent.hitTest(_root.game.clip.char.sbchit)) {
_root.death = true;
_root.game.clip.char.gotoAndStop("death");
}
Symbol 7 MovieClip Frame 2
if (_parent.hitTest(_root.game.clip.char.sbchit)) {
_root.death = true;
_root.game.clip.char.gotoAndStop("death");
}
Symbol 11 MovieClip Frame 1
if (_parent.hitTest(_root.game.clip.char)) {
_root.finish = true;
}
Instance of Symbol 11 MovieClip in Symbol 19 MovieClip [tile] Frame 8
onClipEvent (enterFrame) {
if (_parent.hitTest(_root.game.clip.char.sbchit)) {
_root.win = true;
}
}
Symbol 25 MovieClip Frame 4
_parent.gotoAndStop("standl");
Symbol 26 MovieClip Frame 4
_parent.gotoAndStop("standr");
Symbol 44 MovieClip Frame 31
stop();
Symbol 45 MovieClip [char2] Frame 1
stop();
Symbol 45 MovieClip [char2] Frame 2
stop();
Symbol 45 MovieClip [char2] Frame 5
stop();
Symbol 50 MovieClip Frame 4
_parent.gotoAndStop("standl");
Symbol 52 MovieClip Frame 4
_parent.gotoAndStop("standr");
Symbol 67 MovieClip Frame 31
stop();
Symbol 68 MovieClip [char] Frame 1
stop();
Symbol 68 MovieClip [char] Frame 2
stop();
Symbol 68 MovieClip [char] Frame 5
stop();
Symbol 619 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.4");
}
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_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 ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0) {
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 84 Button
on (release) {
_root.play();
}
Symbol 88 MovieClip Frame 1
stop();
if (_root.menumusicstart == true) {
play();
}
Symbol 88 MovieClip Frame 3
_root.menumusicstart = false;
stop();
Symbol 98 MovieClip Frame 132
stop();
Symbol 110 Button
on (release) {
_root.play();
}
Symbol 136 Button
on (release) {
gotoAndPlay ("toinstructions");
}
Symbol 137 Button
on (release) {
stopAllSounds();
gotoAndPlay ("lestart");
}
Symbol 138 Button
on (release) {
stopAllSounds();
gotoAndPlay ("thecredits");
}
Symbol 139 Button
on (release) {
gotoAndPlay ("extra");
}
Symbol 144 Button
on (release) {
_root.play();
}
Symbol 156 Button
on (release) {
if (lets_call_it_cookie.data.counter == undefined) {
_root.gotoAndPlay("firstscene");
stopAllSounds();
} else {
_root.gotoAndPlay("storytoop");
}
}
Symbol 157 Button
on (release) {
_root.gotoAndPlay("hub");
}
Symbol 158 Button
on (release) {
_root.play();
}
Symbol 182 Button
on (release) {
_root.play();
}
Symbol 196 Button
on (release) {
trace(lets_call_it_cookie.data.counter);
if (lets_call_it_cookie.data.counter != undefined) {
gowhere = "b" + lets_call_it_cookie.data.counter.toString();
_root.gotoAndPlay(gowhere);
}
trace(lets_call_it_cookie.data.counter);
}
Symbol 209 Button
on (release) {
gotoAndPlay ("firstscene");
stopAllSounds();
}
Symbol 210 Button
on (release) {
gotoAndPlay ("optostory");
}
Symbol 211 Button
on (release) {
if (lets_call_it_cookie.data.counter != undefined) {
gowhere = "b" + lets_call_it_cookie.data.counter.toString();
_root.gotoAndPlay(gowhere);
}
}
Symbol 213 MovieClip Frame 1
stop();
if (_root.menumusicstart == true) {
play();
}
Symbol 213 MovieClip Frame 3
stop();
Symbol 220 MovieClip Frame 1
uhwhereto = random(3) + 2;
gotoAndPlay(uhwhereto);
Symbol 220 MovieClip Frame 2
stop();
Instance of Symbol 216 MovieClip in Symbol 220 MovieClip Frame 2
onClipEvent (enterFrame) {
this._x = this._x - 0.05;
}
Symbol 220 MovieClip Frame 3
stop();
Symbol 220 MovieClip Frame 4
stop();
Symbol 220 MovieClip Frame 5
stop();
Symbol 230 Button
on (release) {
play();
}
Instance of Symbol 234 MovieClip in Symbol 237 MovieClip Frame 1
on (release) {
_root.stopAllSounds();
_root.gotoAndPlay("btm");
}
Instance of Symbol 234 MovieClip in Symbol 237 MovieClip Frame 1
on (release) {
_parent.play();
}
Symbol 238 Button
on (release) {
_root.gotoAndPlay("btm");
}
Symbol 239 Button
on (release) {
play();
}
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 12
stop();
Symbol 240 MovieClip Frame 13
play();
Symbol 240 MovieClip Frame 20
gotoAndStop (1);
Symbol 246 Button
on (release) {
gotoAndPlay ("storymode");
}
Symbol 260 Button
on (release) {
_root.gotoAndPlay("c1");
}
Symbol 265 Button
on (release) {
_root.gotoAndPlay("c2");
}
Symbol 270 Button
on (release) {
_root.gotoAndPlay("c3");
}
Symbol 275 Button
on (release) {
_root.gotoAndPlay("c4");
}
Symbol 280 Button
on (release) {
_root.gotoAndPlay("c5");
}
Symbol 284 Button
on (release) {
_root.gotoAndPlay("c6");
}
Symbol 289 Button
on (release) {
_root.gotoAndPlay("c7");
}
Symbol 294 Button
on (release) {
_root.gotoAndPlay("c8");
}
Symbol 298 Button
on (release) {
_root.gotoAndPlay("c9");
}
Symbol 303 Button
on (release) {
_root.gotoAndPlay("c10");
}
Symbol 315 MovieClip Frame 2
newnum = random(10);
if (newnum == 3) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Symbol 316 MovieClip Frame 1
num = random(3) + 1;
plusnum = 0;
decrease = false;
Symbol 316 MovieClip Frame 2
if (plusnum < -3) {
decrease = false;
}
if (plusnum > 3) {
decrease = true;
}
if (decrease == true) {
plusnum = plusnum - num;
}
if (decrease == false) {
plusnum = plusnum + num;
}
this._xscale = this._xscale + plusnum;
this._yscale = this._yscale + plusnum;
Symbol 316 MovieClip Frame 3
gotoAndPlay (2);
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win1 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win2 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win3 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win5 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win7 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win9 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win4 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win6 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win8 == true) {
this._alpha = 100;
}
}
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.win10 == true) {
this._alpha = 100;
}
}
Symbol 320 Button
on (press) {
_root.dragger.dragging = true;
}
on (release) {
_root.dragger.dragging = false;
}
on (releaseOutside) {
_root.dragger.dragging = false;
}
Symbol 331 Button
on (release) {
gotoAndPlay ("menu");
}
Symbol 333 Button
on (release) {
gotoAndPlay ("hub");
}
Symbol 338 Button
on (release) {
_root.pac = false;
gotoAndStop (2);
_root.expac.gotoAndStop(2);
}
Symbol 341 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 2
stop();
Symbol 344 Button
on (release) {
_root.pac = true;
gotoAndStop (3);
_root.exsbc.gotoAndStop(1);
}
Symbol 346 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 2
stop();
Symbol 346 MovieClip Frame 3
stop();
Symbol 354 Button
on (release) {
_root.gotoAndPlay("thebg");
_root.stopAllSounds();
stopAllSounds();
}
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 2
stop();
Symbol 358 Button
on (release) {
gotoAndPlay ("menu");
}
Symbol 362 Button
on (release) {
gotoAndPlay ("hub");
}
Symbol 377 Button
on (release) {
_root.menumusicstart = true;
gotoAndPlay ("t1");
}
Symbol 455 Button
on (release) {
gotoAndPlay ("menu");
}
Symbol 463 MovieClip Frame 1
stop();
_root.createdlevel[_parent.num1][num2] = 0;
Symbol 463 MovieClip Frame 2
stop();
_root.createdlevel[_parent.num1][num2] = 1;
Symbol 463 MovieClip Frame 3
stop();
_root.createdlevel[_parent.num1][num2] = 2;
Symbol 463 MovieClip Frame 4
stop();
_root.createdlevel[_parent.num1][num2] = 3;
Symbol 463 MovieClip Frame 7
stop();
_root.createdlevel[_parent.num1][num2] = 6;
Symbol 463 MovieClip Frame 8
stop();
_root.createdlevel[_parent.num1][num2] = 7;
Instance of Symbol 11 MovieClip in Symbol 463 MovieClip Frame 8
onClipEvent (enterFrame) {
if (_parent.hitTest(_root.game.clip.char.sbchit)) {
_root.win = true;
}
}
Instance of Symbol 463 MovieClip "row1" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 0;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row2" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 1;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row3" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 2;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row4" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 3;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row5" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 4;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row6" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 5;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row7" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 6;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row8" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 7;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row9" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 8;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row10" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 9;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row11" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 10;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row12" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 11;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row13" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 12;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row14" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 13;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row15" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 14;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row16" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 15;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row17" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 16;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row18" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 17;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row19" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 18;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Instance of Symbol 463 MovieClip "row20" in Symbol 464 MovieClip Frame 1
onClipEvent (mouseDown) {
xm = _root._xmouse;
ym = _root._ymouse;
num1 = 0;
num2 = 19;
if (this.hitTest(xm, ym)) {
this.play();
}
}
Symbol 475 Button
on (release) {
play();
_root.win = false;
}
Symbol 480 Button
on (release) {
menumusicstart = true;
gotoAndPlay ("menu");
}
Symbol 488 Button
on (release) {
_root.geleco.gelecotext.text = ((((_root.createdlevel + "A") + (((_root.sbcstart._x - 5) * 1.33333333333333) - 5)) + "B") + (((_root.sbcstart._y - 5) * 1.33333333333333) - 5)) + "C";
_root.geleco._x = 200;
}
Symbol 493 Button
on (release) {
_root.howto._x = 200;
_root.howto.gotoAndStop(1);
}
Symbol 500 Button
on (release) {
_root.inleco._x = 200;
}
Symbol 504 Button
on (release) {
play();
}
Symbol 509 Button
on (release) {
_root.createdlevel = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
_root.gotoAndPlay("lestart");
}
Symbol 510 Button
on (release) {
_parent.play();
}
Symbol 514 MovieClip Frame 1
stop();
Symbol 514 MovieClip Frame 9
stop();
Symbol 516 Button
on (press) {
startDrag (this, true);
}
on (release) {
stopDrag();
_root.sbcx = (_root.sbcstart._x - 5) * 1.33333333333333;
_root.sbcy = (_root.sbcstart._y - 5) * 1.33333333333333;
}
Symbol 519 Button
on (release) {
play();
}
Symbol 531 Button
on (release) {
play();
}
Symbol 533 Button
on (release) {
_root.howto._x = 650;
}
Symbol 550 Button
on (release) {
_root.howto._x = 650;
}
Symbol 556 Button
on (release) {
gotoAndPlay (1);
}
Symbol 563 MovieClip Frame 1
stop();
Symbol 563 MovieClip Frame 2
stop();
Symbol 571 Button
on (release) {
this._x = -316;
}
Symbol 579 Button
on (release) {
myString = _root.inleco.inlecotext.text;
myString.toString();
createdlevel = _root.createdlevel;
_root.createdlevel = [[Number(myString.charAt(0)), Number(myString.charAt(2)), Number(myString.charAt(4)), Number(myString.charAt(6)), Number(myString.charAt(8)), Number(myString.charAt(10)), Number(myString.charAt(12)), Number(myString.charAt(14)), Number(myString.charAt(16)), Number(myString.charAt(18)), Number(myString.charAt(20)), Number(myString.charAt(22)), Number(myString.charAt(24)), Number(myString.charAt(26)), Number(myString.charAt(28)), Number(myString.charAt(30)), Number(myString.charAt(32)), Number(myString.charAt(34)), Number(myString.charAt(36)), Number(myString.charAt(38))], [Number(myString.charAt(40)), Number(myString.charAt(42)), Number(myString.charAt(44)), Number(myString.charAt(46)), Number(myString.charAt(48)), Number(myString.charAt(50)), Number(myString.charAt(52)), Number(myString.charAt(54)), Number(myString.charAt(56)), Number(myString.charAt(58)), Number(myString.charAt(60)), Number(myString.charAt(62)), Number(myString.charAt(64)), Number(myString.charAt(66)), Number(myString.charAt(68)), Number(myString.charAt(70)), Number(myString.charAt(72)), Number(myString.charAt(74)), Number(myString.charAt(76)), Number(myString.charAt(78))], [Number(myString.charAt(80)), Number(myString.charAt(82)), Number(myString.charAt(84)), Number(myString.charAt(86)), Number(myString.charAt(88)), Number(myString.charAt(90)), Number(myString.charAt(92)), Number(myString.charAt(94)), Number(myString.charAt(96)), Number(myString.charAt(98)), Number(myString.charAt(100)), Number(myString.charAt(102)), Number(myString.charAt(104)), Number(myString.charAt(106)), Number(myString.charAt(108)), Number(myString.charAt(110)), Number(myString.charAt(112)), Number(myString.charAt(114)), Number(myString.charAt(116)), Number(myString.charAt(118))], [Number(myString.charAt(120)), Number(myString.charAt(122)), Number(myString.charAt(124)), Number(myString.charAt(126)), Number(myString.charAt(128)), Number(myString.charAt(130)), Number(myString.charAt(132)), Number(myString.charAt(134)), Number(myString.charAt(136)), Number(myString.charAt(138)), Number(myString.charAt(140)), Number(myString.charAt(142)), Number(myString.charAt(144)), Number(myString.charAt(146)), Number(myString.charAt(148)), Number(myString.charAt(150)), Number(myString.charAt(152)), Number(myString.charAt(154)), Number(myString.charAt(156)), Number(myString.charAt(158))], [Number(myString.charAt(160)), Number(myString.charAt(162)), Number(myString.charAt(164)), Number(myString.charAt(166)), Number(myString.charAt(168)), Number(myString.charAt(170)), Number(myString.charAt(172)), Number(myString.charAt(174)), Number(myString.charAt(176)), Number(myString.charAt(178)), Number(myString.charAt(180)), Number(myString.charAt(182)), Number(myString.charAt(184)), Number(myString.charAt(186)), Number(myString.charAt(188)), Number(myString.charAt(190)), Number(myString.charAt(192)), Number(myString.charAt(194)), Number(myString.charAt(196)), Number(myString.charAt(198))], [Number(myString.charAt(200)), Number(myString.charAt(202)), Number(myString.charAt(204)), Number(myString.charAt(206)), Number(myString.charAt(208)), Number(myString.charAt(210)), Number(myString.charAt(212)), Number(myString.charAt(214)), Number(myString.charAt(216)), Number(myString.charAt(218)), Number(myString.charAt(220)), Number(myString.charAt(222)), Number(myString.charAt(224)), Number(myString.charAt(226)), Number(myString.charAt(228)), Number(myString.charAt(230)), Number(myString.charAt(232)), Number(myString.charAt(234)), Number(myString.charAt(236)), Number(myString.charAt(238))], [Number(myString.charAt(240)), Number(myString.charAt(242)), Number(myString.charAt(244)), Number(myString.charAt(246)), Number(myString.charAt(248)), Number(myString.charAt(250)), Number(myString.charAt(252)), Number(myString.charAt(254)), Number(myString.charAt(256)), Number(myString.charAt(258)), Number(myString.charAt(260)), Number(myString.charAt(262)), Number(myString.charAt(264)), Number(myString.charAt(266)), Number(myString.charAt(268)), Number(myString.charAt(270)), Number(myString.charAt(272)), Number(myString.charAt(274)), Number(myString.charAt(276)), Number(myString.charAt(278))], [Number(myString.charAt(280)), Number(myString.charAt(282)), Number(myString.charAt(284)), Number(myString.charAt(286)), Number(myString.charAt(288)), Number(myString.charAt(290)), Number(myString.charAt(292)), Number(myString.charAt(294)), Number(myString.charAt(296)), Number(myString.charAt(298)), Number(myString.charAt(300)), Number(myString.charAt(302)), Number(myString.charAt(304)), Number(myString.charAt(306)), Number(myString.charAt(308)), Number(myString.charAt(310)), Number(myString.charAt(312)), Number(myString.charAt(314)), Number(myString.charAt(316)), Number(myString.charAt(318))], [Number(myString.charAt(320)), Number(myString.charAt(322)), Number(myString.charAt(324)), Number(myString.charAt(326)), Number(myString.charAt(328)), Number(myString.charAt(330)), Number(myString.charAt(332)), Number(myString.charAt(334)), Number(myString.charAt(336)), Number(myString.charAt(338)), Number(myString.charAt(340)), Number(myString.charAt(342)), Number(myString.charAt(344)), Number(myString.charAt(346)), Number(myString.charAt(348)), Number(myString.charAt(350)), Number(myString.charAt(352)), Number(myString.charAt(354)), Number(myString.charAt(356)), Number(myString.charAt(358))], [Number(myString.charAt(360)), Number(myString.charAt(362)), Number(myString.charAt(364)), Number(myString.charAt(366)), Number(myString.charAt(368)), Number(myString.charAt(370)), Number(myString.charAt(372)), Number(myString.charAt(374)), Number(myString.charAt(376)), Number(myString.charAt(378)), Number(myString.charAt(380)), Number(myString.charAt(382)), Number(myString.charAt(384)), Number(myString.charAt(386)), Number(myString.charAt(388)), Number(myString.charAt(390)), Number(myString.charAt(392)), Number(myString.charAt(394)), Number(myString.charAt(396)), Number(myString.charAt(398))], [Number(myString.charAt(400)), Number(myString.charAt(402)), Number(myString.charAt(404)), Number(myString.charAt(406)), Number(myString.charAt(408)), Number(myString.charAt(410)), Number(myString.charAt(412)), Number(myString.charAt(414)), Number(myString.charAt(416)), Number(myString.charAt(418)), Number(myString.charAt(420)), Number(myString.charAt(422)), Number(myString.charAt(424)), Number(myString.charAt(426)), Number(myString.charAt(428)), Number(myString.charAt(430)), Number(myString.charAt(432)), Number(myString.charAt(434)), Number(myString.charAt(436)), Number(myString.charAt(438))], [Number(myString.charAt(440)), Number(myString.charAt(442)), Number(myString.charAt(444)), Number(myString.charAt(446)), Number(myString.charAt(448)), Number(myString.charAt(450)), Number(myString.charAt(452)), Number(myString.charAt(454)), Number(myString.charAt(456)), Number(myString.charAt(458)), Number(myString.charAt(460)), Number(myString.charAt(462)), Number(myString.charAt(464)), Number(myString.charAt(466)), Number(myString.charAt(468)), Number(myString.charAt(470)), Number(myString.charAt(472)), Number(myString.charAt(474)), Number(myString.charAt(476)), Number(myString.charAt(478))], [Number(myString.charAt(480)), Number(myString.charAt(482)), Number(myString.charAt(484)), Number(myString.charAt(486)), Number(myString.charAt(488)), Number(myString.charAt(490)), Number(myString.charAt(492)), Number(myString.charAt(494)), Number(myString.charAt(496)), Number(myString.charAt(498)), Number(myString.charAt(500)), Number(myString.charAt(502)), Number(myString.charAt(504)), Number(myString.charAt(506)), Number(myString.charAt(508)), Number(myString.charAt(510)), Number(myString.charAt(512)), Number(myString.charAt(514)), Number(myString.charAt(516)), Number(myString.charAt(518))], [Number(myString.charAt(520)), Number(myString.charAt(522)), Number(myString.charAt(524)), Number(myString.charAt(526)), Number(myString.charAt(528)), Number(myString.charAt(530)), Number(myString.charAt(532)), Number(myString.charAt(534)), Number(myString.charAt(536)), Number(myString.charAt(538)), Number(myString.charAt(540)), Number(myString.charAt(542)), Number(myString.charAt(544)), Number(myString.charAt(546)), Number(myString.charAt(548)), Number(myString.charAt(550)), Number(myString.charAt(552)), Number(myString.charAt(554)), Number(myString.charAt(556)), Number(myString.charAt(558))], [Number(myString.charAt(560)), Number(myString.charAt(562)), Number(myString.charAt(564)), Number(myString.charAt(566)), Number(myString.charAt(568)), Number(myString.charAt(570)), Number(myString.charAt(572)), Number(myString.charAt(574)), Number(myString.charAt(576)), Number(myString.charAt(578)), Number(myString.charAt(580)), Number(myString.charAt(582)), Number(myString.charAt(584)), Number(myString.charAt(586)), Number(myString.charAt(588)), Number(myString.charAt(590)), Number(myString.charAt(592)), Number(myString.charAt(594)), Number(myString.charAt(596)), Number(myString.charAt(598))], [Number(myString.charAt(600)), Number(myString.charAt(602)), Number(myString.charAt(604)), Number(myString.charAt(606)), Number(myString.charAt(608)), Number(myString.charAt(610)), Number(myString.charAt(612)), Number(myString.charAt(614)), Number(myString.charAt(616)), Number(myString.charAt(618)), Number(myString.charAt(620)), Number(myString.charAt(622)), Number(myString.charAt(624)), Number(myString.charAt(626)), Number(myString.charAt(628)), Number(myString.charAt(630)), Number(myString.charAt(632)), Number(myString.charAt(634)), Number(myString.charAt(636)), Number(myString.charAt(638))], [Number(myString.charAt(640)), Number(myString.charAt(642)), Number(myString.charAt(644)), Number(myString.charAt(646)), Number(myString.charAt(648)), Number(myString.charAt(650)), Number(myString.charAt(652)), Number(myString.charAt(654)), Number(myString.charAt(656)), Number(myString.charAt(658)), Number(myString.charAt(660)), Number(myString.charAt(662)), Number(myString.charAt(664)), Number(myString.charAt(666)), Number(myString.charAt(668)), Number(myString.charAt(670)), Number(myString.charAt(672)), Number(myString.charAt(674)), Number(myString.charAt(676)), Number(myString.charAt(678))], [Number(myString.charAt(680)), Number(myString.charAt(682)), Number(myString.charAt(684)), Number(myString.charAt(686)), Number(myString.charAt(688)), Number(myString.charAt(690)), Number(myString.charAt(692)), Number(myString.charAt(694)), Number(myString.charAt(696)), Number(myString.charAt(698)), Number(myString.charAt(700)), Number(myString.charAt(702)), Number(myString.charAt(704)), Number(myString.charAt(706)), Number(myString.charAt(708)), Number(myString.charAt(710)), Number(myString.charAt(712)), Number(myString.charAt(714)), Number(myString.charAt(716)), Number(myString.charAt(718))], [Number(myString.charAt(720)), Number(myString.charAt(722)), Number(myString.charAt(724)), Number(myString.charAt(726)), Number(myString.charAt(728)), Number(myString.charAt(730)), Number(myString.charAt(732)), Number(myString.charAt(734)), Number(myString.charAt(736)), Number(myString.charAt(738)), Number(myString.charAt(740)), Number(myString.charAt(742)), Number(myString.charAt(744)), Number(myString.charAt(746)), Number(myString.charAt(748)), Number(myString.charAt(750)), Number(myString.charAt(752)), Number(myString.charAt(754)), Number(myString.charAt(756)), Number(myString.charAt(758))], [Number(myString.charAt(760)), Number(myString.charAt(762)), Number(myString.charAt(764)), Number(myString.charAt(766)), Number(myString.charAt(768)), Number(myString.charAt(770)), Number(myString.charAt(772)), Number(myString.charAt(774)), Number(myString.charAt(776)), Number(myString.charAt(778)), Number(myString.charAt(780)), Number(myString.charAt(782)), Number(myString.charAt(784)), Number(myString.charAt(786)), Number(myString.charAt(788)), Number(myString.charAt(790)), Number(myString.charAt(792)), Number(myString.charAt(794)), Number(myString.charAt(796)), Number(myString.charAt(798))]];
coli = 1;
while (coli < 21) {
rowi = 1;
while (rowi < 21) {
namecol = "col" + coli;
namerow = "row" + rowi;
lesscol = coli - 1;
lessrow = rowi - 1;
gotonumber = _root.createdlevel[lesscol][lessrow] + 1;
_root[namecol][namerow].gotoAndStop(gotonumber);
rowi++;
}
coli++;
}
_root.sbcx = myString.slice(myString.indexOf("A") + 1, myString.indexOf("B"));
_root.sbcy = myString.slice(myString.indexOf("B") + 1, myString.indexOf("C"));
this._x = -316;
_root.sbcstart._x = (_root.sbcx * 0.75) + 15;
_root.sbcstart._y = (_root.sbcy * 0.75) + 15;
}
Symbol 584 MovieClip Frame 8
gotoAndPlay (1);
Symbol 584 MovieClip Frame 16
gotoAndPlay (1);
Symbol 586 Button
on (release) {
death = false;
_root.game.clip.char._x = _root.game.clip.char._x + 500;
_root.myMap = _root.level0;
gotoAndPlay (2647);
}
Symbol 594 Button
on (release) {
_root.menumusicstart = true;
gotoAndPlay ("menu");
}
Symbol 596 MovieClip Frame 1
stop();
if (_root.bonusmusicstart == true) {
play();
}
Symbol 596 MovieClip Frame 3
stop();
bonusmusicstart = false;
Symbol 606 Button
on (release) {
play();
}
Symbol 609 Button
on (release) {
stopAllSounds();
_root.menumusicstart == true;
gotoAndPlay ("extra");
}
Instance of Symbol 611 MovieClip in Symbol 612 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = -_parent._rotation;
}
Symbol 618 Button
on (release) {
_root.arsu = 0;
_root.gotoAndPlay(2);
}