Combined Code
// unknown tag 88 length 70
movieClip 17 genericlabel {
}
movieClip 19 dummy {
}
movieClip 22 maxgames_logo2 {
}
movieClip 28 loadermachine {
}
button 32 {
on (press) {
this.startDrag();
}
on (release) {
stopDrag();
}
}
// unknown tag 88 length 63
// unknown tag 88 length 78
button 43 {
on (release) {
previtem = 'a';
gotoAndStop('choose');
}
}
button 45 {
on (release) {
previtem = 'b';
gotoAndStop('choose');
}
}
button 47 {
on (release) {
previtem = 'c';
gotoAndStop('choose');
}
}
button 49 {
on (release) {
previtem = 'd';
gotoAndStop('choose');
}
}
button 51 {
on (release) {
previtem = 'e';
gotoAndStop('choose');
}
}
button 54 {
on (rollOver) {
gotoAndStop(previtem);
}
}
button 57 {
on (release) {
_parent.recentSetting = 100;
gotoAndStop('e');
}
}
button 58 {
on (release) {
_parent.recentSetting = 75;
gotoAndStop('b');
}
}
button 59 {
on (release) {
_parent.recentSetting = 50;
gotoAndStop('c');
}
}
button 60 {
on (release) {
_parent.recentSetting = 25;
gotoAndStop('d');
}
}
button 61 {
on (release) {
_parent.recentSetting = 10;
gotoAndStop('a');
}
}
button 62 {
on (release) {
gotoAndStop(previtem);
}
}
movieClip 63 {
frame 1 {
stop();
}
}
movieClip 69 {
}
movieClip 70 fpsometer {
frame 1 {
var startTime = getTimer();
var numFrames = 0;
var recentSetting = 10;
var recentNumFrames = 0;
var recentStartTime = startTime;
}
frame 1 {
function calcFPS() {
++numFrames;
var v1 = getTimer();
elapsedSeconds = (v1 - startTime) / 1000;
actualFPS = numFrames / elapsedSeconds;
++recentNumFrames;
if (recentNumFrames == recentSetting) {
var v2 = (v1 - recentStartTime) / 1000;
recentFPSoutput = recentNumFrames / v2;
recentStartTime = v1;
recentNumFrames = 0;
}
}
}
instance callCalcFPS of movieClip 69 {
onClipEvent (enterFrame) {
_parent.calcFPS();
}
}
}
movieClip 72 tableclick {
}
movieClip 76 maxgames_logo1 {
}
movieClip 77 maxgamesplaymore {
}
movieClip 86 bigbutton {
}
frame 1 {
function cls() {
var v2;
for (v2 in _root) {
_root[v2].removeMovieClip();
}
}
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split('://');
if (domain_parts[0] == 'file') {
lock = false;
}
real_domain = domain_parts[1].split('/');
for (x in urls_allowed) {
if (_url.indexOf(urls_allowed[x]) != -1) {
lock = false;
}
}
if (lock) {
_root._visible = false;
}
}
var myMenu_cm = new ContextMenu();
myMenu_cm.hideBuiltInItems();
_root.menu = myMenu_cm;
_root.maxgameslogo.onPress = function () {
_root.getURL('http://maxGames.com', '_blank');
};
_root.attachMovie('dummy', 'dummy', _root.getNextHighestDepth(), {'_x': -100, '_y': -100});
_root.dummy.onEnterFrame = function () {
var v2;
var v3;
if (_root.preloadplay == undefined) {
v3 = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
v2 = 0;
while (v2 < 10) {
if (v3 >= (v2 + 1) * 10) {
_root.loadermachine['ld' + (v2 + 1)]._alpha = 100;
}
if (v3 < v2 * 10) {
_root.loadermachine['ld' + (v2 + 1)]._alpha = 0;
}
if (v3 < (v2 + 1) * 10 && v3 >= v2 * 10) {
_root.loadermachine['ld' + (v2 + 1)]._alpha = (v3 - v2 * 10) * 10;
}
++v2;
}
}
if (_root._framesloaded == _root._totalframes && _root.preloadplay == undefined) {
_root.loadermachine._visible = false;
_root.loadpercent = '';
_root.attachMovie('bigbutton', 'preloadplay', _root.getNextHighestDepth(), {'_x': 217, '_y': 406});
_root.preloadplay.txt.text = 'continue';
_root.preloadplay.onPress = function () {
cls();
_root.gotoAndPlay('splash');
};
}
};
urls_allowed = ['smartcode.hu', 'www.smartcode.hu', 'www.flashgamelicense.com', 'flashgamelicense.com', 'maxgames.com'];
stop();
}
movieClip 91 flyingrock1 {
}
movieClip 94 flyingrock2 {
}
movieClip 97 flyingrock3 {
}
movieClip 100 flyingrock4 {
}
movieClip 103 bg1 {
}
movieClip 106 bg2 {
}
movieClip 109 bg3 {
}
movieClip 112 bg4 {
}
movieClip 115 bg5 {
}
movieClip 118 bg6 {
}
movieClip 121 jabber_jumping {
}
movieClip 123 jabber_jumping_left {
}
movieClip 138 jabber_pushing {
frame 13 {
this.gotoAndPlay(7);
}
}
movieClip 146 jabber_pushing_left {
frame 13 {
this.gotoAndPlay(7);
}
}
movieClip 149 jabber_standing {
}
movieClip 151 jabber_standing_left {
}
movieClip 164 jabber_walking {
}
movieClip 171 jabber_walking_left {
}
movieClip 174 {
}
movieClip 177 {
}
movieClip 180 {
}
movieClip 183 {
}
movieClip 184 {
frame 12 {
this._parent.removeMovieClip();
}
}
movieClip 185 boom {
}
movieClip 188 box {
}
movieClip 191 box2 {
}
movieClip 194 box3 {
}
movieClip 196 boxlabel {
}
movieClip 198 brick1 {
}
movieClip 201 dirt1 {
}
movieClip 204 dirt2 {
}
movieClip 207 entrance {
}
movieClip 210 exitb {
}
movieClip 213 exitw {
}
movieClip 230 jumpcube {
}
movieClip 233 platform1 {
}
movieClip 236 platform1b {
}
movieClip 239 platform1c {
}
movieClip 242 platform2 {
}
movieClip 245 platform2b {
}
movieClip 247 platform2c {
}
movieClip 250 platform2d {
}
movieClip 253 platform3 {
}
movieClip 256 platform3b {
}
movieClip 259 platform3c {
}
movieClip 262 platform4 {
}
movieClip 264 platform4b {
}
movieClip 267 platform5 {
}
movieClip 270 platform6 {
}
movieClip 273 platform6b {
}
movieClip 275 platform6c {
}
movieClip 278 platform7 {
}
movieClip 281 platform7b {
}
movieClip 284 platform7c {
}
movieClip 287 platform8 {
}
movieClip 290 platform8b {
}
movieClip 293 platform8c {
}
movieClip 294 platform8d {
}
movieClip 297 puff1 {
frame 15 {
this.removeMovieClip();
}
}
movieClip 299 staticbox1 {
}
movieClip 301 staticbox2 {
}
movieClip 303 staticbox3 {
}
movieClip 306 trash1 {
}
movieClip 309 trash2 {
}
movieClip 312 trash3 {
}
movieClip 327 gamemenu {
}
movieClip 329 gentxt {
}
movieClip 330 icon_exit {
}
movieClip 332 icon_no {
}
movieClip 335 icon_restart {
}
movieClip 338 icon_yes {
}
movieClip 341 sclogo {
}
movieClip 344 title {
}
movieClip 367 slimew {
}
movieClip 380 slimew_left {
}
movieClip 383 {
}
movieClip 384 deadslimeb_fly {
frame 40 {
this.removeMovieClip();
}
}
movieClip 387 {
}
movieClip 388 deadslimew_fly {
frame 40 {
this.removeMovieClip();
}
}
movieClip 409 slimeb {
}
movieClip 414 slimeb_fly_centered {
}
movieClip 415 slimeb_fly {
}
movieClip 426 slimeb_left {
}
movieClip 431 slimew_fly_centered {
}
movieClip 432 slimew_fly {
}
movieClip 437 bigwindow {
}
movieClip 442 gamemenu_right {
}
movieClip 454 hint1 {
}
movieClip 460 {
}
movieClip 461 {
}
movieClip 462 deadjabber_fly {
frame 50 {
this.removeMovieClip();
}
}
movieClip 466 {
}
movieClip 469 {
}
movieClip 472 {
}
movieClip 474 bomb {
}
movieClip 477 blockcol3 {
}
movieClip 478 exitb_right {
}
movieClip 479 exitw_left {
}
movieClip 482 puff2 {
frame 15 {
this.removeMovieClip();
}
}
movieClip 485 puff3 {
frame 15 {
this.removeMovieClip();
}
}
movieClip 488 puff4 {
frame 15 {
this.removeMovieClip();
}
}
movieClip 491 puff5 {
frame 15 {
this.removeMovieClip();
}
}
movieClip 494 puff6 {
frame 15 {
this.removeMovieClip();
}
}
movieClip 505 jabber_idle_speak {
}
movieClip 522 jabber_idle_backward {
}
movieClip 539 jabber_idle_forward {
}
movieClip 552 jabber_idle_speak2 {
}
frame 3 {
function initsfx() {
var v2;
v2 = 0;
while (v2 < _root.sfx.length) {
_root.sfx[v2].object = new Sound();
_root.sfx[v2].object.attachSound(_root.sfx[v2].linkage);
++v2;
}
}
function startsfx(idx) {
if (_root.soundmuted) {
return undefined;
}
if (_root.sfx[idx].laststart == undefined || _root.currframe - _root.sfx[idx].laststart > _root.sfx[idx].len) {
if (_root.sfx[idx].loop) {
_root.sfx[idx].object.start(0, 100000);
} else {
_root.sfx[idx].object.start();
}
if (_root.sfx[idx].vol != undefined) {
_root.sfx[idx].object.setVolume(_root.sfx[idx].vol);
}
_root.sfx[idx].laststart = _root.currframe;
}
}
function stopsfx(idx) {
_root.sfx[idx].object.stop();
}
function stopallsfx() {
var v2;
v2 = 0;
while (v2 < _root.sfx.length) {
_root.sfx[v2].object.stop();
++v2;
}
}
function resetallsfx() {
var v2;
v2 = 0;
while (v2 < _root.sfx.length) {
_root.sfx[v2].laststart = undefined;
++v2;
}
}
var cf;
var nextslimeframe;
var sfx = [{'linkage': 'gamemainmusic', 'len': 0, 'loop': true, 'vol': 20}, {'linkage': 'button', 'len': 0, 'loop': false}, {'linkage': 'boomsnd', 'len': 0, 'loop': false}, {'linkage': 'killbug', 'len': 15, 'loop': false}, {'linkage': 'landing', 'len': 0, 'loop': false}, {'linkage': 'success', 'len': 0, 'loop': false}, {'linkage': 'fallen', 'len': 15, 'loop': false}, {'linkage': 'gamemenumusic', 'len': 0, 'loop': true, 'vol': 20}, {'linkage': 'boing', 'len': 15, 'loop': false}, {'linkage': 'crush', 'len': 0, 'loop': false}, {'linkage': 'hmm1', 'len': 0, 'loop': false, 'vol': 10}, {'linkage': 'hmm2', 'len': 0, 'loop': false, 'vol': 10}, {'linkage': 'hmm3', 'len': 0, 'loop': false, 'vol': 20}, {'linkage': 'fail', 'len': 0, 'loop': false}];
initsfx();
startsfx(7);
nextslimeframe = 0;
cf = 0;
_root.attachMovie('bigbutton', 'startgamebtn', _root.getNextHighestDepth(), {'_x': 75, '_y': 426, '_width': 150, '_height': 45});
_root.startgamebtn.txt.text = 'Start game';
_root.attachMovie('bigbutton', 'aboutbtn', _root.getNextHighestDepth(), {'_x': 245, '_y': 426, '_width': 150, '_height': 45});
_root.aboutbtn.txt.text = 'About';
_root.attachMovie('bigbutton', 'walkthroughbtn', _root.getNextHighestDepth(), {'_x': 415, '_y': 426, '_width': 150, '_height': 45});
_root.walkthroughbtn.txt.text = 'Walkthrough';
_root.playmore.onPress = function () {
_root.getURL('http://maxGames.com', '_blank');
};
_root.attachMovie('sclogo', 'sclogo', _root.getNextHighestDepth(), {'_x': 565, '_y': 14});
_root.sclogo.onPress = function () {
_root.getURL('http://smartcode.hu', '_blank');
};
_root.startgamebtn.onPress = function () {
cls();
_root.gotoAndPlay('startgame');
};
_root.aboutbtn.onPress = function () {
cls();
_root.gotoAndPlay('aboutmenu');
};
_root.walkthroughbtn.onPress = function () {
_root.getURL('http://www.maxgames.com/guides/jabberwocky.html', '_blank');
};
_root.attachMovie('dummy', 'dummy', _root.getNextHighestDepth(), {'_x': -100, '_y': -100});
_root.dummy.onEnterFrame = function () {
var v2;
var v4;
var v3;
var v5;
if (_root.cf == _root.nextslimeframe) {
_root.nextslimeframe = _root.cf + 30 + Math.floor(Math.random() * 30);
if (Math.random() < 0.5) {
v4 = 840;
v3 = true;
v5 = -200;
} else {
v4 = -200;
v3 = false;
v5 = 200;
}
if (_root.cf % 2) {
_root.attachMovie('slimeb', 'slime' + _root.cf, _root.getNextHighestDepth(), {'_x': v4, '_y': 346, '_xscale': v5, '_yscale': 200, 'rev': v3});
} else {
_root.attachMovie('slimew', 'slime' + _root.cf, _root.getNextHighestDepth(), {'_x': v4, '_y': 346, '_xscale': v5, '_yscale': 200, 'rev': v3});
}
}
for (v2 in _root) {
if (v2.substr(0, 5) == 'slime') {
if (_root[v2].rev) {
_root[v2]._x -= 6;
} else {
_root[v2]._x += 6;
}
}
}
++_root.cf;
};
stop();
}
frame 4 {
function tro(obj) {
var v1;
trace('----');
for (v1 in obj) {
trace(v1 + '=' + obj[v1]);
}
trace('----');
}
function cls() {
var v2;
for (v2 in _root) {
_root[v2].removeMovieClip();
}
}
function timestr(tt) {
t = Math.floor(tt / FPS);
t1 = Math.floor(t / 60);
t2 = t % 60;
if (t1 >= 10) {
ret = t1 + ':';
} else {
ret = '0' + t1 + ':';
}
if (t2 >= 10) {
ret += t2;
return ret;
}
ret += '0' + t2;
return ret;
}
function drawhelp(level, helpidx) {
var v3 = _root['lvlhelp' + level][helpidx];
if (v3 == undefined) {
return undefined;
}
_root.attachMovie('hint1', 'hint1', _root.getNextHighestDepth(), {'_x': v3.x, '_y': v3.y});
switch (v3.arr) {
case 1:
_root.hint1.arr._x = 0;
_root.hint1.arr._y = 0;
_root.hint1.arr._rotation = 225;
break;
case 2:
_root.hint1.arr._x = 151;
_root.hint1.arr._y = 0;
_root.hint1.arr._rotation = 315;
break;
case 3:
_root.hint1.arr._x = 151;
_root.hint1.arr._y = 118;
_root.hint1.arr._rotation = 10;
break;
case 4:
_root.hint1.arr._x = 0;
_root.hint1.arr._y = 118;
_root.hint1.arr._rotation = 170;
break;
case 5:
_root.hint1.arr._visible = false;
}
_root.hint1.hint = v3.txt;
_root.hint1.cont.onPress = function () {
this._parent.removeMovieClip();
++_root.currhelp;
drawhelp(_root.currlevel, _root.currhelp);
};
}
function initlevel(level) {
var v5;
var v6;
var v9;
var v11 = [OT_BOX, OT_HERO, OT_BUG, OT_ENTRANCE_B, OT_ENTRANCE_W, OT_EXIT_B, OT_EXIT_W, OT_DIRT, OT_BOMB, OT_BRICK, OT_PARTICLE];
var v7;
resetallsfx();
_root.currframe = 0;
_root.idleframes = 0;
_root.currhelp = 0;
_root.aliveslimeb = 0;
_root.aliveslimew = 0;
_root.gamepaused = false;
if (_root.lvlbg[level].delayatstart == undefined) {
_root.delayatstart = 90;
} else {
_root.delayatstart = _root.lvlbg[level].delayatstart;
}
_root.attachMovie(_root.lvlbg[level].img, 'bg', _root.getNextHighestDepth(), {'_x': 0, '_y': 0, 'cacheAsBitmap': true});
switch (_root.lvlbg[level].deco) {
case 1:
_root.attachMovie('flyingrock1', 'flyingrock1', _root.getNextHighestDepth(), {'_x': 400, '_y': 50, '_width': 300, '_height': 200, 'cacheAsBitmap': true});
_root.flyingrock1.filters = [bl];
_root.attachMovie('flyingrock2', 'flyingrock2', _root.getNextHighestDepth(), {'_x': 0, '_y': 100, 'cacheAsBitmap': true});
_root.flyingrock2.filters = [bl2];
break;
case 2:
_root.attachMovie('flyingrock1', 'flyingrock1', _root.getNextHighestDepth(), {'_x': 100, '_y': 0, '_width': 150, '_height': 100, 'cacheAsBitmap': true});
_root.flyingrock1.filters = [bl3];
_root.attachMovie('flyingrock3', 'flyingrock3', _root.getNextHighestDepth(), {'_x': 300, '_y': 50, '_width': 300, '_height': 200, 'cacheAsBitmap': true});
_root.flyingrock3.filters = [bl];
_root.attachMovie('flyingrock2', 'flyingrock2', _root.getNextHighestDepth(), {'_x': -500, '_y': 100, 'cacheAsBitmap': true});
_root.flyingrock2.filters = [bl2];
break;
case 3:
_root.attachMovie('flyingrock1', 'flyingrock1', _root.getNextHighestDepth(), {'_x': 400, '_y': 150, '_width': 300, '_height': 200, 'cacheAsBitmap': true});
_root.flyingrock1.filters = [bl];
_root.attachMovie('flyingrock2', 'flyingrock2', _root.getNextHighestDepth(), {'_x': -50, '_y': 300, '_width': 500, '_height': 200, 'cacheAsBitmap': true});
_root.flyingrock2.filters = [bl2];
}
if (level == 0) {
_root.bugnum = 100;
} else {
_root.bugnum = 5;
}
if (_root.currlevel == 0) {
_root.attachMovie('genericlabel', 'genericlabel', _root.getNextHighestDepth(), {'_x': SCREEN_W / 2, '_y': 245, 'cacheAsBitmap': true, 'txt': 'Select level'});
_root.attachMovie('bigbutton', 'backtomm', _root.getNextHighestDepth(), {'_x': 245, '_y': 429, '_width': 150, '_height': 45});
_root.backtomm.txt.text = 'Main menu';
_root.backtomm.onPress = function () {
stopallsfx();
cls();
_root.gotoAndPlay('mainmenu');
};
}
v7 = _root.getNextHighestDepth();
if (_root['lvladd' + level] == undefined) {
_root.bugdepth = v7;
v7 += 1000;
}
v9 = 0;
while (v9 < v11.length) {
v5 = 0;
while (v5 < _root['lvladd' + level].length) {
var v4 = _root['lvladd' + level][v5];
var v8;
if (v11[v9] == OT_BUG) {
_root.bugdepth = v7;
v7 += 1000;
}
if (v11[v9] == objprop[v4.code].type) {
if (objprop[v4.code].type == OT_ENTRANCE_B) {
_root.aliveslimeb += _root.bugnum;
}
if (objprop[v4.code].type == OT_ENTRANCE_W) {
_root.aliveslimew += _root.bugnum;
}
if (v4.code == 3) {
v8 = 'hero';
} else {
v8 = objprop[v4.code].proto + '_' + v5;
}
_root.attachMovie(objprop[v4.code].proto, v8, v7, {'_x': v4.x, '_y': v4.y, 'xspeed': objprop[v4.code].xspeed, 'yspeed': objprop[v4.code].yspeed, 'w': objprop[v4.code].w, 'h': objprop[v4.code].h, '_xscale': objprop[v4.code].scale, '_yscale': objprop[v4.code].scale, 'proto': objprop[v4.code].proto, 'type': objprop[v4.code].type, 'objcode': v4.code, 'blocked': false, 'cacheAsBitmap': true});
++v7;
if (v4.lvlcode != undefined) {
_root[v8].attachMovie('boxlabel', 'boxlabel', _root[v8].getNextHighestDepth(), {'_x': _root[v8]._width / 2, '_y': _root[v8]._height / 2});
_root[v8].boxlabel.txt.text = v4.lvlcode;
_root[v8].lvlcode = v4.lvlcode;
if (lvlresults[v4.lvlcode] != undefined) {
if (lvlresults[v4.lvlcode] > 0) {
_root[v8].boxlabel.txt.setTextFormat(_root.my_fmt_green);
} else {
_root[v8].boxlabel.txt.setTextFormat(_root.my_fmt);
}
}
if (lvlresults[v4.lvlcode] != undefined) {
_root[v8].onPress = function () {
_root.currlevel = this.lvlcode;
cls();
initlevel(_root.currlevel);
};
_root[v8].onRollOver = function () {
this.filters = [gl];
};
_root[v8].onRollOut = function () {
this.filters = undefined;
};
} else {
_root[v8]._alpha = 50;
}
}
}
++v5;
}
v5 = 0;
while (v5 < GRIDW) {
v6 = 0;
while (v6 < GRIDH) {
var v3 = _root['lvl' + level][v6][v5];
if (v11[v9] == objprop[v3].type) {
if (objprop[v3].type == OT_ENTRANCE_B) {
_root.aliveslimeb += _root.bugnum;
}
if (objprop[v3].type == OT_ENTRANCE_W) {
_root.aliveslimew += _root.bugnum;
}
if (v3 == 3) {
v8 = 'hero';
} else {
v8 = objprop[v3].proto + '_' + v5 + '_' + v6;
}
_root.attachMovie(objprop[v3].proto, v8, v7, {'_x': v5 * CELLSIZE, '_y': v6 * CELLSIZE, 'xspeed': objprop[v3].xspeed, 'yspeed': objprop[v3].yspeed, 'w': objprop[v3].w, 'h': objprop[v3].h, '_xscale': objprop[v3].scale, '_yscale': objprop[v3].scale, 'proto': objprop[v3].proto, 'type': objprop[v3].type, 'objcode': v3, 'blocked': false, 'cacheAsBitmap': true});
++v7;
}
++v6;
}
++v5;
}
++v9;
}
keystate_l = false;
keystate_r = false;
hero_jumps = true;
hero_lastxspeed = 10;
if (level == 0) {
_root.attachMovie('title', 'title', _root.getNextHighestDepth(), {'_x': SCREEN_W / 2, '_y': 137, 'cacheAsBitmap': true});
if (_root.maxstars != undefined) {
var v30 = 200;
var v29 = 322;
}
} else {
if (_root.lvlbg[level].rightmenu) {
_root.attachMovie('gamemenu_right', 'gamemenu', _root.getNextHighestDepth(), {'_x': SCREEN_W - 154, '_y': 0, 'cacheAsBitmap': true});
} else {
_root.attachMovie('gamemenu', 'gamemenu', _root.getNextHighestDepth(), {'_x': 0, '_y': 0, 'cacheAsBitmap': true});
}
_root.gamemenu.leveltxt = 'level ' + _root.currlevel;
_root.gamemenu.slimebtxt = _root.aliveslimeb;
_root.gamemenu.slimewtxt = _root.aliveslimew;
_root.gamemenu.btn_quit.onPress = function () {
if (_root.dlg == undefined) {
startsfx(1);
_root.gamepaused = true;
showdlg(2);
}
};
_root.gamemenu.btn_restart.onPress = function () {
startsfx(1);
cls();
_root.gamepaused = false;
initlevel(_root.currlevel);
};
_root.gamemenu.btn_sound.onPress = function () {
var v2 = new Sound();
if (_root.soundmuted == false) {
_root.oldvolume = v2.getVolume();
v2.setVolume(0);
_root.soundmuted = true;
_root.gamemenu.icon_sound._visible = false;
} else {
v2.setVolume(_root.oldvolume);
_root.soundmuted = false;
_root.gamemenu.icon_sound._visible = true;
}
};
}
_root.drawhelp(_root.currlevel, _root.currhelp);
_root.attachMovie('maxgames_logo2', 'maxgameslogo', _root.getNextHighestDepth(), {'_x': 10, '_y': SCREEN_H - 32});
_root.maxgameslogo.onPress = function () {
_root.getURL('http://maxgames.com', '_blank');
};
}
function showdlg(type) {
var v9;
var v4 = (SCREEN_W - 453) / 2;
var v3 = (SCREEN_H - 304) / 2;
if (_root.dlg != undefined) {
return undefined;
}
_root.attachMovie('bigwindow', 'dlg', _root.getNextHighestDepth(), {'_x': v4, '_y': v3, 'cacheAsBitmap': true, '_alpha': 0});
_root.dlg.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 2;
}
};
_root.dlg.maxgameslogo.onPress = function () {
_root.getURL('http://maxgames.com', '_blank');
};
_root.dlg.leftbtn.txt.text = 'menu';
_root.dlg.leftbtn.txt.setTextFormat(_root.my_fmt);
_root.dlg.leftbtn.onPress = function () {
_root.gamepaused = false;
_root.currlevel = 0;
cls();
initlevel(_root.currlevel);
};
switch (type) {
case 2:
_root.dlg.txt.text = 'game paused';
_root.dlg.txt.setTextFormat(_root.my_fmt);
_root.dlg.rightbtn.txt.text = 'resume';
_root.dlg.rightbtn.txt.setTextFormat(_root.my_fmt);
_root.dlg.rightbtn.onPress = function () {
_root.gamepaused = false;
startsfx(1);
_root.dlg.removeMovieClip();
_root.dlg2.removeMovieClip();
};
_root.dlg.midbtn._visible = false;
break;
case 1:
startsfx(5);
if (_root.currlevel == NUMLEVELS) {
_root.dlg.txt.text = 'game completed!\ncongratulations!';
_root.dlg.rightbtn._visible = false;
_root.dlg.leftbtn._x += 100;
} else {
_root.dlg.txt.text = 'success!\nall slimes saved!';
}
_root.dlg.rightbtn.txt.text = 'next level';
_root.dlg.rightbtn.setTextFormat(_root.my_fmt);
_root.dlg.rightbtn.onPress = function () {
startsfx(1);
++_root.currlevel;
cls();
initlevel(_root.currlevel);
_root.dlg.removeMovieClip();
};
_root.dlg.midbtn._visible = false;
break;
case 3:
case 4:
startsfx(13);
_root.gamepaused = true;
if (type == 3) {
_root.dlg.txt.text = 'Jabberwocky has gone.\nLevel failed.';
} else {
_root.dlg.txt.text = 'You haven\'t saved all the slimes.\nLevel failed.';
}
_root.dlg.txt.setTextFormat(_root.my_fmt);
_root.dlg.rightbtn.txt.text = 'retry';
_root.dlg.rightbtn.txt.setTextFormat(_root.my_fmt);
_root.dlg.rightbtn.onPress = function () {
_root.gamepaused = false;
cls();
initlevel(_root.currlevel);
};
_root.dlg.midbtn.txt.text = 'walkthrough';
_root.dlg.midbtn.txt.setTextFormat(_root.my_fmt);
_root.dlg.midbtn.onPress = function () {
_root.getURL('http://www.maxgames.com/guides/jabberwocky.html', '_blank');
};
}
}
function countslimes() {
var v2;
v2 = 0;
for (var v3 in _root) {
if (_root[v3].objcode == CODE_SLIMEW || _root[v3].objcode == CODE_SLIMEB) {
++v2;
}
}
return v2;
}
function keydown(keycode) {
if (_root.hint1 != undefined || _root.dlg != undefined) {
return undefined;
}
if (keycode == 82) {
cls();
initlevel(_root.currlevel);
}
if (keycode == 37 || keycode == 65) {
if (Key.isDown(39) || Key.isDown(68)) {
return undefined;
}
_root.idleframes = 0;
keystate_l = true;
_root.hero.xspeed = -HEROSPEED;
hero_lastxspeed = _root.hero.xspeed;
if (_root.hero.proto != 'jabber_pushing_left') {
cloneobj('jabber_walking_left', _root.hero);
}
}
if (keycode == 39 || keycode == 68) {
if (Key.isDown(37) || Key.isDown(65)) {
return undefined;
}
_root.idleframes = 0;
keystate_r = true;
_root.hero.xspeed = HEROSPEED;
hero_lastxspeed = _root.hero.xspeed;
if (_root.hero.proto != 'jabber_pushing') {
cloneobj('jabber_walking', _root.hero);
}
}
if ((keycode == 38 || keycode == 87) && !_root.hero_jumps) {
_root.idleframes = 0;
_root.hero.yspeed = -12;
_root.hero_jumps = true;
if (_root.hero_lastxspeed < 0) {
cloneobj('jabber_jumping_left', _root.hero);
} else {
cloneobj('jabber_jumping', _root.hero);
}
}
}
function keyup(keycode) {
if (_root.hint1 != undefined) {
return undefined;
}
if (keycode == 37 || keycode == 65) {
keystate_l = false;
_root.hero.xspeed = 0;
cloneobj('jabber_standing_left', _root.hero);
_root.idleframes = 0;
}
if (keycode == 39 || keycode == 68) {
keystate_r = false;
_root.hero.xspeed = 0;
cloneobj('jabber_standing', _root.hero);
_root.idleframes = 0;
}
}
function inrect(mousex, mousey, x, y, w, h) {
if (mousex < x || mousex > x + w || mousey < y || mousey > y + h) {
return 0;
} else {
return 1;
}
}
function sgn(n) {
return n > 0 ? 1 : ((n == 0) ? 0 : -1);
}
function lineinrect(x1, y1, x2, y2, x, y, w, h) {
var v2 = x1;
var v1 = y1;
var v10 = SMALLESTOBJ * sgn(x2 - x1);
var v9 = SMALLESTOBJ * sgn(y2 - y1);
var v3 = 0;
if (x1 == x2) {
while (v1 < y2) {
if (inrect(v2, v1, x, y, w, h)) {
++v3;
}
v1 += v9;
}
return v3;
}
while (v2 < x2) {
if (inrect(v2, v1, x, y, w, h)) {
++v3;
}
v2 += v10;
}
return v3;
}
function cloneobj(newproto, obj, falseproto) {
if (obj.proto == newproto) {
return undefined;
}
var v2;
var v4 = obj.getDepth();
var v6;
v6 = obj._currentframe;
v2 = obj._parent.attachMovie(newproto, obj._name, _root.getNextHighestDepth(), obj);
v2._x = obj._x;
v2._y = obj._y;
v2._xscale = obj._xscale;
v2._yscale = obj._yscale;
v2.xspeed = obj.xspeed;
v2.yspeed = obj.yspeed;
if (falseproto != undefined) {
v2.proto = falseproto;
v2.type = obj.type;
v2.objcode = obj.objcode;
v2.cacheAsBitmap = true;
obj.removeMovieClip();
v2.swapDepths(v4);
v2.gotoAndPlay(v6);
return v2;
}
v2.proto = newproto;
v2.type = obj.type;
v2.objcode = obj.objcode;
v2.cacheAsBitmap = true;
obj.removeMovieClip();
v2.swapDepths(v4);
v2.gotoAndPlay(v6);
return v2;
}
function inclevel() {
var v2;
switch (_root.lvlbg[_root.currlevel].deco) {
case 1:
if (_root.currframe % 2) {
--_root.flyingrock1._x;
}
if (_root.flyingrock1._x < -300) {
_root.flyingrock1._x = 640;
}
--_root.flyingrock2._x;
if (_root.flyingrock2._x < -1000) {
_root.flyingrock2._x = 640;
}
break;
case 2:
if (_root.currframe % 4 == 0) {
++_root.flyingrock1._y;
}
if (_root.flyingrock1._y > 480) {
_root.flyingrock1._y = -100;
}
if (_root.currframe % 2) {
++_root.flyingrock3._y;
}
if (_root.flyingrock3._y > 480) {
_root.flyingrock3._y = -200;
}
++_root.flyingrock2._y;
if (_root.flyingrock2._y > 500) {
_root.flyingrock2._y = -560;
_root.flyingrock2._x = -Math.random() * 200 - 400;
}
break;
case 3:
_root.flyingrock1._y = 150 + Math.sin(_root.currframe / 100) * 25;
_root.flyingrock2._y = 300 + Math.sin(_root.currframe / 100) * 50;
}
for (v2 in _root) {
if (_root[v2].type == undefined || _root[v2].type == OT_BRICK || _root[v2].type == OT_DIRT || _root[v2].type == OT_ENTRANCE_B || _root[v2].type == OT_ENTRANCE_W || _root[v2].type == OT_EXIT_B || _root[v2].type == OT_EXIT_W) {
continue;
}
if (_root[v2].type == OT_BOMB && _root[v2].countdown != undefined) {
--_root[v2].countdown;
_root[v2].txt = _root[v2].countdown;
if (_root[v2].countdown == 0) {
startsfx(2);
_root.attachMovie('boom', 'boom', _root.getNextHighestDepth(), {'_x': _root[v2]._x + 20, '_y': _root[v2]._y + 20});
radialboom(v2, _root[v2]._x, _root[v2]._y);
}
}
if (_root[v2].delay != undefined) {
--_root[v2].delay;
if (_root[v2].delay <= 0) {
_root[v2].gotoAndPlay(1);
_root[v2]._visible = true;
_root[v2].delay = undefined;
}
}
if (!_root[v2].blocked && !_root[v2].nograv) {
_root[v2].yspeed += GRAVITY;
} else {
_root[v2].blocked = false;
}
if (_root.currlevel == 0) {
if (_root[v2].yspeed > MAXFALLSPEED2 && _root[v2].type != OT_PARTICLE) {
_root[v2].yspeed = MAXFALLSPEED2;
}
} else {
if (_root[v2].yspeed > MAXFALLSPEED && _root[v2].type != OT_PARTICLE) {
_root[v2].yspeed = MAXFALLSPEED;
}
}
if (_root[v2].type == OT_BUG && Math.abs(_root[v2].xspeed) > objprop[_root[v2].objcode].xspeed) {
if (_root[v2].xspeed < 0) {
_root[v2].xspeed += 0.1;
} else {
_root[v2].xspeed -= 0.1;
}
}
if (_root[v2].type == OT_BUG && Math.abs(_root[v2].xspeed) < objprop[_root[v2].objcode].xspeed) {
if (_root[v2].xspeed < 0) {
_root[v2].xspeed -= 0.1;
} else {
_root[v2].xspeed += 0.1;
}
}
_root[v2]._x += _root[v2].xspeed;
_root[v2]._y += _root[v2].yspeed;
if (_root[v2].type == OT_BOX || _root[v2].type == OT_BOMB) {
_root[v2].xspeed = 0;
}
if (_root[v2]._y > SCREEN_H && (_root[v2].objcode == CODE_SLIMEB || _root[v2].objcode == CODE_SLIMEW || v2 == 'hero')) {
startsfx(6);
}
if (_root[v2]._y > SCREEN_H + 50) {
var v3;
v3 = 'puff' + (Math.floor(Math.random() * 3) + 4);
if (v2 == 'hero') {
_root.attachMovie('deadjabber_fly', 'deadjabber_fly', _root.getNextHighestDepth(), {'_x': _root[v2]._x, '_y': SCREEN_H});
i = 0;
while (i < 15) {
addpuff(v3, _root[v2]._x, SCREEN_H);
++i;
}
showdlg(3);
}
if (_root[v2].objcode == CODE_SLIMEB) {
_root.attachMovie('deadslimeb_fly', 'deadslimeb_fly', _root.getNextHighestDepth(), {'_x': _root[v2]._x, '_y': SCREEN_H});
i = 0;
while (i < 15) {
addpuff(v3, _root[v2]._x, SCREEN_H);
++i;
}
_root[v2].removeMovieClip();
if (_root.warning == undefined) {
_root.attachMovie('genericlabel', 'warning', _root.getNextHighestDepth(), {'_x': SCREEN_W / 2, '_y': 25, 'cacheAsBitmap': true, 'txt': 'dead slime... press \'R\' to restart'});
}
if (countslimes() == 0) {
_root.warning.removeMovieClip();
showdlg(4);
}
}
if (_root[v2].objcode == CODE_SLIMEW) {
_root.attachMovie('deadslimew_fly', 'deadslimew_fly', _root.getNextHighestDepth(), {'_x': _root[v2]._x, '_y': SCREEN_H});
i = 0;
while (i < 15) {
addpuff(v3, _root[v2]._x, SCREEN_H);
++i;
}
_root[v2].removeMovieClip();
if (_root.warning == undefined) {
_root.attachMovie('genericlabel', 'warning', _root.getNextHighestDepth(), {'_x': SCREEN_W / 2, '_y': 25, 'cacheAsBitmap': true, 'txt': 'dead slime... press \'R\' to restart'});
}
if (countslimes() == 0) {
_root.warning.removeMovieClip();
showdlg(4);
}
}
_root[v2].removeMovieClip();
}
}
if (Key.isDown(37) || Key.isDown(65)) {
keydown(37);
}
if (Key.isDown(39) || Key.isDown(68)) {
keydown(39);
}
}
function veclen(vx, vy) {
return Math.sqrt(vx * vx + vy * vy);
}
function veclen2(vx, vy) {
return vx * vx + vy * vy;
}
function boom(x, y) {
var v2;
v2 = 0;
while (v2 < 16) {
_root.attachMovie('trash' + (v2 % 3 + 1), 'trash_' + Math.random(), _root.getNextHighestDepth(), {'_x': x + 5 + (v2 % 4) * 10, '_y': y + 5 + Math.floor(v2 / 4) * 10, 'xspeed': Math.random() * 10 - 5, 'yspeed': Math.random() * -15, 'type': OT_PARTICLE, 'proto': 'trash', 'blocked': false, 'cacheAsBitmap': true});
++v2;
}
}
function radialboom(itemmc, x, y) {
var v2;
if (_root[itemmc] == undefined) {
return undefined;
}
boom(_root[itemmc]._x, _root[itemmc]._y);
_root[itemmc].removeMovieClip();
for (v2 in _root) {
if (_root[v2].type != undefined && (_root[v2].type == OT_DIRT || _root[v2].type == OT_BOMB) && veclen2(_root[v2]._x - x, _root[v2]._y - y) < CELLSIZE * 1.7 * (CELLSIZE * 1.7)) {
if (_root[v2].type == OT_BOMB) {
_root[v2].countdown = BOMBTIMER;
} else {
boom(_root[v2]._x, _root[v2]._y);
_root[v2].removeMovieClip();
}
}
}
}
function addpuff(mc, x, y) {
var v2 = mc + '_' + Math.random();
_root.attachMovie(mc, v2, _root.getNextHighestDepth(), {'_x': x, '_y': y, '_rotation': Math.random() * 360 - 180, '_visible': false, 'delay': Math.random() * 30, 'xspeed': 0, 'yspeed': 0, 'proto': mc, 'type': OT_PARTICLE, 'nograv': true, 'blocked': false, 'cacheAsBitmap': true});
_root[v2].gotoAndStop(1);
}
function trcoll(ki, kivel, komment) {
if (ki == 'box_7_0' && kivel == 'box_12_1' || kivel == 'box_7_0' && ki == 'box_12_1') {
}
}
function collcheck(itemmc, w, h) {
var v3;
var v15 = 0;
var v4 = _root[itemmc]._x;
var v5 = _root[itemmc]._y;
for (v3 in _root) {
if (_root[v3].type == undefined || v4 > _root[v3]._x + _root[v3].w || v4 + w < _root[v3]._x || v5 > _root[v3]._y + _root[v3].h || v5 + h < _root[v3]._y || itemmc == v3) {
continue;
}
if (_root[itemmc].type == OT_HERO && _root[v3].type == OT_BUG || _root[itemmc].type == OT_BUG && _root[v3].type == OT_HERO) {
continue;
}
if (_root[itemmc].type == OT_BUG && _root[v3].type == OT_BUG) {
continue;
}
if (_root[itemmc].type == OT_BUG && (_root[itemmc].objcode == CODE_SLIMEW && _root[v3].type == OT_EXIT_W || _root[itemmc].objcode == CODE_SLIMEB && _root[v3].type == OT_EXIT_B)) {
var v7;
var v9;
v9 = 'puff' + (Math.floor(Math.random() * 3) + 1);
startsfx(3);
v7 = 0;
while (v7 < 15) {
addpuff(v9, _root[v3]._x + CELLSIZE / 2, _root[v3]._y + CELLSIZE / 2);
++v7;
}
if (_root[itemmc].objcode == CODE_SLIMEW) {
--_root.aliveslimew;
} else {
--_root.aliveslimeb;
}
_root.gamemenu.slimebtxt = _root.aliveslimeb;
_root.gamemenu.slimewtxt = _root.aliveslimew;
_root[itemmc].removeMovieClip();
if (_root.aliveslimew == 0 && _root.aliveslimeb == 0 && _root.currlevel > 0) {
lvlresults[_root.currlevel] = _root.currframe;
if (_root.lvlresults[_root.currlevel + 1] == undefined) {
_root.lvlresults[_root.currlevel + 1] = 0;
}
savestate();
showdlg(1);
} else {
if (countslimes() == 0) {
_root.warning.removeMovieClip();
showdlg(4);
}
}
break;
}
switch (_root[v3].type) {
if (_root[v3].type !== OT_HERO) {
} else {
case OT_BRICK:
case OT_DIRT:
case OT_BOX:
case OT_BOMB:
case OT_BUG:
if (_root[itemmc].yspeed < 0 && lineinrect(v4, v5, v4 + w, v5, _root[v3]._x, _root[v3]._y, _root[v3].w, _root[v3].h) > 1) {
trcoll(itemmc, v3, 'felul');
_root[itemmc].yspeed = 0;
_root[itemmc]._y = _root[v3]._y + _root[v3].h;
} else {
if (_root[itemmc].yspeed >= 0 && lineinrect(v4, v5 + h, v4 + w, v5 + h, _root[v3]._x, _root[v3]._y, _root[v3].w, _root[v3].h) > 1 && !(_root[itemmc].type == OT_BOX && _root[v3].type == OT_BUG && _root[itemmc].yspeed == 0)) {
var v14 = _root[itemmc].yspeed;
trcoll(itemmc, v3, 'alul');
if ((_root[itemmc].type == OT_BUG || _root[itemmc].type == OT_BOX) && _root[v3].type == OT_BOX && _root[v3].objcode == CODE_JUMPCUBE) {
startsfx(8);
_root[itemmc].yspeed = -GRAVITY * 15;
_root[itemmc].xspeed *= 3;
if (_root[itemmc].xspeed > MAXSLIMESPEED) {
_root[itemmc].xspeed = MAXSLIMESPEED;
}
if (_root[itemmc].xspeed < -MAXSLIMESPEED) {
_root[itemmc].xspeed = -MAXSLIMESPEED;
}
} else {
if (_root[itemmc].type == OT_BOX && _root[v3].type == OT_BUG) {
startsfx(9);
if (_root[v3].objcode == CODE_SLIMEB) {
_root.attachMovie('deadslimeb_fly', 'deadslimeb_fly', _root.getNextHighestDepth(), {'_x': _root[v3]._x, '_y': _root[v3]._y});
} else {
_root.attachMovie('deadslimew_fly', 'deadslimew_fly', _root.getNextHighestDepth(), {'_x': _root[v3]._x, '_y': _root[v3]._y});
}
_root[v3].removeMovieClip();
if (_root.warning == undefined) {
_root.attachMovie('genericlabel', 'warning', _root.getNextHighestDepth(), {'_x': SCREEN_W / 2, '_y': 25, 'cacheAsBitmap': true, 'txt': 'dead slime... press \'R\' to restart'});
}
if (countslimes() == 0) {
_root.warning.removeMovieClip();
showdlg(4);
}
} else {
if (_root[itemmc].type == OT_BOMB && _root[itemmc].yspeed > 2 && _root[itemmc].countdown == undefined) {
_root[itemmc].countdown = BOMBTIMER;
}
if (_root[itemmc].type == OT_BUG && _root[itemmc].yspeed > 0) {
if (_root[itemmc].objcode == CODE_SLIMEW) {
if (_root[itemmc].xspeed > 0) {
cloneobj('slimew', _root[itemmc]);
} else {
cloneobj('slimew_left', _root[itemmc]);
}
_root[itemmc].gotoAndPlay(Math.floor(Math.random() * 10));
} else {
if (_root[itemmc].xspeed > 0) {
cloneobj('slimeb', _root[itemmc]);
} else {
cloneobj('slimeb_left', _root[itemmc]);
}
_root[itemmc].gotoAndPlay(Math.floor(Math.random() * 10));
}
}
_root[itemmc]._y = _root[v3]._y - h;
_root[itemmc].yspeed = 0;
_root[itemmc].blocked = true;
if (itemmc == 'hero') {
if (_root.hero_jumps) {
startsfx(4);
if (_root.hero_lastxspeed < 0) {
cloneobj('jabber_standing_left', _root.hero);
} else {
cloneobj('jabber_standing', _root.hero);
}
_root.idleframes = 0;
}
_root.hero_jumps = false;
v15 = 1;
}
break;
if (_root[v3].type == OT_HERO) {
} else {
if (_root[itemmc].xspeed >= 0 && lineinrect(v4 + w, v5, v4 + w, v5 + h, _root[v3]._x, _root[v3]._y, _root[v3].w, _root[v3].h) > 1) {
trcoll(itemmc, v3, 'jobbra');
if (itemmc == 'hero' && (_root[v3].type == OT_BOX || _root[v3].type == OT_BOMB)) {
if (_root.hero.proto != 'jabber_pushing' && _root.hero.xspeed != 0) {
cloneobj('jabber_pushing', _root.hero);
}
_root[v3].xspeed = HEROSPEED;
_root[v3]._x = _root[itemmc] + w;
_root[itemmc]._x = _root[v3]._x - w;
} else {
if (_root[itemmc].type == OT_BUG) {
if (_root[itemmc].objcode == CODE_SLIMEW) {
cloneobj('slimew_left', _root[itemmc]);
} else {
cloneobj('slimeb_left', _root[itemmc]);
}
_root[itemmc].xspeed = -_root[itemmc].xspeed;
} else {
_root[itemmc].xspeed = 0;
}
_root[itemmc]._x = _root[v3]._x - w;
break;
if (_root[itemmc].xspeed <= 0 && lineinrect(v4, v5, v4, v5 + h, _root[v3]._x, _root[v3]._y, _root[v3].w, _root[v3].h) > 1) {
trcoll(itemmc, v3, 'balra');
if (itemmc == 'hero' && (_root[v3].type == OT_BOX || _root[v3].type == OT_BOMB)) {
if (_root.hero.proto != 'jabber_pushing_left' && _root.hero.xspeed != 0) {
cloneobj('jabber_pushing_left', _root.hero);
}
_root[v3].xspeed = -HEROSPEED;
_root[v3]._x = _root[itemmc] - _root[v3].w;
_root[itemmc]._x = _root[v3]._x + _root[v3].w;
} else {
if (_root[itemmc].type == OT_BUG) {
if (_root[itemmc].objcode == CODE_SLIMEW) {
cloneobj('slimew', _root[itemmc]);
} else {
cloneobj('slimeb', _root[itemmc]);
}
_root[itemmc].xspeed = -_root[itemmc].xspeed;
} else {
_root[itemmc].xspeed = 0;
}
_root[itemmc]._x = _root[v3]._x + _root[v3].w;
break;
}
}
}
}
}
}
}
}
}
}
}
}
if (v4 < 0 && _root[itemmc].xspeed < 0) {
if (_root[itemmc].type == OT_BUG) {
if (_root[itemmc].objcode == CODE_SLIMEW) {
cloneobj('slimew', _root[itemmc]);
} else {
cloneobj('slimeb', _root[itemmc]);
}
_root[itemmc].xspeed = -_root[itemmc].xspeed;
} else {
_root[itemmc].xspeed = 0;
}
if (itemmc == 'hero') {
_root[itemmc]._x = 0;
}
}
if (v4 > SCREEN_W - w && _root[itemmc].xspeed > 0) {
if (_root[itemmc].type == OT_BUG) {
if (_root[itemmc].objcode == CODE_SLIMEW) {
cloneobj('slimew_left', _root[itemmc]);
} else {
cloneobj('slimeb_left', _root[itemmc]);
}
_root[itemmc].xspeed = -_root[itemmc].xspeed;
} else {
_root[itemmc].xspeed = 0;
}
if (itemmc == 'hero') {
_root[itemmc]._x = SCREEN_W - w;
}
}
return v15;
}
function savestate() {
i = 0;
while (i < NUMLEVELS + 1) {
_root.local_data.data['lvl' + i] = _root.lvlresults[i];
++i;
}
}
function loadstate() {
i = 0;
while (i < NUMLEVELS + 1) {
lvlresults[i] = _root.local_data.data['lvl' + i];
++i;
}
if (lvlresults[1] == undefined) {
lvlresults[1] = 0;
}
}
var local_data = SharedObject.getLocal('jabberwocky_gamestate');
var FPS = 30;
var lvlpar = Array();
var lvlbg = Array();
lvlpar[0] = undefined;
lvlbg[0] = {'img': 'bg4', 'deco': 1};
var lvladd0 = [{'code': 2, 'x': 515, 'y': -250, 'lvlcode': 25}, {'code': 30, 'x': 525, 'y': -150, 'lvlcode': 24}, {'code': 30, 'x': 520, 'y': -50, 'lvlcode': 23}, {'code': 29, 'x': 440, 'y': -150, 'lvlcode': 22}, {'code': 2, 'x': 470, 'y': -250, 'lvlcode': 21}, {'code': 30, 'x': 400, 'y': -300, 'lvlcode': 20}, {'code': 2, 'x': 390, 'y': -345, 'lvlcode': 16}, {'code': 29, 'x': 435, 'y': -350, 'lvlcode': 18}, {'code': 2, 'x': 350, 'y': -400, 'lvlcode': 17}, {'code': 2, 'x': 450, 'y': -450, 'lvlcode': 19}, {'code': 2, 'x': 310, 'y': -450, 'lvlcode': 15}, {'code': 2, 'x': 330, 'y': -500, 'lvlcode': 14}, {'code': 2, 'x': 265, 'y': -550, 'lvlcode': 13}, {'code': 2, 'x': 335, 'y': -590, 'lvlcode': 12}, {'code': 29, 'x': 245, 'y': -600, 'lvlcode': 11}, {'code': 2, 'x': 280, 'y': -650, 'lvlcode': 10}, {'code': 2, 'x': 200, 'y': -750, 'lvlcode': 9}, {'code': 30, 'x': 205, 'y': -700, 'lvlcode': 8}, {'code': 29, 'x': 125, 'y': -750, 'lvlcode': 7}, {'code': 30, 'x': 155, 'y': -950, 'lvlcode': 6}, {'code': 2, 'x': 85, 'y': -800, 'lvlcode': 5}, {'code': 2, 'x': 105, 'y': -850, 'lvlcode': 4}, {'code': 2, 'x': 110, 'y': -900, 'lvlcode': 3}, {'code': 30, 'x': 100, 'y': -950, 'lvlcode': 1}, {'code': 2, 'x': 150, 'y': -1050, 'lvlcode': 2}];
var lvl0 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 15, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[1] = 20 * FPS;
lvlbg[1] = {'img': 'bg2', 'deco': 3, 'delayatstart': 30};
var lvladd1 = [{'code': 9, 'x': 140, 'y': 184}];
var lvl1 = [[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, 2, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0]];
var lvlhelp1 = [{'x': 270, 'y': 234, 'arr': 1, 'txt': 'You are here. Control Jabberwocky with the arrow or WASD keys.'}, {'x': 233, 'y': 302, 'arr': 1, 'txt': 'Slimes are coming from here. You can touch them, they don\'t hurt.'}, {'x': 185, 'y': 206, 'arr': 4, 'txt': 'Help them to find the way here. Save them all!'}, {'x': 400, 'y': 232, 'arr': 1, 'txt': 'Push the rock off the platform to change their direction'}];
lvlpar[2] = 20 * FPS;
lvlbg[2] = {'img': 'bg3', 'deco': 1, 'delayatstart': 30};
var lvladd2 = [{'code': 9, 'x': 60, 'y': 144}];
var lvl2 = [[0, 0, 0, 0, 0, 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, 0, 0, 0, 6, 0, 0, 0, 0, 0], [0, 22, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 7, 0, 0, 0, 0, 0, 5, 5, 5, 7, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 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, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [7, 0, 0, 0, 0, 0, 22, 0, 7, 0, 0, 0, 0, 0, 22, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var lvlhelp2 = [{'x': 118, 'y': 350, 'arr': 2, 'txt': 'Some of the stones can be exploded'}, {'x': 170, 'y': 179, 'arr': 2, 'txt': 'Push this explosive off to break through the lower platform.'}, {'x': 170, 'y': 179, 'arr': 2, 'txt': 'The explosive destroys the direct neightbours only.'}];
lvlpar[3] = 25 * FPS;
lvlbg[3] = {'img': 'bg6', 'deco': 3, 'rightmenu': true};
var lvladd3 = [{'code': 9, 'x': 0, 'y': -3}];
var lvl3 = [[0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0], [35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 29, 0, 0, 0], [0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0], [8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[4] = 25 * FPS;
lvlbg[4] = {'img': 'bg4', 'deco': 1, 'rightmenu': true};
var lvladd4 = [{'code': 9, 'x': 40, 'y': -3}];
var lvl4 = [[0, 0, 0, 0, 0, 30, 0, 0, 0, 30, 0, 3, 0, 0, 0, 0], [0, 0, 0, 2, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0], [14, 0, 0, 0, 14, 0, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[5] = 50 * FPS;
lvlbg[5] = {'img': 'bg1', 'deco': 3};
var lvladd5 = [{'code': 51, 'x': 40, 'y': 184}, {'code': 22, 'x': 200, 'y': 100}];
var lvl5 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 22, 0, 0, 22, 0, 23, 0, 0, 0, 0, 0], [22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var lvlhelp5 = [{'x': 110, 'y': 179, 'arr': 2, 'txt': 'This is a flexible stone. Slimes will jump if they step on it.'}, {'x': 110, 'y': 179, 'arr': 2, 'txt': 'Push this off the platform and see what happens'}];
lvlpar[6] = 50 * FPS;
lvlbg[6] = {'img': 'bg6', 'deco': 2};
var lvladd6 = [{'code': 22, 'x': 160, 'y': 340}, {'code': 22, 'x': 160, 'y': 380}, {'code': 22, 'x': 160, 'y': 300}, {'code': 23, 'x': 240, 'y': 380}, {'code': 22, 'x': 320, 'y': 340}, {'code': 22, 'x': 320, 'y': 300}, {'code': 22, 'x': 320, 'y': 380}, {'code': 9, 'x': 580, 'y': 64}, {'code': 33, 'x': 388, 'y': 120}, {'code': 21, 'x': 428, 'y': 120}];
var lvl6 = [[0, 0, 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, 22, 0], [0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 10, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 22, 0], [7, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 23, 22, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[7] = 50 * FPS;
lvlbg[7] = {'img': 'bg4', 'deco': 1};
var lvladd7 = [{'code': 9, 'x': 60, 'y': 104}, {'code': 51, 'x': 540, 'y': 104}];
var lvl7 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0], [0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0], [0, 0, 0, 0, 25, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0], [0, 0, 54, 55, 0, 54, 55, 0, 54, 55, 0, 54, 55, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var lvlhelp7 = [{'x': 287, 'y': 179, 'arr': 5, 'txt': 'There are two kind of slimes: white and striped.'}, {'x': 273, 'y': 172, 'arr': 4, 'txt': 'White ones go to the white shell.'}, {'x': 224, 'y': 168, 'arr': 3, 'txt': 'Striped ones go to this one.'}, {'x': 391, 'y': 165, 'arr': 1, 'txt': 'Now push this block down.'}];
lvlpar[8] = 25 * FPS;
lvlbg[8] = {'img': 'bg4', 'deco': 1};
var lvladd8 = [{'code': 9, 'x': 80, 'y': 144}, {'code': 27, 'x': 200, 'y': 380}, {'code': 28, 'x': 400, 'y': 380}];
var lvl8 = [[0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 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], [7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 27, 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, 2, 0, 0, 0, 0, 0, 0, 27], [0, 0, 27, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 12, 0], [23, 7, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[9] = 25 * FPS;
lvlbg[9] = {'img': 'bg5', 'deco': 2};
var lvladd9 = [{'code': 9, 'x': 20, 'y': 58}];
var lvl9 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [27, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [27, 0, 27, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 2, 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, 2, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 28], [15, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 15, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[10] = 50 * FPS;
lvlbg[10] = {'img': 'bg2', 'deco': 3, 'rightmenu': true};
var lvladd10 = [{'code': 14, 'x': -80, 'y': 200}, {'code': 9, 'x': 40, 'y': -2}, {'code': 51, 'x': 440, 'y': -2}, {'code': 57, 'x': 400, 'y': -40}];
var lvl10 = [[0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 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, 0, 0, 0, 0, 0], [0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0], [0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0], [0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[11] = 37 * FPS;
lvlbg[11] = {'img': 'bg5', 'deco': 2};
var lvladd11 = [{'code': 8, 'x': -40, 'y': 240}, {'code': 24, 'x': -30, 'y': 160}, {'code': 25, 'x': 590, 'y': 160}, {'code': 9, 'x': 20, 'y': 304}];
var lvl11 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0], [0, 0, 22, 0, 23, 22, 0, 0, 0, 22, 0, 23, 22, 0, 0, 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, 0, 6, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0], [22, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 58, 0], [7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0]];
lvlpar[12] = 50 * FPS;
lvlbg[12] = {'img': 'bg5', 'deco': 3, 'rightmenu': true};
var lvladd12 = [{'code': 9, 'x': 10, 'y': -3}, {'code': 23, 'x': 80, 'y': 300}, {'code': 23, 'x': 200, 'y': 300}];
var lvl12 = [[0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0], [0, 3, 0, 0, 22, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [55, 0, 53, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0], [0, 0, 13, 0, 13, 54, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0], [0, 0, 5, 5, 5, 0, 0, 0, 5, 5, 5, 0, 0, 22, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0], [0, 22, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 22, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0], [22, 0, 22, 0, 7, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0]];
lvlpar[13] = 50 * FPS;
lvlbg[13] = {'img': 'bg3', 'deco': 1};
var lvladd13 = [{'code': 8, 'x': -40, 'y': 160}, {'code': 8, 'x': 370, 'y': 380}, {'code': 9, 'x': 20, 'y': 64}, {'code': 27, 'x': 330, 'y': 80}, {'code': 58, 'x': 520, 'y': 340}];
var lvl13 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0], [22, 0, 0, 0, 2, 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, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 22, 0, 0, 0, 0], [0, 0, 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, 12], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[14] = 50 * FPS;
lvlbg[14] = {'img': 'bg3', 'deco': 2, 'rightmenu': true, 'delayatstart': 150};
var lvladd14 = [{'code': 9, 'x': 540, 'y': 220}, {'code': 9, 'x': 580, 'y': 220}];
var lvl14 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 53, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 36, 37, 37, 38, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 35, 0, 0], [22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0], [22, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 22, 0], [0, 0, 0, 22, 0, 22, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[15] = 25 * FPS;
lvlbg[15] = {'img': 'bg3', 'deco': 1};
var lvladd15 = [{'code': 51, 'x': 560, 'y': 37}];
var lvl15 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 55, 0], [0, 0, 0, 0, 6, 0, 6, 0, 0, 6, 0, 0, 0, 0, 0, 0], [8, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 13, 13, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 13, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 55, 0, 55, 0, 54], [0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 55, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 13, 13, 55, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 13, 6, 13, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 13, 6, 13, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 13, 6, 13, 13, 13, 0, 0, 0, 52, 0, 0, 0], [8, 0, 0, 0, 0, 0, 0, 24, 0, 8, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[16] = 50 * FPS;
lvlbg[16] = {'img': 'bg3', 'deco': 2, 'rightmenu': true, 'delayatstart': 180};
var lvladd16 = [{'code': 8, 'x': -160, 'y': 240}, {'code': 55, 'x': 260, 'y': 280}, {'code': 9, 'x': 40, 'y': -3}, {'code': 51, 'x': 440, 'y': -3}];
var lvl16 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [25, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 24, 0, 0, 0, 2, 3, 0, 0, 0, 0, 58, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 25, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0], [0, 59, 0, 2, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 26], [55, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 55, 0, 54, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[17] = 50 * FPS;
lvlbg[17] = {'img': 'bg2', 'deco': 2, 'rightmenu': true};
var lvladd17 = [{'code': 51, 'x': 600, 'y': 140}];
var lvl17 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0], [0, 55, 0, 55, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0], [0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0], [0, 13, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 13, 0, 0, 0, 0, 53, 0, 0, 6, 0, 0, 0, 0, 0, 0], [13, 13, 13, 13, 0, 55, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0], [14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0], [0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 55, 0, 54, 0, 55, 0, 55, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[18] = 50 * FPS;
lvlbg[18] = {'img': 'bg3', 'deco': 2, 'rightmenu': true, 'delayatstart': 150};
var lvl18 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 53, 0, 55, 0, 0, 0, 0, 3, 0, 0, 15, 0, 0], [0, 0, 55, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0], [0, 0, 0, 53, 0, 0, 0, 53, 0, 55, 0, 0, 29, 0, 0, 0], [0, 0, 0, 54, 0, 0, 54, 55, 0, 0, 0, 0, 15, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [55, 0, 54, 0, 0, 55, 0, 54, 55, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0], [0, 0, 0, 54, 0, 0, 0, 29, 0, 0, 0, 0, 15, 0, 0, 0], [0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[19] = 50 * FPS;
lvlbg[19] = {'img': 'bg5', 'deco': 2};
var lvladd19 = [{'code': 9, 'x': 20, 'y': 218}];
var lvl19 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 29, 0, 0, 53, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 27, 0], [27, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 53, 0, 3, 0, 0, 0, 0, 0, 0, 54], [0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 53, 56], [55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0], [0, 55, 0, 12, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 54], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 27, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[20] = 50 * FPS;
lvlbg[20] = {'img': 'bg5', 'deco': 2};
var lvl20 = [[0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0], [0, 51, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0], [0, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 52], [55, 0, 55, 0, 0, 54, 55, 0, 0, 55, 0, 55, 0, 2, 55, 0], [0, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 0, 30, 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, 30, 0, 0, 0, 27, 0, 27, 0], [0, 0, 0, 27, 0, 27, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0], [27, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 27, 0, 27, 0, 0, 0, 27, 0, 0, 0], [0, 0, 27, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[21] = 50 * FPS;
lvlbg[21] = {'img': 'bg1', 'deco': 3, 'delayatstart': 180};
var lvladd21 = [{'code': 51, 'x': 200, 'y': -3}, {'code': 52, 'x': 580, 'y': 240}];
var lvl21 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 53, 3, 0, 0, 0, 0], [0, 0, 15, 0, 0, 0, 0, 0, 0, 55, 0, 55, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 54, 55], [55, 0, 54, 0, 0, 0, 53, 0, 0, 0, 29, 0, 0, 0, 55, 0], [54, 55, 0, 15, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 15], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[22] = 50 * FPS;
lvlbg[22] = {'img': 'bg6', 'deco': 3};
var lvladd22 = [{'code': 9, 'x': 200, 'y': -3}];
var lvl22 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0], [23, 22, 0, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 22, 0, 0], [0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0], [13, 2, 0, 0, 0, 0, 0, 23, 22, 0, 0, 0, 0, 0, 0, 0], [23, 22, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 22, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0]];
lvlpar[23] = 50 * FPS;
lvlbg[23] = {'img': 'bg5', 'deco': 2, 'rightmenu': true};
var lvladd23 = [{'code': 51, 'x': 100, 'y': 34}, {'code': 23, 'x': 100, 'y': 15}];
var lvl23 = [[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, 41, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0], [0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 26, 26, 0, 0, 26, 0], [0, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0], [22, 0, 23, 22, 0, 0, 0, 56, 54, 0, 0, 54, 0, 0, 0, 26], [0, 0, 29, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 52], [0, 55, 0, 55, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 55, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0], [15, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 15, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
lvlpar[24] = 40 * FPS;
lvlbg[24] = {'img': 'bg4', 'deco': 1};
var lvladd24 = [{'code': 22, 'x': -40, 'y': 280}, {'code': 51, 'x': 20, 'y': 344}];
var lvl24 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0], [0, 0, 0, 22, 0, 0, 0, 0, 25, 0, 26, 24, 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, 6, 0, 0, 0, 0, 0, 12], [0, 0, 0, 0, 0, 0, 5, 5, 5, 27, 0, 28, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0], [0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [22, 0, 22, 0, 23, 5, 5, 5, 8, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 52, 0], [14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0]];
lvlpar[25] = 50 * FPS;
lvlbg[25] = {'img': 'bg5', 'deco': 3, 'rightmenu': true};
var lvladd25 = [{'code': 6, 'x': 220, 'y': 40}, {'code': 51, 'x': 20, 'y': 184}, {'code': 52, 'x': 620, 'y': 320}];
var lvl25 = [[0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 25, 0, 26, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 29, 0, 0, 30, 0, 26, 0, 0, 0, 0, 0, 0, 0], [22, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0], [13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 26], [55, 0, 54, 55, 0, 54, 55, 0, 54, 56, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 56, 56, 0, 56], [0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 55, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 55, 0, 55, 0]];
var lvlresults = Array();
var SCREEN_W = 640;
var SCREEN_H = 480;
var CELLSIZE = 40;
var GRIDW = 16;
var GRIDH = 12;
var GRAVITY = 0.85;
var SMALLESTOBJ = 10;
var HEROSPEED = 5;
var MAXFALLSPEED = 10;
var MAXFALLSPEED2 = 20;
var BUGFREQ = 60;
var BOMBTIMER = 30;
var NUMLEVELS = 25;
var MAXSLIMESPEED = 6;
var keystate_l;
var keystate_r;
var OT_HERO = 0;
var OT_BRICK = 1;
var OT_BUG = 2;
var OT_BOX = 3;
var OT_DIRT = 4;
var OT_BOMB = 5;
var OT_PARTICLE = 6;
var OT_ENTRANCE_B = 7;
var OT_ENTRANCE_W = 8;
var OT_EXIT_B = 9;
var OT_EXIT_W = 10;
var hero_jumps;
var hero_lastxspeed;
var currframe;
var idleframes;
var aliveslimeb;
var aliveslimew;
var currlevel;
var currhelp;
var soundmuted = false;
var gamepaused = false;
var bugnum;
var maxstars;
var bugdepth;
var CODE_JUMPCUBE = 53;
var CODE_SLIMEW = 4;
var CODE_SLIMEB = 11;
var delayatstart;
var my_fmt = new TextFormat();
my_fmt.letterSpacing = 2;
var my_fmt_green = new TextFormat();
my_fmt_green.letterSpacing = 2;
my_fmt_green.color = 3394611;
var objprop = [{'proto': '', 'type': 0, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 0, 'h': 0}, {'proto': 'brick1', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 40}, {'proto': 'box', 'type': OT_BOX, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 41, 'h': 41}, {'proto': 'jabber_walking', 'type': OT_HERO, 'xspeed': 0, 'yspeed': 0, 'scale': 40, 'w': 41, 'h': 21}, {'proto': 'slimew_fly', 'type': OT_BUG, 'xspeed': 2, 'yspeed': 0, 'scale': 50, 'w': 31, 'h': 12}, {'proto': 'dirt1', 'type': OT_DIRT, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 40}, {'proto': 'bomb', 'type': OT_BOMB, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 41, 'h': 41}, {'proto': 'platform1', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 240, 'h': 25}, {'proto': 'platform2', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 280, 'h': 20}, {'proto': 'entrance', 'type': OT_ENTRANCE_W, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 40}, {'proto': 'exitw', 'type': OT_EXIT_W, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 10, 'h': 40}, {'proto': 'slimeb_fly', 'type': OT_BUG, 'xspeed': 2, 'yspeed': 0, 'scale': 50, 'w': 31, 'h': 12}, {'proto': 'platform3', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 280, 'h': 19}, {'proto': 'dirt2', 'type': OT_DIRT, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 40}, {'proto': 'platform4', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 160, 'h': 30}, {'proto': 'platform5', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 240, 'h': 30}, {'proto': 'platform6', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 200, 'h': 27}, {'proto': 'block1', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 27, 'h': 55}, {'proto': 'block2', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 77, 'h': 45}, {'proto': 'block3', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 67, 'h': 56}, {'proto': 'block4', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 60, 'h': 69}, {'proto': 'platform7', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 64, 'h': 20}, {'proto': 'platform1b', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 80, 'h': 25}, {'proto': 'platform1c', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 25}, {'proto': 'platform2b', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 80, 'h': 20}, {'proto': 'platform2c', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 80, 'h': 20}, {'proto': 'platform2d', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 20}, {'proto': 'platform3b', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 80, 'h': 19}, {'proto': 'platform3c', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 52, 'h': 19}, {'proto': 'box2', 'type': OT_BOX, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 81, 'h': 41}, {'proto': 'box3', 'type': OT_BOX, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 41, 'h': 81}, {'proto': 'platform6b', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 60, 'h': 27}, {'proto': 'platform6c', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 60, 'h': 27}, {'proto': 'platform7b', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 36, 'h': 20}, {'proto': 'platform7c', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 63, 'h': 20}, {'proto': 'platform8', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 120, 'h': 25}, {'proto': 'platform8b', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 25}, {'proto': 'platform8c', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 25}, {'proto': 'platform8d', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 25}, {'proto': 'blockcol1', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 35, 'h': 120}, {'proto': 'blockcol2', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 24, 'h': 120}, {'proto': 'blockcol3', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 26, 'h': 120}, {'proto': 'blockcol4', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 59, 'h': 160}, {'proto': 'blockcol5', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 22, 'h': 120}, {'proto': 'blockcol6', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 26, 'h': 120}, {'proto': 'platform9', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 57, 'h': 28}, {'proto': 'platform10', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 48, 'h': 35}, {'proto': 'platform11', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 58, 'h': 57}, {'proto': 'platform12', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 64, 'h': 35}, {'proto': 'platform13', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 70, 'h': 48}, {'proto': 'platform14', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 70, 'h': 51}, {'proto': 'entrance', 'type': OT_ENTRANCE_B, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 40}, {'proto': 'exitb', 'type': OT_EXIT_B, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 10, 'h': 40}, {'proto': 'jumpcube', 'type': OT_BOX, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 40}, {'proto': 'staticbox1', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 40}, {'proto': 'staticbox2', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 80, 'h': 40}, {'proto': 'staticbox3', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 40, 'h': 80}, {'proto': 'platform4b', 'type': OT_BRICK, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 30, 'h': 160}, {'proto': 'exitw_left', 'type': OT_EXIT_W, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 10, 'h': 40}, {'proto': 'exitb_right', 'type': OT_EXIT_B, 'xspeed': 0, 'yspeed': 0, 'scale': 100, 'w': 10, 'h': 40}];
_root.maxstars = GetCookie('kiltix3save');
if (_root.maxstars == undefined || _root.maxstars == '') {
_root.maxstars = 0;
}
stopallsfx();
startsfx(0);
var ds = new flash.filters.DropShadowFilter(0, 0, 0, 100, 5, 5, 1, 1, false, false, false);
var bl = new flash.filters.BlurFilter(6, 6, 4);
var bl2 = new flash.filters.BlurFilter(3, 3, 4);
var bl3 = new flash.filters.BlurFilter(9, 9, 4);
var gl = new flash.filters.GlowFilter(16777215, 10, 10, 10, 1.5, 3, false, false);
loadstate();
_root.currlevel = 0;
initlevel(_root.currlevel);
stop();
_root.onEnterFrame = function () {
var v2;
if (!_root.gamepaused) {
inclevel();
if (collcheck('hero', 31, 44) == 0) {
_root.hero_jumps = true;
if (_root.hero_lastxspeed < 0) {
cloneobj('jabber_jumping_left', _root.hero);
} else {
cloneobj('jabber_jumping', _root.hero);
}
}
for (v2 in _root) {
if (_root[v2].type == undefined || _root[v2].type == OT_BRICK || _root[v2].type == OT_DIRT || _root[v2].type == OT_HERO || _root[v2].type == OT_PARTICLE || _root[v2].type == OT_ENTRANCE_B || _root[v2].type == OT_ENTRANCE_W || _root[v2].type == OT_EXIT_B || _root[v2].type == OT_EXIT_W) {
continue;
}
collcheck(v2, _root[v2].w, _root[v2].h);
if (_root[v2].type == OT_BUG && (_root[v2].yspeed > 2 || _root[v2].yspeed < 0)) {
if (_root[v2].objcode == CODE_SLIMEW) {
if (_root[v2].proto != 'slimew_fly') {
cloneobj('slimew_fly', _root[v2]);
}
} else {
if (_root[v2].proto != 'slimeb_fly') {
cloneobj('slimeb_fly', _root[v2]);
}
}
_root[v2].slime._rotation = 57.2957795 * Math.atan2(_root[v2].yspeed, _root[v2].xspeed);
}
}
if (_root.currframe > _root.delayatstart && _root.currframe % BUGFREQ == 0 && _root.currframe < _root.delayatstart + _root.bugnum * (BUGFREQ + 1)) {
var v3;
var v5 = 0;
for (v2 in _root) {
if (_root[v2].type != undefined && (_root[v2].type == OT_ENTRANCE_B || _root[v2].type == OT_ENTRANCE_W)) {
var v4;
if (_root[v2].type == OT_ENTRANCE_W) {
v3 = CODE_SLIMEW;
} else {
v3 = CODE_SLIMEB;
}
v4 = 'bug_' + _root.currframe + '_' + v5;
_root.attachMovie(objprop[v3].proto, v4, _root.bugdepth, {'_x': _root[v2]._x, '_y': _root[v2]._y, 'xspeed': 0.1, 'yspeed': objprop[v3].yspeed, 'w': objprop[v3].w, 'h': objprop[v3].h, '_xscale': objprop[v3].scale, '_yscale': objprop[v3].scale, 'proto': objprop[v3].proto, 'type': objprop[v3].type, 'objcode': v3, 'blocked': false, 'cacheAsBitmap': true});
++_root.bugdepth;
_root[v4].slime._rotation = 90;
if (v3 == CODE_SLIMEW || v3 == CODE_SLIMEB) {
_root[v4].gotoAndPlay(Math.floor(Math.random() * 10));
}
++v5;
}
}
}
}
if (_root.hint1 == undefined && !_root.gamepaused && _root.dlg == undefined) {
++_root.currframe;
++_root.idleframes;
if (_root.idleframes >= 90 && _root.hero.proto == 'jabber_idle') {
if (_root.hero_lastxspeed < 0) {
cloneobj('jabber_standing_left', _root.hero);
} else {
cloneobj('jabber_standing', _root.hero);
}
_root.idleframes = 0;
}
if (_root.idleframes >= 300 && (_root.hero.proto == 'jabber_standing' || _root.hero.proto == 'jabber_standing_left')) {
switch (Math.floor(Math.random() * 4)) {
case 0:
cloneobj('jabber_idle_speak', _root.hero, 'jabber_idle');
startsfx(12);
break;
case 1:
cloneobj('jabber_idle_speak2', _root.hero, 'jabber_idle');
startsfx(11);
break;
case 2:
cloneobj('jabber_idle_backward', _root.hero, 'jabber_idle');
startsfx(10);
break;
case 3:
cloneobj('jabber_idle_forward', _root.hero, 'jabber_idle');
startsfx(10);
}
_root.idleframes = 0;
}
}
};
_root.tableclick.onPress = function () {};
}
instance tableclick of movieClip 72 tableclick {
onClipEvent (keyDown) {
_root.keydown(Key.getCode());
}
onClipEvent (keyUp) {
_root.keyup(Key.getCode());
}
}
frame 5 {
_root.attachMovie('bigbutton', 'backbtn', _root.getNextHighestDepth(), {'_x': 218, '_y': 403});
_root.backbtn.txt.text = 'Back';
_root.backbtn.onPress = function () {
cls();
_root.gotoAndPlay('mainmenu');
};
_root.maxgameslogo.onPress = function () {
_root.getURL('http://maxGames.com', '_blank');
};
_root.sclogo.onPress = function () {
_root.getURL('http://smartcode.hu', '_blank');
};
stop();
}
frame 6 {
_root.maxgameslogo.onPress = function () {
_root.getURL('http://maxGames.com', '_blank');
};
_root.slimejoke.onEnterFrame = function () {
this._x += 6;
};
}
// unknown tag 88 length 69
movieClip 579 {
}
movieClip 580 {
}
movieClip 581 {
}
movieClip 582 {
}
movieClip 583 {
}
movieClip 587 {
}
movieClip 589 {
}
movieClip 591 {
}
movieClip 593 {
}
movieClip 595 {
}
movieClip 596 {
}
movieClip 599 {
frame 1 {
_root.stop();
}
frame 186 {
_root.gotoAndPlay('mainmenu');
}
}