Frame 1
mochi.as2.MochiAd.showPreGameAd({id:"26e80a0de622e6d0", res:"400x350"});
Frame 2
stop();
stopAllSounds();
stage.showMenu = false;
Frame 3
stop();
stopAllSounds();
stage.showMenu = false;
Frame 4
stop();
stage.showMenu = false;
moveLayer.hero.gotoAndStop(1);
levelcomplete._visible = false;
var onground = false;
jumpsetup = false;
moveme = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.startx = (_local1.x = _local1._x);
_local1.starty = (_local1.y = _local1._y);
_local1.platformLocation = 250;
_local1.monsterMove = 40;
}
_local1.dy = _local1.dy + 0.5;
var nexty = Math.ceil(_local1.y + _local1.dy);
var nextx = (_local1.x + _local1.dx);
onground = false;
if (_local1.dy >= 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, nexty + moveLayer._y, true) && (!jumpsetup)) {
onground = true;
jumping = false;
var _local3 = 0;
var _local2 = Math.floor(nexty);
while (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, _local2 + moveLayer._y, true)) {
_local3++;
_local2 = _local2 - 2;
}
if (_local3 < 10) {
_local1.y = _local2;
_local1.dy = 0;
} else {
_local1.x = _local1.x - _local1.dx;
_local1.dx = 0;
}
} else if (((_local1.dy > 5) && (!shooting)) && (!hit)) {
trace("FALLING");
_local1.gotoAndStop(3);
_local1.mc.gotoAndStop(11);
}
} else if (_local1.dy < 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, (nexty + moveLayer._y) - 40, true)) {
_local1.dy = 1;
}
}
if (moveLayer.exit.hitTest(_local1.x + moveLayer._x, (_local1.y + moveLayer._y) - 40, true)) {
moveLayer.exit.play();
}
if (_local1.dy > 9) {
_local1.dy = 9;
}
if (!jumpsetup) {
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
}
if (Key.isDown(39) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx + 0.4;
} else {
_local1.dx = _local1.dx + 1;
}
_local1._xscale = 80;
} else if (Key.isDown(37) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx - 0.4;
} else {
_local1.dx = _local1.dx - 1;
}
_local1._xscale = -80;
} else {
_local1.dx = _local1.dx * 0.7;
}
if (_local1.dx > 7) {
_local1.dx = 7;
}
if (_local1.dx < -7) {
_local1.dx = -7;
}
if ((((!jumpsetup) && (!jumping)) && (!shooting)) && (onground)) {
if (Math.abs(_local1.dx) < 0.5) {
_local1.dx = 0;
_local1.gotoAndStop(1);
} else {
_local1.gotoAndStop(2);
}
}
if ((((Key.isDown(38) && (_local1.dy >= 0)) && (_local1.dy < 1)) && (!jumping)) && (onground)) {
onground = false;
shooting = false;
jumping = true;
jumpsetup = true;
_local1.gotoAndStop(3);
}
lasty = _local1._y;
moveLayer._x = Math.round(160 - _local1.x);
moveLayer._y = Math.round(_local1.platformLocation - _local1.y);
if (moveLayer._y < -1268) {
moveLayer._y = -1268;
}
bg._x = (moveLayer._x / 2) - 160;
bg._y = (moveLayer._y / 2) - 120;
if (Key.isDown(32) && (!shooting)) {
shooting = true;
jumping = false;
jumpsetup = false;
_local1.gotoAndStop(4);
}
if (_local1.y > 1580) {
_local1.x = _local1.startx;
_local1.y = _local1.starty;
intro._visible = true;
_root.gotoAndStop(11);
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
};
moveBullet = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 220)) || (_local1._x > (moveLayer.hero._x + 220))) {
_local1.removeMovieClip();
}
};
createBullet = function () {
var _local1 = moveLayer.hero._xscale / 80;
nm = "bul0";
moveLayer.attachMovie("bullet", nm, 100);
moveLayer[nm]._x = moveLayer.hero._x + (35 * _local1);
moveLayer[nm]._y = moveLayer.hero._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 20 * _local1;
moveLayer[nm].onEnterFrame = moveBullet;
};
moveSplat = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 300)) || (_local1._x > (moveLayer.hero._x + 300))) {
_local1.removeMovieClip();
}
if (_local1.hitTest(moveLayer.hero)) {
trace("Player hit");
hit = true;
moveLayer.hero.dx = _local1.dx * 5;
moveLayer.hero.dy = -8;
_local1.removeMovieClip();
_root.HP.play();
}
};
numsplats = 0;
createSplat = function () {
var _local2 = this;
var _local1 = _local2._xscale / 80;
nm = "splat" add numsplats;
moveLayer.attachMovie("splatBullet", nm, numsplats + 200);
moveLayer[nm]._x = _local2._x + (35 * _local1);
moveLayer[nm]._y = _local2._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 10 * _local1;
moveLayer[nm].onEnterFrame = moveSplat;
numsplats++;
numsplats = numsplats % 20;
};
simpleMove = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.startX = _local1.x;
_local1.dx = 1;
_local1.monsterMove = 50;
}
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
if (_local1.x > (_local1.startX + _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
} else if (_local1.x < (_local1.startX - _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
}
if (_local1.dx > 0) {
_local1._xscale = 80;
} else if (_local1.dx < 0) {
_local1._xscale = -80;
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
if (_local1.hitTest(moveLayer.bul0)) {
_local1.gotoAndStop(2);
_local1.onEnterFrame = null;
moveLayer.bul0.removeMovieClip();
}
if (random(65) == 0) {
_local1.gotoAndStop(3);
}
};
intro.playButton.onRelease = function () {
intro._visible = false;
moveLayer.hero.onEnterFrame = moveme;
};
Frame 5
stopAllSounds();
stage.showMenu = false;
stop();
Frame 6
stop();
stage.showMenu = false;
moveLayer.hero.gotoAndStop(1);
levelcomplete._visible = false;
var onground = false;
jumpsetup = false;
moveme = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.startx = (_local1.x = _local1._x);
_local1.starty = (_local1.y = _local1._y);
_local1.platformLocation = 250;
_local1.monsterMove = 40;
}
_local1.dy = _local1.dy + 0.5;
var nexty = Math.ceil(_local1.y + _local1.dy);
var nextx = (_local1.x + _local1.dx);
onground = false;
if (_local1.dy >= 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, nexty + moveLayer._y, true) && (!jumpsetup)) {
onground = true;
jumping = false;
var _local3 = 0;
var _local2 = Math.floor(nexty);
while (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, _local2 + moveLayer._y, true)) {
_local3++;
_local2 = _local2 - 2;
}
if (_local3 < 10) {
_local1.y = _local2;
_local1.dy = 0;
} else {
_local1.x = _local1.x - _local1.dx;
_local1.dx = 0;
}
} else if (((_local1.dy > 5) && (!shooting)) && (!hit)) {
trace("FALLING");
_local1.gotoAndStop(3);
_local1.mc.gotoAndStop(11);
}
} else if (_local1.dy < 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, (nexty + moveLayer._y) - 40, true)) {
_local1.dy = 1;
}
}
if (moveLayer.exit.hitTest(_local1.x + moveLayer._x, (_local1.y + moveLayer._y) - 40, true)) {
moveLayer.exit.play();
}
if (_local1.dy > 9) {
_local1.dy = 9;
}
if (!jumpsetup) {
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
}
if (Key.isDown(39) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx + 0.4;
} else {
_local1.dx = _local1.dx + 1;
}
_local1._xscale = 80;
} else if (Key.isDown(37) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx - 0.4;
} else {
_local1.dx = _local1.dx - 1;
}
_local1._xscale = -80;
} else {
_local1.dx = _local1.dx * 0.7;
}
if (_local1.dx > 7) {
_local1.dx = 7;
}
if (_local1.dx < -7) {
_local1.dx = -7;
}
if ((((!jumpsetup) && (!jumping)) && (!shooting)) && (onground)) {
if (Math.abs(_local1.dx) < 0.5) {
_local1.dx = 0;
_local1.gotoAndStop(1);
} else {
_local1.gotoAndStop(2);
}
}
if ((((Key.isDown(38) && (_local1.dy >= 0)) && (_local1.dy < 1)) && (!jumping)) && (onground)) {
onground = false;
shooting = false;
jumping = true;
jumpsetup = true;
_local1.gotoAndStop(3);
}
lasty = _local1._y;
moveLayer._x = Math.round(160 - _local1.x);
moveLayer._y = Math.round(_local1.platformLocation - _local1.y);
if (moveLayer._y < -1268) {
moveLayer._y = -1268;
}
bg._x = (moveLayer._x / 2) - 160;
bg._y = (moveLayer._y / 2) - 120;
if (Key.isDown(32) && (!shooting)) {
shooting = true;
jumping = false;
jumpsetup = false;
_local1.gotoAndStop(4);
}
if (_local1.y > 1580) {
_local1.x = _local1.startx;
_local1.y = _local1.starty;
intro._visible = true;
_root.gotoAndStop(12);
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
};
moveBullet = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 220)) || (_local1._x > (moveLayer.hero._x + 220))) {
_local1.removeMovieClip();
}
};
createBullet = function () {
var _local1 = moveLayer.hero._xscale / 80;
nm = "bul0";
moveLayer.attachMovie("bullet", nm, 100);
moveLayer[nm]._x = moveLayer.hero._x + (35 * _local1);
moveLayer[nm]._y = moveLayer.hero._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 20 * _local1;
moveLayer[nm].onEnterFrame = moveBullet;
};
moveSplat = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 300)) || (_local1._x > (moveLayer.hero._x + 300))) {
_local1.removeMovieClip();
}
if (_local1.hitTest(moveLayer.hero)) {
trace("Player hit");
hit = true;
moveLayer.hero.dx = _local1.dx * 5;
moveLayer.hero.dy = -8;
_local1.removeMovieClip();
_root.HP.play();
}
};
numsplats = 0;
createSplat = function () {
var _local2 = this;
var _local1 = _local2._xscale / 80;
nm = "splat" add numsplats;
moveLayer.attachMovie("splatBullet", nm, numsplats + 200);
moveLayer[nm]._x = _local2._x + (35 * _local1);
moveLayer[nm]._y = _local2._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 10 * _local1;
moveLayer[nm].onEnterFrame = moveSplat;
numsplats++;
numsplats = numsplats % 20;
};
simpleMove = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.startX = _local1.x;
_local1.dx = 1;
_local1.monsterMove = 50;
}
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
if (_local1.x > (_local1.startX + _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
} else if (_local1.x < (_local1.startX - _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
}
if (_local1.dx > 0) {
_local1._xscale = 80;
} else if (_local1.dx < 0) {
_local1._xscale = -80;
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
if (_local1.hitTest(moveLayer.bul0)) {
_local1.gotoAndStop(2);
_local1.onEnterFrame = null;
moveLayer.bul0.removeMovieClip();
}
if (random(65) == 0) {
_local1.gotoAndStop(3);
}
};
intro.playButton.onRelease = function () {
intro._visible = false;
moveLayer.hero.onEnterFrame = moveme;
};
Frame 7
stop();
stage.showMenu = false;
moveLayer.hero.gotoAndStop(1);
levelcomplete._visible = false;
var onground = false;
jumpsetup = false;
moveme = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.startx = (_local1.x = _local1._x);
_local1.starty = (_local1.y = _local1._y);
_local1.platformLocation = 250;
_local1.monsterMove = 40;
}
_local1.dy = _local1.dy + 0.5;
var nexty = Math.ceil(_local1.y + _local1.dy);
var nextx = (_local1.x + _local1.dx);
onground = false;
if (_local1.dy >= 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, nexty + moveLayer._y, true) && (!jumpsetup)) {
onground = true;
jumping = false;
var _local3 = 0;
var _local2 = Math.floor(nexty);
while (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, _local2 + moveLayer._y, true)) {
_local3++;
_local2 = _local2 - 2;
}
if (_local3 < 10) {
_local1.y = _local2;
_local1.dy = 0;
} else {
_local1.x = _local1.x - _local1.dx;
_local1.dx = 0;
}
} else if (((_local1.dy > 5) && (!shooting)) && (!hit)) {
trace("FALLING");
_local1.gotoAndStop(3);
_local1.mc.gotoAndStop(11);
}
} else if (_local1.dy < 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, (nexty + moveLayer._y) - 40, true)) {
_local1.dy = 1;
}
}
if (moveLayer.exit.hitTest(_local1.x + moveLayer._x, (_local1.y + moveLayer._y) - 40, true)) {
moveLayer.exit.play();
}
if (_local1.dy > 9) {
_local1.dy = 9;
}
if (!jumpsetup) {
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
}
if (Key.isDown(39) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx + 0.4;
} else {
_local1.dx = _local1.dx + 1;
}
_local1._xscale = 80;
} else if (Key.isDown(37) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx - 0.4;
} else {
_local1.dx = _local1.dx - 1;
}
_local1._xscale = -80;
} else {
_local1.dx = _local1.dx * 0.7;
}
if (_local1.dx > 7) {
_local1.dx = 7;
}
if (_local1.dx < -7) {
_local1.dx = -7;
}
if ((((!jumpsetup) && (!jumping)) && (!shooting)) && (onground)) {
if (Math.abs(_local1.dx) < 0.5) {
_local1.dx = 0;
_local1.gotoAndStop(1);
} else {
_local1.gotoAndStop(2);
}
}
if ((((Key.isDown(38) && (_local1.dy >= 0)) && (_local1.dy < 1)) && (!jumping)) && (onground)) {
onground = false;
shooting = false;
jumping = true;
jumpsetup = true;
_local1.gotoAndStop(3);
}
lasty = _local1._y;
moveLayer._x = Math.round(160 - _local1.x);
moveLayer._y = Math.round(_local1.platformLocation - _local1.y);
if (moveLayer._y < -200) {
moveLayer._y = -200;
}
bg._x = (moveLayer._x / 2) - 160;
bg._y = (moveLayer._y / 2) - 120;
if (Key.isDown(32) && (!shooting)) {
shooting = true;
jumping = false;
jumpsetup = false;
_local1.gotoAndStop(4);
}
if (_local1.y > 500) {
_local1.x = _local1.startx;
_local1.y = _local1.starty;
intro._visible = true;
_root.gotoAndStop(13);
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
};
moveBullet = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 220)) || (_local1._x > (moveLayer.hero._x + 220))) {
_local1.removeMovieClip();
}
};
createBullet = function () {
var _local1 = moveLayer.hero._xscale / 80;
nm = "bul0";
moveLayer.attachMovie("bullet", nm, 100);
moveLayer[nm]._x = moveLayer.hero._x + (35 * _local1);
moveLayer[nm]._y = moveLayer.hero._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 20 * _local1;
moveLayer[nm].onEnterFrame = moveBullet;
};
moveSplat = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 300)) || (_local1._x > (moveLayer.hero._x + 300))) {
_local1.removeMovieClip();
}
if (_local1.hitTest(moveLayer.hero)) {
trace("Player hit");
hit = true;
moveLayer.hero.dx = _local1.dx * 5;
moveLayer.hero.dy = -8;
_local1.removeMovieClip();
_root.HP.play();
}
};
numsplats = 0;
createSplat = function () {
var _local2 = this;
var _local1 = _local2._xscale / 80;
nm = "splat" add numsplats;
moveLayer.attachMovie("splatBullet", nm, numsplats + 200);
moveLayer[nm]._x = _local2._x + (35 * _local1);
moveLayer[nm]._y = _local2._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 10 * _local1;
moveLayer[nm].onEnterFrame = moveSplat;
numsplats++;
numsplats = numsplats % 20;
};
simpleMove = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.startX = _local1.x;
_local1.dx = 1;
_local1.monsterMove = 50;
}
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
if (_local1.x > (_local1.startX + _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
} else if (_local1.x < (_local1.startX - _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
}
if (_local1.dx > 0) {
_local1._xscale = 80;
} else if (_local1.dx < 0) {
_local1._xscale = -80;
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
if (_local1.hitTest(moveLayer.bul0)) {
_local1.gotoAndStop(2);
_local1.onEnterFrame = null;
moveLayer.bul0.removeMovieClip();
}
if (random(65) == 0) {
_local1.gotoAndStop(3);
}
};
intro.playButton.onRelease = function () {
intro._visible = false;
moveLayer.hero.onEnterFrame = moveme;
};
Frame 8
stop();
stage.showMenu = false;
moveLayer.hero.gotoAndStop(1);
levelcomplete._visible = false;
var onground = false;
jumpsetup = false;
moveme = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.startx = (_local1.x = _local1._x);
_local1.starty = (_local1.y = _local1._y);
_local1.platformLocation = 250;
_local1.monsterMove = 40;
}
_local1.dy = _local1.dy + 0.5;
var nexty = Math.ceil(_local1.y + _local1.dy);
var nextx = (_local1.x + _local1.dx);
onground = false;
if (_local1.dy >= 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, nexty + moveLayer._y, true) && (!jumpsetup)) {
onground = true;
jumping = false;
var _local3 = 0;
var _local2 = Math.floor(nexty);
while (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, _local2 + moveLayer._y, true)) {
_local3++;
_local2 = _local2 - 2;
}
if (_local3 < 10) {
_local1.y = _local2;
_local1.dy = 0;
} else {
_local1.x = _local1.x - _local1.dx;
_local1.dx = 0;
}
} else if (((_local1.dy > 5) && (!shooting)) && (!hit)) {
trace("FALLING");
_local1.gotoAndStop(3);
_local1.mc.gotoAndStop(11);
}
} else if (_local1.dy < 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, (nexty + moveLayer._y) - 40, true)) {
_local1.dy = 1;
}
}
if (moveLayer.exit.hitTest(_local1.x + moveLayer._x, (_local1.y + moveLayer._y) - 40, true)) {
moveLayer.exit.play();
}
if (_local1.dy > 9) {
_local1.dy = 9;
}
if (!jumpsetup) {
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
}
if (Key.isDown(39) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx + 0.4;
} else {
_local1.dx = _local1.dx + 1;
}
_local1._xscale = 80;
} else if (Key.isDown(37) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx - 0.4;
} else {
_local1.dx = _local1.dx - 1;
}
_local1._xscale = -80;
} else {
_local1.dx = _local1.dx * 0.7;
}
if (_local1.dx > 7) {
_local1.dx = 7;
}
if (_local1.dx < -7) {
_local1.dx = -7;
}
if ((((!jumpsetup) && (!jumping)) && (!shooting)) && (onground)) {
if (Math.abs(_local1.dx) < 0.5) {
_local1.dx = 0;
_local1.gotoAndStop(1);
} else {
_local1.gotoAndStop(2);
}
}
if ((((Key.isDown(38) && (_local1.dy >= 0)) && (_local1.dy < 1)) && (!jumping)) && (onground)) {
onground = false;
shooting = false;
jumping = true;
jumpsetup = true;
_local1.gotoAndStop(3);
}
lasty = _local1._y;
moveLayer._x = Math.round(160 - _local1.x);
moveLayer._y = Math.round(_local1.platformLocation - _local1.y);
if (moveLayer._y < -200) {
moveLayer._y = -200;
}
bg._x = (moveLayer._x / 2) - 160;
bg._y = (moveLayer._y / 2) - 120;
if (Key.isDown(32) && (!shooting)) {
shooting = true;
jumping = false;
jumpsetup = false;
_local1.gotoAndStop(4);
}
if (_local1.y > 500) {
_local1.x = _local1.startx;
_local1.y = _local1.starty;
intro._visible = true;
_root.gotoAndStop(13);
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
};
moveBullet = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 220)) || (_local1._x > (moveLayer.hero._x + 220))) {
_local1.removeMovieClip();
}
};
createBullet = function () {
var _local1 = moveLayer.hero._xscale / 80;
nm = "bul0";
moveLayer.attachMovie("bullet", nm, 100);
moveLayer[nm]._x = moveLayer.hero._x + (35 * _local1);
moveLayer[nm]._y = moveLayer.hero._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 20 * _local1;
moveLayer[nm].onEnterFrame = moveBullet;
};
moveSplat = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 300)) || (_local1._x > (moveLayer.hero._x + 300))) {
_local1.removeMovieClip();
}
if (_local1.hitTest(moveLayer.hero)) {
trace("Player hit");
hit = true;
moveLayer.hero.dx = _local1.dx * 5;
moveLayer.hero.dy = -8;
_local1.removeMovieClip();
_root.HP.play();
}
};
numsplats = 0;
createSplat = function () {
var _local2 = this;
var _local1 = _local2._xscale / 80;
nm = "splat" add numsplats;
moveLayer.attachMovie("splatBullet", nm, numsplats + 200);
moveLayer[nm]._x = _local2._x + (35 * _local1);
moveLayer[nm]._y = _local2._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 10 * _local1;
moveLayer[nm].onEnterFrame = moveSplat;
numsplats++;
numsplats = numsplats % 20;
};
simpleMove = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.startX = _local1.x;
_local1.dx = 1;
_local1.monsterMove = 50;
}
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
if (_local1.x > (_local1.startX + _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
} else if (_local1.x < (_local1.startX - _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
}
if (_local1.dx > 0) {
_local1._xscale = 80;
} else if (_local1.dx < 0) {
_local1._xscale = -80;
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
if (_local1.hitTest(moveLayer.bul0)) {
_local1.gotoAndStop(2);
_local1.onEnterFrame = null;
moveLayer.bul0.removeMovieClip();
}
if (random(65) == 0) {
_local1.gotoAndStop(3);
}
};
moveLayer.hero.onEnterFrame = moveme;
Frame 9
stop();
stage.showMenu = false;
moveLayer.hero.gotoAndStop(1);
levelcomplete._visible = false;
var onground = false;
jumpsetup = false;
moveme = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.startx = (_local1.x = _local1._x);
_local1.starty = (_local1.y = _local1._y);
_local1.platformLocation = 250;
_local1.monsterMove = 40;
}
_local1.dy = _local1.dy + 0.5;
var nexty = Math.ceil(_local1.y + _local1.dy);
var nextx = (_local1.x + _local1.dx);
onground = false;
if (_local1.dy >= 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, nexty + moveLayer._y, true) && (!jumpsetup)) {
onground = true;
jumping = false;
var _local3 = 0;
var _local2 = Math.floor(nexty);
while (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, _local2 + moveLayer._y, true)) {
_local3++;
_local2 = _local2 - 2;
}
if (_local3 < 10) {
_local1.y = _local2;
_local1.dy = 0;
} else {
_local1.x = _local1.x - _local1.dx;
_local1.dx = 0;
}
} else if (((_local1.dy > 5) && (!shooting)) && (!hit)) {
_local1.gotoAndStop(3);
_local1.mc.gotoAndStop(11);
}
} else if (_local1.dy < 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, (nexty + moveLayer._y) - 40, true)) {
_local1.dy = 1;
}
}
if (moveLayer.exit.hitTest(_local1.x + moveLayer._x, (_local1.y + moveLayer._y) - 40, true)) {
moveLayer.exit.play();
}
if (_local1.dy > 9) {
_local1.dy = 9;
}
if (!jumpsetup) {
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
}
if (Key.isDown(39) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx + 0.4;
} else {
_local1.dx = _local1.dx + 1;
}
_local1._xscale = 80;
} else if (Key.isDown(37) && (!shooting)) {
var leftX = moveLayer._width;
if (jumping) {
_local1.dx = _local1.dx - 0.4;
} else {
_local1.dx = _local1.dx - 1;
}
_local1._xscale = -80;
} else {
_local1.dx = _local1.dx * 0.7;
}
if (_local1.dx > 7) {
_local1.dx = 7;
}
if (_local1.dx < -7) {
_local1.dx = -7;
}
if ((((!jumpsetup) && (!jumping)) && (!shooting)) && (onground)) {
if (Math.abs(_local1.dx) < 0.5) {
_local1.dx = 0;
_local1.gotoAndStop(1);
} else {
_local1.gotoAndStop(2);
}
}
if ((((Key.isDown(38) && (_local1.dy >= 0)) && (_local1.dy < 1)) && (!jumping)) && (onground)) {
onground = false;
shooting = false;
jumping = true;
jumpsetup = true;
_local1.gotoAndStop(3);
}
lasty = _local1._y;
moveLayer._x = Math.round(160 - _local1.x);
moveLayer._y = Math.round(_local1.platformLocation - _local1.y);
if (moveLayer._y < -200) {
moveLayer._y = -200;
}
bg._x = (moveLayer._x / 2) - 160;
bg._y = (moveLayer._y / 2) - 120;
if (Key.isDown(32) && (!shooting)) {
shooting = true;
jumping = false;
jumpsetup = false;
_local1.gotoAndStop(4);
}
if (_local1.y > 500) {
_local1.x = _local1.startx;
_local1.y = _local1.starty;
intro._visible = true;
_root.gotoAndStop(14);
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
};
moveBullet = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 220)) || (_local1._x > (moveLayer.hero._x + 220))) {
_local1.removeMovieClip();
}
};
createBullet = function () {
var _local1 = moveLayer.hero._xscale / 80;
nm = "bul0";
moveLayer.attachMovie("bullet", nm, 100);
moveLayer[nm]._x = moveLayer.hero._x + (35 * _local1);
moveLayer[nm]._y = moveLayer.hero._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 20 * _local1;
moveLayer[nm].onEnterFrame = moveBullet;
};
moveSplat = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 300)) || (_local1._x > (moveLayer.hero._x + 300))) {
_local1.removeMovieClip();
}
if (_local1.hitTest(moveLayer.hero)) {
hit = true;
moveLayer.hero.dx = _local1.dx * 5;
moveLayer.hero.dy = -8;
_local1.removeMovieClip();
_root.HP.play();
}
};
numsplats = 0;
createSplat = function () {
var _local2 = this;
var _local1 = _local2._xscale / 80;
nm = "splat" add numsplats;
moveLayer.attachMovie("splatBullet", nm, numsplats + 200);
moveLayer[nm]._x = _local2._x + (35 * _local1);
moveLayer[nm]._y = _local2._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 10 * _local1;
moveLayer[nm].onEnterFrame = moveSplat;
numsplats++;
numsplats = numsplats % 20;
};
var bossHealth = 20;
simpleMove = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.startX = _local1.x;
_local1.dx = 1;
_local1.monsterMove = 50;
}
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
if (_local1.x > (_local1.startX + _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
} else if (_local1.x < (_local1.startX - _local1.monsterMove)) {
_local1.dx = _local1.dx * -1;
}
if (_local1.dx > 0) {
_local1._xscale = 80.55419921875;
} else if (_local1.dx < 0) {
_local1._xscale = -80.55419921875;
}
if (_local1.isBoss) {
moveLayer.bossHP._x = _local1._x;
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
if (_local1.hitTest(moveLayer.bul0)) {
if (!_local1.isBoss) {
_local1.gotoAndStop(2);
_local1.onEnterFrame = null;
moveLayer.bul0.removeMovieClip();
} else {
bossHealth--;
if (bossHealth == 0) {
_local1.onEnterFrame = null;
_local1.gotoAndStop(2);
}
moveLayer.bossHP.play();
moveLayer.bul0.removeMovieClip();
}
}
if (random(45) == 0) {
_local1.gotoAndStop(3);
}
};
moveLayer.hero.onEnterFrame = moveme;
var bossCount = 0;
createBossBullet = function (boss) {
var _local2 = boss;
var _local1 = 0;
if (_local2._xscale > 0) {
_local1 = _local2._x + 20;
} else {
_local1 = _local2._x - 20;
}
var _local3 = Math.atan2(moveLayer.hero._x - _local1, (_local2._y - 120) - moveLayer.hero._y) * 57.2957795130823;
nm = "boss" add bossCount;
moveLayer.attachMovie("bossBullet", nm, bossCount + 2000);
moveLayer[nm]._x = _local1;
moveLayer[nm]._y = _local2._y - 120;
moveLayer[nm]._rotation = _local3;
moveLayer[nm]._visible = true;
moveLayer[nm].onEnterFrame = moveBossBullet;
bossCount++;
bossCount = bossCount % 20;
};
var speed = 5;
moveBossBullet = function () {
var _local1 = this;
if ((_local1._x < (moveLayer.hero._x - 300)) || (_local1._x > (moveLayer.hero._x + 300))) {
_local1.removeMovieClip();
}
if (_local1.hitTest(moveLayer.hero)) {
hit = true;
moveLayer.hero.dx = _local1.dx * 5;
moveLayer.hero.dy = -8;
_local1.removeMovieClip();
_root.HP.play();
}
if (_local1._rotation > 180) {
_local1._y = _local1._y + (speed * Math.cos((Math.PI/180) * _local1._rotation));
_local1._x = _local1._x - (speed * Math.sin((Math.PI/180) * _local1._rotation));
} else {
_local1._y = _local1._y - (speed * Math.cos((Math.PI/180) * _local1._rotation));
_local1._x = _local1._x + (speed * Math.sin((Math.PI/180) * _local1._rotation));
}
};
Frame 10
stop();
stopAllSounds();
stage.showMenu = false;
Frame 11
stop();
stopAllSounds();
stage.showMenu = false;
Frame 12
stop();
stopAllSounds();
stage.showMenu = false;
Frame 13
stop();
stopAllSounds();
stage.showMenu = false;
Frame 14
stop();
stopAllSounds();
stage.showMenu = false;
Frame 15
stop();
stopAllSounds();
stage.showMenu = false;
Frame 16
stop();
stage.showMenu = false;
Symbol 546 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("3.0 as2");
}
static function showPreGameAd(options) {
//var _local1 = this;
var DEFAULTS = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
} else {
var clip = options.clip;
var ad_msec = 11000;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
} else {
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = _getRes(options);
var _local3 = wh[0];
var h = wh[1];
mc._x = _local3 * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local3 * -0.5;
chk._y = h * -0.5;
var bar = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
bar._visible = false;
delete options.no_progress_bar;
} else {
bar._x = 10;
bar._y = h - 20;
}
var bar_color = options.color;
delete options.color;
var bar_background = options.background;
delete options.background;
var bar_outline = options.outline;
delete options.outline;
var backing = bar.createEmptyMovieClip("_outline", 1);
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(_local3 - 20, 0);
backing.lineTo(_local3 - 20, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var _local2 = bar.createEmptyMovieClip("_inside", 2);
_local2.beginFill(bar_color);
_local2.moveTo(0, 0);
_local2.lineTo(_local3 - 20, 0);
_local2.lineTo(_local3 - 20, 10);
_local2.lineTo(0, 10);
_local2.lineTo(0, 0);
_local2.endFill();
_local2._xscale = 0;
var outline = bar.createEmptyMovieClip("_outline", 3);
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(_local3 - 20, 0);
outline.lineTo(_local3 - 20, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local1 = this;
var _local2 = 100 * (1 - ((getTimer() - _local1.fadeout_start) / _local1.fadeout_time));
if (_local2 > 0) {
_local1._parent._alpha = _local2;
} else {
var _local3 = _local1._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete _local1.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local1 = this.mc._mochiad_wait;
_local1.server_control = true;
_local1.started = getTimer();
_local1.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local1 = this;
var _clip = _local1._parent._parent;
var ad_clip = _local1._parent._mochiad_ctr;
var elapsed = (getTimer() - _local1.started);
var _local3 = false;
var clip_total = _clip.getBytesTotal();
var clip_loaded = _clip.getBytesLoaded();
var _local2 = (100 * clip_loaded) / clip_total;
var ad_pcnt = ((100 * elapsed) / chk.ad_msec);
var _inside = _local1._mochiad_bar._inside;
var pcnt = Math.min(100, Math.min(_local2 || 0, ad_pcnt));
pcnt = Math.max(_local1.last_pcnt, pcnt);
_local1.last_pcnt = pcnt;
_inside._xscale = pcnt;
options.ad_progress(pcnt);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var total = ad_clip.getBytesTotal();
if ((total > 0) || (typeof(total) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((elapsed > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (elapsed > chk.ad_msec) {
_local3 = true;
}
if (((clip_total > 0) && (clip_loaded >= clip_total)) && (_local3)) {
if (_local1.server_control) {
delete _local1.onEnterFrame;
} else {
_local1.fadeout_start = getTimer();
_local1.onEnterFrame = chk.fadeFunction;
}
}
};
}
}
}
static function showClickAwayAd(options) {
var DEFAULTS = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, DEFAULTS);
var clip = options.clip;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
} else {
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local2 = _getRes(options);
var w = _local2[0];
var h = _local2[1];
mc._x = w * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var sendHostProgress = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var ad_clip = this._parent._mochiad_ctr;
var _local3 = getTimer() - this.started;
var _local1 = false;
if (!chk.showing) {
var _local2 = ad_clip.getBytesTotal();
if ((_local2 > 0) || (typeof(_local2) == "undefined")) {
_local1 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local3 > chk.ad_timeout) {
options.ad_failed();
_local1 = true;
}
}
if (_local1) {
delete this.onEnterFrame;
}
};
}
}
static function showInterLevelAd(options) {
//var _local1 = this;
var DEFAULTS = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, DEFAULTS);
var clip = options.clip;
var ad_msec = 11000;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
} else {
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = _getRes(options);
var w = wh[0];
var h = wh[1];
mc._x = w * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local1 = this;
var _local2 = 100 * (1 - ((getTimer() - _local1.fadeout_start) / _local1.fadeout_time));
if (_local2 > 0) {
_local1._parent._alpha = _local2;
} else {
var _local3 = _local1._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete _local1.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local1 = this.mc._mochiad_wait;
_local1.server_control = true;
_local1.started = getTimer();
_local1.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local1 = this;
var ad_clip = _local1._parent._mochiad_ctr;
var elapsed = (getTimer() - _local1.started);
var _local2 = false;
if (!chk.showing) {
var _local3 = ad_clip.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (elapsed > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (elapsed > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (_local1.server_control) {
delete _local1.onEnterFrame;
} else {
_local1.fadeout_start = getTimer();
_local1.onEnterFrame = _local1.fadeFunction;
}
}
};
}
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local1 = options;
var DEFAULTS = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
_local1 = _parseOptions(_local1, DEFAULTS);
_local1.swfv = _local1.clip.getSWFVersion() || 6;
_local1.mav = getVersion();
var clip = _local1.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (clip._mochiad_loaded) {
return(null);
}
var depth = _local1.depth;
delete _local1.depth;
var mc = clip.createEmptyMovieClip("_mochiad", depth);
var wh = _getRes(_local1);
_local1.res = (wh[0] + "x") + wh[1];
_local1.server = _local1.server + _local1.id;
delete _local1.id;
clip._mochiad_loaded = true;
if (clip._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local2 = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var k in _local1) {
_local2[k] = _local1[k];
}
var server = _local2.server;
delete _local2.server;
var hostname = _allowDomains(server);
mc.onEnterFrame = function () {
var _local1 = this;
if (_local1._mochiad_ctr._url != _local1._url) {
_local1.onEnterFrame = function () {
var _local1 = this;
if (!_local1._mochiad_ctr) {
delete _local1.onEnterFrame;
mochi.as2.MochiAd.unload(_local1._parent);
}
};
}
};
var _local3 = new LocalConnection();
var name = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local3.mc = mc;
_local3.name = name;
_local3.hostname = hostname;
_local3.allowDomain = function (d) {
return(true);
};
_local3.allowInsecureDomain = _local3.allowDomain;
_local3.connect(name);
mc.lc = _local3;
_local2.lc = name;
_local2.st = getTimer();
_local2.loadMovie(server + ".swf", "POST");
return(mc);
}
static function unload(clip) {
var _local1 = clip;
if (typeof(_local1) == "undefined") {
_local1 = _root;
}
if (_local1.clip && (_local1.clip._mochiad)) {
_local1 = _local1.clip;
}
if (!_local1._mochiad) {
return(false);
}
if (_local1._mochiad._containerLCName != undefined) {
_local1._mochiad.lc.send(_local1._mochiad._containerLCName, "notify", {id:"unload"});
}
_local1._mochiad.removeMovieClip();
delete _local1._mochiad_loaded;
delete _local1._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var xy = options.res.split("x");
_local2 = parseFloat(xy[0]);
_local1 = parseFloat(xy[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local3 = {};
for (var k in defaults) {
_local3[k] = defaults[k];
}
if (options) {
for (var k in options) {
_local3[k] = options[k];
}
}
if (_root.mochiad_options) {
var pairs = _root.mochiad_options.split("&");
var _local1 = 0;
while (_local1 < pairs.length) {
var _local2 = pairs[_local1].split("=");
_local3[unescape(_local2[0])] = unescape(_local2[1]);
_local1++;
}
}
if (_local3.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local3);
}
static function rpc(clip, callbackID, arg) {
var _local1 = clip;
var _local2 = arg;
switch (_local2.id) {
case "setValue" :
setValue(_local1, _local2.objectName, _local2.value);
return;
case "getValue" :
var val = getValue(_local1, _local2.objectName);
_local1._mochiad.lc.send(_local1._mochiad._containerLCName, "rpcResult", callbackID, val);
return;
case "runMethod" :
var _local3 = runMethod(_local1, _local2.method, _local2.args);
_local1._mochiad.lc.send(_local1._mochiad._containerLCName, "rpcResult", callbackID, _local3);
return;
default :
trace("[mochiads rpc] unknown rpc id: " + _local2.id);
}
}
static function setValue(base, objectName, value) {
var _local3 = base;
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((_local3[_local2[_local1]] == undefined) || (_local3[_local2[_local1]] == null)) {
return;
}
_local3 = _local3[_local2[_local1]];
_local1++;
}
_local3[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local3 = base;
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((_local3[_local2[_local1]] == undefined) || (_local3[_local2[_local1]] == null)) {
return(undefined);
}
_local3 = _local3[_local2[_local1]];
_local1++;
}
return(_local3[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local3 = base;
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((_local3[_local2[_local1]] == undefined) || (_local3[_local2[_local1]] == null)) {
return(undefined);
}
_local3 = _local3[_local2[_local1]];
_local1++;
}
if (typeof(_local3[_local2[_local1]]) == "function") {
return(_local3[_local2[_local1]].apply(_local3, argsArray));
}
return(undefined);
}
}
Symbol 29 MovieClip Frame 135
_root.gotoAndStop(3);
Symbol 32 Button
on (release) {
gotoAndStop (3);
}
Symbol 78 Button
on (release) {
gotoAndPlay (4);
}
Symbol 85 Button
on (release) {
gotoAndStop (10);
}
Symbol 89 Button
on (release) {
gotoAndStop (16);
}
Symbol 114 MovieClip Frame 982
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 678
stop();
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 18
_root.levelcomplete._visible = true;
_root.moveLayer.hero._visible = false;
delete _root.moveLayer.hero.onEnterFrame;
_root.gotoAndPlay(5);
Symbol 139 Button
on (release) {
_root.movelayer.platforms.lift.gotoAndPlay(198);
}
Symbol 140 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 57
stop();
Symbol 152 MovieClip Frame 1
stop();
Symbol 152 MovieClip Frame 195
stop();
Symbol 152 MovieClip Frame 242
_root.movelayer.exitlift.gotoAndPlay(147);
Symbol 156 Button
on (release) {
gotoAndPlay (2);
_root.movelayer.platforms.lift.gotoAndPlay(2);
}
Symbol 159 MovieClip Frame 1
stop();
_root.movelayer.butdown.gotoAndStop(1);
Symbol 159 MovieClip Frame 146
stop();
_root.movelayer.butdown.gotoAndStop(2);
Symbol 164 Button
on (release) {
gotoAndPlay (2);
}
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 30
stop();
_root.moveLayer.platforms.switchcloud.gotoAndPlay(2);
_root.movelayer.plane.gotoAndPlay(2);
Symbol 195 MovieClip Frame 16
stop();
Symbol 213 MovieClip Frame 11
_parent.createSplat();
Symbol 213 MovieClip Frame 20
_parent.gotoAndStop(1);
Symbol 214 MovieClip Frame 1
this.onEnterFrame = _root.simpleMove;
this.createSplat = _root.createSplat;
stop();
Symbol 226 MovieClip Frame 8
_root.jumpsetup = false;
_parent.dy = -9;
Symbol 226 MovieClip Frame 10
stop();
Symbol 232 MovieClip Frame 6
_root.createBullet();
Symbol 232 MovieClip Frame 21
_root.shooting = false;
_parent.gotoAndStop(1);
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 5
stop();
Symbol 247 MovieClip Frame 10
stop();
Symbol 247 MovieClip Frame 15
stop();
Symbol 247 MovieClip Frame 20
stop();
stop();
Symbol 247 MovieClip Frame 25
stop();
_root.gotoAndStop(11);
Symbol 250 Button
on (release) {
gotoAndStop (2);
}
Symbol 252 Button
on (release) {
gotoAndStop (3);
}
Symbol 254 MovieClip Frame 1
stop();
Symbol 254 MovieClip Frame 2
stop();
stopAllSounds();
Symbol 254 MovieClip Frame 3
gotoAndStop (1);
Symbol 275 Button
on (release) {
stopAllSounds();
_root.gotoAndStop(7);
}
Symbol 300 MovieClip Frame 13
gotoAndPlay (8);
Symbol 310 MovieClip Frame 543
_root.gotoAndStop(6);
Symbol 311 Button
on (release) {
gotoAndStop (6);
}
Symbol 320 Button
on (release) {
gotoAndPlay (2);
_root.movelayer.platforms.blocklift.gotoAndPlay(2);
}
Symbol 323 Button
on (release) {
gotoAndPlay (201);
_root.movelayer.platforms.blocklift.gotoAndPlay(201);
}
Symbol 324 MovieClip Frame 1
stop();
Symbol 324 MovieClip Frame 200
stop();
_root.movelayer.switchb.gotoAndStop(2);
_root.movelayer.switcht.gotoAndStop(1);
Symbol 324 MovieClip Frame 399
_root.movelayer.switchb.gotoAndStop(1);
_root.movelayer.switcht.gotoAndStop(2);
Symbol 327 Button
on (release) {
gotoAndStop (1);
_root.movelayer.switch1.gotoAndPlay(201);
_root.movelayer.platforms.blocklift.gotoAndPlay(201);
}
Symbol 328 MovieClip Frame 1
stop();
stop();
Symbol 328 MovieClip Frame 2
stop();
Symbol 329 Button
on (release) {
gotoAndStop (1);
_root.movelayer.switch1.gotoAndPlay(2);
_root.movelayer.platforms.blocklift.gotoAndPlay(2);
}
Symbol 330 MovieClip Frame 1
stop();
stop();
Symbol 330 MovieClip Frame 2
stop();
Symbol 344 MovieClip Frame 1
stop();
Symbol 344 MovieClip Frame 2
stop();
Symbol 344 MovieClip Frame 20
_root.levelcomplete._visible = true;
_root.moveLayer.hero._visible = false;
delete _root.moveLayer.hero.onEnterFrame;
Symbol 361 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 200
stop();
Symbol 368 Button
on (release) {
gotoAndStop (61);
_root.collectHUD.collect1.gotoAndStop(2);
_root.exitbump.nextFrame();
}
Symbol 369 MovieClip Frame 60
gotoAndPlay (1);
Symbol 369 MovieClip Frame 61
stop();
Symbol 370 Button
on (release) {
gotoAndStop (61);
_root.collectHUD.collect2.gotoAndStop(2);
_root.exitbump.nextFrame();
}
Symbol 371 MovieClip Frame 60
gotoAndPlay (1);
Symbol 371 MovieClip Frame 61
stop();
Symbol 372 Button
on (release) {
gotoAndStop (61);
_root.collectHUD.collect3.gotoAndStop(2);
_root.exitbump.nextFrame();
}
Symbol 373 MovieClip Frame 60
gotoAndPlay (1);
Symbol 373 MovieClip Frame 61
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 5
stop();
Symbol 375 MovieClip Frame 10
stop();
Symbol 375 MovieClip Frame 15
stop();
Symbol 375 MovieClip Frame 20
stop();
stop();
Symbol 375 MovieClip Frame 25
stop();
_root.gotoAndStop(12);
Symbol 377 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 2
stop();
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 2
stop();
Symbol 381 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 2
stop();
Symbol 382 MovieClip Frame 1
stop();
Symbol 388 MovieClip Frame 1
stop();
Symbol 388 MovieClip Frame 2
stop();
Symbol 388 MovieClip Frame 3
stop();
Symbol 388 MovieClip Frame 4
stop();
_root.movelayer.exit.gotoAndStop(2);
Symbol 405 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 13
_root.gotoAndStop(8);
Symbol 430 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 5
stop();
Symbol 430 MovieClip Frame 10
stop();
Symbol 430 MovieClip Frame 15
stop();
Symbol 430 MovieClip Frame 20
stop();
stop();
Symbol 430 MovieClip Frame 25
stop();
_root.gotoAndStop(13);
Symbol 445 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 13
_root.gotoAndStop(9);
Symbol 458 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 80
_root.gotoAndStop(15);
Symbol 493 MovieClip Frame 10
_parent.gotoAndStop(1);
parent.gotoAndStop(1);
Symbol 494 MovieClip Frame 1
this.onEnterFrame = _root.simpleMove;
this.isBoss = true;
stop();
Symbol 494 MovieClip Frame 2
stop();
Symbol 494 MovieClip Frame 3
trace("FIRE");
_root.createBossBullet(this);
Symbol 494 MovieClip Frame 4
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 3
stop();
Symbol 498 MovieClip Frame 5
stop();
Symbol 498 MovieClip Frame 7
stop();
Symbol 498 MovieClip Frame 9
stop();
Symbol 498 MovieClip Frame 11
stop();
Symbol 498 MovieClip Frame 13
stop();
Symbol 498 MovieClip Frame 15
stop();
Symbol 498 MovieClip Frame 17
stop();
Symbol 498 MovieClip Frame 19
stop();
Symbol 498 MovieClip Frame 21
stop();
Symbol 498 MovieClip Frame 23
stop();
Symbol 498 MovieClip Frame 25
stop();
Symbol 498 MovieClip Frame 27
stop();
Symbol 498 MovieClip Frame 29
stop();
Symbol 498 MovieClip Frame 31
stop();
Symbol 498 MovieClip Frame 33
stop();
Symbol 498 MovieClip Frame 35
stop();
Symbol 498 MovieClip Frame 37
stop();
Symbol 498 MovieClip Frame 39
stop();
Symbol 498 MovieClip Frame 41
stop();
_root.movelayer.isboss.gotoAndStop(2);
Symbol 500 MovieClip Frame 1
stop();
Symbol 500 MovieClip Frame 5
stop();
Symbol 500 MovieClip Frame 10
stop();
Symbol 500 MovieClip Frame 15
stop();
Symbol 500 MovieClip Frame 20
stop();
Symbol 500 MovieClip Frame 25
stop();
_root.gotoAndStop(14);
Symbol 512 Button
on (release) {
gotoAndStop (3);
}
Symbol 522 Button
on (release) {
gotoAndStop (4);
}
Symbol 523 Button
on (release) {
gotoAndStop (6);
}
Symbol 524 Button
on (release) {
gotoAndStop (7);
}
Symbol 525 Button
on (release) {
gotoAndStop (9);
}
Symbol 534 Button
on (release) {
gotoAndStop (16);
}
Symbol 545 MovieClip Frame 1315
_root.gotoAndStop(2);