Section 1
//BitmapScroller (se.mazapan.BitmapScroller)
package se.mazapan {
import flash.display.*;
import flash.geom.*;
public class BitmapScroller extends BitmapData {
private var worldX:int;
private var worldY:int;
private var texture:BitmapData;
private var tileWidth:uint;
private var screenH:uint;
private var map:Array;
private var screenW:uint;
private var maxX:int;
private var tileHeight:uint;
private var maxY:int;
public function BitmapScroller(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint){
super(_arg1, _arg2, false);
this.screenW = _arg1;
this.screenH = _arg2;
this.tileWidth = _arg3;
this.tileHeight = _arg4;
}
public function setMap(_arg1:Array, _arg2:BitmapData, _arg3:int=0, _arg4:int=0):void{
this.map = _arg1;
maxX = ((_arg1[0].length * tileWidth) - screenW);
maxY = ((_arg1.length * tileHeight) - screenH);
setTexture(_arg2);
moveTo(_arg3, _arg4);
}
public function moveTo(_arg1:int, _arg2:int):void{
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg2 < 0){
_arg2 = 0;
};
if (_arg1 >= maxX){
_arg1 = maxX;
};
if (_arg2 >= maxY){
_arg2 = maxY;
};
worldX = _arg1;
worldY = _arg2;
plot(0, 0, screenW, screenH);
}
public function getX():int{
return (worldX);
}
public function getY():int{
return (worldY);
}
override public function scroll(_arg1:int, _arg2:int):void{
if ((worldX + _arg1) < 0){
_arg1 = -(worldX);
} else {
if ((worldX + _arg1) > maxX){
_arg1 = (maxX - worldX);
};
};
if ((worldY + _arg2) < 0){
_arg2 = -(worldY);
} else {
if ((worldY + _arg2) > maxY){
_arg2 = (maxY - worldY);
};
};
if ((((_arg1 == 0)) && ((_arg2 == 0)))){
return;
};
worldX = (worldX + _arg1);
worldY = (worldY + _arg2);
super.scroll(-(_arg1), -(_arg2));
if (_arg1 > 0){
plot((screenW - _arg1), 0, screenW, screenH);
} else {
plot(0, 0, -(_arg1), screenH);
};
if (_arg2 > 0){
plot(0, (screenH - _arg2), screenW, screenH);
} else {
plot(0, 0, screenW, -(_arg2));
};
}
public function setTexture(_arg1:BitmapData):void{
texture = _arg1;
}
public function refresh():void{
plot(0, 0, screenW, screenH);
}
private function plot(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{
var _local5:Rectangle;
var _local6:Point;
var _local7:BitmapData;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:int;
_local5 = new Rectangle(0, 0, 1, 1);
_local6 = new Point(0, 0);
_local7 = texture;
_local8 = 0;
_local9 = 0;
_local10 = 0;
_local11 = 0;
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = 0;
_local17 = 0;
_local18 = 0;
_local14 = tileWidth;
_local15 = tileHeight;
_local18 = worldX;
_local17 = int((_local7.width / _local14));
_local11 = ((worldY + _arg2) % _local15);
_local13 = int(((_arg2 + worldY) / _local15));
lock();
_local9 = _arg2;
while (_local9 < _arg4) {
_local12 = int(((_arg1 + _local18) / _local14));
_local10 = ((_local18 + _arg1) % _local14);
_local8 = _arg1;
while (_local8 < _arg3) {
_local6.x = _local8;
_local6.y = _local9;
_local16 = map[_local13][_local12];
_local5.x = (((_local16 % _local17) * _local14) + _local10);
_local5.y = ((int((_local16 / _local17)) * _local15) + _local11);
_local5.width = (_local14 - _local10);
_local5.height = (_local15 - _local11);
_local8 = (_local8 - _local10);
_local9 = (_local9 - _local11);
_local11 = 0;
_local10 = _local11;
copyPixels(_local7, _local5, _local6);
_local8 = (_local8 + _local14);
_local12++;
};
_local9 = (_local9 + _local15);
_local13++;
};
unlock();
}
}
}//package se.mazapan
Section 2
//SoundHolder_20 (Spoiler_fla.SoundHolder_20)
package Spoiler_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.geom.*;
import flash.xml.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
public dynamic class SoundHolder_20 extends MovieClip {
public function SoundHolder_20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Spoiler_fla
Section 3
//Axe (Axe)
package {
public class Axe extends Bullet {
private var dir:int;
private var monster:Monster;
public function Axe(_arg1:BulletHandler, _arg2:Map, _arg3:Monster, _arg4:int, _arg5:int, _arg6:EffectHandler, _arg7:int, _arg8:Number){
super(_arg1, _arg2, null, _arg4, _arg5, _arg6);
this.monster = _arg3;
this.dir = _arg7;
_vx = ((8 * _arg7) + _arg8);
_vy = -10;
}
override public function main(_arg1:int, _arg2:int):void{
_x = (_x + _vx);
_y = (_y + _vy);
_vy = (_vy + 2);
_vx = (_vx * 0.98);
rotation = (rotation + (dir * 45));
x = (int(_x) - _arg1);
y = (int(_y) - _arg2);
if (((!((monster == null))) && (monster.pointInside(_x, _y)))){
monster.takeDamage(this);
bulletHandler.removeBullet(this);
return;
};
if (!map.isWalkable((_x >> 5), (_y >> 5))){
bulletHandler.removeBullet(this);
};
}
}
}//package
Section 4
//Bullet (Bullet)
package {
import flash.display.*;
public class Bullet extends MovieClip {
protected var _x:Number;
protected var _y:Number;
protected var map:Map;
protected var _vy:Number;
protected var _vx:Number;
protected var effectHandler:EffectHandler;
private var time:int;
protected var player:Player;
protected var bulletHandler:BulletHandler;
protected static const SPEED:int = 6;
public function Bullet(_arg1:BulletHandler, _arg2:Map, _arg3:Player, _arg4:int, _arg5:int, _arg6:EffectHandler){
var _local7:Number;
var _local8:Number;
var _local9:Number;
super();
this.bulletHandler = _arg1;
this.effectHandler = _arg6;
this.map = _arg2;
this.player = _arg3;
if (_arg3 != null){
_local7 = ((_arg3.getX() + (_arg3.getWidth() / 2)) - _arg4);
_local8 = ((_arg3.getY() + (_arg3.getHeight() / 2)) - _arg5);
_local9 = Math.max(1, Math.sqrt(((_local7 * _local7) + (_local8 * _local8))));
_vx = ((_local7 / _local9) * SPEED);
_vy = ((_local8 / _local9) * SPEED);
};
_x = _arg4;
_y = _arg5;
this.x = (this.y = -999);
}
public function main(_arg1:int, _arg2:int):void{
_x = (_x + _vx);
_y = (_y + _vy);
x = (int(_x) - _arg1);
y = (int(_y) - _arg2);
if (player.pointInside(_x, _y)){
player.takeDamage(this);
bulletHandler.removeBullet(this);
return;
};
if (time++ > 70){
bulletHandler.removeBullet(this);
effectHandler.addEffect(new Smoke(), _x, _y);
};
}
}
}//package
Section 5
//BulletHandler (BulletHandler)
package {
import flash.display.*;
public class BulletHandler extends Sprite {
private var list:Array;
public function BulletHandler(){
list = [];
}
public function addBullet(_arg1:Bullet):void{
list.push(_arg1);
addChild(_arg1);
}
public function remove():void{
var _local1:Bullet;
for each (_local1 in list) {
removeBullet(_local1);
};
}
public function removeBullet(_arg1:Bullet):Boolean{
var _local2:int;
_local2 = 0;
while (_local2 < list.length) {
if (list[_local2] == _arg1){
removeChild(_arg1);
_arg1 = null;
list.splice(_local2, 1);
return (true);
};
_local2++;
};
return (false);
}
public function main(_arg1:int, _arg2:int):void{
var _local3:int;
_local3 = 0;
while (_local3 < list.length) {
list[_local3].main(_arg1, _arg2);
_local3++;
};
}
}
}//package
Section 6
//Chandelier (Chandelier)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.geom.*;
import flash.xml.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
public dynamic class Chandelier extends MovieClip {
public function Chandelier(){
addFrameScript(0, frame1, 55, frame56);
}
function frame1(){
stop();
}
function frame56(){
stop();
}
}
}//package
Section 7
//Cinematic (Cinematic)
package {
import flash.display.*;
public class Cinematic {
private var burnUp:Boolean;
private var burnDown:Boolean;
private var chandelierFall:Boolean;
private var monster:Monster;
private var map:Map;
private var chandelierVy:Number;
private var player:Player;
private var burnRope:Boolean;
private var burnY:int;
private var imageHandler:ImageHandler;
private var burnTimer:int;
private var effectHandler:EffectHandler;
private var chandelier:Image;
public function Cinematic(_arg1:Image, _arg2:Map, _arg3, _arg4:EffectHandler, _arg5:Monster, _arg6:Player){
this.chandelier = _arg1;
this.map = _arg2;
this.imageHandler = _arg3;
this.effectHandler = _arg4;
this.monster = _arg5;
this.player = _arg6;
}
public function main():void{
var _local1:int;
var _local2:*;
var _local3:int;
var _local4:Number;
var _local5:Number;
if (burnRope){
burnTimer++;
_local1 = 5;
if ((burnTimer % _local1) == 0){
_local2 = (int((burnTimer / _local1)) * 14);
if (burnUp){
if (map.isWalkable(132, ((burnY - _local2) >> 5))){
effectHandler.addEffect(new Smoke(), ((132 * 32) + 16), (burnY - _local2));
} else {
burnUp = false;
};
};
if (burnDown){
if (((burnY + _local2) >> 5) <= 10){
effectHandler.addEffect(new Smoke(), ((132 * 32) + 16), (burnY + _local2));
} else {
burnDown = false;
};
};
if (((!(burnUp)) && (!(burnDown)))){
burnRope = false;
(chandelier.mc as MovieClip).gotoAndPlay("done");
chandelierFall = true;
chandelierVy = 0;
monster.goAndDie();
} else {
new SoundBurn().play();
};
};
};
if (chandelierFall){
chandelierVy = (chandelierVy + 0.6);
if (chandelierVy > 32){
chandelierVy = 32;
};
chandelier.y = (chandelier.y + chandelierVy);
if (chandelier.y > (15 << 5)){
chandelierFall = false;
_local3 = 0;
while (_local3 < 20) {
_local4 = ((Math.random() * Math.PI) * 2);
_local5 = ((Math.random() * 32) * 4);
effectHandler.addEffect(new Smoke(), (((132 * 32) + 16) + int((Math.cos(_local4) * _local5))), (((21 * 32) + 16) + int((Math.sin(_local4) * _local5))));
_local3++;
};
new SoundExplosionBig().play();
imageHandler.removeImage(chandelier);
chandelier = null;
monster.die();
monster = null;
};
};
}
public function burnRopeAt(_arg1:int):void{
burnY = _arg1;
burnTimer = 0;
burnRope = true;
burnUp = true;
burnDown = true;
(chandelier.mc as MovieClip).play();
}
}
}//package
Section 8
//Creature (Creature)
package {
import flash.display.*;
public class Creature extends MovieClip {
protected var _y:Number;
protected var map:Map;
protected var _vy:Number;
protected var _vx:Number;
protected var _height:uint;
private var animation:String;
protected var _width:uint;
protected var _x:Number;
public function Creature(_arg1:Map){
this.map = _arg1;
_x = (_y = (_vx = (_vy = 0)));
_width = (_height = 30);
x = (y = -999);
animation = "";
}
public function getWidth():uint{
return (_width);
}
public function moveTo(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
}
public function getHeight():uint{
return (_height);
}
public function touch(_arg1:Creature, _arg2:int=0):Boolean{
var _local3:Number;
var _local4:Number;
_local3 = ((_x + (_width / 2)) - (_arg1.getX() + (_arg1.getWidth() / 2)));
_local4 = ((_y + (_height / 2)) - (_arg1.getY() + (_arg1.getHeight() / 2)));
return ((((Math.abs(_local3) <= (((_width + _arg1.getWidth()) / 2) + _arg2))) && ((Math.abs(_local4) <= (((_height + _arg1.getHeight()) / 2) + _arg2)))));
}
protected function hitRight():void{
}
protected function setAnimation(_arg1:String):void{
if (_arg1 != animation){
animation = _arg1;
gotoAndStop(_arg1);
};
}
protected function hitUp():void{
}
public function pointInside(_arg1:int, _arg2:int):Boolean{
return (!((((((((_arg1 < _x)) || ((_arg2 < _y)))) || ((_arg1 > (_x + _width))))) || ((_arg2 > (_y + _height))))));
}
protected function hitLeft():void{
}
public function getY():Number{
return (_y);
}
public function getX():Number{
return (_x);
}
public function main(_arg1:int, _arg2:int):void{
x = (Math.round(wx) - _arg1);
y = (Math.round(wy) - _arg2);
}
protected function hitDown():void{
}
protected function move():void{
var _local1:Boolean;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
if (_vx > 0){
_local1 = false;
_local2 = (int((((_x + _width) - 1) / 32)) + 1);
_local3 = int(((_y + 1) / 32));
_local5 = int((((_y + _height) - 1) / 32));
while (_local3 <= _local5) {
if (!map.isWalkable(_local2, _local3)){
_local1 = true;
break;
};
_local3++;
};
if (_local1){
_local6 = (_local2 * 32);
if (((_x + _width) + _vx) > _local6){
hitRight();
_vx = ((_local6 - _x) - _width);
};
};
} else {
if (_vx < 0){
_local1 = false;
_local2 = (int(((_x + 1) / 32)) - 1);
_local3 = int(((_y + 1) / 32));
_local5 = int((((_y + _height) - 1) / 32));
while (_local3 <= _local5) {
if (!map.isWalkable(_local2, _local3)){
_local1 = true;
break;
};
_local3++;
};
if (_local1){
_local6 = ((_local2 + 1) * 32);
if ((_x + _vx) < _local6){
hitLeft();
_vx = (_local6 - _x);
};
};
};
};
_x = (_x + _vx);
if (_vy > 0){
_local1 = false;
_local3 = (int((((_y + _height) - 1) / 32)) + 1);
_local2 = int(((_x + 1) / 32));
_local4 = int((((_x + _width) - 1) / 32));
while (_local2 <= _local4) {
if (!map.isWalkable(_local2, _local3)){
_local1 = true;
break;
};
_local2++;
};
if (_local1){
_local7 = (_local3 * 32);
if (((_y + _height) + _vy) > _local7){
hitDown();
_vy = ((_local7 - _y) - _height);
};
};
} else {
if (_vy < 0){
_local1 = false;
_local3 = (int(((_y + 1) / 32)) - 1);
_local2 = int(((_x + 1) / 32));
_local4 = int((((_x + _width) - 1) / 32));
while (_local2 <= _local4) {
if (!map.isWalkable(_local2, _local3)){
_local1 = true;
break;
};
_local2++;
};
if (_local1){
_local7 = ((_local3 + 1) * 32);
if ((_y + _vy) < _local7){
hitUp();
_vy = (_local7 - _y);
};
};
};
};
_y = (_y + _vy);
}
}
}//package
Section 9
//EffectHandler (EffectHandler)
package {
import flash.display.*;
public class EffectHandler extends Sprite {
private var list:Array;
public function EffectHandler(){
list = [];
}
public function clear():void{
var _local1:EffectHolder;
for each (_local1 in list) {
_local1.mc.stop();
removeChild(_local1.mc);
};
list = [];
}
public function addEffect(_arg1:MovieClip, _arg2:int, _arg3:int, _arg4:int=0):void{
list.push(new EffectHolder(_arg1, _arg2, _arg3, _arg4));
addChild(_arg1);
}
public function main(_arg1:int, _arg2:int):void{
var _local3:EffectHolder;
var _local4:int;
_local4 = (list.length - 1);
while (_local4 >= 0) {
_local3 = list[_local4];
if (++_local3.timer == _local3.maxTimer){
_local3.mc.stop();
removeChild(_local3.mc);
list.splice(_local4, 1);
} else {
_local3.mc.x = (_local3.x - _arg1);
_local3.mc.y = (_local3.y - _arg2);
};
_local4--;
};
}
}
}//package
Section 10
//EffectHolder (EffectHolder)
package {
import flash.display.*;
public class EffectHolder {
public var timer:int;
public var maxTimer:int;
public var mc:MovieClip;
public var x:int;
public var y:int;
public function EffectHolder(_arg1:MovieClip, _arg2:int, _arg3:int, _arg4:int){
this.mc = _arg1;
this.x = _arg2;
this.y = _arg3;
this.timer = 0;
if (_arg4 > 0){
this.maxTimer = _arg4;
} else {
this.maxTimer = _arg1.totalFrames;
};
mc.x = (mc.y = -999);
}
}
}//package
Section 11
//Ending (Ending)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.geom.*;
import flash.xml.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
public dynamic class Ending extends MovieClip {
public function Ending(){
addFrameScript(4119, frame4120);
}
function frame4120(){
stop();
}
}
}//package
Section 12
//Fire (Fire)
package {
import flash.display.*;
public dynamic class Fire extends MovieClip {
}
}//package
Section 13
//Image (Image)
package {
import flash.display.*;
public class Image {
public var added:Boolean;
public var width:int;
public var height:int;
public var mc:Sprite;
public var x:int;
public var y:int;
public function Image(_arg1:Sprite=null, _arg2:int=0, _arg3:int=0, _arg4:int=0, _arg5:int=0){
this.mc = _arg1;
this.x = _arg2;
this.y = _arg3;
this.width = _arg4;
this.height = _arg5;
}
}
}//package
Section 14
//ImageHandler (ImageHandler)
package {
import flash.display.*;
import flash.geom.*;
public class ImageHandler extends Sprite {
private var list:Array;
public function ImageHandler(){
list = [];
scrollRect = new Rectangle(0, 0, 700, 500);
}
public function removeImage(_arg1:Image):void{
var _local2:int;
_local2 = 0;
while (_local2 < list.length) {
if (list[_local2] == _arg1){
if (contains(list[_local2].mc)){
removeChild(list[_local2].mc);
};
list[_local2] = null;
list.splice(_local2, 1);
return;
};
_local2++;
};
}
public function addImage(_arg1:Image):void{
list.push(_arg1);
}
public function remove():void{
var _local1:Image;
for each (_local1 in list) {
removeImage(_local1);
};
}
public function main(_arg1:int, _arg2:int):void{
var _local3:Boolean;
var _local4:Image;
for each (_local4 in list) {
if (_local4.mc != null){
_local3 = !((((_local4.x > (_arg1 + 700))) || (((_local4.x + _local4.width) < _arg1))));
if (_local3){
if (((!(_local4.added)) && (!(contains(_local4.mc))))){
addChild(_local4.mc);
_local4.added = true;
};
_local4.mc.x = (_local4.x - _arg1);
_local4.mc.y = (_local4.y - _arg2);
} else {
if (((_local4.added) && (contains(_local4.mc)))){
removeChild(_local4.mc);
_local4.added = false;
};
};
};
};
}
}
}//package
Section 15
//ImpactSmoke (ImpactSmoke)
package {
import flash.display.*;
public dynamic class ImpactSmoke extends MovieClip {
}
}//package
Section 16
//Lifebar (Lifebar)
package {
import flash.display.*;
public class Lifebar extends MovieClip {
private var dying:Boolean;
private var value:Number;
public function Lifebar(){
visible = false;
value = 100;
stop();
}
public function activate():void{
visible = true;
}
public function setEmpty():void{
dying = true;
}
public function main():void{
if (dying){
gotoAndStop((1000 - int((value * 10))));
value = (value * 0.9);
} else {
gotoAndStop((1000 - int((value * 10))));
if (value < 100){
value = (value + ((100 - value) * 0.03));
if (value > 100){
value = 100;
};
if (value < 25){
value = 25;
};
};
};
}
public function takeDamage():void{
value = (value - 1);
}
}
}//package
Section 17
//Map (Map)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.xml.*;
public class Map extends EventDispatcher {
private const GRAPHICS_DIRECTORY = "data/";
private const MAP_DIRECTORY = "data/";
private const MAP_SUFFIX = ".map";
private var loaded:Boolean;
private var textureLoader:Loader;
private var loader:URLLoader;
private var texture:BitmapData;
private var loadingInProgress:Boolean;
private var height:int;
private var walkable:Array;
private var map:Array;
private var width:int;
public function Map(){
loader = new URLLoader();
textureLoader = new Loader();
loader.addEventListener(Event.COMPLETE, loadedHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
textureLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, textureLoaded);
textureLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
walkable = [true, true, true, false, false, false, true, false, true, true, true, true];
}
public function getWholeMap():Array{
return (map);
}
public function getWidth():int{
return (width);
}
public function isWalkable(_arg1:int, _arg2:int):Boolean{
if (!loaded){
return (true);
};
if (isWithinMap(_arg1, _arg2)){
return (walkable[map[_arg2][_arg1]]);
};
return (true);
}
private function loadTexture(_arg1:String):void{
textureLoader.load(new URLRequest((GRAPHICS_DIRECTORY + _arg1)));
}
public function load(_arg1:String):void{
loadingInProgress = false;
loaded = true;
texture = new Tilesheet(96, 128);
map = [[7, 7, 7, 4, 1, 1, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 3, 1, 1, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,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7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]];
width = map[0].length;
height = map.length;
}
public function isWithinMap(_arg1:int, _arg2:int):Boolean{
return (!((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= width)))) || ((_arg2 >= height)))));
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
trace(("Map.as fock " + _arg1.toString()));
}
public function getHeight():int{
return (height);
}
private function textureLoaded(_arg1:Event):void{
texture = Bitmap(_arg1.target.loader.content).bitmapData;
dispatchEvent(new Event(Event.COMPLETE));
}
public function getTile(_arg1:int, _arg2:int):int{
if (loaded){
return (map[_arg2][_arg1]);
};
return (0);
}
public function getTexture():BitmapData{
if (!loaded){
return (null);
};
return (texture);
}
private function loadedHandler(_arg1:Event):void{
var _local2:XMLDocument;
var _local3:int;
var _local4:Array;
var _local5:XMLNode;
loadingInProgress = false;
loaded = true;
_local2 = new XMLDocument();
_local2.ignoreWhite = true;
_local2.parseXML(loader.data);
map = [];
_local3 = 0;
for each (_local5 in _local2.firstChild.childNodes) {
if (_local5.nodeName == "row"){
_local4 = _local5.childNodes[0].nodeValue.split(",");
map[_local3] = _local4;
width = _local4.length;
_local3++;
};
};
height = _local3;
loadTexture(_local2.firstChild.attributes.tilesheet);
}
}
}//package
Section 18
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 19
//Monster (Monster)
package {
import flash.media.*;
public class Monster extends Creature {
private var timeToDie:Boolean;
private var dying:Boolean;
private var timer:int;
private var maxTimer:int;
private var cooldown:int;
private var onFloor:Boolean;
private var effectHandler:EffectHandler;
private var direction:int;
private var state:int;
private var lifebar:Lifebar;
private var attackSound:Sound;
private var dieTimer:int;
private var player:Player;
private var bulletHandler:BulletHandler;
private var spoiler:Spoiler;
public function Monster(_arg1:Spoiler, _arg2:Map, _arg3:Player, _arg4:BulletHandler, _arg5:EffectHandler, _arg6:Lifebar){
super(_arg2);
this.spoiler = _arg1;
this.player = _arg3;
this.bulletHandler = _arg4;
this.effectHandler = _arg5;
this.lifebar = _arg6;
_x = (125 << 5);
_y = (19 << 5);
_width = (6 << 5);
_height = (8 << 5);
onFloor = false;
setDirection(-1);
attackSound = new SoundMonsterAttack();
setAnimation("stand");
}
public function goAndDie():void{
timeToDie = true;
}
private function setDirection(_arg1:int):void{
if (direction != _arg1){
scaleX = (direction = _arg1);
};
}
override protected function hitRight():void{
state = 2;
}
public function die():void{
dying = true;
dieTimer = 0;
lifebar.setEmpty();
}
override protected function hitUp():void{
_vy = 0;
}
override protected function hitLeft():void{
state = 2;
}
override public function main(_arg1:int, _arg2:int):void{
var _local3:int;
var _local4:int;
var _local5:Number;
var _local6:Number;
if (dying){
dieTimer++;
_local3 = 0;
if (dieTimer > (30 * 3)){
_local3 = 20;
new SoundExplosionBig().play(0, 0, new SoundTransform(Music.FX_VOLUME));
spoiler.monsterIsDead();
} else {
if ((dieTimer % 10) == 0){
_local3 = 1;
new SoundExplosionSmall().play(0, 0, new SoundTransform(Music.FX_VOLUME));
};
};
_local4 = 0;
while (_local4 < _local3) {
_local5 = ((Math.random() * Math.PI) * 2);
_local6 = ((Math.random() * 32) * 4);
effectHandler.addEffect(new Smoke(), ((_x + (_width / 2)) + int((Math.cos(_local5) * _local6))), ((_y + (_height / 2)) + int(((Math.sin(_local5) * _local6) * 1.5))));
_local4++;
};
} else {
ai();
};
_vx = (_vx * 0.6);
if (_vy > 32){
_vy = 32;
};
onFloor = false;
move();
if (dying){
setDirection(1);
setAnimation("dying");
} else {
if (cooldown > 0){
setAnimation("attack");
} else {
if (((((player.getY() + player.getHeight()) < _y)) && ((Math.abs(((player.getX() + (player.getWidth() / 2)) - (_x + (_width / 2)))) < (Math.abs(((player.getY() + (player.getHeight() / 2)) - (_y + (_height * 0.3)))) * 0.75))))){
setDirection(1);
setAnimation("lookUp");
} else {
if (Math.abs(_vx) > 1){
setAnimation("walk");
} else {
setAnimation("stand");
};
};
};
};
x = ((int(_x) - _arg1) + (_width / 2));
y = (int(_y) - _arg2);
}
public function ai():void{
var _local1:Boolean;
var _local2:Number;
var _local3:Number;
timer++;
if (timer > maxTimer){
timer = 0;
state = int((Math.random() * 3));
};
_local1 = Boolean((((((player.getY() > (10 << 5))) && ((player.getX() > (114 << 5))))) && ((player.getX() < (150 << 5)))));
if (cooldown > 0){
cooldown--;
};
if (((_local1) && (!(timeToDie)))){
switch (state){
case 0:
if (cooldown == 0){
bulletHandler.addBullet(new Bullet(bulletHandler, map, player, ((_x + (_width / 2)) + (direction * 80)), (_y + 120), effectHandler));
cooldown = 5;
attackSound.play(0, 0, new SoundTransform(Music.FX_VOLUME));
};
maxTimer = 30;
break;
case 1:
_local2 = ((player.getX() + (player.getWidth() / 2)) - (_x + (_width / 2)));
if (Math.abs(_local2) > 10){
_vx = (_vx + ((_local2 < 0)) ? -3 : 3);
};
maxTimer = 100;
break;
case 2:
maxTimer = 30;
};
} else {
if (((timeToDie) || ((((player.getX() > (114 << 5))) && ((player.getX() < (150 << 5))))))){
_local3 = (((132 * 32) + 16) - (_x + (_width / 2)));
if (Math.abs(_local3) > 15){
_vx = (_vx + ((_local3 < 0)) ? -3 : 3);
};
};
};
setDirection((((player.getX() + (player.getWidth() / 2)) < (_x + (_width / 2)))) ? -1 : 1);
if (((player.touch(this)) && (!(dying)))){
player.takeDamage(this);
};
}
override protected function hitDown():void{
onFloor = true;
_vy = 0;
}
public function takeDamage(_arg1:Object):void{
lifebar.takeDamage();
new SoundTakeDamage().play(0, 0, new SoundTransform(Music.FX_VOLUME));
}
}
}//package
Section 20
//Music (Music)
package {
import flash.media.*;
public class Music {
private const SECONDS_OF_CROSSFADE:int = 3;
private var hasChangedToScary:Boolean;
private var caveScary:Sound;
private var startFirstMusic:Boolean;
private var caveNormal:Sound;
private var channelA:SoundChannel;
private var channelB:SoundChannel;
private var player:Player;
private var crossfadeTimer:Number;
private var creditsMusic:Sound;
private var bossMusic:Sound;
private var crossfade:Boolean;
public static const FX_VOLUME:Number = 0.4;
public function Music(_arg1:Player){
this.player = _arg1;
caveNormal = new MusicCaveNormal();
caveScary = new MusicCaveScary();
bossMusic = new MusicBoss();
startFirstMusic = true;
}
public function stop():void{
if (channelA != null){
channelA.stop();
channelA = null;
};
if (channelB != null){
channelB.stop();
channelB = null;
};
}
public function playCredits():void{
stop();
}
public function startBossMusic():void{
stop();
channelA = bossMusic.play(0, int.MAX_VALUE);
}
public function main():void{
if (((startFirstMusic) && (((player.getX() >> 5) > 6)))){
startFirstMusic = false;
channelA = caveNormal.play(0, int.MAX_VALUE);
};
if (((!(hasChangedToScary)) && ((((player.getY() + (player.getHeight() / 2)) >> 5) > 17)))){
hasChangedToScary = true;
channelB = caveScary.play(0, int.MAX_VALUE);
channelB.soundTransform.volume = 0;
crossfade = true;
crossfadeTimer = 0;
};
if (crossfade){
crossfadeTimer = (crossfadeTimer + (1 / (30 * SECONDS_OF_CROSSFADE)));
if (crossfadeTimer > 1){
crossfadeTimer = 1;
};
channelA.soundTransform = new SoundTransform((int((((1 - crossfadeTimer) * 100) + 0.5)) / 100));
channelB.soundTransform = new SoundTransform((int(((crossfadeTimer * 100) + 0.5)) / 100));
if (crossfadeTimer == 1){
channelA.stop();
channelA = null;
crossfade = false;
};
};
}
}
}//package
Section 21
//MusicBoss (MusicBoss)
package {
import flash.media.*;
public dynamic class MusicBoss extends Sound {
}
}//package
Section 22
//MusicCaveNormal (MusicCaveNormal)
package {
import flash.media.*;
public dynamic class MusicCaveNormal extends Sound {
}
}//package
Section 23
//MusicCaveScary (MusicCaveScary)
package {
import flash.media.*;
public dynamic class MusicCaveScary extends Sound {
}
}//package
Section 24
//Player (Player)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.ui.*;
public class Player extends Creature {
private const HURT_TIME:int = 80;
private const BURN_TIME:int = 900;
private const PARALYZED_TIME:int = 40;
private var hurt:Boolean;
private var attackKeyDown:Boolean;
public var fireMc:MovieClip;
private var hurtTimer:int;
private var effectHandler:EffectHandler;
private var fireTimer:int;
private var ropeBurnt:Boolean;
private var onFire:Boolean;
private var keyRight:Boolean;
private var keyLeft:Boolean;
private var fires:Array;
private var jumpVelocity:Number;
private var keyUp:Boolean;
private var cooldown:int;
private var onFloor:Boolean;
private var direction:int;
private var jumpCount:int;
private var keyAttack:Boolean;
private var jumpKeyDown:Boolean;
private var keyDown:Boolean;
private var spoiler:Spoiler;
private var monster:Monster;
private var bulletHandler:BulletHandler;
public function Player(_arg1:Spoiler, _arg2:Map, _arg3:EffectHandler, _arg4:BulletHandler){
fires = [[109, 9], [111, 14], [109, 19], [155, 9], [153, 14], [155, 19]];
super(_arg2);
this.effectHandler = _arg3;
this.bulletHandler = _arg4;
this.spoiler = _arg1;
_x = ((4 << 5) + 15);
_y = (4 << 5);
_width = 30;
_height = 30;
direction = 1;
setAnimation("stand");
fireMc.visible = false;
}
override protected function hitDown():void{
if (_vy == 32){
effectHandler.addEffect(new ImpactSmoke(), (_x + _width), ((((_y + _height) >> 5) + 1) << 5));
new SoundFallHit().play(0, 0, new SoundTransform(Music.FX_VOLUME));
fireTimer = 0;
};
_vy = 0;
onFloor = true;
jumpCount = 0;
}
public function takeDamage(_arg1:Object):void{
var _local2:Boolean;
if (!hurt){
hurt = true;
hurtTimer = (HURT_TIME + PARALYZED_TIME);
if ((_arg1 is Monster)){
_local2 = Boolean(((_arg1.getX() + (_arg1.getWidth() / 2)) < (_x + (_width / 2))));
_vx = (_vx + (_local2) ? 90 : -90);
_vy = (_vy + ((Math.random() - 0.5) * 30));
setDirection((_local2) ? -1 : 1);
} else {
if (_vy > -15){
_vy = (_vy - 15);
};
};
new SoundTakeDamage().play(0, 0, new SoundTransform(Music.FX_VOLUME));
fireTimer = 0;
};
}
public function setMonster(_arg1:Monster):void{
monster = _arg1;
}
private function setDirection(_arg1:int):void{
if (direction != _arg1){
scaleX = (direction = _arg1);
};
}
override protected function hitUp():void{
jumpVelocity = 0;
_vy = 0;
}
override public function main(_arg1:int, _arg2:int):void{
var _local3:Boolean;
var _local4:int;
var _local5:int;
var _local6:int;
if (hurt){
hurtTimer--;
visible = Boolean(((int((hurtTimer / 5)) % 2) == 0));
if (hurtTimer == 0){
visible = true;
hurt = false;
};
};
_local3 = ((hurt) && ((hurtTimer > HURT_TIME)));
if (onFire){
fireTimer--;
if (fireTimer <= 0){
fireTimer = 0;
onFire = false;
fireMc.visible = false;
};
};
_local4 = ((_x + (_width / 2)) >> 5);
_local5 = ((_y + (_height / 2)) >> 5);
for (_local6 in fires) {
if ((((fires[_local6][0] == _local4)) && ((fires[_local6][1] == _local5)))){
if (!onFire){
new SoundBurn().play(0, 0, new SoundTransform(Music.FX_VOLUME));
};
onFire = true;
fireTimer = BURN_TIME;
fireMc.visible = true;
break;
};
};
if (((((((((onFire) && (!(ropeBurnt)))) && (((((_x + (_width / 2)) + (20 * direction)) >> 5) == 132)))) && ((_local5 >= 6)))) && ((_local5 <= 9)))){
fireTimer = 0;
ropeBurnt = true;
spoiler.burnRopeAt((_y + 5));
};
if (((!(hurt)) || ((hurtTimer < HURT_TIME)))){
_vx = (_vx + ((keyRight * 5) - (5 * keyLeft)));
if (((!(keyLeft)) && (keyRight))){
setDirection(1);
};
if (((keyLeft) && (!(keyRight)))){
setDirection(-1);
};
};
_vx = (_vx * 0.6);
_vy = (_vy + 1.5);
if (_local3){
setAnimation("hurt");
} else {
if (cooldown > 0){
setAnimation("attack");
} else {
if (onFloor){
if (Math.abs(_vx) < 1){
setAnimation("stand");
} else {
setAnimation("walk");
};
} else {
if (_vy < 0){
setAnimation("jump");
} else {
setAnimation("fall");
};
};
};
};
if (_vy > 32){
_vy = 32;
};
if (cooldown > 0){
cooldown--;
};
if (((keyAttack) && (!(_local3)))){
if (((!(attackKeyDown)) && ((cooldown == 0)))){
attackKeyDown = true;
fireTimer = 0;
cooldown = 2;
bulletHandler.addBullet(new Axe(bulletHandler, map, monster, (_x + (_width / 2)), (_y + (_height / 2)), effectHandler, direction, _vx));
new SoundAttack().play(0, 0, new SoundTransform(Music.FX_VOLUME));
};
} else {
if (!_local3){
attackKeyDown = false;
};
};
if (((keyUp) && (!(_local3)))){
if (!jumpKeyDown){
jumpKeyDown = true;
if (jumpCount < 1){
onFloor = false;
jumpCount++;
_vy = 0;
jumpVelocity = 5;
new SoundJump().play(0, 0, new SoundTransform((Music.FX_VOLUME * 0.7)));
};
};
} else {
if (!_local3){
jumpKeyDown = false;
};
};
if (jumpVelocity > 0){
_vy = (_vy - jumpVelocity);
if (keyUp){
jumpVelocity = (jumpVelocity - 0.6);
} else {
jumpVelocity = (jumpVelocity - 5);
};
if (jumpVelocity < 0){
jumpVelocity = 0;
};
};
if (jumpCount == 0){
jumpCount = 1;
};
onFloor = false;
move();
x = ((int(_x) - _arg1) + (_width / 2));
y = (int(_y) - _arg2);
}
public function keyHandler(_arg1:KeyboardEvent):void{
var _local2:Boolean;
if (_arg1.type == KeyboardEvent.KEY_DOWN){
_local2 = true;
} else {
if (_arg1.type == KeyboardEvent.KEY_UP){
_local2 = false;
} else {
return;
};
};
switch (_arg1.keyCode){
case Keyboard.SPACE:
case Keyboard.UP:
keyUp = _local2;
break;
case Keyboard.LEFT:
keyLeft = _local2;
break;
case Keyboard.RIGHT:
keyRight = _local2;
break;
default:
keyAttack = _local2;
break;
};
}
}
}//package
Section 25
//Smoke (Smoke)
package {
import flash.display.*;
public dynamic class Smoke extends MovieClip {
}
}//package
Section 26
//SoundAttack (SoundAttack)
package {
import flash.media.*;
public dynamic class SoundAttack extends Sound {
}
}//package
Section 27
//SoundBoom (SoundBoom)
package {
import flash.media.*;
public dynamic class SoundBoom extends Sound {
}
}//package
Section 28
//SoundBurn (SoundBurn)
package {
import flash.media.*;
public dynamic class SoundBurn extends Sound {
}
}//package
Section 29
//SoundClose (SoundClose)
package {
import flash.media.*;
public dynamic class SoundClose extends Sound {
}
}//package
Section 30
//SoundExplosionBig (SoundExplosionBig)
package {
import flash.media.*;
public dynamic class SoundExplosionBig extends Sound {
}
}//package
Section 31
//SoundExplosionSmall (SoundExplosionSmall)
package {
import flash.media.*;
public dynamic class SoundExplosionSmall extends Sound {
}
}//package
Section 32
//SoundFallHit (SoundFallHit)
package {
import flash.media.*;
public dynamic class SoundFallHit extends Sound {
}
}//package
Section 33
//SoundJump (SoundJump)
package {
import flash.media.*;
public dynamic class SoundJump extends Sound {
}
}//package
Section 34
//SoundMonsterAttack (SoundMonsterAttack)
package {
import flash.media.*;
public dynamic class SoundMonsterAttack extends Sound {
}
}//package
Section 35
//SoundTakeDamage (SoundTakeDamage)
package {
import flash.media.*;
public dynamic class SoundTakeDamage extends Sound {
}
}//package
Section 36
//Spoiler (Spoiler)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import se.mazapan.*;
import flash.ui.*;
public class Spoiler extends MovieClip {
private var scrollerBmp:Bitmap;
private var locked:Boolean;
private var cinematics:Cinematic;
private var ending:Sprite;
private var map:Map;
private var music:Music;
private var imageHandler:ImageHandler;
private var minX:int;
private var effectHandler:EffectHandler;
private var lifebar:Lifebar;
private var scroller:BitmapScroller;
private var chandelier:Image;
private var monster:Monster;
private var player:Player;
private var gameOver:Boolean;
private var bulletHandler:BulletHandler;
private var gameOverTimer:int;
public function Spoiler(){
stop();
addEventListener(Event.ENTER_FRAME, mainLoader);
}
private function init():void{
var _local1:ContextMenu;
removeEventListener(Event.ENTER_FRAME, mainLoader);
_local1 = new ContextMenu();
_local1.hideBuiltInItems();
_local1.customItems.push(new ContextMenuItem("4. Also, you can't really die"));
contextMenu = _local1;
map = new Map();
map.load("stage");
stage.addEventListener(MouseEvent.CLICK, startGame);
}
private function mainLoader(_arg1:Event):void{
if ((((root.loaderInfo.bytesLoaded == root.loaderInfo.bytesTotal)) && ((root.loaderInfo.bytesTotal > 0)))){
if (currentFrame == 3){
init();
} else {
gotoAndStop(3);
};
};
}
public function monsterIsDead():void{
removeChild(monster);
monster = null;
player.setMonster(null);
gameOver = true;
gameOverTimer = 0;
}
private function startGame(_arg1:Event):void{
MochiBot.track(this, "7baf085f");
gotoAndStop(4);
stage.removeEventListener(MouseEvent.CLICK, startGame);
scroller = new BitmapScroller(700, 500, 32, 32);
scrollerBmp = new Bitmap(scroller);
effectHandler = new EffectHandler();
bulletHandler = new BulletHandler();
lifebar = new Lifebar();
player = new Player(this, map, effectHandler, bulletHandler);
monster = new Monster(this, map, player, bulletHandler, effectHandler, lifebar);
player.setMonster(monster);
scroller.setMap(map.getWholeMap(), map.getTexture(), ((player.getX() + 15) - 350), ((player.getY() + 15) - 250));
imageHandler = new ImageHandler();
chandelier = new Image(new Chandelier(), (130 << 5), (6 << 5), (5 << 5), (96 + 192));
cinematics = new Cinematic(chandelier, map, imageHandler, effectHandler, monster, player);
music = new Music(player);
stage.addEventListener(KeyboardEvent.KEY_DOWN, player.keyHandler);
stage.addEventListener(KeyboardEvent.KEY_UP, player.keyHandler);
addEventListener(Event.ENTER_FRAME, main);
addChild(scrollerBmp);
addChild(monster);
addChild(imageHandler);
addChild(player);
addChild(bulletHandler);
addChild(effectHandler);
addChild(lifebar);
imageHandler.addImage(new Image(new Fire(), (109 << 5), (9 << 5), 32, 32));
imageHandler.addImage(new Image(new Fire(), (111 << 5), (14 << 5), 32, 32));
imageHandler.addImage(new Image(new Fire(), (109 << 5), (19 << 5), 32, 32));
imageHandler.addImage(new Image(new Fire(), (155 << 5), (9 << 5), 32, 32));
imageHandler.addImage(new Image(new Fire(), (153 << 5), (14 << 5), 32, 32));
imageHandler.addImage(new Image(new Fire(), (155 << 5), (19 << 5), 32, 32));
imageHandler.addImage(new Image(new Title(), (3 << 5), (18.5 * 32), 585, 145));
imageHandler.addImage(new Image(new Spoiler1(), (32 << 5), (12.5 * 32), 400, 54));
imageHandler.addImage(new Image(new Spoiler2(), (((51 * 32) + 18) + 10), ((14.5 * 32) + 5), 250, 60));
imageHandler.addImage(new Image(new Spoiler3(), ((71 * 32) + 5), ((19 * 32) - 5), 310, 80));
imageHandler.addImage(new Image(new Spoiler4(), ((82.5 * 32) + 8), ((25.5 * 32) - 20), 130, 30));
imageHandler.addImage(chandelier);
}
private function remove():void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, player.keyHandler);
stage.removeEventListener(KeyboardEvent.KEY_UP, player.keyHandler);
removeEventListener(Event.ENTER_FRAME, main);
removeChild(scrollerBmp);
removeChild(imageHandler);
removeChild(player);
removeChild(bulletHandler);
removeChild(effectHandler);
removeChild(lifebar);
effectHandler.clear();
bulletHandler.remove();
imageHandler.remove();
scroller.dispose();
effectHandler = (bulletHandler = (imageHandler = (cinematics = (scroller = null))));
}
public function burnRopeAt(_arg1:int):void{
cinematics.burnRopeAt(_arg1);
music.stop();
}
private function main(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Array;
_local2 = Math.round(((((player.getX() + 15) - scroller.getX()) - 350) * 0.5));
_local3 = Math.round(((((player.getY() + 15) - scroller.getY()) - 250) * 0.5));
scroller.scroll(_local2, _local3);
if (scroller.getX() < (minX << 5)){
scroller.moveTo((minX << 5), scroller.getY());
};
_local4 = scroller.getX();
_local5 = scroller.getY();
player.main(_local4, _local5);
if (monster){
monster.main(_local4, _local5);
};
bulletHandler.main(_local4, _local5);
imageHandler.main(_local4, _local5);
effectHandler.main(_local4, _local5);
cinematics.main();
lifebar.main();
music.main();
if (!locked){
if (player.getX() > (109 << 5)){
locked = true;
_local6 = map.getWholeMap();
_local6[25][107] = 3;
_local6[26][107] = 3;
scroller.setMap(_local6, map.getTexture(), 0, 0);
scroller.moveTo(_local4, _local5);
effectHandler.addEffect(new Smoke(), ((107 * 32) + 16), ((25 * 32) + 16));
effectHandler.addEffect(new Smoke(), ((107 * 32) + 16), ((26 * 32) + 16));
new SoundClose().play(0, 0, new SoundTransform(Music.FX_VOLUME));
new SoundBoom().play(0, 0, new SoundTransform(Music.FX_VOLUME));
lifebar.activate();
music.startBossMusic();
};
};
if ((((minX == 0)) && ((scroller.getX() > (105 << 5))))){
minX = 105;
};
if (gameOver){
gameOverTimer++;
if (gameOverTimer > (30 * 4)){
if (ending){
if (ending.alpha < 1){
ending.alpha = (ending.alpha + (1 / (30 * 2)));
} else {
remove();
};
} else {
music.playCredits();
ending = new Ending();
ending.alpha = 0;
addChild(ending);
};
};
};
}
}
}//package
Section 37
//Spoiler1 (Spoiler1)
package {
import flash.display.*;
public dynamic class Spoiler1 extends Sprite {
}
}//package
Section 38
//Spoiler2 (Spoiler2)
package {
import flash.display.*;
public dynamic class Spoiler2 extends Sprite {
}
}//package
Section 39
//Spoiler3 (Spoiler3)
package {
import flash.display.*;
public dynamic class Spoiler3 extends Sprite {
}
}//package
Section 40
//Spoiler4 (Spoiler4)
package {
import flash.display.*;
public dynamic class Spoiler4 extends Sprite {
}
}//package
Section 41
//Tilesheet (Tilesheet)
package {
import flash.display.*;
public dynamic class Tilesheet extends BitmapData {
public function Tilesheet(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 42
//Title (Title)
package {
import flash.display.*;
public dynamic class Title extends Sprite {
}
}//package