Frame 1
fscommand ("showmenu", "false");
Stage.scaleMode = "noScale";
_root.game_id = "1589";
_root.cheatMode = false;
_root.main_link = "http://www.2DPlay.com/index.php?gameid=" + _root.game_id;
_root.download_link = "http://www.2DPlay.com/downloadgame.php?gameid=" + _root.game_id;
_root.get_game_link = "http://www.2DPlay.com/freecontent.htm";
_root.scores_link = ("http://www.2Dplay.com/highscores.php?gameid=" + _root.game_id) + "&hiscore=";
_root.viewscores_link = "http://www.2Dplay.com/showscores.php?gameid=" + _root.game_id;
stopAllSounds();
Frame 2
stop();
function SetButtonStr() {
switch (_quality) {
case "HIGH" :
_root.quality_str = "GRAPHICS QUALITY: HIGH";
break;
case "MEDIUM" :
_root.quality_str = "GRAPHICS QUALITY: MEDIUM";
break;
case "LOW" :
_root.quality_str = "GRAPHICS QUALITY: LOW";
}
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_vm_test() {
return(hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72");
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(Array(_local4, _local3, _local2, _local1));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_hmac_md5(key, data) {
var _local2 = str2binl(key);
if (_local2.length > 16) {
_local2 = core_md5(_local2, key.length * chrsz);
}
var _local3 = Array(16);
var _local4 = Array(16);
var _local1 = 0;
while (_local1 < 16) {
_local3[_local1] = _local2[_local1] ^ 909522486;
_local4[_local1] = _local2[_local1] ^ 1549556828;
_local1++;
}
var _local5 = core_md5(_local3.concat(str2binl(data)), 512 + (data.length * chrsz));
return(core_md5(_local4.concat(_local5), 640));
}
function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local3 = Array();
var _local4 = (1 << chrsz) - 1;
var _local1 = 0;
while (_local1 < (str.length * chrsz)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / chrsz) & _local4) << (_local1 % 32));
_local1 = _local1 + chrsz;
}
return(_local3);
}
function binl2str(bin) {
var _local3 = "";
var _local4 = (1 << chrsz) - 1;
var _local1 = 0;
while (_local1 < (bin.length * 32)) {
_local3 = _local3 + String.fromCharCode((bin[_local1 >> 5] >>> (_local1 % 32)) & _local4);
_local1 = _local1 + chrsz;
}
return(_local3);
}
function binl2hex(binarray) {
var _local3 = (hexcase ? "0123456789ABCDEF" : "0123456789abcdef");
var _local4 = "";
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local4 = "";
var _local2 = 0;
while (_local2 < (binarray.length * 4)) {
var _local5 = ((((binarray[_local2 >> 2] >> (8 * (_local2 % 4))) & 255) << 16) | (((binarray[(_local2 + 1) >> 2] >> (8 * ((_local2 + 1) % 4))) & 255) << 8)) | ((binarray[(_local2 + 2) >> 2] >> (8 * ((_local2 + 2) % 4))) & 255);
var _local1 = 0;
while (_local1 < 4) {
if (((_local2 * 8) + (_local1 * 6)) > (binarray.length * 32)) {
_local4 = _local4 + b64pad;
} else {
_local4 = _local4 + _local6.charAt((_local5 >> (6 * (3 - _local1))) & 63);
}
_local1++;
}
_local2 = _local2 + 3;
}
return(_local4);
}
var hexcase = 0;
var b64pad = "";
var chrsz = 8;
stop();
Frame 3
stop();
Frame 4
stop();
Frame 6
play();
Frame 24
stop();
Frame 25
play();
Frame 59
stop();
Frame 63
function setUpSounds() {
this.createEmptyMovieClip("sounds_mc", getNextHighestDepth());
sounds = new Sound(sounds_mc);
sounds.maingame = new Sound(this);
sounds.maingame.attachSound("maingame");
sounds.maingame.start(0, 100);
sounds.levelcomplete = new Sound(this);
sounds.levelcomplete.attachSound("levelcomplete");
sounds.levelcomplete.onSoundComplete = function () {
sounds.maingame.start(0, 1000);
game.level++;
if (game.level == 33) {
_root.paws = true;
stopAllSounds();
sounds.gameover.start();
removeMovieClip(_root.screen);
removeMovieClip(_root.thing);
removeMovieClip(_root.maskbig);
removeMovieClip(_root.hud);
ob.stage = 80;
_root.score = game.score;
_root.gotoAndStop("win");
} else {
removeEnemies();
buildChars();
map = "Level" + game.level;
buildMap(map);
}
};
sounds.gameover = new Sound(this);
sounds.gameover.attachSound("gameover");
sounds.jump = new Sound(this);
sounds.jump.attachSound("jump");
sounds.shoot = new Sound(this);
sounds.shoot.attachSound("shoot");
sounds.snowhit1 = new Sound(this);
sounds.snowhit1.attachSound("snowhit1");
sounds.snowhit2 = new Sound(this);
sounds.snowhit2.attachSound("snowhit2");
sounds.snowhit3 = new Sound(this);
sounds.snowhit3.attachSound("snowhit3");
sounds.collect = new Sound(this);
sounds.collect.attachSound("collect");
sounds.wind = new Sound(this);
sounds.wind.attachSound("wind");
sounds.leaves = new Sound(this);
sounds.leaves.attachSound("leaves");
sounds.hurt = new Sound(this);
sounds.hurt.attachSound("hurt");
sounds.dead_thud = new Sound(this);
sounds.dead_thud.attachSound("dead_thud");
sounds.start = new Sound(this);
sounds.start.attachSound("start");
}
function setVolumes(vol, s) {
s.setVolume(vol);
}
function buildMap(map) {
d = 0;
char.s = 0;
char.stage = 0;
delete game.enemies;
game.enemies = new Array();
game.levelstart = 0;
delete game.sparks;
game.sparks = new Array();
delete game.smoke;
game.smoke = new Array();
map = _root["Level" + game.level];
_root.screen.attachMovie("empty", "tileset", 3);
_root.screen.attachMovie("empty", "maskset", 2);
_root.screen.attachMovie("empty", "masktemp", 1);
_root.hud.swapDepths(700000);
var _local9 = map[0].length;
var _local10 = map.length;
_global.mapWidthActual = _local9 * 50;
_global.mapHeightActual = _local10 * 50;
var _local5 = 0;
while (_local5 < _local10) {
var _local4 = 0;
while (_local4 < _local9) {
d++;
var _local3 = (("t_" + _local5) + "_") + _local4;
var _local6 = map[_local5][_local4];
var _local7 = true;
k = 0;
while (k < 11) {
if (_local6 == ("i" + k)) {
_local7 = false;
}
k++;
}
if (_local7) {
_root.screen.tileset.attachMovie("tiles", _local3, d);
_root.screen.tileset[_local3]._x = _local4 * 50;
_root.screen.tileset[_local3]._y = _local5 * 50;
_root.screen.maskset[_local3]._swapDepths = _root.screen.tileset[_local3]._y + _local4;
_root.screen.maskset.attachMovie("masks", _local3, d);
_root.screen.maskset[_local3]._x = _local4 * game.tileW;
_root.screen.maskset[_local3]._y = _local5 * game.tileH;
_root.screen.tileset[_local3].gotoAndStop(_local6);
_root.screen.tileset[_local3].bricks.gotoAndStop(random(20));
_root.screen.maskset[_local3].gotoAndStop(_local6);
} else if (_local6 == "i1") {
k = game.enemies.length + 1;
_local3 = "enemy" + k;
game[_local3] = new game.Enemy1();
game.clip.attachMovie("enemy1", _local3, 10501 + k);
game[_local3].clip = game.clip[_local3];
game[_local3].clip._x = (_local4 * 50) + 25;
game[_local3].clip._y = (_local5 * 50) + 50;
if (game[_local3].clip._x > 250) {
game[_local3].dir = -1;
} else {
game[_local3].dir = 1;
}
game.enemies.push(_local3);
} else if (_local6 == "i2") {
k = game.enemies.length + 1;
_local3 = "enemy" + k;
game[_local3] = new game.Enemy2();
game.clip.attachMovie("enemy2", _local3, 10501 + k);
game[_local3].clip = game.clip[_local3];
game[_local3].clip._x = (_local4 * 50) + 25;
game[_local3].clip._y = (_local5 * 50) + 50;
if (game[_local3].clip._x > 250) {
game[_local3].dir = -1;
} else {
game[_local3].dir = 1;
}
game.enemies.push(_local3);
} else if (_local6 == "i3") {
k = game.enemies.length + 1;
_local3 = "enemy" + k;
game[_local3] = new game.Enemy3();
game.clip.attachMovie("enemy3", _local3, 10501 + k);
game[_local3].clip = game.clip[_local3];
game[_local3].clip._x = (_local4 * 50) + 25;
game[_local3].clip._y = (_local5 * 50) + 50;
if (game[_local3].clip._x > 250) {
game[_local3].dir = -1;
} else {
game[_local3].dir = 1;
}
game.enemies.push(_local3);
} else if (_local6 == "i10") {
game.ballSmash = (_local5 * 50) + 50;
}
_local4++;
}
_local5++;
}
snappy.dispose;
_root.snapshot.dispose;
var snappy = (new flash.display.BitmapData(2000, 600));
snappy.draw(_root.screen.maskset, new flash.geom.Matrix());
_root.snapshot = snappy;
_root.screen.masktemp.attachBitmap(snappy2, 1);
_root.screen.tileset.cacheAsBitmap;
_root.screen.maskset.removeMovieClip();
}
function buildChars() {
_root.attachMovie("empty", "screen", 10);
game.clip = _root.screen;
game.clip._xscale = 80;
game.clip._yscale = 80;
game.clip.attachMovie("char", "char", 10701);
char.clip = game.clip.char;
char.clip._x = 250;
char.clip._y = 500;
char.height = 70;
char.myColor = new Color(char.clip);
_root.hud.l = "X " + char.lives;
_root.hud.score = "SCORE: " + game.score;
}
function glow(obb, r, g, b, a) {
game.myColor = new Color(obb.clip);
game.myColor.setTransform({ra:a, rb:r, ga:a, gb:g, ba:a, bb:b, aa:a, ab:0});
}
function cheats() {
if (_root.cheatMode) {
if (Key.isDown(8)) {
char.lives++;
char.lives = ((char.lives > 4) ? 4 : (char.lives));
_root.hud.lives.gotoAndStop(5 - char.lives);
}
}
}
function removeEnemies() {
var _local1 = 0;
while (_local1 < game.enemies.length) {
en = game.enemies[_local1];
removeOb(en);
clearInterval(game[en].shootTimer);
_local1++;
}
_local1 = 1;
while (_local1 < 20) {
var _local2 = "bullet" + _local1;
game[_local2].alive = false;
removeBullet(_local2);
_local1++;
}
}
function checkKeys() {
_root.hud.l = "LEVEL " + game.level;
var _local3 = char;
if (game.enemies.length == 0) {
if (char.s == 155) {
createHit(_local3, "textAdd", 0, 100, 100, "LEVEL CLEARED!");
createHit(_local3, "textAdd", 0, 100, 100, "bonus 500");
game.score = game.score + 500;
_root.hud.score = "SCORE: " + game.score;
sounds.maingame.stop();
sounds.levelcomplete.start();
char.s++;
}
}
if (char.lives == 0) {
_root.paws = true;
stopAllSounds();
sounds.gameover.start();
removeMovieClip(_root.screen);
removeMovieClip(_root.thing);
removeMovieClip(_root.maskbig);
removeMovieClip(_root.hud);
_local3.stage = 80;
_root.score = game.score;
_root.gotoAndStop("gameover");
}
if (_local3.stage == 0) {
if (char.s == 1) {
sounds.start.start();
}
if (char.s < 2) {
if (game.levelstart == 0) {
createHit(_local3, "textAdd", 0, 100, 100, ("LEVEL " + game.level) + " START");
} else {
createHit(_local3, "textAdd", 0, 100, 100, "GO!");
char.speed = 6;
char.bulletType = 1;
char.bullDis = 2;
}
char.clip.gotoAndStop(1);
}
char.s++;
createFlare2("char", random(20));
createSparks2("char", "spark", 20);
createSparks2("char", "small_snowball", 20);
createSparks2("char", "spark", 40);
createSparks2("char", "small_snowball", 20);
createSparks2("char", "spark", 40);
createSparks2("char", "small_snowball", 20);
if (char.s > 20) {
_local3.stage = 1;
char.s = 0;
char.walking = false;
char.jump = false;
char.falling = false;
char.invincible = true;
game.levelstart = 1;
}
}
if ((_local3.stage == 1) and (char.s < 155)) {
char.s++;
if (char.s < 150) {
glow(_local3, random(255), random(255), random(255), 100);
} else {
glow(_local3, 0, 0, 0, 100);
char.invincible = false;
clearInterval(_local3.snowTimer);
}
}
if (_local3.stage == 3) {
if (char.s < 2) {
createHit(_local3, "textAdd", 0, 100, 100, "WATCH OUT!");
}
char.s++;
createSparks("char", "spark", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "spark", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "spark", 40);
createSparks("char", "small_snowball", 40);
_local3.clip._y = _local3.clip._y - 5;
if (char.s > 30) {
_local3.clip._x = 250;
_local3.clip._y = 500;
_local3.stage = 0;
_local3.s = 0;
}
}
if (_local3.stage == 1) {
var _local5 = Key.isDown(39);
var _local6 = Key.isDown(37);
var _local12 = Key.isDown(38);
var _local13 = Key.isDown(40);
var _local7 = Key.isDown(83);
var _local8 = Key.isDown(65) or Key.isDown(38);
var _local4 = char.charConnect;
cheats();
if (((((!_local5) and (!_local6)) and (!_local3.jump)) and (!_local3.shooting)) and (_local4 == null)) {
_local3.clip.gotoAndStop(1);
char.walking = false;
}
if (((_local5 and (!_local6)) and (!_local3.duck)) and (!_local4)) {
_local3.dir = 1;
if (((!_local3.jump) and (!_local3.walking)) and (char.speed == 6)) {
_local3.clip.gotoAndStop(2);
}
if (((!_local3.jump) and (!_local3.walking)) and (char.speed == 10)) {
_local3.clip.gotoAndStop(6);
}
_local3.walking = true;
_local3.clip._xscale = 100;
moveChar(_local3, 1, 0, 0);
} else if (((_local6 and (!_local5)) and (!_local3.duck)) and (!_local4)) {
_local3.dir = -1;
if (((!_local3.jump) and (!_local3.walking)) and (char.speed == 6)) {
_local3.clip.gotoAndStop(2);
}
if (((!_local3.jump) and (!_local3.walking)) and (char.speed == 10)) {
_local3.clip.gotoAndStop(6);
}
_local3.walking = true;
_local3.clip._xscale = -100;
moveChar(_local3, -1, 0, 0);
}
if (((!_local3.jump) and _local8) and (!_local3.jumping)) {
sounds.jump.start();
var _local11 = _local3.jumpstart;
char.charConnect = null;
_local3.duck = false;
_local3.jump = true;
_local3.jumping = true;
_local3.jumpRelease = false;
_local3.jumpspeed = _local11;
_local3.plat = 0;
_local3.wallhit = false;
_local3.falling = false;
char.clip.gotoAndStop(7);
char.clip._xscale = 100 * char.dir;
var _local9 = random(360);
createHit("char", "groundhit", _local9);
}
if (_local3.jump) {
var _local10 = _local3.gravity;
jump(_local3, _local3.jumpspeed, _local10);
}
if ((!_local3.jump) and (!_local8)) {
_local3.jumping = false;
}
if ((((!_local3.shoot) and (!_local3.shooting)) and _local7) and (_local4 == null)) {
checkShootDir(_local3);
sounds.shoot.start();
_local3.shoot = true;
_local3.shooting = true;
if ((!_local3.walking) and (!_local3.jump)) {
_local3.clip.gotoAndStop(3);
}
shoot(_local3, _local3.dir, true, char.bulletType, 0);
_local3.shootTimer = setInterval(this, "shootTime", _local3.reload, _local3);
}
if ((_local3.shoot and (!_local7)) and (_local4 == null)) {
if ((!_local3.walking) and (!_local3.duck)) {
_local3.clip.gotoAndStop(1);
}
_local3.shoot = false;
}
moveBullets();
checkItems();
enemyBrain();
}
trailFade();
flareGrow();
moveSparks();
}
function enemyBrain() {
i = 0;
while (i < game.enemies.length) {
en = game.enemies[i];
var _local5 = en;
var _local3 = game[_local5];
if (_local3.clip._y > 600) {
clearInterval(_local3.shootTimer);
replaceSoldier(_local3);
}
if (_local3.stage == 1) {
if (((_local3.dir == 1) and (_local3.clip._x > (char.clip._x + 300))) and (!_local3.jump)) {
} else if (((_local3.dir == -1) and (_local3.clip._x < (char.clip._x - 300))) and (!_local3.jump)) {
}
if ((!_local3.jump) and (!_local3.shooting)) {
_local3.clip._xscale = 100 * _local3.dir;
_local3.clip.gotoAndStop(2);
moveChar(_local3, _local3.dir, 0, 0);
r = random(100);
var _local7 = checkColour("cc00", _local3.clip._x, _local3.clip._y + 20, true);
if (_local7 and (r > _local3.jumpint)) {
_local3.jump = true;
_local3.jumpRelease = false;
_local3.jumpspeed = _local3.jumpstart;
_local3.plat = false;
_local3.wallhit = false;
_local3.falling = false;
_local3.clip.gotoAndStop(7);
}
}
x = _local3.clip._x;
y = _local3.clip._y;
cx = char.clip._x;
cy = char.clip._y;
if ((((((cx < (x + 30)) and (cx > (x - 30))) and (cy < (y + 10))) and (cy > (y - 60))) and (char.charConnect == null)) and (!char.invincible)) {
char.invincible = true;
sounds.snowhit3.start();
sounds.dead_thud.start();
sounds.hurt.start();
char.stage = 3;
char.s = 0;
createFlare(_local5, 50);
createSparks("char", "small_snowball", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "spark", 40);
createSparks("char", "spark", 40);
createSparks("char", "spark", 40);
createSparks("char", "spark", 40);
char.lives = char.lives - 1;
_root.hud.lives.gotoAndStop(5 - char.lives);
char.clip.gotoAndStop(5);
}
}
if (_local3.stage == 4) {
if (!_local3.rolling) {
x = _local3.clip._x;
y = _local3.clip._y;
cx = char.clip._x;
cy = char.clip._y;
_local3.clip._xscale = 100;
_local3.ballCommand = false;
if ((cy > (y - 20)) and (cy < (y + 20))) {
if (((cx - char.speed) < (x + 38)) and (cx > x)) {
_local3.ballCommand = true;
if (x > 30) {
char.clip._x = char.clip._x + 2;
moveChar(_local3, -1, 0, 0);
checkPlatforms(_local3, _local3.clip._x, _local3.clip._y, _local3.plat);
_local3.clip.snow._rotation = _local3.clip.snow._rotation - 10;
_local3.dir = -1;
}
} else if (((cx + char.speed) > (x - 38)) and (cx < x)) {
_local3.ballCommand = true;
if (x < 470) {
char.clip._x = char.clip._x - 2;
moveChar(_local3, 1, 0, 0);
checkPlatforms(_local3, _local3.clip._x, _local3.clip._y, _local3.plat);
_local3.clip.snow._rotation = _local3.clip.snow._rotation + 10;
_local3.dir = 1;
}
}
}
}
if (_local3.rolling) {
if (char.jump) {
_local3.charConnect = false;
}
moveChar(_local3, _local3.dir, 0, 0);
_local3.clip.snow._rotation = _local3.clip.snow._rotation + 20;
x = _local3.clip._x;
y = _local3.clip._y;
cx = char.clip._x;
cy = char.clip._y;
if (((((cx < (x + 10)) and (cx > (x - 10))) and (cy < (y + 10))) and (cy > (y - 10))) and (!char.jump)) {
char.charConnect = en;
_local3.charConnect = true;
createFlare(_local5, 50);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "small_snowball", 40);
}
}
ii = 0;
while (ii < game.enemies.length) {
en2 = game.enemies[ii];
var _local6 = en2;
var _local4 = game[_local6];
cx = _local4.clip._x;
cy = _local4.clip._y;
if ((((((cx < (x + 70)) and (cx > (x - 70))) and (cy < (y + 2))) and (cy > (y - 70))) and (_local4 != _local3)) and (_local4.stage != 7)) {
if ((((_local4.stage == 4) and (!_local4.jump)) and (!_local4.rolling)) and _local3.rolling) {
glow(_local4, -62, -51, 255, 100);
clearInterval(_local4.glowTimer);
_local4.glowTimer = setInterval(this, "glowTime", 3000, _local4);
createFlare(_local6, 50);
sounds.snowhit3.start();
_local4.jump = true;
_local4.jumpRelease = false;
_local4.jumpspeed = _local3.jumpstart;
_local4.plat = false;
_local4.wallhit = false;
_local4.falling = false;
_local4.rolling = true;
_local4.dir = _local3.dir;
_local4.clip._xscale = _local4.clip._xscale * _local4.dir;
clearInterval(_local4.snowTimer);
break;
}
if ((_local4.stage != 4) and _local3.rolling) {
createItem(_local6);
sounds.snowhit3.start();
_local4.clip.gotoAndStop(5);
_local4.stage = 7;
_local4.active = false;
_local4.jump = false;
clearInterval(_local4.snowTimer);
glow(_local4, 255, 0, 0, 100);
_local4.glowTimer = setInterval(this, "glowTime", 100, _local4);
createFlare(_local6, 50);
createSparks(_local6, "small_snowball", 40);
createSparks(_local6, "small_snowball", 40);
createSparks(_local6, "small_snowball", 40);
createSparks(_local6, "small_snowball", 40);
createSparks(_local6, "small_snowball", 40);
createHit(_local5, "scoreadd", 0, 100, 100, _local3.score * 2.5);
game.score = game.score + (_local3.score * 2.5);
_root.hud.score = "SCORE: " + game.score;
} else if (_local3.clip._x < _local4.clip._x) {
if ((_local3.clip._x > 60) and (!_local3.ballCommand)) {
_local3.clip._x = _local3.clip._x - 10;
_local3.clip.snow._rotation = _local3.clip.snow._rotation - 20;
checkPlatforms(_local3, _local3.clip._x, _local3.clip._y, _local3.plat);
} else if (_local4.clip._x < 440) {
_local4.clip._x = _local4.clip._x + 10;
_local4.clip.snow._rotation = _local4.clip.snow._rotation + 20;
checkPlatforms(_local4, _local4.clip._x, _local4.clip._y, _local4.plat);
} else if (_local4.stage != 2) {
_local4.jump = true;
_local4.jumpRelease = false;
_local4.jumpspeed = _local3.jumpstart;
_local4.plat = false;
_local4.wallhit = false;
_local4.falling = false;
}
} else if ((_local3.clip._x < 440) and (!_local3.ballCommand)) {
_local3.clip._x = _local3.clip._x + 10;
_local3.clip.snow._rotation = _local3.clip.snow._rotation + 20;
checkPlatforms(_local3, _local3.clip._x, _local3.clip._y, _local3.plat);
} else if (_local4.clip._x > 60) {
_local4.clip._x = _local4.clip._x - 10;
_local4.clip.snow._rotation = _local4.clip.snow._rotation - 20;
checkPlatforms(_local4, _local4.clip._x, _local4.clip._y, _local4.plat);
} else if (_local4.stage != 2) {
_local4.jump = true;
_local4.jumpRelease = false;
_local4.jumpspeed = _local3.jumpstart;
_local4.plat = false;
_local4.wallhit = false;
_local4.falling = false;
}
}
if (_local3.charConnect) {
char.clip._x = _local3.clip._x;
char.clip._y = _local3.clip._y;
char.clip.gotoAndStop(4);
char.clip.char._rotation = _local3.clip.snow._rotation;
char.clip._xscale = _local3.clip._xscale;
}
ii++;
}
}
if (_local3.stage == 5) {
sounds.snowhit2.start();
sounds.snowhit3.start();
if (_local3.charConnect) {
sounds.jump.start();
_local3.charConnect = false;
char.charConnect = null;
char.duck = false;
char.jump = true;
char.jumping = true;
char.jumpRelease = false;
char.jumpspeed = -22;
char.plat = 0;
char.wallhit = false;
char.falling = false;
char.clip.gotoAndStop(7);
char.clip._xscale = 100 * char.dir;
char.s = 100;
char.invincible = true;
}
r = random(100);
if (r < 40) {
createItem(_local5);
}
createFlare(_local5, 50);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "spark", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "spark", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "spark", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "spark", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "small_snowball", 40);
createSparks(_local5, "small_snowball", 40);
createHit(_local5, "scoreadd", 0, 100, 100, _local3.score);
game.score = game.score + _local3.score;
_root.hud.score = "SCORE: " + game.score;
_local3.stage = 6;
_local3.clip.removeMovieClip();
game.enemies.splice(i, 1);
}
if (_local3.jump) {
_local3.plat = false;
jump(_local3, _local3.jumpspeed, _local3.gravity);
moveChar(_local3, _local3.dir, 0, 0);
}
if (_local3.stage == 7) {
_local3.clip._y = _local3.clip._y - 5;
_local3.clip._alpha = _local3.clip._alpha - 5;
_local3.clip.char._rotation = _local3.clip.char._rotation + 5;
if ((_local3.clip._alpha < 0) or (_local3.clip._y < 0)) {
_local3.clip.removeMovieClip();
game.enemies.splice(i, 1);
}
}
r = random(100);
if (((_local3.stage == 8) and (!_local3.shooting)) and (r > 50)) {
_local3.shots++;
if (_local3.shots == 1) {
sounds.leaves.start();
sounds.wind.start();
}
_local3.clip.gotoAndStop(6);
shoot(_local3, _local3.dir, false, 3, 1);
clearInterval(_local3.shootTimer);
_local3.shootTimer = setInterval(this, "enemyTime", 200, _local3);
_local3.shooting = true;
} else if (((_local3.type == 3) and (_local3.stage == 8)) and (!_local3.shooting)) {
_local3.stage = 1;
}
i++;
}
}
function checkShootDir(ob) {
var _local3 = Key.isDown(39);
var _local4 = Key.isDown(37);
var _local1 = Key.isDown(38);
var _local2 = Key.isDown(40);
ob.shootDIR = -50;
}
function moveChar(ob, dirx, diry, jump) {
checkWallHit(ob, ob.clip._x + ((ob.width + ob.speed) * dirx), ob.clip._y - 20, ob.plat);
checkPlatforms(ob, ob.clip._x + (ob.speed * dirx), ob.clip._y, ob.plat);
if (checkColour("ff", ob.clip._x, ob.clip._y, true)) {
ob.wallhit = true;
}
if (!ob.wallhit) {
if (ob.stage != 4) {
ob.clip._x = ob.clip._x + (ob.speed * dirx);
} else {
if (ob == char) {
ob.clip._x = ob.clip._x + (char.speed * dirx);
} else if (ob.jump and ob.wallhit) {
ob.clip._x = ob.clip._x + ((char.speed / 2) * dirx);
} else if (!ob.jump) {
ob.clip._x = ob.clip._x + (char.speed * dirx);
}
checkPlatforms(ob, ob.clip._x + (ob.speed * dirx), ob.clip._y, ob.plat);
if (ob.rolling) {
ob.clip._x = ob.clip._x + (6 * dirx);
}
}
}
}
function checkColour(c, x, y) {
colour = snapshot.getPixel(x, y).toString(16);
if (char.falling) {
}
if (colour == c) {
return(true);
}
return(false);
}
function checkColour2(c, x, y) {
colour = snapshot.getPixel(x, y).toString(16);
}
function screenPos(x, y) {
sp = 5;
startX = Math.floor(game.clip._x);
startY = Math.floor(game.clip._y);
d = 250;
endX = Math.floor(x - d) * -1;
endY = Math.floor(y - 200) * -1;
if (endX >= 0) {
endX = 0;
}
if (endY >= 0) {
endY = 0;
}
game.endX = endX * -1;
if (startX != endX) {
if (endX <= ((_global.mapWidthActual - 600) * -1)) {
endX = (_global.mapWidthActual - 600) * -1;
}
game.clip._x = game.clip._x + Math.floor((endX - startX) / sp);
}
if (startY != endY) {
if (endY <= ((_global.mapHeightActual - 400) * -1)) {
endY = (_global.mapHeightActual - 400) * -1;
}
game.clip._y = game.clip._y + Math.floor((endY - startY) / sp);
}
}
function focus(x, y) {
sp = 15;
endX = Math.floor(x - 200) * -1;
endY = Math.floor(y - 200) * -1;
if (endX >= 0) {
endX = 0;
}
if (endY >= 0) {
endY = 0;
}
if (endX <= ((_global.mapWidthActual - 600) * -1)) {
endX = (_global.mapWidthActual - 600) * -1;
}
game.clip._x = game.clip._x + (endX - startX);
if (endY <= ((_global.mapHeightActual - 400) * -1)) {
endY = (_global.mapHeightActual - 400) * -1;
}
game.clip._y = game.clip._y + (endY - startY);
}
function mouseColour() {
colour = snapshot.getPixel(_xmouse, _ymouse).toString(16);
}
function checkPlatforms(ob, obx, oby, plat) {
if (ob.plat) {
if (checkColour("ffff00", ob.clip._x, ob.clip._y - 2, true)) {
ob.clip._y = ob.clip._y - 2;
var _local2 = 1;
while (_local2 < 20) {
if (!checkColour("ffff00", ob.clip._x, ob.clip._y - _local2, false)) {
break;
}
_local2++;
}
ob.walkfall = false;
ob.jump = false;
ob.plat = true;
ob.clip._y = ob.clip._y - _local2;
}
if (!checkColour("ffff00", ob.clip._x, ob.clip._y, true)) {
ob.clip._y = ob.clip._y + 2;
ob.walkfall = true;
if (!checkColour("ffff00", ob.clip._x, ob.clip._y, true)) {
r = random(100);
if ((ob.flame and (ob.stage == 1)) and (r > 50)) {
ob.dir = ob.dir * -1;
ob.clip._xscale = ob.clip._xscale * -1;
ob.clip._x = ob.clip._x + (10 * ob.dir);
ob.stage = 8;
} else {
ob.jump = true;
ob.jumpRelease = false;
ob.jumpspeed = 6;
ob.jump = true;
ob.plat = false;
ob.falling = true;
if ((ob.stage != 4) and (ob.stage != 2)) {
ob.clip.gotoAndStop(8);
}
if (ob == char) {
var r = random(360);
createHit("char", "groundhit", r);
}
}
}
}
}
if (ob.falling) {
var _local2 = 0;
while (_local2 < ob.jumpspeed) {
if (checkColour("ffff00", ob.clip._x, ob.clip._y + _local2, true)) {
ob.clip._y = ob.clip._y + _local2;
ob.falling = false;
ob.jump = false;
ob.plat = true;
ob.walking = false;
if ((!ob.death) and (ob.stage != 4)) {
ob.clip.gotoAndStop(1);
}
break;
}
_local2++;
}
}
}
function checkWallHit(ob, obx, oby, plat) {
if (checkColour("ff", obx, oby, true)) {
ob.wallhit = true;
if (ob != char) {
if (ob.rolling and ob.plat) {
sounds.snowhit1.start();
}
if (!ob.jump) {
ob.dir = ob.dir * -1;
ob.clip._xscale = ob.clip._xscale * -1;
ob.clip._x = ob.clip._x + (10 * ob.dir);
}
}
} else if ((obx < 10) or (obx > 490)) {
ob.wallhit = true;
if (ob != char) {
ob.dir = ob.dir * -1;
ob.clip._xscale = ob.clip._xscale * -1;
ob.clip._x = ob.clip._x + (10 * ob.dir);
if (ob.flame and (ob.stage == 1)) {
ob.stage = 8;
}
}
} else {
ob.wallhit = false;
}
if (ob.wallhit) {
if (checkColour("9900ff", ob.clip._x, ob.clip._y - 40, true) and ob.rolling) {
ob.wallHits++;
}
if (ob.wallHits > 1) {
if (ob.rolling and checkColour("9900ff", ob.clip._x, ob.clip._y - 40, true)) {
ob.stage = 5;
}
} else if (ob.rolling and (!ob.jump)) {
sounds.snowhit1.start();
}
var _local2 = checkColour("ff00", ob.clip._x, ob.clip._y - 70, true);
if (_local2 and (!ob.rolling)) {
ob.jump = true;
ob.jumpRelease = false;
ob.jumpspeed = ob.jumpstart;
ob.plat = false;
ob.wallhit = false;
ob.falling = false;
ob.clip.gotoAndStop(7);
}
}
}
function jump(ob, speed, gravity) {
if (ob.jumpspeed < 16) {
ob.jumpspeed = ob.jumpspeed + gravity;
} else {
ob.jumpspeed = 16;
}
if (ob.falling) {
checkPlatforms(ob, ob.clip._x, ob.clip._y + ob.jumpspeed, ob.plat);
}
if ((!ob.falling) and checkColour("ff0000", ob.clip._x, (ob.clip._y - 50) - ob.jumpspeed, true)) {
ob.jumpspeed = 0;
ob.falling = true;
}
if (ob.jump) {
ob.clip._y = ob.clip._y + ob.jumpspeed;
}
if ((((ob.jumpspeed >= 0) and (!ob.falling)) and (!ob.death)) and (!ob.hang)) {
if ((ob.stage != 4) and (ob.stage != 2)) {
ob.clip.gotoAndStop(8);
}
ob.falling = true;
}
}
function shoot(ob, dirx, origin, type, angle) {
game.bulletcounter++;
if (game.bulletcounter > 12) {
game.bulletcounter = 1;
}
j = 0;
while (j < 12) {
if (game["bullet" + game.bulletcounter].alive) {
game.bulletcounter++;
} else {
break;
}
j++;
}
var _local1 = "bullet" + game.bulletcounter;
game[_local1] = new game.Bullet();
game[_local1].alive = true;
game[_local1].strength = 1;
game[_local1].origin = origin;
x = ob.clip._x;
y = ob.clip._y - 20;
angle = char.shootDIR;
speedx = ob.bullSpeed * Math.cos((angle * Math.PI) / 180);
speedy = ob.bullSpeed * Math.sin((angle * Math.PI) / 180);
game.clip.attachMovie("bullet", _local1, 40300 + game.bulletcounter, {_x:x, _y:y});
bull = type;
game.clip[_local1].gotoAndStop(bull);
game.clip[_local1].Bulldir = dirx;
game.clip[_local1]._xscale = game.clip[_local1]._xscale * dirx;
if (origin) {
game.clip[_local1]._rotation = angle * dirx;
}
if (!origin) {
game.clip[_local1].leaf.gotoAndStop(random(20));
}
game.clip[_local1].speedx = speedx * dirx;
game.clip[_local1].speedy = speedy;
game.clip[_local1]._x = game.clip[_local1]._x + game.clip[_local1].speedx;
game.clip[_local1]._y = game.clip[_local1]._y + game.clip[_local1].speedy;
game.clip[_local1].cacheAsBitmap;
}
function enemyShoot(ob, dirx, origin) {
game.bulletcounter++;
j = 0;
while (j < 12) {
if (game.bulletcounter > 12) {
game.bulletcounter = 1;
}
if (game["bullet" + game.bulletcounter].alive) {
game.bulletcounter++;
} else if (!game["bullet" + game.bulletcounter].alive) {
break;
}
j++;
}
var _local1 = "bullet" + game.bulletcounter;
game[_local1] = new game.Bullet();
game[_local1].alive = true;
game[_local1].origin = origin;
x = ob.clip._x + (20 * ob.dir);
y = ob.clip._y - 40;
speedx = ob.bullSpeed * Math.cos((ob.shootDIR * Math.PI) / 180);
speedy = ob.bullSpeed * Math.sin((ob.shootDIR * Math.PI) / 180);
game.clip.attachMovie("bullet", _local1, 40300 + game.bulletcounter, {_x:x, _y:y});
game.clip[_local1].gotoAndStop(ob.bulletType);
game.clip[_local1].Bulldir = dirx;
game.clip[_local1]._xscale = game.clip[_local1]._xscale * dirx;
game.clip[_local1]._rotation = ob.shootDIR;
game.clip[_local1].speedx = Math.abs(speedx) * dirx;
game.clip[_local1].speedy = Math.abs(speedy);
game.clip[_local1]._x = game.clip[_local1]._x + game.clip[_local1].speedx;
game.clip[_local1]._y = game.clip[_local1]._y + game.clip[_local1].speedy;
game.clip[_local1].cacheAsBitmap;
}
function shootRocket(ob, dirx, origin) {
game.rocketcounter++;
j = 0;
while (j < 15) {
if (game.rocketcounter > 15) {
game.rocketcounter = 1;
}
if (game["rocket" + game.rocketcounter].alive) {
game.rocketcounter++;
} else if (!game["rocket" + game.rocketcounter].alive) {
break;
}
j++;
}
var _local1 = "rocket" + game.rocketcounter;
game[_local1] = new game.Rocket();
game[_local1].alive = true;
game[_local1].stage = 1;
game[_local1].strength = 10;
game[_local1].speed = ob.rocketSpeed;
game[_local1].origin = origin;
x = ob.clip._x;
y = ob.clip._y - 40;
speedx = ob.rocketSpeed * Math.cos((ob.rocketDIR * Math.PI) / 180);
speedy = ob.rocketSpeed * Math.sin((ob.rocketDIR * Math.PI) / 180);
game.clip.attachMovie("bullet", _local1, 10200 + game.rocketcounter, {_x:x, _y:y});
game.clip[_local1].gotoAndStop(9);
game.clip[_local1].Bulldir = dirx;
game.clip[_local1]._xscale = game.clip[_local1]._xscale * dirx;
game.clip[_local1]._rotation = ob.rocketDIR * dirx;
game.clip[_local1].speedx = speedx * dirx;
game.clip[_local1].speedy = speedy;
game.clip[_local1]._x = game.clip[_local1]._x + game.clip[_local1].speedx;
game.clip[_local1]._y = game.clip[_local1]._y + game.clip[_local1].speedy;
game.clip[_local1].cacheAsBitmap;
}
function moveRockets() {
var _local5 = 1;
while (_local5 < 16) {
var _local3 = "rocket" + _local5;
if (game[_local3].alive) {
if (game.clip[_local3].Bulldir == -1) {
var _local9 = game.clip[_local3]._rotation;
createHit(_local3, "trail", _local9);
}
var _local16 = game.clip["rocket" + _local5]._x;
var _local15 = game.clip["rocket" + _local5]._y;
var _local10 = game["rocket" + _local5].speed;
if (game[_local3].stage == 1) {
if (game.clip[_local3]._rotation < -1) {
game.clip[_local3]._rotation = game.clip[_local3]._rotation + 15;
var _local9 = game.clip[_local3]._rotation;
} else if (game.clip[_local3]._rotation > 1) {
game.clip[_local3]._rotation = game.clip[_local3]._rotation - 15;
var _local9 = game.clip[_local3]._rotation;
} else {
var _local9 = 1;
game[_local3].stage = 2;
r = random(game.enemies.length);
var _local8 = game.enemies[r];
var _local6 = _local8;
var _local4 = game[_local6];
game.clip["rocket" + _local5].target = _local4;
}
}
if (game[_local3].stage == 2) {
r = random(game.enemies.length);
var _local8 = game.enemies[r];
var _local6 = _local8;
var _local4 = game[_local6];
game.clip["rocket" + _local5].target = _local4;
rocketLook(game.clip["rocket" + _local5].target, _local3);
var _local9 = game.clip[_local3]._rotation;
}
if (game[_local3].stage == 3) {
var _local9 = game.clip[_local3]._rotation;
}
if (game.clip[_local3].Bulldir == 1) {
var _local9 = game.clip[_local3]._rotation;
createHit(_local3, "trail", _local9);
}
speedx = _local10 * Math.cos((_local9 * Math.PI) / 180);
speedy = _local10 * Math.sin((_local9 * Math.PI) / 180);
game.clip["rocket" + _local5]._x = game.clip["rocket" + _local5]._x + (speedx * game.clip["rocket" + _local5].Bulldir);
game.clip["rocket" + _local5]._y = game.clip["rocket" + _local5]._y + (speedy * game.clip["rocket" + _local5].Bulldir);
var _local14 = game.clip["rocket" + _local5]._x;
var _local13 = game.clip["rocket" + _local5]._y;
x = _root.screen["rocket" + _local5]._x;
y = _root.screen["rocket" + _local5]._y;
var _local17 = _root.screen.hitBox;
if (checkColour("ff0000", _local14, _local13, true)) {
r = random(20);
createHit(_local3, "rockethit", 0);
if (game.fx) {
createSparks(_local3, "shrapnel", 0, 205 + r);
createSparks(_local3, "shrapnel", 0, -45 - r);
createSparks(_local3, "shrapnel", 0, 225 + r);
createSparks(_local3, "shrapnel", 0, -60 - r);
}
removeBullet(_local3);
break;
}
if (((y < -35) or (x < (char.clip._x - 600))) or ((x > (char.clip._x + 600)) and game["rocket" + _local5].alive)) {
removeBullet(_local3);
break;
}
}
if (game[_local3].origin and game[_local3].alive) {
var _local7 = 0;
while (_local7 < game.enemies.length) {
var _local8 = game.enemies[_local7];
var _local6 = _local8;
var _local4 = game[_local6];
if (checkBalloonHit(_local3, _local6, true) and _local4.active) {
sounds.bullet_hit1.start();
if (game.fx) {
createSparks(_local6, "spark", 40);
createSparks(_local6, "spark", 40);
createSparks(_local6, "spark", 40);
createSparks(_local6, "spark", 40);
}
createFlare(_local6, 50);
createHit(_local3, "rockethit");
glow(_local4, 255, 0, 0, 100);
_local4.glowTimer = setInterval(this, "glowTime", 100, _local4);
h++;
_local4.strength = _local4.strength - game[_local3].strength;
if (_local4.strength <= 0) {
_local4.stage = 0;
dx = _local4.clip._x;
dy = _local4.clip._y;
dying = "dying" + game.enemies.length;
d = 20200 + game.it;
item = "item" + d;
r = random(100);
if (r > 80) {
game.clip.attachMovie("itempickup", item, d, {_x:dx, _y:dy});
}
clearInterval(_local4.shootTimer);
if (_local4.type == 1) {
replaceSoldier(_local4);
} else {
removeOb(_local8);
game.enemies.splice(_local7, 1);
}
game.score = game.score + _local4.score;
_root.hud.score = "SCORE: " + game.score;
}
removeBullet(_local3);
break;
}
_local7++;
}
}
_local5++;
}
}
function replaceSoldier(ob) {
var _local2 = ob;
r = random(100);
if (r > 50) {
ob.clip._x = 250;
ob.dir = 1;
ob.shootdir = 1;
} else {
ob.clip._x = 250;
ob.dir = -1;
ob.shootdir = -1;
}
ob.clip._y = 0;
ob.strength = 10;
ob.stage = 2;
}
function createHit(ob, type, angle, alpha, scale, score) {
game.trailcounter++;
if (game.trailcounter > game.trails) {
game.trailcounter = 1;
}
var _local1 = "trail" + game.trailcounter;
game.clip.attachMovie(type, _local1, 20300 + game.trailcounter);
game.clip[_local1]._x = game.clip[ob]._x;
game.clip[_local1]._y = game.clip[ob]._y;
game.clip[_local1]._alpha = alpha;
game.clip[_local1]._xscale = scale;
game.clip[_local1]._yscale = scale;
game.clip[_local1]._rotation = angle;
game.clip[_local1].score = score;
game.clip[_local1].cacheAsBitmap;
if (type == "scoreadd") {
game.clip[_local1].gotoAndStop(10);
}
if (type == "textAdd") {
game.clip[_local1].gotoAndStop(10);
game.clip[_local1]._x = 250;
if (score == "bonus 500") {
game.clip[_local1]._y = 500;
} else {
game.clip[_local1]._y = 300;
}
game.clip[_local1].t = score;
}
}
function checkItems() {
var _local2 = 1;
while (_local2 < 21) {
tname = "item" + _local2;
iy = game.clip[tname]._y;
ix = game.clip[tname]._x;
x = char.clip._x;
y = char.clip._y;
if ((((x < (ix + 20)) and (x > (ix - 20))) and (y < (iy + 20))) and (y > (iy - 40))) {
sounds.collect.start();
createFlare(tname, 10);
createSparks(tname, "spark", 10);
createSparks(tname, "spark", 10);
createSparks(tname, "spark", 10);
createSparks(tname, "spark", 10);
createSparks(tname, "spark", 10);
createHit(tname, "scoreadd", 0, 100, 100, 300);
game.score = game.score + 300;
_root.hud.score = "SCORE: " + game.score;
if (game.clip[tname]._currentFrame == 5) {
char.speed = 10;
createHit(ob, "textAdd", 0, 100, 100, "SPEED UP!");
} else if (game.clip[tname]._currentFrame == 6) {
char.bulletType = 2;
createHit(ob, "textAdd", 0, 100, 100, "DOUBLE STRENGTH!");
} else if (game.clip[tname]._currentFrame == 7) {
char.bulletDis = 1;
createHit(ob, "textAdd", 0, 100, 100, "LONG SHOT!");
}
removeMovieClip(game.clip[tname]);
}
_local2++;
}
}
function createItem(ob) {
game.itemcounter++;
if (game.itemcounter > 20) {
game.itemcounter = 1;
}
r = random(100);
if (r > 70) {
s = 6;
} else {
s = 3;
}
var _local1 = "item" + game.itemcounter;
game.clip.attachMovie("items", _local1, 20400 + game.itemcounter);
game.clip[_local1]._x = game.clip[ob]._x;
game.clip[_local1]._y = game.clip[ob]._y;
game.clip[_local1].gotoAndStop(random(s) + 1);
game.clip[_local1].cacheAsBitmap;
if (game.clip[_local1]._x < 10) {
game.clip[_local1]._x = 10;
} else if (game.clip[_local1]._x > 490) {
game.clip[_local1]._x = 490;
}
}
function rocketLook(ob, rocket) {
var _local6 = game.clip[rocket]._x;
var _local4 = game.clip[rocket]._y;
var _local5 = ob.clip._x;
var _local3 = ob.clip._y - 100;
xx = _local5 - _local6;
yy = _local3 - _local4;
var _local7 = Math.floor(Math.sqrt((xx * xx) + (yy * yy)));
if (_local7 < 275) {
var _local2 = random(20) + 5;
if (game.clip[rocket].Bulldir == 1) {
if (_local3 < _local4) {
game.clip[rocket]._rotation = game.clip[rocket]._rotation - _local2;
} else {
game.clip[rocket]._rotation = game.clip[rocket]._rotation + _local2;
}
} else if (_local3 < _local4) {
game.clip[rocket]._rotation = game.clip[rocket]._rotation + _local2;
} else {
game.clip[rocket]._rotation = game.clip[rocket]._rotation - _local2;
}
}
}
function trailFade() {
var _local1 = 1;
while (_local1 < (game.trails + 1)) {
tname = "trail" + _local1;
if (game.clip[tname]._alpha > 0) {
game.clip[tname]._alpha = game.clip[tname]._alpha - 2;
game.clip[tname]._y = game.clip[tname]._y - 0.5;
if (game.clip[tname]._currentFrame != 10) {
game.clip[tname]._xscale = game.clip[tname]._xscale + 1;
game.clip[tname]._yscale = game.clip[tname]._yscale + 1;
}
}
_local1++;
}
}
function checkRocketRange(ob, bob, true) {
if (game.clip[ob]._x > (game.clip[bob]._x - 200)) {
if (game.clip[ob]._x < (game.clip[bob]._x + 200)) {
if ((game.clip[ob]._y > (game.clip[bob]._y - 150)) and (game.clip[ob]._y < (game.clip[bob]._y + 150))) {
return(true);
}
return(false);
}
}
}
function checkBalloonHit2(ob, bob, true) {
if (game.clip[ob]._x > (game.clip.char._x - (game.clip.char._width / 2))) {
if (game.clip[ob]._x < (game.clip.char._x + (game.clip.char._width / 2))) {
if ((game.clip[ob]._y > (game.clip.char._y - char.height)) and (game.clip[ob]._y < game.clip.char._y)) {
return(true);
}
return(false);
}
}
}
function checkBalloonHit(ob, bob, true) {
if (game.clip[ob]._x > (game[bob].clip._x - (game[bob].clip._width / 2))) {
if (game.clip[ob]._x < (game[bob].clip._x + (game[bob].clip._width / 2))) {
if ((game.clip[ob]._y > (game[bob].clip._y - game[bob].height)) and (game.clip[ob]._y < game[bob].clip._y)) {
return(true);
}
return(false);
}
}
}
function createSparks(ob, type, minus, ang) {
game.sparksAmount++;
if (game.sparksAmount > 30) {
game.sparksAmount = 1;
}
var _local1 = "spark" + game.sparksAmount;
game[_local1] = new game.Spark();
game[_local1].angle = random(360);
r = random(3) + 1;
game.clip.attachMovie(type, _local1, 40000 + game.sparksAmount);
game.clip[_local1]._x = game.clip[ob]._x;
game.clip[_local1]._y = game.clip[ob]._y - minus;
game.clip[_local1]._rotation = game[_local1].angle;
game.clip[_local1]._alpha = 100;
game.clip[_local1].cacheAsBitmap;
game.clip[_local1].gotoAndStop(r);
}
function createSparks2(ob, type, minus, ang) {
game.sparksAmount++;
if (game.sparksAmount > 30) {
game.sparksAmount = 1;
}
var _local1 = "spark" + game.sparksAmount;
game[_local1] = new game.Spark();
game[_local1].angle = random(180) + 180;
r = random(3) + 1;
game.clip.attachMovie(type, _local1, 40000 + game.sparksAmount);
game.clip[_local1]._x = game.clip[ob]._x;
game.clip[_local1]._y = game.clip[ob]._y - minus;
game.clip[_local1]._rotation = game[_local1].angle;
game.clip[_local1]._alpha = 100;
game.clip[_local1].cacheAsBitmap;
game.clip[_local1].gotoAndStop(r);
}
function createSparks3(ob, type, minus, ang) {
game.sparksAmount++;
if (game.sparksAmount > 30) {
game.sparksAmount = 1;
}
var _local1 = "spark" + game.sparksAmount;
game[_local1] = new game.Spark();
game[_local1].angle = random(360);
r = random(3) + 1;
game.clip.attachMovie(type, _local1, 40000 + game.sparksAmount);
game.clip[_local1]._x = ob.clip._x;
game.clip[_local1]._y = ob.clip._y - minus;
game.clip[_local1]._rotation = game[_local1].angle;
game.clip[_local1]._alpha = 100;
game.clip[_local1].cacheAsBitmap;
game.clip[_local1].gotoAndStop(r);
}
function moveSparks() {
var _local2 = 0;
while (_local2 < 61) {
var _local1 = "spark" + _local2;
var _local5 = game[_local1];
var _local3 = game[_local1].speed;
if (game.clip[_local1]._alpha > -1) {
var _local4 = game.clip[_local1]._rotation;
speedx = _local3 * Math.cos((_local4 * Math.PI) / 180);
speedy = _local3 * Math.sin((_local4 * Math.PI) / 180);
game.clip[_local1]._x = game.clip[_local1]._x + speedx;
game.clip[_local1]._y = game.clip[_local1]._y + speedy;
if (game.clip[_local1]._currentFrame == 1) {
game.clip[_local1]._alpha = game.clip[_local1]._alpha - 15;
} else {
game.clip[_local1]._alpha = game.clip[_local1]._alpha - 10;
}
if (game.clip[_local1]._alpha < 0) {
game.clip[_local1].removeMovieClip();
}
}
_local2++;
}
}
function createFlare(ob, minus) {
game.flares++;
if (game.flares > 10) {
game.flares = 1;
}
var _local1 = "flare" + game.flares;
game[_local1].angle = random(360);
game.clip.attachMovie("flare", _local1, 40200 + game.flares);
game.clip[_local1]._x = game.clip[ob]._x;
game.clip[_local1]._y = game.clip[ob]._y - minus;
game.clip[_local1]._rotation = game[_local1].angle;
game.clip[_local1]._alpha = 100;
game.clip[_local1].cacheAsBitmap;
}
function createFlare2(ob, minus) {
game.flares++;
if (game.flares > 10) {
game.flares = 1;
}
var _local1 = "flare" + game.flares;
game[_local1].angle = random(360);
game.clip.attachMovie("flare2", _local1, 40200 + game.flares);
game.clip[_local1]._x = game.clip[ob]._x;
game.clip[_local1]._y = game.clip[ob]._y - minus;
game.clip[_local1]._rotation = game[_local1].angle;
game.clip[_local1]._alpha = 100;
game.clip[_local1]._rotation = random(360);
game.clip[_local1].cacheAsBitmap;
}
function flareGrow() {
var _local2 = 0;
while (_local2 < 11) {
var _local1 = "flare" + _local2;
var _local3 = game[_local1];
if (game.clip[_local1]._alpha > -1) {
if (char.stage != 1) {
g = 10;
} else {
g = 20;
}
game.clip[_local1]._xscale = game.clip[_local1]._xscale + g;
game.clip[_local1]._yscale = game.clip[_local1]._yscale + g;
game.clip[_local1]._alpha = game.clip[_local1]._alpha - 15;
if (game.clip[_local1]._alpha < 0) {
game.clip[_local1].removeMovieClip();
}
}
_local2++;
}
}
function moveBullets() {
var _local4 = 1;
while (_local4 < 20) {
var _local5 = "bullet" + _local4;
if (game[_local5].alive) {
speed = game["bullet" + _local4].speed;
if (game["bullet" + _local4].origin) {
if ((game.clip["bullet" + _local4]._rotation < 90) and (game.clip["bullet" + _local4].Bulldir == 1)) {
game.clip["bullet" + _local4]._rotation = game.clip["bullet" + _local4]._rotation + (5 * char.bulletDis);
} else if ((game.clip["bullet" + _local4]._rotation > -90) and (game.clip["bullet" + _local4].Bulldir == -1)) {
game.clip["bullet" + _local4]._rotation = game.clip["bullet" + _local4]._rotation - (5 * char.bulletDis);
}
}
if (!game["bullet" + _local4].origin) {
game.clip["bullet" + _local4].leaf._rotation = game.clip["bullet" + _local4].leaf._rotation + random(15);
}
var _local7 = game.clip["bullet" + _local4]._rotation;
speedx = speed * Math.cos((_local7 * Math.PI) / 180);
speedy = speed * Math.sin((_local7 * Math.PI) / 180);
game.clip["bullet" + _local4]._x = game.clip["bullet" + _local4]._x + (speedx * game.clip["bullet" + _local4].Bulldir);
game.clip["bullet" + _local4]._y = game.clip["bullet" + _local4]._y + (speedy * game.clip["bullet" + _local4].Bulldir);
x = _root.screen["bullet" + _local4]._x;
y = _root.screen["bullet" + _local4]._y;
var _local9 = _root.screen.hitBox;
if ((checkColour("ff0000", x, y, true) or checkColour("ff", x, y, true)) or checkColour("ffff00", x, y, true)) {
var _local8 = random(360);
createHit(_local5, "groundhit", _local8);
removeBullet(_local5);
break;
}
yy = game.clip._y * -1;
if ((((y < -20) or (y > 550)) or (x < 0)) or ((x > 500) and game["bullet" + _local4].alive)) {
removeBullet(_local5);
break;
}
if (((!game[_local5].origin) and (!char.invincible)) and (char.charConnect == null)) {
if (checkBalloonHit2(_local5, "char", true)) {
char.invincible = true;
sounds.dead_thud.start();
sounds.hurt.start();
char.stage = 3;
char.s = 0;
createFlare(name, 50);
createSparks("char", "small_snowball", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "small_snowball", 40);
createSparks("char", "spark", 40);
createSparks("char", "spark", 40);
createSparks("char", "spark", 40);
createSparks("char", "spark", 40);
char.lives = char.lives - 1;
_root.hud.lives.gotoAndStop(5 - char.lives);
char.clip.gotoAndStop(5);
removeBullet(_local5);
}
}
if (game[_local5].origin and game[_local5].alive) {
var _local6 = 0;
while (_local6 < game.enemies.length) {
en = game.enemies[_local6];
var name = en;
var _local3 = game[name];
if ((checkBalloonHit(_local5, name, true) and _local3.active) and game[_local5].origin) {
sounds.bullet_hit1.start();
if (game.fx and (!_local3.rolling)) {
createSparks(name, "spark", 40);
if (_local3.stage != 4) {
createSparks(name, "spark", 40);
createSparks(name, "spark", 40);
createSparks(name, "spark", 40);
createSparks(name, "spark", 40);
}
}
glow(_local3, 255, 0, 0, 100);
_local3.glowTimer = setInterval(this, "glowTime", 100, _local3);
_local3.strength = _local3.strength - (1 * char.bulletType);
_local3.stage = 2;
if (_local3.jump) {
_local3.falling = true;
_local3.jumpspeed = 0;
}
_local3.clip.gotoAndStop(3);
_local3.clip.char.gotoAndStop(11 - _local3.strength);
clearInterval(_local3.snowTimer);
_local3.snowTimer = setInterval(this, "snowTime", 1000, _local3);
if ((_local3.strength <= 0) and (_local3.stage != 4)) {
if (((char.clip._x > (_local3.clip._x - 45)) and (char.clip._x < (_local3.clip._x + 45))) and (!_local3.rolling)) {
if ((char.clip._y > (_local3.clip._y - 10)) and (char.clip._y < (_local3.clip._y + 10))) {
sounds.snowhit1.start();
_local3.rolling = true;
clearInterval(_local3.snowTimer);
if (_local3.clip._x < char.clip._x) {
_local3.dir = -1;
} else {
_local3.dir = 1;
}
_local3.clip._xscale = 100 * _local3.dir;
}
}
_local3.stage = 4;
_local3.clip.gotoAndStop(4);
clearInterval(_local3.snowTimer);
if (!_local3.rolling) {
_local3.snowTimer = setInterval(this, "snowTime", 10000, _local3);
}
}
if (_local3.stage != 4) {
removeBullet(_local5);
}
break;
}
_local6++;
}
}
}
_local4++;
}
}
function removeOb(id) {
game[id].alive = false;
game.clip[id].removeMovieClip();
delete game[id];
}
function removeBullet(id) {
game[id].alive = false;
game.clip[id].removeMovieClip();
}
function enemyTime(ob) {
ob.shooting = false;
if (ob.shots == 2) {
ob.stage = 1;
ob.shots = 0;
}
clearInterval(ob.shootTimer);
}
function glowTime(ob) {
glow(ob, 0, 0, 0, 100);
clearInterval(ob.glowTimer);
}
function snowTime(ob) {
if (ob.stage != 4) {
ob.clip.char.prevFrame();
if (ob.clip.char._currentFrame == 1) {
clearInterval(ob.snowTimer);
ob.stage = 1;
ob.clip.gotoAndStop(1);
}
} else {
createSparks3(ob, "small_snowball", 40);
createSparks3(ob, "small_snowball", 40);
createSparks3(ob, "small_snowball", 40);
createSparks3(ob, "small_snowball", 40);
createSparks3(ob, "small_snowball", 40);
ob.stage = 2;
ob.strength = 6;
ob.clip.gotoAndStop(3);
ob.clip.char.gotoAndStop(5);
clearInterval(ob.snowTimer);
ob.snowTimer = setInterval(this, "snowTime", 1000, ob);
}
}
function shootTime(ob) {
ob.shoot = true;
ob.shooting = false;
clearInterval(ob.shootTimer);
}
function rocketTime() {
_root.char.rocket = true;
clearInterval(char.rocketTimer);
}
Stage.scaleMode = "noScale";
_quality = "MEDIUM";
char = {speed:6, jumpstart:-22, gravity:2, jump:true, plat:false, falling:true, duck:false, shooting:false, shoot:false, bullSpeed:1, rocketSpeed:25, dir:1};
char.wallhit = false;
char.walking = false;
char.bomb = false;
char.rocket = true;
char.bulletType = 1;
char.reload = 100;
char.rocketDIR = -90;
char.width = 20;
char.id = "player 1";
char.lives = 4;
char.bullets = 99;
char.rockets = 99;
char.charConnect = null;
char.bulletDis = 2;
char.stage = 0;
char.s = 0;
game = {tileW:50, tileH:50, alive:true, bulletcounter:0, rocketcounter:0, trailcounter:0, shrapnelcounter:0};
_root.paws = false;
game.trails = 20;
game.fx = true;
game.score = 0;
game.itemcounter = 0;
game.level = 1;
game.Bullet = function () {
};
game.Bullet.prototype.speed = 10;
game.Bullet.prototype.strength = 1;
game.Bullet.prototype.origin = true;
game.Bullet.prototype.angle = 0;
game.Rocket = function () {
};
game.Rocket.prototype.speed = 15;
game.Rocket.prototype.origin = true;
game.Rocket.prototype.stage = 1;
game.Rocket.prototype.strength = 10;
game.Shrapnel = function () {
};
game.Shrapnel.prototype.speed = 15;
game.Shrapnel.prototype.alive = true;
game.Spark = function () {
};
game.Spark.prototype.speed = 15;
game.Spark.prototype.gravity = 0;
game.Spark.prototype.dir = 1;
game.sparksAmount = 0;
game.flares = 0;
game.Smoke = function () {
};
game.Smoke.prototype.speed = 3;
game.Smoke.prototype.dir = 1;
game.Enemy1 = function () {
};
game.Enemy1.prototype.type = 1;
game.Enemy1.prototype.stage = 1;
game.Enemy1.prototype.speed = 2;
game.Enemy1.prototype.bulletType = 8;
game.Enemy1.prototype.jump = true;
game.Enemy1.prototype.jumpstart = -22;
game.Enemy1.prototype.falling = true;
game.Enemy1.prototype.walking = false;
game.Enemy1.prototype.wallhit = false;
game.Enemy1.prototype.width = 15;
game.Enemy1.prototype.height = 80;
game.Enemy1.prototype.duck = false;
game.Enemy1.prototype.shoot = true;
game.Enemy1.prototype.shooting = false;
game.Enemy1.prototype.bullSpeed = 1;
game.Enemy1.prototype.dir = -1;
game.Enemy1.prototype.gravity = 2;
game.Enemy1.prototype.shootDIR = -1;
game.Enemy1.prototype.id = "enemy robot 1";
game.Enemy1.prototype.active = true;
game.Enemy1.prototype.strength = 10;
game.Enemy1.prototype.score = 100;
game.Enemy1.prototype.jumpint = 70;
game.Enemy1.prototype.rolling = false;
game.Enemy1.prototype.charConnect = false;
game.Enemy1.prototype.wallHits = 0;
game.Enemy1.prototype.ballCommand = false;
game.Enemy2 = function () {
};
game.Enemy2.prototype.type = 2;
game.Enemy2.prototype.stage = 1;
game.Enemy2.prototype.speed = 2.5;
game.Enemy2.prototype.bulletType = 8;
game.Enemy2.prototype.jump = true;
game.Enemy2.prototype.jumpstart = -22;
game.Enemy2.prototype.falling = true;
game.Enemy2.prototype.walking = false;
game.Enemy2.prototype.wallhit = false;
game.Enemy2.prototype.width = 15;
game.Enemy2.prototype.height = 80;
game.Enemy2.prototype.duck = false;
game.Enemy2.prototype.shoot = true;
game.Enemy2.prototype.shooting = false;
game.Enemy2.prototype.bullSpeed = 1;
game.Enemy2.prototype.dir = -1;
game.Enemy2.prototype.gravity = 2;
game.Enemy2.prototype.shootDIR = -1;
game.Enemy2.prototype.id = "enemy robot 1";
game.Enemy2.prototype.active = true;
game.Enemy2.prototype.strength = 10;
game.Enemy2.prototype.score = 150;
game.Enemy2.prototype.jumpint = 65;
game.Enemy2.prototype.rolling = false;
game.Enemy2.prototype.charConnect = false;
game.Enemy2.prototype.wallHits = 0;
game.Enemy2.prototype.ballCommand = false;
game.Enemy3 = function () {
};
game.Enemy3.prototype.type = 3;
game.Enemy3.prototype.stage = 1;
game.Enemy3.prototype.speed = 2.2;
game.Enemy3.prototype.bulletType = 3;
game.Enemy3.prototype.jump = true;
game.Enemy3.prototype.jumpstart = -22;
game.Enemy3.prototype.falling = true;
game.Enemy3.prototype.walking = false;
game.Enemy3.prototype.wallhit = false;
game.Enemy3.prototype.width = 15;
game.Enemy3.prototype.height = 80;
game.Enemy3.prototype.duck = false;
game.Enemy3.prototype.shoot = true;
game.Enemy3.prototype.shooting = false;
game.Enemy3.prototype.bullSpeed = 0.5;
game.Enemy3.prototype.dir = -1;
game.Enemy3.prototype.gravity = 2;
game.Enemy3.prototype.shootDIR = -1;
game.Enemy3.prototype.id = "enemy robot 1";
game.Enemy3.prototype.active = true;
game.Enemy3.prototype.strength = 10;
game.Enemy3.prototype.score = 200;
game.Enemy3.prototype.jumpint = 60;
game.Enemy3.prototype.rolling = false;
game.Enemy3.prototype.charConnect = false;
game.Enemy3.prototype.wallHits = 0;
game.Enemy3.prototype.ballCommand = false;
game.Enemy3.prototype.flame = true;
game.Enemy3.prototype.shots = 0;
game.Enemy3.prototype.shooting = false;
game.enemies = new Array();
game.levelstart = 0;
game.sparks = new Array();
game.smoke = new Array();
myMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, 1, 0, "i3"], [3, 3, 3, 3, 0, 0, 3, 3, 3, 3], [0, 0, 0, 0, "i2", 0, 0, 0, 0, 0], [0, 0, 0, 5, 3, 3, 6, 0, 0, 0], [0, 0, 0, 0, "i1", 0, 0, 0, 0, 0], [0, 0, 3, 3, 3, 5, 3, 3, 0, 0], [0, 0, 0, 0, "i1", 0, 0, 0, 0, 0], [0, 3, 3, 3, 3, 5, 3, 3, 3, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [3, 3, 3, 3, 5, 3, 3, 3, 3, 3]];
setUpSounds();
Level1 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, "i1"], [0, 3, 3, 3, 3, 3, 3, 3, 3, 3], ["i1", 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 3, 3, 3, 3, 6, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, "i1"], [0, 5, 3, 3, 3, 3, 3, 3, 3, 3], ["i1", 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 3, 3, 3, 3, 6, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 2, 3, 3, 6, 3, 3, 3, 3, 3]];
Level2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i1", 0, 0, 0, 0, 0, 0, 1, 0, "i1"], [3, 3, 3, 3, 0, 0, 3, 3, 3, 3], [0, 0, 0, 0, "i2", 0, 0, 0, 0, 0], [0, 0, 0, 5, 3, 3, 6, 0, 0, 0], [0, 0, 0, 0, "i1", 0, 0, 0, 0, 0], [0, 0, 3, 3, 3, 5, 3, 3, 0, 0], [0, 0, 0, 0, "i1", 0, 0, 0, 0, 0], [0, 3, 3, 3, 3, 5, 3, 3, 3, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [3, 3, 3, 6, 3, 3, 3, 3, 3, 3]];
Level3 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, "i1", 0, 0, 0, 0, "i1", 0, 0], [0, 6, 2, 2, 2, 2, 2, 2, 5, 0], ["i2", 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 2, 2, 6, 2, 6, 2, 2, 0], [0, 0, "i1", 0, 0, 0, 0, "i1", 0, 0], [0, 0, 2, 2, 2, 2, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 5, 2, 0, 0, 2, 6, 2, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 6, 2, 2, 2, 2, 2, 6, 2]];
Level4 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i1", 0, 0, 0, 0, "i1", 0, 0, 0, 0], [2, 2, 2, 2, 0, 2, 2, 2, 2, 2], [0, 0, "i2", 4, 0, 4, "i2", 0, 0, 0], [0, 2, 5, 4, 0, 4, 6, 2, 2, 0], [0, 0, 0, 4, 0, 4, 0, 0, 0, 0], [2, 6, 0, 4, 0, 4, 0, 2, 6, 2], [0, 0, "i1", 4, 0, 4, 12, "i1", 0, 12], [0, 6, 2, 4, 0, 4, 2, 6, 2, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 6, 2, 2, 2, 2, 2, 6, 2]];
Level5 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, "i3", 0, 0, 0, 0, 0, 0, "i2", 0], [0, 2, 2, 2, 2, 2, 2, 2, 2, 0], ["i1", 0, 0, 4, 12, 0, 4, 0, 0, "i1"], [2, 5, 0, 4, 2, 2, 4, 0, 6, 2], [0, 0, 0, 4, 0, 12, 4, 0, 0, 0], [0, 0, 5, 4, 2, 2, 4, 6, 0, 0], [0, 0, "i2", 0, 0, 0, 0, "i1", 0, 0], [0, 2, 2, 2, 2, 2, 2, 2, 2, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 6, 2, 2, 2, 2, 6, 2, 2]];
Level6 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i2", 0, 0, 0, 0, 0, 0, 1, 0, "i2"], [2, 2, 2, 2, 0, 0, 2, 2, 2, 2], [0, 0, 0, 0, "i1", 0, 0, 0, 0, 0], [0, 0, 0, 0, 5, 6, 0, 0, 0, 0], [0, 2, 2, 0, 0, 0, 0, 2, 2, 0], [0, 4, 4, 0, 6, 5, 0, 4, 4, 0], [0, 0, "i3", 0, 0, 0, 0, "i3", 0, 0], [2, 0, 2, 6, 2, 2, 5, 2, 0, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 2, 2, 5, 2, 2, 2, 2]];
Level7 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, "i3", 0, 0, 0, 0, 0, 1, 0, 0], [0, 2, 2, 2, 2, 2, 2, 0, 0, 0], ["i1", 0, 0, "i2", 0, 0, 0, 0, 0, "i3"], [2, 6, 0, 2, 2, 2, 5, 2, 2, 2], [0, 0, 0, 4, 4, 0, "i1", 0, 0, 0], [6, 2, 0, 4, 4, 0, 2, 6, 2, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, "i1"], [2, 5, 0, 0, 2, 6, 2, 2, 2, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 2, 2, 2, 2, 6, 2, 2]];
Level8 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, "i2", 0, 0, 0, 0, 1, 0, "i2"], [0, 0, 5, 2, 2, 2, 2, 2, 2, 2], ["i3", 0, 0, 0, 4, "i3", 0, 0, 0, 4], [2, 6, 0, 0, 4, 6, 2, 0, 0, 4], [0, 0, "i1", 0, 4, 0, 0, 0, "i1", 4], [0, 0, 5, 2, 4, 0, 0, 5, 2, 4], [0, 0, 0, 0, 4, 0, 0, 0, 0, 4], [2, 6, 0, 0, 4, 2, 6, 0, 0, 4], [12, 0, 0, 0, 0, 0, 0, 0, 12, 4], [2, 5, 2, 2, 2, 2, 5, 6, 2, 4]];
Level9 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, 1, 0, 0], [2, 2, 10, 0, 0, 0, 0, 0, 0, 0], [0, 0, 7, 10, 0, 0, 0, 0, "i2", 0], [0, 0, 0, 7, 2, 5, 2, 2, 5, 0], [0, 2, 10, "i2", 0, 0, 0, 0, "i3", 12], [0, 0, 7, 2, 6, 2, 6, 2, 2, 2], ["i3", 0, 0, 0, 0, 0, "i1", 0, 0, 12], [2, 5, 2, 6, 2, 2, 2, 0, 0, 11], [12, 0, 0, 0, 0, 0, 0, 0, 11, 9], [2, 2, 2, 2, 6, 2, 2, 2, 9, 4]];
Level10 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, "i2", 0, 0, 0, 0, 0, 1, "i2", 0], [0, 2, 2, 2, 2, 2, 2, 2, 2, 0], [0, 4, 0, 0, "i1", 0, 0, 0, 4, 0], [0, 4, 0, 0, 2, 2, 6, 2, 4, 0], [0, 4, 0, 0, 4, 0, 0, 0, 4, 0], [0, 4, 0, 0, 4, 2, 5, 0, 4, 0], [0, 4, 10, "i3", 0, 0, 0, 0, "i1", 0], [0, 4, 9, 2, 6, 2, 2, 5, 2, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 2, 2, 6, 2, 2, 2, 2]];
Level11 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, "i3", 0, 0, "i1", 0, 0, 0], [0, 0, 11, 2, 2, 2, 2, 10, 0, 0], [0, 2, 8, "i2", 0, 0, 12, 7, 2, 0], [0, 4, 0, 2, 2, 5, 2, 0, 4, 0], [0, 0, 0, 0, 0, "i1", 0, 0, 0, 0], [0, "i2", 0, 0, 5, 6, 0, 0, "i2", 0], [0, 2, 2, 10, "i3", 0, 11, 2, 2, 0], [0, 0, 0, 7, 6, 2, 8, 0, 0, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 2, 2, 6, 2, 2, 2, 2]];
Level12 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i2", 0, 0, 0, 0, 0, 0, 1, 0, "i3"], [2, 2, 2, 0, 0, 0, 0, 2, 2, 2], [0, 0, "i3", 0, 0, 0, 0, 0, 0, "i2"], [0, 0, 6, 2, 2, 2, 2, 6, 2, 2], [0, 0, "i1", 0, 0, 0, 0, "i1", 0, 0], [0, 2, 6, 2, 0, 0, 11, 6, 2, 0], [12, 0, 0, "i2", 0, 11, 8, 0, 0, 0], [10, 0, 0, 6, 2, 8, 0, 0, 6, 2], [9, 10, 0, 12, 6, 0, 0, 0, 0, 12], [9, 9, 2, 2, 2, 2, 2, 2, 2, 2]];
Level13 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, "i3", 0, 0, "i2", 1, 0, 0], [0, 0, 11, 2, 2, 2, 2, 10, 0, 0], [0, 0, 8, 0, "i1", 0, 0, 7, 10, "i2"], [0, 0, 0, 0, 6, 5, 0, 0, 7, 2], ["i2", 0, 0, 0, 0, "i1", 0, 0, 0, "i1"], [12, 0, 0, 0, 6, 5, 0, 0, 0, 12], [10, 0, 0, 0, 0, 0, 0, 0, 0, 11], [9, 10, 0, 0, 6, 5, 0, 0, 11, 9], [4, 9, 10, 0, 0, 0, 0, 11, 9, 4], [4, 4, 9, 2, 5, 6, 2, 9, 4, 4]];
Level14 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, "i2", 0, 0], [2, 2, 2, 2, 2, 5, 2, 2, 0, 0], [0, 0, "i1", 0, 0, 0, 0, 0, 0, "i3"], [0, 0, 2, 5, 2, 2, 2, 2, 5, 2], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, "i1"], [2, 2, 2, 6, 0, 0, 5, 2, 2, 2], [12, 0, 0, 0, 0, "i1", 0, 0, 0, 12], [10, 0, 0, 2, 2, 5, 2, 0, 0, 11], [9, 10, 0, 0, 0, 0, 0, 0, 11, 9], [9, 9, 2, 2, 6, 5, 2, 2, 9, 9]];
Level15 = [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, "i3"], [3, 6, 3, 10, 0, 0, 3, 6, 3, 3], [0, 0, 0, 7, 10, 0, 0, "i2", 0, 0], [3, 5, 0, 0, 7, 3, 6, 3, 3, 0], ["i1", 0, 0, 0, 0, 0, 0, 0, 0, "i3"], [3, 5, 0, 0, 11, 2, 6, 6, 2, 2], [0, "i1", 0, 11, 8, 0, 0, 0, 0, 0], [0, 3, 5, 8, 0, 0, 2, 6, 2, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 5, 2, 2, 2, 2, 2, 6, 2]];
Level16 = [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, "i2"], [2, 2, 2, 2, 0, 2, 2, 2, 2, 2], [0, 0, 0, 0, 0, "i3", 0, 0, 0, "i1"], [0, 0, 2, 5, 2, 5, 0, 0, 11, 0], [10, "i1", 0, 0, 0, 0, 0, 11, 8, 0], [7, 2, 5, 0, 2, 6, 2, 8, 0, 0], [0, "i3", 0, 0, 0, 0, "i2", 0, 0, 0], [0, 2, 5, 2, 2, 6, 2, 0, 0, 6], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 5, 2, 2, 2, 2, 2, 5]];
Level17 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, "i3"], [0, 3, 3, 3, 3, 3, 3, 3, 3, 3], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 3, 3, 3, 3, 6, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, "i3"], [0, 5, 3, 3, 3, 3, 3, 3, 3, 3], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 3, 3, 3, 3, 6, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 2, 3, 3, 6, 3, 3, 3, 3, 3]];
Level18 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, 1, 0, "i3"], [3, 3, 3, 3, 0, 0, 3, 3, 3, 3], [0, 0, 0, 0, "i2", 0, 0, 0, 0, 0], [0, 0, 0, 5, 3, 3, 6, 0, 0, 0], [0, 0, 0, 0, "i3", 0, 0, 0, 0, 0], [0, 0, 3, 3, 3, 5, 3, 3, 0, 0], [0, 0, 0, 0, "i3", 0, 0, 0, 0, 0], [0, 3, 3, 3, 3, 5, 3, 3, 3, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [3, 3, 3, 6, 3, 3, 3, 3, 3, 3]];
Level19 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, "i3", 0, 0, 0, 0, "i3", 0, 0], [0, 6, 2, 2, 2, 2, 2, 2, 5, 0], ["i2", 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 2, 2, 6, 2, 6, 2, 2, 0], [0, 0, "i3", 0, 0, 0, 0, "i3", 0, 0], [0, 0, 2, 2, 2, 2, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 5, 2, 0, 0, 2, 6, 2, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 6, 2, 2, 2, 2, 2, 6, 2]];
Level20 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, "i3", 0, 0, 0, 0], [2, 2, 2, 2, 0, 2, 2, 2, 2, 2], [0, 0, "i2", 4, 0, 4, "i2", 0, 0, 0], [0, 2, 5, 4, 0, 4, 6, 2, 2, 0], [0, 0, 0, 4, 0, 4, 0, 0, 0, 0], [2, 6, 0, 4, 0, 4, 0, 2, 6, 2], [0, 0, "i3", 4, 0, 4, 12, "i3", 0, 12], [0, 6, 2, 4, 0, 4, 2, 6, 2, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 6, 2, 2, 2, 2, 2, 6, 2]];
Level21 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, "i3", 0, 0, 0, 0, 0, 0, "i2", 0], [0, 2, 2, 2, 2, 2, 2, 2, 2, 0], ["i3", 0, 0, 4, 12, 0, 4, 0, 0, "i3"], [2, 5, 0, 4, 2, 2, 4, 0, 6, 2], [0, 0, 0, 4, 0, 12, 4, 0, 0, 0], [0, 0, 5, 4, 2, 2, 4, 6, 0, 0], [0, 0, "i2", 0, 0, 0, 0, "i3", 0, 0], [0, 2, 2, 2, 2, 2, 2, 2, 2, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 6, 2, 2, 2, 2, 6, 2, 2]];
Level22 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i2", 0, 0, 0, 0, 0, 0, 1, 0, "i2"], [2, 2, 2, 2, 0, 0, 2, 2, 2, 2], [0, 0, 0, 0, "i3", 0, 0, 0, 0, 0], [0, 0, 0, 0, 5, 6, 0, 0, 0, 0], [0, 2, 2, 0, 0, 0, 0, 2, 2, 0], [0, 4, 4, 0, 6, 5, 0, 4, 4, 0], [0, 0, "i3", 0, 0, 0, 0, "i3", 0, 0], [2, 0, 2, 6, 2, 2, 5, 2, 0, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 2, 2, 5, 2, 2, 2, 2]];
Level23 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, "i3", 0, 0, 0, 0, 0, 1, 0, 0], [0, 2, 2, 2, 2, 2, 2, 0, 0, 0], ["i3", 0, 0, "i2", 0, 0, 0, 0, 0, "i3"], [2, 6, 0, 2, 2, 2, 5, 2, 2, 2], [0, 0, 0, 4, 4, 0, "i3", 0, 0, 0], [6, 2, 0, 4, 4, 0, 2, 6, 2, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, "i3"], [2, 5, 0, 0, 2, 6, 2, 2, 2, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 2, 2, 2, 2, 6, 2, 2]];
Level24 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, "i2", 0, 0, 0, 0, 1, 0, "i2"], [0, 0, 5, 2, 2, 2, 2, 2, 2, 2], ["i3", 0, 0, 0, 4, "i3", 0, 0, 0, 4], [2, 6, 0, 0, 4, 6, 2, 0, 0, 4], [0, 0, "i3", 0, 4, 0, 0, 0, "i3", 4], [0, 0, 5, 2, 4, 0, 0, 5, 2, 4], [0, 0, 0, 0, 4, 0, 0, 0, 0, 4], [2, 6, 0, 0, 4, 2, 6, 0, 0, 4], [12, 0, 0, 0, 0, 0, 0, 0, 12, 4], [2, 5, 2, 2, 2, 2, 5, 6, 2, 4]];
Level25 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, 1, 0, 0], [2, 2, 10, 0, 0, 0, 0, 0, 0, 0], [0, 0, 7, 10, 0, 0, 0, 0, "i2", 0], [0, 0, 0, 7, 2, 5, 2, 2, 5, 0], [0, 2, 10, "i2", 0, 0, 0, 0, "i3", 12], [0, 0, 7, 2, 6, 2, 6, 2, 2, 2], ["i3", 0, 0, "i2", 0, 0, "i3", 0, 0, 12], [2, 5, 2, 6, 2, 2, 2, 0, 0, 11], [12, 0, 0, 0, 0, 0, 0, 0, 11, 9], [2, 2, 2, 2, 6, 2, 2, 2, 9, 4]];
Level26 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, "i2", 0, 0, 0, 0, 0, 1, "i2", 0], [0, 2, 2, 2, 2, 2, 2, 2, 2, 0], [0, 4, 0, 0, "i3", 0, 0, 0, 4, 0], [0, 4, 0, 0, 2, 2, 6, 2, 4, 0], [0, 4, 0, 0, 4, 0, 0, 0, 4, 0], [0, 4, 0, 0, 4, 2, 5, 0, 4, 0], [0, 4, 10, "i3", 0, 0, 0, 0, "i3", 0], [0, 4, 9, 2, 6, 2, 2, 5, 2, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 2, 2, 6, 2, 2, 2, 2]];
Level27 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, "i3", 0, 0, "i3", 0, 0, 0], [0, 0, 11, 2, 2, 2, 2, 10, 0, 0], [0, 2, 8, "i2", 0, 0, 12, 7, 2, 0], [0, 4, 0, 2, 2, 5, 2, 0, 4, 0], [0, 0, 0, 0, 0, "i3", 0, 0, 0, 0], [0, "i2", 0, 0, 5, 6, 0, 0, "i2", 0], [0, 2, 2, 10, "i3", 0, 11, 2, 2, 0], [0, 0, 0, 7, 6, 2, 8, 0, 0, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 2, 2, 6, 2, 2, 2, 2]];
Level28 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i2", 0, 0, 0, 0, 0, 0, 1, 0, "i3"], [2, 2, 2, 0, 0, 0, 0, 2, 2, 2], [0, 0, "i3", 0, 0, 0, 0, 0, 0, "i2"], [0, 0, 6, 2, 2, 2, 2, 6, 2, 2], [0, 0, "i3", 0, 0, 0, 0, "i3", 0, 0], [0, 2, 6, 2, 0, 0, 11, 6, 2, 0], [12, 0, 0, "i2", 0, 11, 8, 0, 0, 0], [10, 0, 0, 6, 2, 8, 0, 0, 6, 2], [9, 10, 0, 12, 6, 0, 0, 0, 0, 12], [9, 9, 2, 2, 2, 2, 2, 2, 2, 2]];
Level29 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, "i3", 0, 0, "i2", 1, 0, 0], [0, 0, 11, 2, 2, 2, 2, 10, 0, 0], [0, 0, 8, 0, "i3", 0, 0, 7, 10, "i2"], [0, 0, 0, 0, 6, 5, 0, 0, 7, 2], ["i2", 0, 0, 0, 0, "i3", 0, 0, 0, "i3"], [12, 0, 0, 0, 6, 5, 0, 0, 0, 12], [10, 0, 0, 0, 0, 0, 0, 0, 0, 11], [9, 10, 0, 0, 6, 5, 0, 0, 11, 9], [4, 9, 10, 0, 0, 0, 0, 11, 9, 4], [4, 4, 9, 2, 5, 6, 2, 9, 4, 4]];
Level30 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, "i2", 0, 0], [2, 2, 2, 2, 2, 5, 2, 2, 0, 0], [0, 0, "i3", 0, 0, 0, 0, 0, 0, "i3"], [0, 0, 2, 5, 2, 2, 2, 2, 5, 2], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, "i3"], [2, 2, 2, 6, 0, 0, 5, 2, 2, 2], [12, 0, 0, 0, 0, "i3", 0, 0, 0, 12], [10, 0, 0, 2, 2, 5, 2, 0, 0, 11], [9, 10, 0, 0, 0, 0, 0, 0, 11, 9], [9, 9, 2, 2, 6, 5, 2, 2, 9, 9]];
Level31 = [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, "i3"], [3, 6, 3, 10, 0, 0, 3, 6, 3, 3], [0, 0, 0, 7, 10, 0, 0, "i2", 0, 0], [3, 5, 0, 0, 7, 3, 6, 3, 3, 0], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, "i3"], [3, 5, 0, 0, 11, 2, 6, 6, 2, 2], [0, "i3", 0, 11, 8, 0, 0, 0, 0, 0], [0, 3, 5, 8, 0, 0, 2, 6, 2, 2], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 5, 2, 2, 2, 2, 2, 6, 2]];
Level32 = [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], ["i3", 0, 0, 0, 0, 0, 0, 0, 0, "i2"], [2, 2, 2, 2, 0, 2, 2, 2, 2, 2], [0, 0, 0, 0, 0, "i3", 0, 0, 0, "i3"], [0, 0, 2, 5, 2, 5, 0, 0, 11, 0], [10, "i3", 0, 0, 0, 0, 0, 11, 8, 0], [7, 2, 5, 0, 2, 6, 2, 8, 0, 0], [0, "i3", 0, 0, 0, 0, "i2", 0, 0, 0], [0, 2, 5, 2, 2, 6, 2, 0, 0, 6], [12, 0, 0, 0, 0, 0, 0, 0, 0, 12], [2, 2, 2, 5, 2, 2, 2, 2, 2, 5]];
buildChars();
buildMap(Level1);
stop();
Instance of Symbol 16 MovieClip [empty] in Frame 63
onClipEvent (enterFrame) {
if (!_root.paws) {
_root.checkKeys();
}
}
Frame 64
score = _root.game.score;
_root.hud.removeMovieClip();
stop();
Symbol 7 MovieClip Frame 2
stop();
Symbol 25 MovieClip Frame 1
var gameBytesTotal = 0;
var gameBytesLoaded = 0;
var percent = 0;
Symbol 25 MovieClip Frame 3
gameBytesTotal = _root.getBytesTotal();
gameBytesLoaded = _root.getBytesLoaded();
percent = Math.round((gameBytesLoaded / gameBytesTotal) * 100);
bar.loadbar._xscale = percent;
if (((gameBytesLoaded >= gameBytesTotal) && (gameBytesTotal > 0)) && (_root.logo._currentframe >= _root.logo._totalframes)) {
_root.gotoAndPlay("startgame");
stop();
} else {
gotoAndPlay ("preload");
}
Symbol 29 Button
on (release) {
getURL (_root.main_link, "_blank");
}
Symbol 99 MovieClip Frame 1
_root.loading._visible = false;
Symbol 99 MovieClip Frame 207
_root.loading._visible = true;
stop();
Symbol 114 Button
on (release) {
stopAllSounds();
play();
}
Symbol 117 Button
on (release) {
getURL (_root.viewscores_link, "_blank");
}
Symbol 120 Button
on (release) {
getURL (_root.download_link, "_blank");
}
Symbol 123 Button
on (release) {
getURL (_root.main_link, "_blank");
}
Symbol 126 Button
on (release) {
getURL (_root.main_link, "_blank");
}
Symbol 142 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 10
stop();
Symbol 149 MovieClip [enemy3] Frame 1
stop();
Symbol 173 MovieClip Frame 1
stop();
Symbol 181 MovieClip [bullet] Frame 1
stop();
Symbol 181 MovieClip [bullet] Frame 3
stop();
Symbol 186 MovieClip [greentrail] Frame 1
stop();
Symbol 187 MovieClip [greentrail2] Frame 1
stop();
Symbol 192 MovieClip [groundhit] Frame 1
stop();
Symbol 193 MovieClip [hit] Frame 4
stop();
Symbol 210 MovieClip [shrapnel] Frame 7
stop();
Symbol 218 MovieClip [spark] Frame 1
stop();
Symbol 227 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 1
stop();
Symbol 237 MovieClip [tiles] Frame 1
stop();
Symbol 253 MovieClip Frame 7
stop();
Symbol 254 MovieClip [char] Frame 1
stop();
Symbol 256 MovieClip Frame 1
stop();
Symbol 260 MovieClip Frame 10
stop();
Symbol 262 MovieClip [enemy1] Frame 1
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 265 MovieClip [enemy2] Frame 1
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 272 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay("gamestart");
}
Symbol 275 Button
on (release) {
_root.nextFrame();
}
Symbol 296 Button
on (release) {
stopAllSounds();
play();
}
Symbol 301 MovieClip Frame 1
stop();
Symbol 306 Button
on (release) {
_root.paws = true;
_root.hud.menu.gotoAndStop(2);
_root.screen._alpha = 50;
}
Symbol 309 Button
on (release) {
getURL (_root.get_game_link, "_blank");
}
Symbol 312 Button
on (release) {
getURL (_root.download_link, "_blank");
}
Symbol 315 Button
on (release) {
getURL (_root.main_link, "_blank");
}
Symbol 318 Button
on (release) {
switch (_quality) {
case "HIGH" :
_quality = "LOW";
break;
case "MEDIUM" :
_quality = "HIGH";
break;
case "LOW" :
_quality = "MEDIUM";
}
_root.SetButtonStr();
}
Symbol 321 Button
on (release) {
stopAllSounds();
removeMovieClip(_root.screen);
removeMovieClip(_root.thing);
removeMovieClip(_root.maskbig);
_root.gotoAndPlay("vt_game_start");
removeMovieClip(_root.hud);
}
Symbol 324 Button
on (release) {
_root.paws = false;
_root.hud.menu.gotoAndStop(1);
_root.screen._alpha = 100;
_root.char.s = 100;
_root.char.invincible = true;
}
Symbol 327 Button
on (release) {
getURL (_root.viewscores_link, "_blank");
}
Symbol 329 MovieClip Frame 1
stop();
Symbol 329 MovieClip Frame 2
_root.SetButtonStr();
qual = _root._quality;
Instance of Symbol 329 MovieClip "menu" in Symbol 330 MovieClip Frame 1
/* no clip actions */
Symbol 332 Button
on (release) {
getURL (_root.main_link, "_blank");
}
Symbol 336 Button
on (release) {
var hashkey = _root.hex_md5(((("gameid=" + _root.game_id) + "&hiscore=") + score) + "2DPlay.com/");
getURL (String(((_root.scores_link + score) + "&hash=") + hashkey), "_blank");
}
Symbol 339 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay("vt_game_start");
}
Symbol 342 Button
on (release) {
stopAllSounds();
_root.music.gotoAndStop(1);
_root.setSounds(0);
_root.gotoAndPlay("gamestart");
}
Symbol 348 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay("gamestart");
}