Section 1
//Fadable (basic.Fadable)
package basic {
import flash.events.*;
public class Fadable extends Removable {
private var curAlpha:Number;// = 1
private var targetAlpha:Number;
private var frames:int;
public function Fadable(){
curAlpha = 1;
super();
}
override public function remove():void{
removeEventListener(Event.ENTER_FRAME, fadeAlphaHandler);
super.remove();
}
public function fadeToAlpha(_arg1:Number, _arg2:int):void{
this.targetAlpha = _arg1;
this.frames = _arg2;
curAlpha = alpha;
removeEventListener(Event.ENTER_FRAME, fadeAlphaHandler);
addEventListener(Event.ENTER_FRAME, fadeAlphaHandler, false, 0, true);
}
private function fadeAlphaHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = (curAlpha - targetAlpha);
_local3 = (_local2 / frames);
curAlpha = (curAlpha - _local3);
alpha = curAlpha;
frames--;
if (frames <= 0){
removeEventListener(Event.ENTER_FRAME, fadeAlphaHandler);
alpha = targetAlpha;
};
if (alpha < 0.01){
visible = false;
} else {
visible = true;
};
}
}
}//package basic
Section 2
//Movable (basic.Movable)
package basic {
import flash.events.*;
import flash.geom.*;
import map.*;
public class Movable extends Removable {
protected var map:Map;
protected var tileX:Number;// = 0
protected var tileY:Number;// = 0
private var posY:Number;// = 0
private var posX:Number;// = 0
public var tileSize:int;
private var rot:Number;// = 0
public static var MOVE = "move";
public static var TILE_SIZE:int = 100;
public static var CHANGE_TILE = "changeTile";
public function Movable():void{
rot = 0;
posX = 0;
posY = 0;
tileX = 0;
tileY = 0;
tileSize = Movable.TILE_SIZE;
super();
map = MapInterface.getMap();
}
public function getTile():Point{
return (new Point(tileX, tileY));
}
protected function localToMapPos(_arg1:Point):Point{
_arg1 = this.localToGlobal(_arg1);
_arg1 = map.globalToLocal(_arg1);
return (_arg1);
}
protected function dispatchMove(_arg1:Boolean=false):void{
var _local2:Point;
var _local3:int;
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = localToMapPos(new Point(0, 0));
_local3 = Math.floor((_local2.x / tileSize));
_local4 = Math.floor((_local2.y / tileSize));
if (((!((_local3 == tileX))) || (!((_local4 == tileY))))){
tileX = _local3;
tileY = _local4;
dispatchEvent(new Event(Movable.CHANGE_TILE));
};
_local5 = Math.abs((rotation - rot));
_local6 = Math.abs((_local2.x - posX));
_local7 = Math.abs((_local2.y - posY));
if ((((((((_local5 >= 0.01)) || ((_local6 >= 0.01)))) || ((_local7 >= 0.01)))) || (_arg1))){
rot = rotation;
posX = _local2.x;
posY = _local2.y;
dispatchEvent(new Event(Movable.MOVE));
};
}
override public function remove():void{
map = null;
super.remove();
}
public function move(_arg1:Number, _arg2:Number):void{
x = (x + _arg1);
y = (y + _arg2);
dispatchMove();
}
}
}//package basic
Section 3
//Removable (basic.Removable)
package basic {
import flash.display.*;
public class Removable extends MovieClip {
protected var removeFromParent:Boolean;// = true
private var removed:Boolean;// = false
public function Removable(){
removed = false;
removeFromParent = true;
super();
}
public function getRemoved():Boolean{
return (removed);
}
public function remove():void{
if (!removed){
removed = true;
if (((!((parent == null))) && (removeFromParent))){
parent.removeChild(this);
};
} else {
trace("Error: this has already been removed.");
};
}
protected function removeChildren(_arg1:DisplayObjectContainer):void{
var _local2:DisplayObject;
var _local3:DisplayObjectContainer;
if ((_arg1 is MovieClip)){
MovieClip(_arg1).stop();
};
if ((_arg1 is Removable)){
if (!Removable(_arg1).getRemoved()){
Removable(_arg1).remove();
};
};
while (_arg1.numChildren > 0) {
_local2 = _arg1.getChildAt(0);
if ((_local2 is DisplayObjectContainer)){
_local3 = DisplayObjectContainer(_local2);
removeChildren(_local3);
};
if (_local2.parent != null){
_local2.parent.removeChild(_local2);
};
};
}
}
}//package basic
Section 4
//Camera (camera.Camera)
package camera {
import flash.events.*;
import flash.display.*;
import basic.*;
import flash.geom.*;
public class Camera extends Removable {
private var shakeDegrade:Number;// = 0.9
private var shakeX:Number;// = 0
private var shakeY:Number;// = 0
private var target:Movable;
public function Camera():void{
shakeX = 0;
shakeY = 0;
shakeDegrade = 0.9;
super();
addEventListener(Event.ENTER_FRAME, shake, false, 0, true);
}
private function shake(_arg1:Event):void{
shakeX = (shakeX * -(shakeDegrade));
shakeY = (shakeY * -(shakeDegrade));
x = (x + (Math.random() * shakeX));
y = (y + (Math.random() * shakeY));
if (Math.abs(shakeX) < 1){
shakeX = 0;
};
if (Math.abs(shakeY) < 1){
shakeY = 0;
};
}
function removeTarget():void{
target.removeEventListener(Movable.MOVE, targetMoveHandler);
target = null;
}
override public function remove():void{
removeTarget();
removeEventListener(Event.ENTER_FRAME, shake);
super.remove();
}
function setTarget(_arg1:Movable):void{
if (this.target == null){
this.target = _arg1;
_arg1.addEventListener(Movable.MOVE, targetMoveHandler, false, 0, true);
centerOnDisplayObject(_arg1);
} else {
trace(("Error: Camera -> addTarget: There is already a target: " + _arg1));
};
}
function setShake(_arg1:Number, _arg2:Number, _arg3):void{
this.shakeX = _arg1;
this.shakeY = _arg2;
this.shakeDegrade = _arg3;
}
private function targetMoveHandler(_arg1:Event):void{
var _local2:Movable;
_local2 = Movable(_arg1.target);
centerOnDisplayObject(_local2);
}
private function centerOnDisplayObject(_arg1:DisplayObject):void{
var _local2:Point;
_local2 = new Point(0, 0);
_local2 = _arg1.localToGlobal(_local2);
_local2 = globalToLocal(_local2);
x = (-(_local2.x) + (BaseClass.stageWidth / 2));
y = (-(_local2.y) + (BaseClass.stageHeight / 2));
}
}
}//package camera
Section 5
//CameraInterface (camera.CameraInterface)
package camera {
import basic.*;
public class CameraInterface {
private static var cameraRef:Camera;
public static function createCamera():void{
removeCamera();
cameraRef = new Camera();
}
public static function setTarget(_arg1:Movable):void{
if (cameraRef != null){
cameraRef.setTarget(_arg1);
} else {
trace("Error: CameraInterface -> setTarget: camera is null");
};
}
public static function setShake(_arg1:Number, _arg2:Number, _arg3:Number):void{
if (cameraRef != null){
cameraRef.setShake(_arg1, _arg2, _arg3);
} else {
trace((((((("Error: camera.CameraInterface -> setShake(" + _arg1) + ", ") + _arg2) + ", ") + _arg3) + "): cameraRef is null"));
};
}
public static function removeTarget():void{
if (cameraRef != null){
cameraRef.removeTarget();
} else {
trace("Error: CameraInterface -> removeTarget: camera is null");
};
}
public static function removeCamera():void{
if (cameraRef != null){
cameraRef.remove();
};
cameraRef = null;
}
public static function getCamera():Camera{
if (cameraRef == null){
trace("Error: CameraInterface -> getCamera -> cameraRef is null");
};
return (cameraRef);
}
}
}//package camera
Section 6
//AnabelRun (character.follow.AnabelRun)
package character.follow {
public class AnabelRun extends FollowCharacter {
public function AnabelRun():void{
stopState = "stand";
moveState = "run";
prependString = "Girl";
leashDist = 16;
stopDist = 10;
setState(stopState);
}
}
}//package character.follow
Section 7
//AnabelWalk (character.follow.AnabelWalk)
package character.follow {
public class AnabelWalk extends FollowCharacter {
public function AnabelWalk():void{
stopState = "stand";
moveState = "walk";
prependString = "Girl";
leashDist = 30;
stopDist = 15;
setState(stopState);
}
}
}//package character.follow
Section 8
//FollowCharacter (character.follow.FollowCharacter)
package character.follow {
import flash.events.*;
import basic.*;
import character.*;
import flash.geom.*;
import data.*;
public class FollowCharacter extends Character {
protected var caughtUp:Boolean;// = false
protected var dist:Number;// = 0
protected var stopState:String;// = ""
protected var moveState:String;// = ""
protected var posArray:Array;
protected var leashDist:int;// = 50
protected var stopDist:int;// = 25
public function FollowCharacter():void{
var _local1:ControlCharacter;
leashDist = 50;
stopDist = 25;
dist = 0;
stopState = "";
moveState = "";
posArray = new Array();
caughtUp = false;
super();
turnSpeed = 0.22;
_local1 = PlayerInterface.getPlayer();
addEventListener(Event.ENTER_FRAME, followPath, false, 0, true);
_local1.addEventListener(Movable.MOVE, onPlayerMove, false, 0, true);
}
private function walkHandler():void{
doFollowPath();
}
private function followPath(_arg1:Event):void{
var _local2 = this;
_local2[(state + "Handler")]();
if ((((posArray.length < stopDist)) && (!((state == stopState))))){
setState(stopState);
} else {
if (posArray.length >= leashDist){
if (caughtUp){
if (state != moveState){
setState(moveState);
};
} else {
if (state != "catchUp"){
setState("catchUp");
};
};
};
};
}
protected function rotateTowardsPoint(_arg1:Point):void{
var _local2:Point;
var _local3:Number;
var _local4:*;
_local2 = new Point(x, y);
_local3 = calcCenterAngle(_local2, _arg1);
_local4 = Maths.getShortestRotChange(_local3, rotation);
rotation = (rotation + (_local4 * turnSpeed));
}
private function runHandler():void{
doFollowPath();
}
protected function doFollowPath():void{
var _local1:Point;
var _local2:Number;
var _local3:Number;
_local1 = posArray.shift();
rotateTowardsPoint(_local1);
_local2 = (_local1.x - x);
_local3 = (_local1.y - y);
move(_local2, _local3);
}
override public function remove():void{
var _local1:ControlCharacter;
_local1 = PlayerInterface.getPlayer();
if (_local1 != null){
_local1.removeEventListener(Movable.MOVE, onPlayerMove);
};
removeEventListener(Event.ENTER_FRAME, followPath);
posArray = new Array();
super.remove();
}
private function onPlayerMove(_arg1:Event):void{
var _local2:Point;
var _local3:Point;
_local2 = PlayerInterface.getPos();
_local3 = new Point(0, 0);
if (posArray.length >= 1){
_local3 = posArray[(posArray.length - 1)];
};
if (((!((_local3.x == _local2.x))) || (!((_local3.y == _local2.y))))){
posArray.push(_local2);
};
if (posArray.length > leashDist){
posArray.shift();
};
}
private function standHandler():void{
move(0, 0);
}
private function catchUpHandler():void{
var _local1:Point;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:Number;
if (posArray.length > 0){
_local1 = posArray[0];
_local2 = (x - _local1.x);
_local3 = (y - _local1.y);
_local4 = Maths.pythag(_local2, _local3);
_local5 = Math.atan2(_local3, _local2);
_local6 = ((_local5 * Maths.RAD_DEG) + 90);
_local7 = Maths.getShortestRotChange(_local6, rotation);
rotation = (rotation + _local7);
_local8 = runSpeed;
if (_local8 > _local4){
_local8 = _local4;
};
moveForward(_local8);
if (_local4 <= 4){
caughtUp = true;
setState(stopState);
};
};
}
}
}//package character.follow
Section 9
//BossInterface (character.BossInterface)
package character {
import flash.display.*;
import data.*;
public class BossInterface {
private static var boss:MonsterCharacter;
public static function removeBoss():void{
if (boss != null){
boss.remove();
boss = null;
};
}
public static function feelTailHit():void{
if (boss != null){
boss.feelTailHit();
} else {
trace("Error: BossInterface -> feelTailHit(): boss is null.");
};
}
public static function tailHitTest(_arg1:DisplayObject):Boolean{
var _local2:Boolean;
var _local3:MovieClip;
_local2 = false;
if (boss != null){
_local3 = boss.getTail();
if (((!((_arg1 == null))) && (!((_local3 == null))))){
_local2 = HitTest.complexHitTestObject(_arg1, _local3, 1);
};
} else {
trace((("Error: BossInterface -> tailHitTest(" + _arg1) + "): boss is null."));
};
return (_local2);
}
public static function createBoss():void{
if (boss == null){
boss = new MonsterCharacter();
};
}
}
}//package character
Section 10
//Character (character.Character)
package character {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import data.*;
import stateObject.*;
public class Character extends StateObject {
protected var walkSpeed:Number;// = 2
protected var runSpeed:Number;// = 4
protected var moveX:Number;// = 0
protected var moveY:Number;// = 0
protected var turnSpeed:Number;// = 0.33
public function Character():void{
runSpeed = 4;
walkSpeed = 2;
turnSpeed = 0.33;
moveX = 0;
moveY = 0;
super();
addEventListener(Event.ENTER_FRAME, doMove, false, 0, true);
}
protected function doMove(_arg1:Event):void{
move(moveX, moveY);
moveX = (moveY = 0);
}
protected function moveDir(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = (_arg2 * Maths.DEG_RAD);
_local4 = (Math.cos(_local3) * _arg1);
_local5 = (Math.sin(_local3) * _arg1);
moveX = _local4;
moveY = _local5;
}
protected function getCenterPoint():Point{
var _local1:Point;
_local1 = getGlobalPos(this);
return (_local1);
}
override public function remove():void{
removeEventListener(Event.ENTER_FRAME, doMove);
super.remove();
}
function setPos(_arg1:int, _arg2:int):void{
this.x = _arg1;
this.y = _arg2;
}
protected function getGlobalPos(_arg1:MovieClip){
var _local2:Point;
_local2 = new Point(0, 0);
_local2 = _arg1.localToGlobal(_local2);
return (_local2);
}
protected function moveForward(_arg1:Number):void{
moveDir(_arg1, (rotation + 90));
}
protected function calcCenterAngle(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
_local3 = (-(Maths.getAngleBetweenPoints(_arg1, _arg2)) + 180);
return (_local3);
}
}
}//package character
Section 11
//ControlCharacter (character.ControlCharacter)
package character {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import camera.*;
import flash.geom.*;
import lightEngine.*;
import lightEngine.lights.*;
import map.*;
import sounds.*;
import data.*;
import flash.ui.*;
public class ControlCharacter extends Character {
private var left:Boolean;// = false
private var armDeg:Number;// = 0
private var healthRecovery:Number;// = 0.25
private var right:Boolean;// = false
private var targetRotation:Number;// = 0
private var centerPoint:Point;
private var health:Number;// = 100
private var mouseMovedWhileStanding:Boolean;// = false
private var hitMC:Circle;
private var pushY:Number;// = 0
private var lastY:Number;// = 0
private var pushX:Number;// = 0
private var lastX:Number;// = 0
private var up:Boolean;// = false
private var getUp:Boolean;// = false
private var rightHand:MovieClip;
private var down:Boolean;// = false
private var fallDown:Boolean;// = false
private var aimLight:Boolean;// = true
private var leftArm:LeftArm;
private var light:FlashLight;
private var legDeg:Number;// = 0
private var frameCycle:Number;// = 0
private var casual:Boolean;// = true
private var shuff:Boolean;// = false
private var breatheSoundChannel:SoundChannel;
private var lastMoveX:Number;// = 0
private var lastMoveY:Number;// = 0
private var swingRotPos:int;
private var captured:Boolean;// = false
private var swingRotArray:Array;
private var mousePoint:Point;
private var hurtChannel:SoundChannel;
private var swingRot:Number;// = 0
public function ControlCharacter():void{
mousePoint = new Point();
centerPoint = new Point();
casual = true;
captured = false;
fallDown = false;
getUp = false;
lastX = 0;
lastY = 0;
lastMoveX = 0;
lastMoveY = 0;
pushX = 0;
pushY = 0;
right = false;
left = false;
up = false;
down = false;
armDeg = 0;
legDeg = 0;
targetRotation = 0;
shuff = false;
aimLight = true;
health = 100;
healthRecovery = 0.25;
frameCycle = 0;
swingRot = 0;
swingRotArray = new Array(10.6, 17.1, 19.3, 17.8, 13.5, 6.3, -3.8, -16.8, -29.8, -40.1, -47.4, -51.7, -53.1, -52.4, -50.2, -46.4, -41.4, -34.6, -26.6, -18.3, -11.8, -6.5, -2.8, -0.6, 0);
swingRotPos = swingRotArray.length;
mouseMovedWhileStanding = false;
super();
prependString = "";
leftArm = new LeftArm();
setState("stand");
addEventListener(Event.ENTER_FRAME, controlCharacter, false, 0, true);
BaseClass.main.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMouseHandler, false, 2, true);
BaseClass.main.stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 1, true);
scaleX = (scaleY = 0.15);
hitMC = new Circle();
hitMC.width = (hitMC.height = 75);
hitMC.visible = false;
addChild(hitMC);
}
private function determineState():void{
if (fallDown){
setState("fallDown");
} else {
if (getUp){
setState("getUp");
} else {
if (captured){
setState("captured");
} else {
if (casual){
if (((((((right) || (left))) || (up))) || (down))){
setState("walk");
} else {
setState("standCasual");
};
} else {
if (((((((right) || (left))) || (up))) || (down))){
setState("run");
} else {
setState("stand");
};
};
};
};
};
}
private function runHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:*;
var _local12:Number;
_local2 = getKeyRotation();
moveDir(runSpeed, (_local2 + 90));
_local3 = getCenterPoint();
_local4 = calcCenterAngle(_local3, mousePoint);
_local5 = Maths.getDistanceBetweenPoints(_local3, mousePoint);
_local6 = getGlobalPos(rightHand.rot.point_mc);
_local7 = Maths.getAngleBetweenPoints(_local6, mousePoint);
_local8 = (360 - (rotation + _local7));
if (_local5 < 30){
_local8 = ((360 + 180) - (rotation - _local4));
};
_local8 = ((_local8 + 360) % 360);
_local9 = (((_local4 - rotation) + 180) % 360);
_local10 = _local8;
if ((((_local9 > 320)) && ((_local10 < 40)))){
_local8 = 361;
};
if ((((_local9 < 40)) && ((_local10 > 320)))){
_local8 = 1;
};
armDeg = (armDeg + ((_local8 - armDeg) * turnSpeed));
_local11 = Maths.getShortestRotChange(_local2, rotation);
armDeg = (armDeg - (_local11 * turnSpeed));
rotation = (rotation + (_local11 * turnSpeed));
_local12 = (Math.round(((360 - armDeg) + (swingRot * 1.5))) + 1);
_local12 = Maths.limit(_local12, 1, 360);
m.upperBody.head.gotoAndStop(_local12);
m.upperBody.rightArm.anim.anim.gotoAndStop(_local12);
m.upperBody.rotation = (((armDeg - 180) / 3) + swingRot);
m.midBody.rotation = ((armDeg - 180) / 6);
leftArm.setRemoteFrame(m.upperBody.currentFrame);
}
private function controlCharacter(_arg1:Event):void{
if (swingRotPos < swingRotArray.length){
swingRot = swingRotArray[swingRotPos];
swingRotPos++;
};
detectKeys();
determineState();
var _local2 = this;
_local2[(state + "Handler")](_arg1);
moveLight();
incHealth(healthRecovery);
}
function setCaptured(_arg1:Boolean):void{
captured = _arg1;
aimLight = !(_arg1);
if (light != null){
rotation = (light.rotation + 180);
};
}
private function mouseDownHandler(_arg1:MouseEvent):void{
if (((leftArm.holdingWeapon) && ((swingRotPos == swingRotArray.length)))){
leftArm.startSwing();
swingRotPos = 0;
};
}
function setCasual(_arg1:Boolean):void{
casual = _arg1;
}
override public function remove():void{
removeEventListener(Event.ENTER_FRAME, controlCharacter);
BaseClass.main.stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveMouseHandler);
BaseClass.main.stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
if (leftArm != null){
leftArm.remove();
leftArm = null;
};
if (breatheSoundChannel != null){
breatheSoundChannel.removeEventListener(Event.SOUND_COMPLETE, onBreatheComplete);
breatheSoundChannel = null;
};
if (hurtChannel != null){
hurtChannel.removeEventListener(Event.SOUND_COMPLETE, onHurtSoundComplete);
hurtChannel = null;
};
light = null;
mousePoint = null;
centerPoint = null;
rightHand = null;
super.remove();
}
private function onBreatheComplete(_arg1:Event):void{
breatheSoundChannel.removeEventListener(Event.SOUND_COMPLETE, onBreatheComplete);
breatheSoundChannel = null;
}
function getHitArea():MovieClip{
return (hitMC);
}
private function standHandler(_arg1:Event):void{
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:Number;
var _local7:Number;
_local2 = getCenterPoint();
_local3 = calcCenterAngle(_local2, mousePoint);
_local4 = Maths.getDistanceBetweenPoints(_local2, mousePoint);
_local5 = (Maths.getShortestRotChange(_local3, rotation) * turnSpeed);
rotation = (rotation + _local5);
shuffleLegs(_local5);
if (_local4 > 20){
_local6 = Maths.getShortestRotChange(_local3, rotation);
_local7 = (360 - (_local6 + 180));
armDeg = (armDeg + ((_local7 - armDeg) * 0.5));
armDeg = Math.round(armDeg);
armDeg = Maths.limit(armDeg, 1, 360);
};
m.upperBody.rotation = swingRot;
}
function setPush(_arg1:Number, _arg2:Number):void{
this.pushX = _arg1;
this.pushY = _arg2;
}
private function shuffleLegs(_arg1):void{
var _local2:Number;
legDeg = (legDeg - _arg1);
_local2 = Maths.getShortestRotChange(0, legDeg);
if (Math.abs(_local2) > 110){
shuff = true;
m.lowerBody.gotoAndStop("shuff");
};
if (Math.abs(_local2) < 20){
shuff = false;
m.lowerBody.gotoAndStop("still");
};
if (shuff){
legDeg = (legDeg + (_local2 * 0.15));
};
m.lowerBody.rotation = legDeg;
legDeg = m.lowerBody.rotation;
}
private function attachLeftArm():void{
var _local1:MovieClip;
if (!casual){
if (((!((m == null))) && (!((m.upperBody == null))))){
if (state == "run"){
_local1 = m.upperBody.leftArm;
};
if (state == "stand"){
_local1 = m.upperBody.leftArm;
};
if (_local1 != null){
_local1.addChild(leftArm);
};
};
};
}
override protected function doMove(_arg1:Event):void{
moveX = (moveX + pushX);
moveY = (moveY + pushY);
super.doMove(_arg1);
pushX = (pushX * 0.75);
pushY = (pushY * 0.75);
}
private function standCasualHandler(_arg1:Event):void{
var _local2:Point;
var _local3:Number;
var _local4:*;
var _local5:int;
if (mouseMovedWhileStanding){
_local2 = getCenterPoint();
_local3 = calcCenterAngle(_local2, mousePoint);
_local4 = (Maths.getShortestRotChange(_local3, rotation) * 0.25);
rotation = (rotation + _local4);
m.head.rotation = (_local3 - rotation);
_local5 = m.head.rotation;
m.lArm.gotoAndStop((-(_local5) + 41));
m.rArm.gotoAndStop((_local5 + 41));
shuffleLegs(_local4);
};
}
private function detectKeys():void{
right = ((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(68)));
left = ((Key.isDown(Keyboard.LEFT)) || (Key.isDown(65)));
up = ((Key.isDown(Keyboard.UP)) || (Key.isDown(87)));
down = ((Key.isDown(Keyboard.DOWN)) || (Key.isDown(83)));
}
private function walkHandler(_arg1:Event):void{
var _local2:Number;
var _local3:*;
_local2 = getKeyRotation();
moveDir(walkSpeed, (_local2 + 90));
_local3 = Maths.getShortestRotChange(_local2, rotation);
rotation = (rotation + (_local3 * turnSpeed));
}
override protected function setState(_arg1:String):void{
var _local2:Boolean;
var _local3:Point;
var _local4:Number;
var _local5:*;
_local2 = false;
if (this.state != _arg1){
_local2 = true;
};
super.setState(_arg1);
if (_local2){
mouseMovedWhileStanding = false;
if (_arg1 == "stand"){
rightHand = m.upperBody.rightArm.rightHand;
_local3 = getCenterPoint();
_local4 = calcCenterAngle(_local3, mousePoint);
_local5 = (Maths.getShortestRotChange(_local4, rotation) * 0.5);
rotation = (rotation + _local5);
};
if (_arg1 == "run"){
m.upperBody.rightArm.gotoAndStop("point");
rightHand = m.upperBody.rightArm.anim.anim.rightHand;
};
if ((((((_arg1 == "captured")) || ((_arg1 == "fallDown")))) || ((_arg1 == "getUp")))){
rightHand = m.rightHand;
};
attachLeftArm();
leftArm.setRemoteState(_arg1);
};
}
function setFallDown(_arg1:Boolean):void{
this.fallDown = _arg1;
}
private function moveMouseHandler(_arg1:MouseEvent):void{
mousePoint.x = _arg1.stageX;
mousePoint.y = _arg1.stageY;
if (state == "standCasual"){
mouseMovedWhileStanding = true;
};
}
function getLight():FlashLight{
return (light);
}
function setGetUp(_arg1:Boolean):void{
this.getUp = _arg1;
}
function setHoldingWeapon(_arg1:Boolean):void{
leftArm.holdingWeapon = _arg1;
}
private function onHurtSoundComplete(_arg1:Event):void{
hurtChannel.removeEventListener(Event.SOUND_COMPLETE, onHurtSoundComplete);
hurtChannel = null;
}
private function getUpHandler(_arg1:Event):void{
}
private function capturedHandler(_arg1:Event):void{
}
private function moveLight():void{
var _local1:Point;
var _local2:Point;
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:Camera;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (((((!((light == null))) && (!((rightHand == null))))) && (!((rightHand.rot == null))))){
_local1 = getGlobalPos(rightHand.rot.point_mc);
_local2 = getGlobalPos(rightHand.rot.lightPoint_mc);
_local3 = getGlobalPos(this);
_local4 = Maths.getDistanceBetweenPoints(_local3, mousePoint);
if (aimLight){
if (_local4 > 40){
_local9 = Maths.getAngleBetweenPoints(_local2, _local1);
_local5 = Maths.getAngleBetweenPoints(mousePoint, _local2);
_local10 = (_local9 - _local5);
rightHand.rot.rotation = (rightHand.rot.rotation + _local10);
_local5 = (_local5 + 180);
} else {
_local5 = Maths.getAngleBetweenPoints(_local3, mousePoint);
rightHand.rot.rotation = 0;
};
} else {
_local5 = ((360 - rotation) + 180);
rightHand.rot.rotation = 0;
};
_local2 = getGlobalPos(rightHand.rot.lightPoint_mc);
_local6 = CameraInterface.getCamera();
_local2 = _local6.globalToLocal(_local2);
_local7 = (_local2.x - light.x);
_local8 = (_local2.y - light.y);
light.rotation = (360 - _local5);
light.move(_local7, _local8);
};
}
private function fallDownHandler(_arg1:Event):void{
}
private function getKeyRotation():Number{
var _local1:Number;
if (((right) && (up))){
_local1 = 225;
} else {
if (((right) && (down))){
_local1 = 315;
} else {
if (((left) && (down))){
_local1 = 45;
} else {
if (((left) && (up))){
_local1 = 135;
} else {
if (right){
_local1 = 270;
} else {
if (down){
_local1 = 0;
} else {
if (left){
_local1 = 90;
} else {
if (up){
_local1 = 180;
};
};
};
};
};
};
};
};
return (_local1);
}
override public function move(_arg1:Number, _arg2:Number):void{
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Boolean;
var _local9:Point;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
_local3 = 18;
_local4 = (Math.PI / _local3);
_local5 = Math.atan2(_arg2, _arg1);
_local6 = Maths.pythag(_arg1, _arg2);
_local7 = 0;
_local9 = new Point();
_local14 = 1;
_local15 = x;
_local16 = y;
_local17 = 0;
while (_local17 < _local3) {
_local7 = (Math.floor((_local17 / 2)) * _local4);
if ((_local17 % 2) == 0){
_local7 = (_local7 * -1);
};
_local10 = (_local5 + _local7);
_local11 = _local6;
_local11 = (_local11 * _local14);
_local12 = (Math.cos(_local10) * _local11);
_local13 = (Math.sin(_local10) * _local11);
x = (x + _local12);
y = (y + _local13);
_local8 = MapInterface.wallHitTest(this);
x = _local15;
y = _local16;
if (!_local8){
_arg1 = (_local12 / _local14);
_arg2 = (_local13 / _local14);
break;
} else {
_arg2 = 0;
_arg1 = _arg2;
};
_local17++;
};
super.move(_arg1, _arg2);
}
function setLight(_arg1:Boolean):void{
if (_arg1){
if (light == null){
light = new FlashLight();
LightEngineInterface.addLight(light);
moveLight();
};
} else {
if (light != null){
LightEngineInterface.removeLight(light);
light = null;
};
};
}
function incHealth(_arg1:Number):void{
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Number;
health = (health + _arg1);
if (health < 0){
health = 0;
};
if (health > 100){
health = 100;
};
_local2 = (101 - Math.ceil(health));
_local2 = (_local2 - frameCycle);
_local2 = Maths.limit(_local2, 1, 101);
LightEngineInterface.setBGFrame(_local2);
MapInterface.setBGFrame(_local2);
if (health < 100){
if (state != "fallDown"){
_local3 = (1 - (health / 100));
frameCycle = (frameCycle + (1 + _local3));
if (frameCycle > 25){
frameCycle = 0;
_local4 = _local3;
Sounds.startSound(new HeartbeatSound(), _local4);
};
if (breatheSoundChannel == null){
if (health < 45){
_local5 = "BreatheHardSound";
_local6 = 0.5;
} else {
_local5 = "BreatheMediumSound";
_local6 = 0.75;
};
breatheSoundChannel = Sounds.startSound(Sounds.getSoundOption(_local5, 3), (_local3 * _local6));
if (breatheSoundChannel != null){
breatheSoundChannel.addEventListener(Event.SOUND_COMPLETE, onBreatheComplete, false, 0, true);
};
};
};
} else {
frameCycle = 0;
};
if ((((_arg1 < 0)) && ((hurtChannel == null)))){
hurtChannel = Sounds.startSound(Sounds.getSoundOption("DScreamSound", 4));
if (hurtChannel != null){
hurtChannel.addEventListener(Event.SOUND_COMPLETE, onHurtSoundComplete, false, 0, true);
};
};
}
}
}//package character
Section 12
//LeftArm (character.LeftArm)
package character {
import flash.display.*;
import stateObject.*;
public class LeftArm extends StateObject {
private var remoteState:String;
private var swinging:Boolean;// = false
private var remoteFrame:int;
public var holdingWeapon:Boolean;// = false
public function LeftArm():void{
holdingWeapon = false;
swinging = false;
super();
prependString = "LeftArm";
setState("stand");
}
public function setRemoteFrame(_arg1:int):void{
this.remoteFrame = _arg1;
if (state == "run"){
m.gotoAndPlay(_arg1);
};
if ((((((state == "swing")) && (!(swinging)))) && ((_arg1 <= 17)))){
setState("run");
};
}
public function setRemoteState(_arg1:String):void{
this.remoteState = _arg1;
if ((((((_arg1 == "run")) || ((_arg1 == "stand")))) && (!((state == "swing"))))){
setState(_arg1);
};
}
override protected function setState(_arg1:String):void{
super.setState(_arg1);
displayWeapon();
}
override public function remove():void{
super.remove();
}
public function startSwing():void{
state = "";
swinging = true;
setState("swing");
}
public function doneSwinging():void{
if (remoteState == "stand"){
setState(remoteState);
} else {
swinging = false;
};
}
private function displayWeapon():void{
var _local1:MovieClip;
_local1 = m.hand;
if (holdingWeapon){
_local1.gotoAndStop("holdingGolemArm");
} else {
_local1.gotoAndStop("guy");
};
}
}
}//package character
Section 13
//MonsterCharacter (character.MonsterCharacter)
package character {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import map.*;
import sounds.*;
import game.*;
import data.*;
import flash.utils.*;
public class MonsterCharacter extends Character {
private var runPosArray:Array;
private var roarTimeout:uint;
private var targetType:String;
private var targetRot:Number;// = 0
private var minRoarWaitTime:int;// = 1000
private var maxRoarWaitTime:int;// = 5000
private var targetX:Number;// = 0
private var targetY:Number;// = 0
private var runCount:int;// = 0
private var anabelScreamInterval:uint;
private var anabelSoundChannel:SoundChannel;
public function MonsterCharacter():void{
runPosArray = new Array({x:1000, y:3722, deg:63, type:"stop"}, {x:1042, y:3798, type:"pass"}, {x:734, y:4294, deg:128, type:"stop"}, {x:1069, y:3994, deg:-10, type:"stop"}, {x:803, y:3994, type:"pass"}, {x:646, y:4349, type:"pass"}, {x:583, y:4116, deg:92, type:"stop"}, {x:581, y:2984, deg:-87.7, type:"stop"});
runCount = 0;
targetRot = 0;
targetX = 0;
targetY = 0;
minRoarWaitTime = 1000;
maxRoarWaitTime = 5000;
super();
prependString = "Golem";
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
x = 1000;
y = 3722;
rotation = 63;
runSpeed = 9;
turnSpeed = 0.2;
MapInterface.addDisplayObject(this, "upperEffects");
setState("run");
anabelScreamInterval = setInterval(anabelScream, 1500);
setupRoarTimeout();
}
private function hurtHandler(_arg1:Event):void{
if (m.finishedAnim){
m.gotoAndStop("start");
setState("run");
};
}
private function runHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = (x - targetX);
_local3 = (y - targetY);
_local4 = Maths.pythag(_local2, _local3);
_local5 = Math.atan2(_local3, _local2);
_local6 = (_local5 * Maths.RAD_DEG);
_local7 = Maths.getShortestRotChange(rotation, _local6);
rotation = (rotation - (_local7 * turnSpeed));
if (_local4 < runSpeed){
x = targetX;
y = targetY;
if (targetType == "stop"){
setState("eat");
} else {
if (targetType == "pass"){
selectNextRunPoint();
};
};
};
moveDir(runSpeed, (rotation + 180));
}
private function makeRoarSound():void{
Sounds.startGameSound(Sounds.getSoundOption("ClickScreamSound", 3), this, 1);
setupRoarTimeout();
}
override public function remove():void{
if (!getRemoved()){
clearInterval(anabelScreamInterval);
clearTimeout(roarTimeout);
removeEventListener(Event.ENTER_FRAME, go);
super.remove();
BossInterface.removeBoss();
};
}
function feelTailHit():void{
if (state == "eat"){
setState("hurt");
Sounds.startGameSound(new FreakyScreamSound(), this, 2);
Sounds.startGameSound(new PunchSound(), this);
};
}
private function anabelScreamCompleteHandler(_arg1:Event):void{
anabelSoundChannel.removeEventListener(Event.SOUND_COMPLETE, anabelScreamCompleteHandler);
anabelSoundChannel = null;
}
private function anabelScream():void{
if ((((anabelSoundChannel == null)) && ((Math.random() > 0.75)))){
anabelSoundChannel = Sounds.startGameSound(Sounds.getSoundOption("AnabelScream", 9), this, 1.5);
if (anabelSoundChannel != null){
anabelSoundChannel.addEventListener(Event.SOUND_COMPLETE, anabelScreamCompleteHandler, false, 0, true);
};
};
}
function getTail():MovieClip{
var _local1:MovieClip;
if (((!((m == null))) && (!((m.body == null))))){
_local1 = m.body.tail;
};
return (_local1);
}
private function eatHandler(_arg1:Event):void{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = getPlayerPos();
_local3 = -110;
_local4 = 100;
if ((((((((_local2.dist < 140)) && ((_local2.rotDist > _local3)))) && ((_local2.rotDist < _local4)))) || ((_local2.dist < 45)))){
setState("attack");
};
_local5 = Maths.getShortestRotChange(rotation, targetRot);
rotation = (rotation - (_local5 * turnSpeed));
}
private function go(_arg1:Event):void{
var _local2:DisplayObject;
var _local3:Boolean;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11 = this;
_local11[(state + "Handler")](_arg1);
_local2 = PlayerInterface.getHitArea();
_local3 = HitTest.complexHitTestObject(this, _local2, 1);
if (_local3){
_local4 = PlayerInterface.getPos();
_local5 = (x - _local4.x);
_local6 = (y - _local4.y);
_local7 = Math.atan2(_local6, _local5);
_local8 = 20;
_local9 = (Math.cos(_local7) * _local8);
_local10 = (Math.sin(_local7) * _local8);
PlayerInterface.setPush(-(_local9), -(_local10));
if (state == "attack"){
PlayerInterface.incHealth(-50);
} else {
PlayerInterface.incHealth(-25);
};
};
}
private function getPlayerPos():Object{
var _local1:Point;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Object;
_local1 = PlayerInterface.getPos();
_local2 = (x - _local1.x);
_local3 = (y - _local1.y);
_local4 = Maths.pythag(_local2, _local3);
_local5 = Math.atan2(_local3, _local2);
_local6 = (_local5 * Maths.RAD_DEG);
_local7 = Maths.getShortestRotChange(rotation, _local6);
_local8 = new Object();
_local8.x = _local1.x;
_local8.y = _local1.y;
_local8.dist = _local4;
_local8.rotDist = _local7;
return (_local8);
}
private function selectNextRunPoint():void{
var _local1:Object;
_local1 = runPosArray[runCount];
targetRot = _local1.deg;
targetX = _local1.x;
targetY = _local1.y;
targetType = _local1.type;
runCount++;
if (runCount >= runPosArray.length){
GamePage.defeatedBoss = true;
};
}
override protected function setState(_arg1:String):void{
var _local2:Boolean;
_local2 = false;
if (this.state != _arg1){
_local2 = true;
};
super.setState(_arg1);
if (_local2){
if (_arg1 == "eat"){
m.body.gotoAndStop("glow");
};
if (_arg1 == "run"){
selectNextRunPoint();
};
if ((((((_arg1 == "attack")) || ((_arg1 == "hurt")))) || ((_arg1 == "eat")))){
m.gotoAndPlay("start");
};
};
}
private function setupRoarTimeout():void{
var _local1:int;
_local1 = ((Math.random() * (maxRoarWaitTime - minRoarWaitTime)) + minRoarWaitTime);
clearTimeout(roarTimeout);
roarTimeout = setTimeout(makeRoarSound, _local1);
}
private function attackHandler(_arg1:Event):void{
var _local2:Object;
if (m.finishedAnim){
m.gotoAndStop("start");
setState("eat");
};
_local2 = getPlayerPos();
rotation = (rotation - (_local2.rotDist * turnSpeed));
}
}
}//package character
Section 14
//PlayerInterface (character.PlayerInterface)
package character {
import flash.display.*;
import flash.geom.*;
import lightEngine.lights.*;
public class PlayerInterface {
private static var player:ControlCharacter;
public static function setCaptured(_arg1:Boolean):void{
if (player == null){
trace((("Error: PlayerInterface -> setCaptured(" + _arg1) + "): player is null"));
};
player.setCaptured(_arg1);
}
public static function setLight(_arg1:Boolean):void{
if (player == null){
trace((("Error: PlayerInterface -> setLight(" + _arg1) + "): player is null"));
};
player.setLight(_arg1);
}
public static function getTile():Point{
var _local1:Point;
if (player != null){
_local1 = player.getTile();
return (_local1);
};
trace("Error: PlayerInterface -> getTile(): player is null");
return (new Point(0, 0));
}
public static function removePlayer():void{
if (player != null){
player.remove();
player = null;
};
}
public static function incHealth(_arg1:Number):void{
if (player == null){
trace((("Error: PlayerInterface -> incHealth(" + _arg1) + "): player is null"));
};
player.incHealth(_arg1);
}
public static function getHitArea():DisplayObject{
var _local1:DisplayObject;
if (player != null){
_local1 = player.getHitArea();
} else {
trace("Error: character.PlayerInterface -> getHitArea(): player is null.");
};
return (_local1);
}
public static function setHoldingWeapon(_arg1:Boolean):void{
if (player == null){
trace((("Error: PlayerInterface -> setHoldingWeapon(" + _arg1) + "): player is null"));
};
player.setHoldingWeapon(_arg1);
}
public static function setCasual(_arg1:Boolean):void{
if (player == null){
trace((("Error: PlayerInterface -> setCasual(" + _arg1) + "): player is null"));
};
player.setCasual(_arg1);
}
public static function setGetUp(_arg1:Boolean):void{
if (player == null){
trace((("Error: PlayerInterface -> setGetUp(" + _arg1) + "): player is null"));
};
player.setGetUp(_arg1);
}
public static function setPos(_arg1:int, _arg2:int):void{
if (player == null){
trace((((("Error: PlayerInterface -> setPos(" + _arg1) + ", ") + _arg2) + "): player is null"));
};
player.setPos(_arg1, _arg2);
}
public static function getRotation():Number{
if (player != null){
return (player.rotation);
};
trace("Error: PlayerInterface -> getRotation(): player is null");
return (0);
}
public static function setRot(_arg1:Number):void{
if (player == null){
trace((("Error: PlayerInterface -> setRot(" + _arg1) + "): player is null."));
};
player.rotation = _arg1;
}
public static function getPlayer():ControlCharacter{
if (player == null){
trace("Error: PlayerInterface -> getPlayer(): player is null");
};
return (player);
}
public static function getFlashLightRotation():Number{
var _local1:Number;
var _local2:FlashLight;
_local1 = 0;
if (player == null){
trace("Error: character.PlayerInterface -> getLightRotation(): player is null.");
} else {
_local2 = player.getLight();
if (_local2 == null){
} else {
_local1 = _local2.rotation;
};
};
return (_local1);
}
public static function getGlobalPos():Point{
var _local1:Point;
if (((!((player == null))) && (!((player.parent == null))))){
_local1 = getPos();
_local1 = player.parent.localToGlobal(_local1);
return (_local1);
};
trace("Error: PlayerInterface -> getPos(): player or player.parent is null");
return (new Point(0, 0));
}
public static function setPush(_arg1:Number, _arg2:Number):void{
if (player == null){
trace((((("Error: PlayerInterface -> setPush(" + _arg1) + ", ") + _arg2) + "): player is null"));
};
player.setPush(_arg1, _arg2);
}
public static function createPlayer():void{
removePlayer();
player = new ControlCharacter();
}
public static function getPos():Point{
var _local1:Point;
if (player != null){
_local1 = new Point(player.x, player.y);
return (_local1);
};
trace("Error: PlayerInterface -> getPos(): player is null");
return (new Point(0, 0));
}
public static function setFallDown(_arg1:Boolean):void{
if (player == null){
trace((("Error: PlayerInterface -> setFallDown(" + _arg1) + "): player is null"));
};
player.setFallDown(_arg1);
}
}
}//package character
Section 15
//SmallGolemCharacter (character.SmallGolemCharacter)
package character {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import map.*;
import sounds.*;
import data.*;
import flash.utils.*;
public class SmallGolemCharacter extends Character {
private var roarTimeout:uint;
private var minRoarWaitTime:int;// = 1000
protected var targetRot:Number;// = 0
private var maxRoarWaitTime:int;// = 6000
public function SmallGolemCharacter():void{
targetRot = 0;
minRoarWaitTime = 1000;
maxRoarWaitTime = 6000;
super();
prependString = "SmallGolem";
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
turnSpeed = 0.25;
MapInterface.addDisplayObject(this, "upperEffects");
setState("stand");
setupRoarTimeout();
}
public function setRotation(_arg1:Number):void{
this.targetRot = _arg1;
rotation = _arg1;
}
override public function remove():void{
clearTimeout(roarTimeout);
removeEventListener(Event.ENTER_FRAME, go);
super.remove();
}
private function makeRoarSound():void{
Sounds.startGameSound(Sounds.getSoundOption("ClickScreamSound", 3), this, 1);
setupRoarTimeout();
}
private function standHandler(_arg1:Event):void{
var _local2:Object;
var _local3:Number;
_local2 = getPlayerPos();
if (_local2.dist < (130 * scaleX)){
setState("attack");
};
_local3 = Maths.getShortestRotChange(rotation, targetRot);
rotation = (rotation - (_local3 * turnSpeed));
}
private function go(_arg1:Event):void{
var _local2:DisplayObject;
var _local3:Boolean;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11 = this;
_local11[(state + "Handler")](_arg1);
_local2 = PlayerInterface.getHitArea();
_local3 = HitTest.complexHitTestObject(this, _local2, 1);
if (_local3){
_local4 = PlayerInterface.getPos();
_local5 = (x - _local4.x);
_local6 = (y - _local4.y);
_local7 = Math.atan2(_local6, _local5);
_local8 = 20;
_local9 = (Math.cos(_local7) * _local8);
_local10 = (Math.sin(_local7) * _local8);
PlayerInterface.setPush(-(_local9), -(_local10));
if (state == "attack"){
PlayerInterface.incHealth(-50);
} else {
PlayerInterface.incHealth(-25);
};
};
}
private function attackHandler(_arg1:Event):void{
var _local2:Object;
if (m.finishedAnim){
m.gotoAndStop("start");
setState("stand");
};
_local2 = getPlayerPos();
rotation = (rotation - (_local2.rotDist * turnSpeed));
}
private function setupRoarTimeout():void{
var _local1:int;
_local1 = ((Math.random() * (maxRoarWaitTime - minRoarWaitTime)) + minRoarWaitTime);
clearTimeout(roarTimeout);
roarTimeout = setTimeout(makeRoarSound, _local1);
}
private function getPlayerPos():Object{
var _local1:Point;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Object;
_local1 = PlayerInterface.getPos();
_local2 = (x - _local1.x);
_local3 = (y - _local1.y);
_local4 = Maths.pythag(_local2, _local3);
_local5 = Math.atan2(_local3, _local2);
_local6 = (_local5 * Maths.RAD_DEG);
_local7 = Maths.getShortestRotChange(rotation, _local6);
_local8 = new Object();
_local8.x = _local1.x;
_local8.y = _local1.y;
_local8.dist = _local4;
_local8.rotDist = _local7;
return (_local8);
}
}
}//package character
Section 16
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent)
package com.kongregate.as3.client.events {
import flash.events.*;
public class KongregateEvent extends Event {
public static const COMPLETE:String = "component_api_available";
public function KongregateEvent(_arg1:String){
super(_arg1);
}
}
}//package com.kongregate.as3.client.events
Section 17
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService)
package com.kongregate.as3.client.services {
import flash.events.*;
public class AbstractShadowService extends EventDispatcher {
protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{
trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4));
}
}
}//package com.kongregate.as3.client.services
Section 18
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow)
package com.kongregate.as3.client.services {
public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices {
private var mode:String;
public function HighScoreServiceShadow(){
mode = "";
}
public function submit(_arg1:Number, _arg2:String=null):void{
alert("IHighScoreServices", "submit", arguments);
}
public function connect():Boolean{
alert("IKongregateServices", "connect");
return (true);
}
public function requestList(_arg1:Function):void{
alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]"));
_arg1({success:false});
}
public function setMode(_arg1:String):void{
alert("IHighScoreServices", "setMode", arguments);
this.mode = _arg1;
}
}
}//package com.kongregate.as3.client.services
Section 19
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices)
package com.kongregate.as3.client.services {
public interface IHighScoreServices {
function setMode(_arg1:String):void;
function submit(_arg1:Number, _arg2:String=null):void;
function requestList(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 20
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices)
package com.kongregate.as3.client.services {
import flash.events.*;
public interface IKongregateServices extends IEventDispatcher {
function getPlayerInfo(_arg1:Function):void;
function connect(_arg1:Number=-1):Boolean;
}
}//package com.kongregate.as3.client.services
Section 21
//IStatServices (com.kongregate.as3.client.services.IStatServices)
package com.kongregate.as3.client.services {
public interface IStatServices {
function submitArray(_arg1:Array):void;
function submit(_arg1:String, _arg2:Number):void;
}
}//package com.kongregate.as3.client.services
Section 22
//IUserServices (com.kongregate.as3.client.services.IUserServices)
package com.kongregate.as3.client.services {
public interface IUserServices {
function getName():String;
function getPlayerInfo(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 23
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow)
package com.kongregate.as3.client.services {
public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices {
public function getName():String{
alert("IKongregateServices", "getName");
return ("Guest");
}
public function connect(_arg1:Number=-1):Boolean{
alert("IKongregateServices", "connect", arguments);
return (true);
}
public function getPlayerInfo(_arg1:Function):void{
alert("IKongregateServices", "getPlayerInfo");
_arg1(new Object());
}
}
}//package com.kongregate.as3.client.services
Section 24
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow)
package com.kongregate.as3.client.services {
public class StatServiceShadow extends AbstractShadowService implements IStatServices {
public function submitArray(_arg1:Array):void{
alert("IStatServices", "submitArray", arguments);
}
public function submit(_arg1:String, _arg2:Number):void{
alert("IStatServices", "submitStat", arguments);
}
}
}//package com.kongregate.as3.client.services
Section 25
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow)
package com.kongregate.as3.client.services {
public class UserServiceShadow extends AbstractShadowService implements IUserServices {
public function getName():String{
alert("UserService", "getName");
return ("Guest");
}
public function getPlayerInfo(_arg1:Function):void{
alert("UserService", "getPlayerInfo");
_arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""});
}
}
}//package com.kongregate.as3.client.services
Section 26
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
public interface IAPIBootstrap {
function init(_arg1:Event=null, _arg2:Stage=null):void;
function hideLog():void;
function showLog(_arg1:int=0):void;
}
}//package com.kongregate.as3.client
Section 27
//KongregateAPI (com.kongregate.as3.client.KongregateAPI)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
import com.kongregate.as3.client.services.*;
import com.kongregate.as3.client.events.*;
import flash.system.*;
import flash.utils.*;
import flash.errors.*;
import flash.net.*;
public class KongregateAPI extends Sprite {
private const VERSION:Number = 1;
private var loader:Loader;
private var loadedDomain:ApplicationDomain;
private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices";
private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices";
private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices";
private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices";
private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf";
private static var _connected:Boolean;
private static var kUser:IUserServices;
private static var _loaded:Boolean;
private static var kServices:IKongregateServices;
private static var kScores:IHighScoreServices;
private static var mInstance:KongregateAPI;
private static var kStats:IStatServices;
private static var kAPI:IAPIBootstrap;
public function KongregateAPI(){
if (mInstance != null){
throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access."));
};
mInstance = this;
this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
public function get loaded():Boolean{
return (_loaded);
}
public function get connected():Boolean{
return (_connected);
}
private function alertConnected(_arg1:TimerEvent=null):void{
var _local2:KongregateEvent;
var _local3:Boolean;
_local2 = new KongregateEvent(KongregateEvent.COMPLETE);
_local3 = this.dispatchEvent(_local2);
}
private function init(_arg1:Event):void{
var _local2:Object;
var _local3:String;
var _local4:URLRequest;
var _local5:LoaderContext;
this.removeEventListener(Event.ADDED_TO_STAGE, init);
_loaded = false;
_connected = false;
_local2 = LoaderInfo(root.loaderInfo).parameters;
_local3 = _local2.api_path;
if (_local3 == null){
trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded.");
createShadowServices();
return;
};
Security.allowDomain("*.kongregate.com");
Security.allowDomain("kongregatetrunk.com");
_local4 = new URLRequest(_local3);
_local5 = new LoaderContext(false);
_local5.applicationDomain = ApplicationDomain.currentDomain;
_local5.securityDomain = SecurityDomain.currentDomain;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(_local4, _local5);
}
public function get api():IAPIBootstrap{
return (kAPI);
}
private function loadComplete(_arg1:Event):void{
getServices();
}
public function get scores():IHighScoreServices{
return (kScores);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
throw (new IOError(("API file not found. " + _arg1)));
}
public function get services():IKongregateServices{
return (kServices);
}
public function get stats():IStatServices{
return (kStats);
}
private function createShadowServices():void{
var _local1:Timer;
trace(">>> Kongregate Shadow Services instantiated for local development..");
kServices = new KongregateServiceShadow();
kScores = new HighScoreServiceShadow();
kStats = new StatServiceShadow();
kUser = new UserServiceShadow();
_local1 = new Timer(200, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected);
_local1.start();
_connected = true;
}
public function get user():IUserServices{
return (kUser);
}
private function getServices():void{
var _local1:ApplicationDomain;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = ApplicationDomain.currentDomain;
kAPI = IAPIBootstrap(loader.getChildAt(0));
this.addChild(loader);
_local2 = _local1.getDefinition(CLASS_SERVICES);
trace(_local2);
kServices = _local2.getInstance();
_local3 = _local1.getDefinition(CLASS_SCORES);
kScores = _local3.getInstance();
_local4 = _local1.getDefinition(CLASS_STATS);
kStats = _local4.getInstance();
_local5 = _local1.getDefinition(CLASS_USER);
kUser = _local5.getInstance();
kServices.connect(VERSION);
_loaded = true;
_connected = true;
alertConnected();
}
public static function getInstance():KongregateAPI{
if (!mInstance){
throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it."));
};
return (mInstance);
}
}
}//package com.kongregate.as3.client
Section 28
//Data (data.Data)
package data {
import flash.display.*;
import flash.utils.*;
public class Data {
public static function calcGlobalScale(_arg1:DisplayObjectContainer):Number{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = 1;
_local3 = 1;
while (_arg1 != null) {
_local2 = (_local2 * _arg1.scaleX);
_local3 = (_local3 * _arg1.scaleY);
_arg1 = _arg1.parent;
};
_local4 = (_local2 * _local3);
return (_local4);
}
public static function stringToObject(_arg1:String){
var _local2:Class;
var _local3:*;
_local2 = (getDefinitionByName(_arg1) as Class);
_local3 = new (_local2);
return (_local3);
}
public static function getMS():int{
var _local1:Date;
var _local2:int;
_local1 = new Date();
_local2 = _local1.time;
return (_local2);
}
}
}//package data
Section 29
//HitTest (data.HitTest)
package data {
import flash.display.*;
import flash.geom.*;
public class HitTest {
protected static function getDrawMatrix(_arg1:DisplayObject, _arg2:Rectangle, _arg3:Number):Matrix{
var _local4:Point;
var _local5:Matrix;
var _local6:Matrix;
_local6 = _arg1.root.transform.concatenatedMatrix;
_local4 = _arg1.localToGlobal(new Point());
_local5 = _arg1.transform.concatenatedMatrix;
_local5.tx = (_local4.x - _arg2.x);
_local5.ty = (_local4.y - _arg2.y);
_local5.a = (_local5.a / _local6.a);
_local5.d = (_local5.d / _local6.d);
if (_arg3 != 1){
_local5.scale(_arg3, _arg3);
};
return (_local5);
}
public static function complexHitTestObject(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number=1):Boolean{
var _local4:Boolean;
_local4 = false;
if (((!((_arg1 == null))) && (!((_arg2 == null))))){
_local4 = !((complexIntersectionRectangle(_arg1, _arg2, _arg3).width == 0));
} else {
trace((((((("Error: data.HitTest -> complexHitTestObject(" + _arg1) + ", ") + _arg2) + ", ") + _arg3) + "): one of the targets is null"));
};
return (_local4);
}
public static function complexIntersectionRectangle(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number=1):Rectangle{
var _local4:Rectangle;
var _local5:BitmapData;
var _local6:Rectangle;
if (_arg3 <= 0){
throw (new Error("ArgumentError: Error #5001: Invalid value for accuracy", 5001));
};
if (!_arg1.hitTestObject(_arg2)){
return (new Rectangle());
};
_local4 = intersectionRectangle(_arg1, _arg2);
if (((((_local4.width * _arg3) < 1)) || (((_local4.height * _arg3) < 1)))){
return (new Rectangle());
};
_local5 = new BitmapData((_local4.width * _arg3), (_local4.height * _arg3), false, 0);
_local5.draw(_arg1, HitTest.getDrawMatrix(_arg1, _local4, _arg3), new ColorTransform(1, 1, 1, 1, 0xFF, -255, -255, 0xFF));
_local5.draw(_arg2, HitTest.getDrawMatrix(_arg2, _local4, _arg3), new ColorTransform(1, 1, 1, 1, 0xFF, 0xFF, 0xFF, 0xFF), BlendMode.DIFFERENCE);
_local6 = _local5.getColorBoundsRect(4294967295, 4278255615);
_local5.dispose();
if (_arg3 != 1){
_local6.x = (_local6.x / _arg3);
_local6.y = (_local6.y / _arg3);
_local6.width = (_local6.width / _arg3);
_local6.height = (_local6.height / _arg3);
};
_local6.x = (_local6.x + _local4.x);
_local6.y = (_local6.y + _local4.y);
return (_local6);
}
public static function intersectionRectangle(_arg1:DisplayObject, _arg2:DisplayObject):Rectangle{
var _local3:Rectangle;
var _local4:Rectangle;
var _local5:Rectangle;
if (((((!(_arg1.root)) || (!(_arg2.root)))) || (!(_arg1.hitTestObject(_arg2))))){
return (new Rectangle());
};
_local3 = _arg1.getBounds(_arg1.root);
_local4 = _arg2.getBounds(_arg2.root);
_local5 = new Rectangle();
_local5.x = Math.max(_local3.x, _local4.x);
_local5.y = Math.max(_local3.y, _local4.y);
_local5.width = Math.min(((_local3.x + _local3.width) - _local5.x), ((_local4.x + _local4.width) - _local5.x));
_local5.height = Math.min(((_local3.y + _local3.height) - _local5.y), ((_local4.y + _local4.height) - _local5.y));
return (_local5);
}
}
}//package data
Section 30
//Key (data.Key)
package data {
import flash.events.*;
import flash.display.*;
public class Key {
private static var initialized:Boolean = false;
private static var keysDown:Object = new Object();
public static function initialize(_arg1:Stage){
if (!initialized){
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed, false, 9);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased, false, 9);
_arg1.addEventListener(Event.DEACTIVATE, clearKeys, false, 9);
initialized = true;
};
}
private static function clearKeys(_arg1:Event):void{
keysDown = new Object();
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
throw (new Error("Key class has yet been initialized."));
};
return (Boolean((_arg1 in keysDown)));
}
private static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
private static function keyReleased(_arg1:KeyboardEvent):void{
if ((_arg1.keyCode in keysDown)){
delete keysDown[_arg1.keyCode];
};
}
}
}//package data
Section 31
//Maths (data.Maths)
package data {
import flash.display.*;
import flash.geom.*;
public class Maths {
public static var DEG_RAD:Number = 0.0174532925199433;
public static var RAD_DEG:Number = 57.2957795130823;
public static function getDistanceBetweenPoints(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
_local5 = pythag(_local3, _local4);
return (_local5);
}
public static function pythag(_arg1:Number, _arg2:Number):Number{
return (Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2))));
}
public static function formatNumberWithCommas(_arg1){
var _local2:String;
_local2 = (_arg1 + "");
if (_local2.length < 4){
return (_local2);
};
return (((formatNumberWithCommas(_local2.slice(0, -3)) + ",") + _local2.slice(-3)));
}
public static function getShortestRotChange(_arg1:Number, _arg2:Number):Number{
var _local3:*;
var _local4:*;
var _local5:*;
_local3 = (_arg1 - _arg2);
_local4 = ((_local3 - 360) % 360);
_local5 = ((_local3 + 360) % 360);
if (Math.abs(_local4) < Math.abs(_local3)){
_local3 = _local4;
};
if (Math.abs(_local5) < Math.abs(_local3)){
_local3 = _local5;
};
return (_local3);
}
public static function fitInBox(_arg1:DisplayObject, _arg2:Number, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local4 = (_arg2 / _arg1.width);
_local5 = (_arg3 / _arg1.height);
if (_local4 < _local5){
_local6 = _local4;
} else {
_local6 = _local5;
};
if (_local6 < 1){
_arg1.width = (_arg1.width * _local6);
_arg1.height = (_arg1.height * _local6);
};
}
public static function getAngleBetweenPoints(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
_local5 = Math.atan2(_local3, _local4);
_local6 = (_local5 * Maths.RAD_DEG);
_local6 = (_local6 % 360);
return (_local6);
}
public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number):Point{
var _local4:Number;
var _local5:Number;
var _local6:Point;
_local4 = Maths.pythag(_arg1, _arg2);
_local5 = ((Maths.DEG_RAD * _arg3) + Math.atan2(_arg2, _arg1));
_arg1 = (Math.cos(_local5) * _local4);
_arg2 = (Math.sin(_local5) * _local4);
_local6 = new Point(_arg1, _arg2);
return (_local6);
}
public static function hexToRGB(_arg1:Number):Object{
var _local2:Object;
_local2 = new Object();
_local2.r = (_arg1 >> 16);
_local2.g = ((_arg1 >> 8) & 0xFF);
_local2.b = (_arg1 & 0xFF);
return (_local2);
}
public static function limit(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (_arg1 < _arg2){
_arg1 = _arg2;
};
if (_arg1 > _arg3){
_arg1 = _arg3;
};
return (_arg1);
}
public static function rotDist(_arg1, _arg2){
var _local3:Number;
_local3 = (_arg1 - _arg2);
if (_local3 > 180){
_local3 = (-360 + _local3);
};
if (_local3 < -180){
_local3 = (360 + _local3);
};
return (_local3);
}
}
}//package data
Section 32
//Stats (data.Stats)
package data {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.system.*;
import flash.utils.*;
public class Stats extends Sprite {
private var fpsBox:TextField;
private var frameCount:Number;// = 0
private var memBox:TextField;
public static var fps:Number = 0;
public function Stats():void{
frameCount = 0;
super();
fpsBox = new TextField();
memBox = new TextField();
fpsBox.x = 5;
fpsBox.y = 5;
memBox.x = 5;
memBox.y = 25;
memBox.autoSize = (fpsBox.autoSize = "left");
memBox.textColor = (fpsBox.textColor = 0xFFFFFF);
memBox.selectable = (fpsBox.selectable = false);
addChild(fpsBox);
addChild(memBox);
setInterval(calcStats, 100);
addEventListener(Event.ENTER_FRAME, incFrameCount);
}
private function incFrameCount(_arg1:Event){
frameCount++;
}
private function calcStats(){
fps = frameCount;
frameCount = 0;
fpsBox.text = ("fps: " + BaseClass.main.stage.frameRate);
memBox.text = (("mem: " + Number(((System.totalMemory / 0x0400) / 0x0400)).toFixed(2)) + "Mb");
}
}
}//package data
Section 33
//Stalker (effects.monsters.Stalker)
package effects.monsters {
import flash.events.*;
import basic.*;
import character.*;
import flash.geom.*;
import data.*;
public class Stalker extends Removable {
private var maxDist:int;// = 100
private var sleepFrames:int;// = 0
private var m:StalkerGraphic;
private var dist:Number;// = 5
private var rotSpeed:Number;// = 0.12
public function Stalker():void{
maxDist = 100;
dist = 5;
sleepFrames = 0;
rotSpeed = 0.12;
super();
m = new StalkerGraphic();
addChild(m);
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
}
override public function remove():void{
PlayerInterface.setCaptured(false);
removeEventListener(Event.ENTER_FRAME, go);
super.remove();
}
private function go(_arg1:Event):void{
var _local2:Point;
var _local3:Number;
var _local4:Number;
if (sleepFrames <= 0){
_local3 = PlayerInterface.getFlashLightRotation();
_local4 = Maths.getShortestRotChange(rotation, _local3);
rotation = (rotation - (_local4 * rotSpeed));
dist = (dist + 0.85);
dist = (dist - (Math.abs(_local4) * 0.04));
if (dist <= 1){
dist = 1;
sleepFrames = (Math.random() * 400);
};
m.gotoAndStop(Math.ceil(dist));
if (dist >= 100){
m.gotoAndPlay("attack");
sleepFrames = ((Math.random() * 500) + 100);
dist = 0;
PlayerInterface.setCaptured(true);
};
} else {
sleepFrames--;
rotation = PlayerInterface.getFlashLightRotation();
};
_local2 = PlayerInterface.getPos();
x = _local2.x;
y = _local2.y;
}
}
}//package effects.monsters
Section 34
//CaveSprite (effects.CaveSprite)
package effects {
import flash.events.*;
import character.*;
import flash.geom.*;
import lightEngine.*;
import lightEngine.lights.*;
import data.*;
public class CaveSprite extends Effect {
private var curAlpha:Number;
private var maxAlphaVel:Number;// = 0.1
private var light:SpriteLight;
private var alphaAccel:Number;// = 0.1
private var velX:Number;// = 0
private var velY:Number;// = 0
private var alphaVel:Number;// = 0
private var maxAlpha:Number;// = 0.9
private var scale:Number;// = 1
private var modAlpha:Number;
private var maxVel:Number;// = 3
private var widthBuffer:int;
private var maxCenterY:int;// = 1600
private var buffer:int;// = 100
private var heightBuffer:int;
private var chasePoint:Point;
private var accel:Number;// = 0.3
public function CaveSprite():void{
var _local1:CaveSpriteGraphic;
maxVel = 3;
accel = 0.3;
velX = 0;
velY = 0;
maxAlpha = 0.9;
modAlpha = maxAlpha;
curAlpha = maxAlpha;
maxAlphaVel = 0.1;
alphaVel = 0;
alphaAccel = 0.1;
scale = 1;
maxCenterY = 1600;
buffer = 100;
widthBuffer = (275 + buffer);
heightBuffer = (200 + buffer);
super();
_local1 = new CaveSpriteGraphic();
_local1.gotoAndPlay(Math.ceil((Math.random() * _local1.numFrames)));
_local1.alpha = 1;
addChild(_local1);
light = new SpriteLight();
light.active = false;
setMode("wander");
appear();
LightEngineInterface.addLight(light);
}
private function doEffects():void{
var _local1:Number;
var _local2:Number;
alphaVel = (alphaVel + ((Math.random() * (alphaAccel * 2)) - alphaAccel));
alphaVel = Maths.limit(alphaVel, -(maxAlphaVel), maxAlphaVel);
curAlpha = (curAlpha + alphaVel);
if (curAlpha > 1){
curAlpha = 1;
} else {
if (curAlpha < 0){
curAlpha = 0;
};
};
alpha = (curAlpha * modAlpha);
_local1 = (x - light.x);
_local2 = (y - light.y);
light.setAlpha(alpha);
light.setScale(scale);
light.move(_local1, _local2);
}
private function removeListeners():void{
removeEventListener(Event.ENTER_FRAME, wander);
removeEventListener(Event.ENTER_FRAME, chase);
}
function setChasePoint(_arg1:Point):void{
this.chasePoint = _arg1;
}
function setMode(_arg1:String):void{
removeListeners();
addEventListener(Event.ENTER_FRAME, this[_arg1], false, 1, true);
if (_arg1 == "wander"){
maxVel = 3;
accel = 0.3;
};
if (_arg1 == "chase"){
accel = 1.5;
maxVel = 12;
modAlpha = 1;
if (scale < 0.5){
scaleX = (scaleY = (scale = 0.5));
};
light.visible = false;
};
}
override public function remove():void{
removeListeners();
if (light != null){
light.remove();
light = null;
};
super.remove();
}
private function wander(_arg1:Event):void{
var _local2:Point;
velX = (velX + ((Math.random() * (accel * 2)) - accel));
velY = (velY + ((Math.random() * (accel * 2)) - accel));
velX = Maths.limit(velX, -(maxVel), maxVel);
velY = Maths.limit(velY, -(maxVel), maxVel);
x = (x + (velX * scale));
y = (y + (velY * scale));
_local2 = PlayerInterface.getPos();
_local2.y = Maths.limit(_local2.y, 0, maxCenterY);
minX = (_local2.x - widthBuffer);
maxX = (_local2.x + widthBuffer);
minY = (_local2.y - heightBuffer);
maxY = (_local2.y + heightBuffer);
if ((((((((x < minX)) || ((x > maxX)))) || ((y < minY)))) || ((y > maxY)))){
disappear();
};
doEffects();
}
private function appear():void{
relocate();
velX = ((Math.random() * (maxVel * 2)) - maxVel);
velY = ((Math.random() * (maxVel * 2)) - maxVel);
curAlpha = (alpha = 0);
modAlpha = (Math.random() * maxAlpha);
if (modAlpha < 0.25){
modAlpha = 0.25;
};
scale = (scaleX = (scaleY = (Math.random() * 1)));
rotation = (Math.random() * 360);
}
private function disappear():void{
modAlpha = (modAlpha - 0.01);
if (modAlpha <= 0){
appear();
};
}
private function chase(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = (chasePoint.x - x);
_local3 = (chasePoint.y - y);
_local4 = Math.atan2(_local3, _local2);
_local5 = (Math.cos(_local4) * accel);
_local6 = (Math.sin(_local4) * accel);
velX = (velX + _local5);
velY = (velY + _local6);
velX = Maths.limit(velX, -(maxVel), maxVel);
velY = Maths.limit(velY, -(maxVel), maxVel);
x = (x + (velX * scale));
y = (y + (velY * scale));
doEffects();
}
}
}//package effects
Section 35
//Effect (effects.Effect)
package effects {
import basic.*;
public class Effect extends Removable {
protected var minY:int;// = 150
protected var maxY:int;// = 1800
protected var maxX:int;// = 1600
protected var minX:int;// = 800
public function Effect():void{
minX = 800;
maxX = 1600;
minY = 150;
maxY = 1800;
super();
}
function relocate():void{
var _local1:int;
var _local2:int;
_local1 = (maxX - minX);
_local2 = (maxY - minY);
x = ((Math.random() * _local1) + minX);
y = ((Math.random() * _local2) + minY);
}
}
}//package effects
Section 36
//EffectsInterface (effects.EffectsInterface)
package effects {
import basic.*;
import flash.geom.*;
import map.*;
import effects.monsters.*;
public class EffectsInterface {
private static var sparkleArray:Array = new Array();
private static var spriteArray:Array = new Array();
private static var stalkerArray:Array = new Array();
public static function removeSparkles():void{
removeArray(sparkleArray);
sparkleArray = new Array();
}
public static function createCaveSprites(_arg1:int):void{
var _local2:CaveSprite;
var _local3:int;
_local3 = 0;
while (_local3 < _arg1) {
_local2 = new CaveSprite();
MapInterface.addDisplayObject(_local2, "upperEffects");
spriteArray.push(_local2);
_local3++;
};
}
public static function reduce():void{
reduceArray(spriteArray);
reduceArray(sparkleArray);
}
public static function setSpriteChasePoint(_arg1:Point):void{
var _local2:CaveSprite;
var _local3:int;
var _local4:*;
_local3 = spriteArray.length;
_local4 = 0;
while (_local4 < _local3) {
_local2 = spriteArray[_local4];
_local2.setChasePoint(_arg1);
_local4++;
};
}
public static function setSpriteMode(_arg1:String, _arg2:Number):void{
var _local3:CaveSprite;
var _local4:int;
var _local5:Number;
var _local6:*;
_local4 = spriteArray.length;
_local5 = 1;
_local6 = 0;
while (_local6 < _local4) {
if (_local5 >= 1){
_local3 = spriteArray[_local6];
_local3.setMode(_arg1);
_local5--;
};
_local5 = (_local5 + _arg2);
_local6++;
};
}
public static function removeStalkers():void{
removeArray(stalkerArray);
stalkerArray = new Array();
}
public static function createStalkers(_arg1:int):void{
var _local2:Stalker;
var _local3:int;
_local3 = 0;
while (_local3 < _arg1) {
_local2 = new Stalker();
MapInterface.addDisplayObject(_local2, "lowerEffects");
stalkerArray.push(_local2);
_local3++;
};
}
private static function reduceArray(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:Removable;
if (_arg1.length > 0){
_local2 = Math.ceil((_arg1.length / 4));
_local3 = 0;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
_local4.remove();
_local3++;
};
_arg1.splice(0, _local2);
};
}
private static function removeArray(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:Removable;
_local3 = _arg1.length;
_local2 = 0;
while (_local2 < _local3) {
_local4 = _arg1[_local2];
_local4.remove();
_local2++;
};
}
public static function createSparkles(_arg1:int):void{
var _local2:Sparkle;
var _local3:int;
_local3 = 0;
while (_local3 < _arg1) {
_local2 = new Sparkle();
MapInterface.addDisplayObject(_local2, "lowerEffects");
sparkleArray.push(_local2);
_local3++;
};
}
public static function removeCaveSprites():void{
removeArray(spriteArray);
spriteArray = new Array();
}
public static function removeEffects():void{
removeCaveSprites();
removeSparkles();
removeStalkers();
}
}
}//package effects
Section 37
//Sparkle (effects.Sparkle)
package effects {
import flash.utils.*;
public class Sparkle extends Effect {
private var m:SparkleGraphic;
private var timeout:uint;
private var interval:uint;
public function Sparkle():void{
m = new SparkleGraphic();
addChild(m);
minX = 150;
maxX = 1120;
minY = 3400;
maxY = 4830;
timeout = setTimeout(begin, (Math.random() * 1000));
}
override public function remove():void{
clearInterval(interval);
clearTimeout(timeout);
super.remove();
}
private function begin():void{
interval = setInterval(appear, 500);
}
private function appear():void{
relocate();
alpha = Math.random();
if (alpha < 0.25){
alpha = 0.25;
};
scaleX = (scaleY = (Math.random() * 0.115));
if (scaleX < 0.025){
scaleX = (scaleY = 0.025);
};
rotation = (Math.random() * 360);
m.gotoAndPlay("go");
}
}
}//package effects
Section 38
//HitBox (environment.HitBox)
package environment {
import flash.events.*;
import flash.display.*;
import character.*;
import flash.geom.*;
import data.*;
public class HitBox extends MovieClip {
private var push:Number;// = 0
private var damage:Number;// = 0
public function HitBox():void{
push = 0;
damage = 0;
super();
visible = false;
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
addEventListener(Event.REMOVED, remove, false, 0, true);
}
public function remove(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, go);
removeEventListener(Event.REMOVED, remove);
}
public function setPush(_arg1:Number, _arg2:Number):void{
this.push = _arg1;
this.damage = _arg2;
}
private function go(_arg1:Event):void{
var _local2:Point;
var _local3:ControlCharacter;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = new Point(0, 0);
_local3 = PlayerInterface.getPlayer();
if (_local3 != null){
_local2 = _local3.localToGlobal(_local2);
_local4 = this.hitTestPoint(_local2.x, _local2.y, true);
if (_local4){
_local5 = ((rotation + 90) * Maths.DEG_RAD);
_local6 = (Math.cos(_local5) * push);
_local7 = (Math.sin(_local5) * push);
PlayerInterface.setPush(_local6, _local7);
PlayerInterface.incHealth(-(damage));
};
};
}
}
}//package environment
Section 39
//SpriteDropping (environment.SpriteDropping)
package environment {
import flash.events.*;
import basic.*;
import character.*;
import flash.geom.*;
import sounds.*;
import game.hud.*;
import game.*;
import data.*;
public class SpriteDropping extends Removable {
private var tileX:int;
private var tileY:int;
public function SpriteDropping():void{
var _local1:ControlCharacter;
super();
_local1 = PlayerInterface.getPlayer();
_local1.addEventListener(Movable.CHANGE_TILE, onChangeTile, false, 0, true);
tileX = (x / Movable.TILE_SIZE);
tileY = (y / Movable.TILE_SIZE);
addEventListener(Event.REMOVED, onRemoved, false, 0, true);
}
private function onMove(_arg1:Event):void{
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:SpriteDroppingCountGraphic;
_local2 = PlayerInterface.getPos();
_local3 = (x - _local2.x);
_local4 = (y - _local2.y);
_local5 = Maths.pythag(_local3, _local4);
if (_local5 < 25){
_local6 = new SpriteDroppingCountGraphic();
GamePage.spriteDroppings++;
_local6.textBox.text = (GamePage.spriteDroppings + "/49 Sprite Droppings");
BaseClass.kongAPI.stats.submit("spriteDroppings", GamePage.spriteDroppings);
HUD.showDisplay(_local6);
Sounds.startSound(new SpriteDroppingSound(), 0.5);
remove();
if (parent != null){
parent.removeChild(this);
};
};
}
override public function remove():void{
var _local1:ControlCharacter;
_local1 = PlayerInterface.getPlayer();
_local1.removeEventListener(Movable.CHANGE_TILE, onChangeTile);
_local1.removeEventListener(Movable.MOVE, onMove);
removeEventListener(Event.REMOVED, onRemoved);
stop();
}
private function onRemoved(_arg1:Event):void{
remove();
}
private function onChangeTile(_arg1:Event):void{
var _local2:ControlCharacter;
var _local3:Point;
var _local4:Number;
var _local5:Number;
_local2 = PlayerInterface.getPlayer();
_local3 = PlayerInterface.getTile();
_local4 = Math.abs((_local3.x - tileX));
_local5 = Math.abs((_local3.y - tileY));
if ((((_local4 <= 1)) && ((_local5 <= 1)))){
_local2.addEventListener(Movable.MOVE, onMove, false, 0, true);
} else {
_local2.removeEventListener(Movable.MOVE, onMove);
};
}
}
}//package environment
Section 40
//Tunnel (environment.Tunnel)
package environment {
import basic.*;
import flash.utils.*;
public class Tunnel extends Removable {
private var ringInterval:uint;
private var minWaitTime:int;// = 500
private var targetFrameRate:Number;
private var maxWaitTime:int;// = 1100
private var direction:String;
public static var ASCENDING:String = "ascending";
public static var DESCENDING:String = "descending";
public function Tunnel(_arg1:String, _arg2:Boolean=false):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:TunnelRingGraphic;
var _local8:int;
minWaitTime = 500;
maxWaitTime = 1100;
super();
this.direction = _arg1;
targetFrameRate = BaseClass.main.stage.frameRate;
setupNextRingInterval();
if (_arg2){
_local3 = targetFrameRate;
_local4 = 300;
_local5 = ((_local4 / _local3) * 1000);
_local6 = 0;
while (_local6 < _local5) {
_local7 = addRing();
_local8 = (((_local5 - _local6) / 1000) * _local3);
_local7.gotoAndPlay((_local7.currentFrame + _local8));
_local6 = (_local6 + getNextWaitTime(false));
};
};
}
private function ringIntervalFunction():void{
addRing();
setupNextRingInterval();
}
private function setupNextRingInterval():void{
var _local1:int;
_local1 = getNextWaitTime(true);
clearTimeout(ringInterval);
ringInterval = setTimeout(ringIntervalFunction, _local1);
}
private function getNextWaitTime(_arg1:Boolean):int{
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = (minWaitTime + (Math.random() * (maxWaitTime - minWaitTime)));
if (_arg1){
_local3 = 0;
_local4 = (_local3 * (1000 / targetFrameRate));
};
return ((_local2 + _local4));
}
public function stopRings():void{
clearTimeout(ringInterval);
}
private function addRing():TunnelRingGraphic{
var _local1:TunnelRingGraphic;
_local1 = new TunnelRingGraphic();
_local1.rotation = (Math.random() * 360);
if (Math.random() > 0.5){
_local1.scaleX = -1;
};
if (direction == Tunnel.DESCENDING){
addChildAt(_local1, 0);
} else {
addChild(_local1);
};
_local1.gotoAndPlay(direction);
return (_local1);
}
override public function remove():void{
clearTimeout(ringInterval);
super.remove();
}
}
}//package environment
Section 41
//Dialogue (game.hud.Dialogue)
package game.hud {
import flash.display.*;
public class Dialogue extends TextDisplay {
private var m:DialogueGraphic;
public function Dialogue(_arg1:MovieClip, _arg2:String, _arg3:String):void{
m = new DialogueGraphic();
if (_arg1 != null){
m.faceAnim.addChild(_arg1);
_arg1.x = Math.floor(((75 - _arg1.width) / 2));
_arg1.y = (75 - _arg1.height);
};
m.nameAnim.nameBox.text = _arg2;
m.textAnim.textBox.text = "";
addChild(m);
startWritingText(_arg3, m.textAnim.textBox, 1, 30);
}
function beginRemove():void{
m.gotoAndPlay("exit");
}
function replaceDialogue(_arg1:String):void{
m.textAnim.textBox.text = "";
startWritingText(_arg1, m.textAnim.textBox, 1, 30);
}
}
}//package game.hud
Section 42
//Display (game.hud.Display)
package game.hud {
import flash.display.*;
import basic.*;
public class Display extends Removable {
private var m:HudDisplayGraphic;
public function Display(_arg1:DisplayObject):void{
m = new HudDisplayGraphic();
m.holder.addChild(_arg1);
m.bg.bg.width = (_arg1.width + 23);
m.bg.bg.height = (_arg1.height + 8);
addChild(m);
}
function beginRemove():void{
m.gotoAndPlay("exit");
}
}
}//package game.hud
Section 43
//HUD (game.hud.HUD)
package game.hud {
import flash.display.*;
public class HUD {
private static var curDisplay:Display;
private static var curDialogue:Dialogue;
private static var curThought:Thought;
public static function clearDialogue():void{
if (curDialogue != null){
curDialogue.beginRemove();
};
curDialogue = null;
}
public static function remove():void{
if (curDialogue != null){
curDialogue.remove();
};
if (curThought != null){
curThought.remove();
};
if (curDisplay != null){
curDisplay.remove();
};
curDialogue = null;
curThought = null;
curDisplay = null;
}
public static function replaceDialogue(_arg1:String):void{
if (curDialogue == null){
trace((("Error: DialogueInterface -> replaceDialogue(" + _arg1) + "): curDialogue is null"));
} else {
curDialogue.replaceDialogue(_arg1);
};
}
public static function clear():void{
clearDialogue();
clearThought();
clearDisplay();
}
public static function clearThought():void{
if (curThought != null){
curThought.beginRemove();
};
curThought = null;
}
public static function showDisplay(_arg1:DisplayObject):void{
clearDisplay();
if (curDisplay == null){
curDisplay = new Display(_arg1);
};
BaseClass.main.addChild(curDisplay);
}
public static function clearDisplay():void{
if (curDisplay != null){
curDisplay.beginRemove();
curDisplay = null;
};
}
public static function setThought(_arg1:String):void{
clearThought();
curThought = new Thought(_arg1);
BaseClass.main.addChild(curThought);
}
public static function setDialogue(_arg1:MovieClip, _arg2:String, _arg3:String):void{
clearDialogue();
curDialogue = new Dialogue(_arg1, _arg2, _arg3);
BaseClass.main.addChild(curDialogue);
}
}
}//package game.hud
Section 44
//TextDisplay (game.hud.TextDisplay)
package game.hud {
import basic.*;
import flash.text.*;
import flash.utils.*;
public class TextDisplay extends Removable {
private var chunkSize:int;// = 1
private var str:String;
private var textField:TextField;
private var writeInterval:uint;
public function TextDisplay():void{
chunkSize = 1;
super();
}
protected function startWritingText(_arg1:String, _arg2:TextField, _arg3:int=1, _arg4:int=20):void{
this.str = _arg1;
this.chunkSize = _arg3;
this.textField = _arg2;
clearInterval(writeInterval);
writeInterval = setInterval(writeText, _arg4);
writeText();
}
override public function remove():void{
clearInterval(writeInterval);
super.remove();
}
protected function writeText():void{
var _local1:String;
_local1 = str.substr(0, chunkSize);
str = str.substr(chunkSize);
textField.appendText(_local1);
if (str.length <= 0){
clearInterval(writeInterval);
};
}
}
}//package game.hud
Section 45
//Thought (game.hud.Thought)
package game.hud {
import flash.text.*;
public class Thought extends TextDisplay {
private var m:ThoughtGraphic;
public function Thought(_arg1:String):void{
m = new ThoughtGraphic();
m.textAnim.textBox.autoSize = TextFieldAutoSize.LEFT;
m.textAnim.textBox.text = "";
addChild(m);
startWritingText(_arg1, m.textAnim.textBox, 2);
}
override protected function writeText():void{
super.writeText();
m.bgAnim.bg.width = (m.textAnim.width + 24);
}
function beginRemove():void{
m.gotoAndPlay("exit");
}
}
}//package game.hud
Section 46
//EventDriver (game.EventDriver)
package game {
import flash.events.*;
import basic.*;
import character.*;
import flash.geom.*;
import lightEngine.*;
import map.*;
import sounds.*;
import effects.*;
public class EventDriver {
private static var left:Boolean = false;
private static var gotWeapon:Boolean = false;
private static var killedBoss:Boolean = false;
private static var heardAnabel:Boolean = false;
private static var stalker:Boolean = false;
private static var sprites:Boolean = false;
private static var tackled:Boolean = false;
private static var foundAnabel:Boolean = false;
private static var gotFlashlightBack:Boolean = false;
private static var pickedUpWire:Boolean = false;
private static var sparkles:Boolean = false;
public static var everyoneDied:Boolean = false;
private static var noticedWire:Boolean = false;
private static var ambushed:Boolean = false;
private static var returnedWire:Boolean = false;
public static function remove():void{
var _local1:ControlCharacter;
_local1 = PlayerInterface.getPlayer();
if (_local1 != null){
_local1.removeEventListener(Movable.MOVE, onMove);
} else {
trace("Error: game.EventDriver -> remove(): player is null");
};
EffectsInterface.removeEffects();
}
public static function init(_arg1:String):void{
var _local2:ControlCharacter;
remove();
sprites = false;
sparkles = false;
stalker = false;
everyoneDied = false;
noticedWire = false;
pickedUpWire = false;
ambushed = false;
returnedWire = false;
heardAnabel = false;
foundAnabel = false;
tackled = false;
gotFlashlightBack = false;
gotWeapon = false;
killedBoss = false;
left = false;
_local2 = PlayerInterface.getPlayer();
_local2.addEventListener(Movable.MOVE, onMove, false, 0, true);
if ((((((((((_arg1 == "descent")) || ((_arg1 == "openElevator")))) || ((_arg1 == "begin")))) || ((_arg1 == "lightsOut")))) || ((_arg1 == "attack")))){
PlayerInterface.setLight(false);
Music.startGlideToVolume(0, 3);
} else {
PlayerInterface.setLight(true);
PlayerInterface.setCasual(false);
Music.startGlideToVolume(0.75, 5);
};
if ((((_arg1 == "leave")) || ((_arg1 == "reallyLeave")))){
Music.startGlideToVolume(0, 5);
};
if (_arg1 == "descent"){
LightEngineInterface.fadeToAlpha(0.25, 50);
PlayerInterface.setPos(1950, 4730);
};
if ((((_arg1 == "openElevator")) || ((_arg1 == "begin")))){
LightEngineInterface.fadeToAlpha(0.5, 50);
PlayerInterface.setPos(1900, 4740);
};
if ((((((_arg1 == "lightsOut")) || ((_arg1 == "attack")))) || ((_arg1 == "getFlashlight")))){
LightEngineInterface.fadeToAlpha(1, 5);
PlayerInterface.setPos(1915, 3940);
};
if (_arg1 == "noticedWire"){
noticedWire = true;
everyoneDied = true;
PlayerInterface.setPos(1940, 4740);
};
if (_arg1 == "getWire"){
pickedUpWire = true;
everyoneDied = true;
PlayerInterface.setPos(1160, 600);
};
if ((((_arg1 == "ambush")) || ((_arg1 == "trapped")))){
ambushed = true;
pickedUpWire = true;
PlayerInterface.setPos(1200, 1600);
};
if (_arg1 == "returnWire"){
returnedWire = true;
PlayerInterface.setPos(1940, 4740);
};
if (_arg1 == "hearAnabel"){
heardAnabel = true;
PlayerInterface.setPos(1940, 4740);
};
if (_arg1 == "findAnabel"){
foundAnabel = true;
PlayerInterface.setPos(653, 4363);
};
if (_arg1 == "anabelKilledGolem"){
foundAnabel = true;
PlayerInterface.setPos(653, 4363);
};
if (_arg1 == "tackle"){
tackled = true;
PlayerInterface.setPos(1232, 4310);
};
if (_arg1 == "getFlashlightBack"){
gotFlashlightBack = true;
PlayerInterface.setPos(958, 4525);
};
if (_arg1 == "getWeapon"){
gotWeapon = true;
PlayerInterface.setPos(735, 4228);
};
if (_arg1 == "killBoss"){
killedBoss = true;
PlayerInterface.setPos(571, 3174);
};
if ((((_arg1 == "leave")) || ((_arg1 == "reallyLeave")))){
left = true;
PlayerInterface.setPos(1940, 4740);
};
}
private static function onMove(_arg1:Event):void{
var _local2:Point;
var _local3:Point;
_local2 = PlayerInterface.getTile();
_local3 = PlayerInterface.getPos();
if (_local2.y < 23){
if (!sprites){
sprites = true;
EffectsInterface.createCaveSprites(50);
};
} else {
if (sprites){
sprites = false;
EffectsInterface.removeCaveSprites();
};
};
if ((((_local2.x < 12)) && ((_local2.y > 34)))){
if (!sparkles){
sparkles = true;
EffectsInterface.createSparkles(200);
};
} else {
if (sparkles){
sparkles = false;
EffectsInterface.removeSparkles();
};
};
if ((((((((_local2.x > 8)) && ((_local2.x < 20)))) && ((_local2.y > 22)))) && ((_local2.y < 32)))){
if (!stalker){
stalker = true;
EffectsInterface.createStalkers(1);
};
} else {
if (stalker){
stalker = false;
EffectsInterface.removeStalkers();
};
};
if ((((((((((_local2.y >= 46)) && ((_local2.x >= 19)))) && (everyoneDied))) && (!(noticedWire)))) && (!(pickedUpWire)))){
noticedWire = true;
MapInterface.setState("noticeWire");
};
if ((((((((((_local3.x > 1295)) && ((_local3.x < 1336)))) && ((_local3.y > 209)))) && ((_local3.y < 281)))) && (everyoneDied))){
if (!pickedUpWire){
pickedUpWire = true;
MapInterface.setState("getWire");
};
};
if ((((((_local2.y > 9)) && (pickedUpWire))) && (!(ambushed)))){
ambushed = true;
MapInterface.setState("ambush");
};
if ((((((((((((_local3.x > 1996)) && ((_local3.x < 2060)))) && ((_local3.y > 4641)))) && ((_local3.y < 4717)))) && (!(returnedWire)))) && (pickedUpWire))){
returnedWire = true;
MapInterface.setState("returnWire");
};
if ((((((((((((_local3.x > 1845)) && ((_local3.x < 1960)))) && ((_local3.y > 4681)))) && ((_local3.y < 4757)))) && (returnedWire))) && (!(heardAnabel)))){
heardAnabel = true;
MapInterface.setState("hearAnabel");
};
if ((((((((((((_local2.x > 5)) && ((_local2.x < 7)))) && ((_local2.y > 41)))) && ((_local2.y < 44)))) && (heardAnabel))) && (!(foundAnabel)))){
foundAnabel = true;
MapInterface.setState("findAnabel");
};
if ((((((_local2.x > 12)) && (foundAnabel))) && (!(tackled)))){
tackled = true;
MapInterface.setState("tackle");
};
if ((((((((_local2.x == 9)) && ((_local2.y == 45)))) && (tackled))) && (!(gotFlashlightBack)))){
gotFlashlightBack = true;
MapInterface.setState("getFlashlightBack");
};
if ((((((((((((_local3.x > 714)) && ((_local3.x < 770)))) && ((_local3.y > 4205)))) && ((_local3.y < 4242)))) && (gotFlashlightBack))) && (!(gotWeapon)))){
gotWeapon = true;
MapInterface.setState("getWeapon");
};
if ((((((((_local2.x < 8)) && ((_local2.y < 32)))) && (GamePage.defeatedBoss))) && (!(killedBoss)))){
killedBoss = true;
MapInterface.setState("killBoss");
};
if ((((((((((((_local3.x > 1845)) && ((_local3.x < 1960)))) && ((_local3.y > 4681)))) && ((_local3.y < 4757)))) && (killedBoss))) && (!(left)))){
left = true;
MapInterface.setState("leave");
Music.startGlideToVolume(0, 3);
};
}
}
}//package game
Section 47
//GamePage (game.GamePage)
package game {
import flash.display.*;
import camera.*;
import character.*;
import lightEngine.*;
import map.*;
import page.*;
import game.hud.*;
public class GamePage extends Page {
private var screenDrawer:ScreenDrawer;
public static var spriteDroppings:int = 0;
public static var defeatedBoss:Boolean = false;
public function GamePage(_arg1:String=""):void{
var _local2:Sprite;
var _local3:Camera;
var _local4:LightEngine;
var _local5:Map;
var _local6:ControlCharacter;
super();
BaseClass.main.stage.focus = BaseClass.main.stage;
HUD.clear();
GamePage.spriteDroppings = 0;
GamePage.defeatedBoss = false;
_local2 = new Sprite();
addChild(_local2);
CameraInterface.createCamera();
_local3 = CameraInterface.getCamera();
LightEngineInterface.createLightEngine();
_local4 = LightEngineInterface.getLightEngine();
MapInterface.createMap(_arg1);
_local5 = MapInterface.getMap();
PlayerInterface.createPlayer();
_local6 = PlayerInterface.getPlayer();
CameraInterface.setTarget(_local6);
MapInterface.addDisplayObject(_local6, "playerHolder");
_local3.addChild(_local5);
_local3.addChild(_local4);
screenDrawer = new ScreenDrawer(_local3);
addChild(screenDrawer);
EventDriver.init(_arg1);
}
override public function remove():void{
MapInterface.removeMap();
CameraInterface.removeCamera();
LightEngineInterface.removeLightEngine();
PlayerInterface.removePlayer();
EventDriver.remove();
HUD.remove();
screenDrawer.remove();
screenDrawer = null;
GamePage.spriteDroppings = 0;
super.remove();
}
}
}//package game
Section 48
//ScreenDrawer (game.ScreenDrawer)
package game {
import flash.events.*;
import flash.display.*;
import basic.*;
import effects.*;
import data.*;
import flash.utils.*;
public class ScreenDrawer extends Removable {
private var holder2:Sprite;
private var qualityNum:int;// = -1
private var bitmap:Bitmap;
private var qualityInterval:uint;
private var baseFR:Number;// = 30
private var scale:Number;// = -1
private var bitmapData:BitmapData;
private var startMS:Number;
private var frames:Number;// = 0
private var holder:Sprite;
private var framesSkipped:Number;// = 0
private var framesDrawn:Number;// = 0
private var sync:Boolean;// = false
private var graphic:DisplayObject;
public static var instance:ScreenDrawer;
public function ScreenDrawer(_arg1:DisplayObject):void{
var _local2:Stage;
baseFR = 30;
frames = 0;
scale = -1;
qualityNum = -1;
framesDrawn = 0;
framesSkipped = 0;
sync = false;
super();
ScreenDrawer.instance = this;
this.graphic = _arg1;
holder = new Sprite();
holder.addChild(_arg1);
holder2 = new Sprite();
holder2.addChild(holder);
addChild(holder2);
bitmap = new Bitmap();
addChild(bitmap);
setScale(1);
setQuality(3);
addEventListener(Event.ENTER_FRAME, frameHandler, false, 0, true);
_local2 = BaseClass.main.stage;
_local2.frameRate = 30;
qualityInterval = setInterval(adjustQuality, 2000);
resetSync();
}
private function setScale(_arg1:Number):void{
if (_arg1 != this.scale){
this.scale = _arg1;
bitmapData = new BitmapData((550 / _arg1), (400 / _arg1), false, 0);
bitmap.bitmapData = bitmapData;
bitmap.scaleX = (bitmap.scaleY = _arg1);
holder.scaleX = (holder.scaleY = (1 / _arg1));
};
}
public function startSync():void{
resetSync();
sync = true;
}
private function frameHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
frames++;
_local2 = Data.getMS();
_local3 = (_local2 - startMS);
_local4 = (_local3 * (30 / 1000));
_local5 = (frames - _local4);
if ((((_local5 > -2)) || (((Math.round(frames) % 2) == 0)))){
holder.visible = true;
bitmapData.draw(holder2);
holder.visible = false;
framesDrawn++;
} else {
framesSkipped++;
};
if ((((_local5 <= -1)) && (((Math.round(frames) % 2) == 1)))){
BaseClass.main.stage.frameRate = baseFR;
};
}
private function setQuality(_arg1:int):void{
var _local2:Stage;
_arg1 = Maths.limit(_arg1, 1, 3);
if (this.qualityNum != _arg1){
_local2 = BaseClass.main.stage;
if (_arg1 == 3){
_local2.quality = "high";
} else {
if (_arg1 == 2){
_local2.quality = "medium";
} else {
if (_arg1 == 1){
_local2.quality = "low";
};
};
};
this.qualityNum = _arg1;
};
}
private function adjustQuality():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (framesDrawn + framesSkipped);
_local2 = this.qualityNum;
if (_local1 > 0){
_local3 = (framesDrawn / _local1);
if (_local3 > 0.9){
_local2++;
};
if (_local3 < 0.8){
EffectsInterface.reduce();
_local2--;
};
} else {
_local2 = 1;
};
setQuality(_local2);
framesDrawn = (framesDrawn * 0.75);
framesSkipped = (framesSkipped * 0.75);
}
override public function remove():void{
ScreenDrawer.instance = null;
removeEventListener(Event.ENTER_FRAME, frameHandler);
clearInterval(qualityInterval);
bitmapData.dispose();
bitmapData = null;
bitmap = null;
graphic = null;
super.remove();
}
private function resetSync():void{
frames = 0;
startMS = Data.getMS();
}
public function stopSync():void{
resetSync();
sync = false;
}
public static function startSync():void{
instance.startSync();
}
public static function stopSync():void{
instance.stopSync();
}
}
}//package game
Section 49
//BigLight (lightEngine.lights.BigLight)
package lightEngine.lights {
import flash.events.*;
import basic.*;
public class BigLight extends Light {
private var m:BigLightGraphic;
public function BigLight():void{
m = new BigLightGraphic();
addChild(m);
setRadius((75 / 2));
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
}
override public function remove():void{
removeEventListener(Event.ENTER_FRAME, go);
super.remove();
}
private function go(_arg1:Event):void{
m.gotoAndStop(Math.ceil((Math.random() * 100)));
dispatchEvent(new Event(Movable.CHANGE_TILE));
}
}
}//package lightEngine.lights
Section 50
//FlashLight (lightEngine.lights.FlashLight)
package lightEngine.lights {
import flash.utils.*;
public class FlashLight extends Light {
private var flickerTimeout:uint;
private var m:FlashLightGraphic;
private var maxFlickerWait:int;// = 120000
public function FlashLight():void{
maxFlickerWait = 120000;
super();
m = new FlashLightGraphic();
addChild(m);
setRadius(250);
this.tallness = 0.4;
flickerTimeout = setTimeout(flicker, Math.round((Math.random() * maxFlickerWait)));
}
override public function remove():void{
clearTimeout(flickerTimeout);
m = null;
super.remove();
}
private function flicker():void{
clearTimeout(flickerTimeout);
flickerTimeout = setTimeout(flicker, Math.round((Math.random() * maxFlickerWait)));
m.gotoAndPlay(("flicker" + Math.ceil((Math.random() * 3))));
}
}
}//package lightEngine.lights
Section 51
//GolemLight (lightEngine.lights.GolemLight)
package lightEngine.lights {
import flash.events.*;
public class GolemLight extends Light {
private var m:GolemLightGraphic;
public function GolemLight():void{
m = new GolemLightGraphic();
addChild(m);
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
}
override public function remove():void{
removeEventListener(Event.ENTER_FRAME, go);
super.remove();
}
private function go(_arg1:Event):void{
m.gotoAndStop(Math.ceil((Math.random() * 100)));
}
}
}//package lightEngine.lights
Section 52
//Light (lightEngine.lights.Light)
package lightEngine.lights {
import flash.events.*;
import flash.display.*;
import basic.*;
import lightEngine.*;
import lightEngine.things.*;
import flash.utils.*;
public class Light extends Movable {
public var active:Boolean;// = true
private var thingArray:Array;
public var radius:Number;
public var tallness:Number;
private var thingDic:Dictionary;
public function Light():void{
thingArray = new Array();
thingDic = new Dictionary(true);
active = true;
super();
blendMode = BlendMode.ALPHA;
}
public function init(_arg1:Number=100, _arg2:Number=0.5){
setRadius(_arg1);
this.tallness = _arg2;
}
override public function remove():void{
var _local1:Thing;
while (thingArray.length > 0) {
_local1 = thingArray[0];
removeThing(_local1);
};
thingArray = new Array();
thingDic = new Dictionary();
super.remove();
}
public function setRadius(_arg1){
this.radius = _arg1;
}
private function drawShadow(_arg1:Thing):void{
var _local2:Shadow;
var _local3:int;
_local2 = thingDic[_arg1];
if (_local2 != null){
_local2.draw(this, _arg1);
} else {
_local3 = thingArray.indexOf(_arg1);
trace(((((("Error: lightEngine.Light -> drawShadow(" + _arg1) + "): ") + _arg1) + " is not in thingDic. Index in thingArray is: ") + _local3));
removeThing(_arg1);
};
}
public function removeThing(_arg1:Thing):void{
var _local2:int;
var _local3:Shadow;
_local2 = thingArray.indexOf(_arg1);
if (_local2 >= 0){
thingArray.splice(_local2, 1);
_local3 = thingDic[_arg1];
_local3.remove();
delete thingDic[_arg1];
};
_arg1.removeEventListener(Movable.MOVE, onThingMove);
}
public function addThing(_arg1:Thing):void{
var _local2:Shadow;
if (thingDic[_arg1] == null){
thingArray.push(_arg1);
_arg1.addEventListener(Movable.MOVE, onThingMove, false, 0, true);
_local2 = new Shadow();
addChild(_local2);
thingDic[_arg1] = _local2;
drawShadow(_arg1);
};
}
override public function move(_arg1:Number, _arg2:Number):void{
var _local3:int;
var _local4:int;
var _local5:Thing;
super.move(_arg1, _arg2);
_local3 = thingArray.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = thingArray[_local4];
drawShadow(_local5);
_local4++;
};
}
private function onThingMove(_arg1:Event):void{
var _local2:Thing;
_local2 = Thing(_arg1.target);
drawShadow(_local2);
}
}
}//package lightEngine.lights
Section 53
//SmallLight (lightEngine.lights.SmallLight)
package lightEngine.lights {
public class SmallLight extends Light {
public function SmallLight():void{
var _local1:SmallLightGraphic;
super();
_local1 = new SmallLightGraphic();
addChild(_local1);
init(75, 0.35);
}
}
}//package lightEngine.lights
Section 54
//SpriteLight (lightEngine.lights.SpriteLight)
package lightEngine.lights {
public class SpriteLight extends Light {
private var m:SpriteLightGraphic;
public function SpriteLight():void{
m = new SpriteLightGraphic();
addChild(m);
setRadius(25);
}
public function setScale(_arg1:Number):void{
scaleX = (scaleY = _arg1);
setRadius((25 * _arg1));
}
public function setAlpha(_arg1:Number):void{
var _local2:int;
_local2 = (Math.ceil((_arg1 * 100)) + 1);
m.gotoAndStop(_local2);
}
}
}//package lightEngine.lights
Section 55
//ShapeThing (lightEngine.things.ShapeThing)
package lightEngine.things {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import lightEngine.*;
public class ShapeThing extends Thing {
public var p10:empty_mc;
public var tail:MovieClip;
private var moving:Boolean;// = false
public var p11:empty_mc;
public var p1:empty_mc;
public var p2:empty_mc;
public var p3:empty_mc;
public var p5:empty_mc;
public var p9:empty_mc;
public var p7:empty_mc;
public var p4:empty_mc;
public var p6:empty_mc;
private var listenArray:Array;
public var p8:empty_mc;
public var finger1:MovieClip;
public var finger2:MovieClip;
public var finger3:MovieClip;
public function ShapeThing():void{
var _local1:int;
var _local2:MovieClip;
var _local3:Point;
var _local4:Array;
listenArray = new Array();
moving = false;
super();
_local1 = 1;
_local4 = new Array();
while (this[("p" + _local1)] != null) {
_local2 = MovieClip(this[("p" + _local1)]);
_local3 = new Point(_local2.x, _local2.y);
_local4.push(_local3);
_local1++;
};
setPoints(_local4);
addEventListener(Event.ADDED_TO_STAGE, onAdded, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, onRemoved, false, 0, true);
}
private function frameHandler(_arg1:Event):void{
dispatchMove();
}
private function onAdded(_arg1:Event):void{
LightEngineInterface.addThing(this);
}
override public function remove():void{
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
removeEventListener(Event.ENTER_FRAME, frameHandler);
super.remove();
}
private function onRemoved(_arg1:Event):void{
LightEngineInterface.removeThing(this);
removeFromParent = false;
remove();
}
protected function initMovement():void{
if (((!(moving)) && (!(getRemoved())))){
addEventListener(Event.ENTER_FRAME, frameHandler, false, 0, true);
moving = true;
};
}
}
}//package lightEngine.things
Section 56
//Thing (lightEngine.things.Thing)
package lightEngine.things {
import basic.*;
public class Thing extends Movable {
public var lightArray:Array;
public var tallness:Number;// = 0.5
public var pointArray:Array;
public function Thing():void{
pointArray = new Array();
lightArray = new Array();
tallness = 0.5;
super();
}
override public function remove():void{
pointArray = null;
lightArray = null;
super.remove();
}
public function setPoints(_arg1:Array):void{
pointArray = _arg1;
}
}
}//package lightEngine.things
Section 57
//AnimatableLight (lightEngine.AnimatableLight)
package lightEngine {
import flash.events.*;
import basic.*;
import flash.geom.*;
import lightEngine.lights.*;
public class AnimatableLight extends Movable {
private var light:Light;
private var listenArray:Array;
public function AnimatableLight():void{
listenArray = new Array();
super();
}
protected function init(_arg1:Light, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:Boolean=true):void{
this.light = _arg1;
_arg1.active = _arg2;
LightEngineInterface.addLight(_arg1);
visible = _arg3;
addEventListener(Event.REMOVED_FROM_STAGE, onRemove, false, 0, true);
if (_arg4){
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
};
go(new Event(Event.ENTER_FRAME));
}
private function onRemove(_arg1:Event):void{
removeFromParent = false;
remove();
}
override public function remove():void{
removeEventListener(Event.ENTER_FRAME, go);
removeEventListener(Event.REMOVED_FROM_STAGE, onRemove);
if (light != null){
LightEngineInterface.removeLight(light);
light = null;
};
super.remove();
}
private function go(_arg1:Event):void{
var _local2:Point;
var _local3:Number;
var _local4:Number;
_local2 = localToMapPos(new Point(0, 0));
_local3 = (_local2.x - light.x);
_local4 = (_local2.y - light.y);
light.rotation = rotation;
light.scaleX = scaleX;
light.scaleY = scaleY;
light.move(_local3, _local4);
}
}
}//package lightEngine
Section 58
//LightEngine (lightEngine.LightEngine)
package lightEngine {
import flash.events.*;
import flash.display.*;
import basic.*;
import flash.geom.*;
import lightEngine.lights.*;
import lightEngine.things.*;
import data.*;
public class LightEngine extends Fadable {
private var lightArray:Array;
private var thingArray:Array;
private var m:LightEngineGraphic;
public function LightEngine():void{
var _local1:int;
var _local2:int;
lightArray = new Array();
thingArray = new Array();
super();
blendMode = BlendMode.LAYER;
alpha = 1;
_local1 = 2441;
_local2 = 5112;
m = new LightEngineGraphic();
m.width = _local1;
m.height = _local2;
addChild(m);
}
function clearThings():void{
var _local1:Thing;
var _local2:int;
var _local3:int;
_local2 = thingArray.length;
_local3 = 0;
while (_local3 < _local2) {
_local1 = thingArray[_local3];
removeThing(_local1);
_local3++;
};
}
function addLight(_arg1:Light):void{
addChild(_arg1);
lightArray.push(_arg1);
_arg1.addEventListener(Movable.CHANGE_TILE, onLightChangeTile, false, 0, true);
findThingsTouchingLight(_arg1);
}
private function testTouching(_arg1:Light, _arg2:Thing){
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local3 = new Point(0, 0);
_local4 = new Point(0, 0);
_local3 = _arg2.localToGlobal(_local3);
_local4 = _arg1.localToGlobal(_local4);
_local5 = (_local3.x - _local4.x);
_local6 = (_local3.y - _local4.y);
_local7 = Maths.pythag(_local5, _local6);
if (_local7 < (_arg1.radius + 100)){
_arg1.addThing(_arg2);
} else {
_arg1.removeThing(_arg2);
};
}
function setAlpha(_arg1:Number):void{
this.alpha = _arg1;
}
private function onThingChangeTile(_arg1:Event){
var _local2:Thing;
_local2 = Thing(_arg1.target);
findLightsTouchingThing(_local2);
}
private function onLightChangeTile(_arg1:Event){
var _local2:Light;
_local2 = Light(_arg1.target);
if (_local2.active){
findThingsTouchingLight(_local2);
};
}
override public function remove():void{
clearLights();
clearThings();
lightArray = new Array();
thingArray = new Array();
super.remove();
}
function setBGFrame(_arg1:int){
m.gotoAndStop(_arg1);
}
function removeThing(_arg1:Thing):void{
var _local2:int;
var _local3:Light;
var _local4:int;
var _local5:int;
_local2 = thingArray.indexOf(_arg1);
if (_local2 != -1){
thingArray.splice(_local2, 1);
_local5 = lightArray.length;
_local4 = 0;
while (_local4 < _local5) {
_local3 = lightArray[_local4];
_local3.removeThing(_arg1);
_local4++;
};
} else {
trace((("Error: LightEngine -> removeThing(" + _arg1) + "): this thing is not in the thingArray"));
};
}
function clearLights():void{
var _local1:Light;
var _local2:int;
var _local3:int;
_local2 = lightArray.length;
_local3 = 0;
while (_local3 < _local2) {
_local1 = lightArray[_local3];
removeLight(_local1);
_local3++;
};
}
function addThing(_arg1:Thing):void{
var _local2:int;
_local2 = thingArray.indexOf(_arg1);
if (_local2 == -1){
thingArray.push(_arg1);
_arg1.addEventListener(Movable.CHANGE_TILE, onThingChangeTile, false, 0, true);
findLightsTouchingThing(_arg1);
} else {
trace((("Error: LightEngine -> addThing(" + _arg1) + "): this thing is already in the thingArray."));
};
}
private function findThingsTouchingLight(_arg1:Light):void{
var _local2:Thing;
var _local3:int;
var _local4:int;
_local4 = thingArray.length;
_local3 = 0;
while (_local3 < _local4) {
_local2 = thingArray[_local3];
testTouching(_arg1, _local2);
_local3++;
};
}
private function findLightsTouchingThing(_arg1:Thing):void{
var _local2:Light;
var _local3:int;
var _local4:int;
_local4 = lightArray.length;
_local3 = 0;
while (_local3 < _local4) {
_local2 = lightArray[_local3];
if (_local2.active){
testTouching(_local2, _arg1);
};
_local3++;
};
}
function removeLight(_arg1:Light):void{
var _local2:int;
_local2 = lightArray.indexOf(_arg1);
if (_local2 != -1){
lightArray.splice(_local2, 1);
} else {
trace((("Error: LightEngine -> removeLight(" + _arg1) + "): this light is not in the lightArray"));
};
if (_arg1 != null){
_arg1.remove();
};
}
}
}//package lightEngine
Section 59
//LightEngineInterface (lightEngine.LightEngineInterface)
package lightEngine {
import lightEngine.lights.*;
import lightEngine.things.*;
public class LightEngineInterface {
private static var leRef:LightEngine;
public static function createLightEngine():void{
removeLightEngine();
leRef = new LightEngine();
}
public static function setBGFrame(_arg1:int):void{
if (leRef == null){
trace((("Error: LightEngineInterface -> setBGFrame(" + _arg1) + "): leRef is null"));
} else {
leRef.setBGFrame(_arg1);
};
}
public static function fadeToAlpha(_arg1:Number, _arg2:int):void{
if (leRef == null){
trace((((("Error: LightEngineInterface -> fadeToAlpha(" + _arg1) + ", ") + _arg2) + ") leRef is null"));
} else {
leRef.fadeToAlpha(_arg1, _arg2);
};
}
public static function getLightEngine():LightEngine{
if (leRef == null){
trace("Error: LightEngineInterface -> getLightEngine: leRef is null");
};
return (leRef);
}
public static function removeThing(_arg1:Thing):void{
if (leRef == null){
trace((("Error: LightEngineInterface -> removeThing(" + _arg1) + "): leRef is null"));
} else {
leRef.removeThing(_arg1);
};
}
public static function addThing(_arg1:Thing):void{
if (leRef == null){
trace("Error: LightEngineInterface -> addThing: leRef is null");
} else {
leRef.addThing(_arg1);
};
}
public static function clearLights():void{
if (leRef == null){
trace("Error: LightEngineInterface -> clearLights() leRef is null");
} else {
leRef.clearLights();
};
}
public static function removeLight(_arg1:Light):void{
if (leRef == null){
trace((("Error: LightEngineInterface -> removeLight(" + _arg1) + "): leRef is null"));
} else {
leRef.removeLight(_arg1);
};
}
public static function addLight(_arg1:Light):void{
if (leRef == null){
trace("Error: LightEngineInterface -> addLight: leRef is null");
} else {
leRef.addLight(_arg1);
};
}
public static function clearThings():void{
if (leRef == null){
trace("Error: LightEngineInterface -> clearThings() leRef is null");
} else {
leRef.clearThings();
};
}
public static function removeLightEngine():void{
if (leRef != null){
leRef.remove();
};
leRef = null;
}
public static function setAlpha(_arg1:Number):void{
if (leRef == null){
trace((("Error: LightEngineInterface -> setAlpha(" + _arg1) + ") leRef is null"));
} else {
leRef.setAlpha(_arg1);
};
}
}
}//package lightEngine
Section 60
//Shadow (lightEngine.Shadow)
package lightEngine {
import basic.*;
import flash.geom.*;
import lightEngine.lights.*;
import lightEngine.things.*;
import data.*;
public class Shadow extends Removable {
public function Shadow():void{
}
public function draw(_arg1:Light, _arg2:Thing):void{
var _local3:Number;
var _local4:Point;
var _local5:Point;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Array;
var _local12:int;
var _local13:int;
var _local14:Point;
var _local15:Point;
var _local16:SuperPoint;
var _local17:Number;
var _local18:Number;
var _local19:int;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:SuperPoint;
var _local24:SuperPoint;
var _local25:SuperPoint;
var _local26:SuperPoint;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:int;
var _local31:int;
var _local32:int;
var _local33:Number;
var _local34:Number;
graphics.clear();
if (_arg2.pointArray.length > 0){
_local3 = (_arg1.radius - 1);
_local4 = new Point(0, 0);
_local5 = new Point(0, 0);
_local4 = _arg2.localToGlobal(_local4);
_local5 = _arg1.localToGlobal(_local5);
_local6 = (_local4.x - _local5.x);
_local7 = (_local4.y - _local5.y);
_local8 = Maths.pythag(_local6, _local7);
_local9 = ((_local3 - _local8) / _local3);
alpha = (1 - _local9);
alpha = (alpha * _arg2.tallness);
alpha = (alpha + ((1 - _arg1.tallness) - 0.5));
if (_arg2.tallness >= 1){
alpha = 1;
};
if (alpha > 0.05){
_local10 = new Array();
_local11 = new Array();
_local12 = _arg2.pointArray.length;
_local13 = 0;
while (_local13 < _local12) {
_local14 = _arg2.pointArray[_local13];
_local15 = this.globalToLocal(_arg2.localToGlobal(_local14));
_local17 = Math.atan2(_local15.y, _local15.x);
_local16 = new SuperPoint(_local15.x, _local15.y);
_local16.angle = _local17;
_local16.index = _local13;
_local18 = Maths.pythag(_local16.x, _local16.y);
if (_local18 > _local3){
_local16.x = (Math.cos(_local17) * _local3);
_local16.y = (Math.sin(_local17) * _local3);
};
_local10.push(_local16);
_local11.push(_local16);
_local13++;
};
_local11.sortOn("angle", Array.NUMERIC);
_local19 = (_local12 - 1);
_local22 = 0;
_local13 = 0;
while (_local13 < _local12) {
_local23 = _local11[_local13];
_local24 = _local11[_local19];
_local20 = (_local23.angle - _local24.angle);
if (_local13 == 0){
_local20 = ((Math.PI * 2) + _local20);
};
_local21 = Math.abs(_local20);
if (_local21 > _local22){
_local27 = (_local23.angle - _local24.angle);
_local22 = _local21;
_local25 = _local23;
_local26 = _local24;
};
_local19 = _local13;
_local13++;
};
_local28 = _local25.angle;
_local29 = _local26.angle;
_local30 = _local25.index;
_local31 = _local26.index;
graphics.beginFill(0);
graphics.moveTo(_local25.x, _local25.y);
graphics.lineTo((Math.cos(_local28) * _local3), (Math.sin(_local28) * _local3));
_local32 = 5;
_local33 = (((Math.PI * 2) - _local22) / _local32);
_local34 = _local28;
_local13 = 0;
while (_local13 < _local32) {
_local34 = (_local34 + _local33);
graphics.lineTo((Math.cos(_local34) * _local3), (Math.sin(_local34) * _local3));
_local13++;
};
graphics.lineTo((Math.cos(_local29) * _local3), (Math.sin(_local29) * _local3));
graphics.lineTo(_local26.x, _local26.y);
_local13 = (_local31 + 1);
_local12 = _local10.length;
_local13 = _local31;
while (_local13 != (_local30 + 1)) {
if (_local13 >= _local12){
_local13 = 0;
};
_local14 = _local10[_local13];
graphics.lineTo(_local14.x, _local14.y);
_local13++;
};
graphics.endFill();
};
};
}
override public function remove():void{
graphics.clear();
super.remove();
}
}
}//package lightEngine
Section 61
//SuperPoint (lightEngine.SuperPoint)
package lightEngine {
import flash.geom.*;
public class SuperPoint extends Point {
public var index:int;
public var angle:Number;
public function SuperPoint(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package lightEngine
Section 62
//Map (map.Map)
package map {
import flash.events.*;
import flash.display.*;
import basic.*;
import flash.geom.*;
public class Map extends Removable {
private var m:MapGraphic;
public function Map(_arg1:String):void{
m = new MapGraphic();
m.walls.visible = false;
m.gotoAndPlay(_arg1);
addChild(m);
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
}
function setState(_arg1:String):void{
m.gotoAndPlay(_arg1);
}
override public function remove():void{
m.stop();
removeEventListener(Event.ENTER_FRAME, go);
super.remove();
removeChildren(this);
}
function addDisplayObject(_arg1:DisplayObject, _arg2:String){
var _local3:DisplayObjectContainer;
_local3 = m[_arg2];
if (_local3 != null){
_local3.addChild(_arg1);
} else {
trace((((("Error: map.Map -> addDisplayObject(" + _arg1) + ", ") + _arg2) + "): specified location is null."));
};
}
function setBGFrame(_arg1:int):void{
if (m.wallCover != null){
m.wallCover.gotoAndStop(_arg1);
};
}
private function initCharacters():void{
initCharacter("stonerGuy");
initCharacter("stonerGirl");
initCharacter("anabel");
initCharacter("dad");
initCharacter("mom");
initCharacter("daughter");
initCharacter("granny");
initCharacter("tourGuide");
}
function wallHitTest(_arg1:DisplayObject):Boolean{
var _local2:Boolean;
var _local3:Point;
_local2 = false;
if (m.walls != null){
_local3 = new Point(0, 0);
_local3 = _arg1.localToGlobal(_local3);
_local2 = m.walls.hitTestPoint(_local3.x, _local3.y, true);
};
return (_local2);
}
private function go(_arg1:Event):void{
initCharacters();
}
function initCharacter(_arg1:String):void{
var _local2:*;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:String;
_local2 = m[_arg1];
if (_local2 != null){
_local3 = new Array("head", "chest", "bum", "rightShoulder", "rightUpperArm", "rightLowerArm", "rightHand", "rightUpperLeg", "rightLowerLeg", "rightFoot", "leftShoulder", "leftUpperArm", "leftLowerArm", "leftHand", "leftUpperLeg", "leftLowerLeg", "leftFoot");
_local5 = _local3.length;
_local4 = 0;
while (_local4 < _local5) {
_local6 = _local3[_local4];
if (_local2[_local6] != null){
_local2[_local6].gotoAndStop(_arg1);
};
_local4++;
};
};
}
}
}//package map
Section 63
//MapInterface (map.MapInterface)
package map {
import flash.display.*;
public class MapInterface {
private static var mapRef:Map;
public static function createMap(_arg1:String="descent"):void{
removeMap();
mapRef = new Map(_arg1);
}
public static function getMap():Map{
if (mapRef == null){
trace("Error: MapInterface -> getMap(): mapRef is null");
};
return (mapRef);
}
public static function removeMap():void{
if (mapRef != null){
mapRef.remove();
};
mapRef = null;
}
public static function addDisplayObject(_arg1:DisplayObject, _arg2:String):void{
if (mapRef == null){
trace((((("Error: MapInterface -> addDisplayObject(" + _arg1) + ", ") + _arg2) + "): mapRef is null"));
} else {
mapRef.addDisplayObject(_arg1, _arg2);
};
}
public static function wallHitTest(_arg1:DisplayObject):Boolean{
if (mapRef != null){
return (mapRef.wallHitTest(_arg1));
};
trace("Error: MapInterface -> wallHitTest(): mapRef is null");
return (false);
}
public static function setBGFrame(_arg1:int):void{
if (mapRef == null){
trace((("Error: MapInterface -> setBGState(" + _arg1) + "): mapRef is null"));
} else {
mapRef.setBGFrame(_arg1);
};
}
public static function setState(_arg1:String):void{
if (mapRef == null){
trace((("Error: MapInterface -> setState(" + _arg1) + "): mapRef is null"));
} else {
mapRef.setState(_arg1);
};
}
}
}//package map
Section 64
//Credits (menu.Credits)
package menu {
import flash.events.*;
import basic.*;
import popups.*;
import flash.net.*;
public class Credits extends Removable {
public var m:CreditsGraphic;
public function Credits():void{
m = new CreditsGraphic();
m.andy1Button.addEventListener(MouseEvent.CLICK, clickAndy, false, 0, true);
m.andy2Button.addEventListener(MouseEvent.CLICK, clickAndy, false, 0, true);
m.micheleButton.addEventListener(MouseEvent.CLICK, clickMichele, false, 0, true);
m.lani1Button.addEventListener(MouseEvent.CLICK, clickLani, false, 0, true);
m.lani2Button.addEventListener(MouseEvent.CLICK, clickLani, false, 0, true);
m.lani3Button.addEventListener(MouseEvent.CLICK, clickLani, false, 0, true);
m.lani4Button.addEventListener(MouseEvent.CLICK, clickLani, false, 0, true);
m.johnButton.addEventListener(MouseEvent.CLICK, clickJohn, false, 0, true);
m.jiggminButton.addEventListener(MouseEvent.CLICK, clickJiggmin, false, 0, true);
m.musicButton.addEventListener(MouseEvent.CLICK, clickMusic, false, 0, true);
addChild(m);
}
private function clickJiggmin(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://jiggmin.com"), "_blank");
}
private function clickAndy(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.ediblecastle.com/"), "_blank");
}
private function clickMichele(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://voice123.com/michelesantopietro"), "_blank");
}
override public function remove():void{
m.andy1Button.removeEventListener(MouseEvent.CLICK, clickAndy);
m.andy2Button.removeEventListener(MouseEvent.CLICK, clickAndy);
m.micheleButton.removeEventListener(MouseEvent.CLICK, clickMichele);
m.lani1Button.removeEventListener(MouseEvent.CLICK, clickLani);
m.lani2Button.removeEventListener(MouseEvent.CLICK, clickLani);
m.lani3Button.removeEventListener(MouseEvent.CLICK, clickLani);
m.lani4Button.removeEventListener(MouseEvent.CLICK, clickLani);
m.johnButton.removeEventListener(MouseEvent.CLICK, clickJohn);
m.jiggminButton.removeEventListener(MouseEvent.CLICK, clickJiggmin);
m.musicButton.removeEventListener(MouseEvent.CLICK, clickMusic);
ContainerPopup(parent.parent.parent).remove();
super.remove();
}
private function clickMusic(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://chrispington.newgrounds.com/"), "_blank");
}
private function clickLani(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://voice123.com/laniminella"), "_blank");
}
private function clickJohn(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://voice123.com/johnweitz"), "_blank");
}
}
}//package menu
Section 65
//EndPage (menu.EndPage)
package menu {
import flash.events.*;
import page.*;
import sounds.*;
import popups.*;
import flash.utils.*;
import flash.net.*;
public class EndPage extends Page {
private var curSprite:int;
private var sprites:int;
private var m:EndPageGraphic;
private var spriteInterval:uint;
public function EndPage(_arg1:int):void{
this.sprites = _arg1;
BaseClass.main.stage.frameRate = 16;
BaseClass.main.stage.quality = "high";
m = new EndPageGraphic();
m.fadeAnim.mouseChildren = false;
m.fadeAnim.mouseEnabled = false;
addChild(m);
m.playAgainButton.addEventListener(MouseEvent.CLICK, clickPlayAgain, false, 0, true);
m.moreGamesButton.addEventListener(MouseEvent.CLICK, clickMoreGames, false, 0, true);
m.addToWebsiteButton.addEventListener(MouseEvent.CLICK, clickAddToWebsite, false, 0, true);
m.anabelBioButton.addEventListener(MouseEvent.CLICK, clickAnabelBio, false, 0, true);
m.paulieBioButton.addEventListener(MouseEvent.CLICK, clickPaulieBio, false, 0, true);
m.deletedSceneButton.addEventListener(MouseEvent.CLICK, clickDeletedScene, false, 0, true);
m.tourGuideBioButton.addEventListener(MouseEvent.CLICK, clickTourGuideBio, false, 0, true);
m.dBioButton.addEventListener(MouseEvent.CLICK, clickDBio, false, 0, true);
m.nedBioButton.addEventListener(MouseEvent.CLICK, clickNedBio, false, 0, true);
m.secretInfoButton.addEventListener(MouseEvent.CLICK, clickSecretInfo, false, 0, true);
m.anabelBioButton.visible = false;
m.paulieBioButton.visible = false;
m.deletedSceneButton.visible = false;
m.tourGuideBioButton.visible = false;
m.dBioButton.visible = false;
m.nedBioButton.visible = false;
m.secretInfoButton.visible = false;
m.checkBox1.textBox.text = "Anabel Bio";
m.checkBox2.textBox.text = "Paulie Bio";
m.checkBox3.textBox.text = "Deleted Scene";
m.checkBox4.textBox.text = "Tour Guide Bio";
m.checkBox5.textBox.text = "D Bio";
m.checkBox6.textBox.text = "Ned Bio";
m.checkBox7.textBox.text = "???";
spriteInterval = setInterval(applySpriteCount, 100);
applySpriteCount();
}
private function clickNedBio(_arg1:MouseEvent):void{
new ContainerPopup(new NedBioGraphic());
}
private function clickPlayAgain(_arg1:MouseEvent):void{
BaseClass.main.setPage(new MenuPage());
}
private function applySpriteCount():void{
if (curSprite < sprites){
curSprite++;
m.spriteBox.text = curSprite.toString();
if (curSprite == 1){
m.checkBox1.gotoAndPlay("check");
m.anabelBioButton.visible = true;
};
if (curSprite == 10){
m.checkBox2.gotoAndPlay("check");
m.paulieBioButton.visible = true;
};
if (curSprite == 15){
m.checkBox3.gotoAndPlay("check");
m.deletedSceneButton.visible = true;
};
if (curSprite == 20){
m.checkBox4.gotoAndPlay("check");
m.tourGuideBioButton.visible = true;
};
if (curSprite == 30){
m.checkBox5.gotoAndPlay("check");
m.dBioButton.visible = true;
};
if (curSprite == 40){
m.checkBox6.gotoAndPlay("check");
m.nedBioButton.visible = true;
};
if (curSprite == 49){
m.checkBox7.gotoAndPlay("check");
m.secretInfoButton.visible = true;
};
} else {
clearInterval(spriteInterval);
Sounds.startSound(new AnabelPooSound(), 0.65);
};
}
private function clickAnabelBio(_arg1:MouseEvent):void{
new ContainerPopup(new AnabelBioGraphic());
}
private function clickSecretInfo(_arg1:MouseEvent):void{
new ContainerPopup(new SecretInfoGraphic());
}
private function clickPaulieBio(_arg1:MouseEvent):void{
new ContainerPopup(new PaulieBioGraphic());
}
override public function remove():void{
m.playAgainButton.removeEventListener(MouseEvent.CLICK, clickPlayAgain);
m.moreGamesButton.removeEventListener(MouseEvent.CLICK, clickMoreGames);
m.addToWebsiteButton.removeEventListener(MouseEvent.CLICK, clickAddToWebsite);
m.anabelBioButton.removeEventListener(MouseEvent.CLICK, clickAnabelBio);
m.paulieBioButton.removeEventListener(MouseEvent.CLICK, clickPaulieBio);
m.deletedSceneButton.removeEventListener(MouseEvent.CLICK, clickDeletedScene);
m.tourGuideBioButton.removeEventListener(MouseEvent.CLICK, clickTourGuideBio);
m.dBioButton.removeEventListener(MouseEvent.CLICK, clickDBio);
m.nedBioButton.removeEventListener(MouseEvent.CLICK, clickNedBio);
m.secretInfoButton.removeEventListener(MouseEvent.CLICK, clickSecretInfo);
clearInterval(spriteInterval);
super.remove();
}
private function clickAddToWebsite(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://jiggmin.com/downloads"), "_blank");
}
private function clickDBio(_arg1:MouseEvent):void{
new ContainerPopup(new DBioGraphic());
}
private function clickDeletedScene(_arg1:MouseEvent):void{
new ContainerPopup(new DeletedSceneGraphic());
}
private function clickTourGuideBio(_arg1:MouseEvent):void{
new ContainerPopup(new TourGuideBioGraphic());
}
private function clickMoreGames(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://jiggmin.com"), "_blank");
}
}
}//package menu
Section 66
//IntroPage (menu.IntroPage)
package menu {
import flash.events.*;
import page.*;
public class IntroPage extends Page {
private var m:IntroPageGraphic;
public function IntroPage():void{
m = new IntroPageGraphic();
addChild(m);
BaseClass.main.stage.addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true);
}
override public function remove():void{
m.stop();
BaseClass.main.stage.removeEventListener(MouseEvent.CLICK, clickHandler);
super.remove();
}
private function clickHandler(_arg1:MouseEvent):void{
BaseClass.main.setPage(new MenuPage());
}
}
}//package menu
Section 67
//MenuPage (menu.MenuPage)
package menu {
import flash.events.*;
import page.*;
import sounds.*;
import game.*;
import popups.*;
import flash.net.*;
public class MenuPage extends Page {
private var m:MenuPageGraphic;
public function MenuPage():void{
BaseClass.main.stage.frameRate = 16;
BaseClass.main.stage.quality = "high";
m = new MenuPageGraphic();
m.fadeAnim.mouseEnabled = false;
m.fadeAnim.mouseChildren = false;
addChild(m);
Music.startMusic();
Music.setVolume(1);
m.startButton.addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true);
m.addButton.addEventListener(MouseEvent.CLICK, clickAdd, false, 0, true);
m.awesomeButton.addEventListener(MouseEvent.CLICK, clickAwesome, false, 0, true);
m.sceneButton.addEventListener(MouseEvent.CLICK, clickScene, false, 0, true);
m.creditsButton.addEventListener(MouseEvent.CLICK, clickCredits, false, 0, true);
}
private function clickCredits(_arg1:MouseEvent):void{
new ContainerPopup(new Credits());
}
private function clickScene(_arg1:MouseEvent):void{
BaseClass.main.openSceneSelection();
}
override public function remove():void{
m.startButton.removeEventListener(MouseEvent.CLICK, clickHandler);
m.addButton.removeEventListener(MouseEvent.CLICK, clickAdd);
m.awesomeButton.removeEventListener(MouseEvent.CLICK, clickAwesome);
m.sceneButton.removeEventListener(MouseEvent.CLICK, clickScene);
m.creditsButton.removeEventListener(MouseEvent.CLICK, clickCredits);
m.stop();
removeChild(m);
m = null;
super.remove();
}
private function clickHandler(_arg1:MouseEvent):void{
BaseClass.main.setPage(new GamePage("descent"));
}
private function clickAwesome(_arg1:MouseEvent):void{
m.awesomeAnim.gotoAndPlay("start");
}
private function clickAdd(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://jiggmin.com/downloads"), "_blank");
}
}
}//package menu
Section 68
//Preloader (menu.Preloader)
package menu {
import flash.events.*;
import flash.display.*;
public class Preloader extends Sprite {
private var rootRef:DisplayObject;
private var m:PreloaderGraphic;
public function Preloader(_arg1:DisplayObject):void{
this.rootRef = _arg1;
m = new PreloaderGraphic();
addChild(m);
addEventListener(Event.ENTER_FRAME, frameHandler, false, 0, true);
}
private function frameHandler(_arg1:Event):void{
if (rootRef.loaderInfo.bytesLoaded == rootRef.loaderInfo.bytesTotal){
remove();
MovieClip(parent).play();
} else {
m.gotoAndStop(Math.ceil(((rootRef.loaderInfo.bytesLoaded / rootRef.loaderInfo.bytesTotal) * 100)));
};
}
public function remove():void{
removeEventListener(Event.ENTER_FRAME, frameHandler);
removeChild(m);
m = null;
rootRef = null;
}
}
}//package menu
Section 69
//SceneSelection (menu.SceneSelection)
package menu {
import flash.events.*;
import basic.*;
import page.*;
import game.*;
import popups.*;
import ui.*;
public class SceneSelection extends Removable {
public function SceneSelection():void{
var _local1:*;
var _local2:*;
var _local3:int;
var _local4:int;
var _local5:String;
var _local6:String;
var _local7:TextButton;
var _local8:int;
var _local9:int;
super();
_local1 = new Array("descent", "begin", "lightsOut", "attack", "getFlashlight", "getWire", "ambush", "returnWire", "hearAnabel", "findAnabel", "tackle", "getWeapon", "killBoss", "leave", "reallyLeave");
_local2 = new Array("Unfortunate Descent", "The Tour Begins", "Lights Out", "Unfortunate Eating", "The Game Begins", "Find Wire", "Trapped", "Return Wire", "Anabel Swears a Lot", "Anabel Kills Monsters", "Monster Tackle", "Get a Weapon", "Tasty Munch", "Escape", "Escape for Real This Time!");
_local3 = _local1.length;
_local8 = 20;
_local9 = 0;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _local1[_local4];
_local6 = _local2[_local4];
_local7 = new TextButton(_local6);
_local7.y = _local9;
_local7.frameStr = _local5;
_local9 = (_local9 + _local8);
addChild(_local7);
_local7.addEventListener(MouseEvent.CLICK, onButtonClick, false, 0, true);
_local4++;
};
addEventListener(Event.REMOVED_FROM_STAGE, removedHandler, false, 0, true);
}
private function onButtonClick(_arg1:MouseEvent):void{
BaseClass.main.setPage(new Page());
BaseClass.main.setPage(new GamePage(_arg1.target.frameStr));
ContainerPopup(parent.parent.parent).remove();
remove();
}
override public function remove():void{
BaseClass.main.removeSceneSelection();
super.remove();
}
private function removedHandler(_arg1:Event):void{
removeFromParent = false;
remove();
}
}
}//package menu
Section 70
//anabelBum_27 (neverending_light_fla.anabelBum_27)
package neverending_light_fla {
import flash.display.*;
public dynamic class anabelBum_27 extends MovieClip {
public function anabelBum_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 71
//anabelFoot_24 (neverending_light_fla.anabelFoot_24)
package neverending_light_fla {
import flash.display.*;
public dynamic class anabelFoot_24 extends MovieClip {
public function anabelFoot_24(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 72
//anabelHand_30 (neverending_light_fla.anabelHand_30)
package neverending_light_fla {
import flash.display.*;
public dynamic class anabelHand_30 extends MovieClip {
public function anabelHand_30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 73
//anabelLowerArm_31 (neverending_light_fla.anabelLowerArm_31)
package neverending_light_fla {
import flash.display.*;
public dynamic class anabelLowerArm_31 extends MovieClip {
public function anabelLowerArm_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 74
//anabelShoulder_33 (neverending_light_fla.anabelShoulder_33)
package neverending_light_fla {
import flash.display.*;
public dynamic class anabelShoulder_33 extends MovieClip {
public function anabelShoulder_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 75
//anabelUpperArm_32 (neverending_light_fla.anabelUpperArm_32)
package neverending_light_fla {
import flash.display.*;
public dynamic class anabelUpperArm_32 extends MovieClip {
public function anabelUpperArm_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 76
//anabelUpperLeg_25 (neverending_light_fla.anabelUpperLeg_25)
package neverending_light_fla {
import flash.display.*;
public dynamic class anabelUpperLeg_25 extends MovieClip {
public function anabelUpperLeg_25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 77
//armStandAnim_89 (neverending_light_fla.armStandAnim_89)
package neverending_light_fla {
import flash.display.*;
public dynamic class armStandAnim_89 extends MovieClip {
public var hand:MovieClip;
public function armStandAnim_89(){
addFrameScript(0, frame1, 40, frame41);
}
function frame1(){
gotoAndStop("middle");
}
function frame41(){
stop();
}
}
}//package neverending_light_fla
Section 78
//bgAnim_232 (neverending_light_fla.bgAnim_232)
package neverending_light_fla {
import flash.display.*;
import flash.media.*;
public dynamic class bgAnim_232 extends MovieClip {
public var bg:Video;
}
}//package neverending_light_fla
Section 79
//casualShuffle_88 (neverending_light_fla.casualShuffle_88)
package neverending_light_fla {
import flash.display.*;
public dynamic class casualShuffle_88 extends MovieClip {
public function casualShuffle_88(){
addFrameScript(27, frame28);
}
function frame28(){
gotoAndPlay("repeat");
}
}
}//package neverending_light_fla
Section 80
//checkBoxAnim_246 (neverending_light_fla.checkBoxAnim_246)
package neverending_light_fla {
import flash.display.*;
import flash.text.*;
public dynamic class checkBoxAnim_246 extends MovieClip {
public var textBox:TextField;
public function checkBoxAnim_246(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package neverending_light_fla
Section 81
//dialogueName_107 (neverending_light_fla.dialogueName_107)
package neverending_light_fla {
import flash.display.*;
import flash.text.*;
public dynamic class dialogueName_107 extends MovieClip {
public var nameBox:TextField;
}
}//package neverending_light_fla
Section 82
//dialogueText_106 (neverending_light_fla.dialogueText_106)
package neverending_light_fla {
import flash.display.*;
import flash.text.*;
public dynamic class dialogueText_106 extends MovieClip {
public var textBox:TextField;
}
}//package neverending_light_fla
Section 83
//displayBGResize_110 (neverending_light_fla.displayBGResize_110)
package neverending_light_fla {
import flash.display.*;
public dynamic class displayBGResize_110 extends MovieClip {
public var bg:MovieClip;
}
}//package neverending_light_fla
Section 84
//export_everything_1 (neverending_light_fla.export_everything_1)
package neverending_light_fla {
import flash.display.*;
public dynamic class export_everything_1 extends MovieClip {
public function export_everything_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 85
//feetStandAnim_87 (neverending_light_fla.feetStandAnim_87)
package neverending_light_fla {
import flash.display.*;
public dynamic class feetStandAnim_87 extends MovieClip {
public function feetStandAnim_87(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 86
//fightAnim_194 (neverending_light_fla.fightAnim_194)
package neverending_light_fla {
import flash.display.*;
public dynamic class fightAnim_194 extends MovieClip {
public var chest:GirlRunningChestThing;
public var leftFoot:MovieClip;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperLeg:MovieClip;
public var rightUpperLeg:MovieClip;
public var chest2:AnabelChestThing;
public var leftLowerLeg:GirlLowerLegThing;
public var leftUpperArm:MovieClip;
public var rightLowerLeg:GirlLowerLegThing;
public var rightUpperArm:MovieClip;
public var bum:MovieClip;
public var body:GolemBodyThing;
public var rightFoot:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
public function fightAnim_194(){
addFrameScript(0, frame1, 1, frame2, 247, frame248, 481, frame482);
}
function frame1(){
gotoAndStop("end");
}
function frame2(){
body.gotoAndStop("noShadow");
}
function frame482(){
stop();
body.gotoAndStop("noShadow");
}
function frame248(){
body.gotoAndStop("noShadow");
}
}
}//package neverending_light_fla
Section 87
//girlFreakOut_155 (neverending_light_fla.girlFreakOut_155)
package neverending_light_fla {
import flash.display.*;
public dynamic class girlFreakOut_155 extends MovieClip {
public var chest:AnabelChestThing;
public var leftFoot:MovieClip;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperArm:MovieClip;
public var rightUpperArm:MovieClip;
public var bum:MovieClip;
public var rightFoot:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
public function girlFreakOut_155(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("repeat");
}
}
}//package neverending_light_fla
Section 88
//girlLean_135 (neverending_light_fla.girlLean_135)
package neverending_light_fla {
import flash.display.*;
public dynamic class girlLean_135 extends MovieClip {
public var chest:AnabelChestThing;
public var leftFoot:MovieClip;
public var rightShoulder:MovieClip;
public var leftUpperLeg:MovieClip;
public var rightUpperLeg:MovieClip;
public var leftLowerLeg:GirlLowerLegThing;
public var leftUpperArm:MovieClip;
public var rightLowerLeg:GirlLowerLegThing;
public var rightUpperArm:MovieClip;
public var bum:MovieClip;
public var rightFoot:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var leftArm:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
}
}//package neverending_light_fla
Section 89
//girlRunLowerBody_23 (neverending_light_fla.girlRunLowerBody_23)
package neverending_light_fla {
import flash.display.*;
import sounds.*;
public dynamic class girlRunLowerBody_23 extends MovieClip {
public var leftFoot:MovieClip;
public var leftUpperLeg:MovieClip;
public var rightUpperLeg:MovieClip;
public var leftLowerLeg:GirlLowerLegThing;
public var rightLowerLeg:GirlLowerLegThing;
public var bum:MovieClip;
public var rightFoot:MovieClip;
public function girlRunLowerBody_23(){
addFrameScript(0, frame1, 13, frame14, 27, frame28);
}
function frame14(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.05);
}
function frame1(){
}
function frame28(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.05);
}
}
}//package neverending_light_fla
Section 90
//girlRunUpperBody_28 (neverending_light_fla.girlRunUpperBody_28)
package neverending_light_fla {
import flash.display.*;
import sounds.*;
public dynamic class girlRunUpperBody_28 extends MovieClip {
public var chest:GirlRunningChestThing;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperArm:MovieClip;
public var rightUpperArm:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
public function girlRunUpperBody_28(){
addFrameScript(0, frame1, 13, frame14, 27, frame28);
}
function frame14(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.1);
}
function frame1(){
}
function frame28(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.1);
}
}
}//package neverending_light_fla
Section 91
//girlStand_133 (neverending_light_fla.girlStand_133)
package neverending_light_fla {
import flash.display.*;
public dynamic class girlStand_133 extends MovieClip {
public var chest:AnabelChestThing;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperArm:MovieClip;
public var rightUpperArm:MovieClip;
public var bum:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
}
}//package neverending_light_fla
Section 92
//girlStandLowerBody_35 (neverending_light_fla.girlStandLowerBody_35)
package neverending_light_fla {
import flash.display.*;
public dynamic class girlStandLowerBody_35 extends MovieClip {
public var bum:MovieClip;
public var p1:empty_mc;
public var p2:empty_mc;
public var p3:empty_mc;
public var p5:empty_mc;
public var p6:empty_mc;
public var p7:empty_mc;
public var p8:empty_mc;
public var p4:empty_mc;
}
}//package neverending_light_fla
Section 93
//girlStandUpperBody_36 (neverending_light_fla.girlStandUpperBody_36)
package neverending_light_fla {
import flash.display.*;
public dynamic class girlStandUpperBody_36 extends MovieClip {
public var chest:AnabelChestThing;
public var leftHand:MovieClip;
public var rightShoulder:MovieClip;
public var leftUpperArm:MovieClip;
public var p12:empty_mc;
public var p11:empty_mc;
public var p10:empty_mc;
public var rightHand:MovieClip;
public var p1:empty_mc;
public var p2:empty_mc;
public var p3:empty_mc;
public var p5:empty_mc;
public var p9:empty_mc;
public var p6:empty_mc;
public var leftShoulder:MovieClip;
public var leftLowerArm:MovieClip;
public var p4:empty_mc;
public var p7:empty_mc;
public var p8:empty_mc;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
public var rightUpperArm:MovieClip;
}
}//package neverending_light_fla
Section 94
//girlWalk_38 (neverending_light_fla.girlWalk_38)
package neverending_light_fla {
import flash.display.*;
import sounds.*;
public dynamic class girlWalk_38 extends MovieClip {
public var chest:AnabelChestThing;
public var leftFoot:MovieClip;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperLeg:MovieClip;
public var rightUpperLeg:MovieClip;
public var leftLowerLeg:GirlLowerLegThing;
public var leftUpperArm:MovieClip;
public var rightLowerLeg:GirlLowerLegThing;
public var rightUpperArm:MovieClip;
public var bum:MovieClip;
public var rightFoot:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
public function girlWalk_38(){
addFrameScript(0, frame1, 13, frame14, 27, frame28);
}
function frame14(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.05);
}
function frame1(){
}
function frame28(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.05);
}
}
}//package neverending_light_fla
Section 95
//golemArmHoldingAnabel_198 (neverending_light_fla.golemArmHoldingAnabel_198)
package neverending_light_fla {
import flash.display.*;
public dynamic class golemArmHoldingAnabel_198 extends MovieClip {
public var chest:GirlRunningChestThing;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftLowerLeg:GirlLowerLegThing;
public var leftUpperArm:MovieClip;
public var rightLowerLeg:GirlLowerLegThing;
public var rightUpperArm:MovieClip;
public var bum:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
public function golemArmHoldingAnabel_198(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 96
//golemFingerAnim_64 (neverending_light_fla.golemFingerAnim_64)
package neverending_light_fla {
import flash.display.*;
public dynamic class golemFingerAnim_64 extends MovieClip {
public function golemFingerAnim_64(){
addFrameScript(40, frame41);
}
function frame41(){
gotoAndPlay(Math.ceil((Math.random() * this.totalFrames)));
}
}
}//package neverending_light_fla
Section 97
//golemHeadAnim_152 (neverending_light_fla.golemHeadAnim_152)
package neverending_light_fla {
import flash.display.*;
import sounds.*;
public dynamic class golemHeadAnim_152 extends MovieClip {
public function golemHeadAnim_152(){
addFrameScript(2, frame3);
}
function frame3(){
Sounds.startGameSound(Sounds.getSoundOption("ClickSound", 4), this, 0.5);
}
}
}//package neverending_light_fla
Section 98
//golemPounceToStand_187 (neverending_light_fla.golemPounceToStand_187)
package neverending_light_fla {
import flash.display.*;
public dynamic class golemPounceToStand_187 extends MovieClip {
public function golemPounceToStand_187(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package neverending_light_fla
Section 99
//golemTail_149 (neverending_light_fla.golemTail_149)
package neverending_light_fla {
import flash.display.*;
public dynamic class golemTail_149 extends MovieClip {
public var tailSeg:MovieClip;
}
}//package neverending_light_fla
Section 100
//guyFootWalking_61 (neverending_light_fla.guyFootWalking_61)
package neverending_light_fla {
import flash.display.*;
public dynamic class guyFootWalking_61 extends MovieClip {
public function guyFootWalking_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 101
//guyStand_134 (neverending_light_fla.guyStand_134)
package neverending_light_fla {
import flash.display.*;
public dynamic class guyStand_134 extends MovieClip {
public var chest:GuyWalkingChestThing;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperArm:MovieClip;
public var rightUpperArm:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GuyHeadThing;
public function guyStand_134(){
addFrameScript(0, frame1, 50, frame51);
}
function frame1(){
gotoAndPlay((Math.random() * 50));
}
function frame51(){
gotoAndPlay(2);
}
}
}//package neverending_light_fla
Section 102
//guyWalk_139 (neverending_light_fla.guyWalk_139)
package neverending_light_fla {
import flash.display.*;
import sounds.*;
public dynamic class guyWalk_139 extends MovieClip {
public var chest:GuyWalkingChestThing;
public var leftFoot:MovieClip;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperLeg:MovieClip;
public var rightUpperLeg:MovieClip;
public var leftLowerLeg:GuyLowerLegThing;
public var leftUpperArm:MovieClip;
public var rightLowerLeg:GuyLowerLegThing;
public var rightUpperArm:MovieClip;
public var rightFoot:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GuyHeadThing;
public function guyWalk_139(){
addFrameScript(0, frame1, 13, frame14, 27, frame28);
}
function frame14(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.05);
}
function frame1(){
}
function frame28(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.05);
}
}
}//package neverending_light_fla
Section 103
//guyWalkLowerBody_95 (neverending_light_fla.guyWalkLowerBody_95)
package neverending_light_fla {
import flash.display.*;
import sounds.*;
public dynamic class guyWalkLowerBody_95 extends MovieClip {
public function guyWalkLowerBody_95(){
addFrameScript(0, frame1, 13, frame14, 27, frame28);
}
function frame14(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.05);
}
function frame1(){
}
function frame28(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.05);
}
}
}//package neverending_light_fla
Section 104
//instructionsStates_115 (neverending_light_fla.instructionsStates_115)
package neverending_light_fla {
import flash.display.*;
public dynamic class instructionsStates_115 extends MovieClip {
public function instructionsStates_115(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 105
//leftHand_62 (neverending_light_fla.leftHand_62)
package neverending_light_fla {
import flash.display.*;
public dynamic class leftHand_62 extends MovieClip {
public function leftHand_62(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package neverending_light_fla
Section 106
//logo_mc_206 (neverending_light_fla.logo_mc_206)
package neverending_light_fla {
import flash.display.*;
import pixelEffects.*;
public dynamic class logo_mc_206 extends MovieClip {
public var logoAnim:PixelEffect1;
public function logo_mc_206(){
addFrameScript(0, frame1);
}
function frame1(){
logoAnim = new PixelEffect1(new JiggminLogo(300, 87));
addChild(logoAnim);
}
}
}//package neverending_light_fla
Section 107
//lowerBody_77 (neverending_light_fla.lowerBody_77)
package neverending_light_fla {
import flash.display.*;
import sounds.*;
public dynamic class lowerBody_77 extends MovieClip {
public function lowerBody_77(){
addFrameScript(0, frame1, 6, frame7, 20, frame21, 36, frame37, 41, frame42);
}
function frame7(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.1);
}
function frame1(){
}
function frame21(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.1);
}
function frame37(){
Sounds.startGameSound(Sounds.getSoundOption("StepSound", 4), this, 0.1);
}
function frame42(){
gotoAndPlay("repeat");
}
}
}//package neverending_light_fla
Section 108
//lowerBodyStanding_45 (neverending_light_fla.lowerBodyStanding_45)
package neverending_light_fla {
import flash.display.*;
public dynamic class lowerBodyStanding_45 extends MovieClip {
public var p1:empty_mc;
public var p2:empty_mc;
public var p3:empty_mc;
public var p5:empty_mc;
public var p6:empty_mc;
public var p4:empty_mc;
public function lowerBodyStanding_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 109
//MainTimeline (neverending_light_fla.MainTimeline)
package neverending_light_fla {
import flash.display.*;
import com.kongregate.as3.client.*;
import menu.*;
import flash.ui.*;
public dynamic class MainTimeline extends MovieClip {
public var myMenu:ContextMenu;
public var _mochiads_game_id:String;
public var kongAPI:KongregateAPI;
public var base:BaseClass;
public function MainTimeline(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
stop();
myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
contextMenu = myMenu;
base = new BaseClass(kongAPI);
addChild(base);
base.init();
}
function frame1(){
stop();
_mochiads_game_id = "50ed559991298d63";
addChild(new Preloader(root));
}
}
}//package neverending_light_fla
Section 110
//menuFadeInAnim_255 (neverending_light_fla.menuFadeInAnim_255)
package neverending_light_fla {
import flash.display.*;
public dynamic class menuFadeInAnim_255 extends MovieClip {
public function menuFadeInAnim_255(){
addFrameScript(102, frame103);
}
function frame103(){
stop();
}
}
}//package neverending_light_fla
Section 111
//midBody_79 (neverending_light_fla.midBody_79)
package neverending_light_fla {
import flash.display.*;
public dynamic class midBody_79 extends MovieClip {
public function midBody_79(){
addFrameScript(43, frame44);
}
function frame44(){
gotoAndPlay("repeat");
}
}
}//package neverending_light_fla
Section 112
//pickupWireAnim_171 (neverending_light_fla.pickupWireAnim_171)
package neverending_light_fla {
import flash.display.*;
public dynamic class pickupWireAnim_171 extends MovieClip {
public var stolenWire:MovieClip;
}
}//package neverending_light_fla
Section 113
//pristine_mc_137 (neverending_light_fla.pristine_mc_137)
package neverending_light_fla {
import flash.display.*;
public dynamic class pristine_mc_137 extends MovieClip {
public var happyPlace:MovieClip;
}
}//package neverending_light_fla
Section 114
//rightArm_81 (neverending_light_fla.rightArm_81)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightArm_81 extends MovieClip {
public var anim:MovieClip;
public function rightArm_81(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 115
//rightArmPoint_83 (neverending_light_fla.rightArmPoint_83)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightArmPoint_83 extends MovieClip {
public var rightHand:MovieClip;
}
}//package neverending_light_fla
Section 116
//rightArmPointAnim_82 (neverending_light_fla.rightArmPointAnim_82)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightArmPointAnim_82 extends MovieClip {
public var anim:MovieClip;
public function rightArmPointAnim_82(){
addFrameScript(41, frame42);
}
function frame42(){
gotoAndPlay("repeat");
}
}
}//package neverending_light_fla
Section 117
//rightHand_52 (neverending_light_fla.rightHand_52)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightHand_52 extends MovieClip {
public var rot:MovieClip;
}
}//package neverending_light_fla
Section 118
//rightHandRot_53 (neverending_light_fla.rightHandRot_53)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightHandRot_53 extends MovieClip {
public var point_mc:empty_mc;
public var lightPoint_mc:empty_mc;
}
}//package neverending_light_fla
Section 119
//rightLowerArm_55 (neverending_light_fla.rightLowerArm_55)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightLowerArm_55 extends MovieClip {
public function rightLowerArm_55(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package neverending_light_fla
Section 120
//rightShoulder_57 (neverending_light_fla.rightShoulder_57)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightShoulder_57 extends MovieClip {
public function rightShoulder_57(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package neverending_light_fla
Section 121
//rightUpperArm_56 (neverending_light_fla.rightUpperArm_56)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightUpperArm_56 extends MovieClip {
public function rightUpperArm_56(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package neverending_light_fla
Section 122
//rightUpperLeg_48 (neverending_light_fla.rightUpperLeg_48)
package neverending_light_fla {
import flash.display.*;
public dynamic class rightUpperLeg_48 extends MovieClip {
public function rightUpperLeg_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 123
//rockmanAnim_201 (neverending_light_fla.rockmanAnim_201)
package neverending_light_fla {
import flash.display.*;
public dynamic class rockmanAnim_201 extends MovieClip {
public var golemRightArm:GolemLowerArmDeadThing;
public var golemLeftArm:GolemLowerArmDeadThing;
public var body:GolemBodyThing;
public var rightLowerArm:MovieClip;
}
}//package neverending_light_fla
Section 124
//rockmanStates_176 (neverending_light_fla.rockmanStates_176)
package neverending_light_fla {
import flash.display.*;
public dynamic class rockmanStates_176 extends MovieClip {
public function rockmanStates_176(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 125
//spiderLegAnim_167 (neverending_light_fla.spiderLegAnim_167)
package neverending_light_fla {
import flash.display.*;
public dynamic class spiderLegAnim_167 extends MovieClip {
public var spiderLowerArm:spiderLowerLeg;
public function spiderLegAnim_167(){
addFrameScript(0, frame1, 103, frame104);
}
function frame1(){
gotoAndPlay(Math.ceil((Math.random() * totalFrames)));
}
function frame104(){
gotoAndPlay("repeat");
}
}
}//package neverending_light_fla
Section 126
//spriteDropping_103 (neverending_light_fla.spriteDropping_103)
package neverending_light_fla {
import flash.display.*;
public dynamic class spriteDropping_103 extends MovieClip {
public var sparkle:MovieClip;
public var glow:MovieClip;
}
}//package neverending_light_fla
Section 127
//stalkerClawAnim_274 (neverending_light_fla.stalkerClawAnim_274)
package neverending_light_fla {
import flash.display.*;
public dynamic class stalkerClawAnim_274 extends MovieClip {
public var startFrame:int;
public function stalkerClawAnim_274(){
addFrameScript(0, frame1);
}
function frame1(){
startFrame = Math.ceil((Math.random() * this.totalFrames));
gotoAndPlay(startFrame);
}
}
}//package neverending_light_fla
Section 128
//standHeadAnim_90 (neverending_light_fla.standHeadAnim_90)
package neverending_light_fla {
import flash.display.*;
public dynamic class standHeadAnim_90 extends MovieClip {
public var head:GuyHeadThing;
}
}//package neverending_light_fla
Section 129
//standRightArm_93 (neverending_light_fla.standRightArm_93)
package neverending_light_fla {
import flash.display.*;
public dynamic class standRightArm_93 extends MovieClip {
public var rightHand:MovieClip;
}
}//package neverending_light_fla
Section 130
//thoughtBGAnim_126 (neverending_light_fla.thoughtBGAnim_126)
package neverending_light_fla {
import flash.display.*;
public dynamic class thoughtBGAnim_126 extends MovieClip {
public var bg:MovieClip;
}
}//package neverending_light_fla
Section 131
//thoughtText_128 (neverending_light_fla.thoughtText_128)
package neverending_light_fla {
import flash.display.*;
import flash.text.*;
public dynamic class thoughtText_128 extends MovieClip {
public var textBox:TextField;
}
}//package neverending_light_fla
Section 132
//upperBody_80 (neverending_light_fla.upperBody_80)
package neverending_light_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.errors.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class upperBody_80 extends MovieClip {
public var chest:GuyRunningChestThing;
public var rightArm:MovieClip;
public var leftArm:empty_mc;
public var head:MovieClip;
public function upperBody_80(){
addFrameScript(0, frame1, 43, frame44);
}
function frame1(){
rightArm.anim.gotoAndPlay("start");
}
function frame44(){
rightArm.anim.gotoAndPlay("repeat");
gotoAndPlay("repeat");
}
}
}//package neverending_light_fla
Section 133
//upperBodyStanding_92 (neverending_light_fla.upperBodyStanding_92)
package neverending_light_fla {
import flash.display.*;
public dynamic class upperBodyStanding_92 extends MovieClip {
public var rightArm:MovieClip;
public var leftArm:empty_mc;
public function upperBodyStanding_92(){
addFrameScript(45, frame46);
}
function frame46(){
gotoAndPlay("repeat");
}
}
}//package neverending_light_fla
Section 134
//wallCoverAnim_182 (neverending_light_fla.wallCoverAnim_182)
package neverending_light_fla {
import flash.display.*;
public dynamic class wallCoverAnim_182 extends MovieClip {
public function wallCoverAnim_182(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package neverending_light_fla
Section 135
//youAreAwesomAnim_254 (neverending_light_fla.youAreAwesomAnim_254)
package neverending_light_fla {
import flash.display.*;
public dynamic class youAreAwesomAnim_254 extends MovieClip {
public function youAreAwesomAnim_254(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package neverending_light_fla
Section 136
//Page (page.Page)
package page {
import basic.*;
public class Page extends Removable {
public function Page():void{
}
override public function remove():void{
super.remove();
removeChildren(this);
}
public function initialize():void{
}
}
}//package page
Section 137
//PageHolder (page.PageHolder)
package page {
import basic.*;
public class PageHolder extends Removable {
private var curPage:Page;
public function PageHolder():void{
}
public function setPage(_arg1:Page):void{
if (curPage != null){
curPage.remove();
};
if (_arg1 != null){
_arg1.initialize();
curPage = _arg1;
addChild(curPage);
};
}
override public function remove():void{
if (curPage != null){
curPage.remove();
};
super.remove();
}
}
}//package page
Section 138
//SegPixel (pixelEffects.pixels.SegPixel)
package pixelEffects.pixels {
import flash.events.*;
import flash.display.*;
import basic.*;
import flash.geom.*;
public class SegPixel extends Removable {
private var src:BitmapData;
private var bitmap:Bitmap;
private var glintFrames;// = 20
private var pull:Number;
private var finalX:Number;
private var glintCounter:Number;
private var finalY:Number;
private var product:BitmapData;
public function SegPixel(_arg1:BitmapData, _arg2:BitmapData, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
glintFrames = 20;
glintCounter = glintFrames;
super();
this.finalX = _arg7;
this.finalY = _arg8;
this.pull = _arg9;
this.src = _arg1;
this.product = _arg2;
alpha = 0;
bitmap = new Bitmap(_arg1);
addChild(bitmap);
x = _arg3;
y = _arg4;
scaleX = _arg5;
scaleY = _arg6;
addEventListener(Event.ENTER_FRAME, go, false, 0, true);
}
private function settle():void{
var _local1:Point;
x = finalX;
y = finalY;
scaleX = (scaleY = 1);
alpha = 1;
removeEventListener(Event.ENTER_FRAME, go);
addEventListener(Event.ENTER_FRAME, glint, false, 0, true);
_local1 = new Point(finalX, finalY);
product.copyPixels(src, src.rect, _local1);
src.fillRect(src.rect, 0xFFFFFF);
alpha = 0.25;
}
override public function remove():void{
removeEventListener(Event.ENTER_FRAME, glint);
removeEventListener(Event.ENTER_FRAME, go);
src.dispose();
removeChild(bitmap);
super.remove();
}
private function go(_arg1:Event):void{
if ((((Math.abs((x - finalX)) < 1)) && ((Math.abs((y - finalY)) < 1)))){
settle();
} else {
x = (x - ((x - finalX) * pull));
y = (y - ((y - finalY) * pull));
scaleX = (scaleX - ((scaleX - 1) * pull));
scaleY = (scaleY - ((scaleY - 1) * pull));
alpha = (alpha - ((alpha - 1) * pull));
};
}
private function glint(_arg1:Event):void{
glintCounter--;
if (glintCounter > 0){
alpha = ((glintCounter / glintFrames) / 2);
} else {
remove();
};
}
}
}//package pixelEffects.pixels
Section 139
//PixelEffect1 (pixelEffects.PixelEffect1)
package pixelEffects {
import flash.display.*;
import flash.geom.*;
import pixelEffects.pixels.*;
import flash.utils.*;
public class PixelEffect1 extends Sprite {
private var segArray:Array;
private var productBitmap:Bitmap;
private var scaleRange:Number;
private var bgColor:Number;
private var drawInterval:uint;
private var pull:Number;
private var spread:Number;
private var pixels:Number;
private var interval:Number;
private var src:BitmapData;
private var product:BitmapData;
public function PixelEffect1(_arg1:BitmapData, _arg2:Number=0, _arg3:Number=500, _arg4:Number=0.19, _arg5:Number=15, _arg6:Number=15, _arg7:Number=55):void{
this.src = _arg1;
this.spread = _arg3;
this.pull = _arg4;
this.pixels = _arg5;
this.scaleRange = _arg6;
this.interval = _arg7;
product = new BitmapData(_arg1.width, _arg1.height, false, _arg2);
productBitmap = new Bitmap(product);
addChild(productBitmap);
segArray = createSegArray();
drawInterval = setInterval(drawPixels, _arg7);
}
private function finishDrawing():void{
clearInterval(drawInterval);
}
private function createSegArray():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while ((_local2 * pixels) < src.width) {
_local1[_local2] = new Array();
_local3 = 0;
while ((_local3 * pixels) < src.height) {
_local1[_local2][_local3] = new Point((_local2 * pixels), (_local3 * pixels));
_local3++;
};
_local2++;
};
return (_local1);
}
private function drawPixels(){
drawPixel();
drawPixel();
drawPixel();
}
private function remove():void{
src.dispose();
product.dispose();
removeChild(productBitmap);
}
private function drawPixel(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:BitmapData;
var _local6:Rectangle;
var _local7:Point;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:SegPixel;
if (segArray.length > 0){
_local1 = Math.floor((Math.random() * segArray.length));
_local2 = Math.floor((Math.random() * segArray[_local1].length));
_local3 = segArray[_local1][_local2].x;
_local4 = segArray[_local1][_local2].y;
segArray[_local1].splice(_local2, 1);
if (segArray[_local1].length <= 0){
segArray.splice(_local1, 1);
};
_local5 = new BitmapData(pixels, pixels, false, bgColor);
_local6 = new Rectangle(_local3, _local4, pixels, pixels);
_local7 = new Point(0, 0);
_local5.copyPixels(src, _local6, _local7);
_local8 = (((_local3 + (Math.random() * spread)) - (spread / 2)) - ((pixels * scaleRange) / 2));
_local9 = (((_local4 + (Math.random() * spread)) - (spread / 2)) - ((pixels * scaleRange) / 2));
_local10 = (Math.random() * scaleRange);
_local11 = (Math.random() * scaleRange);
_local12 = new SegPixel(_local5, product, _local8, _local9, _local10, _local11, _local3, _local4, pull);
_local12.mouseEnabled = false;
_local12.mouseChildren = false;
addChild(_local12);
} else {
finishDrawing();
};
}
}
}//package pixelEffects
Section 140
//ContainerPopup (popups.ContainerPopup)
package popups {
import flash.events.*;
import flash.display.*;
public class ContainerPopup extends Popup {
private var m:ContainerPopupGraphic;
public function ContainerPopup(_arg1:DisplayObject):void{
m = new ContainerPopupGraphic();
m.bg.width = (_arg1.width + 40);
m.bg.height = (_arg1.height + 70);
m.x = -(Math.round((m.width / 2)));
m.y = -(Math.round((m.height / 2)));
m.closeButton.x = Math.round((m.width / 2));
m.closeButton.y = Math.round((m.height - 30));
m.holder.addChild(_arg1);
m.holder.x = Math.round(((m.width / 2) - (m.holder.width / 2)));
m.holder.y = 15;
m.closeButton.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
addChild(m);
}
override public function remove():void{
if (m != null){
m.closeButton.removeEventListener(MouseEvent.CLICK, onClick);
m = null;
};
super.remove();
}
private function onClick(_arg1:MouseEvent):void{
beginRemove();
}
}
}//package popups
Section 141
//Popup (popups.Popup)
package popups {
import flash.events.*;
import basic.*;
import flash.geom.*;
public class Popup extends Removable {
public function Popup(_arg1:Boolean=true):void{
var _local2:ColorTransform;
var _local3:Square;
super();
if (_arg1){
_local2 = new ColorTransform();
_local2.color = 0;
_local3 = new Square();
_local3.width = 550;
_local3.height = 400;
_local3.transform.colorTransform = _local2;
_local3.alpha = 0.75;
addChild(_local3);
};
x = (BaseClass.stageWidth / 2);
y = (BaseClass.stageHeight / 2);
alpha = 0;
BaseClass.main.addChild(this);
addEventListener(Event.ENTER_FRAME, fadeIn, false, 0, true);
}
private function fadeOut(_arg1:Event):void{
alpha = (alpha - 0.15);
if (alpha <= 0){
remove();
};
}
override public function remove():void{
removeEventListener(Event.ENTER_FRAME, fadeIn);
removeEventListener(Event.ENTER_FRAME, fadeOut);
if (stage != null){
stage.focus = stage;
};
super.remove();
}
public function beginRemove():void{
removeEventListener(Event.ENTER_FRAME, fadeIn);
removeEventListener(Event.ENTER_FRAME, fadeOut);
addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true);
}
private function fadeIn(_arg1:Event):void{
alpha = (alpha + 0.15);
if (alpha >= 1){
alpha = 1;
removeEventListener(Event.ENTER_FRAME, fadeIn);
};
}
}
}//package popups
Section 142
//Music (sounds.Music)
package sounds {
import flash.media.*;
import flash.utils.*;
public class Music {
private static var volume:Number = 1;
private static var glideInterval:uint;
private static var soundChannel:SoundChannel;
private static var intervalFreq:int = 250;
public static function stopMusic():void{
stopGlideToVolume();
if (soundChannel != null){
soundChannel.stop();
};
}
private static function glideToVolume(_arg1, _arg2):void{
volume = (volume + _arg1);
applyVolume(volume);
if ((((_arg1 >= 0)) && ((volume >= _arg2)))){
volume = _arg2;
stopGlideToVolume();
};
if ((((_arg1 <= 0)) && ((volume <= _arg2)))){
volume = _arg2;
stopGlideToVolume();
};
}
private static function applyVolume(_arg1:Number):void{
var _local2:SoundTransform;
_local2 = new SoundTransform(_arg1);
soundChannel.soundTransform = _local2;
}
public static function startMusic():void{
var _local1:DarkmoorSong;
stopMusic();
_local1 = new DarkmoorSong();
soundChannel = _local1.play(0, 999);
}
public static function startGlideToVolume(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:Number;
stopGlideToVolume();
_local3 = (_arg1 - volume);
_local4 = (_arg2 * 1000);
_local5 = Math.ceil((_local4 / intervalFreq));
_local6 = (_local3 / _local5);
glideInterval = setInterval(glideToVolume, intervalFreq, _local6, _arg1);
}
public static function setVolume(_arg1:Number):void{
stopGlideToVolume();
Music.volume = _arg1;
applyVolume(_arg1);
}
private static function stopGlideToVolume():void{
clearInterval(glideInterval);
}
}
}//package sounds
Section 143
//Mute (sounds.Mute)
package sounds {
import flash.media.*;
public class Mute {
private static var baseVolume:Number = 1;
private static var muted:Boolean = false;
public function Mute():void{
trace("You're doin' it wrong! Mute is a static class.");
}
public static function doMute():void{
if (muted){
unmuteSound();
} else {
muteSound();
};
}
public static function unmuteSound():void{
var _local1:SoundTransform;
muted = false;
_local1 = new SoundTransform(baseVolume, 0);
SoundMixer.soundTransform = _local1;
}
public static function muteSound():void{
var _local1:SoundTransform;
muted = true;
_local1 = new SoundTransform(0, 0);
SoundMixer.soundTransform = _local1;
}
public static function getMuted():Boolean{
return (muted);
}
public static function setBaseVolume(_arg1:Number=1):void{
Mute.baseVolume = _arg1;
if (!muted){
unmuteSound();
};
}
}
}//package sounds
Section 144
//Sounds (sounds.Sounds)
package sounds {
import flash.display.*;
import flash.media.*;
import character.*;
import flash.geom.*;
import data.*;
import flash.utils.*;
public class Sounds {
public static function startGameSound(_arg1:Sound, _arg2:DisplayObject, _arg3:Number=1, _arg4:Number=0):SoundChannel{
var _local5:SoundChannel;
var _local6:Number;
var _local7:ControlCharacter;
var _local8:Point;
var _local9:Point;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local5 = null;
if (((!((_arg2 == null))) && (!((_arg1 == null))))){
_local6 = 300;
_local7 = PlayerInterface.getPlayer();
if (_local7 != null){
_local8 = _local7.localToGlobal(new Point(0, 0));
_local9 = _arg2.localToGlobal(new Point(0, 0));
_local10 = (_local8.x - _local9.x);
_local11 = (_local8.y - _local9.y);
_local12 = Maths.pythag(_local10, _local11);
if (_local12 > _local6){
_local12 = _local6;
};
_local13 = ((_local6 - _local12) / _local6);
_arg3 = (_arg3 * _local13);
_local14 = ((_local10 / _local6) * 2);
_local14 = Maths.limit(_local14, -1, 1);
_local14 = -(_local14);
_local5 = startSound(_arg1, _arg3, _local14, _arg4);
} else {
if ((_arg2 is MovieClip)){
MovieClip(_arg2).stop();
};
};
};
return (_local5);
}
public static function startSound(_arg1:Sound, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):SoundChannel{
var _local5:SoundTransform;
var _local6:SoundChannel;
if (_arg2 > 0.01){
_local5 = new SoundTransform();
_local5.volume = _arg2;
_local5.pan = _arg3;
_local6 = _arg1.play(0, _arg4, _local5);
return (_local6);
};
return (null);
}
public static function getSoundOption(_arg1:String, _arg2:int):Sound{
var _local3:int;
var _local4:String;
var _local5:Class;
var _local6:Sound;
_local3 = Math.ceil((Math.random() * _arg2));
_local4 = (_arg1 + _local3);
_local5 = (getDefinitionByName(_local4) as Class);
_local6 = new (_local5);
return (_local6);
}
}
}//package sounds
Section 145
//StateObject (stateObject.StateObject)
package stateObject {
import flash.display.*;
import basic.*;
import data.*;
public class StateObject extends Movable {
protected var prependString:String;// = ""
protected var m:MovieClip;
protected var state:String;
protected var appendString:String;// = "Graphic"
public function StateObject():void{
appendString = "Graphic";
prependString = "";
super();
}
protected function setState(_arg1:String):void{
var _local2:String;
if (_arg1 != this.state){
this.state = _arg1;
if (((!((m == null))) && (!((m.parent == null))))){
m.parent.removeChild(m);
if ((m is MovieClip)){
MovieClip(m).stop();
};
};
_local2 = (_arg1.substr(0, 1).toUpperCase() + _arg1.substr(1));
m = Data.stringToObject(((prependString + _local2) + appendString));
addChild(m);
};
}
public function getState():String{
return (state);
}
}
}//package stateObject
Section 146
//MuteButton (ui.MuteButton)
package ui {
import flash.events.*;
import sounds.*;
import stateObject.*;
public class MuteButton extends StateObject {
public function MuteButton():void{
prependString = "Mute";
setState("off");
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true);
}
override public function remove():void{
removeEventListener(MouseEvent.CLICK, clickHandler);
super.remove();
}
private function clickHandler(_arg1:MouseEvent):void{
var _local2:Boolean;
Mute.doMute();
_local2 = Mute.getMuted();
if (_local2){
setState("on");
} else {
setState("off");
};
}
}
}//package ui
Section 147
//TextButton (ui.TextButton)
package ui {
import flash.events.*;
import basic.*;
public class TextButton extends Removable {
private var m:TextButtonGraphic;
public var frameStr:String;
public function TextButton(_arg1:String):void{
mouseChildren = false;
buttonMode = true;
m = new TextButtonGraphic();
m.textBox1.text = _arg1;
m.textBox2.text = _arg1;
m.bg.width = m.textBox1.width;
m.bg.x = (m.bg.width / 2);
addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
addChild(m);
}
private function onMouseOver(_arg1:MouseEvent):void{
m.gotoAndStop("over");
}
private function onMouseOut(_arg1:MouseEvent):void{
m.gotoAndStop("up");
}
override public function remove():void{
removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
removeEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
super.remove();
}
}
}//package ui
Section 148
//AnabelBioGraphic (AnabelBioGraphic)
package {
import flash.display.*;
public dynamic class AnabelBioGraphic extends MovieClip {
}
}//package
Section 149
//AnabelChestThing (AnabelChestThing)
package {
import lightEngine.things.*;
public dynamic class AnabelChestThing extends ShapeThing {
public function AnabelChestThing(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
tallness = 0.75;
initMovement();
}
}
}//package
Section 150
//AnabelFace (AnabelFace)
package {
import flash.display.*;
public dynamic class AnabelFace extends MovieClip {
}
}//package
Section 151
//AnabelPooSound (AnabelPooSound)
package {
import flash.media.*;
public dynamic class AnabelPooSound extends Sound {
}
}//package
Section 152
//AnabelScream1 (AnabelScream1)
package {
import flash.media.*;
public dynamic class AnabelScream1 extends Sound {
}
}//package
Section 153
//AnabelScream2 (AnabelScream2)
package {
import flash.media.*;
public dynamic class AnabelScream2 extends Sound {
}
}//package
Section 154
//AnabelScream3 (AnabelScream3)
package {
import flash.media.*;
public dynamic class AnabelScream3 extends Sound {
}
}//package
Section 155
//AnabelScream4 (AnabelScream4)
package {
import flash.media.*;
public dynamic class AnabelScream4 extends Sound {
}
}//package
Section 156
//AnabelScream5 (AnabelScream5)
package {
import flash.media.*;
public dynamic class AnabelScream5 extends Sound {
}
}//package
Section 157
//AnabelScream6 (AnabelScream6)
package {
import flash.media.*;
public dynamic class AnabelScream6 extends Sound {
}
}//package
Section 158
//AnabelScream7 (AnabelScream7)
package {
import flash.media.*;
public dynamic class AnabelScream7 extends Sound {
}
}//package
Section 159
//AnabelScream8 (AnabelScream8)
package {
import flash.media.*;
public dynamic class AnabelScream8 extends Sound {
}
}//package
Section 160
//AnabelScream9 (AnabelScream9)
package {
import flash.media.*;
public dynamic class AnabelScream9 extends Sound {
}
}//package
Section 161
//AnimatableBigLight (AnimatableBigLight)
package {
import lightEngine.*;
import lightEngine.lights.*;
public dynamic class AnimatableBigLight extends AnimatableLight {
public function AnimatableBigLight(){
addFrameScript(0, frame1);
}
function frame1(){
init(new BigLight(), true, false);
}
}
}//package
Section 162
//AnimatableFlashlightGraphic (AnimatableFlashlightGraphic)
package {
import lightEngine.*;
import lightEngine.lights.*;
public dynamic class AnimatableFlashlightGraphic extends AnimatableLight {
public function AnimatableFlashlightGraphic(){
addFrameScript(0, frame1);
}
function frame1(){
init(new FlashLight());
}
}
}//package
Section 163
//AnimatableGolemLight (AnimatableGolemLight)
package {
import lightEngine.*;
import lightEngine.lights.*;
public dynamic class AnimatableGolemLight extends AnimatableLight {
public function AnimatableGolemLight(){
addFrameScript(0, frame1);
}
function frame1(){
init(new GolemLight(), false);
}
}
}//package
Section 164
//BaseClass (BaseClass)
package {
import flash.events.*;
import page.*;
import sounds.*;
import data.*;
import menu.*;
import flash.ui.*;
import popups.*;
import ui.*;
public class BaseClass extends PageHolder {
private var ss:ContainerPopup;
private var stats:Stats;
public static var stageHeight:int = 400;
public static var stageWidth:int = 550;
public static var main:BaseClass;
public static var kongAPI;
public function BaseClass(_arg1):void{
BaseClass.kongAPI = _arg1;
}
public function removeSceneSelection():void{
ss = null;
}
private function keyHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
openSceneSelection();
};
}
public function init():void{
var _local1:MuteButton;
Key.initialize(stage);
BaseClass.main = this;
setPage(new IntroPage());
stats = new Stats();
stage.addChild(new DoughnutGraphic());
_local1 = new MuteButton();
_local1.x = 535;
_local1.y = 15;
_local1.scaleX = (_local1.scaleY = 0.5);
_local1.alpha = 0.5;
stage.addChild(_local1);
Mute.setBaseVolume(1.25);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler, false, 0, true);
}
public function openSceneSelection():void{
if (ss == null){
ss = new ContainerPopup(new SceneSelection());
} else {
ss.remove();
};
}
}
}//package
Section 165
//BigLightGraphic (BigLightGraphic)
package {
import flash.display.*;
public dynamic class BigLightGraphic extends MovieClip {
}
}//package
Section 166
//BreatheHardSound1 (BreatheHardSound1)
package {
import flash.media.*;
public dynamic class BreatheHardSound1 extends Sound {
}
}//package
Section 167
//BreatheHardSound2 (BreatheHardSound2)
package {
import flash.media.*;
public dynamic class BreatheHardSound2 extends Sound {
}
}//package
Section 168
//BreatheHardSound3 (BreatheHardSound3)
package {
import flash.media.*;
public dynamic class BreatheHardSound3 extends Sound {
}
}//package
Section 169
//BreatheMediumSound1 (BreatheMediumSound1)
package {
import flash.media.*;
public dynamic class BreatheMediumSound1 extends Sound {
}
}//package
Section 170
//BreatheMediumSound2 (BreatheMediumSound2)
package {
import flash.media.*;
public dynamic class BreatheMediumSound2 extends Sound {
}
}//package
Section 171
//BreatheMediumSound3 (BreatheMediumSound3)
package {
import flash.media.*;
public dynamic class BreatheMediumSound3 extends Sound {
}
}//package
Section 172
//CapturedGraphic (CapturedGraphic)
package {
import flash.display.*;
public dynamic class CapturedGraphic extends MovieClip {
public var lowerBody:MovieClip;
public var rightHand:MovieClip;
public function CapturedGraphic(){
addFrameScript(79, frame80);
}
function frame80(){
stop();
}
}
}//package
Section 173
//CaveSpriteGraphic (CaveSpriteGraphic)
package {
import flash.display.*;
public dynamic class CaveSpriteGraphic extends MovieClip {
}
}//package
Section 174
//ChimesSound (ChimesSound)
package {
import flash.media.*;
public dynamic class ChimesSound extends Sound {
}
}//package
Section 175
//Circle (Circle)
package {
import flash.display.*;
public dynamic class Circle extends MovieClip {
}
}//package
Section 176
//ClickScreamSound1 (ClickScreamSound1)
package {
import flash.media.*;
public dynamic class ClickScreamSound1 extends Sound {
}
}//package
Section 177
//ClickScreamSound2 (ClickScreamSound2)
package {
import flash.media.*;
public dynamic class ClickScreamSound2 extends Sound {
}
}//package
Section 178
//ClickScreamSound3 (ClickScreamSound3)
package {
import flash.media.*;
public dynamic class ClickScreamSound3 extends Sound {
}
}//package
Section 179
//ClickSound1 (ClickSound1)
package {
import flash.media.*;
public dynamic class ClickSound1 extends Sound {
}
}//package
Section 180
//ClickSound2 (ClickSound2)
package {
import flash.media.*;
public dynamic class ClickSound2 extends Sound {
}
}//package
Section 181
//ClickSound3 (ClickSound3)
package {
import flash.media.*;
public dynamic class ClickSound3 extends Sound {
}
}//package
Section 182
//ClickSound4 (ClickSound4)
package {
import flash.media.*;
public dynamic class ClickSound4 extends Sound {
}
}//package
Section 183
//ContainerPopupGraphic (ContainerPopupGraphic)
package {
import flash.display.*;
public dynamic class ContainerPopupGraphic extends MovieClip {
public var bg:MovieClip;
public var closeButton:SimpleButton;
public var holder:empty_mc;
}
}//package
Section 184
//ContinuedGraphic (ContinuedGraphic)
package {
import flash.display.*;
public dynamic class ContinuedGraphic extends MovieClip {
}
}//package
Section 185
//CreditsGraphic (CreditsGraphic)
package {
import flash.display.*;
public dynamic class CreditsGraphic extends MovieClip {
public var andy1Button:SimpleButton;
public var lani2Button:SimpleButton;
public var johnButton:SimpleButton;
public var lani3Button:SimpleButton;
public var andy2Button:SimpleButton;
public var lani4Button:SimpleButton;
public var micheleButton:SimpleButton;
public var jiggminButton:SimpleButton;
public var musicButton:SimpleButton;
public var lani1Button:SimpleButton;
}
}//package
Section 186
//DadFace (DadFace)
package {
import flash.display.*;
public dynamic class DadFace extends MovieClip {
}
}//package
Section 187
//DarkmoorSong (DarkmoorSong)
package {
import flash.media.*;
public dynamic class DarkmoorSong extends Sound {
}
}//package
Section 188
//DaughterFace (DaughterFace)
package {
import flash.display.*;
public dynamic class DaughterFace extends MovieClip {
}
}//package
Section 189
//DBioGraphic (DBioGraphic)
package {
import flash.display.*;
public dynamic class DBioGraphic extends MovieClip {
}
}//package
Section 190
//DeletedSceneGraphic (DeletedSceneGraphic)
package {
import flash.events.*;
import flash.display.*;
public dynamic class DeletedSceneGraphic extends MovieClip {
public function DeletedSceneGraphic(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.REMOVED_FROM_STAGE, removedHandler, false, 0, true);
}
public function removedHandler(_arg1:Event):void{
stop();
}
}
}//package
Section 191
//DialogueGraphic (DialogueGraphic)
package {
import flash.display.*;
public dynamic class DialogueGraphic extends MovieClip {
public var faceAnim:MovieClip;
public var nameAnim:MovieClip;
public var textAnim:MovieClip;
public function DialogueGraphic(){
addFrameScript(17, frame18, 35, frame36);
}
function frame18(){
stop();
}
function frame36(){
if (parent != null){
parent.removeChild(this);
};
}
}
}//package
Section 192
//DoughnutGraphic (DoughnutGraphic)
package {
import flash.display.*;
public dynamic class DoughnutGraphic extends MovieClip {
}
}//package
Section 193
//DragableSmallGolem (DragableSmallGolem)
package {
import character.*;
public dynamic class DragableSmallGolem extends SmallGolemCharacter {
public function DragableSmallGolem(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package
Section 194
//DScreamSound1 (DScreamSound1)
package {
import flash.media.*;
public dynamic class DScreamSound1 extends Sound {
}
}//package
Section 195
//DScreamSound2 (DScreamSound2)
package {
import flash.media.*;
public dynamic class DScreamSound2 extends Sound {
}
}//package
Section 196
//DScreamSound3 (DScreamSound3)
package {
import flash.media.*;
public dynamic class DScreamSound3 extends Sound {
}
}//package
Section 197
//DScreamSound4 (DScreamSound4)
package {
import flash.media.*;
public dynamic class DScreamSound4 extends Sound {
}
}//package
Section 198
//empty_mc (empty_mc)
package {
import flash.display.*;
public dynamic class empty_mc extends MovieClip {
}
}//package
Section 199
//EndPageGraphic (EndPageGraphic)
package {
import flash.display.*;
import flash.text.*;
public dynamic class EndPageGraphic extends MovieClip {
public var deletedSceneButton:SimpleButton;
public var checkBox6:MovieClip;
public var addToWebsiteButton:SimpleButton;
public var checkBox7:MovieClip;
public var tourGuideBioButton:SimpleButton;
public var secretInfoButton:SimpleButton;
public var dBioButton:SimpleButton;
public var paulieBioButton:SimpleButton;
public var nedBioButton:SimpleButton;
public var fadeAnim:Square;
public var anabelBioButton:SimpleButton;
public var moreGamesButton:SimpleButton;
public var spriteBox:TextField;
public var playAgainButton:SimpleButton;
public var checkBox1:MovieClip;
public var checkBox2:MovieClip;
public var checkBox4:MovieClip;
public var checkBox5:MovieClip;
public var checkBox3:MovieClip;
public function EndPageGraphic(){
addFrameScript(79, frame80);
}
function frame80(){
stop();
}
}
}//package
Section 200
//FallDownGraphic (FallDownGraphic)
package {
import flash.display.*;
public dynamic class FallDownGraphic extends MovieClip {
public var chest:GuyWalkingChestThing;
public var leftFoot:MovieClip;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperLeg:MovieClip;
public var rightUpperLeg:MovieClip;
public var leftLowerLeg:GuyLowerLegThing;
public var leftUpperArm:MovieClip;
public var rightLowerLeg:GuyLowerLegThing;
public var rightUpperArm:MovieClip;
public var rightFoot:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GuyHeadThing;
public function FallDownGraphic(){
addFrameScript(0, frame1, 25, frame26);
}
function frame1(){
}
function frame26(){
stop();
}
}
}//package
Section 201
//FlashLightGraphic (FlashLightGraphic)
package {
import flash.display.*;
public dynamic class FlashLightGraphic extends MovieClip {
public function FlashLightGraphic(){
addFrameScript(21, frame22, 76, frame77, 135, frame136, 323, frame324);
}
function frame77(){
gotoAndStop("on");
}
function frame22(){
stop();
}
function frame324(){
gotoAndStop("on");
}
function frame136(){
gotoAndStop("on");
}
}
}//package
Section 202
//FreakyScreamSound (FreakyScreamSound)
package {
import flash.media.*;
public dynamic class FreakyScreamSound extends Sound {
}
}//package
Section 203
//GeneratorThing (GeneratorThing)
package {
import lightEngine.things.*;
public dynamic class GeneratorThing extends ShapeThing {
public function GeneratorThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.6;
visible = false;
}
}
}//package
Section 204
//GetUpGraphic (GetUpGraphic)
package {
import flash.display.*;
public dynamic class GetUpGraphic extends MovieClip {
public var chest:GuyWalkingChestThing;
public var leftFoot:MovieClip;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftUpperLeg:MovieClip;
public var rightUpperLeg:MovieClip;
public var leftLowerLeg:GuyLowerLegThing;
public var leftUpperArm:MovieClip;
public var rightLowerLeg:GuyLowerLegThing;
public var rightUpperArm:MovieClip;
public var rightFoot:MovieClip;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public function GetUpGraphic(){
addFrameScript(108, frame109);
}
function frame109(){
stop();
}
}
}//package
Section 205
//GirlCatchUpGraphic (GirlCatchUpGraphic)
package {
import flash.display.*;
public dynamic class GirlCatchUpGraphic extends MovieClip {
}
}//package
Section 206
//GirlHeadThing (GirlHeadThing)
package {
import lightEngine.things.*;
public dynamic class GirlHeadThing extends ShapeThing {
public function GirlHeadThing(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
tallness = 0.5;
initMovement();
}
}
}//package
Section 207
//GirlLowerLegThing (GirlLowerLegThing)
package {
import lightEngine.things.*;
public dynamic class GirlLowerLegThing extends ShapeThing {
public function GirlLowerLegThing(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
initMovement();
}
}
}//package
Section 208
//GirlRunGraphic (GirlRunGraphic)
package {
import flash.display.*;
public dynamic class GirlRunGraphic extends MovieClip {
public var lowerBody:MovieClip;
public var upperBody:MovieClip;
}
}//package
Section 209
//GirlRunningChestThing (GirlRunningChestThing)
package {
import lightEngine.things.*;
public dynamic class GirlRunningChestThing extends ShapeThing {
public function GirlRunningChestThing(){
addFrameScript(0, frame1);
}
function frame1(){
initMovement();
}
}
}//package
Section 210
//GirlStandGraphic (GirlStandGraphic)
package {
import flash.display.*;
public dynamic class GirlStandGraphic extends MovieClip {
public var lowerBody:MovieClip;
public var upperBody:MovieClip;
}
}//package
Section 211
//GirlWalkGraphic (GirlWalkGraphic)
package {
import flash.display.*;
public dynamic class GirlWalkGraphic extends MovieClip {
}
}//package
Section 212
//golem (golem)
package {
import flash.display.*;
public dynamic class golem extends MovieClip {
}
}//package
Section 213
//GolemAttackGraphic (GolemAttackGraphic)
package {
import flash.display.*;
import sounds.*;
public dynamic class GolemAttackGraphic extends MovieClip {
public var finishedAnim:Boolean;
public var rightLowerArm:MovieClip;
public function GolemAttackGraphic(){
addFrameScript(0, frame1, 10, frame11, 32, frame33);
}
function frame1(){
finishedAnim = false;
}
function frame11(){
Sounds.startGameSound(Sounds.getSoundOption("NedSwingSound", 3), this, 1);
}
function frame33(){
stop();
finishedAnim = true;
}
}
}//package
Section 214
//GolemBodyThing (GolemBodyThing)
package {
import lightEngine.things.*;
public dynamic class GolemBodyThing extends ShapeThing {
public function GolemBodyThing(){
addFrameScript(0, frame1, 15, frame16, 20, frame21);
}
function frame21(){
tallness = 0;
tail.stop();
}
function frame1(){
tallness = 0.99;
initMovement();
stop();
}
function frame16(){
tallness = 0.25;
tail.stop();
}
}
}//package
Section 215
//GolemEatGraphic (GolemEatGraphic)
package {
import flash.display.*;
import sounds.*;
public dynamic class GolemEatGraphic extends MovieClip {
public var chest:GirlRunningChestThing;
public var rightShoulder:MovieClip;
public var leftHand:MovieClip;
public var leftLowerLeg:GirlLowerLegThing;
public var leftUpperArm:MovieClip;
public var rightLowerLeg:GirlLowerLegThing;
public var rightUpperArm:MovieClip;
public var bum:MovieClip;
public var body:GolemBodyThing;
public var rightHand:MovieClip;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var rightLowerArm:MovieClip;
public var head:GirlHeadThing;
public function GolemEatGraphic(){
addFrameScript(35, frame36, 106, frame107);
}
function frame107(){
gotoAndPlay("repeat");
}
function frame36(){
Sounds.startGameSound(new PunchSound(), this, 0.25);
}
}
}//package
Section 216
//GolemFace (GolemFace)
package {
import flash.display.*;
public dynamic class GolemFace extends MovieClip {
}
}//package
Section 217
//GolemHeadThing (GolemHeadThing)
package {
import lightEngine.things.*;
public dynamic class GolemHeadThing extends ShapeThing {
public function GolemHeadThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.99;
initMovement();
}
}
}//package
Section 218
//GolemHurtGraphic (GolemHurtGraphic)
package {
import flash.display.*;
public dynamic class GolemHurtGraphic extends MovieClip {
public var finishedAnim:Boolean;
public var rightLowerArm:MovieClip;
public function GolemHurtGraphic(){
addFrameScript(0, frame1, 31, frame32);
}
function frame1(){
finishedAnim = false;
}
function frame32(){
stop();
finishedAnim = true;
}
}
}//package
Section 219
//GolemLightGraphic (GolemLightGraphic)
package {
import flash.display.*;
public dynamic class GolemLightGraphic extends MovieClip {
}
}//package
Section 220
//GolemLowerArmDeadThing (GolemLowerArmDeadThing)
package {
import lightEngine.things.*;
public dynamic class GolemLowerArmDeadThing extends ShapeThing {
public function GolemLowerArmDeadThing(){
addFrameScript(0, frame1, 5, frame6, 11, frame12);
}
function frame12(){
tallness = 0;
}
function frame6(){
tallness = 0;
}
function frame1(){
tallness = 0.99;
initMovement();
stop();
}
}
}//package
Section 221
//GolemLowerArmThing (GolemLowerArmThing)
package {
import lightEngine.things.*;
public dynamic class GolemLowerArmThing extends ShapeThing {
public function GolemLowerArmThing(){
addFrameScript(0, frame1, 5, frame6, 10, frame11);
}
function frame6(){
tallness = 0.3;
}
function frame1(){
tallness = 0.99;
initMovement();
stop();
}
function frame11(){
tallness = 0;
}
}
}//package
Section 222
//GolemRunGraphic (GolemRunGraphic)
package {
import flash.display.*;
public dynamic class GolemRunGraphic extends MovieClip {
public var body:GolemBodyThing;
public var rightLowerArm:MovieClip;
}
}//package
Section 223
//GotWeaponGraphic (GotWeaponGraphic)
package {
import flash.display.*;
import game.hud.*;
public dynamic class GotWeaponGraphic extends MovieClip {
public var finger1:MovieClip;
public var finger2:MovieClip;
public var finger3:MovieClip;
public function GotWeaponGraphic(){
addFrameScript(218, frame219);
}
function frame219(){
HUD.clearDisplay();
stop();
}
}
}//package
Section 224
//GotWireGraphic (GotWireGraphic)
package {
import flash.display.*;
import game.hud.*;
public dynamic class GotWireGraphic extends MovieClip {
public function GotWireGraphic(){
addFrameScript(218, frame219);
}
function frame219(){
HUD.clearDisplay();
}
}
}//package
Section 225
//GradientCircle (GradientCircle)
package {
import flash.display.*;
public dynamic class GradientCircle extends MovieClip {
}
}//package
Section 226
//GrannyFace (GrannyFace)
package {
import flash.display.*;
public dynamic class GrannyFace extends MovieClip {
}
}//package
Section 227
//GuyHeadThing (GuyHeadThing)
package {
import lightEngine.things.*;
public dynamic class GuyHeadThing extends ShapeThing {
public function GuyHeadThing(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
tallness = 0.5;
initMovement();
}
}
}//package
Section 228
//GuyLowerLegThing (GuyLowerLegThing)
package {
import lightEngine.things.*;
public dynamic class GuyLowerLegThing extends ShapeThing {
public function GuyLowerLegThing(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
tallness = 0.5;
initMovement();
}
}
}//package
Section 229
//GuyRunningChestThing (GuyRunningChestThing)
package {
import lightEngine.things.*;
public dynamic class GuyRunningChestThing extends ShapeThing {
public function GuyRunningChestThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.99;
initMovement();
}
}
}//package
Section 230
//GuyStandingChestThing (GuyStandingChestThing)
package {
import lightEngine.things.*;
public dynamic class GuyStandingChestThing extends ShapeThing {
public function GuyStandingChestThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.85;
initMovement();
}
}
}//package
Section 231
//GuySwingSound1 (GuySwingSound1)
package {
import flash.media.*;
public dynamic class GuySwingSound1 extends Sound {
}
}//package
Section 232
//GuySwingSound2 (GuySwingSound2)
package {
import flash.media.*;
public dynamic class GuySwingSound2 extends Sound {
}
}//package
Section 233
//GuySwingSound3 (GuySwingSound3)
package {
import flash.media.*;
public dynamic class GuySwingSound3 extends Sound {
}
}//package
Section 234
//GuyWalkingChestThing (GuyWalkingChestThing)
package {
import lightEngine.things.*;
public dynamic class GuyWalkingChestThing extends ShapeThing {
public function GuyWalkingChestThing(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
tallness = 0.75;
initMovement();
}
}
}//package
Section 235
//HeartbeatSound (HeartbeatSound)
package {
import flash.media.*;
public dynamic class HeartbeatSound extends Sound {
}
}//package
Section 236
//HudDisplayGraphic (HudDisplayGraphic)
package {
import flash.display.*;
public dynamic class HudDisplayGraphic extends MovieClip {
public var bg:MovieClip;
public var holder:empty_mc;
public function HudDisplayGraphic(){
addFrameScript(28, frame29, 47, frame48);
}
function frame29(){
stop();
}
function frame48(){
if (parent != null){
parent.removeChild(this);
};
}
}
}//package
Section 237
//InstructionsGraphic (InstructionsGraphic)
package {
import flash.display.*;
import game.hud.*;
public dynamic class InstructionsGraphic extends MovieClip {
public var states:MovieClip;
public function InstructionsGraphic(){
addFrameScript(218, frame219);
}
function frame219(){
HUD.clearDisplay();
}
}
}//package
Section 238
//IntroPageGraphic (IntroPageGraphic)
package {
import flash.display.*;
import menu.*;
public dynamic class IntroPageGraphic extends MovieClip {
public var logo_mc:MovieClip;
public function IntroPageGraphic(){
addFrameScript(248, frame249);
}
function frame249(){
stop();
BaseClass.main.setPage(new MenuPage());
}
}
}//package
Section 239
//JiggminLogo (JiggminLogo)
package {
import flash.display.*;
public dynamic class JiggminLogo extends BitmapData {
public function JiggminLogo(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 240
//LeftArmRunGraphic (LeftArmRunGraphic)
package {
import flash.display.*;
public dynamic class LeftArmRunGraphic extends MovieClip {
public var hand:MovieClip;
public var running:Boolean;
public function LeftArmRunGraphic(){
addFrameScript(0, frame1, 43, frame44);
}
function frame1(){
running = true;
}
function frame44(){
gotoAndPlay("repeat");
}
}
}//package
Section 241
//LeftArmStandGraphic (LeftArmStandGraphic)
package {
import flash.display.*;
public dynamic class LeftArmStandGraphic extends MovieClip {
public var hand:MovieClip;
public function LeftArmStandGraphic(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 242
//LeftArmSwingGraphic (LeftArmSwingGraphic)
package {
import flash.display.*;
import character.*;
import sounds.*;
public dynamic class LeftArmSwingGraphic extends MovieClip {
public var hand:MovieClip;
public var swingBlur:MovieClip;
public function LeftArmSwingGraphic(){
addFrameScript(5, frame6, 6, frame7, 7, frame8, 22, frame23);
}
function frame6(){
Sounds.startSound(Sounds.getSoundOption("GuySwingSound", 3), 0.5);
}
function frame7(){
if (BossInterface.tailHitTest(swingBlur)){
BossInterface.feelTailHit();
};
}
function frame8(){
if (BossInterface.tailHitTest(swingBlur)){
BossInterface.feelTailHit();
};
}
function frame23(){
stop();
if ((parent is LeftArm)){
LeftArm(parent).doneSwinging();
};
}
}
}//package
Section 243
//LightClickSound (LightClickSound)
package {
import flash.media.*;
public dynamic class LightClickSound extends Sound {
}
}//package
Section 244
//LightEngineGraphic (LightEngineGraphic)
package {
import flash.display.*;
public dynamic class LightEngineGraphic extends MovieClip {
}
}//package
Section 245
//MapGraphic (MapGraphic)
package {
import flash.display.*;
import camera.*;
import character.*;
import flash.geom.*;
import lightEngine.*;
import sounds.*;
import game.hud.*;
import effects.*;
import game.*;
import menu.*;
import environment.*;
import character.follow.*;
public dynamic class MapGraphic extends MovieClip {
public var upperEffects:empty_mc;
public var wallCover:MovieClip;
public var granny:MovieClip;
public var bigGolemLeftArm:GolemLowerArmThing;
public var tunnelHolder:empty_mc;
public var anabel:MovieClip;
public var rightUpperLeg:MovieClip;
public var tunnel:Tunnel;
public var bonesBody:GolemBodyThing;
public var anabelFollow:AnabelWalk;
public var leftLowerLeg:GirlLowerLegThing;
public var dragableTopGolem:MovieClip;
public var rightUpperArm:MovieClip;
public var bum:MovieClip;
public var rightHand:MovieClip;
public var anabelFollow2:AnabelRun;
public var rightFoot:MovieClip;
public var lowerEffects:empty_mc;
public var leftLowerArm:MovieClip;
public var leftShoulder:MovieClip;
public var bigGolemBody:GolemBodyThing;
public var golemPushBlock:Push10;
public var stonerGirl:MovieClip;
public var chest:GirlRunningChestThing;
public var mom:MovieClip;
public var leftFoot:MovieClip;
public var daughter:MovieClip;
public var leftHand:MovieClip;
public var leftUpperLeg:MovieClip;
public var chest2:AnabelChestThing;
public var stonerGuy:MovieClip;
public var smallGolem2:SmallGolemCharacter;
public var smallGolem1:SmallGolemCharacter;
public var leftUpperArm:MovieClip;
public var tourGuide:MovieClip;
public var dad:MovieClip;
public var rightLowerLeg:GirlLowerLegThing;
public var anabelFightAnim:MovieClip;
public var instructions:InstructionsGraphic;
public var bonesArm:GolemLowerArmDeadThing;
public var bigGolemRightArm:GolemLowerArmThing;
public var severedArm:GolemLowerArmThing;
public var rockman:MovieClip;
public var rightLowerArm:MovieClip;
public var rightShoulder:MovieClip;
public var head:GirlHeadThing;
public var walls:MovieClip;
public var playerHolder:empty_mc;
public function MapGraphic(){
addFrameScript(0, frame1, 1, frame2, 20, frame21, 50, frame51, 287, frame288, 415, frame416, 670, frame671, 954, frame955, 1012, frame1013, 1060, frame1061, 1090, frame1091, 1129, frame1130, 1196, frame1197, 1313, frame1314, 1439, frame1440, 1451, frame1452, 1455, frame1456, 1459, frame1460, 1489, frame1490, 1652, frame1653, 1886, frame1887, 2034, frame2035, 2126, frame2127, 2229, frame2230, 2435, frame2436, 2608, frame2609, 2652, frame2653, 2743, frame2744, 2899, frame2900, 2916, frame2917, 2970, frame2971, 2971, frame2972, 3019, frame3020, 3104, frame3105, 3268, frame3269, 3485, frame3486, 3734, frame3735, 3769, frame3770, 3900, frame3901, 3953, frame3954, 4080, frame4081, 4284, frame4285, 4423, frame4424, 4582, frame4583, 4733, frame4734, 4787, frame4788, 4949, frame4950, 5159, frame5160, 5203, frame5204, 5263, frame5264, 5289, frame5290, 5328, frame5329, 5384, frame5385, 5553, frame5554, 5612, frame5613, 5814, frame5815, 5824, frame5825, 5825, frame5826, 5833, frame5834, 6100, frame6101, 6117, frame6118, 6118, frame6119, 6198, frame6199, 6351, frame6352, 6361, frame6362, 6362, frame6363, 6573, frame6574, 6712, frame6713, 6732, frame6733, 6826, frame6827, 6963, frame6964, 7094, frame7095, 7221, frame7222, 7274, frame7275, 7416, frame7417, 7533, frame7534, 7548, frame7549, 7572, frame7573, 7678, frame7679, 7816, frame7817, 7841, frame7842, 7933, frame7934, 8126, frame8127, 8127, frame8128, 8139, frame8140, 8140, frame8141, 8155, frame8156, 8245, frame8246, 8339, frame8340, 8488, frame8489, 8507, frame8508, 8519, frame8520, 8520, frame8521, 8771, frame8772, 8820, frame8821, 9023, frame9024, 9222, frame9223, 9234, frame9235, 9282, frame9283, 9338, frame9339, 9359, frame9360, 9364, frame9365, 9369, frame9370, 9375, frame9376, 9385, frame9386, 9849, frame9850, 9916, frame9917, 9959, frame9960, 9960, frame9961, 9961, frame9962, 9976, frame9977, 9979, frame9980, 9980, frame9981, 10176, frame10177, 10177, frame10178, 10232, frame10233, 10237, frame10238, 10704, frame10705, 10785, frame10786, 10909, frame10910, 11069, frame11070, 11289, frame11290, 11291, frame11292, 11292, frame11293, 11298, frame11299, 11425, frame11426, 11587, frame11588, 11678, frame11679, 11791, frame11792, 12162, frame12163, 12424, frame12425, 12656, frame12657, 12808, frame12809, 13111, frame13112, 13179, frame13180, 13310, frame13311, 13388, frame13389, 13464, frame13465, 13536, frame13537, 13616, frame13617, 13798, frame13799, 13843, frame13844);
}
function frame6199(){
HUD.setThought("This wire should work with the elevator; now I can get out of here!");
}
function frame11426(){
CameraInterface.setShake(2, 2, 0.9);
}
function frame955(){
HUD.replaceDialogue("Mwahahahaaa!");
}
function frame1061(){
CameraInterface.setShake(5, 5, 0.9);
if (tunnel != null){
tunnel.remove();
};
}
function frame3486(){
HUD.replaceDialogue("Just swimming around... not a care in the world... Well! Anyway. Paul, lets get these lights back on eh?");
}
function frame13844(){
if (tunnel != null){
tunnel.remove();
};
if (anabelFollow2 != null){
anabelFollow2.remove();
};
BaseClass.main.setPage(new EndPage(GamePage.spriteDroppings));
stop();
}
function frame7842(){
EffectsInterface.setSpriteMode("wander", 1);
}
function frame2035(){
HUD.setDialogue(new AnabelFace(), "Anabel", "That's the one that looks like a teddy bear!");
}
function frame8140(){
stop();
}
function frame288(){
HUD.replaceDialogue("You can't even see your own hand in front of your face! Also, there's this giant pokey rock that looks kind of like a teddy bear!");
}
function frame9235(){
stop();
}
function frame1197(){
walls.gotoAndStop("descent");
}
function frame13617(){
HUD.setThought("I need a nap.");
}
function frame4583(){
walls.gotoAndStop("pristine");
HUD.replaceDialogue("The elevator has a backup generator, so it should work, even without power. Lemme grab my flashlight ...and we're off!");
ScreenDrawer.startSync();
}
function frame8141(){
PlayerInterface.setCasual(false);
PlayerInterface.setLight(true);
bonesBody.gotoAndStop("noShadow");
bonesArm.gotoAndStop("noShadow");
severedArm.gotoAndStop("noShadow");
anabelFightAnim.gotoAndStop("begin");
smallGolem2 = new SmallGolemCharacter();
smallGolem2.x = 1850.1;
smallGolem2.y = 4070.6;
smallGolem2.scaleX = (smallGolem2.scaleY = 0.641);
smallGolem2.setRotation(-79.7);
upperEffects.addChild(smallGolem2);
smallGolem1 = new SmallGolemCharacter();
smallGolem1.x = 966.5;
smallGolem1.y = 3665.3;
smallGolem1.scaleX = (smallGolem1.scaleY = 0.727);
smallGolem1.setRotation(-121.3);
upperEffects.addChild(smallGolem1);
walls.gotoAndStop("normal");
}
function frame5554(){
HUD.setThought("Everyone's gone...");
}
function frame8821(){
HUD.setDialogue(new AnabelFace(), "Anabel", "Hey! You came to rescue me! That's so sweet of you!");
}
function frame11679(){
HUD.setDialogue(new GolemFace(), "", "I understand now, why we were long ago forbidden to enter the Neverending Light. It is because we are too similar, my kind and yours.");
}
function frame11792(){
Music.startGlideToVolume(1, 50);
}
function frame2609(){
HUD.clearDialogue();
}
function frame12657(){
HUD.replaceDialogue("...Speaking of devouring...");
}
function frame10910(){
anabelFollow2 = new AnabelRun();
anabelFollow2.x = 598.4;
anabelFollow2.y = 3130.4;
anabelFollow2.rotation = 0;
upperEffects.addChild(anabelFollow2);
bonesBody.gotoAndStop("noShadow");
bonesArm.gotoAndStop("noShadow");
walls.gotoAndStop("normal");
}
function frame9360(){
PlayerInterface.setFallDown(true);
PlayerInterface.setPos(919, 4423);
PlayerInterface.setRot(235);
}
function frame3020(){
if (anabelFollow != null){
anabelFollow.remove();
};
}
function frame5329(){
PlayerInterface.setCasual(false);
PlayerInterface.setLight(true);
EventDriver.everyoneDied = true;
Music.startMusic();
Music.setVolume(0);
Music.startGlideToVolume(0.75, 10);
walls.gotoAndStop("normal");
HUD.clearThought();
ScreenDrawer.stopSync();
}
function frame9223(){
HUD.clearDialogue();
}
function frame2971(){
ScreenDrawer.startSync();
}
function frame8156(){
HUD.setDialogue(new AnabelFace(), "Anabel", "Eat your own face, you damn ugly monster shit head!!");
}
function frame9370(){
PlayerInterface.setPos(919, 4423);
PlayerInterface.setRot(235);
}
function frame1887(){
HUD.replaceDialogue("The next formation we'll be looking at is lovingly called \"The Spawn of Hell\"!");
}
function frame10238(){
CameraInterface.setShake(15, 2, 0.95);
}
function frame2(){
LightEngineInterface.fadeToAlpha(0.75, 50);
tunnel = new Tunnel(Tunnel.DESCENDING, true);
tunnelHolder.addChild(tunnel);
walls.gotoAndStop("descent");
ScreenDrawer.startSync();
}
function frame2972(){
HUD.setDialogue(new AnabelFace(), "Anabel", "*smooches*");
}
function frame12425(){
HUD.replaceDialogue("Surely, one of us will devour the other in out mutual quest to posses all.");
}
function frame1(){
walls.visible = false;
}
function frame9376(){
PlayerInterface.setPos(919, 4423);
PlayerInterface.setRot(235);
}
function frame1653(){
HUD.replaceDialogue("Behind me is one such formation, called the \"Pebble's Nest\". Unlike most stalagmites, this one is made of, well, pebbles!");
}
function frame21(){
HUD.setDialogue(new AnabelFace(), "Anabel", "...and I hope you're not afraid of the dark, they do a thing where they turn off all the lights so you can see how ridiculously dark it is down here.");
}
function frame1091(){
HUD.setDialogue(new TourGuideFace(), "Tour Guide", "Here we are! Let me just open this door thigamajigg here... and AHA! Welcome to the Cablad Caverns!");
}
function frame9365(){
PlayerInterface.setPos(919, 4423);
PlayerInterface.setRot(235);
}
function frame13180(){
HUD.setDialogue(new GolemFace(), "", "You don't have to answer. I will find out soon enough.");
}
function frame9024(){
HUD.replaceDialogue("Umm... Just don't tell anyone I talk like that when I get angry, ok?");
}
function frame5204(){
HUD.setThought("GET THE FLASHLIGHT");
}
function frame2744(){
HUD.setDialogue(new WalkieTalkieFace(), "Mr. Walkie Talkie", "Aye aye milady. Cutting the lights in 3... 2... 1...");
}
function frame11588(){
CameraInterface.setShake(10, 20, 0.9);
bigGolemRightArm.gotoAndStop("noShadow");
bigGolemLeftArm.gotoAndStop("noShadow");
bigGolemBody.gotoAndStop("lowShadow");
}
function frame3954(){
HUD.setDialogue(new WalkieTalkieFace(), "Mr. Walkie Talkie", "...");
}
function frame3269(){
HUD.replaceDialogue("Imagine what it's like for the creatures that actually live down here; most of them don't even have eyes, so they rely on their other senses.");
}
function frame10233(){
BossInterface.removeBoss();
}
function frame9386(){
PlayerInterface.setPos(919, 4423);
PlayerInterface.setRot(235);
}
function frame9917(){
BossInterface.createBoss();
}
function frame7417(){
HUD.replaceDialogue("We will kill one of those things anyway, because their mom is ugly. Haha.");
}
function frame3735(){
HUD.clearDialogue();
}
function frame10705(){
HUD.setDialogue(new AnabelFace(), "Anabel", "unngg...");
}
function frame1314(){
HUD.replaceDialogue("Please follow me out of the elevator, and let's begin the tour!");
}
function frame7095(){
HUD.replaceDialogue("for fifty dollars?");
}
function frame7534(){
smallGolem1 = new SmallGolemCharacter();
smallGolem1.x = 1242.8;
smallGolem1.y = 1670.7;
smallGolem1.scaleX = (smallGolem1.scaleY = 0.557);
smallGolem1.setRotation(72);
upperEffects.addChild(smallGolem1);
smallGolem2 = new SmallGolemCharacter();
smallGolem2.x = 1180.5;
smallGolem2.y = 1454.8;
smallGolem2.scaleX = (smallGolem2.scaleY = 0.486);
smallGolem2.setRotation(-92.8);
upperEffects.addChild(smallGolem2);
}
function frame51(){
LightEngineInterface.fadeToAlpha(1, 500);
}
function frame8508(){
HUD.clearThought();
}
function frame416(){
if (tunnel != null){
tunnel.stopRings();
};
}
function frame4950(){
HUD.setThought("Anabel!");
}
function frame2653(){
HUD.setDialogue(new TourGuideFace(), "Tour Guide", "Paul, cut the lights, if you would be so kind.");
}
function frame1440(){
instructions = new InstructionsGraphic();
instructions.states.gotoAndStop("move");
HUD.showDisplay(instructions);
instructions = null;
walls.gotoAndStop("descent");
HUD.clearDialogue();
}
function frame7549(){
PlayerInterface.setLight(true);
}
function frame9283(){
if (smallGolem1 != null){
smallGolem1.remove();
};
if (smallGolem2 != null){
smallGolem2.remove();
};
bonesBody.gotoAndStop("noShadow");
bonesArm.gotoAndStop("noShadow");
severedArm.gotoAndStop("noShadow");
walls.gotoAndStop("normal");
HUD.clearDialogue();
}
function frame9961(){
stop();
}
function frame6574(){
smallGolem2 = new SmallGolemCharacter();
smallGolem2.x = 1180.5;
smallGolem2.y = 1454.8;
smallGolem2.scaleX = (smallGolem2.scaleY = 0.486);
smallGolem2.setRotation(-92.8);
upperEffects.addChild(smallGolem2);
}
function frame9962(){
PlayerInterface.setCasual(false);
PlayerInterface.setLight(true);
BossInterface.createBoss();
bonesBody.gotoAndStop("noShadow");
bonesArm.gotoAndStop("noShadow");
walls.gotoAndStop("normal");
}
function frame1452(){
walls.gotoAndStop("pristine");
}
function frame7679(){
CameraInterface.setShake(2, 2, 1);
if (smallGolem1 != null){
smallGolem1.remove();
};
}
function frame4285(){
HUD.replaceDialogue("*sigh* ...Well! We seem to be having some technical difficulties.");
}
function frame13311(){
HUD.clearDialogue();
}
function frame9850(){
PlayerInterface.setFallDown(false);
PlayerInterface.setGetUp(true);
}
function frame8520(){
stop();
HUD.clearDialogue();
HUD.clearThought();
}
function frame1456(){
ScreenDrawer.startSync();
}
function frame9977(){
HUD.setThought("I need a weapon...");
}
function frame9981(){
PlayerInterface.setHoldingWeapon(true);
BossInterface.createBoss();
HUD.showDisplay(new GotWeaponGraphic());
bonesBody.gotoAndStop("noShadow");
bonesArm.gotoAndStop("noShadow");
}
function frame9960(){
PlayerInterface.setGetUp(false);
PlayerInterface.setCasual(true);
}
function frame6119(){
HUD.showDisplay(new GotWireGraphic());
walls.gotoAndStop("normal");
}
function frame5826(){
walls.gotoAndStop("normal");
}
function frame5825(){
stop();
}
function frame671(){
HUD.replaceDialogue("Anyway, happy birthday. This is the first half of your present... I'll give you the second half when you LEAST EXPECT IT.");
}
function frame6118(){
stop();
}
function frame4734(){
PlayerInterface.setPos(1915, 3940);
}
function frame1460(){
HUD.setDialogue(new TourGuideFace(), "Tour Guide", "There are several formations that are unique to the Cablad Caverns, and how they formed has remained a mystery so far.");
}
function frame6362(){
stop();
}
function frame6352(){
HUD.clearThought();
}
function frame2436(){
HUD.setDialogue(new AnabelFace(), "Anabel", "I've decided to give you a third present. I'll give it to you when the lights go out...");
}
function frame5815(){
HUD.clearThought();
}
function frame6363(){
smallGolem1 = new SmallGolemCharacter();
smallGolem1.x = 1242.8;
smallGolem1.y = 1670.7;
smallGolem1.scaleX = (smallGolem1.scaleY = 0.557);
smallGolem1.setRotation(72);
upperEffects.addChild(smallGolem1);
walls.gotoAndStop("normal");
HUD.clearThought();
}
function frame6101(){
HUD.clearThought();
}
function frame3770(){
HUD.setDialogue(new WalkieTalkieFace(), "Mr. Walkie Talkie", "...");
}
function frame9980(){
stop();
}
function frame5264(){
HUD.setThought("GET THE FLASHLIGHT");
}
function frame7573(){
EffectsInterface.setSpriteChasePoint(new Point(1203, 1580));
EffectsInterface.setSpriteMode("chase", 1);
walls.gotoAndStop("normal");
HUD.clearDialogue();
}
function frame5834(){
HUD.setThought("The generator isn't connected to the elevator... the wire is going somewhere else?");
}
function frame12809(){
HUD.replaceDialogue("Are there many more like you out there in the Neverending Light? Are you all this delicious?");
}
function frame13799(){
HUD.clearThought();
}
function frame8521(){
anabelFightAnim.gotoAndPlay("begin");
bonesBody.gotoAndStop("noShadow");
bonesArm.gotoAndStop("noShadow");
severedArm.gotoAndStop("noShadow");
walls.gotoAndStop("rumble");
}
function frame10177(){
stop();
instructions = new InstructionsGraphic();
instructions.states.gotoAndStop("attack");
HUD.showDisplay(instructions);
instructions = null;
HUD.clearThought();
}
function frame10178(){
bonesBody.gotoAndStop("noShadow");
bonesArm.gotoAndStop("noShadow");
walls.gotoAndStop("killBoss");
}
function frame5160(){
HUD.setThought("GET THE FLASHLIGHT");
}
function frame13465(){
tunnel = new Tunnel(Tunnel.ASCENDING, false);
tunnelHolder.addChild(tunnel);
}
function frame7222(){
HUD.clearDialogue();
}
function frame8772(){
PlayerInterface.setCasual(false);
PlayerInterface.setLight(true);
anabelFollow2 = new AnabelRun();
anabelFollow2.x = 591.8;
anabelFollow2.y = 4321.6;
anabelFollow2.rotation = -90;
upperEffects.addChild(anabelFollow2);
bonesBody.gotoAndStop("noShadow");
bonesArm.gotoAndStop("noShadow");
severedArm.gotoAndStop("noShadow");
walls.gotoAndStop("normal");
}
function frame5385(){
instructions = new InstructionsGraphic();
instructions.states.gotoAndStop("aim");
HUD.showDisplay(instructions);
instructions = null;
}
function frame13537(){
HUD.showDisplay(new ContinuedGraphic());
}
function frame11290(){
HUD.clearDialogue();
}
function frame11293(){
if (anabelFollow2 == null){
anabelFollow2 = new AnabelRun();
anabelFollow2.x = 1905.5;
anabelFollow2.y = 4716.5;
anabelFollow2.rotation = 0;
upperEffects.addChild(anabelFollow2);
};
walls.gotoAndStop("leave");
}
function frame4081(){
HUD.setDialogue(new TourGuideFace(), "Tour Guide", "Come on, Paul. If this is about last night, there are worse things in the world than pepto-bismol pink! ...probably...");
}
function frame1130(){
LightEngineInterface.fadeToAlpha(0.5, 50);
}
function frame1013(){
CameraInterface.setShake(4, 2, 0.9);
}
function frame5290(){
HUD.setThought("GET THE FLASHLIGHT");
}
function frame13112(){
HUD.clearDialogue();
}
function frame1490(){
if (anabelFollow == null){
anabelFollow = new AnabelWalk();
anabelFollow.x = 1937.8;
anabelFollow.y = 4738.3;
anabelFollow.rotation = 180;
upperEffects.addChild(anabelFollow);
};
}
function frame5613(){
HUD.setThought("I should head back to the elevator to try and find help.");
}
function frame2900(){
HUD.clearDialogue();
}
function frame11299(){
ScreenDrawer.startSync();
}
function frame6827(){
HUD.replaceDialogue("They want to eat us too, but we can fly, and you can not. Haha.");
}
function frame2230(){
HUD.replaceDialogue("Everyone grab on to something, we're going to cut the lights for a few seconds to show you what total darkness is like!");
}
function frame6713(){
PlayerInterface.setLight(false);
}
function frame11292(){
stop();
}
function frame2917(){
LightEngineInterface.fadeToAlpha(1, 50);
walls.gotoAndStop("pristine");
}
function frame12163(){
HUD.replaceDialogue("We move outwards into your home, just as you venture inward towards OUR home.");
}
function frame8340(){
HUD.replaceDialogue("aAAAGH! How the fucking-shit-blow do you bloody well like that!!");
}
function frame10786(){
HUD.replaceDialogue("Hnnng.. I think I'm all right. I didn't really need all of those internal organs, anyway.");
}
function frame4424(){
HUD.replaceDialogue("If you will follow me back to the elevator, we'll see if we can get your tour rescheduled once we have this worked out.");
}
function frame4788(){
HUD.clearDialogue();
}
function frame2127(){
HUD.setDialogue(new TourGuideFace(), "Tour Guide", "But first: The part of this tour that we're famous for!");
}
function frame7817(){
CameraInterface.setShake(10, 10, 0.9);
ScreenDrawer.stopSync();
}
function frame7934(){
if (smallGolem2 != null){
smallGolem2.remove();
};
}
function frame6964(){
HUD.replaceDialogue("But we will make you a deal: We will kill one of the things that want to eat you...");
}
function frame11070(){
HUD.replaceDialogue("Hehe *ouch* Don't look so concerned. I'm just a little bruised up, is all.");
}
function frame13389(){
CameraInterface.setShake(3, 3, 0.95);
if (anabelFollow2 == null){
anabelFollow2 = new AnabelRun();
anabelFollow2.x = 1905.5;
anabelFollow2.y = 4716.5;
anabelFollow2.rotation = 0;
upperEffects.addChild(anabelFollow2);
};
walls.gotoAndStop("leave");
}
function frame6733(){
if (smallGolem1 != null){
smallGolem1.remove();
};
if (smallGolem2 != null){
smallGolem2.remove();
};
walls.gotoAndStop("trapped");
HUD.setDialogue(new SpriteFace(), "Sprite", "You are trapped between two things that want to eat you.");
ScreenDrawer.startSync();
}
function frame3901(){
HUD.setDialogue(new TourGuideFace(), "Tour Guide", "Paulie?");
}
function frame7275(){
HUD.setDialogue(new SpriteFace(), "Sprite", "Haha. We have no pockets to hold money. You totally fell for it, probably.");
}
function frame3105(){
HUD.setDialogue(new TourGuideFace(), "Tour Guide", "Everyone OK? No one is freaking out? Ha! This is going to be better than usual.");
}
function frame8127(){
stop();
}
function frame8246(){
HUD.setThought("Anabel is still alive? I need to find her!");
}
function frame8489(){
HUD.clearDialogue();
}
function frame8128(){
walls.gotoAndStop("normal");
}
function frame9339(){
PlayerInterface.setLight(false);
PlayerInterface.setCasual(true);
if (anabelFollow2 != null){
anabelFollow2.remove();
};
}
}
}//package
Section 246
//MenuPageGraphic (MenuPageGraphic)
package {
import flash.display.*;
public dynamic class MenuPageGraphic extends MovieClip {
public var awesomeAnim:MovieClip;
public var addButton:SimpleButton;
public var startButton:SimpleButton;
public var awesomeButton:SimpleButton;
public var creditsButton:SimpleButton;
public var fadeAnim:MovieClip;
public var sceneButton:SimpleButton;
}
}//package
Section 247
//MomFace (MomFace)
package {
import flash.display.*;
public dynamic class MomFace extends MovieClip {
}
}//package
Section 248
//MuteOffGraphic (MuteOffGraphic)
package {
import flash.display.*;
public dynamic class MuteOffGraphic extends MovieClip {
}
}//package
Section 249
//MuteOnGraphic (MuteOnGraphic)
package {
import flash.display.*;
public dynamic class MuteOnGraphic extends MovieClip {
}
}//package
Section 250
//NedBioGraphic (NedBioGraphic)
package {
import flash.display.*;
public dynamic class NedBioGraphic extends MovieClip {
}
}//package
Section 251
//NedSwingSound1 (NedSwingSound1)
package {
import flash.media.*;
public dynamic class NedSwingSound1 extends Sound {
}
}//package
Section 252
//NedSwingSound2 (NedSwingSound2)
package {
import flash.media.*;
public dynamic class NedSwingSound2 extends Sound {
}
}//package
Section 253
//NedSwingSound3 (NedSwingSound3)
package {
import flash.media.*;
public dynamic class NedSwingSound3 extends Sound {
}
}//package
Section 254
//PaulieBioGraphic (PaulieBioGraphic)
package {
import flash.display.*;
public dynamic class PaulieBioGraphic extends MovieClip {
}
}//package
Section 255
//PoleThing (PoleThing)
package {
import lightEngine.things.*;
public dynamic class PoleThing extends ShapeThing {
public function PoleThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 1;
visible = false;
}
}
}//package
Section 256
//PreloaderGraphic (PreloaderGraphic)
package {
import flash.display.*;
public dynamic class PreloaderGraphic extends MovieClip {
}
}//package
Section 257
//PunchSound (PunchSound)
package {
import flash.media.*;
public dynamic class PunchSound extends Sound {
}
}//package
Section 258
//Push10 (Push10)
package {
import environment.*;
public dynamic class Push10 extends HitBox {
public function Push10(){
addFrameScript(0, frame1);
}
function frame1(){
setPush(10, 20);
}
}
}//package
Section 259
//Push20 (Push20)
package {
import environment.*;
public dynamic class Push20 extends HitBox {
public function Push20(){
addFrameScript(0, frame1);
}
function frame1(){
setPush(20, 20);
}
}
}//package
Section 260
//RockManBodyThing (RockManBodyThing)
package {
import lightEngine.things.*;
public dynamic class RockManBodyThing extends ShapeThing {
public function RockManBodyThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.99;
initMovement();
}
}
}//package
Section 261
//RockManHandThing (RockManHandThing)
package {
import lightEngine.things.*;
public dynamic class RockManHandThing extends ShapeThing {
public function RockManHandThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.99;
initMovement();
}
}
}//package
Section 262
//RockManHeadThing (RockManHeadThing)
package {
import lightEngine.things.*;
public dynamic class RockManHeadThing extends ShapeThing {
public function RockManHeadThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.99;
initMovement();
}
}
}//package
Section 263
//RunGraphic (RunGraphic)
package {
import flash.display.*;
public dynamic class RunGraphic extends MovieClip {
public var midBody:MovieClip;
public var lowerBody:MovieClip;
public var upperBody:MovieClip;
}
}//package
Section 264
//SecretInfoGraphic (SecretInfoGraphic)
package {
import flash.display.*;
public dynamic class SecretInfoGraphic extends MovieClip {
}
}//package
Section 265
//SmallGolemAttackGraphic (SmallGolemAttackGraphic)
package {
import flash.display.*;
import sounds.*;
public dynamic class SmallGolemAttackGraphic extends MovieClip {
public var finishedAnim:Boolean;
public function SmallGolemAttackGraphic(){
addFrameScript(0, frame1, 6, frame7, 28, frame29);
}
function frame7(){
Sounds.startGameSound(Sounds.getSoundOption("NedSwingSound", 3), this, 0.5);
}
function frame1(){
finishedAnim = false;
}
function frame29(){
stop();
finishedAnim = true;
}
}
}//package
Section 266
//SmallGolemStandGraphic (SmallGolemStandGraphic)
package {
import flash.display.*;
public dynamic class SmallGolemStandGraphic extends MovieClip {
}
}//package
Section 267
//SmallLightCreator (SmallLightCreator)
package {
import lightEngine.*;
import lightEngine.lights.*;
public dynamic class SmallLightCreator extends AnimatableLight {
public function SmallLightCreator(){
addFrameScript(0, frame1);
}
function frame1(){
init(new SmallLight(), true, false, false);
}
}
}//package
Section 268
//SmallLightGraphic (SmallLightGraphic)
package {
import flash.display.*;
import sounds.*;
public dynamic class SmallLightGraphic extends MovieClip {
public function SmallLightGraphic(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
Sounds.startGameSound(new LightClickSound(), this, 0.25);
}
function frame36(){
stop();
x = Math.round(x);
y = Math.round(y);
}
}
}//package
Section 269
//SparkleGraphic (SparkleGraphic)
package {
import flash.display.*;
public dynamic class SparkleGraphic extends MovieClip {
public function SparkleGraphic(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package
Section 270
//spiderLowerLeg (spiderLowerLeg)
package {
import lightEngine.things.*;
public dynamic class spiderLowerLeg extends ShapeThing {
public function spiderLowerLeg(){
addFrameScript(0, frame1);
}
function frame1(){
initMovement();
}
}
}//package
Section 271
//SpotlightThing (SpotlightThing)
package {
import lightEngine.things.*;
public dynamic class SpotlightThing extends ShapeThing {
public function SpotlightThing(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.3;
visible = false;
}
}
}//package
Section 272
//SpriteDroppingCountGraphic (SpriteDroppingCountGraphic)
package {
import flash.display.*;
import flash.text.*;
import game.hud.*;
public dynamic class SpriteDroppingCountGraphic extends MovieClip {
public var textBox:TextField;
public function SpriteDroppingCountGraphic(){
addFrameScript(100, frame101);
}
function frame101(){
HUD.clearDisplay();
}
}
}//package
Section 273
//SpriteDroppingGraphic (SpriteDroppingGraphic)
package {
import environment.*;
public dynamic class SpriteDroppingGraphic extends SpriteDropping {
public function SpriteDroppingGraphic(){
addFrameScript(100, frame101);
}
function frame101(){
gotoAndPlay("repeat");
}
}
}//package
Section 274
//SpriteDroppingSound (SpriteDroppingSound)
package {
import flash.media.*;
public dynamic class SpriteDroppingSound extends Sound {
}
}//package
Section 275
//SpriteFace (SpriteFace)
package {
import flash.display.*;
public dynamic class SpriteFace extends MovieClip {
}
}//package
Section 276
//SpriteLightGraphic (SpriteLightGraphic)
package {
import flash.display.*;
public dynamic class SpriteLightGraphic extends MovieClip {
}
}//package
Section 277
//Square (Square)
package {
import flash.display.*;
public dynamic class Square extends MovieClip {
}
}//package
Section 278
//SquareThing100 (SquareThing100)
package {
import lightEngine.things.*;
public dynamic class SquareThing100 extends ShapeThing {
public function SquareThing100(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 1;
visible = false;
}
}
}//package
Section 279
//SquareThing30 (SquareThing30)
package {
import lightEngine.things.*;
public dynamic class SquareThing30 extends ShapeThing {
public function SquareThing30(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.3;
visible = false;
}
}
}//package
Section 280
//SquareThing60 (SquareThing60)
package {
import lightEngine.things.*;
public dynamic class SquareThing60 extends ShapeThing {
public function SquareThing60(){
addFrameScript(0, frame1);
}
function frame1(){
tallness = 0.6;
visible = false;
}
}
}//package
Section 281
//StalkerGraphic (StalkerGraphic)
package {
import flash.display.*;
import character.*;
import data.*;
public dynamic class StalkerGraphic extends MovieClip {
public var deg:Number;
public var rad:Number;
public var pushY:Number;
public var pushX:Number;
public function StalkerGraphic(){
addFrameScript(0, frame1, 103, frame104, 129, frame130, 180, frame181);
}
function frame181(){
PlayerInterface.setCaptured(false);
stop();
}
function frame1(){
}
function frame104(){
deg = (PlayerInterface.getRotation() - 90);
rad = (deg * Maths.DEG_RAD);
pushX = (Math.cos(rad) * 5);
pushY = (Math.sin(rad) * 5);
PlayerInterface.setPush(pushX, pushY);
PlayerInterface.incHealth(-25);
}
function frame130(){
PlayerInterface.setPush(-(pushX), -(pushY));
PlayerInterface.incHealth(-50);
}
}
}//package
Section 282
//StandCasualGraphic (StandCasualGraphic)
package {
import flash.display.*;
public dynamic class StandCasualGraphic extends MovieClip {
public var lowerBody:MovieClip;
public var lArm:MovieClip;
public var upperBody:GuyWalkingChestThing;
public var rArm:MovieClip;
public var head:MovieClip;
}
}//package
Section 283
//StandGraphic (StandGraphic)
package {
import flash.display.*;
public dynamic class StandGraphic extends MovieClip {
public var lowerBody:MovieClip;
public var upperBody:MovieClip;
}
}//package
Section 284
//StepSound1 (StepSound1)
package {
import flash.media.*;
public dynamic class StepSound1 extends Sound {
}
}//package
Section 285
//StepSound2 (StepSound2)
package {
import flash.media.*;
public dynamic class StepSound2 extends Sound {
}
}//package
Section 286
//StepSound3 (StepSound3)
package {
import flash.media.*;
public dynamic class StepSound3 extends Sound {
}
}//package
Section 287
//StepSound4 (StepSound4)
package {
import flash.media.*;
public dynamic class StepSound4 extends Sound {
}
}//package
Section 288
//TextButtonGraphic (TextButtonGraphic)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TextButtonGraphic extends MovieClip {
public var bg:Square;
public var textBox1:TextField;
public var textBox2:TextField;
public function TextButtonGraphic(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
textBox1.visible = false;
textBox2.visible = true;
}
function frame1(){
stop();
textBox1.visible = true;
textBox2.visible = false;
bg.visible = false;
}
}
}//package
Section 289
//ThoughtGraphic (ThoughtGraphic)
package {
import flash.display.*;
public dynamic class ThoughtGraphic extends MovieClip {
public var textAnim:MovieClip;
public var bgAnim:MovieClip;
public function ThoughtGraphic(){
addFrameScript(28, frame29, 47, frame48);
}
function frame29(){
stop();
}
function frame48(){
if (parent != null){
parent.removeChild(this);
};
}
}
}//package
Section 290
//TourGuideBioGraphic (TourGuideBioGraphic)
package {
import flash.display.*;
public dynamic class TourGuideBioGraphic extends MovieClip {
}
}//package
Section 291
//TourGuideFace (TourGuideFace)
package {
import flash.display.*;
public dynamic class TourGuideFace extends MovieClip {
}
}//package
Section 292
//TunnelRingGraphic (TunnelRingGraphic)
package {
import flash.display.*;
public dynamic class TunnelRingGraphic extends MovieClip {
public function TunnelRingGraphic(){
addFrameScript(301, frame302, 611, frame612);
}
function frame612(){
stop();
if (parent != null){
parent.removeChild(this);
};
}
function frame302(){
stop();
if (parent != null){
parent.removeChild(this);
};
}
}
}//package
Section 293
//WalkGraphic (WalkGraphic)
package {
import flash.display.*;
public dynamic class WalkGraphic extends MovieClip {
public var lowerBody:MovieClip;
public var upperBody:MovieClip;
public var head:MovieClip;
}
}//package
Section 294
//WalkieTalkieFace (WalkieTalkieFace)
package {
import flash.display.*;
public dynamic class WalkieTalkieFace extends MovieClip {
}
}//package
Section 295
//WarningPageGraphic (WarningPageGraphic)
package {
import flash.display.*;
import menu.*;
public dynamic class WarningPageGraphic extends MovieClip {
public function WarningPageGraphic(){
addFrameScript(194, frame195);
}
function frame195(){
BaseClass.main.setPage(new MenuPage());
}
}
}//package