Frame 1
MochiAd.showPreGameAd({id:"6d20f87bc11cff88", res:"600x400"});
Frame 2
function gameStart() {
difficult = false;
storymode = true;
_root._x = 0;
_root._y = 0;
_root._xscale = 100;
_root._yscale = 100;
gamestart = 0;
_root.attachMovie("menu_mc", "menu_mc", _root.getNextHighestDepth());
var _local3 = 0;
while (_local3 < menuPoints.length) {
var _local4 = menu_mc.attachMovie("menu_link", "ml" + _local3, _local3);
_local4._x = 300;
_local4._y = 140 + (35 * _local3);
_local4.id = _local3;
_local4.link_name.text = menuPoints[_local3];
_local4.onRollOver = function () {
this.link_name.textColor = 16724736 /* 0xFF3300 */;
};
_local4.onRollOut = function () {
this.link_name.textColor = 0;
};
_local4.onRelease = function () {
switch (this.id) {
case 0 :
if (storymode) {
gamestart = 1;
removeMenu();
_root.attachMovie("story", "story_mc", _root.getNextHighestDepth());
} else {
removeMenu();
createGame();
}
break;
case 1 :
difficult = !difficult;
this.link_name.text = "Difficulty: ";
this.link_name.text = this.link_name.text + (difficult ? "Hard" : "Easy");
break;
case 2 :
storymode = !storymode;
this.link_name.text = "Story: ";
this.link_name.text = this.link_name.text + (storymode ? "On" : "Off");
break;
case 3 :
fscommand ("quit");
}
};
_local3++;
}
}
function removeMenu() {
_root.menu_mc.removeMovieClip();
}
function createGame() {
if (gamestart != 2) {
gamestart = 2;
}
}
stop();
mdm.Input.Joystick.enable(1, "keyboard");
var level1_array = Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 2, 2, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 1], [0, 1, 30, 30, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 15, 0, 0, 1], [0, 1, 30, 30, 1, 0, 1, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1], [0, 1, 30, 30, 1, 0, 1, 0, 0, 23, 0, 0, 0, 28, 0, 0, 29, 16, 0, 35, 0, 1], [0, 1, 30, 30, 1, 0, 1, 15, 0, 15, 0, 15, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 30, 30, 1, 0, 1, 0, 15, 0, 15, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 30, 30, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30, 30, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30, 30, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30, 30, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30, 30, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30, 30, 1, 0, 0, 0, 0, 0]);
var level8_array = Array([34, 34, 34, 34, 34, 32, 34, 34, 34, 34, 34, 34, 34, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 13, 34], [34, 34, 33, 34, 34, 34, 34, 34, 33, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 34, 33, 34, 34, 34, 34, 34, 13, 13, 34], [34, 34, 34, 34, 0, 0, 34, 34, 34, 0, 0, 34, 34, 32, 34, 34, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 34, 33, 13, 13, 34], [34, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 34, 34, 13, 13, 34], [34, 23, 0, 16, 4, 4, 15, 16, 0, 0, 0, 0, 4, 4, 0, 0, 2, 2, 2, 0, 0, 16, 15, 16, 23, 0, 34, 34, 34, 13, 13, 34], [34, 0, 0, 34, 34, 34, 33, 34, 32, 34, 34, 34, 0, 0, 34, 32, 5, 5, 5, 0, 0, 34, 34, 34, 22, 0, 34, 34, 34, 24, 24, 34], [34, 0, 0, 34, 34, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34, 4, 4, 4, 0, 34, 34, 34, 32, 0, 0, 34, 33, 34, 24, 24, 34], [33, 27, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 33, 34, 34, 2, 2, 2, 34, 34, 34, 34, 34, 0, 0, 2, 29, 34, 24, 24, 34], [34, 23, 15, 2, 2, 0, 23, 0, 0, 34, 34, 32, 34, 34, 34, 34, 5, 5, 5, 34, 34, 33, 34, 34, 0, 0, 16, 15, 34, 13, 13, 33], [34, 32, 34, 17, 0, 34, 0, 0, 0, 34, 34, 34, 34, 34, 34, 34, 28, 28, 28, 34, 34, 34, 34, 34, 0, 0, 34, 34, 34, 13, 13, 34], [34, 0, 0, 34, 33, 34, 0, 0, 0, 34, 34, 33, 34, 34, 34, 34, 34, 32, 34, 34, 34, 32, 34, 34, 0, 0, 34, 34, 34, 13, 13, 34], [34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 32, 34, 34, 34, 34, 34, 34, 34, 34, 29, 5, 0, 0, 34, 34, 34, 13, 13, 34], [34, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 32, 34, 34, 0, 0, 0, 0, 0, 0, 34, 34, 15, 16, 0, 0, 34, 34, 34, 13, 13, 34], [34, 0, 0, 4, 4, 0, 27, 0, 0, 15, 0, 34, 34, 0, 0, 0, 0, 0, 0, 23, 0, 34, 33, 34, 0, 0, 34, 34, 33, 13, 13, 32], [34, 25, 35, 0, 34, 34, 23, 16, 0, 0, 29, 34, 34, 23, 23, 21, 15, 0, 23, 0, 0, 34, 34, 0, 0, 0, 34, 34, 34, 13, 13, 34], [34, 34, 34, 34, 34, 32, 34, 34, 34, 34, 34, 34, 0, 22, 0, 0, 30, 30, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 34], [34, 34, 34, 32, 34, 34, 33, 34, 32, 34, 34, 34, 31, 15, 0, 0, 30, 30, 0, 15, 0, 15, 0, 0, 0, 0, 0, 15, 16, 13, 13, 33], [34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 23, 0, 18, 34, 34, 17, 23, 0, 0, 0, 0, 23, 18, 34, 34, 33, 12, 12, 34], [34, 34, 33, 34, 34, 33, 34, 34, 34, 34, 34, 36, 0, 18, 34, 34, 34, 34, 34, 34, 34, 34, 34, 32, 34, 34, 34, 34, 34, 34, 34, 34], [34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 32, 34, 34, 34, 33, 34, 34, 34, 34, 34, 32, 34, 34, 34, 34, 34]);
var level9_array = Array([33, 34, 34, 34, 32, 34, 34, 34, 34, 32, 0, 0, 0, 0, 34, 34, 34, 32, 34, 33, 34, 34, 34, 33, 34, 34, 32, 34, 33], [42, 42, 42, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 34, 34, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 34], [13, 13, 13, 0, 0, 16, 0, 0, 0, 16, 35, 0, 0, 0, 32, 0, 0, 0, 15, 0, 0, 15, 0, 0, 29, 16, 23, 0, 34], [13, 13, 13, 0, 34, 34, 33, 34, 32, 34, 33, 34, 34, 34, 34, 23, 0, 16, 0, 18, 34, 32, 17, 18, 34, 34, 2, 0, 32], [13, 13, 13, 0, 0, 0, 42, 42, 0, 0, 0, 0, 0, 34, 34, 0, 0, 34, 34, 34, 32, 34, 34, 34, 34, 0, 2, 0, 33], [13, 13, 13, 0, 0, 0, 13, 0, 0, 0, 0, 29, 15, 34, 33, 27, 0, 0, 33, 34, 34, 34, 34, 33, 0, 0, 2, 0, 34], [13, 13, 12, 2, 0, 0, 13, 0, 0, 0, 18, 34, 34, 0, 0, 5, 0, 0, 0, 0, 31, 34, 34, 34, 37, 37, 37, 39, 34], [12, 12, 34, 32, 0, 0, 13, 2, 15, 18, 34, 32, 0, 23, 0, 5, 0, 0, 0, 37, 39, 34, 32, 34, 23, 0, 27, 0, 33], [34, 33, 0, 42, 0, 0, 12, 18, 34, 34, 34, 0, 0, 0, 0, 23, 0, 34, 41, 41, 34, 34, 34, 34, 0, 0, 23, 0, 34], [42, 42, 0, 13, 0, 0, 34, 34, 0, 34, 33, 0, 0, 27, 0, 0, 0, 34, 34, 34, 34, 34, 34, 40, 38, 38, 38, 38, 34], [13, 13, 0, 13, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 34, 34, 42, 42, 0, 34, 33, 34, 2, 0, 0, 0, 34], [13, 13, 0, 13, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 32, 34, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 32], [13, 13, 31, 12, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 13, 0, 34, 34, 13, 13, 0, 15, 0, 0, 2, 0, 0, 0, 34], [13, 13, 34, 32, 0, 0, 0, 0, 0, 0, 0, 37, 13, 37, 37, 39, 34, 32, 13, 13, 17, 0, 16, 0, 27, 0, 0, 0, 34], [13, 13, 0, 0, 0, 0, 0, 32, 34, 33, 23, 0, 13, 26, 13, 23, 34, 34, 13, 13, 34, 33, 34, 0, 23, 0, 0, 0, 34], [13, 13, 0, 0, 0, 0, 15, 0, 0, 34, 0, 37, 13, 37, 37, 39, 33, 34, 13, 13, 34, 34, 34, 41, 41, 0, 0, 0, 33], [13, 13, 2, 0, 0, 0, 0, 36, 0, 34, 0, 0, 13, 23, 13, 0, 34, 34, 13, 13, 0, 0, 34, 32, 34, 41, 41, 41, 34], [12, 12, 34, 34, 33, 34, 34, 34, 34, 34, 41, 41, 12, 41, 12, 41, 34, 32, 12, 12, 0, 0, 0, 0, 0, 34, 34, 34, 34], [34, 34, 32, 34, 34, 34, 32, 34, 34, 33, 34, 34, 34, 32, 34, 34, 34, 34, 34, 34, 34, 17, 0, 0, 0, 0, 42, 42, 32], [34, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 34, 17, 0, 0, 0, 0, 0, 34], [34, 34, 38, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 16, 15, 5, 5, 29, 34, 34, 17, 16, 0, 13, 13, 34], [32, 34, 13, 13, 35, 0, 2, 2, 0, 0, 15, 0, 0, 0, 0, 0, 34, 34, 32, 34, 34, 34, 33, 34, 34, 0, 13, 13, 34], [34, 34, 13, 13, 34, 0, 2, 2, 0, 16, 36, 0, 16, 0, 0, 0, 33, 34, 0, 0, 0, 0, 0, 34, 32, 34, 13, 13, 33], [34, 34, 13, 13, 34, 0, 0, 0, 0, 34, 34, 33, 34, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 33, 13, 13, 34], [33, 34, 13, 13, 34, 0, 0, 0, 0, 0, 34, 34, 0, 0, 4, 0, 16, 0, 15, 16, 0, 0, 0, 0, 34, 34, 13, 13, 34], [34, 34, 13, 13, 32, 0, 0, 0, 0, 5, 5, 15, 0, 0, 0, 0, 34, 34, 34, 33, 0, 5, 5, 0, 32, 34, 13, 13, 34], [34, 32, 13, 13, 34, 0, 0, 0, 0, 5, 5, 0, 0, 16, 27, 0, 34, 32, 34, 0, 0, 5, 5, 0, 34, 34, 13, 13, 32], [34, 34, 13, 13, 34, 0, 0, 0, 16, 15, 18, 34, 34, 33, 23, 0, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 34], [34, 34, 13, 13, 34, 0, 0, 0, 33, 34, 34, 34, 34, 34, 0, 0, 33, 34, 0, 0, 0, 0, 0, 0, 0, 29, 13, 13, 34], [34, 34, 13, 13, 33, 0, 0, 0, 34, 34, 34, 32, 34, 34, 0, 0, 34, 34, 23, 26, 0, 0, 0, 23, 34, 33, 13, 13, 34], [32, 34, 25, 0, 34, 41, 41, 41, 32, 34, 34, 34, 34, 34, 41, 41, 34, 34, 41, 41, 41, 41, 41, 41, 32, 34, 13, 13, 34], [34, 34, 0, 0, 34, 34, 34, 34, 34, 34, 34, 33, 34, 34, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 12, 12, 33], [34, 34, 28, 28, 32, 34, 34, 33, 34, 32, 34, 34, 34, 34, 34, 34, 34, 32, 34, 34, 34, 32, 34, 34, 34, 34, 34, 34, 34]);
var game = new Game(32, 32, 1);
var zoom = 1.8;
var difficult = false;
var storymode = true;
var gamestart = 0;
var menuPoints = Array("Start game", "Difficulty: Easy", "Story: On", "Quit game");
_root.onEnterFrame = function () {
if (gamestart == 2) {
game.gameloop();
game.hud._xscale = 100 / _root.zoom;
game.hud._yscale = 100 / _root.zoom;
game.hud._x = ((-_root._x) / _root.zoom) - 5;
game.hud._y = (-_root._y) / _root.zoom;
}
if ((gamestart == 1) && (story_mc._currentframe >= 460)) {
story_mc.removeMovieClip();
createGame();
}
};
Stage.scaleMode = "noScale";
var myListener = new Object();
myListener.onResize = function () {
Stage.scaleMode = "showAll";
};
fscommand ("showmenu", false);
Stage.addListener(myListener);
gameStart();
Symbol 2 MovieClip [player2] Frame 1
#initclip 7
Object.registerClass("player2", Player);
#endinitclip
Symbol 28 MovieClip Frame 21
gotoAndPlay ("stand");
Symbol 28 MovieClip Frame 55
gotoAndPlay ("run");
Symbol 28 MovieClip Frame 62
stop();
Symbol 28 MovieClip Frame 71
stop();
Symbol 28 MovieClip Frame 76
stop();
Symbol 28 MovieClip Frame 94
gotoAndPlay (1);
Symbol 28 MovieClip Frame 106
stop();
Symbol 28 MovieClip Frame 109
stop();
Symbol 28 MovieClip Frame 133
stop();
Symbol 121 MovieClip Frame 21
gotoAndPlay ("stand");
Symbol 121 MovieClip Frame 55
gotoAndPlay ("run");
Symbol 121 MovieClip Frame 62
stop();
Symbol 121 MovieClip Frame 71
stop();
Symbol 121 MovieClip Frame 76
stop();
Symbol 121 MovieClip Frame 95
stop();
Symbol 121 MovieClip Frame 105
stop();
Symbol 121 MovieClip Frame 116
play();
Symbol 121 MovieClip Frame 132
stop();
Symbol 121 MovieClip Frame 134
play();
Symbol 121 MovieClip Frame 152
stop();
Symbol 121 MovieClip Frame 155
stop();
Symbol 121 MovieClip Frame 179
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 60
gotoAndPlay (1);
Symbol 283 MovieClip [tile] Frame 1
stop();
Symbol 283 MovieClip [tile] Frame 2
stop();
Symbol 283 MovieClip [tile] Frame 3
stop();
Symbol 283 MovieClip [tile] Frame 4
stop();
Symbol 283 MovieClip [tile] Frame 5
stop();
Symbol 283 MovieClip [tile] Frame 6
stop();
Symbol 283 MovieClip [tile] Frame 7
stop();
Symbol 283 MovieClip [tile] Frame 8
stop();
Symbol 283 MovieClip [tile] Frame 9
stop();
Symbol 283 MovieClip [tile] Frame 10
stop();
Symbol 283 MovieClip [tile] Frame 11
stop();
Symbol 283 MovieClip [tile] Frame 12
stop();
Symbol 283 MovieClip [tile] Frame 13
stop();
Symbol 283 MovieClip [tile] Frame 14
stop();
Symbol 283 MovieClip [tile] Frame 15
stop();
Symbol 283 MovieClip [tile] Frame 16
stop();
Symbol 283 MovieClip [tile] Frame 17
stop();
Symbol 283 MovieClip [tile] Frame 18
stop();
Symbol 283 MovieClip [tile] Frame 19
stop();
Symbol 283 MovieClip [tile] Frame 20
stop();
Symbol 283 MovieClip [tile] Frame 21
stop();
Symbol 283 MovieClip [tile] Frame 22
stop();
Symbol 283 MovieClip [tile] Frame 23
stop();
Symbol 283 MovieClip [tile] Frame 24
stop();
Symbol 283 MovieClip [tile] Frame 25
stop();
Symbol 283 MovieClip [tile] Frame 26
stop();
Symbol 283 MovieClip [tile] Frame 27
stop();
Symbol 283 MovieClip [tile] Frame 28
stop();
Symbol 283 MovieClip [tile] Frame 29
stop();
Symbol 283 MovieClip [tile] Frame 30
stop();
Symbol 283 MovieClip [tile] Frame 31
stop();
Symbol 283 MovieClip [tile] Frame 32
stop();
Symbol 283 MovieClip [tile] Frame 33
stop();
Symbol 283 MovieClip [tile] Frame 34
stop();
Symbol 283 MovieClip [tile] Frame 35
stop();
Symbol 283 MovieClip [tile] Frame 36
stop();
Symbol 283 MovieClip [tile] Frame 37
stop();
Symbol 283 MovieClip [tile] Frame 38
stop();
Symbol 283 MovieClip [tile] Frame 39
stop();
Symbol 283 MovieClip [tile] Frame 40
stop();
Symbol 283 MovieClip [tile] Frame 41
stop();
Symbol 283 MovieClip [tile] Frame 42
stop();
Symbol 283 MovieClip [tile] Frame 43
stop();
Symbol 314 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 2
stop();
Symbol 314 MovieClip Frame 3
stop();
Symbol 314 MovieClip Frame 4
stop();
Symbol 314 MovieClip Frame 5
stop();
Symbol 314 MovieClip Frame 6
stop();
Symbol 342 MovieClip [gameover] Frame 1
stop();
Symbol 381 MovieClip [EnemyBoo] Frame 48
gotoAndPlay ("sneak");
Symbol 381 MovieClip [EnemyBoo] Frame 62
stop();
Symbol 381 MovieClip [EnemyBoo] Frame 66
stop();
Symbol 381 MovieClip [EnemyBoo] Frame 97
gotoAndPlay ("stand");
Symbol 385 MovieClip [mt_Bar] Frame 1
stop();
Symbol 385 MovieClip [mt_Bar] Frame 2
stop();
Symbol 491 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.3");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] 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) {
}};
options = _parseOptions(options, _local27);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0) {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] 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) {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(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 _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
}
Symbol 492 MovieClip [__Packages.Player] Frame 0
class Player
{
var clip, game, x, y, behaviour, lastSlayFrame, a, b, xTile, yTile, animation, slay_1, slay_2, slay_3, waiting, dead, falling, jumping, hitting, bc, bId;
function Player (g, pX, pY) {
_root.attachMovie("player", "player_mc", _root.getNextHighestDepth());
clip = _root.player_mc;
game = g;
x = (clip._width / 2) + (32 * pX);
y = (clip._height / 2) + (32 * pY);
behaviour = "stand";
lastSlayFrame = (a = (b = 0));
}
function set xspeed(x) {
xSpeed = x;
xTile = Math.floor(this.x / 32);
//return(xspeed);
}
function get xspeed() {
return(xSpeed);
}
function set yspeed(y) {
ySpeed = y;
yTile = Math.floor(this.y / 32);
//return(yspeed);
}
function get yspeed() {
return(ySpeed);
}
function animate(ani) {
if (animation != ani) {
animation = ani;
if (((!slay_1) && (!slay_2)) && (!slay_3)) {
clip.body.gotoAndPlay(ani);
clip.legs.gotoAndPlay(ani);
} else {
switch (behaviour) {
case "stand" :
clip.body._x = 3.5;
break;
case "run" :
clip.body._y = 2;
clip.body._x = -1;
clip.body._rotation = 8;
break;
case "jump" :
clip.body._rotation = 5;
clip.body._y = -1;
break;
case "fall" :
clip.body._x = 1;
clip.body._y = 2;
break;
default :
clip.body._x = 0;
clip.body._y = 0;
clip.body._rotation = 0;
}
if (((ani == "slay_1") || (ani == "slay_2")) || (ani == "slay_3")) {
clip.body.gotoAndPlay(ani);
}
clip.legs.gotoAndPlay(ani);
}
}
}
function wait() {
waitingTime++;
if ((waitingTime > 120) && (!waiting)) {
waiting = true;
waitingTime = 0;
animate("waiting");
}
}
function die() {
dead = true;
clip.body._x = 0;
clip.body._y = 0;
clip.body._rotation = 0;
slay_1 = false;
slay_2 = false;
slay_3 = false;
animate("die");
}
function reAnimate() {
if (game.lives > 0) {
x = game.psx * 32;
y = game.psy * 32;
_root._x = x - 80;
_root._y = y;
game.fadeToBlack(false);
game.loseHeart();
dead = false;
} else if (!game.gameover_b) {
game.gameover_b = true;
game.hud.gameover_mc.gotoAndPlay(2);
_global.setTimeout(game, "gameover", 7500);
}
}
function slay() {
if (((!slay_1) && (!slay_2)) && (!slay_3)) {
slay_1 = true;
animate("slay_1");
lastSlayFrame = clip.body._currentframe;
_global.setTimeout(this, "slay2", 350);
}
if (slay_2 && (clip.body._currentframe > (lastSlayFrame + 7))) {
slay_3 = true;
}
if (slay_1 && (clip.body._currentframe > (lastSlayFrame + 3))) {
slay_2 = true;
}
}
function slay2() {
slay_1 = false;
if (slay_2) {
animate("slay_2");
lastSlayFrame = clip.body._currentframe;
_global.setTimeout(this, "slay3", 550);
}
}
function slay3() {
slay_2 = false;
if (slay_3) {
if (xSpeed != 0) {
xSpeed = xSpeed * -0.1;
} else {
xSpeed = (5 * clip._xscale) / 100;
}
if ((ySpeed <= 0) && (ySpeed > -2)) {
ySpeed = ySpeed - 6;
}
falling = false;
jumping = true;
animate("slay_3");
lastSlayFrame = clip.body._currentframe;
_global.setTimeout(this, "slayEnd", 550);
}
}
function slayEnd() {
slay_3 = false;
}
function hit() {
if ((!hitting) && (!dead)) {
hitting = true;
game.loseHeart();
bc = 0;
bId = _global.setInterval(this, "blink", 80);
xSpeed = (-8 * clip._xscale) / 100;
if (ySpeed <= 0) {
ySpeed = ySpeed - 4;
}
}
}
function hitSparks() {
if ((game.getTile(x, y).id == 41) || (game.getTile(x, y).id == 42)) {
hit();
}
}
function blink(blinkInterval) {
bc++;
if (bc < 7) {
if (clip._alpha == 100) {
clip._alpha = 20;
} else {
clip._alpha = 100;
}
} else {
hitting = false;
_global.clearInterval(bId);
}
}
var xSpeed = 0;
var ySpeed = 0;
var maxspeed = 35;
var wind = 0;
var power = 3;
var gravity = 0.8;
var upconstant = 0.75;
var friction = 0.65;
var waitingTime = 0;
}
Symbol 493 MovieClip [__Packages.Game] Frame 0
class Game
{
var tileH, tileW, score, lives, hearts, player, psx, psy, hud, cLevel, clip, read_msg, blackFade;
function Game (tH, tW, level) {
tileH = tH;
tileW = tW;
score = 0;
lives = 3;
hearts = 3;
enemyCount = 0;
mtCount = 0;
setLevel(level);
buildMap(_root[("level" + level) + "_array"]);
player = new Player(this, psx, psy);
player.jspeed = 1;
hud = _root.attachMovie("hud", "hud_mc", _root.getNextHighestDepth());
hud.hearts_mc.gotoAndStop((5 - hearts) + 1);
hud.attachMovie("msg_Box", "msg_Box", _root.getNextHighestDepth());
hud.msg_Box._visible = false;
}
function setLevel(l) {
cLevel = l;
}
function getLevel() {
return(cLevel);
}
function controlZImages() {
var _local3 = Array(0, -20, -8, -1);
var _local2 = 1;
while (_local2 <= 3) {
if (_local3[_local2 - 1] != 0) {
_root.level_map["z" + _local2]._x = _root._x / _local3[_local2 - 1];
}
_local2++;
}
}
function buildMap(map) {
_root._x = 0;
_root._y = 0;
_root.level_map.removeMovieClip();
if (_root.tiles != undefined) {
_root.tiles.removeMovieClip();
}
_root.attachMovie(("level" + cLevel) + "_map", "level_map", _root.getNextHighestDepth());
_root.level_map._y = -1;
_root.attachMovie("empty", "tiles", _root.getNextHighestDepth());
clip = _root.tiles;
var _local7 = map[0].length;
var _local8 = map.length;
var _local5 = 0;
while (_local5 < _local8) {
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = (("t_" + _local5) + "_") + _local4;
clip.attachMovie("tile", _local3, (_local5 * 100) + (_local4 * 2));
clip[_local3].name = _local3;
clip[_local3]._x = _local4 * tileW;
clip[_local3]._y = _local5 * tileH;
clip[_local3].gotoAndStop(map[_local5][_local4] + 1);
this[_local3] = new Tile(map[_local5][_local4], _local3, this);
_local4++;
}
_local5++;
}
player.clip.swapDepths(_root.getNextHighestDepth());
hud.swapDepths(_root.getNextHighestDepth());
}
function showScore(s) {
if (s > 99) {
s = 0;
score = 0;
addLive();
}
hud.scoreFirstNumber.gotoAndStop(Math.floor(score / 10) + 1);
hud.scoreSecondNumber.gotoAndStop(Math.floor(s - (Math.floor(score / 10) * 10)) + 1);
hud.livesNumber.gotoAndStop(lives + 1);
}
function gameloop() {
if (getLevel() != 10) {
player.xTile = Math.floor(player.x / tileW);
player.yTile = Math.floor(player.y / tileH);
if (!read_msg) {
controlPlayer();
camera();
controlZImages();
controlEnemies();
} else if (Key.isDown(32)) {
hud.msg_Box._visible = false;
read_msg = false;
if (gameover_b) {
fadeToBlack(true);
player.spin = true;
}
}
controlMovingTiles();
showScore(score);
} else {
hud.credits_mc._y = hud.credits_mc._y - 2;
hud.blackScreen._alpha = 100;
}
}
function controlMovingTiles() {
var _local3 = 0;
while (_local3 < mtCount) {
if (_root["mt" + _local3] != undefined) {
_root["mt" + _local3].loop();
}
_local3++;
}
}
function destroyMovingTiles() {
var _local3 = 0;
while (_local3 < mtCount) {
if (_root["mt" + _local3] != undefined) {
_root["mt" + _local3].clip.removeMovieClip();
_root["mt" + _local3] = null;
}
_local3++;
}
mtCount = 0;
}
function controlEnemies() {
var _local3 = 0;
while (_local3 < enemyCount) {
if (_root["enemy" + _local3] != undefined) {
_root["enemy" + _local3].loop();
}
_local3++;
}
}
function destroyEnemies() {
var _local3 = 0;
while (_local3 < enemyCount) {
if (_root["enemy" + _local3] != undefined) {
_root["enemy" + _local3].clip.removeMovieClip();
_root["enemy" + _local3] = null;
}
_local3++;
}
enemyCount = 0;
}
function addLive() {
lives++;
}
function loseHeart() {
if (hearts <= 0) {
hearts = 3;
lives--;
} else {
hearts--;
}
if (hearts == 0) {
player.die();
fadeToBlack(true);
}
hud.hearts_mc.gotoAndStop((5 - hearts) + 1);
}
function addHeart() {
if (hearts < 5) {
hearts++;
}
hud.hearts_mc.gotoAndStop((5 - hearts) + 1);
}
function controlPlayer() {
with (player) {
if (getTile(x, y).id != 14) {
clip._x = x;
clip._y = y + 1;
getMyCorners(x, y);
if ((!dead) && (!blackFade)) {
if ((Key.isDown(37) || (mdm_joystick1_xlevel < -20)) && (xspeed > (-maxspeed))) {
xspeed = xspeed - (power / Math.pow(jspeed, 7));
clip._xscale = -100;
}
if ((Key.isDown(39) || (mdm_joystick1_xlevel > 20)) && (xspeed < maxspeed)) {
xspeed = xspeed + (power / Math.pow(jspeed, 7));
clip._xscale = 100;
}
if (((Key.isDown(38) && (yspeed < maxspeed)) && (!jumping)) && (!falling)) {
yspeed = -12;
jumping = true;
}
if ((((Key.isDown(40) || (mdm_joystick1_ylevel < -20)) && (yspeed < maxspeed)) && (!jumping)) && (!falling)) {
xspeed = 0;
}
if (Key.isDown(32)) {
if (!spaceBar) {
slay();
spaceBar = true;
}
} else {
spaceBar = false;
}
}
if ((((!slay_1) && (!slay_2)) && (!slay_3)) && (!dead)) {
clip.body.gotoAndPlay(clip.legs._currentframe);
clip.body._x = 0;
clip.body._y = 0;
clip.body._rotation = 0;
}
if (jumping && (!dead)) {
if (!slay_1) {
behaviour = "jump";
animate("jump");
}
if (jspeed == 1) {
jspeed = 1.2;
}
}
if ((yspeed > 0) && (!dead)) {
falling = true;
jumping = false;
}
if ((xspeed > -0.2) && (xspeed < 0.2)) {
xspeed = 0;
}
xspeed = ((xspeed + wind) * friction) * Math.pow(jspeed, 1.28);
yspeed = yspeed + gravity;
if (yspeed > 15) {
yspeed = 15;
}
x = x + xspeed;
y = y + yspeed;
if (colRight || (colLeft)) {
x = (xTile * tileW) + (tileW / 2);
}
if (colUp || (colDown)) {
y = (yTile * tileH) + (tileW / 2);
}
if (colDown && (!jumping)) {
falling = false;
yspeed = 0;
jspeed = 1;
}
if (colUp) {
yspeed = 0;
}
wait();
if ((((xspeed != 0) && (!jumping)) && (!falling)) && (!dead)) {
behaviour = "run";
animate("run");
}
if (((((xspeed == 0) && (!jumping)) && (!falling)) && (!waiting)) && (!dead)) {
behaviour = "stand";
animate("stand");
}
if ((((xspeed != 0) || (jumping)) || (falling)) || (slay_1 && (!dead))) {
waitingTime = 0;
waiting = false;
}
if ((falling && (yspeed > 9)) && (!dead)) {
behaviour = "fall";
animate("fall");
}
getTile(x, y).action();
}
if (spin) {
if (getTile(x, y).id == 14) {
ySpeed = ySpeed / 2;
animate("spin");
if (b < 30) {
clip._x = x + (Math.sin((a * Math.PI) / 180) * (30 - b));
clip._y = y + (Math.cos((a * Math.PI) / 180) * (30 - b));
if (Math.abs(clip._xscale) > 2) {
clip._xscale = clip._xscale / 1.01;
clip._yscale = clip._yscale / 1.01;
clip._rotation = clip._rotation + 5;
}
a = a - 12.5;
b = b + 0.208333333333333;
}
}
}
if (dead && (!blackFade)) {
reAnimate();
}
}
}
function showNextMessage(id) {
if (_root.storymode || (id == 8)) {
read_msg = true;
hud.msg_Box.msg.text = msgs[id];
hud.msg_Box._visible = true;
if (id == 8) {
gameover_b = true;
}
}
}
function fadeToBlack(fade) {
var _local3 = hud.blackScreen;
if (!blackFade) {
_local3._alpha = ((_local3._alpha <= 0) ? -248 : 248);
}
blackFade = true;
if (fade == true) {
_local3._alpha = _local3._alpha + 3;
if (_local3._alpha < 100) {
_global.setTimeout(this, "fadeToBlack", 30, fade);
} else {
blackFade = false;
}
} else {
_local3._alpha = _local3._alpha - 3;
if (_local3._alpha > 0) {
_global.setTimeout(this, "fadeToBlack", 30, fade);
} else {
blackFade = false;
}
}
if (!blackFade) {
if (player.spin) {
player.spin = false;
loadNextLevel();
fadeToBlack(false);
}
}
}
function loadNextLevel() {
player.clip._xscale = 100;
player.clip._yscale = 100;
player.clip._rotation = (player.a = (player.b = 0));
destroyEnemies();
destroyMovingTiles();
var _local3 = getLevel() + 1;
setLevel(_local3);
buildMap(_root[("level" + _local3) + "_array"]);
}
function camera() {
with (player) {
_root._xscale = _root.zoom * 100;
_root._yscale = _root.zoom * 100;
var lastTile = _root[("level" + cLevel) + "_array"][0].length;
if ((x < 160) || ((lastTile * 32) < (x + 160))) {
endCam = endCam / 1.5;
if (endCam <= 0.001) {
endCam = 0;
}
} else {
if (endCam == 0) {
endCam = 0.01;
}
endCam = endCam * 2;
if (endCam >= 1) {
endCam = 1;
}
}
_root._x = _root._x + (Math.round(((((-x) - (clip._xscale / 20)) + (((Stage.width - (8 / _root.zoom)) / 2) / _root.zoom)) - (_root._x / _root.zoom)) / 6) * endCam);
_root._y = _root._y + Math.round(((((-y) - (_root._y / _root.zoom)) + ((Stage.height / 2) / _root.zoom)) / 6) + 5);
_root._y = _root._y - Math.round(((falling && (!jumping)) ? (_root.zoom * yspeed) : 0));
}
}
function getMyCorners(x, y) {
player.colUp = false;
player.colRight = false;
player.colDown = false;
player.colLeft = false;
var _local2 = getTile((player.x + 1) - (tileW / 2), (player.y + player.__get__yspeed()) - (tileH / 2));
player.upLeft = (_local2.walkable ? true : false);
_local2 = getTile((player.x - 1) + (tileW / 2), (player.y + player.__get__yspeed()) - (tileH / 2));
player.upRight = (_local2.walkable ? true : false);
if (!(player.upLeft && (player.upRight))) {
player.colUp = true;
}
_local2 = getTile((player.x + player.__get__xspeed()) + (tileW / 2), (player.y + 1) - (tileH / 2));
player.rightUp = (_local2.walkable ? true : false);
_local2 = getTile((player.x + player.__get__xspeed()) + (tileW / 2), (player.y - 1) + (tileH / 2));
player.rightDown = (_local2.walkable ? true : false);
if (!(player.rightUp && (player.rightDown))) {
player.colRight = true;
}
var _local3 = 1;
_local2 = getTile((player.x + _local3) - (tileW / 2), (player.y + player.__get__yspeed()) + (tileH / 2));
_local2.action();
player.downLeft = (_local2.walkable ? true : false);
_local2 = getTile((player.x - _local3) + (tileW / 2), (player.y + player.__get__yspeed()) + (tileH / 2));
_local2.action();
player.downRight = (_local2.walkable ? true : false);
if (!(player.downLeft && (player.downRight))) {
player.colDown = true;
}
_local2 = getTile((player.x + player.__get__xspeed()) - (tileW / 2), (player.y + 1) - (tileH / 2));
player.leftUp = (_local2.walkable ? true : false);
_local2 = getTile((player.x + player.__get__xspeed()) - (tileW / 2), (player.y - 1) + (tileH / 2));
player.leftDown = (_local2.walkable ? true : false);
if (!(player.leftUp && (player.leftDown))) {
player.colLeft = true;
}
}
function getTile(x, y) {
return(this[(("t_" + Math.floor(y / tileH)) + "_") + Math.floor(x / tileW)]);
}
function gameover() {
score = 0;
lives = 3;
hearts = 3;
player.dead = false;
setLevel(0);
loadNextLevel();
fadeToBlack(false);
hud.hearts_mc.gotoAndStop((5 - hearts) + 1);
_root.gameStart();
}
var enemyCount = 0;
var mtCount = 0;
var msg_id = 0;
var gameover_b = false;
var msgs = Array("The poor Mr. Wong... he'll have to close his sushi bar if you can't bring back the food. He boxed his stuff already... But look! The pieces of sushi leave a trace! You'll find the thief for sure if you follow it!", "Looks like Mr. Wong has forgotten his toque. Jump on it to get higher!", "The ventilators on the ground are strong enough to twirl you and your enemies in the air. It seems like the henchmans of Delyus Honamon made it into Mr. Wong's storeroom!", "What's that?! A curious maelstrom... Maybe, it takes you into another dimension. Delyus Honamon certainly tried to escape into another world with the stolen sushi!", "Indeed! He did it! The evil sushi jacker Honamon has been successful in developing a technique to travel through the dimensions. Yummy! It looks delicious in here!", "These signs bode ill. Be careful!", "Another maelstrom! Now, it can't be far to Honamon's headd quarter. Let's go!", "You made it! You pierced into Delyus Honamon's labour. Now you're finally able to get the sushi!", "Delyus: \"Nooooo!!! Please don't do harm to me!! I'm so sorry!! I'll return Mr. Wong's sushi and apologize!!\"", "Delyus: \"Harharhar!!! You'll never beat me freak! Come and get me!! AAAAHAAHAHAAAAAAA!!!\"");
var endCam = 1;
}
Symbol 494 MovieClip [__Packages.Tile] Frame 0
class Tile
{
var id, name, game, clip, walkable, msg_read, msg_id;
function Tile (pId, n, g) {
id = pId;
name = n;
game = g;
clip = _root.tiles[name];
switch (id) {
case 0 :
case 2 :
case 3 :
case 4 :
case 5 :
case 12 :
case 13 :
case 14 :
case 16 :
case 17 :
case 18 :
case 19 :
case 20 :
case 23 :
case 24 :
case 28 :
case 29 :
case 30 :
case 31 :
case 36 :
case 37 :
case 38 :
case 39 :
case 40 :
case 41 :
case 42 :
walkable = true;
break;
case 15 :
walkable = true;
_root["enemy" + game.enemyCount] = new Enemy(game, game.enemyCount, clip._x / 32, clip._y / 32);
game.enemyCount++;
break;
case 21 :
case 26 :
walkable = true;
_root["mt" + game.mtCount] = new MovingTile(game, ((id == 21) ? 1 : -1), game.mtCount, "mt_Bar", clip._x / 32, clip._y / 32);
game.mtCount++;
break;
case 22 :
case 27 :
walkable = true;
_root["mt" + game.mtCount] = new MovingTile(game, ((id == 22) ? 2 : -2), game.mtCount, "mt_Bar", clip._x / 32, clip._y / 32);
game.mtCount++;
break;
case 25 :
walkable = true;
game.psx = clip._x / 32;
game.psy = clip._y / 32;
if (game.player != undefined) {
game.player.x = clip._x;
game.player.y = clip._y;
}
break;
case 35 :
walkable = true;
msg_read = false;
msg_id = game.msg_id;
game.msg_id++;
}
}
function action() {
switch (id) {
case 2 :
case 4 :
case 5 :
if (clip._alpha >= 100) {
game.score = game.score + 1;
}
clip.onEnterFrame = function () {
this._xscale = this._xscale * 1.2;
this._yscale = this._yscale * 1.2;
this._x = this._x - (this._xscale - (this._xscale / 1.2));
this._y = this._y - ((this._yscale - (this._yscale / 1.2)) / 1.5);
if (this._xscale > 120) {
this._alpha = this._alpha / 1.5;
}
if (this._alpha < 10) {
this.removeMovieClip();
}
};
id = 0;
this = null;
return;
case 3 :
case 28 :
var p = game.player;
if ((p.ySpeed > 0) && ((p.clip._y + p.ySpeed) > clip._y)) {
clip.jumper.gotoAndPlay("ouch");
with (p) {
falling = false;
jumping = true;
yspeed = -16;
}
}
return;
case 13 :
var p = game.player;
if ((p.ySpeed > -10) && (!p.dead)) {
p.ySpeed = p.ySpeed - 0.5;
p.falling = false;
p.jumping = true;
p.animate("jump");
}
return;
case 14 :
var p = game.player;
game.fadeToBlack(true);
p.spin = true;
p.x = clip._x + 16;
p.y = clip._y + 16;
return;
case 24 :
var p = game.player;
game.fadeToBlack(true);
p.spin = true;
return;
case 29 :
if (game.hearts < 5) {
if (clip._alpha >= 100) {
game.addHeart();
}
clip.onEnterFrame = function () {
this._xscale = this._xscale * 1.2;
this._yscale = this._yscale * 1.2;
this._x = this._x - ((this._xscale - (this._xscale / 1.2)) / 5);
this._y = this._y - ((this._yscale - (this._yscale / 1.2)) / 1.5);
if (this._xscale > 120) {
this._alpha = this._alpha / 1.5;
}
if (this._alpha < 10) {
this.removeMovieClip();
}
};
id = 0;
this = null;
}
return;
case 30 :
game.hearts = 1;
game.loseHeart();
return;
case 31 :
if (clip._alpha >= 100) {
game.addLive();
}
clip.onEnterFrame = function () {
this._xscale = this._xscale * 1.2;
this._yscale = this._yscale * 1.2;
this._x = this._x - ((this._xscale - (this._xscale / 1.2)) / 5);
this._y = this._y - ((this._yscale - (this._yscale / 1.2)) / 1.5);
if (this._xscale > 120) {
this._alpha = this._alpha / 1.5;
}
if (this._alpha < 10) {
this.removeMovieClip();
}
};
id = 0;
this = null;
return;
case 35 :
if (!msg_read) {
game.showNextMessage(msg_id);
msg_read = true;
}
return;
case 36 :
if (clip._alpha >= 100) {
game.score = game.score + 20;
}
clip.onEnterFrame = function () {
this._xscale = this._xscale * 1.2;
this._yscale = this._yscale * 1.2;
this._x = this._x - (this._xscale - (this._xscale / 1.2));
this._y = this._y - ((this._yscale - (this._yscale / 1.2)) / 1.5);
if (this._xscale > 120) {
this._alpha = this._alpha / 1.5;
}
if (this._alpha < 10) {
this.removeMovieClip();
}
};
id = 0;
this = null;
return;
case 37 :
var p = game.player;
if ((p.xSpeed > -10) && (!p.dead)) {
p.xSpeed = p.xSpeed - 0.5;
p.falling = false;
p.jumping = true;
p.animate("jump");
}
return;
case 38 :
var p = game.player;
if ((p.xSpeed < 10) && (!p.dead)) {
p.xSpeed = p.xSpeed + 0.5;
p.falling = false;
p.jumping = true;
p.animate("jump");
}
return;
case 41 :
case 42 :
_global.setTimeout(game.player, "hitSparks", 150);
}
}
function eAction(e) {
switch (id) {
case 13 :
if ((e.ySpeed > -10) && (!e.dead)) {
e.ySpeed = e.ySpeed - 1;
e.xSpeed = ((e.xSpeed > 0) ? 1 : -1);
e.jumping = true;
e.animate("jump");
}
break;
case 1 :
case 6 :
case 7 :
case 8 :
case 9 :
case 10 :
case 16 :
case 32 :
case 33 :
case 34 :
if ((e.xSpeed != 0) && (!e.potT)) {
e.wait(1500, "walk", e.xSpeed);
e.xSpeed = 0;
e.potT = true;
}
break;
case 17 :
if ((!e.potJ) && (e.xSpeed < 0)) {
_global.setTimeout(e, "jump", 500, e.ySpeed);
e.potJ = true;
}
break;
case 18 :
if ((!e.potJ) && (e.xSpeed > 0)) {
_global.setTimeout(e, "jump", 500, e.ySpeed);
e.potJ = true;
}
break;
case 19 :
if (!e.potJ) {
_global.setTimeout(e, "jump", 500, e.ySpeed);
e.potJ = true;
}
break;
case 20 :
if ((e.xSpeed != 0) && (!active)) {
e.lastWaitTile = this;
e.wait(1500, "walk", -e.xSpeed);
e.xSpeed = 0;
active = true;
}
break;
case 23 :
if ((e.dir != undefined) && (!e.potT)) {
_global.setTimeout(e, "turn", 1500, e.dir);
e.dir = 0;
e.potT = true;
}
break;
case 37 :
if ((e.xSpeed > -10) && (!e.dead)) {
e.xSpeed = e.xSpeed - 1;
e.jumping = true;
e.animate("jump");
}
break;
case 38 :
if (!((e.xSpeed < 10) && (!e.dead))) {
break;
}
e.xSpeed = e.xSpeed + 1;
e.jumping = true;
e.animate("jump");
}
}
var active = false;
}
Symbol 495 MovieClip [__Packages.Enemy] Frame 0
class Enemy
{
var clip, game, health, xTile, yTile, x, y, animation, dead, hitting, lastWaitTile, bc, bId;
function Enemy (g, id, xT, yT) {
_root.attachMovie("EnemyBoo", "enemy_mc" + id, _root.getNextHighestDepth());
clip = _root["enemy_mc" + id];
game = g;
health = (_root.difficult ? 5 : 3);
xTile = xT;
yTile = yT;
potJ = (potT = false);
x = (clip._x = 6 + (xTile * 32));
y = (clip._y = 17 + (yTile * 32));
if (Math.round(Math.random(2)) == 0) {
xSpeed = xSpeed * -1;
}
}
function animate(ani) {
if (animation != ani) {
animation = ani;
clip.gotoAndPlay(ani);
}
}
function loop() {
clip._x = x;
clip._y = y;
xTile = Math.floor(x / 32);
yTile = Math.floor(y / 32);
if (game.hud.blackScreen._alpha < 60) {
clip._visible = true;
} else {
clip._visible = false;
}
if ((((xSpeed == 0) && (!jumping)) && (!attacking)) && (!dead)) {
animate("stand");
}
if (((((xSpeed < 0) && (!jumping)) && (!attacking)) && (!waiting)) && (!dead)) {
animate("sneak");
clip._xscale = -100;
}
if (((((xSpeed > 0) && (!jumping)) && (!attacking)) && (!waiting)) && (!dead)) {
animate("sneak");
clip._xscale = 100;
}
ySpeed = ySpeed + 0.8;
if (ySpeed > 15) {
ySpeed = 15;
}
if (!dead) {
x = x + xSpeed;
}
y = y + ySpeed;
if (!getTile(x, y + 16).walkable) {
y = (yTile * 32) + 17;
ySpeed = 0;
}
if (ySpeed != 0) {
if ((!attacking) && (!dead)) {
animate("jump");
jumping = true;
}
} else {
jumping = false;
if ((!potT) && (!attacking)) {
xSpeed = ((xSpeed > 0) ? 0.6 : -0.6);
}
}
if (((getTile(x, y).id != 17) && (getTile(x, y).id != 18)) && (getTile(x, y).id != 19)) {
potJ = false;
}
var _local2 = game.player;
var _local3 = Math.abs(_local2.x - x);
var _local4 = Math.abs(_local2.y - y);
if ((((_local3 < 40) && (_local4 < 30)) && (!_local2.dead)) && (!dead)) {
attack();
}
getTile(x, y).eAction(this);
if ((clip._currentframe == 80) || ((waiting && (!hitting)) && (!attacking))) {
xSpeed = 0;
}
if (((((((_local3 < 30) && (_local4 < 30)) && (clip._currentframe >= 76)) && (clip._currentframe <= 80)) && (!_local2.dead)) && (!_local2.spin)) && (!dead)) {
_local2.hit();
}
if ((((_local3 < 35) && (_local4 < 30)) && ((_local2.slay_1 || (_local2.slay_2)) || (_local2.slay_3))) && (!dead)) {
if (((_local2.clip._xscale < 0) && (_local2.x > x)) || ((_local2.clip._xscale > 0) && (_local2.x < x))) {
if (_local2.slay_3) {
hit(3);
} else {
hit(1);
}
}
}
if (lastWaitTile.active && (getTile(x, y) != lastWaitTile)) {
lastWaitTile.active = false;
}
}
function getTile(x, y) {
return(_root.game[(("t_" + Math.floor(y / 32)) + "_") + Math.floor(x / 32)]);
}
function walk(s) {
if ((s != 0) && (!dead)) {
xSpeed = s;
potT = false;
waiting = false;
attacking = false;
}
}
function jump(t) {
if (!dead) {
xSpeed = ((xSpeed > 0) ? 1.8 : -1.8);
ySpeed = -8.5;
}
}
function attack() {
if ((!attacking) && (!hitting)) {
if ((((x - game.player.x) > 0) && (xSpeed > 0)) || (((x - game.player.x) < 0) && (xSpeed < 0))) {
xSpeed = xSpeed * -1.5;
clip._xscale = clip._xscale * -1;
}
attacking = true;
potT = false;
if (ySpeed > -5) {
ySpeed = -6;
}
var _local2 = -xSpeed;
xSpeed = ((xSpeed > 0) ? 1.5 : -1.5);
animate("attack");
wait(800, "walk", _local2);
}
}
function wait(t, a, oldSpeed) {
waiting = true;
_global.setTimeout(this, a, t, oldSpeed * -1);
}
function hit(times) {
if (!hitting) {
hitting = true;
health = health - times;
if (health <= 0) {
xSpeed = 0;
wait(300, "die");
}
bc = 0;
bId = _global.setInterval(this, "blink", 80);
if ((xSpeed != 0) && (getTile(x + 16, y).walkable)) {
var _local3 = ((xSpeed * (game.player.x > x)) ? -1 : 1);
xSpeed = ((game.player.x > x) ? -1.2 : 1.2);
wait(500, "walk", _local3);
}
if ((ySpeed <= 0) && (ySpeed > -1)) {
ySpeed = ySpeed - 4;
}
}
}
function die() {
dead = true;
jumping = false;
hitting = false;
attacking = false;
animate("die");
}
function blink(blinkInterval) {
bc++;
if (bc < 7) {
if (clip._alpha == 100) {
clip._alpha = 20;
} else {
clip._alpha = 100;
}
} else {
hitting = false;
_global.clearInterval(bId);
}
}
var xSpeed = -0.6;
var ySpeed = 0;
var jumping = false;
var attacking = false;
var waiting = false;
var potJ = false;
var potT = false;
}
Symbol 496 MovieClip [__Packages.MovingTile] Frame 0
class MovingTile
{
var clip, dir, game, xTile, yTile, x, y, potT;
function MovingTile (ga, d, id, g, xT, yT) {
_root.attachMovie(g, "movingtile_mc" + id, _root.getNextHighestDepth());
clip = _root["movingtile_mc" + id];
dir = d;
game = ga;
if ((game.cLevel >= 4) && (game.cLevel < 8)) {
clip.gotoAndStop(2);
}
xTile = xT;
yTile = yT;
x = (clip._x = (xTile * 32) + 2);
y = (clip._y = yTile * 32);
if ((d == 2) || (d == -2)) {
x = x + 29;
}
}
function loop() {
clip._x = x;
clip._y = y;
xTile = Math.floor(x / 32);
yTile = Math.floor(y / 32);
if (game.hud.blackScreen._alpha < 60) {
clip._visible = true;
} else {
clip._visible = false;
}
var _local2 = game.player;
switch (dir) {
case 0 :
xSpeed = 0;
ySpeed = 0;
break;
case 1 :
xSpeed = 2.5;
_local2.x = _local2.x + (adx * xSpeed);
break;
case -1 :
xSpeed = -2.5;
_local2.x = _local2.x + (adx * xSpeed);
break;
case 2 :
ySpeed = 2.5;
break;
case -2 :
ySpeed = -2.5;
}
x = x + xSpeed;
y = y + ySpeed;
getTile(x, y).eAction(this);
var _local4 = Math.abs(_local2.x - x);
var _local3 = y - _local2.y;
if ((((_local4 < 36) && (_local3 <= 18)) && (_local3 > 0)) && (_local2.ySpeed >= 0)) {
_local2.y = y - 16;
adx = 1;
_local2.ySpeed = 0;
_local2.jumping = false;
_local2.falling = false;
_local2.jspeed = 1;
} else {
adx = 0;
}
}
function getTile(x, y) {
return(_root.game[(("t_" + Math.floor(y / 32)) + "_") + Math.floor(x / 32)]);
}
function turn(oDir) {
potT = false;
dir = oDir * -1;
}
function walk(oDir) {
dir = -1 * oDir;
}
var xSpeed = 0;
var ySpeed = 0;
var adx = 0;
var dead = true;
}