Section 1
//SubmitScore (com.mtvn.services.core.commands.highscores.SubmitScore)
package com.mtvn.services.core.commands.highscores {
import com.mtvn.services.core.commands.*;
public class SubmitScore extends UserServiceCall {
public var score:String;
public var leaderboardType:String;
public function SubmitScore(_arg1:String, _arg2:String=null, _arg3:Boolean=false){
super(_arg3);
this.score = _arg1;
this.leaderboardType = _arg2;
}
}
}//package com.mtvn.services.core.commands.highscores
Section 2
//ServiceCall (com.mtvn.services.core.commands.ServiceCall)
package com.mtvn.services.core.commands {
import com.mtvn.services.core.data.*;
import com.mtvn.services.core.errors.*;
import flash.events.*;
import com.mtvn.services.core.events.*;
import flash.utils.*;
public class ServiceCall extends EventDispatcher {
protected var _mySequenceCount:int;
protected var _method:String;
public static var sequenceCountStatic:int = 1;
public function ServiceCall(){
_method = getQualifiedClassName(this);
_mySequenceCount = sequenceCountStatic;
sequenceCountStatic++;
}
public function set method(_arg1:String):void{
_method = _arg1;
}
public function set mySequenceCount(_arg1:int):void{
_mySequenceCount = _arg1;
}
public function dispatchNotification(_arg1:ServiceData):void{
dispatchEvent(new ServiceEvent(ServiceEvent.NOTIFICATION, true, _arg1));
}
public function get mySequenceCount():int{
return (_mySequenceCount);
}
public function dispatchComplete(_arg1:ServiceData):void{
dispatchEvent(new ServiceEvent(ServiceEvent.COMPLETE, true, _arg1));
}
public function get method():String{
return (_method);
}
public function dispatchError(_arg1:ServiceError):void{
dispatchEvent(new ServiceEvent(ServiceEvent.COMPLETE, false, null, _arg1));
}
public function dispatchInitialized(_arg1:ServiceData):void{
dispatchEvent(new ServiceEvent(ServiceEvent.INITIALIZED, true, _arg1));
}
public function dispatchServiceEvent(_arg1:String, _arg2:Boolean=false, _arg3:ServiceData=null, _arg4:ServiceError=null):void{
dispatchEvent(new ServiceEvent(_arg1, _arg2, _arg3, _arg4));
}
}
}//package com.mtvn.services.core.commands
Section 3
//UserServiceCall (com.mtvn.services.core.commands.UserServiceCall)
package com.mtvn.services.core.commands {
import com.mtvn.services.core.data.user.*;
public class UserServiceCall extends ServiceCall {
private var user_required:Boolean;
private var user_object:User;
public function UserServiceCall(_arg1:Boolean, _arg2:User=null){
this.user_required = _arg1;
this.user_object = _arg2;
}
public function get user():User{
return (user_object);
}
public function get userRequired():Boolean{
return (user_required);
}
public function set userRequired(_arg1:Boolean):void{
this.user_required = _arg1;
}
public function set user(_arg1:User):void{
this.user_object = _arg1;
}
}
}//package com.mtvn.services.core.commands
Section 4
//BaseGameObject (com.mtvn.services.core.data.objects.BaseGameObject)
package com.mtvn.services.core.data.objects {
public class BaseGameObject {
public var gameCode:String;
public var name:String;
public var code:String;
public var status:String;
public var id:Number;
public var description:String;
public var group:String;
public function toString():String{
return (("BaseGameObject " + id));
}
}
}//package com.mtvn.services.core.data.objects
Section 5
//Currency (com.mtvn.services.core.data.objects.Currency)
package com.mtvn.services.core.data.objects {
public class Currency extends GameObjectWithValue {
public static const CURRENCY_SUBTYPE_ISO4217:String = "ISO4217";
public static const CURRENCY_TYPE:String = "Currency";
public static const CURRENCY_SUBTYPE_EARNED:String = "Earned";
public static const CURRENCY_SUBTYPE_PAID:String = "Paid";
public function Currency(){
type = CURRENCY_TYPE;
}
}
}//package com.mtvn.services.core.data.objects
Section 6
//GameObject (com.mtvn.services.core.data.objects.GameObject)
package com.mtvn.services.core.data.objects {
import flash.display.*;
public class GameObject extends BaseGameObject {
public var iconLarge:BitmapData;
public var subtype:String;
public var iconSmall:BitmapData;
public var tags:String;
public var endDate:Number;
public var startDate:Number;
public var rank:String;
public var type:String;
}
}//package com.mtvn.services.core.data.objects
Section 7
//GameObjectWithValue (com.mtvn.services.core.data.objects.GameObjectWithValue)
package com.mtvn.services.core.data.objects {
public class GameObjectWithValue extends GameObject {
public var limit:Object;
public var lifetimeValue:Object;
public var value:Object;
public function get lifetimeQuantity():Number{
return (Number(lifetimeValue));
}
public function set quantity(_arg1:Number):void{
this.value = _arg1;
}
public function get quantity():Number{
return (Number(value));
}
public function set quantityLimit(_arg1:Number):void{
this.limit = _arg1;
}
override public function toString():String{
var _local1:String;
_local1 = ("\nGameObjectWithValue: " + id);
_local1 = (_local1 + ("\n\ttype: " + String(type)));
_local1 = (_local1 + ("\n\tsubtype: " + String(subtype)));
_local1 = (_local1 + ("\n\tquantity: " + String(value)));
return (_local1);
}
public function set lifetimeQuantity(_arg1:Number):void{
this.lifetimeValue = _arg1;
}
public function get quantityLimit():Number{
return (Number(limit));
}
}
}//package com.mtvn.services.core.data.objects
Section 8
//PlayerInfoData (com.mtvn.services.core.data.user.PlayerInfoData)
package com.mtvn.services.core.data.user {
import com.mtvn.services.core.data.*;
import com.mtvn.services.core.data.objects.*;
public class PlayerInfoData extends ServiceData {
public var user:Object;
public var game:Object;
public var site:Object;
public var delta:Object;
public function PlayerInfoData(){
super(this);
site = {};
site.currencies = [];
site.items = [];
site.awards = [];
site.properties = [];
game = {};
game.currencies = [];
game.items = [];
game.awards = [];
game.properties = [];
delta = {};
delta.currencies = [];
delta.items = [];
delta.awards = [];
delta.properties = [];
}
public function get items():Array{
return (game.items.concat());
}
private function printGameObject(_arg1:Array):String{
var _local2:String;
var _local3:String;
var _local4:GameObjectWithValue;
var _local5:int;
var _local6:int;
_local2 = "";
_local3 = " ";
_local5 = _arg1.length;
_local6 = 0;
while (_local6 < _local5) {
_local4 = (_arg1[_local6] as GameObjectWithValue);
_local2 = (_local2 + ((((_local3 + (_local6 + 1)) + ") ") + _local4.name) + "\n"));
_local2 = (_local2 + (((_local3 + "code: ") + _local4.code) + "\n"));
_local2 = (_local2 + (((_local3 + "type: ") + _local4.type) + "\n"));
_local2 = (_local2 + (((_local3 + "subtype: ") + _local4.subtype) + "\n"));
_local2 = (_local2 + (((_local3 + "quantity: ") + String(_local4.value)) + "\n"));
_local6++;
};
return (_local2);
}
public function getItem(_arg1:String):GameObjectWithValue{
var _local2:int;
_local2 = 0;
while (_local2 < game.items.length) {
if (game.items[_local2].code == _arg1){
return ((game.items[_local2] as GameObjectWithValue));
};
_local2++;
};
return (null);
}
public function getCurrencyValue(_arg1:String):Number{
var _local2:int;
_local2 = 0;
while (_local2 < site.currencies.length) {
if (site.currencies[_local2].code == _arg1){
return (site.currencies[_local2].quantity);
};
_local2++;
};
return (0);
}
public function toString():String{
var _local1:String;
_local1 = "PlayerInfoData contents:\n";
_local1 = (_local1 + ((" USER: " + user) + "\n"));
_local1 = (_local1 + " SITE:\n");
if (site.currencies.length > 0){
_local1 = (_local1 + (" Currencies: \n" + printGameObject(site.currencies)));
};
if (site.items.length > 0){
_local1 = (_local1 + (" Items: \n" + printGameObject(site.items)));
};
if (site.currencies.awards > 0){
_local1 = (_local1 + (" Awards: \n" + printGameObject(site.awards)));
};
if (site.properties.length > 0){
_local1 = (_local1 + (" Properties: \n" + printGameObject(site.properties)));
};
_local1 = (_local1 + " GAME:\n");
if (game.currencies.length > 0){
_local1 = (_local1 + (" Currencies: \n" + printGameObject(game.currencies)));
};
if (game.items.length > 0){
_local1 = (_local1 + (" Items: \n" + printGameObject(game.items)));
};
if (game.awards.length > 0){
_local1 = (_local1 + (" Awards: \n" + printGameObject(game.awards)));
};
if (game.properties.length > 0){
_local1 = (_local1 + (" Properties: \n" + printGameObject(game.properties)));
};
_local1 = (_local1 + " DELTA:\n");
if (delta.currencies.length > 0){
_local1 = (_local1 + (" Currencies: \n" + printGameObject(delta.currencies)));
};
if (delta.items.length > 0){
_local1 = (_local1 + (" Items: \n" + printGameObject(delta.items)));
};
if (delta.awards.length > 0){
_local1 = (_local1 + (" Awards: \n" + printGameObject(delta.awards)));
};
if (delta.properties.length > 0){
_local1 = (_local1 + (" Properties: \n" + printGameObject(delta.properties)));
};
return (_local1);
}
public function get currencies():Array{
return (site.currencies.concat());
}
public function getCurrency(_arg1:String):Currency{
var _local2:int;
_local2 = 0;
while (_local2 < site.currencies.length) {
if (site.currencies[_local2].code == _arg1){
return ((site.currencies[_local2] as Currency));
};
_local2++;
};
return (null);
}
}
}//package com.mtvn.services.core.data.user
Section 9
//User (com.mtvn.services.core.data.user.User)
package com.mtvn.services.core.data.user {
import flash.display.*;
import com.mtvn.services.core.data.*;
public class User extends ServiceData {
public var id:String;
public var image:BitmapData;
public var lastName:String;
public var facebookUUID:String;
public var userEmail:String;
public var firstName:String;
public var userType:String;
public var uuid:String;
public var userName:String;
public function User(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:String=""){
this.id = _arg1;
this.uuid = _arg2;
this.userName = _arg3;
this.userEmail = _arg4;
if ((((this.uuid == "")) || ((this.uuid == null)))){
this.uuid = this.id;
};
}
public function toString():String{
return ((((("[User name=" + userName) + ", uuId= ") + uuid) + "]"));
}
}
}//package com.mtvn.services.core.data.user
Section 10
//ServiceData (com.mtvn.services.core.data.ServiceData)
package com.mtvn.services.core.data {
public class ServiceData {
public var object:Object;
public function ServiceData(_arg1:Object=null){
this.object = _arg1;
}
}
}//package com.mtvn.services.core.data
Section 11
//ServiceError (com.mtvn.services.core.errors.ServiceError)
package com.mtvn.services.core.errors {
public class ServiceError {
public var message:String;
public var code:String;
public function ServiceError(_arg1:String, _arg2:String){
this.code = _arg1;
this.message = _arg2;
}
public function toString():String{
return ((((("[ServiceError: " + code) + ", ") + message) + "]"));
}
}
}//package com.mtvn.services.core.errors
Section 12
//ServiceErrorCodes (com.mtvn.services.core.errors.ServiceErrorCodes)
package com.mtvn.services.core.errors {
public class ServiceErrorCodes {
public static const USER_NOT_SIGNED_IN:String = "USER_NOT_SIGNED_IN";
public static const VIRTUAL_GOODS_ERROR:String = "VIRTUAL_GOODS_ERROR";
public static const USER_CANCELED_OPERATION:String = "USER_CANCELED_OPERATION";
public static const SERVER_MANAGER_FAILURE_CODE:String = "SERVER_MANAGER_FAILURE_CODE";
public static const USER_CREATION_MISSING_KEY:String = "USER_CREATION_MISSING_KEY";
public static const CREATE_AND_SHARE_ERROR:String = "CREATE_AND_SHARE_ERROR";
public static const INVALID_PARAMETER:String = "INVALID_PARAMETER";
public static const CREATION_ALREADY_EXISTS:String = "CREATION_ALREADY_EXISTS";
public static const PARAMETER_NOT_FOUND:String = "PARAMETER_NOT_FOUND";
public static const PERSISTENCE_ERROR:String = "PERSISTENCE_ERROR";
public static const ADMIN_SERVICES:String = "ADMIN_SERVICES";
public static const SAVED_BINARY_NOT_FOUND:String = "SAVED_BINARY_NOT_FOUND";
public static const SERVER_ERROR:String = "SERVER_ERROR";
public static const AG_HIGH_SCORES_ERROR:String = "AG_HIGH_SCORES_ERROR";
public static const CREATION_NOT_FOUND:String = "CREATION_NOT_FOUND";
public static const BAD_URL_CODE:String = "BAD_URL_CODE";
public static const URL_POST_ERROR:String = "URL_POST_ERROR";
public static const INIT_FAILURE:String = "INIT_FAILURE";
public static const SAVED_TEXT_NOT_FOUND:String = "SAVED_TEXT_NOT_FOUND";
public static const TEXT_DOWNLOADER_ERROR:String = "TEXT_DOWNLOADER_ERROR";
public function ServiceErrorCodes(){
throw (new Error("ServiceErrorCodes should not be instantiated."));
}
}
}//package com.mtvn.services.core.errors
Section 13
//ServiceEvent (com.mtvn.services.core.events.ServiceEvent)
package com.mtvn.services.core.events {
import com.mtvn.services.core.data.*;
import com.mtvn.services.core.errors.*;
import flash.events.*;
public class ServiceEvent extends Event {
private var _success:Boolean;
private var _data:ServiceData;
private var _error:ServiceError;
public static const INITIALIZED:String = "initilized";
public static const LOADED:String = "loaded";
public static const COMPLETE:String = "complete";
public static const NOTIFICATION:String = "notification";
public function ServiceEvent(_arg1:String, _arg2:Boolean=false, _arg3:ServiceData=null, _arg4:ServiceError=null, _arg5:Boolean=false, _arg6:Boolean=false){
super(_arg1, _arg5, _arg6);
_success = _arg2;
_data = _arg3;
_error = _arg4;
}
public function get success():Boolean{
return (_success);
}
override public function clone():Event{
return (new ServiceEvent(type, _success, _data, _error, bubbles, cancelable));
}
public function get error():ServiceError{
return (_error);
}
public function get data():ServiceData{
return (_data);
}
override public function toString():String{
return (formatToString("ServiceEvent", "type", "success", "data", "error"));
}
}
}//package com.mtvn.services.core.events
Section 14
//ServiceClient (com.mtvn.services.core.ServiceClient)
package com.mtvn.services.core {
import flash.display.*;
import com.mtvn.services.core.errors.*;
import flash.events.*;
import com.mtvn.services.core.commands.*;
import flash.net.*;
import flash.system.*;
public final class ServiceClient extends EventDispatcher {
private const SERVICE_MANAGER_STATUS_LOADING:String = "loading";
private const SERVICE_MANAGER_STATUS_ERROR:String = "error";
private const SERVICE_MANAGER_PACKAGE:String = "com.mtvn.services.ServiceManager";
private const SERVICE_MANAGER_STATUS_READY:String = "ready";
private const DEVELOPER_TOOL_FUNCTION__DEV_STRING_REQUEST:String = "requestDevString";
private var _listeningLC:LocalConnection;
private var _developerString:String;
private var _serviceCallWaitList:Array;
private var serviceManagerLoadStatus:String;
private var _broadcastingLC:LocalConnection;
private var _gameKeyword:String;
private var _devParamStr:String;
private var _devServiceManagerURL:String;
private var _rootDisplayObject:DisplayObjectContainer;
private var _postFunction:Function;
public function ServiceClient(_arg1:String="test", _arg2:DisplayObjectContainer=null){
var _local3:Boolean;
var _local4:Class;
var _local5:Object;
super();
logDebug("MTVN ServiceClient, Version 3.5");
_serviceCallWaitList = [];
_local3 = ApplicationDomain.currentDomain.hasDefinition(SERVICE_MANAGER_PACKAGE);
logDebug(("ServiceManager found: " + _local3));
if (_local3){
serviceManagerLoadStatus = SERVICE_MANAGER_STATUS_READY;
_local4 = Class(ApplicationDomain.currentDomain.getDefinition(SERVICE_MANAGER_PACKAGE));
_local5 = _local4.getInstance.call();
_postFunction = _local5["post"];
logDebug(("_postFunction : " + _postFunction));
} else {
serviceManagerLoadStatus = SERVICE_MANAGER_STATUS_LOADING;
_rootDisplayObject = _arg2;
_postFunction = queueServiceCall;
_gameKeyword = _arg1;
requestLocalDevString(_gameKeyword);
};
}
private function handleLCStatus(_arg1:StatusEvent):void{
if (_arg1.level == "error"){
logDebug("Could not connect locally to Developer Tool to obtain ServiceManger download URL");
logDebug(" - is Developer Tool running?");
logDebug(((" - is Developer Tool game keyword set to '" + _gameKeyword) + "'?"));
serviceManagerLoadFailed();
};
}
private function requestLocalDevString(_arg1:String):void{
var _local2:String;
var _local3:String;
_local2 = ("lc_dev_" + _arg1);
logDebug(("requestLocalDevString: sending to " + _local2));
_local3 = ("lc_code_" + Math.round((Math.random() * 100000)));
_listeningLC = new LocalConnection();
_listeningLC.allowDomain("*");
_listeningLC.client = this;
_listeningLC.connect(_local3);
_broadcastingLC = new LocalConnection();
_broadcastingLC.addEventListener(StatusEvent.STATUS, handleLCStatus);
_broadcastingLC.send(_local2, DEVELOPER_TOOL_FUNCTION__DEV_STRING_REQUEST, _local3);
}
private function onServiceManagerSWFDownloadComplete(_arg1:Event):void{
var _local2:Loader;
var _local3:LoaderContext;
logDebug(("onServiceManagerSWFDownloadComplete: " + _arg1));
_local2 = new Loader();
_local3 = new LoaderContext(false, ApplicationDomain.currentDomain);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, serviceManagerLoaded);
_local2.loadBytes(_arg1.target.data, _local3);
}
private function onIOErrorEvent(_arg1:IOErrorEvent):void{
serviceManagerLoadFailed();
}
private function serviceManagerLoadFailed():void{
var _local1:ServiceCall;
logDebug("ServiceManager could not be loaded");
_postFunction = serviceCallFail;
serviceManagerLoadStatus = SERVICE_MANAGER_STATUS_ERROR;
while (_serviceCallWaitList.length > 0) {
_local1 = _serviceCallWaitList.shift();
serviceCallFail(_local1);
};
}
public function post(_arg1:ServiceCall):ServiceCall{
logDebug(("post: " + _arg1));
_postFunction(_arg1);
return (_arg1);
}
public function setDevString(_arg1:String):void{
var _local2:int;
logDebug("Developer Tool has returned a Dev String");
logDebug((" -Dev String: " + _arg1));
_listeningLC.close();
_local2 = _arg1.indexOf("?");
if (_local2 == -1){
return;
};
_developerString = _arg1;
_devServiceManagerURL = _developerString.substring(0, _local2);
_devParamStr = _developerString.substr((_local2 + 1));
_postFunction = downloadServiceManager;
if (_serviceCallWaitList.length > 0){
downloadServiceManager();
};
}
private function serviceManagerReady(_arg1:Object=null):void{
var _local2:ServiceCall;
logDebug("serviceManagerReady");
serviceManagerLoadStatus = SERVICE_MANAGER_STATUS_READY;
while (_serviceCallWaitList.length > 0) {
_local2 = _serviceCallWaitList.shift();
logDebug(("posting: " + _local2));
_postFunction(_local2);
};
}
private function serviceManagerLoaded(_arg1:Event):void{
var _local2:LoaderInfo;
var _local3:Object;
var _local4:Boolean;
var _local5:Class;
var _local6:Object;
logDebug("serviceManagerLoaded");
_local2 = LoaderInfo(_arg1.target);
_local3 = _arg1.target.loader.content;
if (_rootDisplayObject){
_rootDisplayObject.addChild(DisplayObject(_local3));
};
_local4 = ApplicationDomain.currentDomain.hasDefinition("com.mtvn.services.ServiceManager");
if (_local4){
_local5 = Class(ApplicationDomain.currentDomain.getDefinition("com.mtvn.services.ServiceManager"));
_local6 = _local5.getInstance.call();
_postFunction = _local6["post"];
var _local7 = _local6;
_local7["initializeServiceManager"](_developerString);
_local6.addEventListener("sm_config_loaded", onServiceManagerReady);
} else {
serviceManagerLoadFailed();
};
}
private function downloadServiceManager(_arg1:ServiceCall=null):void{
var _local2:URLLoader;
logDebug(("downloadServiceManager: " + _arg1));
if (_arg1){
queueServiceCall(_arg1);
};
_postFunction = queueServiceCall;
_local2 = new URLLoader();
_local2.dataFormat = URLLoaderDataFormat.BINARY;
_local2.addEventListener(Event.COMPLETE, onServiceManagerSWFDownloadComplete);
_local2.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorEvent);
_devServiceManagerURL = (_devServiceManagerURL + ("?cb=" + Math.ceil((Math.random() * 1000000))));
logDebug(("_devServiceManagerURL: " + _devServiceManagerURL));
_local2.load(new URLRequest(_devServiceManagerURL));
}
private function queueServiceCall(_arg1:ServiceCall):void{
logDebug((" - queuing ServiceCall for later post: " + _arg1));
_serviceCallWaitList.push(_arg1);
}
private function logDebug(_arg1):void{
trace(("INFO [ServiceClient] " + String(_arg1)));
}
private function serviceCallFail(_arg1:ServiceCall){
_arg1.dispatchError(new ServiceError(ServiceErrorCodes.SERVER_MANAGER_FAILURE_CODE, "ServiceManager not found"));
}
private function onServiceManagerReady(_arg1:Event):void{
serviceManagerReady();
}
}
}//package com.mtvn.services.core
Section 15
//mtvn_internal (com.mtvn.mtvn_internal)
package com.mtvn {
public namespace mtvn_internal = "http://www.addictinggames.com/";
}//package com.mtvn
Section 16
//_truck3_back_wheel__5 (g_beach_fla._truck3_back_wheel__5)
package g_beach_fla {
import flash.display.*;
public dynamic class _truck3_back_wheel__5 extends MovieClip {
public var mc:MovieClip;
}
}//package g_beach_fla
Section 17
//_truck3_back_wheel_6 (g_beach_fla._truck3_back_wheel_6)
package g_beach_fla {
import flash.display.*;
public dynamic class _truck3_back_wheel_6 extends MovieClip {
public var mc_rim:MovieClip;
}
}//package g_beach_fla
Section 18
//_truck3_body_13 (g_beach_fla._truck3_body_13)
package g_beach_fla {
import flash.display.*;
public dynamic class _truck3_body_13 extends MovieClip {
public var mc_back_spring:MovieClip;
}
}//package g_beach_fla
Section 19
//_truck3_forward_wheel__9 (g_beach_fla._truck3_forward_wheel__9)
package g_beach_fla {
import flash.display.*;
public dynamic class _truck3_forward_wheel__9 extends MovieClip {
public var mc:MovieClip;
}
}//package g_beach_fla
Section 20
//_truck3_forward_wheel_10 (g_beach_fla._truck3_forward_wheel_10)
package g_beach_fla {
import flash.display.*;
public dynamic class _truck3_forward_wheel_10 extends MovieClip {
public var mc_rim:MovieClip;
}
}//package g_beach_fla
Section 21
//AcheivementUI_138 (g_beach_fla.AcheivementUI_138)
package g_beach_fla {
import flash.display.*;
public dynamic class AcheivementUI_138 extends MovieClip {
public var achievements:Array;
public var achievementClip:MovieClip;
public var curAcc:uint;
public function AcheivementUI_138(){
addFrameScript(0, frame1, 2, frame3);
}
public function upd():void{
if (currentFrame == 2){
if (achievements.length > 0){
curAcc = achievements.shift();
gotoAndStop(3);
};
} else {
if (currentFrame < totalFrames){
nextFrame();
} else {
gotoAndStop(2);
};
};
}
function frame3(){
achievementClip.gotoAndStop(curAcc);
}
function frame1(){
achievements = new Array();
gotoAndStop(2);
}
public function addAchievement(_arg1:uint):void{
achievements.push((_arg1 + 1));
}
}
}//package g_beach_fla
Section 22
//ag_splash_bike_1 (g_beach_fla.ag_splash_bike_1)
package g_beach_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
public dynamic class ag_splash_bike_1 extends MovieClip {
public var b:MovieClip;
public var siteButton:SimpleButton;
public var h:MovieClip;
public var l:MovieClip;
public var mc:MovieClip;
public var updateInterval:int;
public var myTimer:Timer;
public function ag_splash_bike_1(){
addFrameScript(0, frame1);
}
public function playNextFrame(_arg1:TimerEvent):void{
if (currentFrame < totalFrames){
nextFrame();
_arg1.updateAfterEvent();
} else {
myTimer.stop();
myTimer.removeEventListener(TimerEvent.TIMER, playNextFrame);
if ((root is MovieClip)){
(root as MovieClip).play();
if (parent){
parent.removeChild(this);
};
};
};
}
function frame1(){
stop();
if ((root is MovieClip)){
(root as MovieClip).stop();
};
siteButton.addEventListener(MouseEvent.CLICK, clickBtn);
updateInterval = 33.3;
myTimer = new Timer(updateInterval, 0);
myTimer.start();
myTimer.addEventListener(TimerEvent.TIMER, playNextFrame);
}
public function clickBtn(_arg1:MouseEvent):void{
var url:String;
var facebookRegExp:RegExp;
var request:URLRequest;
var event = _arg1;
url = "http://www.addictinggames.com";
facebookRegExp = /^http:\/\/([-a-zA-Z0-9\.?])+facebook\.addictinggames\.com(\/|$)/;
if (!facebookRegExp.test(root.loaderInfo.url)){
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
};
}
}
}//package g_beach_fla
Section 23
//AirshipClip_182 (g_beach_fla.AirshipClip_182)
package g_beach_fla {
import flash.display.*;
public dynamic class AirshipClip_182 extends MovieClip {
public function AirshipClip_182(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 24
//AirshipFinal_308 (g_beach_fla.AirshipFinal_308)
package g_beach_fla {
import flash.display.*;
public dynamic class AirshipFinal_308 extends MovieClip {
public function AirshipFinal_308(){
addFrameScript(0, frame1, 104, frame105);
}
function frame105(){
gotoAndStop(80);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 25
//AirshipFinalBase_296 (g_beach_fla.AirshipFinalBase_296)
package g_beach_fla {
import flash.display.*;
public dynamic class AirshipFinalBase_296 extends MovieClip {
public function AirshipFinalBase_296(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(2);
}
}
}//package g_beach_fla
Section 26
//AnnouncementsImage_194 (g_beach_fla.AnnouncementsImage_194)
package g_beach_fla {
import flash.display.*;
public dynamic class AnnouncementsImage_194 extends MovieClip {
public function AnnouncementsImage_194(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 27
//BodyGun1_174 (g_beach_fla.BodyGun1_174)
package g_beach_fla {
import flash.display.*;
public dynamic class BodyGun1_174 extends MovieClip {
public var shell:MovieClip;
public var dot:MovieClip;
public function BodyGun1_174(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 28
//BodyGun2_175 (g_beach_fla.BodyGun2_175)
package g_beach_fla {
import flash.display.*;
public dynamic class BodyGun2_175 extends MovieClip {
public var steam:MovieClip;
public var dot:MovieClip;
public function BodyGun2_175(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 29
//BodyGun3_176 (g_beach_fla.BodyGun3_176)
package g_beach_fla {
import flash.display.*;
public dynamic class BodyGun3_176 extends MovieClip {
public var shell:MovieClip;
public var dot:MovieClip;
public function BodyGun3_176(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 30
//BodyGun4_177 (g_beach_fla.BodyGun4_177)
package g_beach_fla {
import flash.display.*;
public dynamic class BodyGun4_177 extends MovieClip {
public var shell:MovieClip;
public var dot:MovieClip;
public function BodyGun4_177(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 31
//BodyGun5_178 (g_beach_fla.BodyGun5_178)
package g_beach_fla {
import flash.display.*;
public dynamic class BodyGun5_178 extends MovieClip {
public var dot:MovieClip;
public function BodyGun5_178(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 32
//BodyGun6_179 (g_beach_fla.BodyGun6_179)
package g_beach_fla {
import flash.display.*;
public dynamic class BodyGun6_179 extends MovieClip {
public var shell:MovieClip;
public var dot:MovieClip;
public function BodyGun6_179(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 33
//BodyGun7_180 (g_beach_fla.BodyGun7_180)
package g_beach_fla {
import flash.display.*;
public dynamic class BodyGun7_180 extends MovieClip {
public var dot2:MovieClip;
public var dot3:MovieClip;
public var shell:MovieClip;
public var dot:MovieClip;
public function BodyGun7_180(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 34
//BorderClip_185 (g_beach_fla.BorderClip_185)
package g_beach_fla {
import flash.display.*;
public dynamic class BorderClip_185 extends MovieClip {
public function BorderClip_185(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 35
//Bridges1_166 (g_beach_fla.Bridges1_166)
package g_beach_fla {
import flash.display.*;
public dynamic class Bridges1_166 extends MovieClip {
public var staple:MovieClip;
}
}//package g_beach_fla
Section 36
//Bridges2_172 (g_beach_fla.Bridges2_172)
package g_beach_fla {
import flash.display.*;
public dynamic class Bridges2_172 extends MovieClip {
public function Bridges2_172(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 37
//CavesMap_147 (g_beach_fla.CavesMap_147)
package g_beach_fla {
import flash.display.*;
public dynamic class CavesMap_147 extends MovieClip {
public var high12:MovieClip;
public var high13:MovieClip;
public var high10:MovieClip;
public var high11:MovieClip;
public var high1:MovieClip;
public var high2:MovieClip;
public var high3:MovieClip;
public var high4:MovieClip;
public var high5:MovieClip;
public var high6:MovieClip;
public var high7:MovieClip;
public var high8:MovieClip;
public var high9:MovieClip;
}
}//package g_beach_fla
Section 38
//CrabBossAttack1_263 (g_beach_fla.CrabBossAttack1_263)
package g_beach_fla {
import flash.display.*;
public dynamic class CrabBossAttack1_263 extends MovieClip {
public var dmgBox:MovieClip;
public function CrabBossAttack1_263(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 39
//CrabBossAttack2_264 (g_beach_fla.CrabBossAttack2_264)
package g_beach_fla {
import flash.display.*;
public dynamic class CrabBossAttack2_264 extends MovieClip {
public var dmgBox:MovieClip;
public function CrabBossAttack2_264(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 40
//CrabBossAttack3_265 (g_beach_fla.CrabBossAttack3_265)
package g_beach_fla {
import flash.display.*;
public dynamic class CrabBossAttack3_265 extends MovieClip {
public var dmgBox:MovieClip;
public function CrabBossAttack3_265(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 41
//CrabBossDie_266 (g_beach_fla.CrabBossDie_266)
package g_beach_fla {
import flash.display.*;
public dynamic class CrabBossDie_266 extends MovieClip {
public function CrabBossDie_266(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 42
//CrabBossTurnAntiClockwise_262 (g_beach_fla.CrabBossTurnAntiClockwise_262)
package g_beach_fla {
import flash.display.*;
public dynamic class CrabBossTurnAntiClockwise_262 extends MovieClip {
public function CrabBossTurnAntiClockwise_262(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 43
//CrabBossTurnClockwise_261 (g_beach_fla.CrabBossTurnClockwise_261)
package g_beach_fla {
import flash.display.*;
public dynamic class CrabBossTurnClockwise_261 extends MovieClip {
public function CrabBossTurnClockwise_261(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 44
//CrabBossWait_260 (g_beach_fla.CrabBossWait_260)
package g_beach_fla {
import flash.display.*;
public dynamic class CrabBossWait_260 extends MovieClip {
public function CrabBossWait_260(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 45
//CrawlerAttack_52 (g_beach_fla.CrawlerAttack_52)
package g_beach_fla {
import flash.display.*;
public dynamic class CrawlerAttack_52 extends MovieClip {
public var dot:MovieClip;
public function CrawlerAttack_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 46
//CrawlerDie_54 (g_beach_fla.CrawlerDie_54)
package g_beach_fla {
import flash.display.*;
public dynamic class CrawlerDie_54 extends MovieClip {
public function CrawlerDie_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 47
//CrawlerEmerge_55 (g_beach_fla.CrawlerEmerge_55)
package g_beach_fla {
import flash.display.*;
public dynamic class CrawlerEmerge_55 extends MovieClip {
public function CrawlerEmerge_55(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 48
//CrawlerWait_50 (g_beach_fla.CrawlerWait_50)
package g_beach_fla {
import flash.display.*;
public dynamic class CrawlerWait_50 extends MovieClip {
public function CrawlerWait_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 49
//CrawlerWalk_51 (g_beach_fla.CrawlerWalk_51)
package g_beach_fla {
import flash.display.*;
public dynamic class CrawlerWalk_51 extends MovieClip {
public function CrawlerWalk_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 50
//DemonAttack_83 (g_beach_fla.DemonAttack_83)
package g_beach_fla {
import flash.display.*;
public dynamic class DemonAttack_83 extends MovieClip {
public var dot1:MovieClip;
public var dot2:MovieClip;
public var dot3:MovieClip;
public function DemonAttack_83(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 51
//DemonCast_84 (g_beach_fla.DemonCast_84)
package g_beach_fla {
import flash.display.*;
public dynamic class DemonCast_84 extends MovieClip {
public function DemonCast_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 52
//DemonDie_85 (g_beach_fla.DemonDie_85)
package g_beach_fla {
import flash.display.*;
public dynamic class DemonDie_85 extends MovieClip {
public function DemonDie_85(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 53
//DemonPortIn_82 (g_beach_fla.DemonPortIn_82)
package g_beach_fla {
import flash.display.*;
public dynamic class DemonPortIn_82 extends MovieClip {
public function DemonPortIn_82(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 54
//DemonWait_81 (g_beach_fla.DemonWait_81)
package g_beach_fla {
import flash.display.*;
public dynamic class DemonWait_81 extends MovieClip {
public function DemonWait_81(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 55
//EelAttack_318 (g_beach_fla.EelAttack_318)
package g_beach_fla {
import flash.display.*;
public dynamic class EelAttack_318 extends MovieClip {
public function EelAttack_318(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 56
//EelDie_319 (g_beach_fla.EelDie_319)
package g_beach_fla {
import flash.display.*;
public dynamic class EelDie_319 extends MovieClip {
public function EelDie_319(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 57
//EelMain_316 (g_beach_fla.EelMain_316)
package g_beach_fla {
import flash.display.*;
public dynamic class EelMain_316 extends MovieClip {
public function EelMain_316(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 58
//EelWait_317 (g_beach_fla.EelWait_317)
package g_beach_fla {
import flash.display.*;
public dynamic class EelWait_317 extends MovieClip {
public function EelWait_317(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 59
//EnergyFly_48 (g_beach_fla.EnergyFly_48)
package g_beach_fla {
import flash.display.*;
public dynamic class EnergyFly_48 extends MovieClip {
public function EnergyFly_48(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
}
}
}//package g_beach_fla
Section 60
//EnergyTail_47 (g_beach_fla.EnergyTail_47)
package g_beach_fla {
import flash.display.*;
public dynamic class EnergyTail_47 extends MovieClip {
public function EnergyTail_47(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
}
}
}//package g_beach_fla
Section 61
//EskerGrabAni_271 (g_beach_fla.EskerGrabAni_271)
package g_beach_fla {
import flash.display.*;
public dynamic class EskerGrabAni_271 extends MovieClip {
public function EskerGrabAni_271(){
addFrameScript(0, frame1, 19, frame20, 98, frame99, 178, frame179);
}
public function upd():void{
if ((((currentFrame > 1)) && ((currentFrame < totalFrames)))){
nextFrame();
};
}
function frame1(){
stop();
}
function frame179(){
gotoAndStop(totalFrames);
}
function frame20(){
gotoAndStop((20 + (80 * Math.floor((Math.random() * 3)))));
}
function frame99(){
gotoAndStop(totalFrames);
}
}
}//package g_beach_fla
Section 62
//EskerShield_307 (g_beach_fla.EskerShield_307)
package g_beach_fla {
import flash.display.*;
public dynamic class EskerShield_307 extends MovieClip {
public function EskerShield_307(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 63
//FadeIn_149 (g_beach_fla.FadeIn_149)
package g_beach_fla {
import flash.display.*;
public dynamic class FadeIn_149 extends MovieClip {
public function FadeIn_149(){
addFrameScript(0, frame1);
}
function frame1(){
nextFrame();
}
}
}//package g_beach_fla
Section 64
//FadeOut_195 (g_beach_fla.FadeOut_195)
package g_beach_fla {
import flash.display.*;
public dynamic class FadeOut_195 extends MovieClip {
public function FadeOut_195(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 65
//FearEffect_256 (g_beach_fla.FearEffect_256)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class FearEffect_256 extends MovieClip {
public var bmpHold:MovieClip;
public var screenshotData:BitmapData;
public var screenshotImage:Bitmap;
public var mons:MovieClip;
public function FearEffect_256(){
addFrameScript(0, frame1, 34, frame35);
}
function frame1(){
stop();
mons.gotoAndStop(2);
}
public function addFear(_arg1:Object):void{
var _local2:Point;
_local2 = _arg1.player.localToGlobal(new Point());
gotoAndPlay(2);
screenshotData = new BitmapData(550, 450, true, 0);
screenshotImage = new Bitmap(screenshotData, "auto", true);
screenshotData.draw(_arg1.theRoot);
mons.x = (_local2.x - 70);
mons.y = (_local2.y - 10);
bmpHold.addChild(screenshotImage);
}
function frame35(){
stop();
removeFear();
}
public function removeFear():void{
bmpHold.removeChild(screenshotImage);
visible = false;
}
}
}//package g_beach_fla
Section 66
//FireAni_250 (g_beach_fla.FireAni_250)
package g_beach_fla {
import flash.display.*;
public dynamic class FireAni_250 extends MovieClip {
public function FireAni_250(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 67
//FloatFishAttack_103 (g_beach_fla.FloatFishAttack_103)
package g_beach_fla {
import flash.display.*;
public dynamic class FloatFishAttack_103 extends MovieClip {
public var dot1:MovieClip;
public var dot2:MovieClip;
public function FloatFishAttack_103(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 68
//FloatFishDie_105 (g_beach_fla.FloatFishDie_105)
package g_beach_fla {
import flash.display.*;
public dynamic class FloatFishDie_105 extends MovieClip {
public function FloatFishDie_105(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 69
//FloatFishEmerge_104 (g_beach_fla.FloatFishEmerge_104)
package g_beach_fla {
import flash.display.*;
public dynamic class FloatFishEmerge_104 extends MovieClip {
public function FloatFishEmerge_104(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 70
//FloatFishMove_102 (g_beach_fla.FloatFishMove_102)
package g_beach_fla {
import flash.display.*;
public dynamic class FloatFishMove_102 extends MovieClip {
public function FloatFishMove_102(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 71
//FloatFishWait_101 (g_beach_fla.FloatFishWait_101)
package g_beach_fla {
import flash.display.*;
public dynamic class FloatFishWait_101 extends MovieClip {
public function FloatFishWait_101(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 72
//GameIntro_162 (g_beach_fla.GameIntro_162)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class GameIntro_162 extends MovieClip {
public const mrandom:Function;
public var effects:MovieClip;
public var ides:Array;
public var skipBtn:SkipBtn;
public var fadeIn:MovieClip;
public function GameIntro_162(){
mrandom = Math.random;
super();
addFrameScript(0, frame1, 29, frame30, 729, frame730, 749, frame750);
}
public function upd(_arg1:Object):void{
addPentagon();
pentsUpd(_arg1);
}
public function addPentagon():void{
var clip:Pentagon;
clip = new Pentagon();
clip.x = -50;
clip.y = (100 + (mrandom() * 350));
clip.scaleX = (clip.scaleY = (((0.5 + mrandom()) * clip.y) / 450));
clip.rotation = (mrandom() * 360);
clip.alpha = (0.05 + (mrandom() * 0.05));
clip.rspd = (5 + (mrandom() * 5));
clip.active = true;
clip.holder = effects;
clip.upd = function (_arg1:Object):void{
if (clip.x < 600){
clip.x = (clip.x + (12 * clip.scaleX));
clip.rotation = (clip.rotation + clip.rspd);
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
function frame730(){
}
function frame1(){
ides = new Array();
play();
}
function frame30(){
skipBtn.turnOn();
skipBtn.onPress = function ():void{
gotoAndStop(750);
skipBtn.turnOff();
};
}
public function reJigHealth(_arg1:Object):void{
}
function frame750(){
stop();
dispatchEvent(new Event("introOver"));
}
public function pentsUpd(_arg1:Object):void{
var _local2:uint;
_local2 = 0;
while (_local2 < ides.length) {
if (ides[_local2].active){
ides[_local2].upd(_arg1);
} else {
ides[_local2].holder.removeChild(ides[_local2]);
ides.splice(_local2, 1);
_local2--;
};
_local2++;
};
}
public function reJig(_arg1:Object):void{
}
}
}//package g_beach_fla
Section 73
//GameOverHold_158 (g_beach_fla.GameOverHold_158)
package g_beach_fla {
import flash.display.*;
import flash.events.*;
public dynamic class GameOverHold_158 extends MovieClip {
public var btn_retry:GameoverRetry;
public var screenshotChar:MovieClip;
public var exitEvent:Event;
public var screenshot:MovieClip;
public var btn_menu:GameoverMenu;
public var screenshotCharGlow:MovieClip;
public var fadeIn:MovieClip;
public function GameOverHold_158(){
addFrameScript(0, frame1, 30, frame31, 32, frame33, 39, frame40, 44, frame45, 64, frame65);
}
function frame65(){
dispatchEvent(exitEvent);
}
public function upd(_arg1:Object):void{
}
function frame1(){
play();
}
public function reJigHealth(_arg1:Object):void{
}
function frame31(){
btn_retry.turnOn();
btn_retry.onPress = function ():void{
gotoAndPlay(45);
exitEvent = new Event("gameContinue");
};
}
function frame40(){
stop();
}
function frame33(){
btn_menu.turnOn();
btn_menu.onPress = function ():void{
gotoAndPlay(45);
exitEvent = new Event("mainMenu");
};
}
function frame45(){
btn_retry.turnOff();
btn_menu.turnOff();
}
public function reJig(_arg1:Object):void{
}
}
}//package g_beach_fla
Section 74
//Gunnouncments_193 (g_beach_fla.Gunnouncments_193)
package g_beach_fla {
import flash.display.*;
public dynamic class Gunnouncments_193 extends MovieClip {
public var image:MovieClip;
public function Gunnouncments_193(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 75
//ImageGoldBag_191 (g_beach_fla.ImageGoldBag_191)
package g_beach_fla {
import flash.display.*;
public dynamic class ImageGoldBag_191 extends MovieClip {
public function ImageGoldBag_191(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 76
//ItemGet_306 (g_beach_fla.ItemGet_306)
package g_beach_fla {
import flash.display.*;
public dynamic class ItemGet_306 extends MovieClip {
public var hitbox:MovieClip;
public function ItemGet_306(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 77
//LastBossAttack1_300 (g_beach_fla.LastBossAttack1_300)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossAttack1_300 extends MovieClip {
public var hitbox:MovieClip;
public function LastBossAttack1_300(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 78
//LastBossAttack2_301 (g_beach_fla.LastBossAttack2_301)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossAttack2_301 extends MovieClip {
public var dot:MovieClip;
public function LastBossAttack2_301(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 79
//LastBossAttack3_302 (g_beach_fla.LastBossAttack3_302)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossAttack3_302 extends MovieClip {
public var hitbox:MovieClip;
public function LastBossAttack3_302(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 80
//LastBossCast_303 (g_beach_fla.LastBossCast_303)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossCast_303 extends MovieClip {
public function LastBossCast_303(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 81
//LastBossDie_305 (g_beach_fla.LastBossDie_305)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossDie_305 extends MovieClip {
public var theItem:MovieClip;
public function LastBossDie_305(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 82
//LastBossPre_272 (g_beach_fla.LastBossPre_272)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossPre_272 extends MovieClip {
public function LastBossPre_272(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 83
//LastBossPreRun_273 (g_beach_fla.LastBossPreRun_273)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossPreRun_273 extends MovieClip {
public function LastBossPreRun_273(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 84
//LastBossRun_299 (g_beach_fla.LastBossRun_299)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossRun_299 extends MovieClip {
public function LastBossRun_299(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 85
//LastBossShield_304 (g_beach_fla.LastBossShield_304)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossShield_304 extends MovieClip {
public function LastBossShield_304(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 86
//LastBossWait_298 (g_beach_fla.LastBossWait_298)
package g_beach_fla {
import flash.display.*;
public dynamic class LastBossWait_298 extends MovieClip {
public function LastBossWait_298(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 87
//LegsDie_170 (g_beach_fla.LegsDie_170)
package g_beach_fla {
import flash.display.*;
public dynamic class LegsDie_170 extends MovieClip {
public function LegsDie_170(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 88
//LegsKick_171 (g_beach_fla.LegsKick_171)
package g_beach_fla {
import flash.display.*;
public dynamic class LegsKick_171 extends MovieClip {
public var dot:MovieClip;
public function LegsKick_171(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 89
//LegsWalkForward_169 (g_beach_fla.LegsWalkForward_169)
package g_beach_fla {
import flash.display.*;
public dynamic class LegsWalkForward_169 extends MovieClip {
public var footPad:MovieClip;
public function LegsWalkForward_169(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 90
//Leve12EnemyPaths_290 (g_beach_fla.Leve12EnemyPaths_290)
package g_beach_fla {
import flash.display.*;
public dynamic class Leve12EnemyPaths_290 extends MovieClip {
public function Leve12EnemyPaths_290(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 91
//Level10EnemyPaths_279 (g_beach_fla.Level10EnemyPaths_279)
package g_beach_fla {
import flash.display.*;
public dynamic class Level10EnemyPaths_279 extends MovieClip {
public function Level10EnemyPaths_279(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 92
//Level10EnemyPathsWater_278 (g_beach_fla.Level10EnemyPathsWater_278)
package g_beach_fla {
import flash.display.*;
public dynamic class Level10EnemyPathsWater_278 extends MovieClip {
public function Level10EnemyPathsWater_278(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 93
//Level10HeightMap_280 (g_beach_fla.Level10HeightMap_280)
package g_beach_fla {
import flash.display.*;
public dynamic class Level10HeightMap_280 extends MovieClip {
public function Level10HeightMap_280(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 94
//Level10Hold_277 (g_beach_fla.Level10Hold_277)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level10Hold_277 extends MovieClip {
public var merman5a:MovieClip;
public var merman5b:MovieClip;
public var merman5c:MovieClip;
public var merman5d:MovieClip;
public var playerMain:MainCharBody;
public var eventTrigger10:MovieClip;
public var crawler1a:MovieClip;
public var crawler1b:MovieClip;
public var crawler1d:MovieClip;
public var crawler1f:MovieClip;
public var crawler1h:MovieClip;
public var crawler1i:MovieClip;
public var crawler1j:MovieClip;
public var crawler1k:MovieClip;
public var crawler1l:MovieClip;
public var crawler1m:MovieClip;
public var crawler1n:MovieClip;
public var crawler1p:MovieClip;
public var crawler1c:MovieClip;
public var crawler1e:MovieClip;
public var mapTypes:MovieClip;
public var crawler1g:MovieClip;
public var crawler2a:MovieClip;
public var crawler2b:MovieClip;
public var crawler2d:MovieClip;
public var crawler2e:MovieClip;
public var crawler2f:MovieClip;
public var crawler2g:MovieClip;
public var crawler2h:MovieClip;
public var crawler2i:MovieClip;
public var crawler2j:MovieClip;
public var crawler2m:MovieClip;
public var crawler2n:MovieClip;
public var crawler2o:MovieClip;
public var crawler2p:MovieClip;
public var crawler1o:MovieClip;
public var crawler2l:MovieClip;
public var crawler2q:MovieClip;
public var crawler2r:MovieClip;
public var crawler2c:MovieClip;
public var crawler2k:MovieClip;
public var effectsTop:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd4:MovieClip;
public var nd5:MovieClip;
public var nd7:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd6:MovieClip;
public var playerBase:MovieClip;
public var health1:MovieClip;
public var health2:MovieClip;
public var health3:MovieClip;
public var health4:MovieClip;
public var health6:MovieClip;
public var ammo10:MovieClip;
public var ammo11:MovieClip;
public var health5:MovieClip;
public var ammo12:MovieClip;
public var lobster1a:MovieClip;
public var lobster1b:MovieClip;
public var lobster1c:MovieClip;
public var lobster1d:MovieClip;
public var lobster1e:MovieClip;
public var wd10:MovieClip;
public var wd11:MovieClip;
public var wd12:MovieClip;
public var wd13:MovieClip;
public var wd14:MovieClip;
public var wd15:MovieClip;
public var lobster2a:MovieClip;
public var lobster2b:MovieClip;
public var lobster2c:MovieClip;
public var lobster2e:MovieClip;
public var lobster2f:MovieClip;
public var borders:MovieClip;
public var bridge1:MovieClip;
public var bridge2:MovieClip;
public var bridge3:MovieClip;
public var bridge5:MovieClip;
public var bridge6:MovieClip;
public var bridge7:MovieClip;
public var bridge4:MovieClip;
public var lobster2d:MovieClip;
public var effectsMid:MovieClip;
public var waterPaths:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var eventTrigger5:MovieClip;
public var eventTrigger6:MovieClip;
public var eventTrigger9:MovieClip;
public var eventTrigger8:MovieClip;
public var nd10:MovieClip;
public var nd11:MovieClip;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd16:MovieClip;
public var nd17:MovieClip;
public var nd18:MovieClip;
public var enemyPaths:MovieClip;
public var nd15:MovieClip;
public var nd19:MovieClip;
public var eventTrigger7:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var nd24:MovieClip;
public var nd25:MovieClip;
public var nd26:MovieClip;
public var nd27:MovieClip;
public var nd28:MovieClip;
public var gold10:MovieClip;
public var gold12:MovieClip;
public var gold14:MovieClip;
public var gold18:MovieClip;
public var nd29:MovieClip;
public var gold19:MovieClip;
public var nd31:MovieClip;
public var nd32:MovieClip;
public var nd33:MovieClip;
public var nd34:MovieClip;
public var gold11:MovieClip;
public var nd36:MovieClip;
public var nd30:MovieClip;
public var nd38:MovieClip;
public var gold15:MovieClip;
public var gold16:MovieClip;
public var gold17:MovieClip;
public var nd35:MovieClip;
public var nd37:MovieClip;
public var gold13:MovieClip;
public var playerTop:MovieClip;
public var mermaid2:MovieClip;
public var mermaid3:MovieClip;
public var mermaid4:MovieClip;
public var mermaid5:MovieClip;
public var mermaid6:MovieClip;
public var mermaid1:MovieClip;
public var exit1:MovieClip;
public var merman1:MovieClip;
public var effectsBase:MovieClip;
public var wd1:MovieClip;
public var wd2:MovieClip;
public var wd3:MovieClip;
public var wd5:MovieClip;
public var wd6:MovieClip;
public var wd8:MovieClip;
public var wd9:MovieClip;
public var wd4:MovieClip;
public var wd7:MovieClip;
public var ammo1:MovieClip;
public var ammo2:MovieClip;
public var ammo3:MovieClip;
public var ammo4:MovieClip;
public var ammo5:MovieClip;
public var ammo7:MovieClip;
public var exitEff1:MovieClip;
public var ammo9:MovieClip;
public var ammo6:MovieClip;
public var mapHeights:MovieClip;
public var ammo8:MovieClip;
public var effectsBase2:MovieClip;
public var merman2a:MovieClip;
public var merman2b:MovieClip;
public var merman2c:MovieClip;
public var merman2d:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var activator3:MovieClip;
public var activator4:MovieClip;
public var activator5:MovieClip;
public var activator6:MovieClip;
public var activator7:MovieClip;
public var merman3a:MovieClip;
public var merman3b:MovieClip;
public var gold1:MovieClip;
public var gold2:MovieClip;
public var gold3:MovieClip;
public var gold4:MovieClip;
public var gold5:MovieClip;
public var gold6:MovieClip;
public var gold7:MovieClip;
public var gold9:MovieClip;
public var gold8:MovieClip;
public var merman4a:MovieClip;
public var merman4b:MovieClip;
public var merman4c:MovieClip;
public function Level10Hold_277(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 1));
};
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
};
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
};
if (((eventTrigger4.canFlip) && (playerMain.hitp(eventTrigger4)))){
eventTrigger4.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 4));
};
if (((eventTrigger5.canFlip) && (playerMain.hitp(eventTrigger5)))){
eventTrigger5.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 5));
};
if (((eventTrigger6.canFlip) && (playerMain.hitp(eventTrigger6)))){
eventTrigger6.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 6));
};
if (((eventTrigger7.canFlip) && (playerMain.hitp(eventTrigger7)))){
eventTrigger7.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 7));
};
if (((eventTrigger8.canFlip) && (playerMain.hitp(eventTrigger8)))){
eventTrigger8.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 8));
};
if (((eventTrigger9.canFlip) && (playerMain.hitp(eventTrigger9)))){
eventTrigger9.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 9));
};
if (((eventTrigger10.canFlip) && (playerMain.hitp(eventTrigger10)))){
eventTrigger10.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 10));
};
}
public function setUp():void{
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
eventTrigger5.canFlip = true;
eventTrigger6.canFlip = true;
eventTrigger7.canFlip = true;
eventTrigger8.canFlip = true;
eventTrigger9.canFlip = true;
eventTrigger10.canFlip = true;
}
}
}//package g_beach_fla
Section 95
//Level10TerrainMap_281 (g_beach_fla.Level10TerrainMap_281)
package g_beach_fla {
import flash.display.*;
public dynamic class Level10TerrainMap_281 extends MovieClip {
public function Level10TerrainMap_281(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 96
//Level11EnemyPaths_285 (g_beach_fla.Level11EnemyPaths_285)
package g_beach_fla {
import flash.display.*;
public dynamic class Level11EnemyPaths_285 extends MovieClip {
public function Level11EnemyPaths_285(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 97
//Level11HeightMap_286 (g_beach_fla.Level11HeightMap_286)
package g_beach_fla {
import flash.display.*;
public dynamic class Level11HeightMap_286 extends MovieClip {
public function Level11HeightMap_286(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 98
//Level11Hold_282 (g_beach_fla.Level11Hold_282)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level11Hold_282 extends MovieClip {
public var floatfish1a:MovieClip;
public var floatfish1b:MovieClip;
public var floatfish1c:MovieClip;
public var floatfish1d:MovieClip;
public var floatfish2a:MovieClip;
public var floatfish2b:MovieClip;
public var floatfish2c:MovieClip;
public var floatfish2d:MovieClip;
public var floatfish2e:MovieClip;
public var floatfish2f:MovieClip;
public var playerMain:MainCharBody;
public var crawler1a:MovieClip;
public var crawler1b:MovieClip;
public var crawler1d:MovieClip;
public var crawler1f:MovieClip;
public var crawler1h:MovieClip;
public var crawler1i:MovieClip;
public var crawler1j:MovieClip;
public var crawler1k:MovieClip;
public var crawler1l:MovieClip;
public var crawler1g:MovieClip;
public var crawler1e:MovieClip;
public var mapTypes:MovieClip;
public var crawler1c:MovieClip;
public var effectsTop:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd4:MovieClip;
public var nd5:MovieClip;
public var nd7:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd6:MovieClip;
public var playerBase:MovieClip;
public var health1:MovieClip;
public var health2:MovieClip;
public var health3:MovieClip;
public var health4:MovieClip;
public var health6:MovieClip;
public var ammo10:MovieClip;
public var ammo14:MovieClip;
public var ammo16:MovieClip;
public var ammo18:MovieClip;
public var ammo19:MovieClip;
public var ammo15:MovieClip;
public var health5:MovieClip;
public var ammo12:MovieClip;
public var ammo13:MovieClip;
public var ammo17:MovieClip;
public var ammo22:MovieClip;
public var ammo11:MovieClip;
public var ammo20:MovieClip;
public var ammo21:MovieClip;
public var borders:MovieClip;
public var bridge1:MovieClip;
public var bridge9:MovieClip;
public var effectsMid:MovieClip;
public var stair2:MovieClip;
public var stair3:MovieClip;
public var stair4:MovieClip;
public var stair5:MovieClip;
public var stair6:MovieClip;
public var stair7:MovieClip;
public var stair8:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var eventTrigger5:MovieClip;
public var eventTrigger6:MovieClip;
public var eventTrigger9:MovieClip;
public var eventTrigger8:MovieClip;
public var nd10:MovieClip;
public var nd11:MovieClip;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd16:MovieClip;
public var nd17:MovieClip;
public var nd18:MovieClip;
public var enemyPaths:MovieClip;
public var nd15:MovieClip;
public var nd19:MovieClip;
public var eventTrigger7:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var nd24:MovieClip;
public var nd25:MovieClip;
public var nd26:MovieClip;
public var nd27:MovieClip;
public var nd28:MovieClip;
public var gold10:MovieClip;
public var gold12:MovieClip;
public var gold14:MovieClip;
public var gold11:MovieClip;
public var nd29:MovieClip;
public var nd31:MovieClip;
public var nd32:MovieClip;
public var nd33:MovieClip;
public var nd34:MovieClip;
public var nd35:MovieClip;
public var nd36:MovieClip;
public var nd30:MovieClip;
public var nd38:MovieClip;
public var gold15:MovieClip;
public var gold16:MovieClip;
public var gold17:MovieClip;
public var nd37:MovieClip;
public var nd39:MovieClip;
public var gold13:MovieClip;
public var nd41:MovieClip;
public var nd42:MovieClip;
public var nd43:MovieClip;
public var nd44:MovieClip;
public var nd45:MovieClip;
public var nd46:MovieClip;
public var nd47:MovieClip;
public var nd48:MovieClip;
public var nd49:MovieClip;
public var nd40:MovieClip;
public var playerTop:MovieClip;
public var nd50:MovieClip;
public var nd51:MovieClip;
public var nd52:MovieClip;
public var nd53:MovieClip;
public var nd54:MovieClip;
public var nd55:MovieClip;
public var nd56:MovieClip;
public var exit1:MovieClip;
public var effectsBase:MovieClip;
public var octomage4:MovieClip;
public var ammo1:MovieClip;
public var ammo3:MovieClip;
public var ammo4:MovieClip;
public var exitEff1:MovieClip;
public var ammo2:MovieClip;
public var ammo5:MovieClip;
public var ammo7:MovieClip;
public var ammo8:MovieClip;
public var ammo9:MovieClip;
public var ammo6:MovieClip;
public var mapHeights:MovieClip;
public var octomage1a:MovieClip;
public var octomage2a:MovieClip;
public var octomage2b:MovieClip;
public var merman1a:MovieClip;
public var merman1b:MovieClip;
public var merman1c:MovieClip;
public var merman1d:MovieClip;
public var octomage3c:MovieClip;
public var effectsBase2:MovieClip;
public var octomage3a:MovieClip;
public var merman2a:MovieClip;
public var merman2b:MovieClip;
public var merman2c:MovieClip;
public var merman2d:MovieClip;
public var trinket1:MovieClip;
public var activator1:MovieClip;
public var octomage3b:MovieClip;
public var activator3:MovieClip;
public var activator4:MovieClip;
public var activator5:MovieClip;
public var activator6:MovieClip;
public var activator7:MovieClip;
public var activator8:MovieClip;
public var activator9:MovieClip;
public var octomage5a:MovieClip;
public var octomage5b:MovieClip;
public var merman3b:MovieClip;
public var merman3c:MovieClip;
public var merman3d:MovieClip;
public var gold2:MovieClip;
public var gold3:MovieClip;
public var gold4:MovieClip;
public var merman3a:MovieClip;
public var gold6:MovieClip;
public var gold7:MovieClip;
public var activator2:MovieClip;
public var gold5:MovieClip;
public var gold8:MovieClip;
public var gold9:MovieClip;
public var gold1:MovieClip;
public var merman4a:MovieClip;
public var merman4b:MovieClip;
public var merman4c:MovieClip;
public var merman4d:MovieClip;
public function Level11Hold_282(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 1));
} else {
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
} else {
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
} else {
if (((eventTrigger4.canFlip) && (playerMain.hitp(eventTrigger4)))){
eventTrigger4.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 4));
} else {
if (((eventTrigger5.canFlip) && (playerMain.hitp(eventTrigger5)))){
eventTrigger5.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 5));
} else {
if (((eventTrigger6.canFlip) && (playerMain.hitp(eventTrigger6)))){
eventTrigger6.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 6));
} else {
if (((eventTrigger7.canFlip) && (playerMain.hitp(eventTrigger7)))){
eventTrigger7.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 7));
} else {
if (((eventTrigger8.canFlip) && (playerMain.hitp(eventTrigger8)))){
eventTrigger8.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 8));
} else {
if (((eventTrigger9.canFlip) && (playerMain.hitp(eventTrigger9)))){
eventTrigger9.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 9));
};
};
};
};
};
};
};
};
};
}
public function setUp():void{
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
eventTrigger5.canFlip = true;
eventTrigger6.canFlip = true;
eventTrigger7.canFlip = true;
eventTrigger8.canFlip = true;
eventTrigger9.canFlip = true;
}
}
}//package g_beach_fla
Section 99
//Level11TerrainMap_287 (g_beach_fla.Level11TerrainMap_287)
package g_beach_fla {
import flash.display.*;
public dynamic class Level11TerrainMap_287 extends MovieClip {
public function Level11TerrainMap_287(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 100
//Level12HeightMap_291 (g_beach_fla.Level12HeightMap_291)
package g_beach_fla {
import flash.display.*;
public dynamic class Level12HeightMap_291 extends MovieClip {
public function Level12HeightMap_291(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 101
//Level12Hold_288 (g_beach_fla.Level12Hold_288)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level12Hold_288 extends MovieClip {
public var floatfish1a:MovieClip;
public var floatfish1b:MovieClip;
public var floatfish1c:MovieClip;
public var floatfish1d:MovieClip;
public var floatfish2a:MovieClip;
public var floatfish2b:MovieClip;
public var floatfish2c:MovieClip;
public var floatfish2d:MovieClip;
public var playerMain:MainCharBody;
public var floatfish3a:MovieClip;
public var floatfish3b:MovieClip;
public var floatfish3c:MovieClip;
public var floatfish3d:MovieClip;
public var floatfish3e:MovieClip;
public var floatfish4a:MovieClip;
public var floatfish4b:MovieClip;
public var floatfish4c:MovieClip;
public var floatfish4d:MovieClip;
public var floatfish4e:MovieClip;
public var crawler1d:MovieClip;
public var crawler1f:MovieClip;
public var crawler1h:MovieClip;
public var crawler1i:MovieClip;
public var crawler1j:MovieClip;
public var crawler1k:MovieClip;
public var crawler1e:MovieClip;
public var crawler1g:MovieClip;
public var crawler1a:MovieClip;
public var mapTypes:MovieClip;
public var crawler1c:MovieClip;
public var floatfish5a:MovieClip;
public var floatfish5c:MovieClip;
public var floatfish5d:MovieClip;
public var crawler2e:MovieClip;
public var crawler2g:MovieClip;
public var crawler2i:MovieClip;
public var crawler2f:MovieClip;
public var floatfish5b:MovieClip;
public var crawler2h:MovieClip;
public var crawler2a:MovieClip;
public var crawler2d:MovieClip;
public var crawler2c:MovieClip;
public var crawler3b:MovieClip;
public var crawler3c:MovieClip;
public var crawler3d:MovieClip;
public var crawler3e:MovieClip;
public var crawler3f:MovieClip;
public var crawler3g:MovieClip;
public var crawler3h:MovieClip;
public var crawler3j:MovieClip;
public var crawler3i:MovieClip;
public var crawler3k:MovieClip;
public var crawler4b:MovieClip;
public var crawler4c:MovieClip;
public var crawler4d:MovieClip;
public var crawler4e:MovieClip;
public var crawler4f:MovieClip;
public var crawler4g:MovieClip;
public var crawler4h:MovieClip;
public var crawler4a:MovieClip;
public var crawler3a:MovieClip;
public var crawler2b:MovieClip;
public var crawler1b:MovieClip;
public var effectsTop:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd3:MovieClip;
public var nd4:MovieClip;
public var nd5:MovieClip;
public var nd7:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd6:MovieClip;
public var health1:MovieClip;
public var health3:MovieClip;
public var health2:MovieClip;
public var health4:MovieClip;
public var playerBase:MovieClip;
public var nd2:MovieClip;
public var ammo10:MovieClip;
public var ammo13:MovieClip;
public var ammo14:MovieClip;
public var ammo11:MovieClip;
public var ammo12:MovieClip;
public var shroom1:MovieClip;
public var shroom2:MovieClip;
public var shroom3:MovieClip;
public var shroom4:MovieClip;
public var shroom5:MovieClip;
public var borders:MovieClip;
public var piper1a:MovieClip;
public var piper1b:MovieClip;
public var piper1c:MovieClip;
public var piper1d:MovieClip;
public var piper1e:MovieClip;
public var effectsMid:MovieClip;
public var piper2a:MovieClip;
public var piper2b:MovieClip;
public var piper2c:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var eventTrigger5:MovieClip;
public var eventTrigger6:MovieClip;
public var eventTrigger8:MovieClip;
public var nd10:MovieClip;
public var nd11:MovieClip;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd16:MovieClip;
public var nd17:MovieClip;
public var enemyPaths:MovieClip;
public var nd15:MovieClip;
public var nd19:MovieClip;
public var eventTrigger7:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var nd24:MovieClip;
public var nd25:MovieClip;
public var nd26:MovieClip;
public var nd27:MovieClip;
public var gold10:MovieClip;
public var gold12:MovieClip;
public var nd28:MovieClip;
public var gold18:MovieClip;
public var nd18:MovieClip;
public var gold19:MovieClip;
public var nd31:MovieClip;
public var nd32:MovieClip;
public var nd33:MovieClip;
public var nd34:MovieClip;
public var nd36:MovieClip;
public var gold14:MovieClip;
public var gold16:MovieClip;
public var gold20:MovieClip;
public var nd35:MovieClip;
public var nd37:MovieClip;
public var nd30:MovieClip;
public var gold15:MovieClip;
public var gold17:MovieClip;
public var gold11:MovieClip;
public var gold13:MovieClip;
public var nd40:MovieClip;
public var nd38:MovieClip;
public var nd42:MovieClip;
public var nd43:MovieClip;
public var nd44:MovieClip;
public var nd45:MovieClip;
public var playerTop:MovieClip;
public var nd39:MovieClip;
public var nd41:MovieClip;
public var nd29:MovieClip;
public var exit1:MovieClip;
public var effectsBase:MovieClip;
public var shroom1b:MovieClip;
public var shroom1c:MovieClip;
public var shroom1e:MovieClip;
public var shroom1f:MovieClip;
public var shroom1d:MovieClip;
public var shroom2b:MovieClip;
public var shroom2c:MovieClip;
public var shroom2d:MovieClip;
public var ammo1:MovieClip;
public var ammo2:MovieClip;
public var ammo3:MovieClip;
public var shroom2a:MovieClip;
public var ammo5:MovieClip;
public var ammo7:MovieClip;
public var exitEff1:MovieClip;
public var ammo9:MovieClip;
public var shroom1a:MovieClip;
public var ammo6:MovieClip;
public var mapHeights:MovieClip;
public var ammo8:MovieClip;
public var ammo4:MovieClip;
public var shroom3a:MovieClip;
public var shroom3b:MovieClip;
public var shroom3c:MovieClip;
public var shroom3e:MovieClip;
public var shroom3f:MovieClip;
public var shroom3g:MovieClip;
public var shroom3d:MovieClip;
public var shroom3h:MovieClip;
public var octomage1b:MovieClip;
public var shroom3i:MovieClip;
public var octomage1a:MovieClip;
public var shroom4a:MovieClip;
public var shroom4b:MovieClip;
public var shroom4c:MovieClip;
public var shroom4d:MovieClip;
public var shroom4f:MovieClip;
public var shroom4g:MovieClip;
public var shroom4e:MovieClip;
public var shroom5a:MovieClip;
public var shroom5b:MovieClip;
public var shroom5d:MovieClip;
public var shroom5e:MovieClip;
public var shroom5f:MovieClip;
public var shroom5c:MovieClip;
public var effectsBase2:MovieClip;
public var crawler3:MovieClip;
public var trinket1:MovieClip;
public var activator1:MovieClip;
public var activator3:MovieClip;
public var activator4:MovieClip;
public var activator5:MovieClip;
public var activator2:MovieClip;
public var gold1:MovieClip;
public var gold2:MovieClip;
public var gold3:MovieClip;
public var gold4:MovieClip;
public var gold5:MovieClip;
public var gold6:MovieClip;
public var gold7:MovieClip;
public var gold9:MovieClip;
public var gold8:MovieClip;
public function Level12Hold_288(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 1));
};
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
};
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
};
if (((eventTrigger4.canFlip) && (playerMain.hitp(eventTrigger4)))){
eventTrigger4.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 4));
};
if (((eventTrigger5.canFlip) && (playerMain.hitp(eventTrigger5)))){
eventTrigger5.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 5));
};
if (((eventTrigger6.canFlip) && (playerMain.hitp(eventTrigger6)))){
eventTrigger6.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 6));
};
if (((eventTrigger7.canFlip) && (playerMain.hitp(eventTrigger7)))){
eventTrigger7.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 7));
};
if (((eventTrigger8.canFlip) && (playerMain.hitp(eventTrigger8)))){
eventTrigger8.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 8));
};
if (shroom1.currentFrame == 3){
shroom1a.active = (shroom1b.active = (shroom1c.active = (shroom1d.active = (shroom1e.active = (shroom1f.active = true)))));
shroom1a.gotoAndStop(3);
shroom1b.gotoAndStop(3);
shroom1c.gotoAndStop(3);
shroom1d.gotoAndStop(3);
shroom1e.gotoAndStop(3);
shroom1f.gotoAndStop(3);
};
if (shroom2.currentFrame == 3){
shroom2a.active = (shroom2b.active = (shroom2c.active = (shroom2d.active = true)));
shroom2a.gotoAndStop(3);
shroom2b.gotoAndStop(3);
shroom2c.gotoAndStop(3);
shroom2d.gotoAndStop(3);
};
if (shroom3.currentFrame == 3){
shroom3a.active = (shroom3b.active = (shroom3c.active = (shroom3d.active = (shroom3e.active = (shroom3f.active = (shroom3g.active = (shroom3h.active = (shroom3i.active = true))))))));
shroom3a.gotoAndStop(3);
shroom3b.gotoAndStop(3);
shroom3c.gotoAndStop(3);
shroom3d.gotoAndStop(3);
shroom3e.gotoAndStop(3);
shroom3f.gotoAndStop(3);
shroom3g.gotoAndStop(3);
shroom3h.gotoAndStop(3);
shroom3i.gotoAndStop(3);
};
if (shroom4.currentFrame == 3){
shroom4a.active = (shroom4b.active = (shroom4c.active = (shroom4d.active = (shroom4e.active = (shroom4f.active = (shroom4g.active = true))))));
shroom4a.gotoAndStop(3);
shroom4b.gotoAndStop(3);
shroom4c.gotoAndStop(3);
shroom4d.gotoAndStop(3);
shroom4e.gotoAndStop(3);
shroom4f.gotoAndStop(3);
shroom4g.gotoAndStop(3);
};
if (shroom5.currentFrame == 3){
shroom5a.active = (shroom5b.active = (shroom5c.active = (shroom5d.active = (shroom5e.active = (shroom5f.active = true)))));
shroom5a.gotoAndStop(3);
shroom5b.gotoAndStop(3);
shroom5c.gotoAndStop(3);
shroom5d.gotoAndStop(3);
shroom5e.gotoAndStop(3);
shroom5f.gotoAndStop(3);
};
}
public function setUp():void{
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
eventTrigger5.canFlip = true;
eventTrigger6.canFlip = true;
eventTrigger7.canFlip = true;
eventTrigger8.canFlip = true;
shroom1a.active = (shroom1b.active = (shroom1c.active = (shroom1d.active = (shroom1e.active = (shroom1f.active = false)))));
shroom2a.active = (shroom2b.active = (shroom2c.active = (shroom2d.active = false)));
shroom3a.active = (shroom3b.active = (shroom3c.active = (shroom3d.active = (shroom3e.active = (shroom3f.active = (shroom3g.active = (shroom3h.active = (shroom3i.active = false))))))));
shroom4a.active = (shroom4b.active = (shroom4c.active = (shroom4d.active = (shroom4e.active = (shroom4f.active = (shroom4g.active = false))))));
shroom5a.active = (shroom5b.active = (shroom5c.active = (shroom5d.active = (shroom5e.active = (shroom5f.active = false)))));
}
}
}//package g_beach_fla
Section 102
//Level12TerrainMap_292 (g_beach_fla.Level12TerrainMap_292)
package g_beach_fla {
import flash.display.*;
public dynamic class Level12TerrainMap_292 extends MovieClip {
public function Level12TerrainMap_292(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 103
//Level13EnemyPaths_309 (g_beach_fla.Level13EnemyPaths_309)
package g_beach_fla {
import flash.display.*;
public dynamic class Level13EnemyPaths_309 extends MovieClip {
public function Level13EnemyPaths_309(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 104
//Level13HeightMap_310 (g_beach_fla.Level13HeightMap_310)
package g_beach_fla {
import flash.display.*;
public dynamic class Level13HeightMap_310 extends MovieClip {
public function Level13HeightMap_310(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 105
//Level13Hold_294 (g_beach_fla.Level13Hold_294)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level13Hold_294 extends MovieClip {
public var eskerPseud:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var eventTrigger5:MovieClip;
public var eventTrigger6:MovieClip;
public var door2:MovieClip;
public var door3:MovieClip;
public var playerMain:MainCharBody;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd16:MovieClip;
public var nd11:MovieClip;
public var nd15:MovieClip;
public var nd17:MovieClip;
public var nd19:MovieClip;
public var nd10:MovieClip;
public var enemyPaths:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var nd24:MovieClip;
public var nd18:MovieClip;
public var mapTypes:MovieClip;
public var airshipBase:MovieClip;
public var playerTop:MovieClip;
public var airshipTop:MovieClip;
public var eskerShield:MovieClip;
public var shroom1a:MovieClip;
public var shroom1b:MovieClip;
public var shroom1c:MovieClip;
public var shroom1f:MovieClip;
public var shroom1g:MovieClip;
public var shroom1i:MovieClip;
public var effectsTop:MovieClip;
public var shroom1h:MovieClip;
public var shroom1j:MovieClip;
public var shroom1l:MovieClip;
public var effectsBase:MovieClip;
public var shroom1k:MovieClip;
public var shroom1d:MovieClip;
public var shroom1e:MovieClip;
public var ammo1:MovieClip;
public var ammo3:MovieClip;
public var ammo4:MovieClip;
public var ammo7:MovieClip;
public var ammo8:MovieClip;
public var ammo2:MovieClip;
public var ammo5:MovieClip;
public var ammo6:MovieClip;
public var mapHeights:MovieClip;
public var ammo9:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd5:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd4:MovieClip;
public var nd6:MovieClip;
public var nd7:MovieClip;
public var playerBase:MovieClip;
public var health1:MovieClip;
public var health2:MovieClip;
public var eskerBoss:EskerBossMain;
public var shroom1:MovieClip;
public var effectsBase2:MovieClip;
public var bridge1:MovieClip;
public var bridge2:MovieClip;
public var borders:MovieClip;
public var bridge2a:MovieClip;
public var bridge4:MovieClip;
public var effectsMid:MovieClip;
public function Level13Hold_294(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setUp():void{
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
eventTrigger5.canFlip = true;
eventTrigger6.canFlip = true;
eskerBoss.canFlip = true;
eskerBoss.healthWarn1 = true;
eskerBoss.healthWarn2 = true;
eskerBoss.healthWarn3 = true;
eskerBoss.visible = false;
shroom1a.active = (shroom1b.active = (shroom1c.active = (shroom1d.active = (shroom1e.active = (shroom1f.active = (shroom1g.active = (shroom1h.active = (shroom1i.active = (shroom1j.active = (shroom1k.active = (shroom1l.active = false)))))))))));
bridge2a.active = false;
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 1));
};
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 2));
};
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 3));
};
if (((eventTrigger4.canFlip) && (playerMain.hitp(eventTrigger4)))){
eventTrigger4.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 2));
dispatchEvent(new GameEvent("gameEvent", 4));
};
if (((eventTrigger5.canFlip) && (playerMain.hitp(eventTrigger5)))){
eventTrigger5.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 3));
dispatchEvent(new GameEvent("gameEvent", 5));
};
if (((eskerBoss.healthWarn1) && ((eskerBoss.health < 2200)))){
eskerBoss.healthWarn1 = false;
dispatchEvent(new SoundsEvent("narrationEvent", 4));
};
if (((eskerBoss.healthWarn2) && ((eskerBoss.health < 1000)))){
eskerBoss.healthWarn2 = false;
dispatchEvent(new SoundsEvent("narrationEvent", 5));
};
if (((eskerBoss.healthWarn3) && ((eskerBoss.health < 400)))){
eskerBoss.healthWarn3 = false;
dispatchEvent(new SoundsEvent("narrationEvent", 6));
};
if (((eskerBoss.canFlip) && (eskerBoss.beaten))){
eskerBoss.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 7));
dispatchEvent(new GameEvent("gameEvent", 6));
};
if (((eventTrigger6.canFlip) && (playerMain.hitp(eventTrigger6)))){
eventTrigger6.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 8));
dispatchEvent(new GameEvent("gameEvent", 7));
};
if ((((airshipTop.currentFrame > 1)) && ((airshipTop.currentFrame < airshipTop.totalFrames)))){
airshipTop.nextFrame();
airshipBase.gotoAndStop(airshipTop.currentFrame);
};
if (shroom1.currentFrame == 3){
shroom1a.active = (shroom1b.active = (shroom1c.active = (shroom1d.active = (shroom1e.active = (shroom1f.active = (shroom1g.active = (shroom1h.active = (shroom1i.active = (shroom1j.active = (shroom1k.active = (shroom1l.active = true)))))))))));
shroom1a.gotoAndStop(3);
shroom1b.gotoAndStop(3);
shroom1c.gotoAndStop(3);
shroom1d.gotoAndStop(3);
shroom1e.gotoAndStop(3);
shroom1f.gotoAndStop(3);
shroom1g.gotoAndStop(3);
shroom1h.gotoAndStop(3);
shroom1i.gotoAndStop(3);
shroom1j.gotoAndStop(3);
shroom1k.gotoAndStop(3);
shroom1l.gotoAndStop(3);
};
}
}
}//package g_beach_fla
Section 106
//Level13TerrainMap_311 (g_beach_fla.Level13TerrainMap_311)
package g_beach_fla {
import flash.display.*;
public dynamic class Level13TerrainMap_311 extends MovieClip {
public function Level13TerrainMap_311(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 107
//Level1EnemyPaths_183 (g_beach_fla.Level1EnemyPaths_183)
package g_beach_fla {
import flash.display.*;
public dynamic class Level1EnemyPaths_183 extends MovieClip {
public function Level1EnemyPaths_183(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 108
//Level1HeightMap_186 (g_beach_fla.Level1HeightMap_186)
package g_beach_fla {
import flash.display.*;
public dynamic class Level1HeightMap_186 extends MovieClip {
public function Level1HeightMap_186(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 109
//Level1Hold_165 (g_beach_fla.Level1Hold_165)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level1Hold_165 extends MovieClip {
public var eventTrigger1:MovieClip;
public var enemyPaths:MovieClip;
public var playerMain:MainCharBody;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd11:MovieClip;
public var nd10:MovieClip;
public var mapTypes:MovieClip;
public var playerTop:MovieClip;
public var exit1:MovieClip;
public var exit2:MovieClip;
public var ep1:MovieClip;
public var ep2:MovieClip;
public var effectsTop:MovieClip;
public var airshipClip:MovieClip;
public var effectsBase:MovieClip;
public var exitEff1:MovieClip;
public var exitEff2:MovieClip;
public var mapHeights:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd5:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd4:MovieClip;
public var nd6:MovieClip;
public var nd7:MovieClip;
public var playerBase:MovieClip;
public var effectsBase2:MovieClip;
public var soundTrigger2:MovieClip;
public var soundTrigger1:MovieClip;
public var bridge1:MovieClip;
public var bridge2:MovieClip;
public var borders:MovieClip;
public var effectsMid:MovieClip;
public function Level1Hold_165(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setUp():void{
soundTrigger1.canFlip = true;
soundTrigger2.canFlip = true;
eventTrigger1.canFlip = true;
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 1));
dispatchEvent(new SoundsEvent("narrationEvent", 3));
} else {
if (((soundTrigger1.canFlip) && (playerMain.hitp(soundTrigger1)))){
soundTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
} else {
if (((soundTrigger2.canFlip) && (playerMain.hitp(soundTrigger2)))){
soundTrigger2.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 2));
};
};
};
if (airshipClip.currentFrame < airshipClip.totalFrames){
if (airshipClip.currentFrame == 20){
dispatchEvent(new SoundsEvent("soundEvent", 4));
};
airshipClip.nextFrame();
} else {
airshipClip.visible = false;
};
}
}
}//package g_beach_fla
Section 110
//Level1TerrainMap_187 (g_beach_fla.Level1TerrainMap_187)
package g_beach_fla {
import flash.display.*;
public dynamic class Level1TerrainMap_187 extends MovieClip {
public function Level1TerrainMap_187(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 111
//Level2EnemyPaths_201 (g_beach_fla.Level2EnemyPaths_201)
package g_beach_fla {
import flash.display.*;
public dynamic class Level2EnemyPaths_201 extends MovieClip {
public function Level2EnemyPaths_201(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 112
//Level2HeightMap_202 (g_beach_fla.Level2HeightMap_202)
package g_beach_fla {
import flash.display.*;
public dynamic class Level2HeightMap_202 extends MovieClip {
public function Level2HeightMap_202(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 113
//Level2Hold_197 (g_beach_fla.Level2Hold_197)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level2Hold_197 extends MovieClip {
public var ep10:MovieClip;
public var ep11:MovieClip;
public var ep12:MovieClip;
public var ep13:MovieClip;
public var ep14:MovieClip;
public var ep15:MovieClip;
public var ep16:MovieClip;
public var ep18:MovieClip;
public var ep19:MovieClip;
public var ep20:MovieClip;
public var ep22:MovieClip;
public var ep21:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var ep17:MovieClip;
public var enemyPaths:MovieClip;
public var playerMain:MainCharBody;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd11:MovieClip;
public var nd15:MovieClip;
public var nd16:MovieClip;
public var nd17:MovieClip;
public var nd10:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var nd27:MovieClip;
public var nd28:MovieClip;
public var nd24:MovieClip;
public var nd18:MovieClip;
public var mapTypes:MovieClip;
public var nd31:MovieClip;
public var nd29:MovieClip;
public var nd19:MovieClip;
public var nd30:MovieClip;
public var nd25:MovieClip;
public var nd26:MovieClip;
public var playerTop:MovieClip;
public var exit1:MovieClip;
public var ep1:MovieClip;
public var ep2:MovieClip;
public var ep4:MovieClip;
public var ep6:MovieClip;
public var ep7:MovieClip;
public var ep8:MovieClip;
public var ep9:MovieClip;
public var ep3:MovieClip;
public var ep5:MovieClip;
public var effectsTop:MovieClip;
public var effectsBase:MovieClip;
public var exitEff1:MovieClip;
public var mapHeights:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd5:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd4:MovieClip;
public var nd6:MovieClip;
public var nd7:MovieClip;
public var playerBase:MovieClip;
public var effectsBase2:MovieClip;
public var soundTrigger1:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var activator3:MovieClip;
public var bridge1:MovieClip;
public var bridge2:MovieClip;
public var bridge3:MovieClip;
public var borders:MovieClip;
public var effectsMid:MovieClip;
public function Level2Hold_197(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setUp():void{
soundTrigger1.canFlip = true;
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
}
public function upd(_arg1:Object):void{
if (((soundTrigger1.canFlip) && (playerMain.hitp(soundTrigger1)))){
soundTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 2));
};
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 1));
dispatchEvent(new SoundsEvent("narrationEvent", 1));
} else {
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
} else {
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
dispatchEvent(new SoundsEvent("narrationEvent", 4));
} else {
if (((eventTrigger4.canFlip) && (playerMain.hitp(eventTrigger4)))){
eventTrigger4.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 4));
dispatchEvent(new SoundsEvent("narrationEvent", 5));
};
};
};
};
}
}
}//package g_beach_fla
Section 114
//Level2TerrainMap_203 (g_beach_fla.Level2TerrainMap_203)
package g_beach_fla {
import flash.display.*;
public dynamic class Level2TerrainMap_203 extends MovieClip {
public function Level2TerrainMap_203(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 115
//Level3EnemyPaths_209 (g_beach_fla.Level3EnemyPaths_209)
package g_beach_fla {
import flash.display.*;
public dynamic class Level3EnemyPaths_209 extends MovieClip {
public function Level3EnemyPaths_209(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 116
//Level3HeightMap_210 (g_beach_fla.Level3HeightMap_210)
package g_beach_fla {
import flash.display.*;
public dynamic class Level3HeightMap_210 extends MovieClip {
public function Level3HeightMap_210(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 117
//Level3Hold_204 (g_beach_fla.Level3Hold_204)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level3Hold_204 extends MovieClip {
public var ep10:MovieClip;
public var ep11:MovieClip;
public var ep12:MovieClip;
public var ep13:MovieClip;
public var ep14:MovieClip;
public var ep15:MovieClip;
public var ep16:MovieClip;
public var ep18:MovieClip;
public var ep19:MovieClip;
public var ep20:MovieClip;
public var ep21:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var eventTrigger5:MovieClip;
public var eventTrigger6:MovieClip;
public var ep17:MovieClip;
public var enemyPaths:MovieClip;
public var eventTrigger7:MovieClip;
public var playerMain:MainCharBody;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd11:MovieClip;
public var nd15:MovieClip;
public var nd16:MovieClip;
public var nd17:MovieClip;
public var nd19:MovieClip;
public var nd10:MovieClip;
public var item11:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var item12:MovieClip;
public var item13:MovieClip;
public var nd24:MovieClip;
public var mapTypes:MovieClip;
public var item10:MovieClip;
public var item15:MovieClip;
public var nd18:MovieClip;
public var item14:MovieClip;
public var playerTop:MovieClip;
public var exit1:MovieClip;
public var ep2:MovieClip;
public var ep4:MovieClip;
public var ep7:MovieClip;
public var ep8:MovieClip;
public var ep9:MovieClip;
public var ep5:MovieClip;
public var ep3:MovieClip;
public var effectsTop:MovieClip;
public var effectsBase:MovieClip;
public var ep6:MovieClip;
public var exitEff1:MovieClip;
public var ep1:MovieClip;
public var mapHeights:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd5:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd4:MovieClip;
public var nd6:MovieClip;
public var nd7:MovieClip;
public var playerBase:MovieClip;
public var item2:MovieClip;
public var item4:MovieClip;
public var item5:MovieClip;
public var item6:MovieClip;
public var item7:MovieClip;
public var item8:MovieClip;
public var item3:MovieClip;
public var item9:MovieClip;
public var effectsBase2:MovieClip;
public var soundTrigger1:MovieClip;
public var soundTrigger2:MovieClip;
public var item1:MovieClip;
public var trinket1:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var activator3:MovieClip;
public var activator5:MovieClip;
public var activator6:MovieClip;
public var bridge1:MovieClip;
public var bridge2:MovieClip;
public var bridge3:MovieClip;
public var bridge6:MovieClip;
public var activator4:MovieClip;
public var bridge4:MovieClip;
public var bridge5:MovieClip;
public var borders:MovieClip;
public var effectsMid:MovieClip;
public function Level3Hold_204(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setUp():void{
soundTrigger1.canFlip = true;
soundTrigger2.canFlip = true;
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
eventTrigger5.canFlip = true;
eventTrigger6.canFlip = true;
eventTrigger7.canFlip = true;
}
public function upd(_arg1:Object):void{
if (((soundTrigger1.canFlip) && (playerMain.hitp(soundTrigger1)))){
soundTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 2));
} else {
if (((soundTrigger2.canFlip) && (playerMain.hitp(soundTrigger2)))){
soundTrigger2.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 4));
};
};
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 1));
dispatchEvent(new SoundsEvent("narrationEvent", 1));
} else {
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
} else {
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
} else {
if (((eventTrigger4.canFlip) && (playerMain.hitp(eventTrigger4)))){
eventTrigger4.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 4));
} else {
if (((eventTrigger5.canFlip) && (playerMain.hitp(eventTrigger5)))){
eventTrigger5.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 5));
dispatchEvent(new SoundsEvent("narrationEvent", 4));
} else {
if (((eventTrigger6.canFlip) && (playerMain.hitp(eventTrigger6)))){
eventTrigger6.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 6));
dispatchEvent(new SoundsEvent("narrationEvent", 5));
} else {
if (((eventTrigger7.canFlip) && (playerMain.hitp(eventTrigger7)))){
eventTrigger7.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 7));
};
};
};
};
};
};
};
}
}
}//package g_beach_fla
Section 118
//Level3TerrainMap_211 (g_beach_fla.Level3TerrainMap_211)
package g_beach_fla {
import flash.display.*;
public dynamic class Level3TerrainMap_211 extends MovieClip {
public function Level3TerrainMap_211(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 119
//Level4EnemyPaths_217 (g_beach_fla.Level4EnemyPaths_217)
package g_beach_fla {
import flash.display.*;
public dynamic class Level4EnemyPaths_217 extends MovieClip {
public function Level4EnemyPaths_217(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 120
//Level4EnemyPathsWater_218 (g_beach_fla.Level4EnemyPathsWater_218)
package g_beach_fla {
import flash.display.*;
public dynamic class Level4EnemyPathsWater_218 extends MovieClip {
public function Level4EnemyPathsWater_218(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 121
//Level4HeightMap_219 (g_beach_fla.Level4HeightMap_219)
package g_beach_fla {
import flash.display.*;
public dynamic class Level4HeightMap_219 extends MovieClip {
public function Level4HeightMap_219(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 122
//Level4Hold_212 (g_beach_fla.Level4Hold_212)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level4Hold_212 extends MovieClip {
public var ep10:MovieClip;
public var ep11:MovieClip;
public var ep12:MovieClip;
public var ep13:MovieClip;
public var ep14:MovieClip;
public var playerMain:MainCharBody;
public var mapTypes:MovieClip;
public var item10:MovieClip;
public var eventTrigger3b:MovieClip;
public var ep1:MovieClip;
public var ep2:MovieClip;
public var ep4:MovieClip;
public var ep7:MovieClip;
public var ep8:MovieClip;
public var ep9:MovieClip;
public var ep3:MovieClip;
public var ep5:MovieClip;
public var eventTrigger4b:MovieClip;
public var effectsTop:MovieClip;
public var ep6:MovieClip;
public var wep1:MovieClip;
public var wep2:MovieClip;
public var wep3:MovieClip;
public var wep4:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd4:MovieClip;
public var nd5:MovieClip;
public var nd7:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd6:MovieClip;
public var playerBase:MovieClip;
public var wd10:MovieClip;
public var wd11:MovieClip;
public var wd12:MovieClip;
public var wd13:MovieClip;
public var wd14:MovieClip;
public var wd15:MovieClip;
public var wd16:MovieClip;
public var wd17:MovieClip;
public var wd18:MovieClip;
public var wd19:MovieClip;
public var ep11b:MovieClip;
public var borders:MovieClip;
public var bridge1:MovieClip;
public var bridge2:MovieClip;
public var bridge3:MovieClip;
public var wd20:MovieClip;
public var bridge5:MovieClip;
public var bridge6:MovieClip;
public var wd23:MovieClip;
public var wd24:MovieClip;
public var wd25:MovieClip;
public var wd26:MovieClip;
public var wd28:MovieClip;
public var bridge7:MovieClip;
public var wd27:MovieClip;
public var wd29:MovieClip;
public var ep12b:MovieClip;
public var bridge8:MovieClip;
public var wd22:MovieClip;
public var effectsMid:MovieClip;
public var wd30:MovieClip;
public var wd31:MovieClip;
public var wd21:MovieClip;
public var wd32:MovieClip;
public var ep13b:MovieClip;
public var bridge4:MovieClip;
public var waterPaths:MovieClip;
public var ep14b:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var door2:MovieClip;
public var enemyPaths:MovieClip;
public var nd10:MovieClip;
public var nd11:MovieClip;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd16:MovieClip;
public var nd17:MovieClip;
public var nd19:MovieClip;
public var nd15:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var nd24:MovieClip;
public var nd25:MovieClip;
public var nd26:MovieClip;
public var nd27:MovieClip;
public var nd28:MovieClip;
public var nd18:MovieClip;
public var nd29:MovieClip;
public var nd30:MovieClip;
public var playerTop:MovieClip;
public var exit1:MovieClip;
public var exit2:MovieClip;
public var effectsBase:MovieClip;
public var wd2:MovieClip;
public var wd6:MovieClip;
public var wd1:MovieClip;
public var wd3:MovieClip;
public var wd4:MovieClip;
public var wd8:MovieClip;
public var wd9:MovieClip;
public var wd5:MovieClip;
public var wd7:MovieClip;
public var exitEff1:MovieClip;
public var exitEff2:MovieClip;
public var mapHeights:MovieClip;
public var bridges1:MovieClip;
public var item1:MovieClip;
public var item2:MovieClip;
public var item4:MovieClip;
public var item5:MovieClip;
public var item6:MovieClip;
public var item7:MovieClip;
public var item3:MovieClip;
public var item8:MovieClip;
public var item9:MovieClip;
public var effectsBase2:MovieClip;
public var soundTrigger1:MovieClip;
public var soundTrigger2:MovieClip;
public var soundTrigger3:MovieClip;
public var soundTrigger5:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var activator3:MovieClip;
public var activator4:MovieClip;
public var activator5:MovieClip;
public var activator6:MovieClip;
public var activator7:MovieClip;
public var activator8:MovieClip;
public function Level4Hold_212(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function upd(_arg1:Object):void{
if (((soundTrigger1.canFlip) && (playerMain.hitp(soundTrigger1)))){
soundTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 3));
} else {
if (((soundTrigger2.canFlip) && (playerMain.hitp(soundTrigger2)))){
soundTrigger2.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 4));
} else {
if (((soundTrigger3.canFlip) && (playerMain.hitp(soundTrigger3)))){
soundTrigger3.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 4));
} else {
if (((soundTrigger5.canFlip) && (playerMain.hitp(soundTrigger5)))){
soundTrigger5.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 6));
};
};
};
};
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 1));
};
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
};
if (((eventTrigger3.canFlip) && (((playerMain.hitp(eventTrigger3)) || (playerMain.hitp(eventTrigger3b)))))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
dispatchEvent(new SoundsEvent("narrationEvent", 5));
};
if (((eventTrigger4.canFlip) && (((playerMain.hitp(eventTrigger4)) || (playerMain.hitp(eventTrigger4b)))))){
eventTrigger4.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 4));
};
}
public function setUp():void{
soundTrigger1.canFlip = true;
soundTrigger2.canFlip = true;
soundTrigger3.canFlip = true;
soundTrigger5.canFlip = true;
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
}
}
}//package g_beach_fla
Section 123
//Level4TerrainMap_220 (g_beach_fla.Level4TerrainMap_220)
package g_beach_fla {
import flash.display.*;
public dynamic class Level4TerrainMap_220 extends MovieClip {
public function Level4TerrainMap_220(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 124
//Level5EnemyPaths_228 (g_beach_fla.Level5EnemyPaths_228)
package g_beach_fla {
import flash.display.*;
public dynamic class Level5EnemyPaths_228 extends MovieClip {
public function Level5EnemyPaths_228(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 125
//Level5HeightMap_229 (g_beach_fla.Level5HeightMap_229)
package g_beach_fla {
import flash.display.*;
public dynamic class Level5HeightMap_229 extends MovieClip {
public function Level5HeightMap_229(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 126
//Level5Hold_221 (g_beach_fla.Level5Hold_221)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level5Hold_221 extends MovieClip {
public var stair2:MovieClip;
public var stair3:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger2:MovieClip;
public var enemyPaths:MovieClip;
public var playerMain:MainCharBody;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd16:MovieClip;
public var nd11:MovieClip;
public var nd15:MovieClip;
public var nd17:MovieClip;
public var nd19:MovieClip;
public var nd10:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var ep3c:MovieClip;
public var ep3d:MovieClip;
public var nd24:MovieClip;
public var nd28:MovieClip;
public var nd27:MovieClip;
public var mapTypes:MovieClip;
public var nd31:MovieClip;
public var ep3e:MovieClip;
public var ep3f:MovieClip;
public var ep3g:MovieClip;
public var ep4a:MovieClip;
public var ep4b:MovieClip;
public var nd30:MovieClip;
public var ep3a:MovieClip;
public var nd33:MovieClip;
public var nd29:MovieClip;
public var ep4c:MovieClip;
public var ep4e:MovieClip;
public var nd32:MovieClip;
public var nd25:MovieClip;
public var ep3b:MovieClip;
public var ep4d:MovieClip;
public var ep5a:MovieClip;
public var ep5b:MovieClip;
public var ep5c:MovieClip;
public var ep5d:MovieClip;
public var playerTop:MovieClip;
public var ep5e:MovieClip;
public var ep5f:MovieClip;
public var nd26:MovieClip;
public var nd18:MovieClip;
public var exit1:MovieClip;
public var ep6a:MovieClip;
public var ep6b:MovieClip;
public var ep6d:MovieClip;
public var ep6e:MovieClip;
public var ep6f:MovieClip;
public var ep1:MovieClip;
public var ep6c:MovieClip;
public var effectsTop:MovieClip;
public var ep7a:MovieClip;
public var ep7b:MovieClip;
public var ep7e:MovieClip;
public var ep7c:MovieClip;
public var ep7d:MovieClip;
public var ep7f:MovieClip;
public var effectsBase:MovieClip;
public var ep8d:MovieClip;
public var ep8f:MovieClip;
public var ep8g:MovieClip;
public var ep8h:MovieClip;
public var ep8b:MovieClip;
public var ep2:MovieClip;
public var ep8a:MovieClip;
public var ep8c:MovieClip;
public var exitEff1:MovieClip;
public var effectsWater:MovieClip;
public var ep8e:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd5:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd4:MovieClip;
public var nd6:MovieClip;
public var nd7:MovieClip;
public var ep7g:MovieClip;
public var playerBase:MovieClip;
public var nd1:MovieClip;
public var mapHeights:MovieClip;
public var item4:MovieClip;
public var item3:MovieClip;
public var item2:MovieClip;
public var effectsBase2:MovieClip;
public var item1:MovieClip;
public var soundTrigger1:MovieClip;
public var trinket1:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var activator3:MovieClip;
public var bridge1:MovieClip;
public var activator4:MovieClip;
public var bridge4:MovieClip;
public var borders:MovieClip;
public var effectsMid:MovieClip;
public function Level5Hold_221(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setUp():void{
soundTrigger1.canFlip = true;
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
}
public function upd(_arg1:Object):void{
if (((soundTrigger1.canFlip) && (playerMain.hitp(soundTrigger1)))){
soundTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
};
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 1));
} else {
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
} else {
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
};
};
};
}
}
}//package g_beach_fla
Section 127
//Level5TerrainMap_230 (g_beach_fla.Level5TerrainMap_230)
package g_beach_fla {
import flash.display.*;
public dynamic class Level5TerrainMap_230 extends MovieClip {
public function Level5TerrainMap_230(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 128
//Level6EnemyPaths_243 (g_beach_fla.Level6EnemyPaths_243)
package g_beach_fla {
import flash.display.*;
public dynamic class Level6EnemyPaths_243 extends MovieClip {
public function Level6EnemyPaths_243(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 129
//Level6HeightMap_244 (g_beach_fla.Level6HeightMap_244)
package g_beach_fla {
import flash.display.*;
public dynamic class Level6HeightMap_244 extends MovieClip {
public function Level6HeightMap_244(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 130
//Level6Hold_231 (g_beach_fla.Level6Hold_231)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level6Hold_231 extends MovieClip {
public var stair3:MovieClip;
public var stair4:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var ep1a:MovieClip;
public var ep1b:MovieClip;
public var door1:MovieClip;
public var ep1c:MovieClip;
public var door3:MovieClip;
public var playerMain:MainCharBody;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var ep2b:MovieClip;
public var nd11:MovieClip;
public var ep2f:MovieClip;
public var ep2a:MovieClip;
public var nd16:MovieClip;
public var ep2c:MovieClip;
public var ep2e:MovieClip;
public var bossprep2:MovieClip;
public var nd15:MovieClip;
public var nd17:MovieClip;
public var nd10:MovieClip;
public var bossprep1:MovieClip;
public var door2:MovieClip;
public var enemyPaths:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd23:MovieClip;
public var ep3a:MovieClip;
public var ep3c:MovieClip;
public var ep3d:MovieClip;
public var nd28:MovieClip;
public var ep2d:MovieClip;
public var mapTypes:MovieClip;
public var nd24:MovieClip;
public var bossprep5:MovieClip;
public var ep3e:MovieClip;
public var ep3f:MovieClip;
public var ep3g:MovieClip;
public var nd22:MovieClip;
public var nd25:MovieClip;
public var nd27:MovieClip;
public var nd29:MovieClip;
public var nd18:MovieClip;
public var bossprep3:MovieClip;
public var ep3b:MovieClip;
public var playerTop:MovieClip;
public var bossprep4:MovieClip;
public var nd26:MovieClip;
public var nd19:MovieClip;
public var exit1:MovieClip;
public var effectsTop:MovieClip;
public var effectsBase:MovieClip;
public var ammo1:MovieClip;
public var exitEff1:MovieClip;
public var mapHeights:MovieClip;
public var effectsWater:MovieClip;
public var winhealth:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd5:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd4:MovieClip;
public var nd6:MovieClip;
public var nd7:MovieClip;
public var playerBase:MovieClip;
public var health1:MovieClip;
public var health2:MovieClip;
public var wingold10:MovieClip;
public var wingold12:MovieClip;
public var wingold14:MovieClip;
public var wingold17:MovieClip;
public var wingold18:MovieClip;
public var wingold19:MovieClip;
public var wingold13:MovieClip;
public var pirateBoss:PirateBossMain;
public var wingold11:MovieClip;
public var wingold16:MovieClip;
public var wingold1:MovieClip;
public var wingold2:MovieClip;
public var wingold3:MovieClip;
public var wingold4:MovieClip;
public var wingold5:MovieClip;
public var wingold6:MovieClip;
public var wingold7:MovieClip;
public var wingold9:MovieClip;
public var wingold20:MovieClip;
public var wingold15:MovieClip;
public var wingold8:MovieClip;
public var item1:MovieClip;
public var effectsBase2:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var activator3:MovieClip;
public var borders:MovieClip;
public var gold1:MovieClip;
public var gold2:MovieClip;
public var gold3:MovieClip;
public var gold4:MovieClip;
public var gold5:MovieClip;
public var gold6:MovieClip;
public var gold7:MovieClip;
public var light1:MovieClip;
public var light2:MovieClip;
public var effectsMid:MovieClip;
public function Level6Hold_231(){
addFrameScript(0, frame1);
}
public function setUp():void{
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
}
function frame1(){
stop();
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 1));
} else {
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
} else {
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
};
};
};
light1.gotoAndStop(door1.currentFrame);
light2.gotoAndStop(door2.currentFrame);
if (((door1.active) && (!(door2.active)))){
door2.gotoAndStop(3);
door2.active = true;
};
if (((stair3.active) && (!(stair4.active)))){
stair4.gotoAndStop(3);
stair4.active = true;
};
}
}
}//package g_beach_fla
Section 131
//Level6TerrainMap_245 (g_beach_fla.Level6TerrainMap_245)
package g_beach_fla {
import flash.display.*;
public dynamic class Level6TerrainMap_245 extends MovieClip {
public function Level6TerrainMap_245(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 132
//Level7EnemyPaths_252 (g_beach_fla.Level7EnemyPaths_252)
package g_beach_fla {
import flash.display.*;
public dynamic class Level7EnemyPaths_252 extends MovieClip {
public function Level7EnemyPaths_252(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 133
//Level7EnemyPathsWater_251 (g_beach_fla.Level7EnemyPathsWater_251)
package g_beach_fla {
import flash.display.*;
public dynamic class Level7EnemyPathsWater_251 extends MovieClip {
public function Level7EnemyPathsWater_251(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 134
//Level7HeightMap_253 (g_beach_fla.Level7HeightMap_253)
package g_beach_fla {
import flash.display.*;
public dynamic class Level7HeightMap_253 extends MovieClip {
public function Level7HeightMap_253(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 135
//Level7Hold_246 (g_beach_fla.Level7Hold_246)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level7Hold_246 extends MovieClip {
public var playerMain:MainCharBody;
public var mapTypes:MovieClip;
public var merm1:MovieClip;
public var merm2:MovieClip;
public var merm3:MovieClip;
public var merm4:MovieClip;
public var fire1:MovieClip;
public var ep1:MovieClip;
public var ep2:MovieClip;
public var ep4:MovieClip;
public var ep6:MovieClip;
public var ep7:MovieClip;
public var ep8:MovieClip;
public var ep9:MovieClip;
public var ep3:MovieClip;
public var ep5:MovieClip;
public var effectsTop:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd4:MovieClip;
public var nd5:MovieClip;
public var nd7:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd6:MovieClip;
public var playerBase:MovieClip;
public var health1:MovieClip;
public var shadowSpawn1:MovieClip;
public var shadowSpawn2:MovieClip;
public var shadowSpawn3:MovieClip;
public var shadowSpawn5:MovieClip;
public var shadowSpawn6:MovieClip;
public var shadowSpawn7:MovieClip;
public var shadowSpawn8:MovieClip;
public var health2:MovieClip;
public var shadowSpawn9:MovieClip;
public var shadowSpawn4:MovieClip;
public var shadowSpawn10:MovieClip;
public var shadowSpawn11:MovieClip;
public var shadowSpawn12:MovieClip;
public var shadowSpawn13:MovieClip;
public var shadowSpawn14:MovieClip;
public var preBridge1:MovieClip;
public var wd10:MovieClip;
public var preBridge2:MovieClip;
public var wd12:MovieClip;
public var wd13:MovieClip;
public var wd14:MovieClip;
public var wd15:MovieClip;
public var wd16:MovieClip;
public var wd17:MovieClip;
public var wd18:MovieClip;
public var wd19:MovieClip;
public var wd11:MovieClip;
public var borders:MovieClip;
public var bridge3:MovieClip;
public var bridge4:MovieClip;
public var effectsMid:MovieClip;
public var waterPaths:MovieClip;
public var specEff:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var eventTrigger5:MovieClip;
public var eventTrigger6:MovieClip;
public var shadowSpawn:MovieClip;
public var door1:MovieClip;
public var door2:MovieClip;
public var nd10:MovieClip;
public var nd11:MovieClip;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd16:MovieClip;
public var nd17:MovieClip;
public var nd19:MovieClip;
public var nd15:MovieClip;
public var enemyPaths:MovieClip;
public var nd20:MovieClip;
public var nd21:MovieClip;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var nd24:MovieClip;
public var nd25:MovieClip;
public var nd26:MovieClip;
public var nd27:MovieClip;
public var nd28:MovieClip;
public var nd18:MovieClip;
public var gold12:MovieClip;
public var gold11:MovieClip;
public var nd29:MovieClip;
public var nd30:MovieClip;
public var nd31:MovieClip;
public var nd32:MovieClip;
public var nd33:MovieClip;
public var gold10:MovieClip;
public var nd35:MovieClip;
public var nd36:MovieClip;
public var nd38:MovieClip;
public var nd39:MovieClip;
public var nd34:MovieClip;
public var nd37:MovieClip;
public var gold13:MovieClip;
public var nd42:MovieClip;
public var nd43:MovieClip;
public var nd44:MovieClip;
public var nd45:MovieClip;
public var nd46:MovieClip;
public var nd47:MovieClip;
public var nd48:MovieClip;
public var playerTop:MovieClip;
public var nd41:MovieClip;
public var nd40:MovieClip;
public var exit1:MovieClip;
public var gun1:MovieClip;
public var effectsBase:MovieClip;
public var wd1:MovieClip;
public var wd2:MovieClip;
public var wd3:MovieClip;
public var wd5:MovieClip;
public var wd6:MovieClip;
public var wd8:MovieClip;
public var wd9:MovieClip;
public var wd4:MovieClip;
public var wd7:MovieClip;
public var ammo1:MovieClip;
public var ammo2:MovieClip;
public var ammo3:MovieClip;
public var ammo4:MovieClip;
public var ammo5:MovieClip;
public var exitEff1:MovieClip;
public var mapHeights:MovieClip;
public var effectsBase2:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var activator3:MovieClip;
public var activator4:MovieClip;
public var gold1:MovieClip;
public var gold2:MovieClip;
public var gold3:MovieClip;
public var gold4:MovieClip;
public var gold5:MovieClip;
public var gold6:MovieClip;
public var gold7:MovieClip;
public var gold9:MovieClip;
public var gold8:MovieClip;
public function Level7Hold_246(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 1));
};
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 2));
dispatchEvent(new GameEvent("gameEvent", 2));
};
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 3));
dispatchEvent(new GameEvent("gameEvent", 3));
};
if (((eventTrigger4.canFlip) && (playerMain.hitp(eventTrigger4)))){
eventTrigger4.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 4));
dispatchEvent(new GameEvent("gameEvent", 4));
};
if (((eventTrigger5.canFlip) && (playerMain.hitp(eventTrigger5)))){
eventTrigger5.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 5));
dispatchEvent(new GameEvent("gameEvent", 5));
};
if (((eventTrigger6.canFlip) && (playerMain.hitp(eventTrigger6)))){
eventTrigger6.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 6));
dispatchEvent(new GameEvent("gameEvent", 6));
};
specEff.upd();
}
public function setUp():void{
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
eventTrigger5.canFlip = true;
eventTrigger6.canFlip = true;
}
}
}//package g_beach_fla
Section 136
//Level7TerrainMap_254 (g_beach_fla.Level7TerrainMap_254)
package g_beach_fla {
import flash.display.*;
public dynamic class Level7TerrainMap_254 extends MovieClip {
public function Level7TerrainMap_254(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 137
//Level8EnemyPaths_267 (g_beach_fla.Level8EnemyPaths_267)
package g_beach_fla {
import flash.display.*;
public dynamic class Level8EnemyPaths_267 extends MovieClip {
public function Level8EnemyPaths_267(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 138
//Level8HeightMap_268 (g_beach_fla.Level8HeightMap_268)
package g_beach_fla {
import flash.display.*;
public dynamic class Level8HeightMap_268 extends MovieClip {
public function Level8HeightMap_268(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 139
//Level8Hold_257 (g_beach_fla.Level8Hold_257)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level8Hold_257 extends MovieClip {
public var fountainTop1:MovieClip;
public var fountainTop2:MovieClip;
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var eventTrigger3:MovieClip;
public var eventTrigger4:MovieClip;
public var eventTrigger5:MovieClip;
public var lobsterMan1:MovieClip;
public var lobsterMan2:MovieClip;
public var playerMain:MainCharBody;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var nd16:MovieClip;
public var nd11:MovieClip;
public var lobsterMan4:MovieClip;
public var nd15:MovieClip;
public var nd17:MovieClip;
public var nd19:MovieClip;
public var door5:MovieClip;
public var nd10:MovieClip;
public var enemyPaths:MovieClip;
public var nd20:MovieClip;
public var crabBoss:CrabBossMain;
public var nd22:MovieClip;
public var nd23:MovieClip;
public var nd21:MovieClip;
public var nd24:MovieClip;
public var mapTypes:MovieClip;
public var nd18:MovieClip;
public var lobsterMan3:MovieClip;
public var playerTop:MovieClip;
public var exit1:MovieClip;
public var effectsTop:MovieClip;
public var effectsBase:MovieClip;
public var ammo1:MovieClip;
public var ammo3:MovieClip;
public var ammo4:MovieClip;
public var ammo7:MovieClip;
public var exitEff1:MovieClip;
public var ammo2:MovieClip;
public var ammo5:MovieClip;
public var ammo6:MovieClip;
public var mapHeights:MovieClip;
public var ammo8:MovieClip;
public var effectsWater:MovieClip;
public var winhealth:MovieClip;
public var effectsSpecWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd5:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd4:MovieClip;
public var nd6:MovieClip;
public var nd7:MovieClip;
public var playerBase:MovieClip;
public var health1:MovieClip;
public var health2:MovieClip;
public var health3:MovieClip;
public var health4:MovieClip;
public var wingold10:MovieClip;
public var wingold12:MovieClip;
public var wingold14:MovieClip;
public var wingold17:MovieClip;
public var wingold18:MovieClip;
public var wingold13:MovieClip;
public var wingold11:MovieClip;
public var fountainBase2:MovieClip;
public var fountainBase3:MovieClip;
public var fountainBase4:MovieClip;
public var wingold16:MovieClip;
public var fountainBase1:MovieClip;
public var wingold1:MovieClip;
public var wingold2:MovieClip;
public var wingold4:MovieClip;
public var wingold5:MovieClip;
public var wingold6:MovieClip;
public var wingold7:MovieClip;
public var wingold15:MovieClip;
public var wingold9:MovieClip;
public var wingold8:MovieClip;
public var wingold3:MovieClip;
public var effectsBase2:MovieClip;
public var piperSpawn1:MovieClip;
public var piperSpawn2:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var activator3:MovieClip;
public var activator5:MovieClip;
public var bridge1:MovieClip;
public var bridge2:MovieClip;
public var bridge3:MovieClip;
public var activator4:MovieClip;
public var gold1:MovieClip;
public var bridge4:MovieClip;
public var borders:MovieClip;
public var effectsMid:MovieClip;
public function Level8Hold_257(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setUp():void{
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
eventTrigger3.canFlip = true;
eventTrigger4.canFlip = true;
eventTrigger5.canFlip = true;
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 1));
};
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
dispatchEvent(new SoundsEvent("narrationEvent", 2));
};
if (((eventTrigger3.canFlip) && (playerMain.hitp(eventTrigger3)))){
eventTrigger3.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 3));
};
if (((eventTrigger4.canFlip) && (playerMain.hitp(eventTrigger4)))){
eventTrigger4.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 4));
};
if (((eventTrigger5.canFlip) && (playerMain.hitp(eventTrigger5)))){
eventTrigger5.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 5));
dispatchEvent(new SoundsEvent("narrationEvent", 3));
};
}
}
}//package g_beach_fla
Section 140
//Level8TerrainMap_269 (g_beach_fla.Level8TerrainMap_269)
package g_beach_fla {
import flash.display.*;
public dynamic class Level8TerrainMap_269 extends MovieClip {
public function Level8TerrainMap_269(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 141
//Level9EnemyPaths_274 (g_beach_fla.Level9EnemyPaths_274)
package g_beach_fla {
import flash.display.*;
public dynamic class Level9EnemyPaths_274 extends MovieClip {
public function Level9EnemyPaths_274(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 142
//Level9HeightMap_275 (g_beach_fla.Level9HeightMap_275)
package g_beach_fla {
import flash.display.*;
public dynamic class Level9HeightMap_275 extends MovieClip {
public function Level9HeightMap_275(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 143
//Level9Hold_270 (g_beach_fla.Level9Hold_270)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Level9Hold_270 extends MovieClip {
public var eventTrigger1:MovieClip;
public var eventTrigger2:MovieClip;
public var ep1a:MovieClip;
public var ep1b:MovieClip;
public var ep1c:MovieClip;
public var playerMain:MainCharBody;
public var nd12:MovieClip;
public var nd13:MovieClip;
public var nd14:MovieClip;
public var ep2b:MovieClip;
public var ep2c:MovieClip;
public var ep2d:MovieClip;
public var ep2f:MovieClip;
public var ep2a:MovieClip;
public var nd16:MovieClip;
public var nd17:MovieClip;
public var nd15:MovieClip;
public var ep2e:MovieClip;
public var nd11:MovieClip;
public var door2:MovieClip;
public var enemyPaths:MovieClip;
public var nd18:MovieClip;
public var nd10:MovieClip;
public var ep3c:MovieClip;
public var ep3d:MovieClip;
public var mapTypes:MovieClip;
public var ep3e:MovieClip;
public var nd19:MovieClip;
public var ep3a:MovieClip;
public var ep3b:MovieClip;
public var playerTop:MovieClip;
public var eskerGrab:MovieClip;
public var exit1:MovieClip;
public var exit2:MovieClip;
public var exit3:MovieClip;
public var gun1:MovieClip;
public var effectsTop:MovieClip;
public var effectsBase:MovieClip;
public var ammo1:MovieClip;
public var ammo3:MovieClip;
public var ammo4:MovieClip;
public var ammo7:MovieClip;
public var exitEff1:MovieClip;
public var ammo2:MovieClip;
public var exitEff3:MovieClip;
public var ammo5:MovieClip;
public var ammo6:MovieClip;
public var mapHeights:MovieClip;
public var exitEff2:MovieClip;
public var effectsWater:MovieClip;
public var nd1:MovieClip;
public var nd2:MovieClip;
public var nd3:MovieClip;
public var nd5:MovieClip;
public var nd8:MovieClip;
public var nd9:MovieClip;
public var nd4:MovieClip;
public var nd6:MovieClip;
public var nd7:MovieClip;
public var playerBase:MovieClip;
public var health1:MovieClip;
public var effectsBase2:MovieClip;
public var bridge2b:MovieClip;
public var bridge2c:MovieClip;
public var activator1:MovieClip;
public var activator2:MovieClip;
public var bridge1:MovieClip;
public var bridge2:MovieClip;
public var borders:MovieClip;
public var gold1:MovieClip;
public var gold2:MovieClip;
public var gold3:MovieClip;
public var gold4:MovieClip;
public var gold5:MovieClip;
public var gold6:MovieClip;
public var effectsMid:MovieClip;
public function Level9Hold_270(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setUp():void{
eventTrigger1.canFlip = true;
eventTrigger2.canFlip = true;
bridge2b.active = (bridge2c.active = false);
}
public function upd(_arg1:Object):void{
if (((eventTrigger1.canFlip) && (playerMain.hitp(eventTrigger1)))){
eventTrigger1.canFlip = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
dispatchEvent(new GameEvent("gameEvent", 1));
};
if (((eventTrigger2.canFlip) && (playerMain.hitp(eventTrigger2)))){
eventTrigger2.canFlip = false;
dispatchEvent(new GameEvent("gameEvent", 2));
};
if (bridge2.currentFrame == 3){
bridge2b.active = (bridge2c.active = true);
bridge2b.gotoAndStop(3);
bridge2c.gotoAndStop(3);
};
eskerGrab.upd();
}
}
}//package g_beach_fla
Section 144
//Level9TerrainMap_276 (g_beach_fla.Level9TerrainMap_276)
package g_beach_fla {
import flash.display.*;
public dynamic class Level9TerrainMap_276 extends MovieClip {
public function Level9TerrainMap_276(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
stop();
}
}
}//package g_beach_fla
Section 145
//LobsterManAttack_59 (g_beach_fla.LobsterManAttack_59)
package g_beach_fla {
import flash.display.*;
public dynamic class LobsterManAttack_59 extends MovieClip {
public var dot:MovieClip;
public function LobsterManAttack_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 146
//LobsterManDie_60 (g_beach_fla.LobsterManDie_60)
package g_beach_fla {
import flash.display.*;
public dynamic class LobsterManDie_60 extends MovieClip {
public function LobsterManDie_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 147
//LobsterManEmerge_62 (g_beach_fla.LobsterManEmerge_62)
package g_beach_fla {
import flash.display.*;
public dynamic class LobsterManEmerge_62 extends MovieClip {
public function LobsterManEmerge_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 148
//LobsterManKill_61 (g_beach_fla.LobsterManKill_61)
package g_beach_fla {
import flash.display.*;
public dynamic class LobsterManKill_61 extends MovieClip {
public function LobsterManKill_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 149
//LobsterManSkuttle_58 (g_beach_fla.LobsterManSkuttle_58)
package g_beach_fla {
import flash.display.*;
public dynamic class LobsterManSkuttle_58 extends MovieClip {
public function LobsterManSkuttle_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 150
//LobsterManWait_57 (g_beach_fla.LobsterManWait_57)
package g_beach_fla {
import flash.display.*;
public dynamic class LobsterManWait_57 extends MovieClip {
public function LobsterManWait_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 151
//MainCharLegs_168 (g_beach_fla.MainCharLegs_168)
package g_beach_fla {
import flash.display.*;
public dynamic class MainCharLegs_168 extends MovieClip {
public var aniDie:MovieClip;
public var ani4:MovieClip;
public var aniRun:MovieClip;
public function MainCharLegs_168(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 152
//MainCharTop_181 (g_beach_fla.MainCharTop_181)
package g_beach_fla {
import flash.display.*;
public dynamic class MainCharTop_181 extends MovieClip {
public function MainCharTop_181(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 153
//MenuHold_140 (g_beach_fla.MenuHold_140)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MenuHold_140 extends MovieClip {
public var exitEvent:Event;
public var movingBack:MovieClip;
public var i:uint;
public var ach1:MovieClip;
public var ach3:MovieClip;
public var ach4:MovieClip;
public var ach5:MovieClip;
public var ach6:MovieClip;
public var ach7:MovieClip;
public var ach2:MovieClip;
public var ach8:MovieClip;
public var ach9:MovieClip;
public var btn_ok:Button_MenuOK;
public var achs:Array;
public var btn_newgame:Button_MenuNewGame;
public var fadeIn:MovieClip;
public var btn_author:Button_MenuAuthor;
public var crabSoup:MovieClip;
public var btn_back:Button_Back;
public var cavesMap:MovieClip;
public var ach10:MovieClip;
public var ach11:MovieClip;
public var ach14:MovieClip;
public var ach15:MovieClip;
public var achievementClip:MovieClip;
public var ach13:MovieClip;
public var btn_continue:Button_MenuContinue;
public var ach12:MovieClip;
public var btn_medal:Button_MenuPlayMore;
public var pirateHat:MovieClip;
public var newGame:Boolean;
public var btn_credits:Button_MenuAuthor;
public var trinket1:MovieClip;
public var trinket2:MovieClip;
public var trinket3:MovieClip;
public var trinket4:MovieClip;
public function MenuHold_140(){
addFrameScript(0, frame1, 14, frame15, 40, frame41, 42, frame43, 44, frame45, 48, frame49, 49, frame50, 59, frame60, 79, frame80, 80, frame81);
}
function frame15(){
stop();
if (MovieClip(parent).firstOpen){
btn_ok.turnOn();
btn_ok.onPress = function ():void{
gotoAndPlay(16);
};
MovieClip(parent).firstOpen = false;
} else {
gotoAndPlay(16);
};
}
function frame1(){
movingBack.gotoAndPlay(Math.ceil((Math.random() * movingBack.totalFrames)));
play();
}
public function reJigHealth(_arg1:Object):void{
}
function frame43(){
if (!newGame){
btn_continue.turnOn();
};
btn_continue.onPress = function ():void{
gotoAndPlay(60);
exitEvent = new Event("gameContinue");
};
}
function frame45(){
btn_medal.turnOn();
btn_medal.onPress = function ():void{
gotoAndStop(81);
};
}
function frame41(){
btn_newgame.turnOn();
btn_newgame.onPress = function ():void{
gotoAndPlay(60);
exitEvent = new Event("gameStart");
};
}
function frame49(){
btn_author.turnOn();
}
function frame50(){
stop();
}
function frame60(){
btn_newgame.turnOff();
btn_continue.turnOff();
btn_medal.turnOff();
btn_author.turnOff();
}
function frame80(){
dispatchEvent(exitEvent);
}
function frame81(){
achs = new Array(ach1, ach2, ach3, ach4, ach5, ach6, ach7, ach8, ach9, ach10, ach11, ach12, ach13, ach14, ach15);
btn_newgame.turnOff();
btn_continue.turnOff();
btn_medal.turnOff();
btn_author.turnOff();
btn_back.turnOn();
achievementClip.gotoAndStop(16);
i = 0;
while (i < achs.length) {
if (MovieClip(parent).medals[i]){
achs[i].gotoAndStop((i + 1));
achs[i].buttonMode = true;
} else {
achs[i].gotoAndStop(16);
};
achs[i].addEventListener(MouseEvent.ROLL_OVER, onMouseRoll);
achs[i].addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
i++;
};
btn_back.onPress = function ():void{
btn_newgame.turnOn();
if (!newGame){
btn_continue.turnOn();
};
btn_medal.turnOn();
btn_author.turnOn();
btn_back.turnOff();
i = 0;
while (i < achs.length) {
achs[i].removeEventListener(MouseEvent.ROLL_OVER, onMouseRoll);
achs[i].removeEventListener(MouseEvent.ROLL_OUT, onMouseOut);
i++;
};
gotoAndStop(50);
};
}
public function upd(_arg1:Object):void{
}
public function onMouseOut(_arg1:MouseEvent):void{
achievementClip.gotoAndStop(16);
}
public function onMouseRoll(_arg1:MouseEvent):void{
achievementClip.gotoAndStop(_arg1.target.currentFrame);
}
public function reJig(_arg1:Object):void{
}
}
}//package g_beach_fla
Section 154
//MenuPaintings_145 (g_beach_fla.MenuPaintings_145)
package g_beach_fla {
import flash.display.*;
public dynamic class MenuPaintings_145 extends MovieClip {
public function MenuPaintings_145(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
}
}
}//package g_beach_fla
Section 155
//MermaidAttack_67 (g_beach_fla.MermaidAttack_67)
package g_beach_fla {
import flash.display.*;
public dynamic class MermaidAttack_67 extends MovieClip {
public var shooter:MovieClip;
public function MermaidAttack_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 156
//MermaidAttackBase_66 (g_beach_fla.MermaidAttackBase_66)
package g_beach_fla {
import flash.display.*;
public dynamic class MermaidAttackBase_66 extends MovieClip {
public function MermaidAttackBase_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 157
//MermaidShoot_68 (g_beach_fla.MermaidShoot_68)
package g_beach_fla {
import flash.display.*;
public dynamic class MermaidShoot_68 extends MovieClip {
public var dot:MovieClip;
public function MermaidShoot_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 158
//MermaidSwim_65 (g_beach_fla.MermaidSwim_65)
package g_beach_fla {
import flash.display.*;
public dynamic class MermaidSwim_65 extends MovieClip {
public function MermaidSwim_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 159
//MermaidWait_64 (g_beach_fla.MermaidWait_64)
package g_beach_fla {
import flash.display.*;
public dynamic class MermaidWait_64 extends MovieClip {
public function MermaidWait_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 160
//MermanAttack1_109 (g_beach_fla.MermanAttack1_109)
package g_beach_fla {
import flash.display.*;
public dynamic class MermanAttack1_109 extends MovieClip {
public var dot1:MovieClip;
public var dot2:MovieClip;
public var dot4:MovieClip;
public var dot6:MovieClip;
public var dot3:MovieClip;
public var dot5:MovieClip;
public function MermanAttack1_109(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 161
//MermanCast_110 (g_beach_fla.MermanCast_110)
package g_beach_fla {
import flash.display.*;
public dynamic class MermanCast_110 extends MovieClip {
public function MermanCast_110(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 162
//MermanDie_111 (g_beach_fla.MermanDie_111)
package g_beach_fla {
import flash.display.*;
public dynamic class MermanDie_111 extends MovieClip {
public function MermanDie_111(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 163
//MermanEmerge_113 (g_beach_fla.MermanEmerge_113)
package g_beach_fla {
import flash.display.*;
public dynamic class MermanEmerge_113 extends MovieClip {
public function MermanEmerge_113(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 164
//MermanKill_112 (g_beach_fla.MermanKill_112)
package g_beach_fla {
import flash.display.*;
public dynamic class MermanKill_112 extends MovieClip {
public function MermanKill_112(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 165
//MermanWait_107 (g_beach_fla.MermanWait_107)
package g_beach_fla {
import flash.display.*;
public dynamic class MermanWait_107 extends MovieClip {
public function MermanWait_107(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 166
//MermanWalk_108 (g_beach_fla.MermanWalk_108)
package g_beach_fla {
import flash.display.*;
public dynamic class MermanWalk_108 extends MovieClip {
public function MermanWalk_108(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 167
//MessageSprite_40 (g_beach_fla.MessageSprite_40)
package g_beach_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MessageSprite_40 extends MovieClip {
public var messageText:TextField;
}
}//package g_beach_fla
Section 168
//MessageSprite2_27 (g_beach_fla.MessageSprite2_27)
package g_beach_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MessageSprite2_27 extends MovieClip {
public var messageText:TextField;
}
}//package g_beach_fla
Section 169
//moto3_man_body_19 (g_beach_fla.moto3_man_body_19)
package g_beach_fla {
import flash.display.*;
public dynamic class moto3_man_body_19 extends MovieClip {
public var mc_hit:MovieClip;
}
}//package g_beach_fla
Section 170
//moto3_man_head_18 (g_beach_fla.moto3_man_head_18)
package g_beach_fla {
import flash.display.*;
public dynamic class moto3_man_head_18 extends MovieClip {
public var mc_hit:MovieClip;
}
}//package g_beach_fla
Section 171
//moto3_man_leg_21 (g_beach_fla.moto3_man_leg_21)
package g_beach_fla {
import flash.display.*;
public dynamic class moto3_man_leg_21 extends MovieClip {
public var mc_hit:MovieClip;
}
}//package g_beach_fla
Section 172
//moto3_spring_b_14 (g_beach_fla.moto3_spring_b_14)
package g_beach_fla {
import flash.display.*;
public dynamic class moto3_spring_b_14 extends MovieClip {
public var mc_dir:MovieClip;
}
}//package g_beach_fla
Section 173
//ObjectActivator_199 (g_beach_fla.ObjectActivator_199)
package g_beach_fla {
import flash.display.*;
public dynamic class ObjectActivator_199 extends MovieClip {
public var theGlow:MovieClip;
public function ObjectActivator_199(){
addFrameScript(19, frame20);
}
function frame20(){
gotoAndStop(2);
}
}
}//package g_beach_fla
Section 174
//OctomageCast_117 (g_beach_fla.OctomageCast_117)
package g_beach_fla {
import flash.display.*;
public dynamic class OctomageCast_117 extends MovieClip {
public function OctomageCast_117(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 175
//OctomageDie_118 (g_beach_fla.OctomageDie_118)
package g_beach_fla {
import flash.display.*;
public dynamic class OctomageDie_118 extends MovieClip {
public function OctomageDie_118(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 176
//OctomageEmerge_119 (g_beach_fla.OctomageEmerge_119)
package g_beach_fla {
import flash.display.*;
public dynamic class OctomageEmerge_119 extends MovieClip {
public function OctomageEmerge_119(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 177
//OctomageWait_115 (g_beach_fla.OctomageWait_115)
package g_beach_fla {
import flash.display.*;
public dynamic class OctomageWait_115 extends MovieClip {
public function OctomageWait_115(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 178
//OctomageWalk_116 (g_beach_fla.OctomageWalk_116)
package g_beach_fla {
import flash.display.*;
public dynamic class OctomageWalk_116 extends MovieClip {
public function OctomageWalk_116(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 179
//PiperAttack_96 (g_beach_fla.PiperAttack_96)
package g_beach_fla {
import flash.display.*;
public dynamic class PiperAttack_96 extends MovieClip {
public var dot:MovieClip;
public function PiperAttack_96(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 180
//PiperDie_97 (g_beach_fla.PiperDie_97)
package g_beach_fla {
import flash.display.*;
public dynamic class PiperDie_97 extends MovieClip {
public function PiperDie_97(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 181
//PiperEmerge_98 (g_beach_fla.PiperEmerge_98)
package g_beach_fla {
import flash.display.*;
public dynamic class PiperEmerge_98 extends MovieClip {
public function PiperEmerge_98(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 182
//PiperWait_94 (g_beach_fla.PiperWait_94)
package g_beach_fla {
import flash.display.*;
public dynamic class PiperWait_94 extends MovieClip {
public function PiperWait_94(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 183
//PiperWalk_95 (g_beach_fla.PiperWalk_95)
package g_beach_fla {
import flash.display.*;
public dynamic class PiperWalk_95 extends MovieClip {
public function PiperWalk_95(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 184
//PirateBossAttack1_238 (g_beach_fla.PirateBossAttack1_238)
package g_beach_fla {
import flash.display.*;
public dynamic class PirateBossAttack1_238 extends MovieClip {
public var dot:MovieClip;
public function PirateBossAttack1_238(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 185
//PirateBossAttack2_239 (g_beach_fla.PirateBossAttack2_239)
package g_beach_fla {
import flash.display.*;
public dynamic class PirateBossAttack2_239 extends MovieClip {
public var dot1:MovieClip;
public var dot2:MovieClip;
public var dot4:MovieClip;
public var dot3:MovieClip;
public function PirateBossAttack2_239(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 186
//PirateBossDie_240 (g_beach_fla.PirateBossDie_240)
package g_beach_fla {
import flash.display.*;
public dynamic class PirateBossDie_240 extends MovieClip {
public function PirateBossDie_240(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 187
//PirateBossRun_237 (g_beach_fla.PirateBossRun_237)
package g_beach_fla {
import flash.display.*;
public dynamic class PirateBossRun_237 extends MovieClip {
public function PirateBossRun_237(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 188
//PirateBossWait_236 (g_beach_fla.PirateBossWait_236)
package g_beach_fla {
import flash.display.*;
public dynamic class PirateBossWait_236 extends MovieClip {
public function PirateBossWait_236(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 189
//PirateBridge_225 (g_beach_fla.PirateBridge_225)
package g_beach_fla {
import flash.display.*;
public dynamic class PirateBridge_225 extends MovieClip {
public function PirateBridge_225(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(2);
}
}
}//package g_beach_fla
Section 190
//Preloader_24 (g_beach_fla.Preloader_24)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Preloader_24 extends MovieClip {
public const ceil:Function;
public var loadText:TextField;
public var loadBar:MovieClip;
public function Preloader_24(){
ceil = Math.ceil;
super();
addFrameScript(0, frame1);
}
public function upd(_arg1:Object):void{
var _local2:Number;
var _local3:String;
_local2 = (_arg1.theRoot.loaderInfo.bytesLoaded / _arg1.theRoot.loaderInfo.bytesTotal);
if (_local2 < 1){
loadBar.scaleX = _local2;
_local3 = String(ceil((_local2 * 100)));
while (_local3.length < 3) {
_local3 = ("0" + _local3);
};
_local3 = (_local3 + "%");
loadText.text = _local3;
} else {
_arg1.theRoot.gotoAndStop(4);
};
}
function frame1(){
loadBar.scaleX = 0;
stop();
}
public function reJigHealth(_arg1:Object):void{
}
public function reJig(_arg1:Object):void{
}
}
}//package g_beach_fla
Section 191
//ScreenshotClip_159 (g_beach_fla.ScreenshotClip_159)
package g_beach_fla {
import flash.display.*;
public dynamic class ScreenshotClip_159 extends MovieClip {
public function ScreenshotClip_159(){
addFrameScript(0, frame1);
}
function frame1(){
nextFrame();
}
}
}//package g_beach_fla
Section 192
//ShadowAttack_90 (g_beach_fla.ShadowAttack_90)
package g_beach_fla {
import flash.display.*;
public dynamic class ShadowAttack_90 extends MovieClip {
public var dot:MovieClip;
public function ShadowAttack_90(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 193
//ShadowDie_91 (g_beach_fla.ShadowDie_91)
package g_beach_fla {
import flash.display.*;
public dynamic class ShadowDie_91 extends MovieClip {
public function ShadowDie_91(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 194
//ShadowEmerge_92 (g_beach_fla.ShadowEmerge_92)
package g_beach_fla {
import flash.display.*;
public dynamic class ShadowEmerge_92 extends MovieClip {
public function ShadowEmerge_92(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 195
//ShadowMove_89 (g_beach_fla.ShadowMove_89)
package g_beach_fla {
import flash.display.*;
public dynamic class ShadowMove_89 extends MovieClip {
public function ShadowMove_89(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 196
//ShadowWait_88 (g_beach_fla.ShadowWait_88)
package g_beach_fla {
import flash.display.*;
public dynamic class ShadowWait_88 extends MovieClip {
public function ShadowWait_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 197
//ShroomRise_289 (g_beach_fla.ShroomRise_289)
package g_beach_fla {
import flash.display.*;
public dynamic class ShroomRise_289 extends MovieClip {
public function ShroomRise_289(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 198
//SirenAttack_72 (g_beach_fla.SirenAttack_72)
package g_beach_fla {
import flash.display.*;
public dynamic class SirenAttack_72 extends MovieClip {
public function SirenAttack_72(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 199
//SirenMain_69 (g_beach_fla.SirenMain_69)
package g_beach_fla {
import flash.display.*;
public dynamic class SirenMain_69 extends MovieClip {
public var the_hitbox:MovieClip;
public function SirenMain_69(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 200
//SirenSwim_71 (g_beach_fla.SirenSwim_71)
package g_beach_fla {
import flash.display.*;
public dynamic class SirenSwim_71 extends MovieClip {
public function SirenSwim_71(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 201
//SirenWait_70 (g_beach_fla.SirenWait_70)
package g_beach_fla {
import flash.display.*;
public dynamic class SirenWait_70 extends MovieClip {
public function SirenWait_70(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 202
//SkeletonAttack_77 (g_beach_fla.SkeletonAttack_77)
package g_beach_fla {
import flash.display.*;
public dynamic class SkeletonAttack_77 extends MovieClip {
public var dot:MovieClip;
public function SkeletonAttack_77(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 203
//SkeletonDie_78 (g_beach_fla.SkeletonDie_78)
package g_beach_fla {
import flash.display.*;
public dynamic class SkeletonDie_78 extends MovieClip {
public function SkeletonDie_78(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 204
//SkeletonEmerge_79 (g_beach_fla.SkeletonEmerge_79)
package g_beach_fla {
import flash.display.*;
public dynamic class SkeletonEmerge_79 extends MovieClip {
public function SkeletonEmerge_79(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 205
//SkeletonJump_76 (g_beach_fla.SkeletonJump_76)
package g_beach_fla {
import flash.display.*;
public dynamic class SkeletonJump_76 extends MovieClip {
public function SkeletonJump_76(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 206
//SkeletonRun_75 (g_beach_fla.SkeletonRun_75)
package g_beach_fla {
import flash.display.*;
public dynamic class SkeletonRun_75 extends MovieClip {
public var footPad:MovieClip;
public function SkeletonRun_75(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 207
//SkeletonWait_74 (g_beach_fla.SkeletonWait_74)
package g_beach_fla {
import flash.display.*;
public dynamic class SkeletonWait_74 extends MovieClip {
public function SkeletonWait_74(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 208
//SoundGuide_132 (g_beach_fla.SoundGuide_132)
package g_beach_fla {
import flash.display.*;
public dynamic class SoundGuide_132 extends MovieClip {
public function SoundGuide_132(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 209
//SoundGuideAni_131 (g_beach_fla.SoundGuideAni_131)
package g_beach_fla {
import flash.display.*;
public dynamic class SoundGuideAni_131 extends MovieClip {
public var image:MovieClip;
public function SoundGuideAni_131(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 210
//SpecialEffect1_249 (g_beach_fla.SpecialEffect1_249)
package g_beach_fla {
import flash.display.*;
public dynamic class SpecialEffect1_249 extends MovieClip {
public var fireBit:MovieClip;
public function SpecialEffect1_249(){
addFrameScript(0, frame1);
}
public function upd():void{
if ((((currentFrame < totalFrames)) && ((currentFrame > 1)))){
nextFrame();
};
if (this.fireBit != null){
if (this.fireBit.currentFrame == 1){
this.fireBit.gotoAndStop(2);
} else {
this.fireBit.gotoAndStop(1);
};
};
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 211
//Splash_136 (g_beach_fla.Splash_136)
package g_beach_fla {
import flash.display.*;
import flash.events.*;
public dynamic class Splash_136 extends MovieClip {
public var btn_play:PlayBtn;
public function Splash_136(){
addFrameScript(0, frame1, 29, frame30, 89, frame90);
}
public function upd(_arg1:Object):void{
}
function frame90(){
dispatchEvent(new Event("agSplash"));
}
function frame1(){
play();
}
function frame30(){
stop();
btn_play.turnOn();
btn_play.onPress = function ():void{
play();
btn_play.turnOff();
};
}
public function reJigHealth(_arg1:Object):void{
}
public function reJig(_arg1:Object):void{
}
}
}//package g_beach_fla
Section 212
//StairWell_284 (g_beach_fla.StairWell_284)
package g_beach_fla {
import flash.display.*;
public dynamic class StairWell_284 extends MovieClip {
public function StairWell_284(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(2);
}
}
}//package g_beach_fla
Section 213
//StairWell2_226 (g_beach_fla.StairWell2_226)
package g_beach_fla {
import flash.display.*;
public dynamic class StairWell2_226 extends MovieClip {
public function StairWell2_226(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(2);
}
}
}//package g_beach_fla
Section 214
//TearEffect_255 (g_beach_fla.TearEffect_255)
package g_beach_fla {
import flash.display.*;
public dynamic class TearEffect_255 extends MovieClip {
public function TearEffect_255(){
addFrameScript(0, frame1, 34, frame35);
}
function frame1(){
stop();
}
function frame35(){
stop();
}
}
}//package g_beach_fla
Section 215
//theEndUI_312 (g_beach_fla.theEndUI_312)
package g_beach_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class theEndUI_312 extends MovieClip {
public var theKills:TextField;
public var theSoul:TextField;
public var exitEvent:Event;
public var sc:uint;
public var theTreasure:TextField;
public var btnNext:NextBtn;
public var state:Object;
public var theRanking:MovieClip;
public var theScore:TextField;
public var fadeIn:MovieClip;
public var theTime:TextField;
public var theAmmo:TextField;
public var btn_next:NextBtn;
public function theEndUI_312(){
addFrameScript(0, frame1, 169, frame170, 174, frame175, 179, frame180, 184, frame185, 189, frame190, 194, frame195, 199, frame200, 208, frame209, 229, frame230, 232, frame233, 299, frame300);
}
function frame200(){
theTime.text = getTime(state.theRoot.thetime);
theTreasure.text = String(uint(state.theRoot.gold));
theAmmo.text = String(uint(state.theRoot.ammo));
theKills.text = String(uint(state.theRoot.kills));
theSoul.text = String(uint(state.theRoot.soul));
theScore.text = String(state.theRoot.getScore());
}
function frame209(){
sc = state.theRoot.getScore();
if (sc < 50000){
theRanking.gotoAndStop(1);
} else {
if (sc < 100000){
theRanking.gotoAndStop(2);
} else {
if (sc < 200000){
theRanking.gotoAndStop(3);
} else {
if (sc < 500000){
theRanking.gotoAndStop(4);
state.theRoot.addMedal(1);
} else {
if (sc < 1000000){
theRanking.gotoAndStop(5);
state.theRoot.addMedal(2);
state.theRoot.addMedal(1);
} else {
theRanking.gotoAndStop(6);
state.theRoot.addMedal(3);
state.theRoot.addMedal(2);
state.theRoot.addMedal(1);
};
};
};
};
};
if (state.theRoot.thetime < 14400){
state.theRoot.addMedal(4);
};
if (state.theRoot.gold > 5000){
state.theRoot.addMedal(5);
};
if (state.theRoot.ammo > 2500){
state.theRoot.addMedal(6);
};
if (state.theRoot.ammo < 1000){
state.theRoot.addMedal(7);
};
if (state.theRoot.kills > 300){
state.theRoot.addMedal(8);
};
if (state.theRoot.kills < 200){
state.theRoot.addMedal(9);
};
if (state.theRoot.soul > 10000){
state.theRoot.addMedal(10);
};
state.theRoot.submitScore();
}
public function upd(_arg1:Object):void{
if (!Boolean(state)){
state = _arg1;
};
}
public function getTime(_arg1:uint):String{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:String;
var _local7:String;
var _local8:String;
_local2 = Math.round((_arg1 / 0.3));
_local3 = (_local2 % 100);
_local4 = (Math.round(((_local2 - _local3) / 100)) % 60);
_local5 = Math.round((((_local2 - (_local4 * 100)) - _local3) / 6000));
_local6 = String(_local3);
_local7 = String(_local4);
_local8 = String(_local5);
if (_local6.length < 1){
_local6 = "00";
} else {
if (_local6.length < 2){
_local6 = ("0" + _local6);
};
};
if (_local7.length < 1){
_local7 = "00";
} else {
if (_local7.length < 2){
_local7 = ("0" + _local7);
};
};
if (_local8.length < 1){
_local8 = "00";
} else {
if (_local8.length < 2){
_local8 = ("0" + _local8);
};
};
return (((((_local8 + ":") + _local7) + ".") + _local6));
}
function frame170(){
theTime.text = getTime(state.theRoot.thetime);
}
function frame180(){
theTime.text = getTime(state.theRoot.thetime);
theTreasure.text = String(uint(state.theRoot.gold));
theAmmo.text = String(uint(state.theRoot.ammo));
}
function frame1(){
play();
}
function frame185(){
theTime.text = getTime(state.theRoot.thetime);
theTreasure.text = String(uint(state.theRoot.gold));
theAmmo.text = String(uint(state.theRoot.ammo));
theKills.text = String(uint(state.theRoot.kills));
}
function frame190(){
theTime.text = getTime(state.theRoot.thetime);
theTreasure.text = String(uint(state.theRoot.gold));
theAmmo.text = String(uint(state.theRoot.ammo));
theKills.text = String(uint(state.theRoot.kills));
theSoul.text = String(uint(state.theRoot.soul));
}
function frame230(){
stop();
btn_next.turnOn();
btn_next.onPress = function ():void{
nextFrame();
};
}
public function reJigHealth(_arg1:Object):void{
}
function frame195(){
theTime.text = getTime(state.theRoot.thetime);
theTreasure.text = String(uint(state.theRoot.gold));
theAmmo.text = String(uint(state.theRoot.ammo));
theKills.text = String(uint(state.theRoot.kills));
theSoul.text = String(uint(state.theRoot.soul));
theScore.text = String(state.theRoot.getScore());
}
function frame175(){
theTime.text = getTime(state.theRoot.thetime);
theTreasure.text = String(uint(state.theRoot.gold));
}
public function reJig(_arg1:Object):void{
}
function frame233(){
play();
}
function frame300(){
stop();
dispatchEvent(new Event("gameFinished"));
}
}
}//package g_beach_fla
Section 216
//TriggerBox_184 (g_beach_fla.TriggerBox_184)
package g_beach_fla {
import flash.display.*;
public dynamic class TriggerBox_184 extends MovieClip {
public function TriggerBox_184(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 217
//TriggerPad_33 (g_beach_fla.TriggerPad_33)
package g_beach_fla {
import flash.display.*;
public dynamic class TriggerPad_33 extends MovieClip {
public function TriggerPad_33(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 218
//TriggerPoint_53 (g_beach_fla.TriggerPoint_53)
package g_beach_fla {
import flash.display.*;
public dynamic class TriggerPoint_53 extends MovieClip {
public function TriggerPoint_53(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package g_beach_fla
Section 219
//WaterGate_198 (g_beach_fla.WaterGate_198)
package g_beach_fla {
import flash.display.*;
public dynamic class WaterGate_198 extends MovieClip {
public function WaterGate_198(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 220
//WaterGate3_283 (g_beach_fla.WaterGate3_283)
package g_beach_fla {
import flash.display.*;
public dynamic class WaterGate3_283 extends MovieClip {
public function WaterGate3_283(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 221
//WaterGate4_295 (g_beach_fla.WaterGate4_295)
package g_beach_fla {
import flash.display.*;
public dynamic class WaterGate4_295 extends MovieClip {
public function WaterGate4_295(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package g_beach_fla
Section 222
//CrabBoss (project.chars.CrabBoss)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class CrabBoss extends LivingObject {
private const exp:Function;
private const rtd:Number = 57.2957795130823;
private const atan2:Function;
private const sin:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
private var spinning:Boolean;// = false
public var health:Number;// = 2000
public var theFlyer:MovieClip;
private var attackAP:uint;
private var prevRot:Number;
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani6:MovieClip;
public var ani7:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var lTarg:MovieClip;
private var movSpd:Number;// = 5.5
public function CrabBoss():void{
mrandom = Math.random;
sin = Math.sin;
cos = Math.cos;
atan2 = Math.atan2;
exp = Math.exp;
movSpd = 5.5;
health = 2000;
spinning = false;
super();
frictionFactor = 0.1;
radius = 30;
mass = 100;
val = 1000;
flyheight = 0;
waterdepth = 34;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(7);
addUnflourish(x, y);
addUnflourish(x, y);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 120));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
};
};
}
public function rotateToGun(_arg1:Object, _arg2:Object):void{
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local3 = localToGlobal(new Point());
_local4 = _arg2.sc.localToGlobal(new Point(_arg1.x, _arg1.y));
_local6 = atan2((_local3.x - _local4.x), (_local4.y - _local3.y));
_local7 = (rotation * dtr);
rotation = (_local6 * rtd);
_local5 = (Point.distance(_local3, new Point(_arg2.mouX, _arg2.mouY)) * scaleX);
if (_local5 > 108){
rotation = (rotation - (8 * exp(((88 - _local5) / 200))));
} else {
rotation = (rotation - 8);
};
rotation = (MathsStuff.interRotationSmooth(_local7, (rotation * dtr), 1) * rtd);
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
updMe(_arg1);
if (health > 0){
if (target.alive){
if (currentFrame < 4){
if (attackAP < (120 + (health / 20))){
attackAP = (attackAP + 2);
};
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = (_local2.y + PI);
targRot = _local2.y;
_local2.y = MathsStuff.getAngle((rotation * dtr), _local2.y);
if ((((attackAP > 40)) && ((_local2.x < 90)))){
gotoAndStop(6);
attackAP = (attackAP - 40);
} else {
if ((((((((attackAP > 100)) && ((_local2.x > 90)))) && ((_local2.x < 170)))) && ((((_local2.y < 0.5)) && ((_local2.y > -0.5)))))){
gotoAndStop(5);
attackAP = (attackAP - 100);
} else {
if ((((attackAP > 100)) && ((((_local2.y < 0.2)) && ((_local2.y > -0.2)))))){
gotoAndStop(4);
attackAP = (attackAP - 100);
};
};
};
rotation = (MathsStuff.interRotation((rotation * dtr), targRot, 0.02) * rtd);
};
} else {
targSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
prevRot = rotation;
attackAP = 40;
noScale = true;
gotoAndStop(1);
}
public function updAni():void{
targetable = true;
if (currentFrame < 4){
if ((rotation - prevRot) < -0.5){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
if (((!((this.ani2 == null))) && ((this.ani2.currentFrame == 2)))){
dispatchEvent(new SoundsEvent("soundEvent", 112));
};
} else {
if ((rotation - prevRot) > 0.5){
checkAndGo(this, 3);
checkAndPlay(this.ani3);
if (((!((this.ani3 == null))) && ((this.ani3.currentFrame == 2)))){
dispatchEvent(new SoundsEvent("soundEvent", 112));
};
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
};
prevRot = rotation;
} else {
if (currentFrame == 4){
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
if (this.ani4.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 116));
};
if (this.ani4.currentFrame == 20){
dispatchEvent(new SoundsEvent("soundEvent", 114));
};
if (this.ani4.dmgBox != null){
if (target.hitp(this.ani4.dmgBox)){
target.bash(26);
};
};
this.ani4.nextFrame();
} else {
this.ani4.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 5){
if (this.ani5 != null){
if (this.ani5.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 116));
};
if (this.ani5.currentFrame < this.ani5.totalFrames){
if (this.ani5.dmgBox != null){
if (target.hitp(this.ani5.dmgBox)){
target.bash(22);
};
};
this.ani5.nextFrame();
} else {
this.ani5.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 6){
if (this.ani6 != null){
if (this.ani6.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 116));
};
if (this.ani6.currentFrame == 20){
dispatchEvent(new SoundsEvent("soundEvent", 118));
};
if (this.ani6.currentFrame < this.ani6.totalFrames){
if (this.ani6.dmgBox != null){
if (target.hitp(this.ani6.dmgBox)){
target.bash(31);
};
};
this.ani6.nextFrame();
} else {
this.ani6.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 7){
targetable = false;
if (this.ani7 != null){
if (this.ani7.currentFrame == 10){
dispatchEvent(new SoundsEvent("soundEvent", 118));
};
if (this.ani7.currentFrame == 25){
dispatchEvent(new SoundsEvent("soundEvent", 122));
};
if (this.ani7.currentFrame < this.ani7.totalFrames){
this.ani7.nextFrame();
} else {
active = false;
};
};
};
};
};
};
};
}
}
}//package project.chars
Section 223
//Crawler (project.chars.Crawler)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Crawler extends LivingObject {
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 22
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var movSpd:Number;// = 0.9
public function Crawler():void{
mrandom = Math.random;
sin = Math.sin;
cos = Math.cos;
movSpd = 0.9;
health = 22;
super();
frictionFactor = 0.4;
radius = 15;
mass = 0.8;
val = 20;
flyheight = 0;
waterdepth = 34;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(4);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 32));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
} else {
dispatchEvent(new SoundsEvent("soundEvent", 30));
};
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
pathArray = _arg1.pathfinder.getLine(this, target, _arg1, (radius - 1));
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (20 + uint((mrandom() * 40)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
} else {
targSpd = 0;
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle(((rotation * dtr) + PI), _local2.y);
if ((((((((_local2.x < 55)) && ((_local2.x > 10)))) && ((_local2.y > -0.7)))) && ((_local2.y < 0.7)))){
gotoAndStop(3);
targSpd = 0;
};
rotation = (MathsStuff.interRotation((rotation * dtr), (targRot - (PI / 2)), 0.1) * rtd);
};
} else {
movSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
gotoAndStop(5);
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
if (((!((this.ani2 == null))) && ((this.ani2.currentFrame == 2)))){
dispatchEvent(new SoundsEvent("soundEvent", 24));
};
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if (this.ani3.currentFrame == 4){
dispatchEvent(new SoundsEvent("soundEvent", 26));
} else {
if (this.ani3.currentFrame == 8){
dispatchEvent(new AttackEvent("useAttack", 10, this.ani3.dot, this));
dispatchEvent(new SoundsEvent("soundEvent", 28));
};
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
targetable = false;
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
this.ani4.nextFrame();
} else {
active = false;
};
};
} else {
if (currentFrame == 5){
targetable = false;
if (this.ani5 != null){
if (this.ani5.currentFrame < this.ani5.totalFrames){
if (this.ani5.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 20));
};
this.ani5.nextFrame();
} else {
gotoAndStop(1);
};
};
};
};
};
};
}
}
}//package project.chars
Section 224
//Demon (project.chars.Demon)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Demon extends LivingObject {
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 182
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
public var hideTimer:uint;
private var pathArray:Array;
private var target:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
public var justStruck:Boolean;
private var movSpd:Number;// = 0.9
public function Demon():void{
mrandom = Math.random;
sin = Math.sin;
cos = Math.cos;
movSpd = 0.9;
health = 182;
super();
frictionFactor = 0.5;
radius = 15;
mass = 0.8;
val = 63;
flyheight = 0;
waterdepth = 34;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(5);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 94));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
} else {
if (mrandom() < 0.4){
dispatchEvent(new SoundsEvent("soundEvent", 92));
};
};
};
}
public function goHide():void{
gotoAndStop(1);
visible = false;
hideTimer = ((30 + (mrandom() * 40)) + ((mrandom() * health) / 3));
}
public function pickPosition(_arg1:Object, _arg2:Boolean=true):void{
var _local3:uint;
var _local4:Number;
var _local5:Number;
var _local6:Boolean;
var _local7:MovieClip;
var _local8:Point;
var _local9:Number;
var _local10:Number;
_local4 = (50 + (mrandom() * 10));
_local5 = ((mrandom() * PI) * 2);
_local6 = false;
_local7 = target;
_local3 = 0;
while (_local3 < 10) {
x = (_local7.x + (_local4 * sin(_local5)));
y = (_local7.y - (_local4 * cos(_local5)));
if (((((((!(handleTerrain(9, 0, 0, 0, _arg1))) && (!(handleTerrain(0, 9, 0, 0, _arg1))))) && (!(handleTerrain(-9, 0, 0, 0, _arg1))))) && (!(handleTerrain(0, -9, 0, 0, _arg1))))){
_local6 = true;
break;
};
_local3++;
};
_local8 = MathsStuff.polarDistance(position, target.position);
rotation = ((_local8.y * rtd) + 180);
if (!_arg2){
rotation = (rotation + (45 - (mrandom() * 90)));
};
if (_local6){
gotoAndStop(2);
visible = true;
thoughtTimer = uint((((1 + mrandom()) * health) / 80));
} else {
hideTimer = 10;
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (!visible){
if (hideTimer > 0){
hideTimer--;
} else {
if (justStruck){
pickPosition(_arg1);
} else {
pickPosition(_arg1, _arg1.pathfinder.randomClose(target, 3, 220, null));
};
justStruck = !(justStruck);
};
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (((visible) && ((currentFrame == 1)))){
if (thoughtTimer > 0){
thoughtTimer--;
} else {
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle(((rotation * dtr) + PI), _local2.y);
if ((((((_local2.x < 125)) && ((_local2.y > -0.9)))) && ((_local2.y < 0.9)))){
gotoAndStop(3);
targSpd = 0;
} else {
gotoAndStop(4);
};
};
} else {
if (currentFrame == 3){
_local2 = MathsStuff.polarDistance(position, target.position);
targRot = ((_local2.y * rtd) + 180);
rotation = ((MathsStuff.interRotationSmooth(((rotation + 90) * dtr), targRot, 0.02) * rtd) - 90);
};
};
};
};
}
public function setMoreUp(_arg1:MovieClip, _arg2:Number=0){
target = _arg1;
justStruck = false;
hideTimer = _arg2;
visible = false;
gotoAndStop(1);
}
public function updAni():void{
targetable = visible;
if (currentFrame == 1){
checkAndPlay(this.ani1);
} else {
if (currentFrame == 2){
if (this.ani2 != null){
if (this.ani2.currentFrame < this.ani2.totalFrames){
this.ani2.nextFrame();
if (this.ani2.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 82));
};
} else {
this.ani2.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if ((((this.ani3.currentFrame > 11)) && ((this.ani3.currentFrame < 15)))){
dispatchEvent(new AttackEvent("useAttack", 17, this.ani3.dot1, this));
dispatchEvent(new AttackEvent("useAttack", 17, this.ani3.dot2, this));
dispatchEvent(new AttackEvent("useAttack", 17, this.ani3.dot3, this));
};
if (this.ani3.currentFrame == 15){
dispatchEvent(new SoundsEvent("soundEvent", 84));
};
if (this.ani3.currentFrame == 11){
dispatchEvent(new SoundsEvent("soundEvent", 86));
};
if (this.ani3.currentFrame == 12){
dispatchEvent(new SoundsEvent("soundEvent", 90));
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
goHide();
};
};
} else {
if (currentFrame == 4){
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
this.ani4.nextFrame();
if (this.ani4.currentFrame == 62){
dispatchEvent(new SoundsEvent("soundEvent", 84));
};
if (this.ani4.currentFrame == 18){
dispatchEvent(new SoundsEvent("soundEvent", 88));
};
if (this.ani4.currentFrame == 24){
dispatchEvent(new SoundsEvent("soundEvent", 90));
};
if (this.ani4.currentFrame == 40){
dispatchEvent(new AttackEvent("useAttack", 20, null, this));
};
} else {
this.ani4.gotoAndStop(1);
gotoAndStop(1);
visible = false;
goHide();
};
};
} else {
if (currentFrame == 5){
targetable = false;
if (this.ani5 != null){
if (this.ani5.currentFrame < this.ani5.totalFrames){
this.ani5.nextFrame();
if (this.ani5.currentFrame == 4){
dispatchEvent(new SoundsEvent("soundEvent", 84));
};
if (this.ani5.currentFrame == 26){
dispatchEvent(new SoundsEvent("soundEvent", 82));
};
} else {
active = false;
};
};
};
};
};
};
};
}
}
}//package project.chars
Section 225
//EskerBoss (project.chars.EskerBoss)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class EskerBoss extends LivingObject {
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const ceil:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 4000
public var theFlyer:MovieClip;
public var spellType:uint;
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
public var remD:Boolean;
public var beaten:Boolean;
public var spellTimer:uint;
private var pathArray:Array;
private var lastTarg:MovieClip;
public var castTimer:uint;
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani6:MovieClip;
public var ani7:MovieClip;
public var shieldTime:uint;
public var ani3:MovieClip;
public var ani4:MovieClip;
public var ani8:MovieClip;
private var movSpd:Number;// = 7
public function EskerBoss():void{
var i:uint;
mrandom = Math.random;
ceil = Math.ceil;
sin = Math.sin;
cos = Math.cos;
movSpd = 7;
health = 4000;
super();
frictionFactor = 0.2;
radius = 32;
mass = 12;
val = 1500;
spellType = 1;
spellTimer = 0;
shieldTime = 0;
flyheight = 0;
waterdepth = 68;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(8);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
} else {
if (mrandom() < 0.2){
};
};
};
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if (this.ani3.currentFrame == 8){
dispatchEvent(new SoundsEvent("soundEvent", 164));
};
if (this.ani3.currentFrame == 29){
dispatchEvent(new SoundsEvent("soundEvent", 166));
};
if (((!((this.ani3.hitbox == null))) && (target.hitp(this.ani3.hitbox)))){
target.bash(30);
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
if ((((((this.ani4.currentFrame == 18)) || ((this.ani4.currentFrame == 22)))) || ((this.ani4.currentFrame == 26)))){
dispatchEvent(new AttackEvent("useAttack", 19, this.ani4.dot, this));
};
this.ani4.nextFrame();
} else {
this.ani4.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 5){
if (this.ani5 != null){
if (this.ani5.currentFrame < this.ani5.totalFrames){
if (this.ani5.currentFrame == 12){
dispatchEvent(new SoundsEvent("soundEvent", 162));
};
if (((!((this.ani5.hitbox == null))) && (target.hitp(this.ani5.hitbox)))){
target.bash(28);
};
this.ani5.nextFrame();
} else {
this.ani5.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 6){
if (this.ani6 != null){
if (this.ani6.currentFrame == 6){
dispatchEvent(new SoundsEvent("soundEvent", 88));
};
if (this.ani6.currentFrame < 7){
this.ani6.nextFrame();
} else {
if (spellTimer > 0){
if (this.ani6.currentFrame < 23){
this.ani6.nextFrame();
} else {
this.ani6.gotoAndStop(7);
};
spellTimer--;
} else {
if (this.ani6.currentFrame < this.ani6.totalFrames){
this.ani6.nextFrame();
} else {
this.ani6.gotoAndStop(1);
gotoAndStop(1);
};
};
};
};
} else {
if (currentFrame == 7){
if (this.ani7 != null){
if (this.ani7.currentFrame == 7){
dispatchEvent(new SoundsEvent("soundEvent", 160));
};
if (this.ani7.currentFrame == 8){
dispatchEvent(new SoundsEvent("soundEvent", 88));
};
if ((((this.ani7.currentFrame > 11)) && ((this.ani7.currentFrame < 23)))){
targetable = false;
};
if (this.ani7.currentFrame < 20){
this.ani7.nextFrame();
} else {
if (spellTimer > 0){
spellTimer--;
} else {
if (this.ani7.currentFrame < this.ani7.totalFrames){
this.ani7.nextFrame();
} else {
this.ani7.gotoAndStop(1);
gotoAndStop(1);
};
};
};
};
} else {
if (currentFrame == 8){
targetable = false;
if (this.ani8 != null){
if (this.ani8.currentFrame < this.ani8.totalFrames){
if (this.ani8.currentFrame == 6){
dispatchEvent(new SoundsEvent("soundEvent", 156));
};
if (this.ani8.currentFrame == 20){
dispatchEvent(new SoundsEvent("soundEvent", 156));
};
if (this.ani8.currentFrame == 34){
dispatchEvent(new SoundsEvent("soundEvent", 156));
};
if (this.ani8.currentFrame == 47){
dispatchEvent(new SoundsEvent("soundEvent", 156));
};
if (this.ani8.currentFrame == 60){
dispatchEvent(new SoundsEvent("soundEvent", 158));
};
this.ani8.nextFrame();
};
if (this.ani8.theItem != null){
if (this.ani8.theItem.currentFrame < 60){
if ((this.ani8.theItem.currentFrame % 30) == 1){
dispatchEvent(new SoundsEvent("soundEvent", 150));
};
if (this.ani8.theItem.currentFrame < 59){
this.ani8.theItem.nextFrame();
} else {
this.ani8.theItem.gotoAndStop(1);
};
if (target.hitp(this.ani8.theItem.hitbox)){
this.ani8.theItem.gotoAndStop(60);
beaten = true;
dispatchEvent(new SoundsEvent("soundEvent", 6));
dispatchEvent(new SoundsEvent("soundEvent", 152));
};
} else {
beaten = true;
if (this.ani8.theItem.currentFrame < this.ani8.theItem.totalFrames){
this.ani8.theItem.nextFrame();
};
};
};
};
};
};
};
};
};
};
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
var _local3:uint;
targSpd = 0;
if (currentFrame == 8){
if (((!((this.ani8 == null))) && ((this.ani8.currentFrame == 5)))){
_arg1.theRoot.soundManager.fadeMusic(120);
};
};
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
if (castTimer == 0){
lastTarg = _arg1.pathfinder.randomClose(target, 3, 300, lastTarg);
pathArray = _arg1.pathfinder.getLine(this, lastTarg, _arg1, (radius - 1));
thoughtTimer = 100;
} else {
pathArray = _arg1.pathfinder.getLine(this, target, _arg1, (radius - 1));
};
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
} else {
targSpd = 0;
};
};
if (((((!((this.ani3 == null))) && ((this.ani3.currentFrame == 29)))) && (!((this.ani3.hitbox == null))))){
_arg1.handler.addShake(30, 0.9, (rotation * rtd));
_local2 = _arg1.sc.globalToLocal(this.ani3.hitbox.localToGlobal(new Point(0, 5)));
aniEffects.addImpactCrater(_local2.x, _local2.y);
};
if (castTimer > 0){
castTimer--;
};
if (shieldTime > 0){
shieldTime--;
};
} else {
if (remD){
remD = false;
_local3 = 0;
while (_local3 < _arg1.enemyEffects.ides.length) {
if (_arg1.enemyEffects.ides[_local3] != this){
_arg1.enemyEffects.ides[_local3].active = false;
};
_local3++;
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle(((rotation * dtr) + PI), _local2.y);
if ((((((((((health < 2700)) && ((_local2.x < 200)))) && (_local2.x))) && ((_local2.y > -0.2)))) && ((_local2.y < 0.2)))){
gotoAndStop(5);
targSpd = 0;
thoughtTimer = 0;
} else {
if ((((((((_local2.x < 100)) && (_local2.x))) && ((_local2.y > -0.6)))) && ((_local2.y < 0.6)))){
gotoAndStop(3);
targSpd = 0;
thoughtTimer = 0;
} else {
if ((((((((health < 1600)) && ((shieldTime == 0)))) && ((castTimer == 0)))) && ((_local2.x > 180)))){
gotoAndStop(7);
targSpd = 0;
thoughtTimer = 0;
spellTimer = (120 * uint((1 + mrandom())));
castTimer = (160 * uint((1 + mrandom())));
shieldTime = 400;
spellType = ceil((mrandom() * 6));
_local2 = MathsStuff.polarDistance(position, target.position);
} else {
if ((((((((health < 3000)) && ((mrandom() < 0.8)))) && ((castTimer == 0)))) && ((_local2.x > 260)))){
gotoAndStop(6);
targSpd = 0;
thoughtTimer = 0;
spellTimer = (50 * uint((1 + mrandom())));
castTimer = (140 * uint((1 + mrandom())));
spellType = ceil((mrandom() * 6));
_local2 = MathsStuff.polarDistance(position, target.position);
} else {
if ((((castTimer == 0)) && ((_local2.x > 180)))){
gotoAndStop(4);
targSpd = 0;
thoughtTimer = 0;
castTimer = (100 * uint((1 + mrandom())));
_local2 = MathsStuff.polarDistance(position, target.position);
};
};
};
};
};
rotation = (MathsStuff.interRotation((rotation * dtr), (targRot - (PI / 2)), 0.4) * rtd);
} else {
if (currentFrame == 4){
_local2 = MathsStuff.polarDistance(position, target.position);
targRot = _local2.y;
rotation = ((MathsStuff.interRotationSmooth(((rotation + 180) * dtr), targRot, 0.1) * rtd) - 180);
} else {
if (currentFrame == 6){
if (((((!((this.ani6 == null))) && ((this.ani6.currentFrame > 6)))) && ((this.ani6.currentFrame < 23)))){
castSpell(_arg1, spellTimer, spellType);
};
} else {
if (currentFrame == 7){
if (((((!((this.ani7 == null))) && ((this.ani7.currentFrame > 11)))) && ((this.ani7.currentFrame < 23)))){
castSpell(_arg1, spellTimer, spellType);
};
};
};
};
};
} else {
movSpd = 0;
gotoAndStop(1);
};
};
}
public function castSpell(_arg1:Object, _arg2:uint, _arg3:uint):void{
var _local4:uint;
_local4 = ceil((mrandom() * 24));
if ((((_arg3 == 2)) || ((_arg3 == 4)))){
if ((_arg2 % 14) == 1){
dispatchEvent(new AttackEvent("useAttack", (23 + _arg3), this, this));
};
} else {
if ((_arg2 % 5) == 1){
dispatchEvent(new AttackEvent("useAttack", (23 + _arg3), this, this));
};
};
if (health < 400){
if (((((_arg2 % 83) == 1)) && ((_arg1.enemyEffects.ides.length < 4)))){
_arg1.enemyEffects.addMerman(_arg1.sc[("nd" + String(_local4))].x, _arg1.sc[("nd" + String(_local4))].y, (mrandom() * 360));
};
if ((_arg2 % 123) == 1){
_arg1.enemyEffects.addOctomage(_arg1.sc[("nd" + String(_local4))].x, _arg1.sc[("nd" + String(_local4))].y, (mrandom() * 360));
};
} else {
if ((((health < 1000)) && ((_arg1.enemyEffects.ides.length < 30)))){
if ((_arg2 % 6) == 1){
_arg1.enemyEffects.addShadow(_arg1.sc[("nd" + String(_local4))].x, _arg1.sc[("nd" + String(_local4))].y, (mrandom() * 360));
};
} else {
if ((((health < 1400)) && ((_arg1.enemyEffects.ides.length < 10)))){
if ((_arg2 % 15) == 1){
_arg1.enemyEffects.addLobsterMan(_arg1.sc[("nd" + String(_local4))].x, _arg1.sc[("nd" + String(_local4))].y, (mrandom() * 360));
};
} else {
if ((((health < 1800)) && ((_arg1.enemyEffects.ides.length < 12)))){
if ((_arg2 % 20) == 1){
_arg1.enemyEffects.addCrawler(_arg1.sc[("nd" + String(_local4))].x, _arg1.sc[("nd" + String(_local4))].y, (mrandom() * 360));
};
};
};
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
beaten = false;
remD = true;
gotoAndStop(1);
}
}
}//package project.chars
Section 226
//FloatFish (project.chars.FloatFish)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class FloatFish extends LivingObject {
private const exp:Function;
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const ceil:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 61
public var splorTimer:uint;
public var thoughtTimer:uint;
public var waitTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
public var robe:MovieClip;
private var target:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani6:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var movSpd:Number;// = 5
public function FloatFish():void{
mrandom = Math.random;
exp = Math.exp;
ceil = Math.ceil;
sin = Math.sin;
cos = Math.cos;
movSpd = 5;
health = 61;
super();
frictionFactor = 0.8;
radius = 10;
mass = 0.6;
val = 23;
flyheight = 204;
waterdepth = 34;
landbased = true;
waitTimer = 0;
thoughtTimer = (30 + uint((mrandom() * 120)));
splorTimer = (6 + uint((mrandom() * 3)));
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(6);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 132));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
};
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
var _local3:Number;
if (health > 0){
if (target.alive){
if (currentFrame == 2){
if (this.ani2 != null){
if (splorTimer > 0){
splorTimer--;
} else {
if (mrandom() < 0.05){
dispatchEvent(new SoundsEvent("soundEvent", 128));
};
splorTimer = (6 + uint((mrandom() * 3)));
_arg1.aniEffects.addMoveSplort(x, y);
};
if (this.ani2.currentFrame < ((3 * this.ani2.totalFrames) / 4)){
targSpd = movSpd;
};
};
} else {
if (currentFrame == 3){
targRot = ((rotation * dtr) + (PI / 2));
if (this.ani3 != null){
if (this.ani3.currentFrame < 7){
targSpd = 8;
} else {
targSpd = 0;
};
};
} else {
if (currentFrame == 4){
if (this.ani4 != null){
if (_arg1.terrainMap.getTerrainType(x, y).terrain == "water"){
if (this.ani4.currentFrame == 10){
_arg1.aniEffects.addSplash(x, y);
};
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
} else {
if (currentFrame == 6){
if (this.ani6 != null){
if (_arg1.terrainMap.getTerrainType(x, y).terrain == "water"){
if (this.ani6.currentFrame == 13){
_arg1.aniEffects.addSplash(x, y);
};
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
};
};
};
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
rotation = (MathsStuff.interRotationSmooth((rotation * dtr), (_local2.y + PI), 0.1) * rtd);
if (thoughtTimer > 0){
thoughtTimer--;
} else {
if (_local2.x < 100){
gotoAndStop(3);
thoughtTimer = (30 + uint((mrandom() * 120)));
};
};
};
if (currentFrame == 1){
targSpd = 0;
if (waitTimer > 0){
waitTimer--;
} else {
waitTimer = uint(((health * (mrandom() + 1)) / 4));
if (mrandom() < 0.5){
targRot = ((_local2.y - (PI / 2)) + (PI / (exp(((_local2.x - 80) / 40)) + 1)));
} else {
targRot = ((_local2.y - (PI / 2)) - (PI / (exp(((_local2.x - 80) / 40)) + 1)));
};
gotoAndStop(2);
};
};
};
} else {
targSpd = 0;
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
dispatchEvent(new SoundsEvent("soundEvent", 126));
gotoAndStop(4);
}
public function updAni():void{
targetable = visible;
if (currentFrame == 1){
checkAndPlay(this.ani1);
} else {
if (currentFrame == 2){
if (this.ani2 != null){
if (this.ani2.currentFrame < this.ani2.totalFrames){
this.ani2.nextFrame();
} else {
this.ani2.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if (this.ani3.currentFrame == 3){
if (mrandom() < 0.6){
dispatchEvent(new SoundsEvent("soundEvent", 130));
};
};
if ((((this.ani3.currentFrame > 3)) && ((this.ani3.currentFrame < 10)))){
dispatchEvent(new AttackEvent("useAttack", 17, this.ani3.dot1, this));
dispatchEvent(new AttackEvent("useAttack", 17, this.ani3.dot2, this));
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
this.ani4.nextFrame();
} else {
this.ani4.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 6){
targetable = false;
if (this.ani6 != null){
if (this.ani6.currentFrame < this.ani6.totalFrames){
this.ani6.nextFrame();
} else {
active = false;
};
};
};
};
};
};
};
}
}
}//package project.chars
Section 227
//LivingObject (project.chars.LivingObject)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.effects.*;
import project.tools.*;
public class LivingObject extends MovieClip {
private const floor:Function;
private const rtd:Number = 57.2957795130823;
private const abs:Function;
private const sin:Function;
private const mrandom:Function;
private const cos:Function;
private const PI:Number = 3.14159265358979;
public var noScale:Boolean;// = false
public var waterdepth:uint;// = 0
public var hitRight:Boolean;// = false
public var hitLeft:Boolean;// = false
public var targetable:Boolean;// = true
public var radius:Number;// = 10
public var z:Number;// = 0
public var landbased:Boolean;// = true
public var defcons:Array;
private var flashCol1:ColorTransform;
private var flashCol2:ColorTransform;
private var flashCol3:ColorTransform;
public var hitDown:Boolean;// = false
private var flashTime:uint;// = 0
public var targSpd:Number;
public var frictionFactor:Number;// = 0.8
public var mass:Number;// = 1
public var active:Boolean;// = true
public var targScale:Number;
public var targRot:Number;
public var val:Number;// = 20
public var cons:Array;
public var hitbox:MovieClip;// = null
public var flyheight:uint;// = 0
public var hitUp:Boolean;// = false
public var aniEffects:AniEffects;
public var bashMe:Function;
public var attackedBy:MovieClip;// = null
public var spd:Number;
public var bashTime:uint;// = 0
public var rot:Number;
public var bashTimeMax:uint;// = 10
public function LivingObject():void{
mrandom = Math.random;
floor = Math.floor;
sin = Math.sin;
cos = Math.cos;
abs = Math.abs;
frictionFactor = 0.8;
hitbox = null;
radius = 10;
hitLeft = false;
hitRight = false;
hitUp = false;
hitDown = false;
flyheight = 0;
waterdepth = 0;
landbased = true;
z = 0;
noScale = false;
active = true;
val = 20;
mass = 1;
bashTime = 0;
bashTimeMax = 10;
targetable = true;
flashTime = 0;
flashCol1 = new ColorTransform(1, 0.8, 0.6, 1, 200, -80, -120, 0);
flashCol2 = new ColorTransform(1, 0.9, 0.8, 1, 100, -40, -60, 0);
flashCol3 = new ColorTransform(1, 1, 1, 1, 50, -20, -30);
attackedBy = null;
super();
rot = (rotation / rtd);
spd = 0;
targRot = rot;
targSpd = spd;
noScale = false;
targScale = scaleX;
active = (targetable = true);
bashMe = function (_arg1:Number):void{
};
}
public function setDown():void{
}
public function checkAndReverse(_arg1:MovieClip, _arg2:Boolean=true){
if (Boolean(_arg1)){
if (_arg1.currentFrame == 1){
if (_arg2){
_arg1.gotoAndStop(_arg1.totalFrames);
};
} else {
_arg1.prevFrame();
};
};
}
public function bestImpulse(_arg1:Number=0):Number{
return ((_arg1 * ((1 / frictionFactor) - 1)));
}
public function addBounce(_arg1:Point):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Number;
_local2 = new Point((sin(rot) * spd), (cos(rot) * spd));
_local3 = new Point((sin(_arg1.y) * _arg1.x), (cos(_arg1.y) * _arg1.x));
_local4 = new Point();
if (abs(MathsStuff.getAngle(rot, _arg1.y)) > (PI / 2)){
_local3.normalize(1);
_local5 = ((_local2.x * _local3.x) + (_local2.y * _local3.y));
_local4.x = (-(_local3.x) * _local5);
_local4.y = (-(_local3.y) * _local5);
_local2 = _local2.add(_local4);
_local2 = MathsStuff.polarDistanceZero(_local2);
if (_local2.x > 0.2){
spd = _local2.x;
rot = _local2.y;
} else {
spd = 0;
rot = _arg1.y;
};
};
}
public function setUp(_arg1:MovieClip=null, _arg2=null):void{
hitbox = _arg1;
aniEffects = _arg2;
}
public function updMe(_arg1:Object):void{
var _local2:uint;
if (flashTime > 0){
switch (flashTime){
case 3:
transform.colorTransform = flashCol2;
break;
case 2:
transform.colorTransform = flashCol1;
break;
case 1:
transform.colorTransform = new ColorTransform();
break;
};
flashTime--;
};
if (bashTime > 0){
bashTime--;
};
addImpulse(new Point(bestImpulse(targSpd), targRot));
smoothOut();
x = (x + ((sin(rot) * spd) * z));
y = (y + ((cos(rot) * spd) * z));
hitLeft = (hitRight = (hitUp = (hitDown = false)));
if ((x + radius) > _arg1.bounds.right){
hitRight = true;
x = ((_arg1.bounds.right - radius) - 2);
} else {
if ((x - radius) < _arg1.bounds.left){
hitLeft = true;
x = ((_arg1.bounds.left + radius) + 2);
};
};
if ((y + radius) > _arg1.bounds.bottom){
hitDown = true;
y = ((_arg1.bounds.bottom - radius) - 2);
} else {
if ((y - radius) < _arg1.bounds.top){
hitUp = true;
y = ((_arg1.bounds.top + radius) + 2);
};
};
if (((((((hitLeft) && (hitRight))) && (hitUp))) && (hitDown))){
} else {
if (landbased){
_local2 = 0;
while (_local2 < 10) {
if (!hitLeft){
if (handleTerrain(radius, 0, -1, 0, _arg1)){
hitRight = true;
};
};
if (!hitRight){
if (handleTerrain(-(radius), 0, 1, 0, _arg1)){
hitLeft = true;
};
};
if (!hitUp){
if (handleTerrain(0, radius, 0, -1, _arg1)){
hitDown = true;
};
};
if (!hitDown){
if (handleTerrain(0, -(radius), 0, 1, _arg1)){
hitUp = true;
};
};
_local2++;
};
};
};
if (hitRight){
addBounce(new Point(1, (-(PI) / 2)));
} else {
if (hitLeft){
addBounce(new Point(1, (PI / 2)));
};
};
if (hitUp){
addBounce(new Point(1, 0));
} else {
if (hitDown){
addBounce(new Point(1, PI));
};
};
if (flyheight > 0){
z = (0.6 + (Number(_arg1.terrainMap.getTerrainHeight(x, y)) / 300));
} else {
z = (0.6 + (Number(_arg1.terrainMap.getTerrainHeight(x, y)) / 300));
};
targScale = (targScale + MathsStuff.translationAmount(targScale, z, 0.6));
if (noScale){
targScale = 1;
};
scaleX = (scaleY = targScale);
}
public function smoothOut():void{
if (spd > ((1 - frictionFactor) / 5)){
spd = (spd * frictionFactor);
} else {
spd = 0;
};
}
public function bash(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:MovieClip=null, _arg5:Boolean=false):void{
addImpulse(new Point((_arg2 / mass), (_arg3 - (PI / 2))));
if ((((bashTime == 0)) || (((_arg5) && ((attackedBy == _arg4)))))){
attackedBy = _arg4;
flashTime = 3;
transform.colorTransform = flashCol3;
bashMe(_arg1);
bashTime = bashTimeMax;
};
}
public function checkAndGo(_arg1:MovieClip, _arg2:uint){
if (_arg1.currentFrame != _arg2){
_arg1.gotoAndStop(_arg2);
};
}
public function addUnflourish(_arg1:Number, _arg2:Number):void{
if (aniEffects != null){
aniEffects.addDotUnhappy(_arg1, _arg2, (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotUnhappy((_arg1 - 5), _arg2, (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotUnhappy((_arg1 + 5), _arg2, (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotUnhappy(_arg1, (_arg2 - 5), (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotUnhappy(_arg1, (_arg2 + 5), (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotUnhappy(_arg1, _arg2, (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
aniEffects.addDotUnhappy((_arg1 - 5), _arg2, (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
aniEffects.addDotUnhappy((_arg1 + 5), _arg2, (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
aniEffects.addDotUnhappy(_arg1, (_arg2 - 5), (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
aniEffects.addDotUnhappy(_arg1, (_arg2 + 5), (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
};
}
public function addImpulse(_arg1:Point):void{
var _local2:Point;
var _local3:Point;
_local2 = new Point((sin(rot) * spd), (cos(rot) * spd));
_local3 = Point.polar(_arg1.x, _arg1.y);
_local2 = _local2.add(_local3);
_local2 = MathsStuff.polarDistanceZero(_local2);
if (_local2.x > 0.2){
spd = _local2.x;
rot = _local2.y;
} else {
spd = 0;
};
}
public function get position():Point{
return (new Point(x, y));
}
public function hitp(_arg1:MovieClip):Boolean{
var _local2:Point;
_local2 = localToGlobal(new Point());
return (_arg1.hitTestPoint(_local2.x, _local2.y, true));
}
public function hits(_arg1:MovieClip):Boolean{
return (((!((hitbox == null))) && (_arg1.hitTestObject(hitbox))));
}
public function checkAndPlay(_arg1:MovieClip, _arg2:Boolean=true){
if (Boolean(_arg1)){
if (_arg1.currentFrame == _arg1.totalFrames){
if (_arg2){
_arg1.gotoAndStop(1);
};
} else {
_arg1.nextFrame();
};
};
}
public function handleTerrain(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object):Boolean{
var _local6:Object;
var _local7:Point;
_local6 = _arg5.terrainMap.getTerrainType((x + _arg1), (y + _arg2), landbased);
if (landbased){
if (_local6.terrain == "wall"){
if (flyheight < _local6.strength){
x = (x + _arg3);
y = (y + _arg4);
return (true);
};
} else {
if (flyheight > 17){
return (false);
};
if (_local6.terrain == "water"){
if (waterdepth < _local6.strength){
x = (x + _arg3);
y = (y + _arg4);
return (true);
};
} else {
if (_local6.terrain == "air"){
if (!landbased){
x = (x + _arg3);
y = (y + _arg4);
return (true);
};
};
};
};
} else {
if (_local6.terrain == "water"){
if (waterdepth > _local6.strength){
x = (x + _arg3);
y = (y + _arg4);
return (false);
};
};
return (true);
};
return (false);
}
public function get hitWall():Boolean{
return (((((((hitLeft) || (hitRight))) || (hitUp))) || (hitDown)));
}
}
}//package project.chars
Section 228
//LobsterMan (project.chars.LobsterMan)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class LobsterMan extends LivingObject {
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 32
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani6:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var movSpd:Number;// = 1.2
public function LobsterMan():void{
mrandom = Math.random;
sin = Math.sin;
cos = Math.cos;
movSpd = 1.2;
health = 32;
super();
frictionFactor = 0.7;
radius = 22;
mass = 1.4;
val = 30;
flyheight = 0;
waterdepth = 51;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(4);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 40));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
} else {
dispatchEvent(new SoundsEvent("soundEvent", 38));
};
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
pathArray = _arg1.pathfinder.getLine(this, target, _arg1, (radius - 1));
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
} else {
targSpd = 0;
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle(((rotation * dtr) + PI), _local2.y);
if ((((((((_local2.x < 60)) && ((_local2.x > 30)))) && ((_local2.y > -0.7)))) && ((_local2.y < 0.7)))){
gotoAndStop(3);
targSpd = 0;
};
rotation = (MathsStuff.interRotation((rotation * dtr), (targRot - (PI / 2)), 0.1) * rtd);
};
} else {
movSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
gotoAndStop(6);
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
if (((!((this.ani2 == null))) && ((this.ani2.currentFrame == 2)))){
dispatchEvent(new SoundsEvent("soundEvent", 34));
};
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if (this.ani3.currentFrame == 8){
dispatchEvent(new AttackEvent("useAttack", 11, this.ani3.dot, this));
dispatchEvent(new SoundsEvent("soundEvent", 36));
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
targetable = false;
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
this.ani4.nextFrame();
} else {
active = false;
};
};
} else {
if (currentFrame == 6){
targetable = false;
if (this.ani6 != null){
if (this.ani6.currentFrame < this.ani6.totalFrames){
if (this.ani6.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 20));
};
this.ani6.nextFrame();
} else {
gotoAndStop(1);
};
};
};
};
};
};
}
}
}//package project.chars
Section 229
//Mermaid (project.chars.Mermaid)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Mermaid extends LivingObject {
private const floor:Function;
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const ceil:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var tail:MovieClip;
public var health:Number;// = 52
public var shots:uint;// = 0
public var the_hitbox:MovieClip;
public var recoilTimer:uint;
private var pathArray:Array;
public var lastTarg:MovieClip;// = null
private var prot:Number;// = 0
public var phase:uint;// = 0
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
public var drotation:Number;// = 0
private var movSpd:Number;// = 0.9
public var moveTimer:uint;// = 150
public function Mermaid():void{
mrandom = Math.random;
ceil = Math.ceil;
sin = Math.sin;
cos = Math.cos;
floor = Math.floor;
movSpd = 0.9;
lastTarg = null;
health = 52;
drotation = 0;
moveTimer = 150;
phase = 0;
shots = 0;
prot = 0;
super();
frictionFactor = 0.85;
radius = 15;
mass = 4.2;
val = 60;
movSpd = 6;
flyheight = 0;
waterdepth = 51;
landbased = false;
recoilTimer = 0;
phase = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
if ((((currentFrame == 4)) && (!((this.ani4 == null))))){
this.ani4.gotoAndStop(11);
};
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
};
};
}
public function updateShooter(_arg1:MovieClip):void{
var _local2:AttackEvent;
if (_arg1.currentFrame < _arg1.totalFrames){
_arg1.nextFrame();
} else {
if (recoilTimer > 0){
recoilTimer--;
} else {
_arg1.gotoAndStop(1);
recoilTimer = (10 - floor(((mrandom() * (60 - health)) / 8)));
};
};
if (_arg1.currentFrame == 7){
_local2 = new AttackEvent("useAttack", 12, _arg1.dot);
dispatchEvent(_local2);
shots--;
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
var _local3:Number;
targSpd = 0;
drotation = rotation;
if (health > 0){
if (target.alive){
if (phase == 0){
lastTarg = _arg1.wpathfinder.randomClose(target, 2, 100, lastTarg);
pathArray = _arg1.wpathfinder.getLine(this, lastTarg, _arg1, (radius - 1));
phase = 1;
if (curTarg == null){
targSpd = 0;
} else {
phase = 1;
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
moveTimer = 100;
};
} else {
if (phase == 1){
if (moveTimer > 0){
moveTimer--;
} else {
phase = 0;
};
if ((((curTarg == null)) || (hitbox.hitTestObject(curTarg)))){
moveTimer = (moveTimer + 30);
if (pathArray.length > 0){
curTarg = pathArray.shift();
} else {
curTarg = target;
phase = 2;
moveTimer = 30;
};
};
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = MathsStuff.interRotationSmooth((rotation * dtr), (_local2.y - (PI / 2)), 0.1);
targSpd = movSpd;
rotation = (targRot * rtd);
};
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if ((((_arg1.theFrame == 11)) && (_arg1.gameEventArray[2]))){
if (phase > 1){
phase = 0;
};
};
if (this.ani4 != null){
if ((((((this.ani4.currentFrame > 1)) && ((this.ani4.currentFrame < 6)))) || ((((this.ani4.currentFrame > 13)) && ((this.ani4.currentFrame < 17)))))){
_local2 = _arg1.sc.globalToLocal(this.ani4.localToGlobal(new Point()));
_local3 = (mrandom() * PI);
_arg1.aniEffects.addSplash((_local2.x + (12 * sin(_local3))), (_local2.y + (12 * cos(_local3))), (mrandom() < 0.5), 0.6);
_local3 = (mrandom() * PI);
_arg1.aniEffects.addSplash((_local2.x + (8 * sin(_local3))), (_local2.y + (8 * cos(_local3))), (mrandom() < 0.5), 0.8);
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
if (phase == 2){
curTarg = null;
_local2 = MathsStuff.polarDistance(position, target.position);
targRot = _local2.y;
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle((rotation * dtr), _local2.y);
if ((((((((_local2.x < 600)) && ((_local2.x > 50)))) && ((_local2.y > -0.7)))) && ((_local2.y < 0.7)))){
gotoAndStop(4);
shots = (2 + floor((mrandom() * 2)));
targSpd = 0;
phase = 3;
};
_local2 = MathsStuff.polarDistance(position, target.position);
targRot = MathsStuff.interRotationSmooth((rotation * dtr), (_local2.y - (PI / 2)), 0.05);
rotation = (targRot * rtd);
if (moveTimer > 0){
moveTimer--;
} else {
gotoAndStop(4);
shots = (2 + floor((mrandom() * 2)));
targSpd = 0;
phase = 3;
};
} else {
if (phase == 3){
_local2 = MathsStuff.polarDistance(position, target.position);
targRot = MathsStuff.interRotationSmooth((rotation * dtr), (_local2.y - (PI / 2)), 0.1);
rotation = (targRot * rtd);
};
};
};
};
}
public function setMoreUp(_arg1:MovieClip, _arg2:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
tail = _arg2;
gotoAndStop(5);
tail.gotoAndStop(1);
tail.x = x;
tail.y = y;
tail.rotation = (drotation = rotation);
}
public function updAni():void{
var _local1:Point;
targetable = true;
if (health <= 0){
targetable = false;
};
tail.x = x;
tail.y = y;
if (currentFrame == 5){
tail.rotation = (MathsStuff.interRotationSmooth((tail.rotation * dtr), (drotation * dtr), 0.2, 20) * rtd);
} else {
tail.rotation = (MathsStuff.interRotationSmooth((tail.rotation * dtr), (drotation * dtr), 0.5, 20) * rtd);
};
if (currentFrame == 5){
if (spd > 0.2){
checkAndGo(tail, 2);
checkAndPlay(tail.ani2);
} else {
checkAndGo(tail, 1);
checkAndPlay(tail.ani1);
};
} else {
if (currentFrame == 4){
checkAndGo(tail, 3);
if (this.ani4 != null){
if (this.ani4.currentFrame < 8){
this.ani4.nextFrame();
} else {
if (this.ani4.currentFrame < 11){
if ((((health <= 0)) || ((((shots <= 0)) && ((this.ani4.shooter.currentFrame == 1)))))){
this.ani4.gotoAndStop(11);
};
} else {
if (this.ani4.currentFrame < 17){
this.ani4.nextFrame();
} else {
if (this.ani4.currentFrame == 17){
if (health <= 0){
this.ani4.gotoAndStop(30);
} else {
this.ani4.gotoAndStop(18);
};
} else {
if (this.ani4.currentFrame < 20){
this.ani4.nextFrame();
} else {
if (this.ani4.currentFrame == 20){
gotoAndStop(5);
phase = 0;
tail.gotoAndStop(1);
} else {
if (this.ani4.currentFrame < 37){
this.ani4.nextFrame();
} else {
if (this.ani4.currentFrame == 37){
active = false;
};
};
};
};
};
};
};
};
if (this.ani4 != null){
if (this.ani4.shooter != null){
updateShooter(this.ani4.shooter);
};
if (tail.ani3 != null){
tail.ani3.gotoAndStop(this.ani4.currentFrame);
};
};
};
} else {
if (currentFrame == 5){
targetable = false;
};
};
};
}
}
}//package project.chars
Section 230
//Merman (project.chars.Merman)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Merman extends LivingObject {
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const ceil:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 94
public var theFlyer:MovieClip;
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani6:MovieClip;
public var ani7:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var lTarg:MovieClip;
private var movSpd:Number;// = 7
public function Merman():void{
mrandom = Math.random;
ceil = Math.ceil;
sin = Math.sin;
cos = Math.cos;
movSpd = 7;
health = 94;
super();
frictionFactor = 0.8;
radius = 32;
mass = 5.2;
val = 75;
flyheight = 0;
waterdepth = 34;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(5);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 140));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
} else {
if (mrandom() < 0.2){
dispatchEvent(new SoundsEvent("soundEvent", 138));
};
};
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
pathArray = _arg1.pathfinder.getLine(this, target, _arg1, (radius - 1));
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
} else {
targSpd = 0;
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle(((rotation * dtr) + PI), _local2.y);
if ((((((((_local2.x < 80)) && ((_local2.x > 30)))) && ((_local2.y > -0.7)))) && ((_local2.y < 0.7)))){
gotoAndStop(3);
targSpd = 0;
} else {
if (_local2.x > 180){
gotoAndStop(4);
targSpd = 0;
};
};
rotation = (MathsStuff.interRotation((rotation * dtr), (targRot - (PI / 2)), 0.1) * rtd);
};
} else {
movSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
gotoAndStop(7);
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if (this.ani3.currentFrame == 4){
dispatchEvent(new SoundsEvent("soundEvent", 136));
};
if ((((this.ani3.currentFrame > 6)) && ((this.ani3.currentFrame < 11)))){
dispatchEvent(new AttackEvent("useAttack", 21, this.ani3.dot1, this));
dispatchEvent(new AttackEvent("useAttack", 21, this.ani3.dot2, this));
dispatchEvent(new AttackEvent("useAttack", 21, this.ani3.dot3, this));
dispatchEvent(new AttackEvent("useAttack", 21, this.ani3.dot4, this));
dispatchEvent(new AttackEvent("useAttack", 21, this.ani3.dot5, this));
dispatchEvent(new AttackEvent("useAttack", 21, this.ani3.dot6, this));
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
if (this.ani4.currentFrame == 24){
dispatchEvent(new SoundsEvent("soundEvent", 88));
};
if (this.ani4.currentFrame == 14){
dispatchEvent(new SoundsEvent("soundEvent", 136));
};
if (this.ani4.currentFrame == 40){
dispatchEvent(new AttackEvent("useAttack", 22, null, this));
};
this.ani4.nextFrame();
} else {
this.ani4.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 5){
targetable = false;
if (this.ani5 != null){
if (this.ani5.currentFrame < this.ani5.totalFrames){
this.ani5.nextFrame();
} else {
active = false;
};
};
} else {
if (currentFrame == 6){
targetable = false;
if (this.ani6 != null){
if (this.ani6.currentFrame < this.ani6.totalFrames){
this.ani6.nextFrame();
} else {
gotoAndStop(1);
};
};
} else {
if (currentFrame == 7){
targetable = false;
if (this.ani7 != null){
if (this.ani7.currentFrame < this.ani7.totalFrames){
if (this.ani7.currentFrame == 10){
dispatchEvent(new SoundsEvent("soundEvent", 134));
};
this.ani7.nextFrame();
} else {
gotoAndStop(1);
};
};
};
};
};
};
};
};
}
}
}//package project.chars
Section 231
//Octomage (project.chars.Octomage)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Octomage extends LivingObject {
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const ceil:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 158
public var theFlyer:MovieClip;
public var thoughtTimer:uint;
public var castTime:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
public var lastTarg:MovieClip;
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var movSpd:Number;// = 4
public function Octomage():void{
mrandom = Math.random;
ceil = Math.ceil;
sin = Math.sin;
cos = Math.cos;
movSpd = 4;
health = 158;
super();
frictionFactor = 0.5;
radius = 32;
mass = 9.2;
val = 125;
flyheight = 0;
waterdepth = 68;
landbased = true;
thoughtTimer = 0;
castTime = uint((mrandom() * 30));
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(4);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 148));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
} else {
if (mrandom() < 0.2){
dispatchEvent(new SoundsEvent("soundEvent", 146));
};
};
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
lastTarg = _arg1.pathfinder.randomClose(target, 3, 200, lastTarg);
pathArray = _arg1.pathfinder.getLine(this, lastTarg, _arg1, (radius - 1));
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
} else {
targSpd = 0;
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (castTime > 0){
castTime--;
} else {
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle(((rotation * dtr) + PI), _local2.y);
if (_local2.x < 400){
gotoAndStop(3);
targSpd = 0;
castTime = uint((((50 + health) * (mrandom() + 1)) / 2));
};
};
rotation = (MathsStuff.interRotation((rotation * dtr), (targRot - (PI / 2)), 0.4) * rtd);
};
} else {
movSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
gotoAndStop(5);
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if (this.ani3.currentFrame == 14){
dispatchEvent(new SoundsEvent("soundEvent", 144));
};
if (this.ani3.currentFrame == 24){
dispatchEvent(new SoundsEvent("soundEvent", 88));
};
if (this.ani3.currentFrame == 30){
dispatchEvent(new AttackEvent("useAttack", 23, null, this));
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
targetable = false;
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
this.ani4.nextFrame();
} else {
active = false;
};
};
} else {
if (currentFrame == 5){
targetable = false;
if (this.ani5 != null){
if (this.ani5.currentFrame < this.ani5.totalFrames){
if (this.ani5.currentFrame == 10){
dispatchEvent(new SoundsEvent("soundEvent", 142));
};
this.ani5.nextFrame();
} else {
gotoAndStop(1);
};
};
};
};
};
};
}
}
}//package project.chars
Section 232
//Piper (project.chars.Piper)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Piper extends LivingObject {
private const exp:Function;
private const rtd:Number = 57.2957795130823;
private const atan2:Function;
private const sin:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
private var pathGot:Boolean;
public var health:Number;// = 80
public var theFlyer:MovieClip;
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
private var lastTarg:MovieClip;
private var gunAP:uint;// = 0
public var target:MovieClip;
private var aimTime:uint;// = 0
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var movSpd:Number;// = 2.5
public function Piper():void{
mrandom = Math.random;
sin = Math.sin;
cos = Math.cos;
atan2 = Math.atan2;
exp = Math.exp;
movSpd = 2.5;
health = 80;
aimTime = 0;
gunAP = 0;
super();
frictionFactor = 0.8;
radius = 30;
mass = 1.2;
val = 80;
flyheight = 0;
waterdepth = 34;
landbased = true;
thoughtTimer = 0;
pathGot = false;
gunAP = uint((mrandom() * 100));
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(4);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 104));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
} else {
dispatchEvent(new SoundsEvent("soundEvent", 106));
};
};
}
public function rotateToGun(_arg1:Object, _arg2:Object):void{
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local3 = localToGlobal(new Point());
_local4 = _arg2.sc.localToGlobal(new Point(_arg1.x, _arg1.y));
_local6 = atan2((_local3.x - _local4.x), (_local4.y - _local3.y));
_local7 = (rotation * dtr);
rotation = (_local6 * rtd);
_local5 = (Point.distance(_local3, new Point(_arg2.mouX, _arg2.mouY)) * scaleX);
if (_local5 > 108){
rotation = (rotation + (4 * exp(((26 - _local5) / 200))));
} else {
rotation = (rotation + 4);
};
rotation = (MathsStuff.interRotationSmooth(_local7, (rotation * dtr), 0.1) * rtd);
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (aimTime > 1){
rotateToGun(target, _arg1);
targRot = ((rotation + 90) * dtr);
aimTime--;
} else {
if (aimTime > 0){
gotoAndStop(3);
aimTime = 0;
} else {
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
if (pathGot){
pathArray = _arg1.pathfinder.getLine(this, lastTarg, _arg1, (radius - 1));
} else {
lastTarg = _arg1.pathfinder.randomClose(target, 2, 200, lastTarg);
pathArray = _arg1.pathfinder.getLine(this, lastTarg, _arg1, (radius - 1));
pathGot = true;
};
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
};
};
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (aimTime == 0){
if (gunAP < (200 - uint((health / 2)))){
gunAP++;
};
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
if ((((((_local2.x > 120)) && ((_local2.x < 500)))) && ((gunAP > 100)))){
aimTime = (20 + uint((health / 4)));
targSpd = 0;
gunAP = (gunAP - 100);
pathGot = false;
};
rotation = ((MathsStuff.interRotationSmooth(((rotation + 90) * dtr), (targRot - PI), 0.05) * rtd) - 90);
};
};
} else {
movSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
gotoAndStop(5);
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
if (((!((this.ani2 == null))) && ((this.ani2.currentFrame == 2)))){
dispatchEvent(new SoundsEvent("soundEvent", 110));
};
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if (this.ani3.currentFrame == 12){
dispatchEvent(new SoundsEvent("soundEvent", 108));
};
if ((((((this.ani3.currentFrame == 20)) || ((this.ani3.currentFrame == 25)))) || ((this.ani3.currentFrame == 30)))){
dispatchEvent(new AttackEvent("useAttack", 19, this.ani3.dot, this));
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
targetable = false;
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
this.ani4.nextFrame();
} else {
active = false;
};
};
} else {
if (currentFrame == 5){
targetable = false;
if (this.ani5 != null){
if (this.ani5.currentFrame < this.ani5.totalFrames){
if (this.ani5.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 20));
};
this.ani5.nextFrame();
} else {
this.ani5.gotoAndStop(1);
gotoAndStop(1);
};
};
};
};
};
};
}
}
}//package project.chars
Section 233
//PirateBoss (project.chars.PirateBoss)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class PirateBoss extends LivingObject {
private const exp:Function;
private const rtd:Number = 57.2957795130823;
private const atan2:Function;
private const sin:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
private var spinning:Boolean;// = false
public var health:Number;// = 2000
public var theFlyer:MovieClip;
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
private var gunAP:uint;// = 0
public var target:MovieClip;
private var aimTime:uint;// = 0
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var lTarg:MovieClip;
private var spinAP:int;// = 40
private var movSpd:Number;// = 5.5
public function PirateBoss():void{
mrandom = Math.random;
sin = Math.sin;
cos = Math.cos;
atan2 = Math.atan2;
exp = Math.exp;
movSpd = 5.5;
health = 2000;
aimTime = 0;
gunAP = 0;
spinAP = 40;
spinning = false;
super();
frictionFactor = 0.1;
radius = 30;
mass = 5.2;
val = 1000;
flyheight = 0;
waterdepth = 34;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(5);
addUnflourish(x, y);
addUnflourish(x, y);
addUnflourish(x, y);
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
};
};
}
public function rotateToGun(_arg1:Object, _arg2:Object):void{
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local3 = localToGlobal(new Point());
_local4 = _arg2.sc.localToGlobal(new Point(_arg1.x, _arg1.y));
_local6 = atan2((_local3.x - _local4.x), (_local4.y - _local3.y));
_local7 = (rotation * dtr);
rotation = (_local6 * rtd);
_local5 = (Point.distance(_local3, new Point(_arg2.mouX, _arg2.mouY)) * scaleX);
if (_local5 > 108){
rotation = (rotation - (8 * exp(((88 - _local5) / 200))));
} else {
rotation = (rotation - 8);
};
rotation = (MathsStuff.interRotationSmooth(_local7, (rotation * dtr), 1) * rtd);
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (aimTime > 1){
rotateToGun(target, _arg1);
targRot = ((rotation + 90) * dtr);
aimTime--;
} else {
if (aimTime > 0){
gotoAndStop(3);
aimTime = 0;
} else {
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
pathArray = _arg1.pathfinder.getLine(this, target, _arg1, (radius - 1));
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
};
};
} else {
if (currentFrame == 4){
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
pathArray = _arg1.pathfinder.getLine(this, target, _arg1, (radius - 1));
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = (movSpd * 0.7);
};
} else {
targSpd = 0;
};
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (aimTime == 0){
if (gunAP < (300 - uint((health / 10)))){
gunAP++;
};
if (spinAP < 140){
spinAP++;
};
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
if ((((((_local2.x > 120)) && ((_local2.x < 500)))) && ((gunAP > 100)))){
aimTime = (10 + uint((health / 80)));
targSpd = 0;
gunAP = (gunAP - 100);
} else {
if ((((((_local2.x > 60)) && ((_local2.x < 200)))) && ((spinAP > 80)))){
spinning = true;
spinAP = (spinAP + (health / 80));
gotoAndStop(4);
};
};
rotation = ((MathsStuff.interRotationSmooth(((rotation + 90) * dtr), targRot, 0.2) * rtd) - 90);
};
};
} else {
targSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
gotoAndStop(1);
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
if (((!((this.ani2 == null))) && ((this.ani2.currentFrame == 2)))){
};
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if (this.ani3.currentFrame == 6){
dispatchEvent(new SoundsEvent("soundEvent", 56));
} else {
if (this.ani3.currentFrame == 12){
dispatchEvent(new AttackEvent("useAttack", 15, this.ani3.dot, this));
};
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
if (this.ani4.currentFrame > 11){
if (this.ani4.currentFrame < 24){
rotation = (rotation - 21);
} else {
if (this.ani4.currentFrame == 24){
targRot = ((rotation + 90) * dtr);
};
};
};
if (this.ani4.currentFrame == 18){
if (spinAP > 0){
spinAP = (spinAP - 2);
dispatchEvent(new AttackEvent("useAttack", 16, this.ani4.dot1, this));
dispatchEvent(new AttackEvent("useAttack", 16, this.ani4.dot2, this));
dispatchEvent(new AttackEvent("useAttack", 16, this.ani4.dot3, this));
dispatchEvent(new AttackEvent("useAttack", 16, this.ani4.dot4, this));
} else {
spinning = false;
spinAP = 0;
this.ani4.nextFrame();
};
} else {
this.ani4.nextFrame();
};
} else {
this.ani4.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 5){
targetable = false;
if (this.ani5 != null){
if (this.ani5.currentFrame < this.ani5.totalFrames){
if ((((((this.ani5.currentFrame == 10)) || ((this.ani5.currentFrame == 20)))) || ((this.ani5.currentFrame == 28)))){
dispatchEvent(new SoundsEvent("soundEvent", 78));
} else {
if (this.ani5.currentFrame == 40){
dispatchEvent(new SoundsEvent("soundEvent", 80));
};
};
this.ani5.nextFrame();
} else {
active = false;
};
};
};
};
};
};
}
}
}//package project.chars
Section 234
//Player (project.chars.Player)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Player extends LivingObject {
private const exp:Function;
private const rtd:Number = 57.2957795130823;
private const atan2:Function;
private const ceil:Function;
private const mrandom:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
private var gunSpd:Number;// = 0.5
public var alive:Boolean;// = true
private var ammoCount:uint;
public var the_hitbox:MovieClip;
public var bHead:MovieClip;
public var bLegs:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani6:MovieClip;
public var ani7:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var movSpd:Number;// = 9
public function Player():void{
mrandom = Math.random;
ceil = Math.ceil;
atan2 = Math.atan2;
exp = Math.exp;
movSpd = 9;
gunSpd = 0.5;
alive = true;
super();
frictionFactor = 0.6;
radius = 20;
mass = 4;
bashTimeMax = 20;
flyheight = 0;
waterdepth = 51;
landbased = true;
alive = true;
bashMe = function (_arg1:Number):void{
dispatchEvent(new HealthEvent("hurt", _arg1));
};
}
public function rotateToGun(_arg1:Object):void{
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = localToGlobal(new Point());
_local4 = atan2((_arg1.mouX - _local2.x), (_local2.y - _arg1.mouY));
_local5 = (rotation * dtr);
rotation = (_local4 * rtd);
_local3 = (Point.distance(_local2, new Point(_arg1.mouX, _arg1.mouY)) * scaleX);
switch (currentFrame){
case 1:
if (_local3 > 108){
rotation = (rotation + (11 * exp(((108 - _local3) / 200))));
} else {
rotation = (rotation + 11);
};
gunSpd = 0.5;
break;
case 2:
if (_local3 > 80){
rotation = (rotation + (7 * exp(((80 - _local3) / 200))));
} else {
rotation = (rotation + 7);
};
gunSpd = 0.3;
break;
case 3:
if (_local3 > 70){
rotation = (rotation - (4 * exp(((70 - _local3) / 200))));
} else {
rotation = (rotation - 4);
};
gunSpd = 0.3;
break;
case 4:
if (_local3 > 85){
rotation = (rotation + (4 * exp(((85 - _local3) / 200))));
} else {
rotation = (rotation + 4);
};
gunSpd = 0.2;
break;
case 5:
if (_local3 > 80){
rotation = (rotation + (5 * exp(((80 - _local3) / 200))));
} else {
rotation = (rotation + 5);
};
gunSpd = 0.6;
break;
case 6:
if (_local3 > 115){
rotation = (rotation + (4.5 * exp(((115 - _local3) / 200))));
} else {
rotation = (rotation + 4.5);
};
gunSpd = 0.8;
break;
case 7:
if (_local3 > 100){
rotation = (rotation + -(exp(((100 - _local3) / 200))));
} else {
rotation = (rotation + -1);
};
gunSpd = 0.5;
break;
};
rotation = (MathsStuff.interRotationSmooth(_local5, (rotation * dtr), gunSpd) * rtd);
}
public function addKick():void{
if (((alive) && ((bLegs.currentFrame < 3)))){
bLegs.rotation = rotation;
bLegs.gotoAndStop(4);
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
var _local3:Number;
if (alive){
if ((((((_arg1.dirX == 0)) && ((_arg1.dirY == 0)))) || ((bLegs.currentFrame == 3)))){
targSpd = 0;
} else {
targSpd = movSpd;
targRot = atan2(_arg1.dirY, _arg1.dirX);
};
};
updMe(_arg1);
if (alive){
if ((((((((_arg1.theFrame == 12)) || ((_arg1.theFrame == 15)))) || ((_arg1.theFrame == 18)))) || ((_arg1.theFrame == 19)))){
if ((((this.bLegs.currentFrame == 2)) && (!((this.bLegs.aniRun == null))))){
_local2 = _arg1.sc.globalToLocal(this.bLegs.aniRun.footPad.localToGlobal(new Point()));
if (_arg1.terrainMap.getTerrainType(_local2.x, _local2.y, true).terrain == "water"){
if ((((this.bLegs.aniRun.currentFrame == 6)) || ((this.bLegs.aniRun.currentFrame == 14)))){
_arg1.aniEffects.addSplash(_local2.x, _local2.y, (mrandom() < 0.5), 0.6);
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
};
};
bHead.x = x;
bHead.y = y;
bHead.scaleX = scaleX;
bHead.scaleY = scaleY;
bLegs.x = x;
bLegs.y = y;
bLegs.scaleX = scaleX;
bLegs.scaleY = scaleY;
updateGun(_arg1);
rotateToGun(_arg1);
if (bLegs.currentFrame < 3){
bLegs.rotation = (MathsStuff.interRotationSmooth((bLegs.rotation / rtd), (PI - rot), 0.4) * rtd);
};
_local3 = MathsStuff.interRotationSmooth((rotation / rtd), (bLegs.rotation / rtd), 0.2);
bHead.rotation = (MathsStuff.interRotation((bHead.rotation / rtd), _local3, 0.3) * rtd);
};
}
public function updateGun(_arg1:Object):void{
var _local2:MovieClip;
var _local3:AttackEvent;
var _local4:Point;
var _local5:Point;
var _local6:Point;
if (currentFrame != _arg1.gunType){
gotoAndStop(_arg1.gunType);
};
if (((_arg1.gunPressed) && (!(_arg1.gunAmmo)))){
dispatchEvent(new SoundsEvent("soundEvent", 48));
};
if ((((currentFrame == 1)) && (!((this.ani1 == null))))){
_local2 = this.ani1;
if ((((((_local2.currentFrame == 1)) && (_arg1.gunPressed))) || ((((_local2.currentFrame > 5)) && (_arg1.gunPressed))))){
_local3 = new AttackEvent("useAttack", 1, _local2.dot);
dispatchEvent(_local3);
_local2.gotoAndStop(2);
} else {
if ((((_local2.currentFrame > 1)) && ((_local2.currentFrame < _local2.totalFrames)))){
if (_local2.currentFrame == 3){
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, 0)));
_local5 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, -3)));
_local6 = MathsStuff.polarDistance(_local4, _local5);
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 1);
};
_local2.nextFrame();
} else {
_local2.gotoAndStop(1);
};
};
} else {
if ((((currentFrame == 2)) && (!((this.ani2 == null))))){
_local2 = this.ani2;
if (_local2.currentFrame == 1){
if (!_arg1.gunAmmo){
_local2.gotoAndStop(8);
} else {
if (_arg1.gunDown){
_local2.gotoAndStop(2);
};
};
} else {
if (_local2.currentFrame == 3){
_local3 = new AttackEvent("useAttack", 2, _local2.dot);
dispatchEvent(_local3);
_local2.nextFrame();
} else {
if ((((_local2.currentFrame == 4)) && (!(_arg1.gunAmmo)))){
gotoAndStop(8);
} else {
if (_local2.currentFrame < 7){
_local2.nextFrame();
_local4 = _arg1.sc.globalToLocal(_local2.steam.localToGlobal(new Point(0, 0)));
_local5 = _arg1.sc.globalToLocal(_local2.steam.localToGlobal(new Point(0, -3)));
_arg1.aniEffects.addSteamCloud(_local4.x, _local4.y, (_local5.x - _local4.x), (_local5.y - _local4.y));
if (_local2.currentFrame == 7){
dispatchEvent(new SoundsEvent("soundEvent", 44));
};
} else {
if (_local2.currentFrame < 8){
_local2.gotoAndStop(1);
} else {
if (_arg1.gunAmmo){
_local2.gotoAndStop(1);
};
};
};
};
};
};
} else {
if ((((currentFrame == 3)) && (!((this.ani3 == null))))){
_local2 = this.ani3;
if (_local2.currentFrame == 1){
if (((_arg1.gunDown) && (_arg1.gunAmmo))){
_local3 = new AttackEvent("useAttack", 3, _local2.dot);
dispatchEvent(_local3);
_local2.gotoAndStop(2);
};
} else {
if (_local2.currentFrame == 4){
if (((_arg1.gunDown) && (_arg1.gunAmmo))){
_local3 = new AttackEvent("useAttack", 3, _local2.dot);
dispatchEvent(_local3);
_local2.gotoAndStop(5);
};
} else {
if (_local2.currentFrame < _local2.totalFrames){
if ((((_local2.currentFrame == 3)) || ((_local2.currentFrame == 5)))){
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, 0)));
_local5 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, -6)));
_local6 = MathsStuff.polarDistance(_local4, _local5);
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 2);
};
_local2.nextFrame();
} else {
_local2.gotoAndStop(1);
};
};
};
} else {
if ((((currentFrame == 4)) && (!((this.ani4 == null))))){
_local2 = this.ani4;
if (_local2.currentFrame == 1){
if (((_arg1.gunDown) && (_arg1.gunAmmo))){
ammoCount = 1;
_local3 = new AttackEvent("useAttack", 4, _local2.dot);
dispatchEvent(_local3);
_local2.nextFrame();
};
} else {
if (_local2.currentFrame == 3){
if (_arg1.gunAmmo){
ammoCount = 2;
_local3 = new AttackEvent("useAttack", 4, _local2.dot);
dispatchEvent(_local3);
};
_local2.nextFrame();
} else {
if (_local2.currentFrame == 5){
if (_arg1.gunAmmo){
ammoCount = 3;
_local3 = new AttackEvent("useAttack", 4, _local2.dot);
dispatchEvent(_local3);
};
_local2.nextFrame();
} else {
if (_local2.currentFrame < _local2.totalFrames){
if ((((((((_local2.currentFrame == 10)) && ((ammoCount > 0)))) || ((((_local2.currentFrame == 11)) && ((ammoCount > 2)))))) || ((((_local2.currentFrame == 12)) && ((ammoCount > 1)))))){
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, 0)));
_local5 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, -7)));
_local6 = MathsStuff.polarDistance(_local4, _local5);
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 4);
};
_local2.nextFrame();
} else {
_local2.gotoAndStop(1);
};
};
};
};
} else {
if ((((currentFrame == 5)) && (!((this.ani5 == null))))){
_local2 = this.ani5;
if ((((_local2.currentFrame == 1)) || ((_local2.currentFrame > 9)))){
if (!_arg1.gunAmmo){
_local2.gotoAndStop(13);
} else {
if (_arg1.gunPressed){
_local2.gotoAndStop(2);
};
};
} else {
if (_local2.currentFrame == 4){
_local3 = new AttackEvent("useAttack", 5, _local2.dot);
dispatchEvent(_local3);
_local2.nextFrame();
} else {
if ((((_local2.currentFrame == 5)) && (!(_arg1.gunAmmo)))){
_local2.gotoAndStop(13);
} else {
if (_local2.currentFrame < 12){
_local2.nextFrame();
} else {
if (_local2.currentFrame < 13){
_local2.gotoAndStop(1);
} else {
if (_arg1.gunAmmo){
_local2.gotoAndStop(1);
};
};
};
};
};
};
} else {
if ((((currentFrame == 6)) && (!((this.ani6 == null))))){
_local2 = this.ani6;
if (_local2.currentFrame == 1){
if (((_arg1.gunDown) && (_arg1.gunAmmo))){
_local2.gotoAndStop(2);
_local3 = new AttackEvent("useAttack", 6, _local2.dot);
if (_arg1.gunAmmo){
dispatchEvent(_local3);
};
};
} else {
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, 0)));
_local5 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, -8)));
_local6 = MathsStuff.polarDistance(_local4, _local5);
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 4);
_local2.gotoAndStop(1);
};
} else {
if ((((currentFrame == 7)) && (!((this.ani7 == null))))){
_local2 = this.ani7;
if (_local2.currentFrame == 1){
if (((_arg1.gunPressed) && (_arg1.gunAmmo))){
_local2.gotoAndStop(2);
_local3 = new AttackEvent("useAttack", 7, _local2.dot);
dispatchEvent(_local3);
ammoCount = 1;
if (_arg1.gunAmmoCount > 1){
_local3 = new AttackEvent("useAttack", 8, _local2.dot2);
dispatchEvent(_local3);
ammoCount = 2;
};
if (_arg1.gunAmmoCount > 2){
_local3 = new AttackEvent("useAttack", 8, _local2.dot3);
dispatchEvent(_local3);
ammoCount = 3;
};
};
} else {
if (_local2.currentFrame < _local2.totalFrames){
if (_local2.currentFrame == 4){
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, 0)));
_local5 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, -4)));
_local6 = MathsStuff.polarDistance(_local4, _local5);
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, 4)));
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 5);
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(0, -4)));
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 6);
if (ammoCount > 1){
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(2, 1)));
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 5);
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(2, -6)));
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 6);
};
if (ammoCount > 2){
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(5, 6)));
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 5);
_local4 = _arg1.sc.globalToLocal(_local2.shell.localToGlobal(new Point(5, -1)));
_arg1.aniEffects.addShell(_local4.x, _local4.y, _local6.y, _local6.x, 6);
};
};
_local2.nextFrame();
} else {
_local2.gotoAndStop(1);
};
};
};
};
};
};
};
};
};
bHead.transform.colorTransform = transform.colorTransform;
bLegs.transform.colorTransform = transform.colorTransform;
}
public function setMoreUp(_arg1:MovieClip, _arg2:MovieClip):void{
bHead = _arg1;
bLegs = _arg2;
}
public function updAni():void{
if (alive){
if (bLegs.currentFrame == 4){
if (bLegs.ani4 != null){
if (bLegs.ani4.currentFrame < bLegs.ani4.totalFrames){
if ((((bLegs.ani4.currentFrame == 1)) || ((bLegs.ani4.currentFrame == 3)))){
dispatchEvent(new AttackEvent("useAttack", 9, bLegs.ani4.dot, this));
};
bLegs.ani4.nextFrame();
} else {
bLegs.ani4.gotoAndStop(1);
bLegs.gotoAndStop(1);
};
};
} else {
if (spd > 1){
checkAndGo(bLegs, 2);
checkAndPlay(bLegs.aniRun);
} else {
checkAndGo(bLegs, 1);
};
};
} else {
visible = false;
bHead.visible = false;
checkAndGo(bLegs, 3);
checkAndPlay(bLegs.aniDie, false);
targetable = false;
};
}
}
}//package project.chars
Section 235
//Shadow (project.chars.Shadow)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Shadow extends LivingObject {
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 10
private var soundTime:uint;// = 10
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani6:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var movSpd:Number;// = 1.2
public function Shadow():void{
mrandom = Math.random;
sin = Math.sin;
cos = Math.cos;
movSpd = 1.2;
health = 10;
soundTime = 10;
super();
frictionFactor = 0.8;
radius = 22;
mass = 0.8;
val = 3;
flyheight = 0;
waterdepth = 51;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(4);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 98));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
};
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (soundTime > 0){
soundTime--;
} else {
dispatchEvent(new SoundsEvent("soundEvent", 96));
soundTime = 48;
};
if (currentFrame < 3){
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
pathArray = _arg1.pathfinder.getLine(this, target, _arg1, (radius - 1));
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
} else {
targSpd = 0;
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle(((rotation * dtr) + PI), _local2.y);
if ((((((((_local2.x < 60)) && ((_local2.x > 30)))) && ((_local2.y > -0.7)))) && ((_local2.y < 0.7)))){
gotoAndStop(3);
targSpd = 0;
};
rotation = (MathsStuff.interRotation((rotation * dtr), (targRot - (PI / 2)), 0.1) * rtd);
};
} else {
movSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
dispatchEvent(new SoundsEvent("soundEvent", 100));
gotoAndStop(6);
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
if (((!((this.ani2 == null))) && ((this.ani2.currentFrame == 2)))){
};
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
if (this.ani3 != null){
if (this.ani3.currentFrame < this.ani3.totalFrames){
if ((((this.ani3.currentFrame > 7)) && ((this.ani3.currentFrame < 10)))){
dispatchEvent(new AttackEvent("useAttack", 18, this.ani3.dot, this));
};
this.ani3.nextFrame();
} else {
this.ani3.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 4){
targetable = false;
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
this.ani4.nextFrame();
} else {
active = false;
};
};
} else {
if (currentFrame == 6){
targetable = false;
if (this.ani6 != null){
if (this.ani6.currentFrame < this.ani6.totalFrames){
if (this.ani6.currentFrame == 2){
};
this.ani6.nextFrame();
} else {
gotoAndStop(1);
};
};
};
};
};
};
}
}
}//package project.chars
Section 236
//Skeleton (project.chars.Skeleton)
package project.chars {
import flash.geom.*;
import flash.display.*;
import project.myevents.*;
import project.tools.*;
public class Skeleton extends LivingObject {
private const rtd:Number = 57.2957795130823;
private const sin:Function;
private const ceil:Function;
private const mrandom:Function;
private const cos:Function;
private const dtr:Number = 0.0174532925199433;
private const PI:Number = 3.14159265358979;
public var health:Number;// = 54
public var theFlyer:MovieClip;
public var thoughtTimer:uint;
public var the_hitbox:MovieClip;
private var pathArray:Array;
public var target:MovieClip;
public var curTarg:MovieClip;
public var ani1:MovieClip;
public var ani2:MovieClip;
public var ani5:MovieClip;
public var ani6:MovieClip;
public var ani3:MovieClip;
public var ani4:MovieClip;
private var lTarg:MovieClip;
private var movSpd:Number;// = 6
public function Skeleton():void{
mrandom = Math.random;
ceil = Math.ceil;
sin = Math.sin;
cos = Math.cos;
movSpd = 6;
health = 54;
super();
frictionFactor = 0.9;
radius = 22;
mass = 2.2;
val = 45;
flyheight = 0;
waterdepth = 34;
landbased = true;
thoughtTimer = 0;
bashMe = function (_arg1:Number):void{
health = (health - _arg1);
if (health <= 0){
health = 0;
thoughtTimer = 0;
gotoAndStop(5);
addUnflourish(x, y);
dispatchEvent(new SoundsEvent("soundEvent", 22));
dispatchEvent(new SoundsEvent("soundEvent", 74));
dispatchEvent(new DefeatEvent("defeatEvent", x, y, val));
} else {
if (mrandom() < 0.2){
dispatchEvent(new SoundsEvent("soundEvent", 72));
};
};
};
}
public function upd(_arg1:Object):void{
var _local2:Point;
targSpd = 0;
if (health > 0){
if (target.alive){
if (currentFrame < 3){
if (handleTerrain((cos(targRot) * 20), (sin(targRot) * 20), 0, 0, _arg1)){
thoughtTimer = 0;
};
if (curTarg == null){
thoughtTimer = 0;
} else {
if (hitbox.hitTestObject(curTarg)){
thoughtTimer = 0;
};
};
if (thoughtTimer > 0){
thoughtTimer--;
} else {
pathArray = _arg1.pathfinder.getLine(this, target, _arg1, (radius - 1));
if (pathArray.length > 1){
curTarg = Pathfinder.nextNode(this, pathArray);
} else {
curTarg = null;
};
thoughtTimer = (15 + uint((mrandom() * 20)));
};
if (curTarg == null){
targSpd = 0;
} else {
_local2 = MathsStuff.polarDistance(position, new Point(curTarg.x, curTarg.y));
targRot = (_local2.y - (PI / 2));
targSpd = movSpd;
};
} else {
targSpd = 0;
};
};
};
updMe(_arg1);
if (health > 0){
if (target.alive){
if (_arg1.theFrame == 12){
if (this.ani2 != null){
_local2 = _arg1.sc.globalToLocal(this.ani2.footPad.localToGlobal(new Point()));
if (_arg1.terrainMap.getTerrainType(_local2.x, _local2.y).terrain == "water"){
if ((((this.ani2.currentFrame == 6)) || ((this.ani2.currentFrame == 12)))){
_arg1.aniEffects.addSplash(_local2.x, _local2.y, (mrandom() < 0.5), 0.6);
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
};
};
if (currentFrame < 3){
_local2 = MathsStuff.polarDistance(position, target.position);
_local2.y = MathsStuff.getAngle(((rotation * dtr) + PI), _local2.y);
if ((((((((_local2.x < 80)) && ((_local2.x > 30)))) && ((_local2.y > -0.7)))) && ((_local2.y < 0.7)))){
gotoAndStop(4);
targSpd = 0;
};
rotation = (MathsStuff.interRotation((rotation * dtr), (targRot - (PI / 2)), 0.1) * rtd);
};
} else {
movSpd = 0;
gotoAndStop(1);
};
};
}
public function setMoreUp(_arg1:MovieClip, _arg2:MovieClip){
target = _arg1;
curTarg = null;
pathArray = null;
theFlyer = _arg2;
theFlyer.visible = false;
gotoAndStop(6);
}
public function updAni():void{
targetable = true;
if (currentFrame < 3){
if (spd > 0.2){
checkAndGo(this, 2);
checkAndPlay(this.ani2);
if (((!((this.ani2 == null))) && ((((this.ani2.currentFrame == 6)) || ((this.ani2.currentFrame == 12)))))){
dispatchEvent(new SoundsEvent("soundEvent", 68));
};
} else {
checkAndGo(this, 1);
checkAndPlay(this.ani1);
};
} else {
if (currentFrame == 3){
} else {
if (currentFrame == 4){
if (this.ani4 != null){
if (this.ani4.currentFrame < this.ani4.totalFrames){
if (this.ani4.currentFrame == 6){
dispatchEvent(new SoundsEvent("soundEvent", 70));
} else {
if (this.ani4.currentFrame == 7){
if (mrandom() < 0.3){
dispatchEvent(new SoundsEvent("soundEvent", 72));
};
dispatchEvent(new AttackEvent("useAttack", 13, this.ani4.dot, this));
} else {
if (this.ani4.currentFrame == 8){
dispatchEvent(new AttackEvent("useAttack", 14, this.ani4.dot, this));
};
};
};
this.ani4.nextFrame();
} else {
this.ani4.gotoAndStop(1);
gotoAndStop(1);
};
};
} else {
if (currentFrame == 5){
targetable = false;
if (this.ani5 != null){
if (this.ani5.currentFrame < this.ani5.totalFrames){
this.ani5.nextFrame();
} else {
active = false;
};
};
} else {
if (currentFrame == 6){
targetable = false;
if (this.ani6 != null){
if (this.ani6.currentFrame < this.ani6.totalFrames){
if (this.ani6.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 20));
};
this.ani6.nextFrame();
} else {
gotoAndStop(1);
};
};
};
};
};
};
};
}
}
}//package project.chars
Section 237
//AniEffects (project.effects.AniEffects)
package project.effects {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
public class AniEffects extends EventDispatcher {
private const ceil:Function;
private const floor:Function;
private const cos:Function;
private const atan2:Function;
private const sin:Function;
private const rtd:Number = 57.2957795130823;
private const mrandom:Function;
private const PI:Number = 3.14159265358979;
private var ides:Array;
private var repBase:MovieClip;
private var decalEffects:DecalEffects;
private var bounds:Rectangle;
private var playArea:MovieClip;
private var repMid:MovieClip;
private var repWater:MovieClip;
private var tp:Point;
private var repTop:MovieClip;
public function AniEffects(_arg1:MovieClip, _arg2:MovieClip, _arg3:MovieClip, _arg4:MovieClip, _arg5:MovieClip, _arg6:DecalEffects, _arg7:Rectangle):void{
mrandom = Math.random;
ceil = Math.ceil;
floor = Math.floor;
sin = Math.sin;
cos = Math.cos;
atan2 = Math.atan2;
super();
repTop = _arg1;
repMid = _arg2;
repBase = _arg3;
repWater = _arg4;
playArea = _arg5;
decalEffects = _arg6;
bounds = _arg7;
ides = new Array();
}
public function addMoveSplort(_arg1:Number, _arg2:Number){
var clip:MoveSplort;
var vx = _arg1;
var vy = _arg2;
clip = new MoveSplort();
clip.x = vx;
clip.y = vy;
clip.scaleX = (0.9 + (mrandom() / 4));
clip.scaleY = clip.scaleX;
clip.alpha = (0.5 + (mrandom() / 2));
clip.scaleSpd = (0.01 * (1 + mrandom()));
clip.active = true;
clip.holder = repBase;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
clip.scaleX = (clip.scaleX + clip.scaleSpd);
clip.scaleY = clip.scaleX;
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addShell(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:uint=1){
var clip:ShellsClip;
var vx = _arg1;
var vy = _arg2;
var vrot = _arg3;
var vspd = _arg4;
var vtype = _arg5;
clip = new ShellsClip();
clip.x = vx;
clip.y = vy;
clip.z = 204;
clip.gotoAndStop(vtype);
clip.rotation = (((vrot - (PI / 2)) - (0.5 + mrandom())) * rtd);
clip.scaleX = (clip.scaleY = (0.4 + (clip.z / 800)));
clip.spdX = ((vspd * sin(vrot)) * (0.5 + mrandom()));
clip.spdY = ((vspd * -(cos(vrot))) * (0.5 + mrandom()));
clip.spdR = (10 + (mrandom() * 20));
clip.spdZ = 17;
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
_local4 = true;
clip.spdZ = (clip.spdZ - 6);
clip.x = (clip.x + clip.spdX);
clip.y = (clip.y + clip.spdY);
clip.z = (clip.z + clip.spdZ);
clip.scaleX = (clip.scaleY = (0.4 + (clip.z / 800)));
clip.rotation = (clip.rotation + clip.spdR);
_local2 = _arg1.terrainMap.getTerrainType(clip.x, clip.y);
if ((((_local2.terrain == "water")) && ((clip.z < 17)))){
addSplash(clip.x, clip.y, true, (0.3 + (mrandom() * 0.1)));
decalEffects.addDecal(clip, "water");
dispatchEvent(new SoundsEvent("soundEvent", 16));
clip.active = false;
} else {
if ((((_local2.terrain == "air")) && ((clip.z < _arg1.terrainMap.getTerrainHeight(clip.x, clip.y))))){
decalEffects.addDecal(clip, "base");
dispatchEvent(new SoundsEvent("soundEvent", 14));
clip.active = false;
} else {
if (clip.z < 0){
clip.active = false;
};
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addPercentage(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:uint=10, _arg5=0.9){
var clip:MessageClip2;
var vx = _arg1;
var vy = _arg2;
var vval = _arg3;
var vlive = _arg4;
var valpha = _arg5;
clip = new MessageClip2();
clip.x = vx;
clip.y = vy;
clip.alpha = valpha;
clip.life = vlive;
clip.content = (String(uint((vval * 100))) + "%");
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
clip.scaleX = (clip.scaleY = (clip.scaleX + 0.04));
clip.alpha = (clip.alpha - 0.02);
if (clip.currentFrame == 1){
clip.message.messageText.text = clip.content;
clip.shadow.messageText.text = clip.content;
clip.nextFrame();
} else {
if (clip.currentFrame < 5){
clip.nextFrame();
} else {
if (clip.currentFrame == 5){
if (clip.life > 0){
clip.life--;
} else {
clip.gotoAndStop(6);
};
} else {
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
clip.active = false;
};
};
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addFlame(_arg1:Number, _arg2:Number){
var clip:FlameEffect;
var vx = _arg1;
var vy = _arg2;
clip = new FlameEffect();
clip.rad = (18 * mrandom());
clip.ang = ((2 * PI) * mrandom());
clip.x = (vx + (clip.rad * sin(clip.ang)));
clip.y = (vy - (clip.rad * cos(clip.ang)));
clip.spdX = (((1 + mrandom()) * clip.rad) / 50);
clip.spdY = (((1 + mrandom()) * clip.rad) / 50);
clip.scaleX = (0.3 + (mrandom() / 4));
clip.scaleY = clip.scaleX;
clip.rotation = (clip.ang * rtd);
clip.scaleSpd = (0.02 + ((mrandom() * clip.rad) / 280));
clip.gotoAndStop(((ceil((mrandom() * 2)) * 20) - 19));
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
if (Boolean((clip.currentFrame % 20))){
clip.scaleX = (clip.scaleX + clip.scaleSpd);
clip.scaleY = (clip.scaleY + clip.scaleSpd);
clip.x = (clip.x + clip.spdX);
clip.y = (clip.y + clip.spdY);
clip.nextFrame();
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function fadeMeOut(_arg1:MovieClip, _arg2:Boolean=false):void{
var clip:MovieClip;
var clipData:BitmapData;
var clipBitmap:Bitmap;
var clipMatrix:Matrix;
var clipRect:Rectangle;
var vc = _arg1;
var vwater = _arg2;
clipRect = vc.getBounds(vc.holder);
try {
clip = new MovieClip();
vc.oldx = vc.x;
vc.oldy = vc.y;
vc.x = (vc.oldx - clipRect.left);
vc.y = (vc.oldy - clipRect.top);
clipData = new BitmapData(clipRect.width, clipRect.height, true, 0);
clipBitmap = new Bitmap(clipData);
clipBitmap.x = clipRect.left;
clipBitmap.y = clipRect.top;
clipMatrix = vc.transform.matrix;
clip.bitmapData = clipData;
clip.bitmap = clipBitmap;
clip.addChild(clipBitmap);
clipData.draw(vc, clipMatrix);
clip.aliveTime = 100;
clip.active = true;
if (vwater){
clip.holder = repWater;
} else {
clip.holder = repBase;
};
clip.upd = function (_arg1:Object):void{
if (clip.aliveTime > 0){
if (clip.aliveTime < 30){
clip.alpha = (clip.aliveTime / 30);
} else {
if (clip.aliveTime < 60){
clip.transform.colorTransform = new ColorTransform((clip.aliveTime / 60), (clip.aliveTime / 60), (clip.aliveTime / 60), 1, (clip.aliveTime - 60), (clip.aliveTime - 60), (clip.aliveTime - 60), 0);
};
};
clip.aliveTime = (clip.aliveTime - 2);
} else {
clip.bitmapData.dispose();
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
} catch(e:ArgumentError) {
};
}
public function addEnergyBall(_arg1:Number, _arg2:Number, _arg3:MovieClip, _arg4:Number=20){
var clip:MovieClip;
var vx = _arg1;
var vy = _arg2;
var vtarg = _arg3;
var vval = _arg4;
clip = new EnergyFlyer();
clip.stop();
clip.x = vx;
clip.y = vy;
clip.ang = atan2((vtarg.x - vx), (vy - vtarg.y));
clip.dx = sin(clip.ang);
clip.dy = -(cos(clip.ang));
clip.spd = 6;
clip.val = vval;
clip.targ = vtarg;
clip.flying = true;
clip.rspd = (30 - (60 * mrandom()));
clip.rotation = ((clip.ang * 180) / PI);
clip.ball.rotation = (mrandom() * 360);
clip.tail.scaleY = (clip.spd / 10);
clip.scaleX = (clip.scaleY = (0.8 + (vval / 1000)));
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
clip.ball.rotation = (clip.ball.rotation + clip.rspd);
if (clip.flying){
if (clip.spd < 30){
clip.spd = (clip.spd + 4);
};
clip.tail.scaleY = (clip.spd / 20);
clip.x = (clip.x + (clip.dx * clip.spd));
clip.y = (clip.y + (clip.dy * clip.spd));
tp = clip.localToGlobal(new Point());
if (clip.targ.hitTestPoint(tp.x, tp.y, true)){
dispatchEvent(new DefeatEvent("ballAbsorb", clip.x, clip.y, clip.val, clip.targ));
clip.flying = false;
};
} else {
clip.tail.scaleY = (clip.tail.scaleY * 0.07);
if (clip.alpha > 0){
clip.alpha = (clip.alpha - 0.05);
clip.scaleX = (clip.scaleY = (clip.scaleX + 0.05));
} else {
clip.active = false;
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function upd(_arg1:Object):void{
var _local2:uint;
_local2 = 0;
while (_local2 < ides.length) {
if (ides[_local2].active){
ides[_local2].upd(_arg1);
} else {
ides[_local2].holder.removeChild(ides[_local2]);
ides.splice(_local2, 1);
_local2--;
};
_local2++;
};
}
public function addImpactCrater(_arg1:Number, _arg2:Number){
var clip:ImpactCrater;
var vx = _arg1;
var vy = _arg2;
clip = new ImpactCrater();
clip.x = vx;
clip.y = vy;
clip.rotation = (360 * mrandom());
clip.scaleX = (0.9 + (mrandom() / 4));
clip.scaleY = clip.scaleX;
clip.scaleX = (clip.scaleX * ((mrandom())<0.5) ? 1 : -1);
clip.active = true;
clip.holder = repBase;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
decalEffects.addDecal(clip, "base");
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Number=1.5, _arg7:uint=0xFFFFFF, _arg8:Number=3){
var clip:MovieClip;
var grr:Graphics;
var vx = _arg1;
var vy = _arg2;
var vx2 = _arg3;
var vy2 = _arg4;
var valpha = _arg5;
var vthickness = _arg6;
var vhex = _arg7;
var vfade = _arg8;
clip = new MovieClip();
grr = clip.graphics;
grr.lineStyle(vthickness, vhex, valpha);
grr.moveTo(vx, vy);
grr.lineTo(vx2, vy2);
clip.fadeAmount = (1 / vfade);
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
if (clip.alpha > 0){
clip.alpha = (clip.alpha - clip.fadeAmount);
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addSteamCloud(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
var clip:SteamCloud;
var vx = _arg1;
var vy = _arg2;
var vxspd = _arg3;
var vyspd = _arg4;
clip = new SteamCloud();
clip.x = vx;
clip.y = vy;
clip.spdX = (vxspd * (0.5 + (mrandom() / 2)));
clip.spdY = (vyspd * (0.5 + (mrandom() / 2)));
clip.scaleX = (0.2 + (mrandom() / 3));
clip.scaleY = clip.scaleX;
clip.rotation = (mrandom() * 360);
clip.alpha = (0.5 + (mrandom() / 4));
clip.fadeSpd = (0.02 + (mrandom() * 0.08));
clip.gotoAndStop(ceil((mrandom() * 3)));
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
if (clip.alpha > 0){
clip.alpha = (clip.alpha - clip.fadeSpd);
clip.scaleX = (clip.scaleX + clip.fadeSpd);
clip.scaleY = (clip.scaleY + clip.fadeSpd);
clip.x = (clip.x + clip.spdX);
clip.y = (clip.y + clip.spdY);
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addFlash(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=1):void{
var clip:MuzzleFlash;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vs = _arg4;
clip = new MuzzleFlash();
clip.x = vx;
clip.y = vy;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.scaleX = (clip.scaleX * vs);
clip.scaleY = (clip.scaleY * vs);
clip.rotation = (vr * rtd);
clip.gotoAndStop((1 + (5 * floor((mrandom() * 4)))));
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
if ((clip.currentFrame % 5) > 0){
clip.nextFrame();
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addDotMysterious(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
var clip:DotMysterious;
var vx = _arg1;
var vy = _arg2;
var vxspd = _arg3;
var vyspd = _arg4;
clip = new DotMysterious();
clip.x = (vx + (5 - (mrandom() * 10)));
clip.y = (vy + (5 - (mrandom() * 10)));
clip.spdX = vxspd;
clip.spdY = vyspd;
clip.scaleX = (0.8 + (mrandom() / 3));
clip.scaleY = clip.scaleX;
clip.rotation = (mrandom() * 360);
clip.alpha = (0.5 + (mrandom() / 4));
clip.fadeSpd = (0.02 + (mrandom() * 0.01));
clip.gotoAndStop(ceil((mrandom() * clip.totalFrames)));
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
if (clip.alpha > 0){
clip.alpha = (clip.alpha - clip.fadeSpd);
clip.scaleX = (clip.scaleX + clip.fadeSpd);
clip.scaleY = (clip.scaleY + clip.fadeSpd);
clip.x = (clip.x + clip.spdX);
clip.y = (clip.y + clip.spdY);
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addDotHappy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
var clip:DotHappy;
var vx = _arg1;
var vy = _arg2;
var vxspd = _arg3;
var vyspd = _arg4;
clip = new DotHappy();
clip.x = (vx + (5 - (mrandom() * 10)));
clip.y = (vy + (5 - (mrandom() * 10)));
clip.spdX = vxspd;
clip.spdY = vyspd;
clip.scaleX = (0.8 + (mrandom() / 3));
clip.scaleY = clip.scaleX;
clip.rotation = (mrandom() * 360);
clip.alpha = (0.5 + (mrandom() / 4));
clip.fadeSpd = (0.02 + (mrandom() * 0.02));
clip.gotoAndStop(ceil((mrandom() * clip.totalFrames)));
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
if (clip.alpha > 0){
clip.alpha = (clip.alpha - clip.fadeSpd);
clip.scaleX = (clip.scaleX + clip.fadeSpd);
clip.scaleY = (clip.scaleY + clip.fadeSpd);
clip.x = (clip.x + clip.spdX);
clip.y = (clip.y + clip.spdY);
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addDotUnhappy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
var clip:DotUnhappy;
var vx = _arg1;
var vy = _arg2;
var vxspd = _arg3;
var vyspd = _arg4;
clip = new DotUnhappy();
clip.x = (vx + (5 - (mrandom() * 10)));
clip.y = (vy + (5 - (mrandom() * 10)));
clip.spdX = vxspd;
clip.spdY = vyspd;
clip.scaleX = (0.8 + (mrandom() / 3));
clip.scaleY = clip.scaleX;
clip.rotation = (mrandom() * 360);
clip.alpha = (0.5 + (mrandom() / 4));
clip.fadeSpd = (0.02 + (mrandom() * 0.02));
clip.gotoAndStop(ceil((mrandom() * clip.totalFrames)));
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
if (clip.alpha > 0){
clip.alpha = (clip.alpha - clip.fadeSpd);
clip.scaleX = (clip.scaleX + clip.fadeSpd);
clip.scaleY = (clip.scaleY + clip.fadeSpd);
clip.x = (clip.x + clip.spdX);
clip.y = (clip.y + clip.spdY);
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addSplash(_arg1:Number, _arg2:Number, _arg3:Boolean=false, _arg4:Number=0.5, _arg5:MovieClip=null){
var clip:MovieClip;
var vx = _arg1;
var vy = _arg2;
var vsmall = _arg3;
var valpha = _arg4;
var vspechold = _arg5;
if (vsmall){
clip = new RippleEffectSmall();
} else {
clip = new RippleEffect();
};
clip.stop();
clip.x = vx;
clip.y = vy;
clip.alpha = valpha;
clip.scaleX = (0.8 + (mrandom() * 0.3));
clip.scaleY = clip.scaleX;
clip.scaleX = (clip.scaleX * ((mrandom())<0.1) ? 1 : -1);
clip.rotation = (mrandom() * 360);
clip.active = true;
if (vspechold == null){
clip.holder = repWater;
} else {
clip.holder = vspechold;
};
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
}
}//package project.effects
Section 238
//AttackEffects (project.effects.AttackEffects)
package project.effects {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import project.tools.*;
public class AttackEffects extends EventDispatcher {
private const floor:Function;
private const cos:Function;
private const atan2:Function;
private const weaponDamages:Array;
private const exp:Function;
private const sin:Function;
private const weaponKnockbacks:Array;
private const rtd:Number = 57.2957795130823;
private const mrandom:Function;
private const PI:Number = 3.14159265358979;
private var ides:Array;
private var decalEffects:DecalEffects;
private var aniEffects:AniEffects;
private var repBase:MovieClip;
public var damagePoints:Array;
private var playArea:MovieClip;
private var repMid:MovieClip;
private var repBase2:MovieClip;
private var repTop:MovieClip;
private var repWater:MovieClip;
public function AttackEffects(_arg1:MovieClip, _arg2:MovieClip, _arg3:MovieClip, _arg4:MovieClip, _arg5:MovieClip, _arg6:MovieClip, _arg7:AniEffects, _arg8:DecalEffects):void{
sin = Math.sin;
cos = Math.cos;
exp = Math.exp;
atan2 = Math.atan2;
mrandom = Math.random;
floor = Math.floor;
weaponDamages = [8, 19, 9, 30, 52, 6, 32, 24, 12];
weaponKnockbacks = [2, 10, 4, 3, 12, 1, 6, 5, 4];
super();
repTop = _arg1;
repMid = _arg2;
repBase = _arg3;
repBase2 = _arg5;
repWater = _arg4;
playArea = _arg6;
aniEffects = _arg7;
decalEffects = _arg8;
ides = new Array();
}
public function addCrossbowBolt(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 50;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.rotation = (vr * rtd);
clip.gotoAndStop(2);
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), weaponDamages[1]);
dispatchEvent(new SoundsEvent("soundEvent", 42));
clip.strength = weaponDamages[1];
clip.knockback = weaponKnockbacks[1];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
if (_arg1.terrainMap.getTerrainType(clip.x, clip.y).terrain == "wall"){
dispatchEvent(new SoundsEvent("soundEvent", 46));
decalEffects.addDecal(clip, "mid");
};
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.1, 1.8, 0xFFFFFF, 5);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addClawTrap(_arg1:Object):void{
var clip:ClawTrap;
var vtarg = _arg1;
clip = new ClawTrap();
clip.gotoAndStop(1);
clip.targ = vtarg;
clip.x = vtarg.x;
clip.y = vtarg.y;
clip.rotation = (mrandom() * 360);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.scaleX = (clip.scaleX * 1.4);
clip.scaleY = (clip.scaleY * 1.4);
clip.active = true;
clip.holder = repBase2;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < clip.totalFrames){
if ((((clip.currentFrame > 35)) && ((clip.currentFrame < 41)))){
if (clip.targ.hitbox.hitTestObject(clip.hitbox)){
clip.targ.bash(23);
};
};
if (clip.currentFrame == 32){
dispatchEvent(new SoundsEvent("soundEvent", 170));
};
clip.nextFrame();
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addRifleBullet(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 160;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.rotation = (vr * rtd);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.gotoAndStop(4);
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), weaponDamages[3]);
dispatchEvent(new SoundsEvent("soundEvent", 52));
clip.strength = weaponDamages[3];
clip.knockback = weaponKnockbacks[3];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.7, 1, 0xFFFFFF, 5);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addDart(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 30;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.rotation = (vr * rtd);
clip.gotoAndStop(2);
dispatchEvent(new SoundsEvent("soundEvent", 60));
clip.strength = 9;
clip.knockback = 4;
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
if (_arg1.terrainMap.getTerrainType(clip.x, clip.y).terrain == "wall"){
dispatchEvent(new SoundsEvent("soundEvent", 46));
decalEffects.addDecal(clip, "mid");
};
if (clip.currentFrame == 2){
dispatchEvent(new SoundsEvent("soundEvent", 82));
};
if (clip.currentFrame == 22){
dispatchEvent(new SoundsEvent("soundEvent", 86));
};
if (clip.currentFrame == 19){
dispatchEvent(new SoundsEvent("soundEvent", 90));
};
if (clip.currentFrame == 26){
dispatchEvent(new SoundsEvent("soundEvent", 84));
};
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.05, 1.2, 0xFFFFFF, 3);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addPistolBullet(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 100;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.rotation = (vr * rtd);
clip.gotoAndStop(1);
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), weaponDamages[0]);
dispatchEvent(new SoundsEvent("soundEvent", 18));
clip.strength = weaponDamages[0];
clip.knockback = weaponKnockbacks[0];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.8, 1.2, 0xFFFFFF, 3);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function upd(_arg1:Object):void{
var _local2:uint;
damagePoints = new Array();
_local2 = 0;
while (_local2 < ides.length) {
if (ides[_local2].active){
ides[_local2].upd(_arg1);
} else {
ides[_local2].holder.removeChild(ides[_local2]);
ides.splice(_local2, 1);
_local2--;
};
_local2++;
};
}
public function addBlind(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):void{
var clip:MovieClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vstrength = _arg4;
var vknockBack = _arg5;
var vknockBackAng = _arg6;
clip = new MovieClip();
clip.vals = {x:vx, y:vy, strength:vstrength, knockBack:vknockBack, knockBackAng:vknockBackAng, targ:vtarg};
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
damagePoints.push(clip.vals);
clip.active = false;
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addAnemoneTrap(_arg1:Object):void{
var clip:AnemoneTrap;
var vtarg = _arg1;
clip = new AnemoneTrap();
clip.gotoAndStop(1);
clip.targ = vtarg;
clip.x = vtarg.x;
clip.y = vtarg.y;
clip.rotation = (mrandom() * 360);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.active = true;
clip.holder = repBase2;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < clip.totalFrames){
if ((((clip.currentFrame > 38)) && ((clip.currentFrame < 45)))){
if (clip.targ.hitp(clip)){
clip.targ.bash(20);
};
};
if (clip.currentFrame == 37){
dispatchEvent(new SoundsEvent("soundEvent", 168));
};
clip.nextFrame();
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addDemonAni(_arg1:Object, _arg2:Object):void{
var clip:DemonAni;
var rad:Number;
var ang:Number;
var tempPoint:Point;
var i:uint;
var vstate = _arg1;
var vtarg = _arg2;
clip = new DemonAni();
rad = (50 + (mrandom() * 10));
ang = ((mrandom() * PI) * 2);
clip.targ = vtarg;
clip.gotoAndStop(1);
clip.x = (clip.targ.x + (rad * sin(ang)));
clip.y = (clip.targ.y - (rad * cos(ang)));
tempPoint = MathsStuff.polarDistance(new Point(clip.x, clip.y), vtarg.position);
clip.rotation = ((tempPoint.y * rtd) + 180);
clip.active = true;
clip.holder = repTop;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
if ((((clip.currentFrame > 22)) && ((clip.currentFrame < 26)))){
damagePoints.push({x:clip.dot1.x, y:clip.dot1.y, strength:19, knockBack:6, knockBackAng:clip.dot1.rot, targ:clip.targ});
damagePoints.push({x:clip.dot2.x, y:clip.dot2.y, strength:19, knockBack:6, knockBackAng:clip.dot2.rot, targ:clip.targ});
damagePoints.push({x:clip.dot3.x, y:clip.dot3.y, strength:19, knockBack:6, knockBackAng:clip.dot3.rot, targ:clip.targ});
};
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addSMGBullet(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
vr = (vr + (0.1 - (mrandom() * 0.2)));
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 120;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.rotation = (mrandom() * 360);
clip.gotoAndStop(3);
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), weaponDamages[2]);
dispatchEvent(new SoundsEvent("soundEvent", 50));
clip.strength = weaponDamages[2];
clip.knockback = weaponKnockbacks[2];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.6, 1.6, 0xFFFFFF, 2);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addShotgunShellSmall(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
clip.vr = (clip.vr + (0.5 - mrandom()));
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 50;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.rotation = (mrandom() * 360);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.gotoAndStop(8);
clip.strength = weaponDamages[8];
clip.knockback = weaponKnockbacks[8];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.3, 0.8, 0xFFFFFF, 4);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addShotgunShellMed(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
addShotgunShellSmall(vtarg, vx, vy, (vr - (mrandom() * 0.2)));
addShotgunShellSmall(vtarg, vx, vy, (vr + (mrandom() * 0.2)));
clip.vr = (clip.vr + (0.3 - (mrandom() * 0.6)));
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 60;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.rotation = (mrandom() * 360);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.gotoAndStop(7);
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), weaponDamages[7]);
clip.strength = weaponDamages[7];
clip.knockback = weaponKnockbacks[7];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.5, 1.4, 0xFFFFFF, 6);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addPiperBullet(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 220;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.rotation = (vr * rtd);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.gotoAndStop(5);
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), weaponDamages[5]);
dispatchEvent(new SoundsEvent("soundEvent", 54));
clip.strength = weaponDamages[5];
clip.knockback = weaponKnockbacks[5];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.5, 0.5, 0xFFFFFF, 3);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addLightTrap(_arg1:Object):void{
var clip:LightTrap;
var vtarg = _arg1;
clip = new LightTrap();
clip.gotoAndStop(1);
clip.targ = vtarg;
clip.x = vtarg.x;
clip.y = vtarg.y;
clip.rotation = (mrandom() * 360);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.active = true;
clip.holder = repBase2;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < clip.totalFrames){
if ((((clip.currentFrame > 32)) && ((clip.currentFrame < 36)))){
if (clip.targ.hitbox.hitTestObject(clip.hitbox)){
clip.targ.bash(32);
};
};
if (clip.currentFrame == 33){
dispatchEvent(new SoundsEvent("soundEvent", 176));
};
clip.nextFrame();
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addBalls(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BallsOnChain;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BallsOnChain();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 30;
clip.rot = vr;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.spdR = -50;
clip.rotation = (vr * rtd);
clip.gotoAndStop(1);
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), weaponDamages[4]);
clip.x = (clip.x + (clip.dx * clip.spd));
clip.y = (clip.y + (clip.dy * clip.spd));
dispatchEvent(new SoundsEvent("soundEvent", 102));
clip.strength = weaponDamages[4];
clip.knockback = weaponKnockbacks[4];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Point;
var _local4:Point;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 3));
clip.y = (clip.y + (clip.dy * 3));
clip.rotation = (clip.rotation + ((clip.spdR * 3) / clip.spdR));
_local3 = clip.holder.globalToLocal(clip.ball1.localToGlobal(new Point()));
_local4 = clip.holder.globalToLocal(clip.ball2.localToGlobal(new Point()));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(_local3.x, _local3.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
addBallStill(_local3.x, _local3.y, clip.rotation);
addBall(clip.targ, _local4.x, _local4.y, (clip.dx * clip.spd), (clip.dy * clip.spd));
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(_local4.x, _local4.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
addBallStill(_local4.x, _local4.y, clip.rotation);
addBall(clip.targ, _local3.x, _local3.y, (clip.dx * clip.spd), (clip.dy * clip.spd));
clip.active = false;
break;
};
};
};
_local2 = (_local2 + 3);
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addShadowThrow(_arg1:MovieClip, _arg2:MovieClip):void{
var clip:ShadowThrow;
var tempPoint:Point;
var vtarg = _arg1;
var vthrower = _arg2;
clip = new ShadowThrow();
clip.gotoAndStop(1);
clip.targ = vtarg;
clip.thrower = vthrower;
clip.x = vthrower.x;
clip.y = vthrower.y;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
tempPoint = MathsStuff.polarDistance(new Point(clip.x, clip.y), vtarg.position);
clip.rot = tempPoint.y;
clip.dx = sin(clip.rot);
clip.dy = -(cos(clip.rot));
clip.spd = 0;
clip.tim = 5;
clip.rotation = (clip.rot * rtd);
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < 20){
if (clip.spd < 32){
if (clip.tim > 0){
clip.tim--;
clip.spd = (clip.spd - 3);
} else {
clip.spd = (clip.spd + 4);
};
};
if (clip.tail != null){
clip.tail.scaleY = (clip.spd / 12);
};
clip.x = (clip.x + (clip.dx * clip.spd));
clip.y = (clip.y + (clip.dy * clip.spd));
if (clip.currentFrame == 19){
clip.gotoAndStop(10);
} else {
clip.nextFrame();
};
if (!clip.hitTestObject(playArea)){
clip.active = false;
} else {
if (clip.hitbox.hitTestObject(clip.targ.hitbox)){
clip.targ.bash(22);
clip.gotoAndStop(20);
dispatchEvent(new SoundsEvent("soundEvent", 174));
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y, true)){
clip.gotoAndStop(20);
dispatchEvent(new SoundsEvent("soundEvent", 174));
};
};
};
} else {
if (clip.currentFrame < clip.totalFrames){
if (clip.currentFrame < 26){
if (clip.targ.hitbox.hitTestObject(clip.hitbox)){
clip.targ.bash(18);
};
};
clip.nextFrame();
} else {
clip.active = false;
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addBallStill(_arg1:Number, _arg2:Number, _arg3:Number):void{
var clip:BallsOnChain;
var vx = _arg1;
var vy = _arg2;
var vrot = _arg3;
clip = new BallsOnChain();
clip.x = vx;
clip.y = vy;
clip.rotation = vrot;
clip.gotoAndStop(2);
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
if (clip.currentFrame < 5){
clip.nextFrame();
} else {
if (_arg1.terrainMap.getTerrainType(clip.x, clip.y).terrain == "wall"){
decalEffects.addDecal(clip, "mid");
};
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addPiperSpike(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 40;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.rotation = (vr * rtd);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.gotoAndStop(11);
clip.first = true;
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), 20);
dispatchEvent(new SoundsEvent("soundEvent", 60));
clip.strength = 15;
clip.knockback = 6;
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
clip.first = false;
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.3, 0.5, 0xFFFFFF, 3);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addBall(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var clip:BallsOnChain;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vspdX = _arg4;
var vspdY = _arg5;
clip = new BallsOnChain();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = Point.distance(new Point(), new Point(vspdX, vspdY));
clip.dx = (vspdX / clip.spd);
clip.dy = (vspdY / clip.spd);
clip.rot = atan2(vspdX, -(vspdY));
clip.rotation = (360 * mrandom());
clip.gotoAndStop(5);
clip.strength = weaponDamages[4];
clip.knockback = weaponKnockbacks[4];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 3));
clip.y = (clip.y + (clip.dy * 3));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
if (_arg1.terrainMap.getTerrainType(clip.x, clip.y).terrain == "wall"){
decalEffects.addDecal(clip, "mid");
};
clip.active = false;
break;
};
};
_local2 = (_local2 + 3);
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addShadowTrap(_arg1:Object):void{
var clip:ShadowTrap;
var vtarg = _arg1;
clip = new ShadowTrap();
clip.gotoAndStop(1);
clip.targ = vtarg;
clip.x = vtarg.x;
clip.y = vtarg.y;
clip.rotation = (mrandom() * 360);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.active = true;
clip.holder = repBase2;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < clip.totalFrames){
if ((((clip.currentFrame > 45)) && ((clip.currentFrame < 55)))){
if (clip.targ.hitbox.hitTestObject(clip.hitbox)){
clip.targ.bash(18);
};
};
if (clip.currentFrame == 45){
dispatchEvent(new SoundsEvent("soundEvent", 172));
};
clip.nextFrame();
} else {
clip.active = false;
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addLightThrow(_arg1:MovieClip, _arg2:MovieClip):void{
var clip:LightThrow;
var tempPoint:Point;
var vtarg = _arg1;
var vthrower = _arg2;
clip = new LightThrow();
clip.gotoAndStop(1);
clip.targ = vtarg;
clip.thrower = vthrower;
clip.px = vthrower.x;
clip.py = vthrower.y;
clip.x = clip.px;
clip.y = clip.py;
clip.t = 0;
clip.sx = ((mrandom())<0.5) ? 1 : -1;
clip.sy = ((mrandom())<0.5) ? 1 : -1;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
tempPoint = MathsStuff.polarDistance(new Point(clip.x, clip.y), vtarg.position);
clip.rot = tempPoint.y;
clip.dx = sin(clip.rot);
clip.dy = -(cos(clip.rot));
clip.spd = (16 - (12 * exp((-(tempPoint.x) / 300))));
clip.rotation = (clip.rot * rtd);
clip.amp = (tempPoint.x * (3 / 10));
clip.omega = ((clip.spd * PI) / tempPoint.x);
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame < 20){
clip.px = (clip.px + (clip.dx * clip.spd));
clip.py = (clip.py + (clip.dy * clip.spd));
clip.t++;
clip.x = (clip.px + (((clip.sx * clip.dy) * clip.amp) * sin((clip.t * clip.omega))));
clip.y = (clip.py + (((clip.sy * clip.dx) * clip.amp) * sin((clip.t * clip.omega))));
if (clip.currentFrame == 19){
clip.gotoAndStop(10);
} else {
clip.nextFrame();
};
if (!clip.hitTestObject(playArea)){
clip.active = false;
} else {
if (clip.hitbox.hitTestObject(clip.targ.hitbox)){
clip.targ.bash(22);
dispatchEvent(new SoundsEvent("soundEvent", 178));
clip.gotoAndStop(20);
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y, true)){
dispatchEvent(new SoundsEvent("soundEvent", 178));
clip.gotoAndStop(20);
};
};
};
} else {
if (clip.currentFrame < clip.totalFrames){
if (clip.currentFrame < 26){
if (clip.targ.hitbox.hitTestObject(clip.hitbox)){
clip.targ.bash(18);
};
};
clip.nextFrame();
} else {
clip.active = false;
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addShotgunShellBig(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
addShotgunShellSmall(vtarg, vx, vy, ((vr + 0.5) - mrandom()));
addShotgunShellSmall(vtarg, vx, vy, (vr - (mrandom() * 0.6)));
addShotgunShellSmall(vtarg, vx, vy, (vr + (mrandom() * 0.6)));
clip.vr = (clip.vr + (0.1 - (mrandom() * 0.2)));
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 80;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.rotation = (mrandom() * 360);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.gotoAndStop(6);
addBlind(clip.targ, (clip.x - (vx * 25)), (clip.y - (vy * 25)), weaponDamages[6]);
dispatchEvent(new SoundsEvent("soundEvent", 124));
clip.strength = weaponDamages[6];
clip.knockback = weaponKnockbacks[6];
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 1, 2, 0xFFFFFF, 8);
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addPirateBullet(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
var clip:BulletsClip;
var vtarg = _arg1;
var vx = _arg2;
var vy = _arg3;
var vr = _arg4;
clip = new BulletsClip();
clip.targ = vtarg;
clip.x = vx;
clip.y = vy;
clip.spd = 60;
clip.dx = sin(vr);
clip.dy = -(cos(vr));
clip.rot = vr;
clip.rotation = (vr * rtd);
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.gotoAndStop(10);
clip.first = true;
addBlind(clip.targ, (clip.x - (vx * 45)), (clip.y - (vy * 45)), 30);
dispatchEvent(new SoundsEvent("soundEvent", 58));
clip.strength = 7;
clip.knockback = 10;
clip.active = true;
clip.holder = repMid;
clip.upd = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
_local2 = 0;
while (_local2 < clip.spd) {
clip.x = (clip.x + (clip.dx * 10));
clip.y = (clip.y + (clip.dy * 10));
if (!clip.hitTestObject(playArea)){
clip.active = false;
break;
} else {
if (_arg1.terrainMap.getHitsTarget(clip.x, clip.y)){
damagePoints.push({x:clip.x, y:clip.y, strength:clip.strength, knockBack:clip.knockback, knockBackAng:clip.rot, targ:clip.targ, tag:true});
clip.active = false;
break;
};
};
_local2 = (_local2 + 10);
};
clip.first = false;
aniEffects.addLine(_local3, _local4, clip.x, clip.y, 0.5, 2, 0xFFFFFF, 8);
};
ides.push(clip);
clip.holder.addChild(clip);
}
}
}//package project.effects
Section 239
//DecalEffects (project.effects.DecalEffects)
package project.effects {
import flash.geom.*;
import flash.display.*;
public class DecalEffects {
const dtr:Number = 0.0174532925199433;
const PI:Number = 3.14159265358979;
private var bmpBaseData:BitmapData;
private var bmpMid:Bitmap;
private var bmpMidData:BitmapData;
private var repBase:MovieClip;
private var bmpTop:Bitmap;
private var bmpWater:Bitmap;
private var waterTransform:ColorTransform;
private var bmpTopData:BitmapData;
private var bmpWaterData:BitmapData;
private var repMid:MovieClip;
private var bmpBase:Bitmap;
private var repTop:MovieClip;
private var repWater:MovieClip;
public function DecalEffects(_arg1:MovieClip, _arg2:MovieClip, _arg3:MovieClip, _arg4:MovieClip, _arg5:Rectangle):void{
repTop = _arg1;
repMid = _arg2;
repBase = _arg3;
repWater = _arg4;
bmpTopData = new BitmapData(_arg5.width, _arg5.height, true, 0);
bmpMidData = new BitmapData(_arg5.width, _arg5.height, true, 0);
bmpBaseData = new BitmapData(_arg5.width, _arg5.height, true, 0);
bmpWaterData = new BitmapData(_arg5.width, _arg5.height, true, 0);
bmpTop = new Bitmap(bmpTopData, "auto", true);
bmpMid = new Bitmap(bmpMidData, "auto", true);
bmpBase = new Bitmap(bmpBaseData, "auto", true);
bmpWater = new Bitmap(bmpWaterData, "auto", true);
_arg1.addChild(bmpTop);
_arg2.addChild(bmpMid);
_arg3.addChild(bmpBase);
_arg4.addChild(bmpWater);
waterTransform = new ColorTransform(0.5, 0.6, 0.6);
}
public function addDecal(_arg1:MovieClip, _arg2:String="base"):void{
var _local3:Matrix;
_local3 = _arg1.transform.matrix;
switch (_arg2){
case "top":
bmpTopData.draw(_arg1, _local3);
break;
case "mid":
bmpMidData.draw(_arg1, _local3);
break;
case "base":
bmpBaseData.draw(_arg1, _local3);
break;
case "water":
bmpWaterData.draw(_arg1, _local3, waterTransform);
break;
};
}
public function finishUp(){
bmpTopData.dispose();
bmpMidData.dispose();
bmpBaseData.dispose();
bmpWaterData.dispose();
}
}
}//package project.effects
Section 240
//EnemyEffects (project.effects.EnemyEffects)
package project.effects {
import flash.display.*;
import flash.events.*;
import project.myevents.*;
public class EnemyEffects extends EventDispatcher {
public var ides:Array;
private var repBase:MovieClip;
private var aniEffects:AniEffects;
private var playArea:MovieClip;
private var repBase2:MovieClip;
private var pickupEffects:PickupEffects;
private var repMid:MovieClip;
private var decalEffects:DecalEffects;
private var repTop:MovieClip;
private var repWater:MovieClip;
public function EnemyEffects(_arg1:MovieClip, _arg2:MovieClip, _arg3:MovieClip, _arg4:MovieClip, _arg5:MovieClip, _arg6:MovieClip, _arg7:AniEffects, _arg8:DecalEffects, _arg9:PickupEffects):void{
repTop = _arg1;
repMid = _arg2;
repBase = _arg3;
repBase2 = _arg5;
repWater = _arg4;
playArea = _arg6;
aniEffects = _arg7;
decalEffects = _arg8;
pickupEffects = _arg9;
ides = new Array();
}
public function addCrawler(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:uint=0):void{
var clip:CrawlerMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vi = _arg4;
clip = new CrawlerMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.item = vi;
clip.holder = repBase2;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function addMerman(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:uint=0):void{
var clip:MermanMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vi = _arg4;
clip = new MermanMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.item = vi;
clip.holder = repMid;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function onSoundEvent(_arg1:SoundsEvent):void{
var _local2:SoundsEvent;
_local2 = new SoundsEvent("soundEvent", _arg1.id, _arg1.soundVolume, _arg1.soundPan);
dispatchEvent(_local2);
}
public function addOctomage(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:uint=0):void{
var clip:OctomageMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vi = _arg4;
clip = new OctomageMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.item = vi;
clip.holder = repMid;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function addLobsterMan(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:uint=0):void{
var clip:LobsterManMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vi = _arg4;
clip = new LobsterManMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.item = vi;
clip.holder = repBase2;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function addFloatFish(_arg1:Number, _arg2:Number, _arg3:Number=0):void{
var clip:FloatFishMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
clip = new FloatFishMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.holder = repMid;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function addSkeleton(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:uint=0):void{
var clip:SkeletonMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vi = _arg4;
clip = new SkeletonMain();
clip.theFlyer = new SkeletonMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.item = vi;
clip.holder = repBase2;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player, clip.theFlyer);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
repTop.addChild(clip.theFlyer);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function addPiper(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:uint=0):void{
var clip:PiperMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vi = _arg4;
clip = new PiperMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.item = vi;
clip.holder = repBase2;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function addMermaid(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:uint=0):void{
var clip:MermaidMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vi = _arg4;
clip = new MermaidMain();
clip.theTail = new MermaidMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.item = vi;
clip.holder = repBase2;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player, clip.theTail);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
repWater.addChild(clip.theTail);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function upd(_arg1:Object):void{
var _local2:uint;
var _local3:uint;
_local3 = 0;
_local2 = 0;
while (_local2 < ides.length) {
if (ides[_local2].active){
if (ides[_local2].hitTestObject(playArea)){
ides[_local2].updObj(_arg1);
} else {
if (_local3 < 3){
ides[_local2].updObj(_arg1);
_local3++;
};
};
} else {
if (ides[_local2].tail != null){
aniEffects.fadeMeOut(ides[_local2].tail, true);
repWater.removeChild(ides[_local2].tail);
};
aniEffects.fadeMeOut(ides[_local2]);
if (ides[_local2].holder != null){
ides[_local2].holder.removeChild(ides[_local2]);
};
ides.splice(_local2, 1);
_local2--;
};
_local2++;
};
}
public function onDefeat(_arg1:DefeatEvent):void{
var _local2:DefeatEvent;
_local2 = new DefeatEvent("defeatEvent", _arg1.x, _arg1.y, _arg1.val);
if (Boolean(_arg1.target.item)){
pickupEffects.addItemByID(_arg1.x, _arg1.y, _arg1.target.item);
};
dispatchEvent(_local2);
}
public function addDemon(_arg1:uint=0, _arg2:uint=0):void{
var clip:DemonMain;
var vhide = _arg1;
var vi = _arg2;
clip = new DemonMain();
clip.justSpawned = true;
clip.visible = false;
clip.hide = vhide;
clip.item = vi;
clip.holder = repBase2;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox);
clip.setMoreUp(_arg1.player, clip.hide);
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function addShadow(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:uint=0):void{
var clip:ShadowMain;
var vx = _arg1;
var vy = _arg2;
var vr = _arg3;
var vi = _arg4;
clip = new ShadowMain();
clip.x = vx;
clip.y = vy;
clip.rotation = (vr + 180);
clip.justSpawned = true;
clip.visible = false;
clip.item = vi;
clip.holder = repBase2;
clip.updObj = function (_arg1:Object):void{
var _local2:uint;
var _local3:Number;
var _local4:Number;
_local3 = clip.x;
_local4 = clip.y;
if (clip.justSpawned){
clip.setUp(clip.the_hitbox, aniEffects);
clip.setMoreUp(_arg1.player);
clip.visible = true;
clip.justSpawned = false;
};
clip.upd(_arg1);
clip.updAni();
};
ides.push(clip);
clip.holder.addChild(clip);
clip.addEventListener("soundEvent", onSoundEvent);
clip.addEventListener("useAttack", onAttackUsed);
clip.addEventListener("defeatEvent", onDefeat);
}
public function onAttackUsed(_arg1:AttackEvent):void{
var _local2:AttackEvent;
_local2 = new AttackEvent("useAttack", _arg1.attackType, _arg1.attackGuide, _arg1.attackHold);
dispatchEvent(_local2);
}
}
}//package project.effects
Section 241
//PickupEffects (project.effects.PickupEffects)
package project.effects {
import flash.display.*;
import project.myevents.*;
public class PickupEffects extends MovieClip {
private const sin:Function;
private const floor:Function;
private const rtd:Number = 57.2957795130823;
private const mrandom:Function;
private const cos:Function;
private const PI:Number = 3.14159265358979;
private var ides:Array;
private var repBase:MovieClip;
private var aniEffects:AniEffects;
private var player:MovieClip;
public function PickupEffects(_arg1:MovieClip, _arg2:MovieClip, _arg3:AniEffects):void{
sin = Math.sin;
cos = Math.cos;
mrandom = Math.random;
floor = Math.floor;
super();
repBase = _arg1;
player = _arg2;
aniEffects = _arg3;
ides = new Array();
}
public function addAmmo(_arg1:Number, _arg2:Number, _arg3:uint):void{
var clip:ItemsClip;
var vx = _arg1;
var vy = _arg2;
var vslot = _arg3;
clip = new ItemsClip();
clip.x = vx;
clip.y = vy;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.rotation = (mrandom() * 360);
clip.slot = vslot;
clip.stop();
clip.active = true;
clip.holder = repBase;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame == 1){
if (_arg1.weapons[clip.slot]){
clip.image.gotoAndStop(_arg1.weapons[clip.slot]);
clip.shadow1.gotoAndStop(_arg1.weapons[clip.slot]);
clip.shadow2.gotoAndStop(_arg1.weapons[clip.slot]);
clip.nextFrame();
} else {
clip.active = false;
};
} else {
if (clip.currentFrame < 5){
clip.nextFrame();
} else {
if (clip.currentFrame == 5){
if (player.hits(clip.hitbox)){
addFlourish(clip.x, clip.y);
player.dispatchEvent(new PickupEvent("ammoGet", clip.slot));
player.dispatchEvent(new SoundsEvent("soundEvent", 6));
player.dispatchEvent(new SoundsEvent("soundEvent", 8));
clip.nextFrame();
};
} else {
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
clip.active = false;
};
};
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function upd(_arg1:Object):void{
var _local2:uint;
_local2 = 0;
while (_local2 < ides.length) {
if (ides[_local2].active){
ides[_local2].upd(_arg1);
} else {
ides[_local2].holder.removeChild(ides[_local2]);
ides.splice(_local2, 1);
_local2--;
};
_local2++;
};
}
public function addMedPack(_arg1:Number, _arg2:Number, _arg3:uint):void{
var clip:ItemsClip;
var vx = _arg1;
var vy = _arg2;
var vsize = _arg3;
clip = new ItemsClip();
clip.x = vx;
clip.y = vy;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.rotation = (mrandom() * 360);
clip.size = vsize;
clip.stop();
clip.active = true;
clip.holder = repBase;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame == 1){
clip.image.gotoAndStop((11 + clip.size));
clip.shadow1.gotoAndStop((11 + clip.size));
clip.shadow2.gotoAndStop((11 + clip.size));
clip.nextFrame();
} else {
if (clip.currentFrame < 5){
clip.nextFrame();
} else {
if (clip.currentFrame == 5){
if (player.hits(clip.hitbox)){
addFlourish(clip.x, clip.y);
player.dispatchEvent(new PickupEvent("medPackGet", clip.size));
player.dispatchEvent(new SoundsEvent("soundEvent", 6));
player.dispatchEvent(new SoundsEvent("soundEvent", 12));
clip.nextFrame();
};
} else {
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
clip.active = false;
};
};
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addWeapon(_arg1:Number, _arg2:Number, _arg3:uint):void{
var clip:ItemsClip;
var vx = _arg1;
var vy = _arg2;
var vgun = _arg3;
clip = new ItemsClip();
clip.x = vx;
clip.y = vy;
clip.rotation = (mrandom() * 360);
clip.gun = vgun;
clip.stop();
clip.active = true;
clip.holder = repBase;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame == 1){
clip.image.gotoAndStop((13 + clip.gun));
clip.shadow1.gotoAndStop((13 + clip.gun));
clip.shadow2.gotoAndStop((13 + clip.gun));
clip.nextFrame();
} else {
if (clip.currentFrame < 5){
clip.nextFrame();
} else {
if (clip.currentFrame == 5){
if (player.hits(clip.hitbox)){
addFlourish(clip.x, clip.y);
addFlourish(clip.x, clip.y);
addFlourish(clip.x, clip.y);
player.dispatchEvent(new PickupEvent("weaponGet", clip.gun));
player.dispatchEvent(new SoundsEvent("soundEvent", 6));
player.dispatchEvent(new SoundsEvent("soundEvent", 8));
clip.nextFrame();
};
} else {
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
clip.active = false;
};
};
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addItemByID(_arg1:Number, _arg2:Number, _arg3:uint):void{
if (_arg3 < 8){
addAmmo(_arg1, _arg2, _arg3);
} else {
if (_arg3 < 12){
addGold(_arg1, _arg2, (_arg3 - 7));
} else {
if (_arg3 < 15){
addMedPack(_arg1, _arg2, (_arg3 - 11));
};
};
};
}
public function addTrinket(_arg1:Number, _arg2:Number, _arg3:uint):void{
var clip:FluffiesClip;
var vx = _arg1;
var vy = _arg2;
var vfluff = _arg3;
clip = new FluffiesClip();
clip.x = vx;
clip.y = vy;
clip.rotation = (mrandom() * 360);
clip.fluff = vfluff;
clip.stop();
clip.active = true;
clip.holder = repBase;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame == 1){
clip.image.gotoAndStop(vfluff);
clip.shadow1.gotoAndStop(vfluff);
clip.shadow2.gotoAndStop(vfluff);
clip.nextFrame();
} else {
if (clip.currentFrame < 5){
clip.nextFrame();
} else {
if (clip.currentFrame == 5){
if (player.hits(clip.hitbox)){
addFlourish(clip.x, clip.y);
addFlourish(clip.x, clip.y);
addFlourish(clip.x, clip.y);
addFlourish(clip.x, clip.y);
addFlourish(clip.x, clip.y);
player.dispatchEvent(new PickupEvent("trinketGet", clip.fluff));
player.dispatchEvent(new SoundsEvent("soundEvent", 6));
clip.nextFrame();
};
} else {
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
clip.active = false;
};
};
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addGold(_arg1:Number, _arg2:Number, _arg3:uint):void{
var clip:ItemsClip;
var vx = _arg1;
var vy = _arg2;
var vsize = _arg3;
clip = new ItemsClip();
clip.x = vx;
clip.y = vy;
clip.scaleX = ((mrandom())<0.5) ? 1 : -1;
clip.rotation = (mrandom() * 360);
clip.size = vsize;
clip.stop();
clip.active = true;
clip.holder = repBase;
clip.upd = function (_arg1:Object):void{
if (clip.currentFrame == 1){
clip.image.gotoAndStop((7 + clip.size));
clip.shadow1.gotoAndStop((7 + clip.size));
clip.shadow2.gotoAndStop((7 + clip.size));
clip.nextFrame();
} else {
if (clip.currentFrame < 5){
clip.nextFrame();
} else {
if (clip.currentFrame == 5){
if (player.hits(clip.hitbox)){
addFlourish(clip.x, clip.y);
player.dispatchEvent(new PickupEvent("goldGet", clip.size));
player.dispatchEvent(new SoundsEvent("soundEvent", 6));
player.dispatchEvent(new SoundsEvent("soundEvent", 10));
clip.nextFrame();
};
} else {
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
clip.active = false;
};
};
};
};
};
ides.push(clip);
clip.holder.addChild(clip);
}
public function addFlourish(_arg1:Number, _arg2:Number):void{
aniEffects.addDotHappy(_arg1, _arg2, (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotHappy((_arg1 - 5), _arg2, (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotHappy((_arg1 + 5), _arg2, (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotHappy(_arg1, (_arg2 - 5), (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotHappy(_arg1, (_arg2 + 5), (-3 + (mrandom() * 6)), (-3 + (mrandom() * 6)));
aniEffects.addDotHappy(_arg1, _arg2, (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
aniEffects.addDotHappy((_arg1 - 5), _arg2, (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
aniEffects.addDotHappy((_arg1 + 5), _arg2, (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
aniEffects.addDotHappy(_arg1, (_arg2 - 5), (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
aniEffects.addDotHappy(_arg1, (_arg2 + 5), (-5 + (mrandom() * 10)), (-5 + (mrandom() * 10)));
}
}
}//package project.effects
Section 242
//AttackEvent (project.myevents.AttackEvent)
package project.myevents {
import flash.display.*;
import flash.events.*;
public class AttackEvent extends Event {
public var attackType:uint;
public var attackHold:MovieClip;
public var attackGuide:MovieClip;
public function AttackEvent(_arg1:String, _arg2:uint, _arg3:MovieClip, _arg4:MovieClip=null):void{
attackType = _arg2;
attackGuide = _arg3;
attackHold = _arg4;
super(_arg1);
}
}
}//package project.myevents
Section 243
//DefeatEvent (project.myevents.DefeatEvent)
package project.myevents {
import flash.display.*;
import flash.events.*;
public class DefeatEvent extends Event {
public var val:Number;
public var tar:MovieClip;
public var x:Number;
public var y:Number;
public function DefeatEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:MovieClip=null):void{
x = _arg2;
y = _arg3;
val = _arg4;
tar = _arg5;
super(_arg1);
}
}
}//package project.myevents
Section 244
//GameEvent (project.myevents.GameEvent)
package project.myevents {
import flash.events.*;
public class GameEvent extends Event {
public var id:uint;
public function GameEvent(_arg1:String, _arg2:uint):void{
id = _arg2;
super(_arg1);
}
}
}//package project.myevents
Section 245
//HealthEvent (project.myevents.HealthEvent)
package project.myevents {
import flash.events.*;
public class HealthEvent extends Event {
public var strength:Number;
public var knockBack:Number;
public function HealthEvent(_arg1:String, _arg2:Number=10, _arg3:Number=0):void{
strength = _arg2;
knockBack = _arg3;
super(_arg1);
}
}
}//package project.myevents
Section 246
//PickupEvent (project.myevents.PickupEvent)
package project.myevents {
import flash.events.*;
public class PickupEvent extends Event {
public var quantity:uint;
public var id:uint;
public function PickupEvent(_arg1:String, _arg2:uint, _arg3:uint=1):void{
id = _arg2;
quantity = _arg3;
super(_arg1);
}
}
}//package project.myevents
Section 247
//SoundsEvent (project.myevents.SoundsEvent)
package project.myevents {
import flash.events.*;
public class SoundsEvent extends Event {
public var soundVolume:Number;
public var soundPan:Number;
public var id:uint;
public function SoundsEvent(_arg1:String, _arg2:uint, _arg3:Number=1, _arg4:Number=0):void{
id = _arg2;
soundVolume = _arg3;
soundPan = _arg4;
super(_arg1);
}
}
}//package project.myevents
Section 248
//EffectHold (project.sound.EffectHold)
package project.sound {
import flash.display.*;
import flash.media.*;
public class EffectHold extends MovieClip {
public var active:Boolean;// = true
public var id:uint;// = 1
public var soundTime:uint;
public function EffectHold():void{
id = 1;
active = true;
super();
gotoAndStop(1);
active = false;
}
public function upd():void{
if (currentFrame == 1){
gotoAndStop(id);
} else {
if (soundTime > 0){
soundTime--;
} else {
active = false;
};
};
}
public function kill():void{
soundTransform = new SoundTransform(0, 0);
active = false;
}
public function startEffect(_arg1:uint, _arg2:Number=1, _arg3:Number=0):void{
active = true;
id = _arg1;
soundTime = 300;
soundTransform = new SoundTransform(_arg2, _arg3);
}
}
}//package project.sound
Section 249
//MusicHold (project.sound.MusicHold)
package project.sound {
import flash.display.*;
import flash.media.*;
public class MusicHold extends MovieClip {
public var active:Boolean;// = true
public var id:uint;// = 1
public var killingOnExit:Boolean;// = true
public var fadeVol:Number;// = 0
public var fadeInc:Number;
public var maxVol:Number;
public function MusicHold():void{
id = 1;
fadeVol = 0;
killingOnExit = true;
active = true;
super();
gotoAndStop(1);
active = false;
}
public function startMusic(_arg1:uint, _arg2:Number=5, _arg3:Number=1, _arg4:Number=0):void{
active = true;
id = (_arg1 * 2);
gotoAndStop(1);
maxVol = _arg3;
soundTransform = new SoundTransform(fadeVol, _arg4);
fadeInc = (maxVol / _arg2);
fadeVol = fadeInc;
}
public function unMuteMusic():void{
soundTransform = new SoundTransform(fadeVol, 0);
}
public function fadeUpd():void{
fadeVol = (fadeVol + fadeInc);
if (fadeVol > maxVol){
fadeVol = maxVol;
fadeInc = 0;
} else {
if (fadeVol < 0){
fadeVol = 0;
fadeInc = 0;
if (killingOnExit){
SoundMixer.stopAll();
};
};
};
soundTransform = new SoundTransform(fadeVol);
}
public function upd():void{
if (currentFrame == 1){
gotoAndStop(id);
};
fadeUpd();
}
public function fadeOut(_arg1:Number=50, _arg2:Boolean=true){
fadeInc = (-(maxVol) / _arg1);
killingOnExit = _arg2;
}
public function kill():void{
soundTransform = new SoundTransform(0, 0);
active = false;
}
public function muteMusic():void{
soundTransform = new SoundTransform(0, 0);
}
}
}//package project.sound
Section 250
//SoundManager (project.sound.SoundManager)
package project.sound {
import flash.display.*;
import project.myevents.*;
public class SoundManager extends MovieClip {
private const mrandom:Function;
public var voiceVolume:Number;// = 1
public var soundVolume:Number;// = 0.5
private var music:MusicHolder;// = null
private var voiceTime:uint;// = 0
private var voice:VoiceHold;
private var sounds:Array;
private var voiceSortArray:Array;
private var theFrame:uint;
public var musicHold:MusicHolder;
public var musicVolume:Number;// = 0.8
private var voiceID:uint;// = 0
private var voiceClipArray:Array;
public var voiceGuide:MovieClip;
public function SoundManager():void{
mrandom = Math.random;
voiceTime = 0;
voiceID = 0;
music = null;
soundVolume = 0.5;
musicVolume = 0.8;
voiceVolume = 1;
voice = new VoiceHold();
sounds = new Array();
music = null;
addChild(voice);
super();
}
public function addMusic(_arg1:uint, _arg2:Number=10, _arg3:Number=1, _arg4:Number=0):void{
if (music == null){
music = musicHold;
music.startMusic(_arg1, _arg2, _arg3, _arg4);
};
}
public function fadeMusic(_arg1:Number=30, _arg2:Boolean=true):void{
if (music != null){
music.fadeOut(_arg1, _arg2);
};
}
public function updVoices(_arg1:Object):void{
if (voiceTime > 0){
if (voiceTime == 1){
voiceClipArray[voiceID] = false;
};
voiceTime--;
};
if (voice.active){
if (voiceGuide != null){
if (voiceGuide.currentFrame < 5){
voiceGuide.nextFrame();
};
};
voice.upd();
} else {
if (voiceGuide != null){
if ((((voiceGuide.currentFrame >= 5)) && ((voiceGuide.currentFrame < 20)))){
voiceGuide.nextFrame();
} else {
voiceGuide.gotoAndStop(1);
};
};
};
sortVoices();
}
public function resetVoice(){
voice.active = false;
voice.soundPriority = 0;
voiceTime = 0;
voiceGuide.gotoAndStop(1);
}
public function upd(_arg1:Object):void{
updVoices(_arg1);
updSounds(_arg1);
updMusic(_arg1);
}
public function effectSounds(_arg1:SoundsEvent){
addSound(_arg1.id);
}
public function startVoiceTimer(_arg1:uint=50, _arg2:uint=0){
voiceTime = _arg1;
voiceID = _arg2;
}
public function addVoice(_arg1:String, _arg2:uint=0, _arg3:uint=50, _arg4:uint=1, _arg5:Number=1, _arg6:Number=0):Boolean{
if (_arg2 <= voice.soundPriority){
return (false);
};
voice.kill();
removeChild(voice);
voice = new VoiceHolder();
voice.startVoice(_arg1, _arg2, _arg3, (_arg5 * voiceVolume), _arg6);
addChild(voice);
if (voiceGuide != null){
voiceGuide.image.gotoAndStop(_arg4);
voiceGuide.gotoAndStop(2);
};
return (true);
}
public function updMusic(_arg1:Object):void{
var _local2:uint;
if (music != null){
music.upd();
if (music.fadeVol == 0){
music = null;
};
};
}
public function unMuteMe():void{
if (music != null){
music.unMuteMusic();
};
}
public function muteMe():void{
if (music != null){
music.muteMusic();
};
}
public function startVoices(){
if (theFrame == 8){
voiceClipArray = [true, true, true, true, true];
voiceSortArray = [50, -1, -1, -1, -1];
} else {
if ((((theFrame == 9)) || ((theFrame == 10)))){
voiceClipArray = [true, true, true, true, true, true];
voiceSortArray = [-1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 11){
voiceClipArray = [true, true, true, true, true, true, true];
voiceSortArray = [-1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 12){
voiceClipArray = [true, true, true, true];
voiceSortArray = [-1, -1, -1, -1];
} else {
if (theFrame == 13){
voiceClipArray = [true, true, true, true, true, true];
voiceSortArray = [30, -1, -1, -1, -1, -1];
} else {
if (theFrame == 14){
voiceClipArray = [true, true, true, true, true, true, true, true];
voiceSortArray = [-1, -1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 15){
voiceClipArray = [true, true, true, true, true, true, true];
voiceSortArray = [16, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 16){
voiceClipArray = [true, true, true, true, true, true];
voiceSortArray = [-1, -1, -1, -1, -1, -1];
} else {
if ((((((theFrame == 17)) || ((theFrame == 18)))) || ((theFrame == 19)))){
voiceClipArray = [true, true, true, true, true, true, true, true, true];
voiceSortArray = [-1, -1, -1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 20){
voiceClipArray = [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true];
voiceSortArray = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, (-1 - 1), -1, -1, -1, -1, -1, -1];
};
};
};
};
};
};
};
};
};
};
}
public function setVars(_arg1:MovieClip=null, _arg2:uint=0):void{
var _local3:uint;
voiceGuide = _arg1;
theFrame = _arg2;
startVoices();
}
public function sortVoices(){
if (theFrame == 8){
if (voiceClipArray[0]){
if (voiceSortArray[0] > 0){
var _local1 = voiceSortArray;
var _local2:int;
var _local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[0] == 0){
if (addVoice("instruction1", 3, 285, 1)){
startVoiceTimer(100, 0);
};
};
};
} else {
if (voiceClipArray[1]){
if (voiceSortArray[1] > 0){
_local1 = voiceSortArray;
_local2 = 1;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[1] == 0){
if (addVoice("instruction2", 1, 216, 2)){
startVoiceTimer(10, 1);
};
};
};
};
};
if (voiceClipArray[2]){
if (voiceSortArray[2] > 0){
_local1 = voiceSortArray;
_local2 = 2;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[2] == 0){
if (addVoice("wayin", 2, 150, 3)){
startVoiceTimer(20, 2);
};
};
};
};
} else {
if ((((theFrame == 9)) || ((theFrame == 10)))){
if (voiceClipArray[0]){
if (voiceSortArray[0] > 0){
_local1 = voiceSortArray;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[0] == 0){
if (addVoice("shootshootshoot", 1, 32, 6)){
startVoiceTimer(5, 0);
};
};
};
};
if (!voiceClipArray[4]){
} else {
if (voiceClipArray[3]){
if (voiceSortArray[3] > 0){
_local1 = voiceSortArray;
_local2 = 3;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[3] == 0){
if (addVoice("generalise", 4, 336, 8)){
startVoiceTimer(150, 3);
};
};
};
};
};
if (voiceClipArray[4]){
if (voiceSortArray[4] > 0){
_local1 = voiceSortArray;
_local2 = 4;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[4] == 0){
if (addVoice("yawn", 2, 150, 11)){
startVoiceTimer(30, 4);
};
};
};
};
} else {
if (theFrame == 11){
if (voiceClipArray[2]){
if (voiceSortArray[2] > 0){
_local1 = voiceSortArray;
_local2 = 2;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[2] == 0){
if (mrandom() < 0.5){
if (addVoice("lobstermen", 1, 245, 12)){
startVoiceTimer(5, 2);
};
};
};
};
};
} else {
if (theFrame == 12){
} else {
if (theFrame == 13){
if (voiceClipArray[0]){
if (voiceSortArray[0] > 0){
_local1 = voiceSortArray;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[0] == 0){
if (addVoice("likepirates", 1, 104, 23)){
startVoiceTimer(5, 0);
};
};
};
};
if (voiceClipArray[1]){
if (voiceSortArray[1] > 0){
_local1 = voiceSortArray;
_local2 = 1;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[1] == 0){
if (mrandom() < 0.5){
if (addVoice("arrivedrecently", 2, 135, 24)){
voiceClipArray[1] = false;
};
} else {
if (addVoice("makeway", 2, 155, 25)){
voiceClipArray[1] = false;
};
};
};
};
};
if (voiceClipArray[2]){
if (voiceSortArray[2] > 0){
_local1 = voiceSortArray;
_local2 = 2;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[2] == 0){
if (addVoice("captain", 3, 64, 26)){
startVoiceTimer(5, 2);
};
};
};
} else {
if (((voiceClipArray[3]) && (voiceClipArray[4]))){
if (voiceSortArray[3] > 0){
_local1 = voiceSortArray;
_local2 = 3;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[3] == 0){
if (addVoice("negotiate", 1, 105, 27)){
startVoiceTimer(5, 3);
};
};
};
};
};
if (voiceClipArray[4]){
if (voiceSortArray[4] > 0){
_local1 = voiceSortArray;
_local2 = 4;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[4] == 0){
if (addVoice("avastyeface", 1, 128, 28)){
startVoiceTimer(5, 4);
};
};
};
};
} else {
if (theFrame == 14){
if (voiceClipArray[0]){
if (voiceSortArray[0] > 0){
_local1 = voiceSortArray;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[0] == 0){
if (addVoice("odd", 2, 70, 30)){
startVoiceTimer(5, 0);
};
};
};
};
if (voiceClipArray[1]){
if (voiceSortArray[1] > 0){
_local1 = voiceSortArray;
_local2 = 1;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[1] == 0){
if (addVoice("messingaround", 3, 70, 31)){
startVoiceTimer(5, 1);
};
};
};
};
if (voiceClipArray[2]){
if (voiceSortArray[2] > 0){
_local1 = voiceSortArray;
_local2 = 2;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[2] == 0){
if (addVoice("coat", 3, 63, 32)){
startVoiceTimer(5, 2);
};
};
};
};
if (voiceClipArray[3]){
if (voiceSortArray[3] > 0){
_local1 = voiceSortArray;
_local2 = 3;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[3] == 0){
if (addVoice("getout", 3, 90, 33)){
startVoiceTimer(5, 3);
};
};
};
};
if (voiceClipArray[4]){
if (voiceSortArray[4] > 0){
_local1 = voiceSortArray;
_local2 = 4;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[4] == 0){
if (addVoice("leave", 3, 126, 34)){
startVoiceTimer(5, 4);
};
};
};
};
if (voiceClipArray[5]){
if (voiceSortArray[5] > 0){
_local1 = voiceSortArray;
_local2 = 5;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[5] == 0){
if (addVoice("deactivate", 3, 147, 35)){
startVoiceTimer(5, 5);
};
};
};
};
if (voiceClipArray[6]){
if (voiceSortArray[6] > 0){
_local1 = voiceSortArray;
_local2 = 6;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[6] == 0){
if (addVoice("scream", 3, 20, 36)){
startVoiceTimer(6, 6);
};
};
};
};
if (voiceClipArray[7]){
if (voiceSortArray[7] > 0){
_local1 = voiceSortArray;
_local2 = 7;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[7] == 0){
if (addVoice("falsealarm", 3, 56, 37)){
startVoiceTimer(5, 7);
};
};
};
};
} else {
if (theFrame == 15){
if (voiceClipArray[0]){
if (voiceSortArray[0] > 0){
_local1 = voiceSortArray;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[0] == 0){
if (addVoice("speakerson", 2, 108, 38)){
startVoiceTimer(5, 0);
};
};
};
};
if (voiceClipArray[1]){
if (voiceSortArray[1] > 0){
_local1 = voiceSortArray;
_local2 = 1;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[1] == 0){
if (addVoice("aheadsup", 1, 40, 39)){
startVoiceTimer(5, 1);
};
};
};
};
if (voiceClipArray[2]){
if (voiceSortArray[2] > 0){
_local1 = voiceSortArray;
_local2 = 2;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[2] == 0){
if (addVoice("evilcrab", 2, 115, 40)){
startVoiceTimer(5, 2);
};
};
};
};
if (((voiceClipArray[3]) && (voiceClipArray[6]))){
if (voiceSortArray[3] > 0){
_local1 = voiceSortArray;
_local2 = 3;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[3] == 0){
if (addVoice("arelief", 1, 87, 41)){
startVoiceTimer(5, 3);
};
};
};
};
if (voiceClipArray[4]){
if (voiceSortArray[4] > 0){
_local1 = voiceSortArray;
_local2 = 4;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[4] == 0){
if (addVoice("crabbattle", 3, 30, 42)){
startVoiceTimer(5, 4);
};
};
};
};
if (voiceClipArray[5]){
if (voiceSortArray[5] > 0){
_local1 = voiceSortArray;
_local2 = 5;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[5] == 0){
if (addVoice("cull", 2, 50, 43)){
startVoiceTimer(5, 5);
};
};
};
};
} else {
if (theFrame == 16){
if (voiceClipArray[0]){
if (voiceSortArray[0] > 0){
_local1 = voiceSortArray;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[0] == 0){
if (addVoice("grabbit", 2, 68, 44)){
startVoiceTimer(5, 0);
};
};
};
};
if (voiceClipArray[1]){
if (voiceSortArray[1] > 0){
_local1 = voiceSortArray;
_local2 = 1;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[1] == 0){
if (addVoice("toolate", 2, 24, 45)){
startVoiceTimer(5, 1);
};
};
};
};
if (voiceClipArray[2]){
if (voiceSortArray[2] > 0){
_local1 = voiceSortArray;
_local2 = 2;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[2] == 0){
if (addVoice("comeon", 2, 48, 46)){
startVoiceTimer(5, 2);
};
};
};
};
if (voiceClipArray[3]){
if (voiceSortArray[3] > 0){
_local1 = voiceSortArray;
_local2 = 3;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[3] == 0){
if (addVoice("takeit", 2, 87, 47)){
startVoiceTimer(5, 3);
};
};
};
};
if (voiceClipArray[4]){
if (voiceSortArray[4] > 0){
_local1 = voiceSortArray;
_local2 = 4;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[4] == 0){
if (addVoice("pathsplitsagain", 2, 108, 48)){
startVoiceTimer(5, 4);
};
};
};
};
if (voiceClipArray[5]){
if (voiceSortArray[5] > 0){
_local1 = voiceSortArray;
_local2 = 5;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[5] == 0){
if (addVoice("losingher", 2, 33, 49)){
startVoiceTimer(5, 5);
};
};
};
};
} else {
if ((((((theFrame == 17)) || ((theFrame == 18)))) || ((theFrame == 19)))){
if (voiceClipArray[1]){
if (voiceSortArray[1] > 0){
_local1 = voiceSortArray;
_local2 = 1;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[1] == 0){
if (addVoice("committed", 5, 135, 50)){
startVoiceTimer(135, 1);
};
};
};
} else {
if (voiceClipArray[2]){
if (voiceSortArray[2] > 0){
_local1 = voiceSortArray;
_local2 = 2;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[2] == 0){
if (addVoice("hundredpercent", 5, 144, 51)){
startVoiceTimer(144, 2);
};
};
};
} else {
if (voiceClipArray[0]){
if (voiceSortArray[0] > 0){
_local1 = voiceSortArray;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[0] == 0){
if (addVoice("goingtodo", 5, 34, 52)){
startVoiceTimer(14, 0);
};
};
};
} else {
if (voiceClipArray[3]){
if (voiceSortArray[3] > 0){
_local1 = voiceSortArray;
_local2 = 3;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[3] == 0){
if (addVoice("strumpet", 5, 48, 53)){
startVoiceTimer(18, 3);
};
};
};
} else {
if (voiceClipArray[4]){
if (voiceSortArray[4] > 0){
_local1 = voiceSortArray;
_local2 = 4;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[4] == 0){
if (addVoice("takeback", 5, 50, 54)){
startVoiceTimer(50, 4);
};
};
};
} else {
if (voiceClipArray[5]){
if (voiceSortArray[5] > 0){
_local1 = voiceSortArray;
_local2 = 5;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[5] == 0){
if (addVoice("oursoursours", 5, 75, 55)){
startVoiceTimer(75, 5);
};
};
};
} else {
if (voiceClipArray[6]){
if (voiceSortArray[6] > 0){
_local1 = voiceSortArray;
_local2 = 6;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[6] == 0){
if (addVoice("trustme", 5, 65, 56)){
startVoiceTimer(65, 6);
};
};
};
} else {
if (voiceClipArray[7]){
if (voiceSortArray[7] > 0){
_local1 = voiceSortArray;
_local2 = 7;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[7] == 0){
if (addVoice("aplan", 5, 30, 57)){
startVoiceTimer(30, 7);
};
};
};
} else {
if (voiceClipArray[8]){
if (voiceSortArray[8] > 0){
_local1 = voiceSortArray;
_local2 = 8;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[8] == 0){
if (addVoice("bruteforce", 5, 110, 58)){
startVoiceTimer(110, 8);
};
};
};
};
};
};
};
};
};
};
};
};
} else {
if (theFrame == 20){
if (voiceClipArray[0]){
if (voiceSortArray[0] > 0){
_local1 = voiceSortArray;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[0] == 0){
if (addVoice("noturningback", 5, 73, 59)){
startVoiceTimer(5, 0);
};
};
};
};
if (voiceClipArray[1]){
if (voiceSortArray[1] > 0){
_local1 = voiceSortArray;
_local2 = 1;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[1] == 0){
if (addVoice("theresheis", 5, 23, 60)){
startVoiceTimer(5, 1);
};
};
};
};
if (voiceClipArray[2]){
if (voiceSortArray[2] > 0){
_local1 = voiceSortArray;
_local2 = 2;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[2] == 0){
if (addVoice("elementofsurprise", 5, 30, 61)){
startVoiceTimer(4, 2);
};
};
};
} else {
if (voiceClipArray[3]){
if (voiceSortArray[3] > 0){
_local1 = voiceSortArray;
_local2 = 3;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[3] == 0){
if (addVoice("heythere", 5, 30, 62)){
startVoiceTimer(5, 3);
};
};
};
} else {
if (voiceClipArray[4]){
if (voiceSortArray[4] > 0){
_local1 = voiceSortArray;
_local2 = 4;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[4] == 0){
if (addVoice("bugger", 5, 15, 63)){
startVoiceTimer(5, 4);
};
};
};
};
};
};
if (((((((!(voiceClipArray[8])) || (!(voiceClipArray[10])))) || (!(voiceClipArray[14])))) || (!(voiceClipArray[18])))){
} else {
if (voiceClipArray[5]){
if (voiceSortArray[5] > 0){
_local1 = voiceSortArray;
_local2 = 5;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[5] == 0){
if (addVoice("handover", 5, 70, 64)){
startVoiceTimer(5, 5);
};
};
};
} else {
if (voiceClipArray[6]){
if (voiceSortArray[6] > 0){
_local1 = voiceSortArray;
_local2 = 6;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[6] == 0){
if (addVoice("herefirst", 5, 82, 65)){
startVoiceTimer(5, 6);
};
};
};
} else {
if (voiceClipArray[7]){
if (voiceSortArray[7] > 0){
_local1 = voiceSortArray;
_local2 = 7;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[7] == 0){
if (addVoice("technically", 5, 45, 66)){
startVoiceTimer(5, 7);
};
};
};
};
};
};
};
if (((((!(voiceClipArray[10])) || (!(voiceClipArray[14])))) || (!(voiceClipArray[18])))){
} else {
if (voiceClipArray[8]){
if (voiceSortArray[8] > 0){
_local1 = voiceSortArray;
_local2 = 8;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[8] == 0){
if (addVoice("vienna", 5, 100, 67)){
startVoiceTimer(5, 8);
};
};
};
} else {
if (voiceClipArray[9]){
if (voiceSortArray[9] > 0){
_local1 = voiceSortArray;
_local2 = 9;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[9] == 0){
if (addVoice("nottalk", 5, 57, 68)){
startVoiceTimer(5, 9);
};
};
};
};
};
};
if (((!(voiceClipArray[14])) || (!(voiceClipArray[18])))){
} else {
if (voiceClipArray[10]){
if (voiceSortArray[10] > 0){
_local1 = voiceSortArray;
_local2 = 10;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[10] == 0){
if (addVoice("yourewinning", 21, 70, 69)){
startVoiceTimer(5, 10);
};
};
};
} else {
if (voiceClipArray[11]){
if (voiceSortArray[11] > 0){
_local1 = voiceSortArray;
_local2 = 11;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[11] == 0){
if (addVoice("shootingat", 5, 110, 70)){
startVoiceTimer(5, 11);
};
};
};
} else {
if (voiceClipArray[12]){
if (voiceSortArray[12] > 0){
_local1 = voiceSortArray;
_local2 = 12;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[12] == 0){
if (addVoice("yourmother", 5, 74, 71)){
startVoiceTimer(5, 12);
};
};
};
} else {
if (voiceClipArray[13]){
if (voiceSortArray[13] > 0){
_local1 = voiceSortArray;
_local2 = 13;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[13] == 0){
if (addVoice("waitwhat", 5, 27, 72)){
startVoiceTimer(5, 13);
};
};
};
};
};
};
};
};
if (!voiceClipArray[18]){
} else {
if (voiceClipArray[14]){
if (voiceSortArray[14] > 0){
_local1 = voiceSortArray;
_local2 = 14;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[14] == 0){
if (addVoice("tiringout", 5, 36, 73)){
startVoiceTimer(5, 14);
};
};
};
} else {
if (voiceClipArray[15]){
if (voiceSortArray[15] > 0){
_local1 = voiceSortArray;
_local2 = 15;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[15] == 0){
if (addVoice("matureway", 5, 80, 74)){
startVoiceTimer(5, 15);
};
};
};
} else {
if (voiceClipArray[16]){
if (voiceSortArray[16] > 0){
_local1 = voiceSortArray;
_local2 = 16;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[16] == 0){
if (addVoice("canthear", 5, 126, 75)){
startVoiceTimer(5, 16);
};
};
};
};
};
};
};
if (voiceClipArray[17]){
if (voiceSortArray[17] > 0){
_local1 = voiceSortArray;
_local2 = 17;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[17] == 0){
if (addVoice("solvedforever", 5, 126, 76)){
startVoiceTimer(5, 17);
};
};
};
};
if (voiceClipArray[18]){
if (voiceSortArray[18] > 0){
_local1 = voiceSortArray;
_local2 = 18;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[18] == 0){
if (addVoice("champions", 5, 100, 77)){
startVoiceTimer(5, 18);
};
};
};
} else {
if (voiceClipArray[19]){
if (voiceSortArray[19] > 0){
_local1 = voiceSortArray;
_local2 = 19;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[19] == 0){
if (addVoice("exposure", 5, 75, 78)){
startVoiceTimer(5, 19);
};
};
};
} else {
if (voiceClipArray[20]){
if (voiceSortArray[20] > 0){
_local1 = voiceSortArray;
_local2 = 20;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
} else {
if (voiceSortArray[20] == 0){
if (addVoice("onboard", 5, 100, 79)){
startVoiceTimer(5, 20);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function effectVoices(_arg1:SoundsEvent){
if (theFrame == 8){
if (_arg1.id == 1){
voiceSortArray[1] = 10;
} else {
if (_arg1.id == 2){
voiceClipArray[0] = false;
voiceClipArray[1] = false;
voiceSortArray[2] = (30 + uint((mrandom() * 50)));
} else {
if (_arg1.id == 3){
if (voiceClipArray[3]){
voiceClipArray[0] = false;
voiceClipArray[1] = false;
voiceClipArray[2] = false;
if (addVoice("killthem", 4, 30, 4)){
startVoiceTimer(5, 3);
};
};
} else {
if (_arg1.id == 4){
if (voiceClipArray[4]){
if (addVoice("theydead", 2, 112, 5)){
startVoiceTimer(20, 4);
};
};
};
};
};
};
} else {
if ((((theFrame == 9)) || ((theFrame == 10)))){
if (_arg1.id == 1){
voiceSortArray[0] = 5;
} else {
if (_arg1.id == 2){
if (addVoice("aweapon", 2, 150, 9)){
startVoiceTimer(5, 1);
};
} else {
if (_arg1.id == 3){
if (((((voiceClipArray[2]) && (voiceClipArray[3]))) && (voiceClipArray[4]))){
if (addVoice("cool", 3, 36, 10)){
voiceClipArray[2] = false;
startVoiceTimer(5, 2);
};
};
} else {
if (_arg1.id == 4){
voiceClipArray[1] = false;
voiceSortArray[3] = 10;
} else {
if (_arg1.id == 5){
voiceSortArray[4] = 150;
} else {
if (_arg1.id == 6){
if (voiceClipArray[5]){
if (addVoice("bridge", 2, 150, 7)){
voiceClipArray[5] = false;
startVoiceTimer(30, 5);
};
};
};
};
};
};
};
};
} else {
if (theFrame == 11){
if (_arg1.id == 1){
if (voiceClipArray[0]){
if (addVoice("poptarts", 2, 85, 16)){
startVoiceTimer(5, 0);
};
};
} else {
if (_arg1.id == 2){
if (((voiceClipArray[1]) && (!(voiceClipArray[0])))){
if (addVoice("takingcare", 2, 153, 17)){
startVoiceTimer(5, 1);
};
};
} else {
if (_arg1.id == 3){
if (voiceClipArray[2]){
voiceSortArray[2] = 100;
};
} else {
if (_arg1.id == 4){
if (voiceClipArray[3]){
if (addVoice("haunted", 1, 205, 13)){
startVoiceTimer(5, 3);
};
} else {
if (voiceClipArray[4]){
if (addVoice("explorers", 2, 350, 14)){
startVoiceTimer(5, 4);
};
};
};
} else {
if (_arg1.id == 5){
if (voiceClipArray[5]){
if (addVoice("silence", 2, 260, 15)){
startVoiceTimer(5, 5);
};
};
} else {
if (_arg1.id == 6){
if (voiceClipArray[6]){
if (addVoice("pathsplits", 2, 145, 18)){
startVoiceTimer(5, 6);
};
};
};
};
};
};
};
};
} else {
if (theFrame == 12){
if (_arg1.id == 1){
if (voiceClipArray[0]){
if (addVoice("parrotfeathers", 2, 35, 19)){
startVoiceTimer(5, 0);
};
};
} else {
if (_arg1.id == 2){
if (voiceClipArray[1]){
if (addVoice("killthem2", 2, 110, 20)){
startVoiceTimer(5, 1);
};
};
} else {
if (_arg1.id == 3){
if (voiceClipArray[2]){
if (addVoice("weakness", 1, 127, 21)){
startVoiceTimer(5, 2);
};
};
} else {
if (_arg1.id == 4){
if (voiceClipArray[3]){
if (addVoice("democracies", 2, 200, 22)){
startVoiceTimer(5, 3);
};
};
};
};
};
};
} else {
if (theFrame == 13){
if (_arg1.id == 1){
if (voiceClipArray[1]){
voiceSortArray[1] = 75;
};
} else {
if (_arg1.id == 2){
if (voiceClipArray[2]){
if (voiceSortArray[2] < 0){
voiceSortArray[2] = 20;
if (((voiceClipArray[3]) && (voiceClipArray[4]))){
voiceSortArray[3] = 180;
};
};
};
} else {
if (_arg1.id == 3){
if (voiceClipArray[4]){
voiceSortArray[4] = 10;
};
} else {
if (_arg1.id == 4){
if (voiceClipArray[5]){
if (addVoice("wewin", 2, 105, 29)){
startVoiceTimer(5, 5);
};
};
};
};
};
};
} else {
if (theFrame == 14){
if (_arg1.id == 1){
if (voiceClipArray[0]){
voiceSortArray[0] = 99;
};
};
if (_arg1.id == 2){
if (voiceClipArray[1]){
voiceSortArray[1] = 100;
voiceSortArray[2] = 240;
};
};
if (_arg1.id == 3){
if (voiceClipArray[3]){
voiceSortArray[3] = 160;
};
};
if (_arg1.id == 4){
if (voiceClipArray[4]){
voiceSortArray[4] = 5;
};
};
if (_arg1.id == 5){
if (voiceClipArray[5]){
voiceSortArray[5] = 1;
};
};
if (_arg1.id == 6){
if (voiceClipArray[6]){
voiceSortArray[6] = 1;
voiceSortArray[7] = 180;
};
};
} else {
if (theFrame == 15){
if (_arg1.id == 1){
if (voiceClipArray[1]){
voiceSortArray[1] = 40;
voiceSortArray[2] = 120;
voiceSortArray[3] = 333;
};
} else {
if (_arg1.id == 2){
voiceClipArray[6] = false;
} else {
if (_arg1.id == 3){
if (voiceClipArray[4]){
voiceSortArray[4] = 20;
voiceSortArray[5] = 200;
};
};
};
};
} else {
if (theFrame == 16){
if (_arg1.id == 1){
if (voiceClipArray[0]){
voiceSortArray[0] = 10;
voiceSortArray[1] = 75;
voiceSortArray[2] = 110;
voiceSortArray[3] = 200;
};
} else {
if (_arg1.id == 2){
if (voiceClipArray[4]){
voiceSortArray[4] = 10;
voiceSortArray[5] = 250;
};
};
};
} else {
if ((((((theFrame == 17)) || ((theFrame == 18)))) || ((theFrame == 19)))){
if (_arg1.id == 1){
if (voiceClipArray[1]){
voiceSortArray[1] = 10;
voiceSortArray[2] = 11;
voiceSortArray[0] = 11;
voiceSortArray[3] = 11;
voiceSortArray[4] = 11;
voiceSortArray[5] = 11;
voiceSortArray[6] = 11;
voiceSortArray[7] = 11;
voiceSortArray[8] = 11;
};
};
} else {
if (theFrame == 20){
if (_arg1.id == 1){
if (voiceClipArray[0]){
voiceSortArray[0] = 10;
};
} else {
if (_arg1.id == 2){
if (voiceClipArray[1]){
voiceSortArray[1] = 10;
};
} else {
if (_arg1.id == 3){
if (voiceClipArray[2]){
voiceSortArray[2] = 1;
voiceSortArray[3] = 1;
voiceSortArray[4] = 30;
voiceSortArray[5] = 200;
voiceSortArray[6] = 5;
voiceSortArray[7] = 10;
voiceSortArray[8] = 500;
voiceSortArray[9] = 10;
};
} else {
if (_arg1.id == 4){
if (voiceClipArray[10]){
voiceSortArray[10] = 1;
voiceSortArray[11] = 50;
voiceSortArray[12] = 10;
voiceSortArray[13] = 30;
};
} else {
if (_arg1.id == 5){
if (voiceClipArray[14]){
voiceSortArray[14] = 50;
voiceSortArray[15] = 30;
voiceSortArray[16] = 20;
};
} else {
if (_arg1.id == 6){
if (voiceClipArray[17]){
voiceSortArray[17] = 10;
};
} else {
if (_arg1.id == 7){
if (voiceClipArray[18]){
voiceSortArray[18] = 10;
};
} else {
if (_arg1.id == 8){
if (voiceClipArray[19]){
voiceSortArray[19] = 10;
voiceSortArray[20] = 20;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function updSounds(_arg1:Object):void{
var _local2:uint;
_local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].active){
sounds[_local2].upd();
} else {
removeChild(sounds[_local2]);
sounds.splice(_local2, 1);
};
_local2++;
};
}
public function addSound(_arg1:uint, _arg2:Number=1, _arg3:Number=0):Boolean{
var _local4:EffectHolder;
_local4 = new EffectHolder();
_local4.startEffect(_arg1, (_arg2 * soundVolume), _arg3);
sounds.push(_local4);
addChild(_local4);
return (true);
}
}
}//package project.sound
Section 251
//VoiceHold (project.sound.VoiceHold)
package project.sound {
import flash.display.*;
import flash.media.*;
public class VoiceHold extends MovieClip {
public var active:Boolean;// = true
public var id:uint;// = 1
public var soundTime:uint;// = 30
public var soundName:String;
public var soundPriority:uint;
public function VoiceHold():void{
soundTime = 30;
id = 1;
active = true;
super();
gotoAndStop(1);
active = false;
soundTime = 0;
soundPriority = 0;
}
public function startVoice(_arg1:String, _arg2:uint=0, _arg3:uint=30, _arg4:Number=1, _arg5:Number=0):void{
active = true;
soundTime = _arg3;
soundName = _arg1;
soundPriority = _arg2;
switch (_arg1){
case "instruction1":
id = 4;
break;
case "instruction2":
id = 6;
break;
case "wayin":
id = 8;
break;
case "killthem":
id = 10;
break;
case "theydead":
id = 12;
break;
case "shootshootshoot":
id = 14;
break;
case "bridge":
id = 16;
break;
case "generalise":
id = 18;
break;
case "aweapon":
id = 20;
break;
case "cool":
id = 22;
break;
case "yawn":
id = 24;
break;
case "lobstermen":
id = 26;
break;
case "haunted":
id = 28;
break;
case "explorers":
id = 30;
break;
case "silence":
id = 32;
break;
case "poptarts":
id = 34;
break;
case "takingcare":
id = 36;
break;
case "pathsplits":
id = 38;
break;
case "parrotfeathers":
id = 40;
break;
case "killthem2":
id = 42;
break;
case "weakness":
id = 44;
break;
case "democracies":
id = 46;
break;
case "likepirates":
id = 48;
break;
case "arrivedrecently":
id = 50;
break;
case "makeway":
id = 52;
break;
case "captain":
id = 54;
break;
case "negotiate":
id = 56;
break;
case "avastyeface":
id = 58;
break;
case "wewin":
id = 60;
break;
case "odd":
id = 62;
break;
case "messingaround":
id = 64;
break;
case "coat":
id = 66;
break;
case "getout":
id = 68;
break;
case "leave":
id = 70;
break;
case "deactivate":
id = 72;
break;
case "scream":
id = 74;
break;
case "falsealarm":
id = 76;
break;
case "speakerson":
id = 78;
break;
case "aheadsup":
id = 80;
break;
case "evilcrab":
id = 82;
break;
case "arelief":
id = 84;
break;
case "crabbattle":
id = 86;
break;
case "cull":
id = 88;
break;
case "grabbit":
id = 90;
break;
case "toolate":
id = 92;
break;
case "comeon":
id = 94;
break;
case "takeit":
id = 96;
break;
case "pathsplitsagain":
id = 98;
break;
case "losingher":
id = 100;
break;
case "committed":
id = 102;
break;
case "hundredpercent":
id = 106;
break;
case "goingtodo":
id = 108;
break;
case "strumpet":
id = 110;
break;
case "takeback":
id = 112;
break;
case "oursoursours":
id = 114;
break;
case "trustme":
id = 116;
break;
case "aplan":
id = 118;
break;
case "bruteforce":
id = 120;
break;
case "noturningback":
id = 122;
break;
case "theresheis":
id = 124;
break;
case "shoother":
id = 126;
break;
case "elementofsurprise":
id = 128;
break;
case "heythere":
id = 130;
break;
case "bugger":
id = 132;
break;
case "seawench":
id = 134;
break;
case "handover":
id = 136;
break;
case "herefirst":
id = 138;
break;
case "technically":
id = 140;
break;
case "vienna":
id = 142;
break;
case "nottalk":
id = 144;
break;
case "yourewinning":
id = 146;
break;
case "shootingat":
id = 148;
break;
case "yourmother":
id = 150;
break;
case "waitwhat":
id = 152;
break;
case "tiringout":
id = 154;
break;
case "matureway":
id = 156;
break;
case "canthear":
id = 158;
break;
case "solvedforever":
id = 160;
break;
case "champions":
id = 162;
break;
case "exposure":
id = 164;
break;
case "onboard":
id = 166;
break;
};
soundTransform = new SoundTransform(_arg4, _arg5);
}
public function upd():void{
if (currentFrame == 1){
gotoAndStop(id);
} else {
if (soundTime > 0){
soundTime--;
} else {
soundPriority = 0;
active = false;
};
};
}
public function kill():void{
soundPriority = 0;
soundTransform = new SoundTransform(0, 0);
active = false;
}
}
}//package project.sound
Section 252
//MathsStuff (project.tools.MathsStuff)
package project.tools {
import flash.geom.*;
public class MathsStuff {
private static const abs:Function = Math.abs;
private static const atan2:Function = Math.atan2;
private static const distance:Function = Point.distance;
private static const PI:Number = 3.14159265358979;
public static function unitDistance(_arg1:Point, _arg2:Point):Point{
var _local3:Point;
_local3 = _arg2.subtract(_arg1);
_local3.normalize(1);
return (_local3);
}
public static function interRotationSmooth(_arg1:Number, _arg2:Number, _arg3:Number=1, _arg4:Number=20):Number{
var _local5:Number;
_local5 = getAngle(_arg1, _arg2);
if ((((_local5 < ((1 - _arg3) / _arg4))) && ((_local5 > (-((1 - _arg3)) / _arg4))))){
return (_arg2);
};
return ((_arg1 + (_local5 * _arg3)));
}
public static function translationAmount(_arg1:Number, _arg2:Number, _arg3:Number=0.5, _arg4:Number=20):Number{
var _local5:Number;
_local5 = ((_arg2 - _arg1) * _arg3);
if (_local5 > _arg4){
_local5 = _arg4;
} else {
if (_local5 < -(_arg4)){
_local5 = -(_arg4);
};
};
return (_local5);
}
public static function polarRadius(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
_local3 = distance(_arg1, _arg2);
return (_local3);
}
public static function getAngleDegrees(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (_arg2 - _arg1);
while (_local3 > 180) {
_local3 = (_local3 - 360);
};
while (_local3 <= -180) {
_local3 = (_local3 + 360);
};
return (_local3);
}
public static function polarDistance(_arg1:Point, _arg2:Point):Point{
return (new Point(polarRadius(_arg1, _arg2), polarAngle(_arg1, _arg2)));
}
public static function interRotation(_arg1:Number, _arg2:Number, _arg3:Number=1):Number{
var _local4:Number;
_local4 = getAngle(_arg1, _arg2);
if (_local4 > _arg3){
return ((_arg1 + _arg3));
};
if (_local4 < -(_arg3)){
return ((_arg1 - _arg3));
};
return (_arg2);
}
public static function polarDistanceZero(_arg1:Point):Point{
var _local2:Number;
var _local3:Number;
_local2 = distance(new Point(), _arg1);
_local3 = atan2(_arg1.x, _arg1.y);
return (new Point(_local2, _local3));
}
public static function polarAngle(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
_local3 = atan2((_arg2.x - _arg1.x), (_arg1.y - _arg2.y));
return (_local3);
}
public static function getAngle(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (_arg2 - _arg1);
while (_local3 > PI) {
_local3 = (_local3 - (PI * 2));
};
while (_local3 <= -(PI)) {
_local3 = (_local3 + (PI * 2));
};
return (_local3);
}
}
}//package project.tools
Section 253
//Pathfinder (project.tools.Pathfinder)
package project.tools {
import flash.geom.*;
import flash.display.*;
import project.chars.*;
public class Pathfinder {
private const floor:Function;
private const mrandom:Function;
private const abs:Function;
private const distance:Function;
public var obstacles:MovieClip;
private var ref:DisplayObject;
public var water:Boolean;// = false
private var pathArray:Array;
private var nodeArray:Array;
public function Pathfinder(_arg1:Array, _arg2:MovieClip, _arg3:DisplayObject, _arg4:Boolean=false):void{
floor = Math.floor;
mrandom = Math.random;
abs = Math.abs;
distance = Point.distance;
water = false;
super();
nodeArray = _arg1.slice();
obstacles = _arg2;
ref = _arg3;
rePave();
pathArray = new Array();
}
public function drawPath(_arg1:Graphics):void{
var _local2:uint;
if (pathArray.length > 0){
_arg1.clear();
_arg1.lineStyle(2, 17561);
_arg1.moveTo(pathArray[0].x, pathArray[0].y);
_local2 = 1;
while (_local2 < pathArray.length) {
_arg1.lineTo(pathArray[_local2].x, pathArray[_local2].y);
_local2++;
};
};
}
public function drawNodes(_arg1:Graphics):void{
var _local2:uint;
var _local3:uint;
_arg1.clear();
_arg1.lineStyle(2, 17561);
_local2 = 0;
while (_local2 < nodeArray.length) {
_local3 = 0;
while (_local3 < nodeArray[_local2].defcons.length) {
_arg1.moveTo(nodeArray[_local2].x, nodeArray[_local2].y);
_arg1.lineTo(nodeArray[_local2].defcons[_local3][0].x, nodeArray[_local2].defcons[_local3][0].y);
_local3++;
};
_local2++;
};
}
private function shortestPath(_arg1:Array):Array{
var _local2:uint;
var _local3:Array;
var _local4:Array;
_local4 = _arg1.slice();
_local4[0].totalDist = 0;
_local4[0].leader = null;
_local2 = 1;
while (_local2 < _local4.length) {
_local4[_local2].totalDist = 9999;
_local4[_local2].leader = null;
_local2++;
};
while (_local4.length > 0) {
_local4.sortOn("totalDist", 16);
_local2 = 0;
while (_local2 < _local4[0].cons.length) {
if ((_local4[0].totalDist + _local4[0].cons[_local2][1]) < _local4[0].cons[_local2][0].totalDist){
_local4[0].cons[_local2][0].totalDist = (_local4[0].totalDist + _local4[0].cons[_local2][1]);
_local4[0].cons[_local2][0].leader = _local4[0];
};
_local2++;
};
_local4.shift();
};
_local3 = [_arg1[1]];
_local2 = 0;
while (_local2 < 10) {
if (Boolean(_local3[0].leader)){
_local3.unshift(_local3[0].leader);
} else {
break;
};
_local2++;
};
return (_local3);
}
public function targLineSegment(_arg1:LivingObject, _arg2:Point, _arg3:Point, _arg4:Object, _arg5:Number=15):Boolean{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
if (_arg4 == null){
return (true);
};
_local7 = Point.distance(_arg2, _arg3);
_local8 = ((_arg3.x - _arg2.x) / _local7);
_local9 = ((_arg3.y - _arg2.y) / _local7);
_local6 = 0;
while (_local6 < _local7) {
if (water){
} else {
if (_arg1.handleTerrain(((_arg2.x - _arg1.x) + (_local8 * _local6)), ((_arg2.y - _arg1.y) + (_local9 * _local6)), 0, 0, _arg4)){
return (false);
};
};
_local6 = (_local6 + _arg5);
};
return (true);
}
public function goodLineSegment(_arg1:Point, _arg2:Point, _arg3:Number=10, _arg4:Number=10):Boolean{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (obstacles == null){
return (true);
};
_local6 = Point.distance(_arg1, _arg2);
_local7 = ((_arg2.x - _arg1.x) / _local6);
_local8 = ((_arg2.y - _arg1.y) / _local6);
_local5 = 0;
while (_local5 < _local6) {
if (obstacles.hitTestPoint(((_arg1.x + (_local7 * _local5)) - (_local8 * _arg3)), ((_arg1.y + (_local8 * _local5)) + (_local7 * _arg3)), true)){
return (false);
};
if (obstacles.hitTestPoint(((_arg1.x + (_local7 * _local5)) + (_local8 * _arg3)), ((_arg1.y + (_local8 * _local5)) - (_local7 * _arg3)), true)){
return (false);
};
_local5 = (_local5 + _arg4);
};
return (true);
}
public function getLine(_arg1:LivingObject, _arg2:MovieClip, _arg3:Object, _arg4:Number=10):Array{
var _local5:uint;
var _local6:uint;
var _local7:Array;
var _local8:Point;
var _local9:Point;
var _local10:Number;
_local7 = nodeArray.slice();
_local7.unshift(_arg2);
_local7.unshift(_arg1);
_arg1.defcons = new Array();
_arg2.defcons = new Array();
_local5 = 0;
while (_local5 < _local7.length) {
_local7[_local5].cons = _local7[_local5].defcons.slice();
_local5++;
};
_local8 = new Point(_local7[0].x, _local7[0].y);
_local9 = new Point(_local7[1].x, _local7[1].y);
if (targLineSegment(_arg1, _local8, _local9, _arg3, _arg4)){
_local10 = Point.distance(ref.localToGlobal(_local8), ref.localToGlobal(_local9));
_local7[0].cons.push([_local7[1], _local10]);
_local7[1].cons.push([_local7[0], _local10]);
};
_local5 = 0;
while (_local5 < 2) {
_local8 = new Point(_local7[_local5].x, _local7[_local5].y);
_local6 = 2;
while (_local6 < _local7.length) {
_local9 = new Point(_local7[_local6].x, _local7[_local6].y);
if (targLineSegment(_arg1, _local8, _local9, _arg3, _arg4)){
_local10 = Point.distance(ref.localToGlobal(_local8), ref.localToGlobal(_local9));
_local7[_local5].cons.push([_local7[_local6], _local10]);
_local7[_local6].cons.push([_local7[_local5], _local10]);
};
_local6++;
};
_local5++;
};
pathArray = shortestPath(_local7);
return (pathArray);
}
public function rePave():void{
var _local1:uint;
var _local2:uint;
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Boolean;
_local6 = false;
_local1 = 0;
while (_local1 < nodeArray.length) {
nodeArray[_local1].defcons = new Array();
_local1++;
};
_local1 = 0;
while (_local1 < nodeArray.length) {
_local3 = ref.localToGlobal(new Point(nodeArray[_local1].x, nodeArray[_local1].y));
_local2 = 0;
while (_local2 < _local1) {
_local4 = ref.localToGlobal(new Point(nodeArray[_local2].x, nodeArray[_local2].y));
if (goodLineSegment(_local3, _local4)){
_local5 = Point.distance(_local3, _local4);
nodeArray[_local1].defcons.push([nodeArray[_local2], _local5]);
nodeArray[_local2].defcons.push([nodeArray[_local1], _local5]);
};
_local2++;
};
_local1++;
};
}
public function randomClose(_arg1:MovieClip, _arg2:Number=3, _arg3:Number=50, _arg4:MovieClip=null):MovieClip{
var _local5:Array;
var _local6:uint;
var _local7:uint;
_local5 = nodeArray.slice();
_local7 = floor((mrandom() * _arg2));
_local6 = 0;
while (_local6 < _local5.length) {
_local5[_local6].dist = abs((_arg3 - Point.distance(new Point(_local5[_local6].x, _local5[_local6].y), new Point(_arg1.x, _arg1.y))));
if (_local5[_local6] == _arg4){
_local5[_local6].dist = 9999;
};
_local6++;
};
_local5.sortOn("dist", 16);
return (_local5[_local7]);
}
public static function drawAPath(_arg1:Graphics, _arg2:Array):void{
var _local3:uint;
if (_arg2.length > 0){
_arg1.clear();
_arg1.lineStyle(2, 17561);
_arg1.moveTo(_arg2[0].x, _arg2[0].y);
_local3 = 1;
while (_local3 < _arg2.length) {
_arg1.lineTo(_arg2[_local3].x, _arg2[_local3].y);
_local3++;
};
};
}
public static function nextNode(_arg1:MovieClip, _arg2:Array):MovieClip{
var _local3:uint;
_local3 = 0;
if (((Boolean(_arg2[(_local3 + 1)])) && ((_arg2[_local3] == _arg1)))){
_local3 = (_local3 + 1);
};
if (_arg2[_local3] == _arg1){
return (null);
};
return (_arg2[_local3]);
}
}
}//package project.tools
Section 254
//GameManager (project.GameManager)
package project {
import flash.geom.*;
import flash.display.*;
import project.chars.*;
import flash.events.*;
import project.myevents.*;
import com.mtvn.services.core.data.user.*;
import com.mtvn.services.core.events.*;
import com.mtvn.services.core.*;
import flash.net.*;
import com.mtvn.services.core.commands.highscores.*;
import project.sound.*;
public class GameManager extends MovieClip {
public const weaponAmmoMaxes:Array;
public const goldAmounts:Array;
public const healthAmounts:Array;
public const weaponAmmoIncrements:Array;
public var introUI:MovieClip;
private var gunDown:Boolean;// = false
private var pauseGraphic:MovieClip;
private var screenshotData:BitmapData;
public var menuUI:MovieClip;
public var theSplash:MovieClip;
public var dotsUnhappy:DotUnhappy;
public var health:Number;
public var gold:Number;// = 0
public var medals:Array;
public var sc10:MovieClip;
public var sc11:MovieClip;
public var sc12:MovieClip;
public var sc13Back:MovieClip;
public var musicHold:MusicHolder;
public var pauseBtn:MovieClip;
public var sc13:MovieClip;
private var ui:MovieClip;
public var preLoader:MovieClip;
public var tearEffect:MovieClip;
public var adDoor:uint;// = 0
public var dotsHappy:DotHappy;
public var theEndUI:MovieClip;
private var gunPressed:Boolean;// = false
public var thetime:Number;// = 0
public var advancing:Boolean;// = false
public var ammo:Number;// = 0
public var kills:Number;// = 0
public var fearEffect:MovieClip;
private var screenshotCharImage:Bitmap;
public var serviceClient:ServiceClient;
private var player:Player;
public var gameOverUI:MovieClip;
public var isPaused:Boolean;// = false
public var adFrame:uint;// = 0
private var qualityIndex:uint;// = 1
public var firstOpen:Boolean;// = true
public var achievements:MovieClip;
public var soundGuide:MovieClip;
private var deathTimer:uint;// = 0
public var targFrame:uint;// = 6
public var myScreen:ScreenHandler;
public var gui:MainUIMain;
public var weaponsAmmo:Array;
private var kicked:Boolean;// = false
public var frame:uint;
private var level:ScreenHandler;
public var pentagon:Pentagon;
private var dataHold:SharedObject;
private var screenshotImage:Bitmap;
public var soundManager:SoundManager;
private var inputBox:InputHandler;
private var screenshotCharData:BitmapData;
public var dotsMysterious:DotMysterious;
public var screensVisited:Array;
public var weapons:Array;
public var playArea:MovieClip;
public var sc2:MovieClip;
public var sc3:MovieClip;
public var sc4:MovieClip;
public var sc5:MovieClip;
public var sc6:MovieClip;
public var sc7:MovieClip;
public var sc1:MovieClip;
public var sc9:MovieClip;
public var theWeapon:uint;
public var sc8:MovieClip;
public var soul:Number;// = 0
public var trinkets:Array;
public function GameManager():void{
thetime = 0;
gold = 0;
ammo = 0;
kills = 0;
soul = 0;
weaponAmmoIncrements = [0, 25, 60, 45, 15, 120, 20];
weaponAmmoMaxes = [0, 80, 250, 120, 50, 800, 60];
goldAmounts = [20, 65, 125, 300];
healthAmounts = [20, 50, 100];
isPaused = false;
qualityIndex = 1;
targFrame = 6;
deathTimer = 0;
dataHold = SharedObject.getLocal("eddy_19492_beach");
kicked = false;
gunPressed = false;
gunDown = false;
advancing = false;
adFrame = 0;
adDoor = 0;
firstOpen = true;
super();
addFrameScript(0, frame1, 1, frame2, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 37, frame38);
addEventListener(Event.ADDED_TO_STAGE, initialiseServices);
}
public function onGunRelease(_arg1:Event):void{
gunDown = false;
}
public function countTrinkets():void{
var _local1:uint;
var _local2:uint;
_local1 = 0;
_local2 = 0;
_local1 = 0;
while (_local1 < 4) {
if (trinkets[_local1]){
_local2++;
};
_local1++;
};
if (_local2 == 4){
addMedal(11);
};
}
public function frameEnd():void{
if (Boolean(player)){
player.removeEventListener("useAttack", onWeaponFire);
player.removeEventListener("hurt", onPlayerHurt);
player.removeEventListener("ammoGet", onAmmoGet);
player.removeEventListener("goldGet", onGoldGet);
player.removeEventListener("medPackGet", onMedPackGet);
player.removeEventListener("weaponGet", onWeaponGet);
};
if (Boolean(pauseGraphic)){
pauseGraphic.visible = (isPaused = false);
} else {
isPaused = false;
};
if (Boolean(ui)){
ui.removeEventListener("introOver", onIntroOver);
ui.removeEventListener("gameStart", onGameStart);
ui.removeEventListener("gameContinue", onGameContinue);
ui.removeEventListener("mainMenu", onMainMenu);
ui.removeEventListener("agSplash", onAGSplash);
ui.removeEventListener("gameFinished", onGameFinish);
};
if (Boolean(level)){
level.removeEventListener("narrationEvent", soundManager.effectVoices);
level.removeEventListener("soundEvent", soundManager.effectSounds);
level.removeEventListener("frameEnd", onLevelEnd);
};
}
public function frameExit(_arg1:uint=6):void{
frameEnd();
targFrame = _arg1;
gotoAndPlay(25);
if (level != null){
level.finishUp();
};
}
public function initialiseServices(_arg1:Event):void{
serviceClient = new ServiceClient("sandsofdoom", stage);
inputBox = new InputHandler();
stage.addEventListener(KeyboardEvent.KEY_DOWN, inputBox.inKeyPress);
stage.addEventListener(KeyboardEvent.KEY_UP, inputBox.inKeyRelease);
stage.addEventListener(MouseEvent.MOUSE_DOWN, inputBox.inMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, inputBox.inMouseUp);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, inputBox.inMouseWheel);
inputBox.addEventListener("gunPressed", onGunPress);
inputBox.addEventListener("gunReleased", onGunRelease);
inputBox.addEventListener("kick", onKick);
inputBox.addEventListener("weaponUp", nextWeapon);
inputBox.addEventListener("weaponDown", prevWeapon);
inputBox.addEventListener("weapon1", weapon1);
inputBox.addEventListener("weapon2", weapon2);
inputBox.addEventListener("weapon3", weapon3);
inputBox.addEventListener("weapon4", weapon4);
inputBox.addEventListener("weapon5", weapon5);
inputBox.addEventListener("inputPause", pauseEvent);
stage.addEventListener(Event.DEACTIVATE, gamePause2);
addEventListener("gamePauseEvent", gamePause);
addEventListener("gameUnpauseEvent", gameUnpause);
inputBox.addEventListener("inputQualityUp", qualityUp);
inputBox.addEventListener("inputQualityDown", qualityDown);
addEventListener(Event.ENTER_FRAME, frameEnter);
init(true);
qualityIndex = 1;
stage.quality = StageQuality.MEDIUM;
if (!dataHold.data.isset){
dataHold.data.isset = true;
screensVisited = new Array();
medals = new Array();
trinkets = new Array();
dataSave();
};
soundManager = new SoundManager();
addChild(soundManager);
MyButton.soundHold = soundManager;
firstOpen = true;
}
public function prevWeapon(_arg1:Event){
var _local2:uint;
_local2 = getWeaponInd();
do {
_local2 = ((_local2 + 4) % 5);
} while ((((weapons[_local2] == 0)) || ((((weaponsAmmo[_local2] == 0)) && (!((_local2 == 0)))))));
theWeapon = weapons[_local2];
ui.reJig(state);
}
public function onGameContinue(_arg1:Event):void{
frameGo();
soundManager.fadeMusic(5);
}
function frame10(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc3, sc3.playerMain, sc3.borders, sc3.mapTypes, sc3.mapHeights, playArea, currentFrame);
myScreen.setSystems([{clip:sc3.exit1, effect:sc3.exitEff1, targFrame:10, targDoor:2}], [sc3.bridge1, sc3.bridge2, sc3.bridge3, sc3.bridge4, sc3.bridge5, sc3.bridge6], [], [sc3.bridge1, sc3.bridge2, sc3.bridge3, sc3.bridge4, sc3.bridge5, sc3.bridge6, sc3.activator1, sc3.activator2, sc3.activator3, sc3.activator4, sc3.activator5, sc3.activator6], [{tar:sc3.activator1, sys:sc3.bridge1, thresh:77, prev:null}, {tar:sc3.activator2, sys:sc3.bridge2, thresh:109, prev:sc3.activator1}, {tar:sc3.activator3, sys:sc3.bridge3, thresh:103, prev:sc3.activator2}, {tar:sc3.activator4, sys:sc3.bridge4, thresh:71, prev:sc3.activator3}, {tar:sc3.activator5, sys:sc3.bridge5, thresh:109, prev:sc3.activator4}, {tar:sc3.activator6, sys:sc3.bridge6, thresh:91, prev:sc3.activator5}]);
myScreen.setEffects(sc3.effectsTop, sc3.effectsMid, sc3.effectsBase, sc3.effectsWater, sc3.effectsBase2);
myScreen.setPaths([sc3.nd1, sc3.nd2, sc3.nd3, sc3.nd4, sc3.nd5, sc3.nd6, sc3.nd7, sc3.nd8, sc3.nd9, sc3.nd10, sc3.nd11, sc3.nd12, sc3.nd13, sc3.nd14, sc3.nd15, sc3.nd16, sc3.nd17, sc3.nd18, sc3.nd19, sc3.nd20, sc3.nd21, sc3.nd22, sc3.nd23, sc3.nd24], sc3.enemyPaths, sc3);
sc3.playerMain.setUp(sc3.playerMain.the_hitbox);
sc3.playerMain.setMoreUp(sc3.playerTop, sc3.playerBase);
frameStart(gui, myScreen, sc3.playerMain, pauseBtn, true);
soundManager.addMusic(8);
}
public function countMedals():void{
var _local1:uint;
var _local2:uint;
_local1 = 0;
_local2 = 0;
_local1 = 0;
while (_local1 < medals.length) {
if (medals[_local1]){
_local2++;
};
_local1++;
};
}
public function onMedPackGet(_arg1:PickupEvent):void{
var _local2:Array;
_local2 = ["SMALL MEDPACK", "MEDIUM MEDPACK", "LARGE MEDPACK"];
health = (health + healthAmounts[(_arg1.id - 1)]);
if (health > 100){
health = 100;
};
ui.addMessage(_local2[(_arg1.id - 1)], 50);
ui.reJigHealth(state);
}
function frame15(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc8, sc8.playerMain, sc8.borders, sc8.mapTypes, sc8.mapHeights, playArea, currentFrame, 0.1);
myScreen.setSystems([{clip:sc8.exit1, effect:sc8.exitEff1, targFrame:16, targDoor:2}], [sc8.bridge1, sc8.bridge2, sc8.bridge3, sc8.bridge4], [], [sc8.bridge1, sc8.bridge2, sc8.bridge3, sc8.bridge4, sc8.door5, sc8.activator1, sc8.activator2, sc8.activator3, sc8.activator4, sc8.activator5], [{tar:sc8.activator1, sys:sc8.bridge1, thresh:210, prev:null}, {tar:sc8.activator2, sys:sc8.bridge2, thresh:111, prev:sc8.activator1}, {tar:sc8.activator3, sys:sc8.bridge3, thresh:82, prev:sc8.activator2}, {tar:sc8.activator4, sys:sc8.bridge4, thresh:87, prev:sc8.activator3}, {tar:sc8.activator5, sys:sc8.door5, thresh:990, prev:sc8.activator4}], [{tar:sc8.door5, rheight:0x0100}]);
myScreen.setEffects(sc8.effectsTop, sc8.effectsMid, sc8.effectsBase, sc8.effectsWater, sc8.effectsBase2);
myScreen.setPaths([sc8.nd1, sc8.nd2, sc8.nd3, sc8.nd4, sc8.nd5, sc8.nd6, sc8.nd7, sc8.nd8, sc8.nd9, sc8.nd10, sc8.nd11, sc8.nd12, sc8.nd13, sc8.nd14, sc8.nd15, sc8.nd16, sc8.nd17, sc8.nd18, sc8.nd19, sc8.nd20, sc8.nd21, sc8.nd22, sc8.nd23, sc8.nd24], sc8.enemyPaths, sc8);
sc8.playerMain.setUp(sc8.playerMain.the_hitbox);
sc8.playerMain.setMoreUp(sc8.playerTop, sc8.playerBase);
frameStart(gui, myScreen, sc8.playerMain, pauseBtn, true);
soundManager.addMusic(8);
}
public function qualityDown(_arg1:Event):void{
if (qualityIndex == 2){
qualityIndex = 1;
stage.quality = StageQuality.MEDIUM;
} else {
if (qualityIndex == 1){
qualityIndex = 0;
stage.quality = StageQuality.LOW;
};
};
}
function frame18(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc11, sc11.playerMain, sc11.borders, sc11.mapTypes, sc11.mapHeights, playArea, currentFrame, 0.1);
myScreen.setSystems([{clip:sc11.exit1, effect:sc11.exitEff1, targFrame:20, targDoor:2}], [sc11.bridge1, sc11.bridge9], [], [sc11.bridge1, sc11.stair2, sc11.stair3, sc11.stair4, sc11.stair5, sc11.stair6, sc11.stair7, sc11.stair8, sc11.bridge9, sc11.activator1, sc11.activator2, sc11.activator3, sc11.activator4, sc11.activator5, sc11.activator6, sc11.activator7, sc11.activator8], [{tar:sc11.activator1, sys:sc11.bridge1, thresh:90, prev:null}, {tar:sc11.activator2, sys:sc11.stair2, thresh:200, prev:sc11.activator1}, {tar:sc11.activator3, sys:sc11.stair3, thresh:200, prev:sc11.activator1}, {tar:sc11.activator4, sys:sc11.stair4, thresh:223, prev:sc11.activator3}, {tar:sc11.activator5, sys:sc11.stair5, thresh:113, prev:sc11.activator4}, {tar:sc11.activator6, sys:sc11.stair6, thresh:403, prev:sc11.activator2}, {tar:sc11.activator7, sys:sc11.stair7, thresh:103, prev:sc11.activator1}, {tar:sc11.activator8, sys:sc11.stair8, thresh:403, prev:sc11.activator7}, {tar:sc11.activator9, sys:sc11.bridge9, thresh:393, prev:sc11.activator8}], [{tar:sc11.stair2, rheight:100}, {tar:sc11.stair3, rheight:100}, {tar:sc11.stair4, rheight:100}, {tar:sc11.stair5, rheight:100}, {tar:sc11.stair6, rheight:100}, {tar:sc11.stair7, rheight:100}, {tar:sc11.stair8, rheight:100}]);
myScreen.setEffects(sc11.effectsTop, sc11.effectsMid, sc11.effectsBase, sc11.effectsWater, sc11.effectsBase2);
myScreen.setPaths([sc11.nd1, sc11.nd2, sc11.nd3, sc11.nd4, sc11.nd5, sc11.nd6, sc11.nd7, sc11.nd8, sc11.nd9, sc11.nd10, sc11.nd11, sc11.nd12, sc11.nd13, sc11.nd14, sc11.nd15, sc11.nd16, sc11.nd17, sc11.nd18, sc11.nd19, sc11.nd20, sc11.nd21, sc11.nd22, sc11.nd23, sc11.nd24, sc11.nd25, sc11.nd26, sc11.nd27, sc11.nd28, sc11.nd29, sc11.nd30, sc11.nd31, sc11.nd32, sc11.nd33, sc11.nd34, sc11.nd35, sc11.nd36, sc11.nd37, sc11.nd38, sc11.nd39, sc11.nd40, sc11.nd41, sc11.nd42, sc11.nd43, sc11.nd44, sc11.nd45, sc11.nd46, sc11.nd47, sc11.nd48, sc11.nd49, sc11.nd50, sc11.nd51, sc11.nd52, sc11.nd53, sc11.nd54, sc11.nd55, sc11.nd56], sc11.enemyPaths, sc11);
sc11.playerMain.setUp(sc11.playerMain.the_hitbox);
sc11.playerMain.setMoreUp(sc11.playerTop, sc11.playerBase);
frameStart(gui, myScreen, sc11.playerMain, pauseBtn, true);
soundManager.addMusic(16);
}
public function dataSave():void{
dataHold.data.health = health;
dataHold.data.frame = frame;
dataHold.data.door = adDoor;
dataHold.data.theWeapon = theWeapon;
dataHold.data.weapons = weapons.slice();
dataHold.data.weaponsAmmo = weaponsAmmo.slice();
dataHold.data.thetime = thetime;
dataHold.data.gold = gold;
dataHold.data.ammo = ammo;
dataHold.data.kills = kills;
dataHold.data.soul = soul;
dataHold.data.trinkets = trinkets.slice();
dataHold.data.screensVisited = screensVisited.slice();
dataHold.data.medals = medals.slice();
dataHold.flush();
}
function frame5(){
dataLoad();
frameStart(menuUI);
soundManager.addMusic(4);
menuUI.newGame = (frame == 7);
menuUI.trinket1.gotoAndStop(1);
menuUI.trinket2.gotoAndStop(2);
menuUI.trinket3.gotoAndStop(3);
menuUI.trinket4.gotoAndStop(4);
menuUI.trinket1.visible = trinkets[0];
menuUI.trinket2.visible = trinkets[1];
menuUI.trinket3.visible = trinkets[2];
menuUI.trinket4.visible = trinkets[3];
menuUI.cavesMap.visible = screensVisited[0];
menuUI.cavesMap.high1.gotoAndStop(1);
menuUI.cavesMap.high2.gotoAndStop(2);
menuUI.cavesMap.high3.gotoAndStop(3);
menuUI.cavesMap.high4.gotoAndStop(4);
menuUI.cavesMap.high5.gotoAndStop(5);
menuUI.cavesMap.high6.gotoAndStop(6);
menuUI.cavesMap.high7.gotoAndStop(7);
menuUI.cavesMap.high8.gotoAndStop(8);
menuUI.cavesMap.high9.gotoAndStop(9);
menuUI.cavesMap.high10.gotoAndStop(10);
menuUI.cavesMap.high11.gotoAndStop(11);
menuUI.cavesMap.high12.gotoAndStop(12);
menuUI.cavesMap.high13.gotoAndStop(13);
menuUI.cavesMap.high1.visible = screensVisited[0];
menuUI.cavesMap.high2.visible = screensVisited[1];
menuUI.cavesMap.high3.visible = screensVisited[2];
menuUI.cavesMap.high4.visible = screensVisited[3];
menuUI.cavesMap.high5.visible = screensVisited[4];
menuUI.cavesMap.high6.visible = screensVisited[5];
menuUI.cavesMap.high7.visible = screensVisited[6];
menuUI.cavesMap.high8.visible = screensVisited[7];
menuUI.cavesMap.high9.visible = screensVisited[8];
menuUI.cavesMap.high10.visible = screensVisited[9];
menuUI.cavesMap.high11.visible = screensVisited[10];
menuUI.cavesMap.high12.visible = screensVisited[11];
menuUI.cavesMap.high13.visible = screensVisited[12];
menuUI.pirateHat.gotoAndStop(5);
menuUI.pirateHat.visible = medals[13];
menuUI.crabSoup.gotoAndStop(6);
menuUI.crabSoup.visible = medals[14];
}
function frame6(){
frameStart(gameOverUI);
soundManager.addMusic(18);
}
function frame7(){
frameStart(introUI);
soundManager.addMusic(6);
}
public function onGameFinish(_arg1:Event):void{
init(false, true);
frameExit(5);
soundManager.fadeMusic(5);
}
public function levelAdvance(_arg1:uint, _arg2:uint=1){
if (ui != null){
if (ui.fadeOut.currentFrame == 1){
ui.fadeOut.gotoAndStop(2);
advancing = true;
adFrame = _arg1;
adDoor = _arg2;
};
};
}
public function onIntroOver(_arg1:Event):void{
frameAdvance(8, 1);
}
function frame1(){
stop();
}
function frame2(){
stop();
frameStart(preLoader);
}
function frame17(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc10, sc10.playerMain, sc10.borders, sc10.mapTypes, sc10.mapHeights, playArea, currentFrame, 0.1);
myScreen.setSystems([{clip:sc10.exit1, effect:sc10.exitEff1, targFrame:20, targDoor:1}], [sc10.bridge1, sc10.bridge2, sc10.bridge3, sc10.bridge4, sc10.bridge5, sc10.bridge6, sc10.bridge7], [], [sc10.bridge1, sc10.bridge2, sc10.bridge3, sc10.bridge4, sc10.bridge5, sc10.bridge6, sc10.bridge7, sc10.activator1, sc10.activator2, sc10.activator3, sc10.activator4, sc10.activator5, sc10.activator6, sc10.activator7], [{tar:sc10.activator1, sys:sc10.bridge1, thresh:139, prev:null}, {tar:sc10.activator2, sys:sc10.bridge2, thresh:372, prev:sc10.activator1}, {tar:sc10.activator3, sys:sc10.bridge3, thresh:389, prev:sc10.activator2}, {tar:sc10.activator4, sys:sc10.bridge4, thresh:250, prev:sc10.activator3}, {tar:sc10.activator5, sys:sc10.bridge5, thresh:317, prev:sc10.activator4}, {tar:sc10.activator6, sys:sc10.bridge6, thresh:145, prev:sc10.activator5}, {tar:sc10.activator7, sys:sc10.bridge7, thresh:158, prev:sc10.activator6}]);
myScreen.setEffects(sc10.effectsTop, sc10.effectsMid, sc10.effectsBase, sc10.effectsWater, sc10.effectsBase2);
myScreen.setPaths([sc10.nd1, sc10.nd2, sc10.nd3, sc10.nd4, sc10.nd5, sc10.nd6, sc10.nd7, sc10.nd8, sc10.nd9, sc10.nd10, sc10.nd11, sc10.nd12, sc10.nd13, sc10.nd14, sc10.nd15, sc10.nd16, sc10.nd17, sc10.nd18, sc10.nd19, sc10.nd20, sc10.nd21, sc10.nd22, sc10.nd23, sc10.nd24, sc10.nd25, sc10.nd26, sc10.nd27, sc10.nd28, sc10.nd29, sc10.nd30, sc10.nd31, sc10.nd32, sc10.nd33, sc10.nd34, sc10.nd35, sc10.nd36, sc10.nd37, sc10.nd38], sc10.enemyPaths, sc10);
myScreen.setWaterPaths([sc10.wd1, sc10.wd2, sc10.wd3, sc10.wd4, sc10.wd5, sc10.wd6, sc10.wd7, sc10.wd8, sc7.wd9, sc10.wd10, sc10.wd11, sc10.wd12, sc10.wd13, sc10.wd14, sc10.wd15], sc10.waterPaths, sc10);
sc10.playerMain.setUp(sc10.playerMain.the_hitbox);
sc10.playerMain.setMoreUp(sc10.playerTop, sc10.playerBase);
frameStart(gui, myScreen, sc10.playerMain, pauseBtn, true);
soundManager.addMusic(10);
}
public function onWeaponGet(_arg1:PickupEvent):void{
var _local2:Array;
var _local3:uint;
_local2 = ["PISTOL", "STEAM POWERED CROSSBOW", "SEAGULL", "CUTTLEFISH", "BALL BLASTER", "SANDPIPER", "THE SANDCASTLE"];
switch (_arg1.id){
case 2:
_local3 = 1;
break;
case 3:
_local3 = 1;
break;
case 4:
_local3 = 2;
break;
case 5:
_local3 = 3;
break;
case 6:
_local3 = 3;
break;
case 7:
_local3 = 4;
break;
};
weapons[_local3] = _arg1.id;
weaponsAmmo[_local3] = (weaponAmmoIncrements[(_arg1.id - 1)] * 2);
theWeapon = _arg1.id;
ui.addMessage(_local2[(_arg1.id - 1)], 80);
ui.addAnnouncement((_arg1.id - 1));
ui.reJig(state);
}
function frame13(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc6, sc6.playerMain, sc6.borders, sc6.mapTypes, sc6.mapHeights, playArea, currentFrame, 0.2);
myScreen.setSystems([{clip:sc6.exit1, effect:sc6.exitEff1, targFrame:16, targDoor:1}], [], [], [sc6.door1, sc6.door2, sc6.stair3, sc6.stair4, sc6.door3, sc6.activator1, sc6.activator2, sc6.activator3], [{tar:sc6.activator1, sys:sc6.door1, thresh:337, prev:null}, {tar:sc6.activator2, sys:sc6.stair3, thresh:360, prev:sc6.activator1}, {tar:sc6.activator3, sys:sc6.door3, thresh:990, prev:sc6.activator2}], [{tar:sc6.door1, rheight:0x0100}, {tar:sc6.door2, rheight:0x0100}, {tar:sc6.door3, rheight:0x0100}, {tar:sc6.stair3, rheight:100}, {tar:sc6.stair4, rheight:100}]);
myScreen.setEffects(sc6.effectsTop, sc6.effectsMid, sc6.effectsBase, sc6.effectsWater, sc6.effectsBase2);
myScreen.setPaths([sc6.nd1, sc6.nd2, sc6.nd3, sc6.nd4, sc6.nd5, sc6.nd6, sc6.nd7, sc6.nd8, sc6.nd9, sc6.nd10, sc6.nd11, sc6.nd12, sc6.nd13, sc6.nd14, sc6.nd15, sc6.nd16, sc6.nd17, sc6.nd18, sc6.nd19, sc6.nd20, sc6.nd21, sc6.nd22, sc6.nd23, sc6.nd24, sc6.nd25, sc6.nd26, sc6.nd27, sc6.nd28, sc6.nd29], sc6.enemyPaths, sc6);
sc6.playerMain.setUp(sc6.playerMain.the_hitbox);
sc6.playerMain.setMoreUp(sc6.playerTop, sc6.playerBase);
frameStart(gui, myScreen, sc6.playerMain, pauseBtn, true);
soundManager.addMusic(12);
}
function frame8(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc1, sc1.playerMain, sc1.borders, sc1.mapTypes, sc1.mapHeights, playArea, currentFrame);
myScreen.setSystems([{clip:sc1.exit1, effect:sc1.exitEff1, targFrame:9, targDoor:1}, {clip:sc1.exit2, effect:sc1.exitEff2, targFrame:10, targDoor:1}], [sc1.bridge1, sc1.bridge2], [sc1.bridge1], [], []);
myScreen.setEffects(sc1.effectsTop, sc1.effectsMid, sc1.effectsBase, sc1.effectsWater, sc1.effectsBase2);
myScreen.setPaths([sc1.nd1, sc1.nd2, sc1.nd3, sc1.nd4, sc1.nd5, sc1.nd6, sc1.nd7, sc1.nd8, sc1.nd9, sc1.nd10, sc1.nd11, sc1.nd12, sc1.nd13, sc1.nd14], sc1.enemyPaths, sc1);
sc1.playerMain.setUp(sc1.playerMain.the_hitbox);
sc1.playerMain.setMoreUp(sc1.playerTop, sc1.playerBase);
frameStart(gui, myScreen, sc1.playerMain, pauseBtn, true);
soundManager.addMusic(6);
}
public function pauseEvent(_arg1:Event):void{
if (Boolean(pauseGraphic)){
if (isPaused){
dispatchEvent(new Event("gameUnpauseEvent"));
} else {
dispatchEvent(new Event("gamePauseEvent"));
};
} else {
dispatchEvent(new Event("gameUnpauseEvent"));
};
}
function frame9(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc2, sc2.playerMain, sc2.borders, sc2.mapTypes, sc2.mapHeights, playArea, currentFrame);
myScreen.setSystems([{clip:sc2.exit1, effect:sc2.exitEff1, targFrame:10, targDoor:1}], [sc2.bridge1, sc2.bridge2, sc2.bridge3], [], [sc2.bridge1, sc2.bridge2, sc2.bridge3, sc2.activator1, sc2.activator2, sc2.activator3], [{tar:sc2.activator1, sys:sc2.bridge1, thresh:127, prev:null}, {tar:sc2.activator2, sys:sc2.bridge2, thresh:358, prev:sc2.activator1}, {tar:sc2.activator3, sys:sc2.bridge3, thresh:151, prev:sc2.activator2}]);
myScreen.setEffects(sc2.effectsTop, sc2.effectsMid, sc2.effectsBase, sc2.effectsWater, sc2.effectsBase2);
myScreen.setPaths([sc2.nd1, sc2.nd2, sc2.nd3, sc2.nd4, sc2.nd5, sc2.nd6, sc2.nd7, sc2.nd8, sc2.nd9, sc2.nd10, sc2.nd11, sc2.nd12, sc2.nd13, sc2.nd14, sc2.nd15, sc2.nd16, sc2.nd17, sc2.nd18, sc2.nd19, sc2.nd20, sc2.nd21, sc2.nd22, sc2.nd23, sc2.nd24, sc2.nd25, sc2.nd26, sc2.nd27, sc2.nd28, sc2.nd29, sc2.nd30, sc2.nd31], sc2.enemyPaths, sc2);
sc2.playerMain.setUp(sc2.playerMain.the_hitbox);
sc2.playerMain.setMoreUp(sc2.playerTop, sc2.playerBase);
frameStart(gui, myScreen, sc2.playerMain, pauseBtn, true);
soundManager.addMusic(10);
}
function frame11(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc4, sc4.playerMain, sc4.borders, sc4.mapTypes, sc4.mapHeights, playArea, currentFrame, 0.06);
myScreen.setSystems([{clip:sc4.exit1, effect:sc4.exitEff1, targFrame:12, targDoor:1}, {clip:sc4.exit2, effect:sc4.exitEff2, targFrame:14, targDoor:1}], [sc4.bridge1, sc4.bridge2, sc4.bridge3, sc4.bridge4, sc4.bridge5, sc4.bridge6, sc4.bridge7, sc4.bridge8, sc4.bridges1], [], [sc4.bridge1, sc4.bridge2, sc4.bridge3, sc4.bridge4, sc4.bridge5, sc4.bridge6, sc4.bridge7, sc4.bridge8, sc4.activator1, sc4.activator2, sc4.activator3, sc4.activator4, sc4.activator5, sc4.activator6, sc4.activator7, sc4.activator8], [{tar:sc4.activator1, sys:sc4.bridge1, thresh:77, prev:null}, {tar:sc4.activator2, sys:sc4.bridge2, thresh:156, prev:sc4.activator1}, {tar:sc4.activator3, sys:sc4.bridge3, thresh:144, prev:sc4.activator2}, {tar:sc4.activator4, sys:sc4.bridge4, thresh:77, prev:sc4.activator3}, {tar:sc4.activator5, sys:sc4.bridge5, thresh:147, prev:sc4.activator4}, {tar:sc4.activator6, sys:sc4.bridge6, thresh:143, prev:sc4.activator2}, {tar:sc4.activator7, sys:sc4.bridge7, thresh:102, prev:sc4.activator6}, {tar:sc4.activator8, sys:sc4.bridge8, thresh:231, prev:sc4.activator7}]);
myScreen.setEffects(sc4.effectsTop, sc4.effectsMid, sc4.effectsBase, sc4.effectsWater, sc4.effectsBase2);
myScreen.setPaths([sc4.nd1, sc4.nd2, sc4.nd3, sc4.nd4, sc4.nd5, sc4.nd6, sc4.nd7, sc4.nd8, sc4.nd9, sc4.nd10, sc4.nd11, sc4.nd12, sc4.nd13, sc4.nd14, sc4.nd15, sc4.nd16, sc4.nd17, sc4.nd18, sc4.nd19, sc4.nd20, sc4.nd1, sc4.nd22, sc4.nd23, sc4.nd24, sc4.nd25, sc4.nd26, sc4.nd27, sc4.nd28, sc4.nd29, sc4.nd30], sc4.enemyPaths, sc4);
myScreen.setWaterPaths([sc4.wd1, sc4.wd2, sc4.wd3, sc4.wd4, sc4.wd5, sc4.wd6, sc4.wd7, sc4.wd8, sc4.wd9, sc4.wd10, sc4.wd11, sc4.wd12, sc4.wd13, sc4.wd14, sc4.wd15, sc4.wd16, sc4.wd17, sc4.wd18, sc4.wd19, sc4.wd20, sc4.wd21, sc4.wd22, sc4.wd23, sc4.wd24, sc4.wd25, sc4.wd26, sc4.wd27, sc4.wd28, sc4.wd29, sc4.wd30, sc4.wd31, sc4.wd32], sc4.waterPaths, sc4);
sc4.playerMain.setUp(sc4.playerMain.the_hitbox);
sc4.playerMain.setMoreUp(sc4.playerTop, sc4.playerBase);
frameStart(gui, myScreen, sc4.playerMain, pauseBtn, true);
if (adDoor == 2){
sc4.playerMain.x = (sc4.playerTop.x = (sc4.playerBase.x = sc4.door2.x));
sc4.playerMain.y = (sc4.playerTop.y = (sc4.playerBase.y = sc4.door2.y));
sc4.playerMain.rotation = (sc4.playerTop.rotation = (sc4.playerBase.rotation = sc4.door2.rotation));
};
myScreen.snap(sc4.playerMain);
soundManager.addMusic(10);
}
function frame14(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc7, sc7.playerMain, sc7.borders, sc7.mapTypes, sc7.mapHeights, playArea, currentFrame, 0.1);
myScreen.setSystems([{clip:sc7.exit1, effect:sc7.exitEff1, targFrame:15, targDoor:1}], [sc7.preBridge1, sc7.preBridge2, sc7.bridge3, sc7.bridge4], [], [sc7.preBridge1, sc7.preBridge2, sc7.door1, sc7.door2, sc7.bridge3, sc7.bridge4, sc7.activator1, sc7.activator2, sc7.activator3, sc7.activator4], [{tar:sc7.activator1, sys:sc7.door1, thresh:50, prev:null}, {tar:sc7.activator2, sys:sc7.door2, thresh:170, prev:sc7.activator1}, {tar:sc7.activator3, sys:sc7.bridge3, thresh:61, prev:sc7.activator2}, {tar:sc7.activator4, sys:sc7.bridge4, thresh:301, prev:sc7.activator3}], [{tar:sc7.door1, rheight:0x0100}, {tar:sc7.door2, rheight:0x0100}]);
myScreen.setEffects(sc7.effectsTop, sc7.effectsMid, sc7.effectsBase, sc7.effectsWater, sc7.effectsBase2);
myScreen.setPaths([sc7.nd1, sc7.nd2, sc7.nd3, sc7.nd4, sc7.nd5, sc7.nd6, sc7.nd7, sc7.nd8, sc7.nd9, sc7.nd10, sc7.nd11, sc7.nd12, sc7.nd13, sc7.nd14, sc7.nd15, sc7.nd16, sc7.nd17, sc7.nd18, sc7.nd19, sc7.nd20, sc7.nd21, sc7.nd22, sc7.nd23, sc7.nd24, sc7.nd25, sc7.nd26, sc7.nd27, sc7.nd28, sc7.nd29, sc7.nd30, sc7.nd31, sc7.nd32, sc7.nd33, sc7.nd34, sc7.nd35, sc7.nd36, sc7.nd37, sc7.nd38, sc7.nd39, sc7.nd40, sc7.nd41, sc7.nd42, sc7.nd43, sc7.nd44, sc7.nd45, sc7.nd46, sc7.nd47, sc7.nd48], sc7.enemyPaths, sc7);
myScreen.setWaterPaths([sc7.wd1, sc7.wd2, sc7.wd3, sc7.wd4, sc7.wd5, sc7.wd6, sc7.wd7, sc7.wd8, sc7.wd9, sc7.wd10, sc7.wd11, sc7.wd12, sc7.wd13, sc7.wd14, sc7.wd15, sc7.wd16, sc7.wd17, sc7.wd18, sc7.wd19], sc7.waterPaths, sc7);
sc7.playerMain.setUp(sc7.playerMain.the_hitbox);
sc7.playerMain.setMoreUp(sc7.playerTop, sc7.playerBase);
frameStart(gui, myScreen, sc7.playerMain, pauseBtn, true);
soundManager.addMusic(20);
}
function frame21(){
frameStart(theEndUI);
soundManager.addMusic(6);
}
function frame16(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc9, sc9.playerMain, sc9.borders, sc9.mapTypes, sc9.mapHeights, playArea, currentFrame, 0.2);
myScreen.setSystems([{clip:sc9.exit1, effect:sc9.exitEff1, targFrame:17, targDoor:1}, {clip:sc9.exit2, effect:sc9.exitEff2, targFrame:18, targDoor:1}, {clip:sc9.exit3, effect:sc9.exitEff3, targFrame:19, targDoor:1}], [sc9.bridge1, sc9.bridge2, sc9.bridge2b, sc9.bridge2c], [], [sc9.bridge1, sc9.bridge2, sc9.bridge2b, sc9.bridge2c, sc9.activator1, sc9.activator2], [{tar:sc9.activator1, sys:sc9.bridge1, thresh:302, prev:null}, {tar:sc9.activator2, sys:sc9.bridge2, thresh:101, prev:sc9.activator1}]);
myScreen.setEffects(sc9.effectsTop, sc9.effectsMid, sc9.effectsBase, sc9.effectsWater, sc9.effectsBase2);
myScreen.setPaths([sc9.nd1, sc9.nd2, sc9.nd3, sc9.nd4, sc9.nd5, sc9.nd6, sc9.nd7, sc9.nd8, sc9.nd9, sc9.nd10, sc9.nd11, sc9.nd12, sc9.nd13, sc9.nd14, sc9.nd15, sc9.nd16, sc9.nd17, sc9.nd18, sc9.nd19], sc9.enemyPaths, sc9);
sc9.playerMain.setUp(sc9.playerMain.the_hitbox);
sc9.playerMain.setMoreUp(sc9.playerTop, sc9.playerBase);
frameStart(gui, myScreen, sc9.playerMain, pauseBtn, true);
if (adDoor == 2){
sc9.playerMain.x = (sc9.playerTop.x = (sc9.playerBase.x = sc9.door2.x));
sc9.playerMain.y = (sc9.playerTop.y = (sc9.playerBase.y = sc9.door2.y));
sc9.playerMain.rotation = (sc9.playerTop.rotation = (sc9.playerBase.rotation = sc9.door2.rotation));
addMedal(14);
} else {
addMedal(13);
};
myScreen.snap(sc9.playerMain);
soundManager.addMusic(16);
}
public function frameAdvance(_arg1:uint=8, _arg2:uint=1):void{
frame = _arg1;
adDoor = _arg2;
dataSave();
frameGo();
}
public function gameUnpause(_arg1:Event):void{
isPaused = false;
if (Boolean(pauseGraphic)){
pauseGraphic.visible = false;
soundManager.unMuteMe();
};
}
function frame4(){
frameStart(theSplash);
if (this.root.loaderInfo.url.indexOf(".flashgamelicense.com") == -1){
};
}
function frame12(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc5, sc5.playerMain, sc5.borders, sc5.mapTypes, sc5.mapHeights, playArea, currentFrame, 0.1);
myScreen.setSystems([{clip:sc5.exit1, effect:sc5.exitEff1, targFrame:13, targDoor:1}], [sc5.bridge1, sc5.bridge4], [], [sc5.bridge1, sc5.stair2, sc5.stair3, sc5.bridge4, sc5.activator1, sc5.activator2, sc5.activator3, sc5.activator4], [{tar:sc5.activator1, sys:sc5.bridge1, thresh:157, prev:null}, {tar:sc5.activator2, sys:sc5.stair2, thresh:250, prev:sc5.activator1}, {tar:sc5.activator3, sys:sc5.stair3, thresh:294, prev:sc5.activator2}, {tar:sc5.activator4, sys:sc5.bridge4, thresh:277, prev:sc5.activator3}], [{tar:sc5.stair2, rheight:100}, {tar:sc5.stair3, rheight:100}]);
myScreen.setEffects(sc5.effectsTop, sc5.effectsMid, sc5.effectsBase, sc5.effectsWater, sc5.effectsBase2);
myScreen.setPaths([sc5.nd1, sc5.nd2, sc5.nd3, sc5.nd4, sc5.nd5, sc5.nd6], sc5.enemyPaths, sc5);
sc5.playerMain.setUp(sc5.playerMain.the_hitbox);
sc5.playerMain.setMoreUp(sc5.playerTop, sc5.playerBase);
frameStart(gui, myScreen, sc5.playerMain, pauseBtn, true);
soundManager.addMusic(12);
}
private function get state():Object{
var _local1:Object;
var _local2:uint;
var _local3:Boolean;
_local2 = weaponsAmmo[getWeaponInd()];
_local3 = (_local2 > 0);
_local1 = {dirX:inputBox.dirX, dirY:inputBox.dirY, mouX:mouseX, mouY:mouseY, stageRef:stage, gunDown:gunDown, gunPressed:gunPressed, kicked:kicked, weapons:weapons, weaponsAmmo:weaponsAmmo, gunType:theWeapon, gunAmmo:_local3, gunAmmoCount:_local2, health:health, gold:gold, player:player, theFrame:currentFrame, theRoot:this};
return (_local1);
}
public function onAmmoGet(_arg1:PickupEvent):void{
var _local2:Array;
var _local3:uint;
_local2 = ["PISTOL BULLETS", "CROSSBOW BOLTS", "GULL BULLETS", "CUTTLEFISH ROUNDS", "BLASTER BALLS", "SANDPIPER CLIPS", "SANDCASTLE SHELLS"];
_local3 = (weapons[_arg1.id] - 1);
weaponsAmmo[_arg1.id] = (weaponsAmmo[_arg1.id] + weaponAmmoIncrements[_local3]);
if (weaponsAmmo[_arg1.id] > weaponAmmoMaxes[_local3]){
weaponsAmmo[_arg1.id] = weaponAmmoMaxes[_local3];
};
ui.addMessage(_local2[_local3], 50);
ui.reJig(state);
}
function frame38(){
gotoAndStop(5);
}
public function onKick(_arg1:Event):void{
kicked = true;
}
private function stickWeapon(_arg1:uint):void{
if (weapons[_arg1] != 0){
theWeapon = weapons[_arg1];
ui.reJig(state);
};
}
public function onGameStart(_arg1:Event):void{
newGame();
frameGo();
soundManager.fadeMusic(5);
}
public function addMedal(_arg1:uint):void{
if (!medals[_arg1]){
medals[_arg1] = true;
if (this.achievements != null){
this.achievements.addAchievement(_arg1);
};
};
}
function frame19(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc12, sc12.playerMain, sc12.borders, sc12.mapTypes, sc12.mapHeights, playArea, currentFrame, 0.1);
myScreen.setSystems([{clip:sc12.exit1, effect:sc12.exitEff1, targFrame:20, targDoor:3}], [sc12.shroom1, sc12.shroom1a, sc12.shroom1b, sc12.shroom1c, sc12.shroom1d, sc12.shroom1e, sc12.shroom1f, sc12.shroom2, sc12.shroom2a, sc12.shroom2b, sc12.shroom2c, sc12.shroom2d, sc12.shroom3, sc12.shroom3a, sc12.shroom3b, sc12.shroom3c, sc12.shroom3d, sc12.shroom3e, sc12.shroom3f, sc12.shroom3g, sc12.shroom3h, sc12.shroom3i, sc12.shroom4, sc12.shroom4a, sc12.shroom4b, sc12.shroom4c, sc12.shroom4d, sc12.shroom4e, sc12.shroom4f, sc12.shroom4g, sc12.shroom5, sc12.shroom5a, sc12.shroom5b, sc12.shroom5c, sc12.shroom5d, sc12.shroom5e, sc12.shroom5f], [], [sc12.shroom1, sc12.shroom1a, sc12.shroom1b, sc12.shroom1c, sc12.shroom1d, sc12.shroom1e, sc12.shroom1f, sc12.shroom2, sc12.shroom2a, sc12.shroom2b, sc12.shroom2c, sc12.shroom2d, sc12.shroom3, sc12.shroom3a, sc12.shroom3b, sc12.shroom3c, sc12.shroom3d, sc12.shroom3e, sc12.shroom3f, sc12.shroom3g, sc12.shroom3h, sc12.shroom3i, sc12.shroom4, sc12.shroom4a, sc12.shroom4b, sc12.shroom4c, sc12.shroom4d, sc12.shroom4e, sc12.shroom4f, sc12.shroom4g, sc12.shroom5, sc12.shroom5a, sc12.shroom5b, sc12.shroom5c, sc12.shroom5d, sc12.shroom5e, sc12.shroom5f, sc12.activator1, sc12.activator2, sc12.activator3, sc12.activator4, sc12.activator5], [{tar:sc12.activator1, sys:sc12.shroom1, thresh:81, prev:null}, {tar:sc12.activator2, sys:sc12.shroom2, thresh:251, prev:sc12.activator1}, {tar:sc12.activator3, sys:sc12.shroom3, thresh:1393, prev:sc12.activator2}, {tar:sc12.activator4, sys:sc12.shroom4, thresh:159, prev:sc12.activator3}, {tar:sc12.activator5, sys:sc12.shroom5, thresh:99, prev:sc12.activator4}]);
myScreen.setEffects(sc12.effectsTop, sc12.effectsMid, sc12.effectsBase, sc12.effectsWater, sc12.effectsBase2);
myScreen.setPaths([sc12.nd1, sc12.nd2, sc12.nd3, sc12.nd4, sc12.nd5, sc12.nd6, sc12.nd7, sc12.nd8, sc12.nd9, sc12.nd10, sc12.nd11, sc12.nd12, sc12.nd13, sc12.nd14, sc12.nd15, sc12.nd16, sc12.nd17, sc12.nd18, sc12.nd19, sc12.nd20, sc12.nd21, sc12.nd22, sc12.nd23, sc12.nd24, sc12.nd25, sc12.nd26, sc12.nd27, sc12.nd28, sc12.nd29, sc12.nd30, sc12.nd31, sc12.nd32, sc12.nd33, sc12.nd34, sc12.nd35, sc12.nd36, sc12.nd37, sc12.nd38, sc12.nd39, sc12.nd40, sc12.nd41, sc12.nd42, sc12.nd43, sc12.nd44, sc12.nd45], sc12.enemyPaths, sc12);
sc12.playerMain.setUp(sc12.playerMain.the_hitbox);
sc12.playerMain.setMoreUp(sc12.playerTop, sc12.playerBase);
frameStart(gui, myScreen, sc12.playerMain, pauseBtn, true);
soundManager.addMusic(8);
}
public function nextWeapon(_arg1:Event){
var _local2:uint;
_local2 = getWeaponInd();
do {
_local2 = ((_local2 + 1) % 5);
} while ((((weapons[_local2] == 0)) || ((((weaponsAmmo[_local2] == 0)) && (!((_local2 == 0)))))));
theWeapon = weapons[_local2];
ui.reJig(state);
}
public function frameStart(_arg1:MovieClip=null, _arg2:ScreenHandler=null, _arg3:Player=null, _arg4:MovieClip=null, _arg5:Boolean=false):void{
ui = _arg1;
level = _arg2;
pauseGraphic = _arg4;
player = _arg3;
advancing = false;
ui.reJig(state);
ui.reJigHealth(state);
soundManager.musicHold = this.musicHold;
if (Boolean(player)){
player.addEventListener("useAttack", onWeaponFire);
player.addEventListener("hurt", onPlayerHurt);
player.addEventListener("ammoGet", onAmmoGet);
player.addEventListener("goldGet", onGoldGet);
player.addEventListener("medPackGet", onMedPackGet);
player.addEventListener("weaponGet", onWeaponGet);
player.addEventListener("trinketGet", onTrinketGet);
};
if (Boolean(pauseGraphic)){
pauseGraphic.visible = (isPaused = false);
} else {
isPaused = false;
};
if (Boolean(ui)){
ui.addEventListener("introOver", onIntroOver);
ui.addEventListener("gameStart", onGameStart);
ui.addEventListener("gameContinue", onGameContinue);
ui.addEventListener("mainMenu", onMainMenu);
ui.addEventListener("agSplash", onAGSplash);
ui.addEventListener("gameFinished", onGameFinish);
if (((Boolean(ui.screenshot)) && (!((screenshotImage == null))))){
ui.screenshot.addChild(screenshotImage);
if (((Boolean(ui.screenshotChar)) && (!((screenshotCharImage == null))))){
ui.screenshotChar.addChild(screenshotCharImage);
if (Boolean(ui.screenshotCharGlow)){
ui.screenshotCharGlow.addChild(screenshotCharImage);
};
};
};
if (Boolean(ui.levelName)){
ui.levelName.text = getLevelName(currentFrame);
};
if (Boolean(ui.soundGuide)){
soundManager.setVars(ui.soundGuide, currentFrame);
soundManager.resetVoice();
ui.soundGuide.gotoAndStop(1);
};
};
if (Boolean(level)){
level.addEventListener("narrationEvent", soundManager.effectVoices);
level.addEventListener("soundEvent", soundManager.effectSounds);
level.addEventListener("frameEnd", onLevelEnd);
};
if (_arg5){
frame = currentFrame;
dataSave();
};
if ((((currentFrame > 7)) && ((currentFrame < 21)))){
screensVisited[(currentFrame - 8)] = true;
countRooms();
countTrinkets();
};
}
public function getScore():uint{
return (uint((((((50000 - ((thetime / 1000000) * 100000)) + ((gold / 5000) * 600000)) - ((ammo / 1000) * 100000)) + ((kills / 250) * 150000)) + ((soul / 65000) * 350000))));
}
private function init(_arg1:Boolean=false, _arg2:Boolean=false):void{
health = 100;
frame = 7;
adDoor = 1;
theWeapon = 1;
weapons = new Array(1, 0, 0, 0, 0);
weaponsAmmo = new Array(20, 20, 20, 20, 20);
thetime = 0;
gold = 0;
ammo = 0;
kills = 0;
soul = 0;
if (!trinkets){
trinkets = [false, false, false, false];
};
if (!screensVisited){
trinkets = [false, false, false, false, false, false, false, false, false, false, false, false, false];
};
if (_arg2){
dataSave();
};
}
function frame20(){
gui.setVars([gui.weap1, gui.weap2, gui.weap3, gui.weap4, gui.weap5], [gui.shell1, gui.shell2, gui.shell3, gui.shell4, gui.shell5], [null, gui.ammo2, gui.ammo3, gui.ammo4, gui.ammo5], gui.healthbar, gui.healthshadow, gui.coinText, gui.coinIcon, gui.announcementsClip, gold);
myScreen = new ScreenHandler(sc13, sc13.playerMain, sc13.borders, sc13.mapTypes, sc13.mapHeights, playArea, currentFrame, 0.1);
myScreen.setSystems([], [sc13.shroom1, sc13.shroom1a, sc13.shroom1b, sc13.shroom1c, sc13.shroom1d, sc13.shroom1e, sc13.shroom1f, sc13.shroom1g, sc13.shroom1h, sc13.shroom1i, sc13.shroom1j, sc13.shroom1k, sc13.shroom1l, sc13.bridge1, sc13.bridge2, sc13.bridge2a, sc13.bridge4, sc13.airshipBase], [], [sc13.shroom1, sc13.shroom1a, sc13.shroom1b, sc13.shroom1c, sc13.shroom1d, sc13.shroom1e, sc13.shroom1f, sc13.shroom1g, sc13.shroom1h, sc13.shroom1i, sc13.shroom1j, sc13.shroom1k, sc13.shroom1l, sc13.bridge1, sc13.bridge2, sc13.bridge2a, sc13.bridge4, sc13.eskerShield], [], [{tar:sc13.eskerShield, rheight:0x0100}]);
myScreen.setEffects(sc13.effectsTop, sc13.effectsMid, sc13.effectsBase, sc13.effectsWater, sc13.effectsBase2);
myScreen.setPaths([sc13.nd1, sc13.nd2, sc13.nd3, sc13.nd4, sc13.nd5, sc13.nd6, sc13.nd7, sc13.nd8, sc13.nd9, sc13.nd10, sc13.nd11, sc13.nd12, sc13.nd13, sc13.nd14, sc13.nd15, sc13.nd16, sc13.nd17, sc13.nd18, sc13.nd19, sc13.nd20, sc13.nd21, sc13.nd22, sc13.nd23, sc13.nd24], sc13.enemyPaths, sc13);
sc13.playerMain.setUp(sc13.playerMain.the_hitbox);
sc13.playerMain.setMoreUp(sc13.playerTop, sc13.playerBase);
if (adDoor == 2){
sc13.playerMain.x = (sc13.playerTop.x = (sc13.playerBase.x = sc13.door2.x));
sc13.playerMain.y = (sc13.playerTop.y = (sc13.playerBase.y = sc13.door2.y));
sc13.playerMain.rotation = (sc13.playerTop.rotation = (sc13.playerBase.rotation = sc13.door2.rotation));
} else {
if (adDoor == 3){
sc13.playerMain.x = (sc13.playerTop.x = (sc13.playerBase.x = sc13.door3.x));
sc13.playerMain.y = (sc13.playerTop.y = (sc13.playerBase.y = sc13.door3.y));
sc13.playerMain.rotation = (sc13.playerTop.rotation = (sc13.playerBase.rotation = sc13.door3.rotation));
};
};
myScreen.snap(sc13.playerMain);
frameStart(gui, myScreen, sc13.playerMain, pauseBtn, true);
}
public function onAGSplash(_arg1:Event):void{
frameExit(5);
}
public function ammoCheck(){
var _local1:uint;
_local1 = getWeaponInd();
while ((((weaponsAmmo[_local1] == 0)) && (!((_local1 == 0))))) {
prevWeapon(new Event("prevWeapon"));
_local1 = getWeaponInd();
};
}
public function countRooms():void{
var _local1:uint;
var _local2:uint;
_local1 = 0;
_local2 = 0;
_local1 = 0;
while (_local1 < screensVisited.length) {
if (screensVisited[_local1]){
_local2++;
};
_local1++;
};
if (_local2 == 13){
addMedal(12);
};
}
public function gamePause(_arg1:Event):void{
if (Boolean(pauseGraphic)){
isPaused = true;
pauseGraphic.visible = true;
inputBox.resetMe();
soundManager.muteMe();
};
}
public function frameGo():void{
dataLoad();
frameExit(frame);
}
public function takeScreenshot():void{
var _local1:Matrix;
_local1 = player.bLegs.transform.matrix;
_local1.concat(level.transform.matrix);
screenshotData = new BitmapData(550, 450, true, 0);
screenshotImage = new Bitmap(screenshotData, "auto", true);
screenshotCharData = new BitmapData(550, 450, true, 0);
screenshotCharImage = new Bitmap(screenshotCharData, "auto", true);
screenshotData.draw(stage);
screenshotCharData.draw(player.bLegs, _local1);
}
public function submitScore():void{
var _local1:SubmitScore;
_local1 = new SubmitScore(String(getScore()));
_local1.addEventListener(ServiceEvent.COMPLETE, serviceCallIsComplete);
serviceClient.post(_local1);
init(false, true);
}
public function frameEnter(_arg1:Event):void{
if (!isPaused){
if (this.achievements != null){
this.achievements.upd();
};
soundManager.upd(state);
if (ui != null){
ui.upd(state);
if (level != null){
thetime++;
level.upd(state);
};
if (ui.fadeIn != null){
if (ui.fadeIn.currentFrame < 12){
ui.fadeIn.nextFrame();
};
};
if (ui.fadeOut != null){
if (ui.fadeOut.currentFrame == 20){
if (advancing){
advancing = false;
ui.fadeOut.gotoAndStop(1);
frameAdvance(adFrame, adDoor);
} else {
ui.fadeOut.gotoAndStop(1);
deathTimer = 0;
frameExit(6);
};
} else {
if (ui.fadeOut.currentFrame > 1){
ui.fadeOut.nextFrame();
} else {
if (deathTimer > 0){
if (deathTimer > 1){
if (deathTimer == 21){
takeScreenshot();
ui.fadeOut.gotoAndStop(2);
};
deathTimer--;
} else {
deathTimer = 0;
frameExit(6);
};
};
};
};
};
};
if (currentFrame == 20){
if (this.sc13Back != null){
this.sc13Back.x = (this.sc13.x / 3);
this.sc13Back.y = (this.sc13.y / 3);
};
};
if ((((currentFrame >= 25)) && ((currentFrame < 36)))){
if (currentFrame < 30){
nextFrame();
} else {
gotoAndStop(targFrame);
};
};
};
gunPressed = (kicked = false);
}
public function getLevelName(_arg1:uint):String{
switch (_arg1){
case 8:
return ("Point of Snusan");
case 9:
return ("St Benno's Hall");
case 10:
return ("Scallop's Grotto");
case 11:
return ("Maximin's Lagoon");
case 12:
return ("Captain Tim's Bay");
case 13:
return ("The Blood Coral");
case 14:
return ("Epitaph");
case 15:
return ("Grock's Den");
case 16:
return ("Shrine");
case 17:
return ("Quay of Despair");
case 18:
return ("Whited Cloister");
case 19:
return ("Green Haven");
case 20:
return ("Paladin Falls");
};
return ("Room 137");
}
private function getWeaponInd():uint{
var _local1:uint;
_local1 = 0;
while (_local1 < weapons.length) {
if (weapons[_local1] == theWeapon){
return (_local1);
};
_local1++;
};
return (0);
}
public function weapon3(_arg1:Event):void{
stickWeapon(2);
}
public function weapon4(_arg1:Event):void{
stickWeapon(3);
}
public function weapon5(_arg1:Event):void{
stickWeapon(4);
}
public function gamePause2(_arg1:Event):void{
inputBox.resetMe();
gamePause(_arg1);
}
public function weapon1(_arg1:Event):void{
stickWeapon(0);
}
public function dataLoad():void{
health = dataHold.data.health;
frame = dataHold.data.frame;
adDoor = dataHold.data.door;
theWeapon = dataHold.data.theWeapon;
weapons = dataHold.data.weapons.slice();
weaponsAmmo = dataHold.data.weaponsAmmo.slice();
thetime = dataHold.data.thetime;
gold = dataHold.data.gold;
ammo = dataHold.data.ammo;
kills = dataHold.data.kills;
soul = dataHold.data.soul;
trinkets = dataHold.data.trinkets.slice();
screensVisited = dataHold.data.screensVisited.slice();
medals = dataHold.data.medals.slice();
}
public function newGame():void{
init(false, true);
}
public function onLevelEnd(_arg1:GameEvent):void{
switch (currentFrame){
case 8:
if (_arg1.id == 0){
levelAdvance(9, 1);
soundManager.fadeMusic(10);
} else {
levelAdvance(10, 1);
soundManager.fadeMusic(10);
};
break;
case 9:
levelAdvance(11, 1);
break;
case 10:
levelAdvance(11, 2);
soundManager.fadeMusic(10);
break;
case 11:
if (_arg1.id == 0){
levelAdvance(12, 1);
} else {
levelAdvance(14, 1);
};
soundManager.fadeMusic(10);
break;
case 12:
levelAdvance(13, 1);
break;
case 13:
levelAdvance(16, 1);
soundManager.fadeMusic(10);
break;
case 14:
levelAdvance(15, 1);
soundManager.fadeMusic(10);
break;
case 15:
levelAdvance(16, 2);
soundManager.fadeMusic(10);
break;
case 16:
if (_arg1.id == 0){
levelAdvance(17, 1);
soundManager.fadeMusic(10);
} else {
if (_arg1.id == 1){
levelAdvance(18, 1);
} else {
levelAdvance(19, 1);
soundManager.fadeMusic(10);
};
};
break;
case 17:
levelAdvance(20, 1);
soundManager.fadeMusic(10);
break;
case 18:
levelAdvance(20, 2);
soundManager.fadeMusic(10);
break;
case 19:
levelAdvance(20, 3);
soundManager.fadeMusic(10);
break;
case 20:
levelAdvance(21, 1);
break;
};
}
public function onMainMenu(_arg1:Event):void{
frameExit(5);
soundManager.fadeMusic(5);
}
public function weapon2(_arg1:Event):void{
stickWeapon(1);
}
public function onTrinketGet(_arg1:PickupEvent):void{
trinkets[(_arg1.id - 1)] = true;
switch (_arg1.id){
case 1:
ui.addMessage("EIGENVALUE THE TURTLE", 120);
break;
case 2:
ui.addMessage("ORGETORIX THE SEAL", 120);
break;
case 3:
ui.addMessage("VERCINGETORIX THE SEAL", 120);
break;
case 4:
ui.addMessage("AETHELRED THE SEAL", 120);
break;
};
countTrinkets();
}
public function onPlayerHurt(_arg1:HealthEvent):void{
health = (health - (_arg1.strength / 2));
if (health <= 0){
soundManager.fadeMusic(25);
player.alive = false;
health = 0;
deathTimer = 80;
};
ui.reJigHealth(state);
}
public function onWeaponFire(_arg1:AttackEvent):void{
var _local2:uint;
_local2 = getWeaponInd();
if (weaponsAmmo[_local2] > 0){
var _local3 = weaponsAmmo;
var _local4 = _local2;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
};
ui.reJig(state);
}
public function onGunPress(_arg1:Event):void{
gunDown = (gunPressed = true);
ammoCheck();
}
public function onGoldGet(_arg1:PickupEvent):void{
var _local2:Array;
_local2 = ["GOLD COINS", "BAG OF GOLD", "DEAD MAN'S CHEST", "TREASURE TROVE"];
gold = (gold + goldAmounts[(_arg1.id - 1)]);
ui.addMessage(_local2[(_arg1.id - 1)], 60);
ui.reJig(state);
}
public function serviceCallIsComplete(_arg1:ServiceEvent):void{
if (_arg1.success){
if (((!((_arg1.data == null))) && ((_arg1.data.object is PlayerInfoData)))){
trace("makeServiceCall() was successful, SubmitScore complete");
};
};
}
public function qualityUp(_arg1:Event):void{
if (qualityIndex == 1){
qualityIndex = 2;
stage.quality = StageQuality.HIGH;
} else {
if (qualityIndex == 0){
qualityIndex = 1;
stage.quality = StageQuality.MEDIUM;
};
};
}
}
}//package project
Section 255
//GameUI (project.GameUI)
package project {
import flash.geom.*;
import flash.display.*;
import flash.text.*;
import project.tools.*;
import flash.filters.*;
public class GameUI extends MovieClip {
public var shell1:MovieClip;
public var shell3:MovieClip;
public var shell5:MovieClip;
public var shell4:MovieClip;
private var announcements:MovieClip;
private var healthBar:MovieClip;
public var shell2:MovieClip;
public var levelName:TextField;
public var healthbar:MovieClip;
public var weap4:MovieClip;
public var weap5:MovieClip;
public var weap1:MovieClip;
private var weaponIcons:Array;
public var weap2:MovieClip;
public var healthshadow:MovieClip;
public var weap3:MovieClip;
private var healthShadow:MovieClip;
public var coinIcon:MovieClip;
private var ammoTexts:Array;
public var fadeIn:MovieClip;
private var goldIcon:MovieClip;
public var ammo3:TextField;
public var ammo4:TextField;
public var ammo2:TextField;
public var soundGuide:MovieClip;
public var ammo5:TextField;
public var fadeOut:MovieClip;
private var messages:Array;
private var goldBox:TextField;
public var coinText:TextField;
public var announcementsClip:MovieClip;
private var weaponShells:Array;
public var goldText:uint;// = 0
private var healthTarg:Number;// = 1
private var goldTarg:uint;// = 0
public function GameUI():void{
weaponIcons = new Array(5);
weaponShells = new Array(5);
ammoTexts = new Array(5);
goldText = 0;
goldTarg = 0;
messages = new Array();
healthTarg = 1;
super();
}
public function addMessage(_arg1:String, _arg2:uint=50):void{
var clip:MessageClip;
var vtext = _arg1;
var vtime = _arg2;
clip = new MessageClip();
clip.x = 6;
clip.y = 96;
clip.time = vtime;
clip.content = vtext;
clip.stop();
clip.active = true;
clip.upd = function ():void{
if (clip.currentFrame == 1){
clip.message.messageText.text = clip.content;
clip.shadow.messageText.text = clip.content;
clip.nextFrame();
} else {
if (clip.currentFrame < 5){
clip.nextFrame();
} else {
if (clip.currentFrame == 5){
if (clip.time > 0){
clip.time--;
} else {
clip.nextFrame();
};
} else {
if (clip.currentFrame < clip.totalFrames){
clip.nextFrame();
} else {
clip.active = false;
};
};
};
};
};
messages.push(clip);
addChild(clip);
}
public function addAnnouncement(_arg1:uint){
announcements.image.gotoAndStop(_arg1);
announcements.gotoAndStop(2);
}
public function reJigHealth(_arg1:Object):void{
healthTarg = (_arg1.health / 100);
healthShadow.alpha = 1;
}
public function upd(_arg1:Object):void{
var _local2:ColorTransform;
var _local3:uint;
if (healthBar.scaleX < healthTarg){
healthBar.scaleX = (healthBar.scaleX + 0.1);
if (healthBar.scaleX > healthTarg){
healthBar.scaleX = healthTarg;
};
_local2 = new ColorTransform();
_local2.redMultiplier = (0.3 + (0.4 * healthBar.scaleX));
_local2.greenMultiplier = healthBar.scaleX;
_local2.blueMultiplier = (0.3 * healthBar.scaleX);
_local2.redOffset = (128 * (1 - healthBar.scaleX));
_local2.greenOffset = (30 * (1 + healthBar.scaleX));
healthBar.transform.colorTransform = _local2;
healthShadow.scaleX = healthBar.scaleX;
} else {
if ((healthShadow.scaleX - healthTarg) > 0.01){
healthBar.scaleX = (healthBar.scaleX + MathsStuff.translationAmount(healthBar.scaleX, healthTarg, 0.8, 0.1));
if (healthShadow.alpha > 0){
healthShadow.alpha = (healthShadow.alpha - 0.01);
};
if (healthShadow.alpha < 0.8){
healthShadow.scaleX = (healthShadow.scaleX + MathsStuff.translationAmount(healthShadow.scaleX, healthTarg, 0.2, 0.01));
};
_local2 = new ColorTransform();
_local2.redMultiplier = (0.3 + (0.4 * healthBar.scaleX));
_local2.greenMultiplier = healthBar.scaleX;
_local2.blueMultiplier = (0.3 * healthBar.scaleX);
_local2.redOffset = (128 * (1 - healthBar.scaleX));
_local2.greenOffset = (30 * (1 + healthBar.scaleX));
healthBar.transform.colorTransform = _local2;
} else {
if ((healthShadow.scaleX - healthTarg) > 0.001){
healthBar.scaleX = (healthShadow.scaleX = healthTarg);
};
};
};
if (goldText < goldTarg){
goldText = (goldText + uint(MathsStuff.translationAmount(goldText, goldTarg, 1, 9)));
goldBox.text = String(goldText);
if (goldText > 4000){
goldIcon.gotoAndStop(4);
} else {
if (goldText > 2000){
goldIcon.gotoAndStop(3);
} else {
if (goldText > 600){
goldIcon.gotoAndStop(2);
};
};
};
};
_local3 = 0;
while (_local3 < messages.length) {
if (messages[_local3].active){
if (messages[_local3].y > (96 + (12 * _local3))){
messages[_local3].y = (messages[_local3].y - 4);
} else {
if (messages[_local3].y < (96 + (12 * _local3))){
messages[_local3].y = (96 + (12 * _local3));
};
};
messages[_local3].upd();
} else {
removeChild(messages[_local3]);
messages.splice(_local3, 1);
_local3--;
};
_local3++;
};
if (announcements.currentFrame == announcements.totalFrames){
announcements.gotoAndStop(1);
} else {
if (announcements.currentFrame > 1){
announcements.nextFrame();
};
};
}
public function get announcementOn():Boolean{
return ((((announcements.currentFrame > 4)) && ((announcements.currentFrame < 75))));
}
public function setVars(_arg1:Array, _arg2:Array, _arg3:Array, _arg4:MovieClip, _arg5:MovieClip, _arg6:TextField, _arg7:MovieClip, _arg8:MovieClip, _arg9:Number=0):void{
var _local10:uint;
weaponIcons = _arg1.slice();
weaponShells = _arg2.slice();
ammoTexts = _arg3.slice();
healthBar = _arg4;
healthShadow = _arg5;
goldBox = _arg6;
goldIcon = _arg7;
goldTarg = _arg9;
goldText = goldTarg;
goldBox.text = String(goldText);
goldIcon.gotoAndStop(1);
announcements = _arg8;
_local10 = 0;
while (_local10 < 5) {
weaponShells[_local10].gotoAndStop((_local10 + 1));
_local10++;
};
}
public function reJig(_arg1:Object):void{
var _local2:GlowFilter;
var _local3:GlowFilter;
var _local4:uint;
_local2 = new GlowFilter(16772778, 1, 5, 5, 5);
_local3 = new GlowFilter(16772778, 1, 3, 3, 8);
_local4 = 0;
while (_local4 < 5) {
weaponShells[_local4].visible = (weaponIcons[_local4].visible = Boolean(_arg1.weapons[_local4]));
if (Boolean(_arg1.weapons[_local4])){
weaponIcons[_local4].gotoAndStop(_arg1.weapons[_local4]);
if (_local4 > 0){
ammoTexts[_local4].text = String(_arg1.weaponsAmmo[_local4]);
};
} else {
if (_local4 > 0){
ammoTexts[_local4].text = "";
};
};
if (_arg1.gunType == _arg1.weapons[_local4]){
weaponShells[_local4].filters = [_local2];
weaponIcons[_local4].filters = [_local3];
} else {
weaponShells[_local4].filters = [];
weaponIcons[_local4].filters = [];
};
_local4++;
};
goldTarg = _arg1.gold;
}
}
}//package project
Section 256
//InputHandler (project.InputHandler)
package project {
import flash.events.*;
public class InputHandler extends EventDispatcher {
private var mouse1:Boolean;
private var left2:Boolean;
private var down2:Boolean;
private var left1:Boolean;
private var right1:Boolean;
private var right2:Boolean;
private var down1:Boolean;
private var up1:Boolean;
private var up2:Boolean;
public function InputHandler():void{
left1 = (left2 = false);
right1 = (right2 = false);
up1 = (up2 = false);
down1 = (down2 = false);
mouse1 = false;
}
public function inMouseDown(_arg1:MouseEvent){
dispatchEvent(new Event("gunPressed"));
mouse1 = true;
}
public function get dirY():int{
return ((int(((down1) || (down2))) - int(((up1) || (up2)))));
}
public function inMouseUp(_arg1:MouseEvent){
dispatchEvent(new Event("gunReleased"));
mouse1 = false;
}
public function resetMe():void{
left1 = (left2 = (right1 = (right2 = (up1 = (up2 = (down1 = (down2 = (mouse1 = false))))))));
}
public function inMouseWheel(_arg1:MouseEvent){
if (_arg1.delta > 0){
dispatchEvent(new Event("weaponDown"));
} else {
if (_arg1.delta < 0){
dispatchEvent(new Event("weaponUp"));
};
};
}
public function inKeyPress(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case 65:
left1 = true;
break;
case 37:
left2 = true;
break;
case 68:
right1 = true;
break;
case 39:
right2 = true;
break;
case 87:
up1 = true;
break;
case 38:
up2 = true;
break;
case 83:
down1 = true;
break;
case 40:
down2 = true;
break;
case 70:
dispatchEvent(new Event("kick"));
break;
case 75:
dispatchEvent(new Event("kick"));
break;
case 81:
dispatchEvent(new Event("weaponUp"));
break;
case 69:
dispatchEvent(new Event("weaponDown"));
break;
case 49:
dispatchEvent(new Event("weapon1"));
break;
case 50:
dispatchEvent(new Event("weapon2"));
break;
case 51:
dispatchEvent(new Event("weapon3"));
break;
case 52:
dispatchEvent(new Event("weapon4"));
break;
case 53:
dispatchEvent(new Event("weapon5"));
break;
case 80:
dispatchEvent(new Event("inputPause"));
break;
case 189:
dispatchEvent(new Event("inputQualityDown"));
break;
case 187:
dispatchEvent(new Event("inputQualityUp"));
break;
};
}
public function get dirX():int{
return ((int(((right1) || (right2))) - int(((left1) || (left2)))));
}
public function inKeyRelease(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case 65:
left1 = false;
break;
case 37:
left2 = false;
break;
case 68:
right1 = false;
break;
case 39:
right2 = false;
break;
case 87:
up1 = false;
break;
case 38:
up2 = false;
break;
case 83:
down1 = false;
break;
case 40:
down2 = false;
break;
};
}
}
}//package project
Section 257
//MyButton (project.MyButton)
package project {
import flash.display.*;
import flash.events.*;
import project.sound.*;
public class MyButton extends MovieClip {
public var onPress:Function;
public static var soundHold:SoundManager;
public function MyButton(){
super();
turnOff();
onPress = function ():void{
};
addEventListener(MouseEvent.MOUSE_OVER, onMOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, onMOut, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, onMDown, false, 0, true);
}
private function onMDown(_arg1:MouseEvent):void{
if (currentFrame < 3){
onPress();
soundHold.addSound(180);
};
}
private function onMOut(_arg1:MouseEvent):void{
if (currentFrame < 3){
gotoAndStop(1);
};
}
public function turnOn():void{
gotoAndStop(1);
buttonMode = true;
}
private function onMOver(_arg1:MouseEvent):void{
if (currentFrame < 3){
gotoAndStop(2);
soundHold.addSound(182);
};
}
public function turnOff():void{
gotoAndStop(3);
buttonMode = false;
}
}
}//package project
Section 258
//ScreenHandler (project.ScreenHandler)
package project {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import project.myevents.*;
import project.effects.*;
import project.tools.*;
public class ScreenHandler extends EventDispatcher {
const ceil:Function;
const mrandom:Function;
const cos:Function;
const atan2:Function;
const sin:Function;
const dtr:Number = 0.0174532925199433;
const PI:Number = 3.14159265358979;
private var effectsTop:MovieClip;
private var shake:Number;// = 0
private var bridges:Array;
private var noLoops:Array;
private var systems:Array;
private var exits:Array;
private var effectsWater:MovieClip;
private var working:Boolean;
private var wpathfinder:Pathfinder;
private var sc:MovieClip;
private var enemyEffects:EnemyEffects;
public var checks:Array;
public var gameEventArray:Array;
private var theFrame:uint;
private var boundRect:Rectangle;
private var shakeOn:Boolean;// = true
public var gameSortArray:Array;
private var pathfinder:Pathfinder;
public var scaling:Number;// = 0.2
private var blocks:Array;
private var attackEffects:AttackEffects;
private var decalEffects:DecalEffects;
private var aniEffects:AniEffects;
private var shakeDir:Number;
private var shakeDown:Number;// = 0.4
private var player:MovieClip;
private var pickupEffects:PickupEffects;
private var terrainMap:TerrainMap;
private var playArea:MovieClip;
private var effectsBase:MovieClip;
private var testSprite:Sprite;
private var animatedObjects:Array;
private var theRoot:GameManager;
private var effectsMid:MovieClip;
public function ScreenHandler(_arg1:MovieClip, _arg2:MovieClip, _arg3:MovieClip, _arg4:MovieClip, _arg5:MovieClip, _arg6:MovieClip, _arg7:uint, _arg8:Number=0.2):void{
mrandom = Math.random;
ceil = Math.ceil;
sin = Math.sin;
cos = Math.cos;
atan2 = Math.atan2;
blocks = [];
bridges = [];
animatedObjects = [];
noLoops = [];
systems = [];
exits = [];
shake = 0;
shakeDown = 0.4;
shakeOn = true;
scaling = 0.2;
super();
sc = _arg1;
player = _arg2;
boundRect = _arg3.getRect(sc);
playArea = _arg6;
theFrame = _arg7;
scaling = _arg8;
terrainMap = new TerrainMap(_arg4, _arg5, scaling);
checks = [new Point(0, 0), new Point((1 / scaling), (1 / scaling)), new Point((1 / scaling), (-1 / scaling)), new Point((-1 / scaling), (-1 / scaling)), new Point((-1 / scaling), (1 / scaling))];
player.addEventListener("useAttack", onUseAttack);
player.addEventListener("soundEvent", onSoundEvent);
sc.setUp();
sc.addEventListener("narrationEvent", onNarrationEvent);
sc.addEventListener("gameEvent", effectEvents);
sc.addEventListener("soundEvent", onSoundEvent);
testSprite = new Sprite();
sc.addChild(testSprite);
startEvents();
scrollCorrect();
working = true;
}
public function setWaterPaths(_arg1:Array, _arg2:MovieClip, _arg3:DisplayObject){
wpathfinder = new Pathfinder(_arg1, _arg2, _arg3, true);
}
private function onSoundEvent(_arg1:SoundsEvent):void{
dispatchEvent(new SoundsEvent("soundEvent", _arg1.id, _arg1.soundVolume, _arg1.soundPan));
}
public function upd(_arg1:Object):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Boolean;
var _local6:Number;
var _local7:Array;
var _local8:Point;
var _local9:Object;
var _local10:Number;
if (working){
_local5 = false;
_local7 = [player];
theRoot = _arg1.theRoot;
_arg1.bounds = boundRect;
_arg1.terrainMap = terrainMap;
_arg1.aniEffects = aniEffects;
_arg1.enemyEffects = enemyEffects;
_arg1.pathfinder = pathfinder;
_arg1.wpathfinder = wpathfinder;
_arg1.testSprite = testSprite;
_arg1.gameEventArray = gameEventArray;
_arg1.sc = sc;
_arg1.handler = this;
_local2 = 0;
while (_local2 < animatedObjects.length) {
if (animatedObjects[_local2].currentFrame == animatedObjects[_local2].totalFrames){
animatedObjects[_local2].gotoAndStop(1);
} else {
animatedObjects[_local2].nextFrame();
};
_local2++;
};
_local2 = 0;
while (_local2 < noLoops.length) {
if (noLoops[_local2].goingIn){
if (noLoops[_local2].currentFrame > 2){
noLoops[_local2].prevFrame();
};
} else {
if ((((noLoops[_local2].currentFrame > 2)) && ((noLoops[_local2].currentFrame < noLoops[_local2].totalFrames)))){
noLoops[_local2].nextFrame();
};
};
_local2++;
};
_local2 = 0;
while (_local2 < bridges.length) {
centerBridge(bridges[_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < enemyEffects.ides.length) {
if (((enemyEffects.ides[_local2].hitTestObject(playArea)) && (enemyEffects.ides[_local2].targetable))){
_local7.push(enemyEffects.ides[_local2]);
};
_local2++;
};
terrainMap.setTargs(_local7, playArea);
terrainMap.setBridges(bridges, blocks, playArea);
_local2 = 0;
while (_local2 < _local7.length) {
_local3 = 0;
while (_local3 < bridges.length) {
if (_local7[_local2].hits(bridges[_local3])){
bridgeTweak(bridges[_local3], _local7[_local2]);
break;
};
_local3++;
};
_local2++;
};
player.upd(_arg1);
player.updAni();
aniEffects.upd(_arg1);
attackEffects.upd(_arg1);
pickupEffects.upd(_arg1);
enemyEffects.upd(_arg1);
_local2 = 1;
while (_local2 < _local7.length) {
_local8 = MathsStuff.polarDistance(player.position, _local7[_local2].position);
_local8.y = MathsStuff.getAngle((player.rotation * dtr), _local8.y);
if ((((((_local8.x < 100)) && ((_local8.y > -0.7)))) && ((_local8.y < 0.7)))){
if (_arg1.gunPressed){
player.addKick();
};
};
break;
_local2++;
};
_local2 = 0;
while (_local2 < _local7.length) {
_local3 = 0;
while (_local3 < _local2) {
if (Point.distance(_local7[_local2].position, _local7[_local3].position) < (_local7[_local2].radius + _local7[_local3].radius)){
_local8 = MathsStuff.polarDistance(_local7[_local2].position, _local7[_local3].position);
_local6 = ((_local7[_local2].mass / _local7[_local3].mass) + 1);
_local7[_local2].addImpulse(new Point(_local6, (_local8.y + (PI / 2))));
_local7[_local3].addImpulse(new Point(_local6, (_local8.y + ((3 * PI) / 2))));
};
_local3++;
};
_local2++;
};
_local2 = 0;
while (_local2 < attackEffects.damagePoints.length) {
_local9 = attackEffects.damagePoints[_local2];
_local5 = false;
_local3 = 0;
while (_local3 < _local7.length) {
if (!_local7[_local3].targetable){
} else {
if (((!((_local9.targ == null))) && ((_local9.targ == _local7[_local3])))){
} else {
_local4 = 0;
while (_local4 < checks.length) {
_local8 = sc.localToGlobal(new Point((_local9.x + checks[_local4].x), (_local9.y + checks[_local4].y)));
if (_local7[_local3].hitTestPoint(_local8.x, _local8.y, true)){
_local7[_local3].bash(_local9.strength, _local9.knockBack, _local9.knockBackAng, _local9.targ, _local9.tag);
attackEffects.damagePoints.splice(_local2, 1);
_local5 = true;
break;
};
_local4++;
};
};
};
if (_local5){
break;
};
_local3++;
};
_local2++;
};
_local10 = 0;
if (player.alive){
switch (_arg1.gunType){
case 1:
_local10 = 0.3;
break;
case 2:
_local10 = 0.2;
break;
case 3:
_local10 = 0.25;
break;
case 4:
_local10 = 0.4;
break;
case 5:
_local10 = 0.2;
break;
case 6:
_local10 = 0.4;
break;
case 7:
_local10 = 0.2;
break;
};
} else {
_local10 = 0;
};
sortEvents(_arg1);
updSystems();
updExits();
scroll(player, _arg1, _local10);
scrollCorrect();
moveShake();
scrollCorrect();
sc.upd(_arg1);
};
}
public function effectEvents(_arg1:GameEvent){
if (theFrame == 8){
if (_arg1.id == 1){
gameSortArray[0] = 2;
};
} else {
if (theFrame == 9){
if (_arg1.id == 1){
gameSortArray[0] = 2;
} else {
if (_arg1.id == 2){
gameSortArray[2] = 20;
} else {
if (_arg1.id == 3){
gameSortArray[3] = 2;
} else {
if (_arg1.id == 4){
gameSortArray[4] = 30;
};
};
};
};
} else {
if (theFrame == 10){
if (_arg1.id == 1){
gameSortArray[1] = 10;
} else {
if (_arg1.id == 2){
gameSortArray[2] = 20;
} else {
if (_arg1.id == 3){
gameSortArray[3] = 20;
} else {
if (_arg1.id == 4){
gameSortArray[4] = 14;
} else {
if (_arg1.id == 5){
gameSortArray[5] = 15;
} else {
if (_arg1.id == 6){
gameSortArray[6] = 5;
} else {
if (_arg1.id == 7){
gameSortArray[7] = 5;
};
};
};
};
};
};
};
} else {
if (theFrame == 11){
if (_arg1.id == 1){
gameSortArray[1] = 20;
} else {
if (_arg1.id == 2){
gameSortArray[2] = 20;
} else {
if (_arg1.id == 3){
gameSortArray[3] = 30;
} else {
if (_arg1.id == 4){
gameSortArray[4] = 150;
};
};
};
};
} else {
if (theFrame == 12){
if (_arg1.id == 1){
gameSortArray[1] = 15;
} else {
if (_arg1.id == 2){
gameSortArray[2] = 100;
} else {
if (_arg1.id == 3){
gameSortArray[4] = 80;
};
};
};
} else {
if (theFrame == 13){
if (_arg1.id == 1){
gameSortArray[1] = 55;
} else {
if (_arg1.id == 2){
gameSortArray[3] = 20;
} else {
if (_arg1.id == 3){
gameSortArray[6] = 10;
};
};
};
} else {
if (theFrame == 14){
if (_arg1.id == 1){
gameSortArray[1] = 35;
gameSortArray[2] = 175;
} else {
if (_arg1.id == 2){
gameSortArray[3] = 130;
gameSortArray[4] = 250;
gameSortArray[5] = 330;
} else {
if (_arg1.id == 3){
gameSortArray[6] = 60;
gameSortArray[7] = 220;
} else {
if (_arg1.id == 4){
gameSortArray[8] = 60;
} else {
if (_arg1.id == 5){
gameSortArray[9] = 100;
} else {
if (_arg1.id == 6){
gameSortArray[10] = 10;
gameSortArray[11] = 50;
};
};
};
};
};
};
} else {
if (theFrame == 15){
if (_arg1.id == 1){
gameSortArray[1] = 10;
} else {
if (_arg1.id == 2){
gameSortArray[2] = 2;
} else {
if (_arg1.id == 3){
gameSortArray[3] = 2;
} else {
if (_arg1.id == 4){
gameSortArray[4] = 2;
} else {
if (_arg1.id == 5){
gameSortArray[5] = 2;
};
};
};
};
};
} else {
if (theFrame == 16){
if (_arg1.id == 1){
gameSortArray[1] = 100;
gameSortArray[2] = 160;
} else {
if (_arg1.id == 2){
gameSortArray[3] = 30;
};
};
} else {
if (theFrame == 17){
if (_arg1.id == 1){
gameSortArray[1] = 4;
} else {
if (_arg1.id == 2){
gameSortArray[2] = 2;
} else {
if (_arg1.id == 3){
gameSortArray[3] = 2;
} else {
if (_arg1.id == 4){
gameSortArray[4] = 20;
} else {
if (_arg1.id == 5){
gameSortArray[5] = 10;
} else {
if (_arg1.id == 6){
gameSortArray[6] = 3;
} else {
if (_arg1.id == 7){
gameSortArray[7] = 50;
} else {
if (_arg1.id == 8){
gameSortArray[8] = 30;
} else {
if (_arg1.id == 9){
gameSortArray[9] = 50;
} else {
if (_arg1.id == 10){
gameSortArray[10] = 20;
};
};
};
};
};
};
};
};
};
};
} else {
if (theFrame == 18){
if (_arg1.id == 1){
gameSortArray[1] = 4;
} else {
if (_arg1.id == 2){
gameSortArray[2] = 10;
gameSortArray[3] = 120;
} else {
if (_arg1.id == 3){
gameSortArray[4] = 10;
gameSortArray[5] = 200;
} else {
if (_arg1.id == 4){
gameSortArray[6] = 30;
} else {
if (_arg1.id == 5){
gameSortArray[7] = 50;
} else {
if ((((_arg1.id == 6)) || ((_arg1.id == 7)))){
gameSortArray[8] = 10;
} else {
if (_arg1.id == 8){
gameSortArray[9] = 40;
} else {
if (_arg1.id == 9){
gameSortArray[10] = 40;
};
};
};
};
};
};
};
};
} else {
if (theFrame == 19){
if (_arg1.id == 1){
gameSortArray[1] = 4;
} else {
if (_arg1.id == 2){
gameSortArray[2] = 10;
} else {
if (_arg1.id == 3){
gameSortArray[3] = 15;
} else {
if (_arg1.id == 4){
gameSortArray[4] = 20;
} else {
if (_arg1.id == 5){
gameSortArray[5] = 10;
gameSortArray[6] = 150;
} else {
if (_arg1.id == 6){
gameSortArray[7] = 10;
} else {
if (_arg1.id == 7){
gameSortArray[8] = 10;
} else {
if (_arg1.id == 8){
gameSortArray[9] = 10;
};
};
};
};
};
};
};
};
} else {
if (theFrame == 20){
if (_arg1.id == 1){
gameSortArray[1] = 10;
gameSortArray[2] = 50;
} else {
if (_arg1.id == 2){
gameSortArray[3] = 10;
} else {
if (_arg1.id == 3){
gameSortArray[4] = 10;
gameSortArray[5] = 50;
} else {
if (_arg1.id == 4){
gameSortArray[6] = 50;
} else {
if (_arg1.id == 5){
gameSortArray[7] = 10;
gameSortArray[8] = 100;
} else {
if (_arg1.id == 6){
gameEventArray[9] = false;
gameSortArray[10] = 120;
} else {
if (_arg1.id == 7){
gameSortArray[11] = 180;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function startEvents(){
if (theFrame == 8){
gameEventArray = [true, true];
gameSortArray = [-1, -1];
} else {
if (theFrame == 9){
gameEventArray = [true, true, true, true, true];
gameSortArray = [-1, 1, -1, -1, -1];
} else {
if (theFrame == 10){
gameEventArray = [true, true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 11){
gameEventArray = [true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1];
} else {
if (theFrame == 12){
gameEventArray = [true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 13){
gameEventArray = [true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 14){
gameEventArray = [true, true, true, true, true, true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 15){
gameEventArray = [true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 16){
gameEventArray = [true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1];
} else {
if (theFrame == 17){
gameEventArray = [true, true, true, true, true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 18){
gameEventArray = [true, true, true, true, true, true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 19){
gameEventArray = [true, true, true, true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
} else {
if (theFrame == 20){
gameEventArray = [true, true, true, true, true, true, true, true, true, true, true, true];
gameSortArray = [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function centerBridge(_arg1:MovieClip):void{
if (_arg1.staple != null){
_arg1.dx = (_arg1.staple.x - _arg1.prevX);
_arg1.dy = (_arg1.staple.y - _arg1.prevY);
_arg1.dr = (_arg1.staple.rotation - _arg1.prevR);
_arg1.prevX = _arg1.staple.x;
_arg1.prevY = _arg1.staple.y;
_arg1.prevR = _arg1.staple.rotation;
};
}
private function onBallAbsorb(_arg1:DefeatEvent):void{
var _local2:uint;
_local2 = 0;
while (_local2 < systems.length) {
if (systems[_local2].tar == _arg1.tar){
systems[_local2].tar.gotoAndStop(3);
systems[_local2].charge = (systems[_local2].charge + _arg1.val);
if (systems[_local2].charge >= systems[_local2].thresh){
systems[_local2].charge = systems[_local2].thresh;
if (systems[_local2].flitTime > 1){
systems[_local2].flitTime = 1;
};
};
systems[_local2].tar.theGlow.alpha = ((systems[_local2].charge / systems[_local2].thresh) / 4);
aniEffects.addPercentage(systems[_local2].tar.x, systems[_local2].tar.y, (systems[_local2].charge / systems[_local2].thresh));
break;
};
_local2++;
};
}
public function setEffects(_arg1:MovieClip, _arg2:MovieClip, _arg3:MovieClip, _arg4:MovieClip, _arg5:MovieClip){
effectsTop = _arg1;
effectsMid = _arg2;
effectsBase = _arg3;
effectsWater = _arg4;
decalEffects = new DecalEffects(_arg1, _arg2, _arg3, _arg4, boundRect);
aniEffects = new AniEffects(_arg1, _arg2, _arg3, _arg4, playArea, decalEffects, boundRect);
pickupEffects = new PickupEffects(_arg3, player, aniEffects);
attackEffects = new AttackEffects(_arg1, _arg2, _arg3, _arg4, _arg5, playArea, aniEffects, decalEffects);
enemyEffects = new EnemyEffects(_arg1, _arg2, _arg3, _arg4, _arg5, playArea, aniEffects, decalEffects, pickupEffects);
enemyEffects.addEventListener("useAttack", onUseAttack);
enemyEffects.addEventListener("soundEvent", onSoundEvent);
enemyEffects.addEventListener("defeatEvent", onEnemyDefeat);
attackEffects.addEventListener("soundEvent", onSoundEvent);
aniEffects.addEventListener("soundEvent", onSoundEvent);
aniEffects.addEventListener("ballAbsorb", onBallAbsorb);
}
public function sortEvents(_arg1:Object){
var i:uint;
var tempVar:Number;
var tempClip:MovieClip;
var state = _arg1;
if (theFrame == 8){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
var _local3 = gameSortArray;
var _local4:int;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
enemyEffects.addCrawler(sc.ep1.x, sc.ep1.y, sc.ep1.rotation);
enemyEffects.addCrawler((sc.ep1.x + 40), (sc.ep1.y - 16), sc.ep1.rotation, 8);
enemyEffects.addCrawler(sc.ep2.x, sc.ep2.y, sc.ep2.rotation);
enemyEffects.addCrawler((sc.ep2.x - 40), (sc.ep2.y - 8), sc.ep2.rotation);
enemyEffects.addCrawler((sc.ep2.x + 48), (sc.ep2.y - 16), sc.ep2.rotation, 12);
};
};
} else {
if (enemyEffects.ides.length == 0){
dispatchEvent(new SoundsEvent("narrationEvent", 4));
};
};
} else {
if (theFrame == 9){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
enemyEffects.addCrawler(sc.ep1.x, sc.ep1.y, sc.ep1.rotation);
enemyEffects.addCrawler(sc.ep2.x, sc.ep2.y, sc.ep2.rotation, 8);
enemyEffects.addCrawler((sc.ep3.x + 40), (sc.ep3.y + 2), sc.ep3.rotation);
enemyEffects.addCrawler(sc.ep3.x, sc.ep3.y, sc.ep3.rotation);
enemyEffects.addCrawler((sc.ep3.x - 40), (sc.ep3.y + 2), sc.ep3.rotation, 12);
enemyEffects.addCrawler(sc.ep4.x, sc.ep4.y, sc.ep4.rotation);
enemyEffects.addCrawler(sc.ep5.x, sc.ep5.y, sc.ep5.rotation, 8);
};
};
};
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
pickupEffects.addWeapon(sc.ep6.x, sc.ep6.y, 2);
pickupEffects.addGold(sc.ep7.x, sc.ep7.y, 3);
pickupEffects.addGold((sc.ep7.x + 12), (sc.ep7.y + 13), 2);
pickupEffects.addGold((sc.ep7.x - 11), (sc.ep7.y - 12), 2);
pickupEffects.addGold((sc.ep8.x + 20), (sc.ep8.y - 3), 2);
pickupEffects.addGold((sc.ep8.x - 8), (sc.ep8.y + 4), 2);
pickupEffects.addGold((sc.ep8.x - 2), (sc.ep8.y + 12), 1);
pickupEffects.addGold(sc.ep9.x, sc.ep9.y, 2);
pickupEffects.addMedPack(sc.ep10.x, sc.ep10.y, 2);
};
};
};
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
gameEventArray[2] = false;
enemyEffects.addCrawler(sc.ep12.x, sc.ep12.y, sc.ep12.rotation);
enemyEffects.addCrawler((sc.ep12.x + 34), (sc.ep12.y - 6), sc.ep12.rotation, 8);
enemyEffects.addCrawler((sc.ep12.x - 6), (sc.ep12.y + 28), sc.ep12.rotation);
enemyEffects.addLobsterMan(sc.ep13.x, sc.ep13.y, sc.ep13.rotation);
enemyEffects.addLobsterMan((sc.ep13.x - 20), (sc.ep13.y - 6), sc.ep13.rotation);
enemyEffects.addLobsterMan((sc.ep13.x + 23), (sc.ep13.y + 2), sc.ep13.rotation);
enemyEffects.addCrawler(sc.ep14.x, sc.ep14.y, sc.ep14.rotation, 8);
enemyEffects.addCrawler(sc.ep14.x, sc.ep14.y, sc.ep14.rotation);
};
};
};
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
enemyEffects.addLobsterMan((sc.ep15.x + 12), sc.ep15.y, sc.ep15.rotation);
enemyEffects.addLobsterMan(sc.ep15.x, (sc.ep15.y + 13), sc.ep15.rotation, 8);
enemyEffects.addLobsterMan((sc.ep15.x - 23), sc.ep15.y, sc.ep15.rotation);
enemyEffects.addLobsterMan(sc.ep15.x, (sc.ep15.y - 17), sc.ep15.rotation, 12);
enemyEffects.addCrawler(sc.ep16.x, sc.ep16.y, sc.ep16.rotation);
enemyEffects.addCrawler((sc.ep16.x - 3), (sc.ep16.y - 12), sc.ep16.rotation);
enemyEffects.addCrawler((sc.ep16.x - 5), (sc.ep16.y + 14), sc.ep16.rotation);
enemyEffects.addLobsterMan(sc.ep17.x, sc.ep17.y, sc.ep17.rotation);
enemyEffects.addLobsterMan((sc.ep17.x - 15), (sc.ep17.y - 21), sc.ep17.rotation, 1);
};
};
};
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
enemyEffects.addLobsterMan(sc.ep18.x, sc.ep18.y, sc.ep18.rotation);
enemyEffects.addLobsterMan(sc.ep19.x, sc.ep19.y, sc.ep19.rotation);
enemyEffects.addLobsterMan(sc.ep20.x, sc.ep20.y, sc.ep20.rotation, 8);
enemyEffects.addLobsterMan(sc.ep21.x, sc.ep21.y, sc.ep21.rotation);
enemyEffects.addLobsterMan((sc.ep22.x - 21), (sc.ep22.y - 17), sc.ep22.rotation, 8);
enemyEffects.addLobsterMan((sc.ep22.x + 23), (sc.ep22.y + 15), sc.ep22.rotation, 11);
};
};
};
} else {
if (theFrame == 10){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
if (!state.theRoot.trinkets[2]){
pickupEffects.addTrinket(sc.trinket1.x, sc.trinket1.y, 3);
};
pickupEffects.addWeapon(sc.item1.x, sc.item1.y, 3);
pickupEffects.addMedPack(sc.item2.x, sc.item2.y, 2);
pickupEffects.addGold(sc.item3.x, sc.item3.y, 2);
pickupEffects.addGold(sc.item4.x, sc.item4.y, 3);
pickupEffects.addGold(sc.item5.x, sc.item5.y, 2);
pickupEffects.addGold(sc.item6.x, sc.item6.y, 3);
pickupEffects.addMedPack(sc.item7.x, sc.item7.y, 2);
pickupEffects.addGold(sc.item8.x, sc.item8.y, 3);
pickupEffects.addGold(sc.item9.x, sc.item9.y, 1);
pickupEffects.addGold(sc.item10.x, sc.item10.y, 2);
pickupEffects.addMedPack(sc.item11.x, sc.item11.y, 1);
pickupEffects.addMedPack(sc.item12.x, sc.item12.y, 1);
pickupEffects.addGold(sc.item13.x, sc.item13.y, 1);
pickupEffects.addMedPack(sc.item14.x, sc.item14.y, 1);
pickupEffects.addGold(sc.item15.x, sc.item15.y, 1);
pickupEffects.addGold((sc.ep8.x + 20), (sc.ep8.y - 3), 2);
pickupEffects.addGold((sc.ep8.x - 8), (sc.ep8.y + 4), 2);
pickupEffects.addGold((sc.ep8.x - 2), (sc.ep8.y + 12), 1);
pickupEffects.addGold(sc.ep9.x, sc.ep9.y, 2);
pickupEffects.addMedPack(sc.ep10.x, sc.ep10.y, 2);
};
};
} else {
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
enemyEffects.addCrawler(sc.ep1.x, sc.ep1.y, sc.ep1.rotation);
enemyEffects.addCrawler(sc.ep2.x, sc.ep2.y, sc.ep2.rotation);
enemyEffects.addCrawler(sc.ep3.x, sc.ep3.y, sc.ep3.rotation);
enemyEffects.addCrawler(sc.ep4.x, sc.ep4.y, sc.ep4.rotation, 12);
};
};
} else {
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
gameEventArray[2] = false;
enemyEffects.addCrawler(sc.ep5.x, sc.ep5.y, sc.ep5.rotation);
enemyEffects.addCrawler(sc.ep6.x, sc.ep6.y, sc.ep6.rotation);
enemyEffects.addLobsterMan((sc.ep7.x + 15), sc.ep7.y, sc.ep7.rotation);
enemyEffects.addLobsterMan((sc.ep7.x - 15), sc.ep7.y, sc.ep7.rotation, 8);
enemyEffects.addLobsterMan(sc.ep8.x, sc.ep8.y, sc.ep8.rotation, 8);
enemyEffects.addLobsterMan((sc.ep14.x - 12), (sc.ep14.y - 12), sc.ep14.rotation);
enemyEffects.addLobsterMan((sc.ep14.x + 12), (sc.ep14.y + 15), sc.ep14.rotation);
enemyEffects.addLobsterMan((sc.ep14.x + 20), (sc.ep14.y - 20), sc.ep14.rotation, 13);
};
};
} else {
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
};
};
} else {
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
enemyEffects.addLobsterMan(sc.ep9.x, sc.ep9.y, sc.ep9.rotation);
enemyEffects.addLobsterMan(sc.ep10.x, sc.ep10.y, sc.ep10.rotation, 1);
enemyEffects.addLobsterMan(sc.ep11.x, sc.ep11.y, sc.ep11.rotation);
enemyEffects.addLobsterMan(sc.ep12.x, sc.ep12.y, sc.ep12.rotation, 8);
enemyEffects.addLobsterMan(sc.ep13.x, sc.ep13.y, sc.ep13.rotation, 8);
};
};
} else {
if (gameEventArray[5]){
if (gameSortArray[5] > 0){
_local3 = gameSortArray;
_local4 = 5;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[5] == 0){
gameEventArray[5] = false;
enemyEffects.addCrawler((sc.ep15.x - 15), sc.ep15.y, sc.ep15.rotation);
enemyEffects.addCrawler((sc.ep15.x + 15), sc.ep15.y, sc.ep15.rotation, 1);
enemyEffects.addCrawler((sc.ep16.x - 12), (sc.ep16.y - 12), sc.ep16.rotation);
enemyEffects.addCrawler((sc.ep16.x + 12), (sc.ep16.y + 12), sc.ep16.rotation);
enemyEffects.addCrawler(sc.ep17.x, (sc.ep17.y - 15), sc.ep17.rotation);
enemyEffects.addCrawler(sc.ep17.x, (sc.ep17.y + 15), sc.ep17.rotation, 12);
};
};
} else {
if (gameEventArray[6]){
if (gameSortArray[6] > 0){
_local3 = gameSortArray;
_local4 = 6;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[6] == 0){
gameEventArray[6] = false;
enemyEffects.addCrawler(sc.ep18.x, (sc.ep18.y - 12), sc.ep18.rotation, 12);
enemyEffects.addCrawler((sc.ep18.x - 5), (sc.ep18.y - 36), sc.ep18.rotation);
enemyEffects.addCrawler((sc.ep18.x - 1), (sc.ep18.y + 12), sc.ep18.rotation);
enemyEffects.addCrawler((sc.ep18.x - 6), (sc.ep18.y + 36), sc.ep18.rotation);
enemyEffects.addLobsterMan(sc.ep19.x, (sc.ep19.y - 20), sc.ep19.rotation, 9);
enemyEffects.addLobsterMan((sc.ep19.x + 2), (sc.ep19.y + 20), sc.ep19.rotation, 1);
};
};
} else {
if (gameEventArray[7]){
if (gameSortArray[7] > 0){
_local3 = gameSortArray;
_local4 = 7;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[7] == 0){
gameEventArray[7] = false;
enemyEffects.addLobsterMan((sc.ep20.x - 20), sc.ep20.y, sc.ep20.rotation, 9);
enemyEffects.addLobsterMan((sc.ep20.x + 20), (sc.ep20.y + 2), sc.ep20.rotation, 8);
enemyEffects.addLobsterMan((sc.ep21.x - 2), (sc.ep21.y - 20), sc.ep21.rotation, 8);
enemyEffects.addLobsterMan(sc.ep21.x, (sc.ep21.y + 20), sc.ep21.rotation, 13);
};
};
};
};
};
};
};
};
};
};
} else {
if (theFrame == 11){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
pickupEffects.addGold(sc.item1.x, sc.item1.y, 3);
pickupEffects.addGold((sc.item1.x - 4), (sc.item1.y + 20), 1);
pickupEffects.addGold((sc.item1.x + 21), sc.item1.y, 1);
pickupEffects.addGold((sc.item1.x - 3), (sc.item1.y - 21), 1);
pickupEffects.addGold((sc.item1.x + 22), sc.item1.y, 1);
pickupEffects.addGold(sc.item2.x, sc.item2.y, 3);
pickupEffects.addGold((sc.item2.x + 12), (sc.item2.y + 20), 1);
pickupEffects.addMedPack((sc.item2.x + 20), (sc.item2.y + 50), 3);
pickupEffects.addGold(sc.item3.x, sc.item3.y, 3);
pickupEffects.addGold((sc.item3.x - 5), (sc.item3.y - 40), 1);
pickupEffects.addGold((sc.item3.x + 30), (sc.item3.y - 10), 1);
pickupEffects.addGold((sc.item3.x + 8), (sc.item3.y + 20), 1);
pickupEffects.addGold(sc.item4.x, sc.item4.y, 3);
pickupEffects.addGold((sc.item4.x - 50), (sc.item4.y + 20), 2);
pickupEffects.addAmmo((sc.item4.x - 70), (sc.item4.y + 40), 1);
pickupEffects.addGold(sc.item5.x, sc.item5.y, 2);
pickupEffects.addGold(sc.item6.x, sc.item6.y, 2);
pickupEffects.addMedPack(sc.item7.x, sc.item7.y, 2);
pickupEffects.addMedPack(sc.item8.x, sc.item8.y, 2);
pickupEffects.addWeapon(sc.item9.x, sc.item9.y, 4);
enemyEffects.addLobsterMan((sc.ep1.x - 10), (sc.ep1.y - 30), sc.ep1.rotation, 9);
enemyEffects.addLobsterMan((sc.ep1.x + 10), (sc.ep1.y + 30), (sc.ep1.rotation + 180), 2);
enemyEffects.addLobsterMan((sc.ep2.x - 10), (sc.ep2.y - 30), sc.ep2.rotation, 1);
enemyEffects.addMermaid(sc.wep1.x, sc.wep1.y, sc.wep1.rotation);
enemyEffects.addMermaid(sc.wep2.x, sc.wep2.y, sc.wep2.rotation);
enemyEffects.addLobsterMan(sc.ep3.x, sc.ep3.y, sc.ep3.rotation);
enemyEffects.addLobsterMan((sc.ep3.x + 50), (sc.ep3.y - 10), sc.ep3.rotation);
enemyEffects.addLobsterMan((sc.ep3.x - 10), (sc.ep3.y - 50), sc.ep3.rotation, 8);
enemyEffects.addLobsterMan((sc.ep3.x - 50), (sc.ep3.y + 10), sc.ep3.rotation, 12);
enemyEffects.addLobsterMan((sc.ep3.x + 10), (sc.ep3.y + 50), sc.ep3.rotation);
enemyEffects.addLobsterMan((sc.ep4.x - 5), (sc.ep4.y - 30), sc.ep4.rotation);
enemyEffects.addLobsterMan((sc.ep4.x + 5), (sc.ep4.y + 30), sc.ep4.rotation);
enemyEffects.addLobsterMan(sc.ep5.x, sc.ep5.y, sc.ep5.rotation);
enemyEffects.addLobsterMan((sc.ep5.x - 50), (sc.ep5.y + 30), sc.ep5.rotation);
enemyEffects.addLobsterMan((sc.ep5.x + 50), (sc.ep5.y + 30), sc.ep5.rotation, 1);
enemyEffects.addLobsterMan(sc.ep8.x, sc.ep8.y, sc.ep8.rotation);
enemyEffects.addLobsterMan((sc.ep8.x - 5), (sc.ep8.y - 60), sc.ep8.rotation);
enemyEffects.addLobsterMan((sc.ep8.x + 5), (sc.ep8.y + 60), sc.ep8.rotation);
enemyEffects.addLobsterMan(sc.ep9.x, sc.ep9.y, sc.ep9.rotation);
enemyEffects.addLobsterMan((sc.ep9.x - 5), (sc.ep9.y - 60), sc.ep9.rotation);
enemyEffects.addLobsterMan((sc.ep9.x + 5), (sc.ep9.y + 60), sc.ep9.rotation, 8);
enemyEffects.addLobsterMan(sc.ep10.x, sc.ep10.y, sc.ep10.rotation);
enemyEffects.addLobsterMan((sc.ep10.x - 60), (sc.ep10.y - 5), sc.ep10.rotation);
enemyEffects.addLobsterMan((sc.ep10.x + 60), (sc.ep10.y + 5), sc.ep10.rotation, 12);
enemyEffects.addCrawler(sc.ep11.x, sc.ep11.y, sc.ep11.rotation);
enemyEffects.addCrawler((sc.ep11.x - 40), (sc.ep11.y - 4), sc.ep11.rotation);
enemyEffects.addCrawler((sc.ep11.x + 40), (sc.ep11.y + 4), sc.ep11.rotation, 9);
enemyEffects.addCrawler((sc.ep11.x - 6), (sc.ep11.y - 50), sc.ep11.rotation);
enemyEffects.addCrawler(sc.ep12.x, sc.ep12.y, sc.ep12.rotation);
enemyEffects.addCrawler((sc.ep12.x - 4), (sc.ep12.y - 40), sc.ep12.rotation);
enemyEffects.addCrawler((sc.ep12.x + 4), (sc.ep12.y + 40), sc.ep12.rotation);
enemyEffects.addCrawler((sc.ep12.x - 60), (sc.ep12.y - 5), sc.ep12.rotation, 1);
enemyEffects.addCrawler(sc.ep13.x, sc.ep13.y, sc.ep13.rotation);
enemyEffects.addCrawler((sc.ep13.x - 40), (sc.ep13.y - 4), sc.ep13.rotation, 8);
enemyEffects.addCrawler((sc.ep13.x + 40), (sc.ep13.y + 4), sc.ep13.rotation, 12);
enemyEffects.addCrawler((sc.ep13.x - 6), (sc.ep13.y - 50), sc.ep13.rotation);
enemyEffects.addCrawler(sc.ep14.x, sc.ep14.y, sc.ep14.rotation);
enemyEffects.addCrawler((sc.ep14.x - 40), (sc.ep14.y - 4), sc.ep14.rotation);
enemyEffects.addCrawler((sc.ep14.x + 40), (sc.ep14.y + 4), sc.ep14.rotation, 9);
enemyEffects.addCrawler((sc.ep14.x - 6), (sc.ep14.y - 50), sc.ep14.rotation, 14);
};
};
} else {
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
enemyEffects.addCrawler((sc.ep1.x - 10), (sc.ep1.y - 30), sc.ep1.rotation);
enemyEffects.addCrawler(sc.ep1.x, sc.ep1.y, sc.ep1.rotation);
enemyEffects.addCrawler((sc.ep1.x + 40), (sc.ep1.y - 30), sc.ep1.rotation);
enemyEffects.addCrawler((sc.ep1.x - 10), (sc.ep1.y - 60), sc.ep1.rotation);
enemyEffects.addMermaid(sc.wep3.x, sc.wep3.y, sc.wep3.rotation);
enemyEffects.addMermaid(sc.wep3.x, sc.wep3.y, sc.wep3.rotation);
};
};
} else {
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
gameEventArray[2] = false;
enemyEffects.addCrawler(sc.ep6.x, sc.ep6.y, sc.ep6.rotation);
enemyEffects.addCrawler((sc.ep6.x - 40), (sc.ep6.y + 10), sc.ep6.rotation);
enemyEffects.addCrawler((sc.ep6.x + 10), (sc.ep6.y + 40), sc.ep6.rotation);
enemyEffects.addCrawler((sc.ep6.x + 40), (sc.ep6.y - 10), sc.ep6.rotation);
enemyEffects.addCrawler((sc.ep6.x - 10), (sc.ep6.y - 40), sc.ep6.rotation);
enemyEffects.addCrawler(sc.ep7.x, sc.ep7.y, sc.ep7.rotation);
enemyEffects.addCrawler((sc.ep7.x - 10), (sc.ep7.y - 50), sc.ep7.rotation);
enemyEffects.addCrawler((sc.ep7.x - 8), (sc.ep7.y + 50), sc.ep7.rotation);
};
};
} else {
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
pickupEffects.addGold((sc.item10.x + 22), (sc.item10.y - 3), 1);
pickupEffects.addGold((sc.item10.x - 32), (sc.item10.y - 4), 2);
pickupEffects.addAmmo(sc.item10.x, sc.item10.y, 2);
};
};
} else {
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
enemyEffects.addCrawler(sc.ep11b.x, sc.ep11b.y, sc.ep11b.rotation, 12);
enemyEffects.addCrawler((sc.ep11b.x - 40), (sc.ep11b.y - 4), sc.ep11b.rotation);
enemyEffects.addCrawler((sc.ep11b.x + 40), (sc.ep11b.y + 4), sc.ep11b.rotation, 2);
enemyEffects.addCrawler((sc.ep11b.x - 6), (sc.ep11b.y - 50), sc.ep11b.rotation);
enemyEffects.addCrawler(sc.ep12b.x, sc.ep12b.y, sc.ep12b.rotation);
enemyEffects.addCrawler((sc.ep12b.x - 4), (sc.ep12b.y - 40), sc.ep12b.rotation);
enemyEffects.addCrawler((sc.ep12b.x + 4), (sc.ep12b.y + 40), sc.ep12b.rotation);
enemyEffects.addCrawler((sc.ep12b.x - 60), (sc.ep12b.y - 5), sc.ep12b.rotation, 1);
enemyEffects.addCrawler(sc.ep13b.x, sc.ep13b.y, sc.ep13b.rotation);
enemyEffects.addCrawler((sc.ep13b.x - 40), (sc.ep13b.y - 4), sc.ep13b.rotation, 8);
enemyEffects.addCrawler((sc.ep13b.x + 40), (sc.ep13b.y + 4), sc.ep13b.rotation, 12);
enemyEffects.addCrawler((sc.ep13b.x - 6), (sc.ep13b.y - 50), sc.ep13b.rotation);
enemyEffects.addCrawler(sc.ep14b.x, sc.ep14b.y, sc.ep14b.rotation);
enemyEffects.addCrawler((sc.ep14b.x - 40), (sc.ep14b.y - 4), sc.ep14b.rotation);
enemyEffects.addCrawler((sc.ep14b.x + 40), (sc.ep14b.y + 4), sc.ep14b.rotation, 9);
enemyEffects.addCrawler((sc.ep14b.x - 6), (sc.ep14b.y - 50), sc.ep14b.rotation);
};
};
};
};
};
};
};
if (((((!(gameEventArray[1])) && (gameEventArray[2]))) && ((enemyEffects.ides.length < 30)))){
dispatchEvent(new SoundsEvent("narrationEvent", 1));
} else {
if (!gameEventArray[2]){
dispatchEvent(new SoundsEvent("narrationEvent", 2));
};
};
} else {
if (theFrame == 12){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
if (!state.theRoot.trinkets[0]){
pickupEffects.addTrinket(sc.trinket1.x, sc.trinket1.y, 1);
};
pickupEffects.addGold(sc.item1.x, sc.item1.y, 2);
pickupEffects.addGold((sc.item1.x + 4), (sc.item1.y + 23), 1);
pickupEffects.addMedPack(sc.item2.x, sc.item2.y, 3);
pickupEffects.addGold(sc.item3.x, sc.item3.y, 4);
pickupEffects.addGold(sc.item4.x, sc.item4.y, 4);
pickupEffects.addGold((sc.item4.x + 30), (sc.item4.y + 20), 1);
pickupEffects.addGold((sc.item4.x - 33), (sc.item4.y + 23), 1);
enemyEffects.addLobsterMan((sc.ep1.x - 10), (sc.ep1.y + 38), sc.ep1.rotation, 12);
enemyEffects.addLobsterMan((sc.ep1.x + 10), sc.ep1.y, sc.ep1.rotation, 2);
enemyEffects.addLobsterMan((sc.ep1.x - 10), (sc.ep1.y - 40), sc.ep1.rotation);
enemyEffects.addLobsterMan(sc.ep2.x, sc.ep2.y, sc.ep2.rotation);
enemyEffects.addLobsterMan((sc.ep2.x + 50), (sc.ep2.y - 10), sc.ep2.rotation);
enemyEffects.addLobsterMan((sc.ep2.x - 10), (sc.ep2.y - 50), sc.ep2.rotation, 8);
enemyEffects.addLobsterMan((sc.ep2.x - 50), (sc.ep2.y + 10), sc.ep2.rotation, 3);
enemyEffects.addLobsterMan((sc.ep2.x + 10), (sc.ep2.y + 50), sc.ep2.rotation);
};
};
} else {
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
enemyEffects.addLobsterMan(sc.ep3a.x, sc.ep3a.y, sc.ep3a.rotation, 1);
enemyEffects.addLobsterMan(sc.ep3b.x, sc.ep3b.y, sc.ep3b.rotation);
enemyEffects.addLobsterMan(sc.ep3c.x, sc.ep3c.y, sc.ep3c.rotation);
enemyEffects.addLobsterMan(sc.ep3d.x, sc.ep3d.y, sc.ep3d.rotation);
enemyEffects.addLobsterMan(sc.ep3e.x, sc.ep3e.y, sc.ep3e.rotation);
enemyEffects.addLobsterMan(sc.ep3f.x, sc.ep3f.y, sc.ep3f.rotation, 12);
enemyEffects.addLobsterMan(sc.ep3g.x, sc.ep3g.y, sc.ep3g.rotation);
};
};
} else {
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
gameEventArray[2] = false;
dispatchEvent(new SoundsEvent("narrationEvent", 2));
enemyEffects.addSkeleton(sc.ep4a.x, sc.ep4a.y, sc.ep4a.rotation, 8);
enemyEffects.addSkeleton(sc.ep4b.x, sc.ep4b.y, sc.ep4b.rotation, 9);
enemyEffects.addSkeleton(sc.ep4c.x, sc.ep4c.y, sc.ep4c.rotation);
enemyEffects.addSkeleton(sc.ep4d.x, sc.ep4d.y, sc.ep4d.rotation);
enemyEffects.addSkeleton(sc.ep4e.x, sc.ep4e.y, sc.ep4e.rotation, 13);
};
};
} else {
if (gameEventArray[3]){
if (enemyEffects.ides.length == 0){
gameEventArray[3] = false;
enemyEffects.addSkeleton(sc.ep5a.x, sc.ep5a.y, sc.ep5a.rotation, 2);
enemyEffects.addSkeleton(sc.ep5b.x, sc.ep5b.y, sc.ep5b.rotation);
enemyEffects.addSkeleton(sc.ep5c.x, sc.ep5c.y, sc.ep5c.rotation, 8);
enemyEffects.addSkeleton(sc.ep5d.x, sc.ep5d.y, sc.ep5d.rotation, 9);
enemyEffects.addSkeleton(sc.ep5e.x, sc.ep5e.y, sc.ep5e.rotation, 12);
enemyEffects.addSkeleton(sc.ep5f.x, sc.ep5f.y, sc.ep5f.rotation);
};
} else {
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
enemyEffects.addSkeleton(sc.ep6a.x, sc.ep6a.y, sc.ep6a.rotation, 1);
enemyEffects.addSkeleton(sc.ep6b.x, sc.ep6b.y, sc.ep6b.rotation);
enemyEffects.addSkeleton(sc.ep6c.x, sc.ep6c.y, sc.ep6c.rotation);
enemyEffects.addSkeleton(sc.ep6d.x, sc.ep6d.y, sc.ep6d.rotation);
enemyEffects.addSkeleton(sc.ep6e.x, sc.ep6e.y, sc.ep6e.rotation, 12);
enemyEffects.addSkeleton(sc.ep6f.x, sc.ep6f.y, sc.ep6f.rotation, 2);
};
};
} else {
if (gameEventArray[5]){
if (enemyEffects.ides.length == 0){
gameEventArray[5] = false;
enemyEffects.addSkeleton(sc.ep7a.x, sc.ep7a.y, sc.ep7a.rotation, 8);
enemyEffects.addSkeleton(sc.ep7b.x, sc.ep7b.y, sc.ep7b.rotation, 1);
enemyEffects.addSkeleton(sc.ep7c.x, sc.ep7c.y, sc.ep7c.rotation);
enemyEffects.addSkeleton(sc.ep7d.x, sc.ep7d.y, sc.ep7d.rotation, 9);
enemyEffects.addSkeleton(sc.ep7e.x, sc.ep7e.y, sc.ep7e.rotation);
enemyEffects.addSkeleton(sc.ep7f.x, sc.ep7f.y, sc.ep7f.rotation);
enemyEffects.addSkeleton(sc.ep7g.x, sc.ep7g.y, sc.ep7g.rotation, 12);
};
} else {
if (gameEventArray[6]){
if (enemyEffects.ides.length == 0){
gameEventArray[6] = false;
enemyEffects.addSkeleton(sc.ep8a.x, sc.ep8a.y, sc.ep8a.rotation, 9);
enemyEffects.addSkeleton(sc.ep8b.x, sc.ep8b.y, sc.ep8b.rotation, 10);
enemyEffects.addSkeleton(sc.ep8c.x, sc.ep8c.y, sc.ep8c.rotation);
enemyEffects.addSkeleton(sc.ep8d.x, sc.ep8d.y, sc.ep8d.rotation);
enemyEffects.addSkeleton(sc.ep8e.x, sc.ep8e.y, sc.ep8e.rotation, 9);
enemyEffects.addSkeleton(sc.ep8f.x, sc.ep8f.y, sc.ep8f.rotation, 8);
enemyEffects.addSkeleton(sc.ep8g.x, sc.ep8g.y, sc.ep8g.rotation, 9);
enemyEffects.addSkeleton(sc.ep8h.x, sc.ep8h.y, sc.ep8h.rotation, 14);
};
};
};
};
};
};
};
};
if (((((!(gameEventArray[3])) && (gameEventArray[4]))) && ((enemyEffects.ides.length < 1)))){
dispatchEvent(new SoundsEvent("narrationEvent", 3));
};
if (((!(gameEventArray[6])) && ((enemyEffects.ides.length < 1)))){
dispatchEvent(new SoundsEvent("narrationEvent", 4));
};
} else {
if (theFrame == 13){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
pickupEffects.addWeapon(sc.item1.x, sc.item1.y, 6);
pickupEffects.addGold(sc.gold1.x, sc.gold1.y, 1);
pickupEffects.addGold(sc.gold2.x, sc.gold2.y, 2);
pickupEffects.addGold(sc.gold3.x, sc.gold3.y, 2);
pickupEffects.addGold(sc.gold4.x, sc.gold4.y, 1);
pickupEffects.addGold(sc.gold5.x, sc.gold5.y, 2);
pickupEffects.addGold(sc.gold6.x, sc.gold6.y, 2);
pickupEffects.addGold(sc.gold7.x, sc.gold7.y, 3);
pickupEffects.addMedPack(sc.health1.x, sc.health1.y, 2);
pickupEffects.addMedPack(sc.health2.x, sc.health2.y, 3);
pickupEffects.addMedPack(sc.bossprep1.x, sc.bossprep1.y, 3);
pickupEffects.addAmmo(sc.ammo1.x, sc.ammo1.y, 1);
pickupEffects.addAmmo((sc.ammo1.x - 10), (sc.ammo1.y - 18), 2);
pickupEffects.addAmmo((sc.ammo1.x - 9), (sc.ammo1.y + 19), 2);
pickupEffects.addAmmo(sc.bossprep2.x, sc.bossprep2.y, 2);
pickupEffects.addAmmo(sc.bossprep3.x, sc.bossprep3.y, 2);
pickupEffects.addAmmo(sc.bossprep4.x, sc.bossprep4.y, 1);
pickupEffects.addAmmo(sc.bossprep5.x, sc.bossprep5.y, 1);
};
};
} else {
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
enemyEffects.addSkeleton(sc.ep1a.x, sc.ep1a.y, sc.ep1a.rotation, 12);
enemyEffects.addSkeleton(sc.ep1b.x, sc.ep1b.y, sc.ep1b.rotation, 2);
enemyEffects.addSkeleton(sc.ep1c.x, sc.ep1c.y, sc.ep1c.rotation);
};
};
} else {
if (gameEventArray[2]){
if (enemyEffects.ides.length == 0){
gameEventArray[2] = false;
dispatchEvent(new SoundsEvent("narrationEvent", 1));
enemyEffects.addSkeleton(sc.ep2a.x, sc.ep2a.y, sc.ep2a.rotation, 2);
enemyEffects.addSkeleton(sc.ep2b.x, sc.ep2b.y, sc.ep2b.rotation, 14);
enemyEffects.addSkeleton(sc.ep2c.x, sc.ep2c.y, sc.ep2c.rotation, 9);
enemyEffects.addSkeleton(sc.ep2d.x, sc.ep2d.y, sc.ep2d.rotation, 8);
enemyEffects.addSkeleton(sc.ep2e.x, sc.ep2e.y, sc.ep2e.rotation);
enemyEffects.addSkeleton(sc.ep2f.x, sc.ep2f.y, sc.ep2f.rotation, 3);
};
} else {
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
enemyEffects.addSkeleton(sc.ep3a.x, sc.ep3a.y, sc.ep3a.rotation, 8);
enemyEffects.addSkeleton(sc.ep3b.x, sc.ep3b.y, sc.ep3b.rotation, 3);
enemyEffects.addSkeleton(sc.ep3c.x, sc.ep3c.y, sc.ep3c.rotation, 2);
enemyEffects.addSkeleton(sc.ep3d.x, sc.ep3d.y, sc.ep3d.rotation, 14);
enemyEffects.addSkeleton(sc.ep3e.x, sc.ep3e.y, sc.ep3e.rotation, 9);
enemyEffects.addSkeleton(sc.ep3f.x, sc.ep3f.y, sc.ep3f.rotation, 13);
enemyEffects.addSkeleton(sc.ep3g.x, sc.ep3g.y, sc.ep3g.rotation, 8);
state.theRoot.soundManager.fadeMusic(30);
};
};
};
};
};
};
if (((!(gameEventArray[3])) && ((enemyEffects.ides.length < 4)))){
dispatchEvent(new SoundsEvent("narrationEvent", 2));
};
if (((!(gameEventArray[6])) && ((enemyEffects.ides.length < 1)))){
dispatchEvent(new SoundsEvent("narrationEvent", 4));
if (gameEventArray[5]){
state.theRoot.addMedal(13);
pickupEffects.addMedPack(sc.winhealth.x, sc.winhealth.y, 3);
pickupEffects.addGold(sc.wingold1.x, sc.wingold1.y, 3);
pickupEffects.addGold(sc.wingold2.x, sc.wingold2.y, 2);
pickupEffects.addGold(sc.wingold3.x, sc.wingold3.y, 3);
pickupEffects.addGold(sc.wingold4.x, sc.wingold4.y, 2);
pickupEffects.addGold(sc.wingold5.x, sc.wingold5.y, 2);
pickupEffects.addGold(sc.wingold6.x, sc.wingold6.y, 3);
pickupEffects.addGold(sc.wingold7.x, sc.wingold7.y, 2);
pickupEffects.addGold(sc.wingold8.x, sc.wingold8.y, 1);
pickupEffects.addGold(sc.wingold9.x, sc.wingold9.y, 1);
pickupEffects.addGold(sc.wingold10.x, sc.wingold10.y, 1);
pickupEffects.addGold(sc.wingold11.x, sc.wingold11.y, 1);
pickupEffects.addGold(sc.wingold12.x, sc.wingold12.y, 1);
pickupEffects.addGold(sc.wingold13.x, sc.wingold13.y, 1);
pickupEffects.addGold(sc.wingold14.x, sc.wingold14.y, 1);
pickupEffects.addGold(sc.wingold15.x, sc.wingold15.y, 1);
pickupEffects.addGold(sc.wingold16.x, sc.wingold16.y, 1);
pickupEffects.addGold(sc.wingold17.x, sc.wingold17.y, 1);
pickupEffects.addGold(sc.wingold18.x, sc.wingold18.y, 1);
pickupEffects.addGold(sc.wingold19.x, sc.wingold19.y, 1);
pickupEffects.addGold(sc.wingold20.x, sc.wingold20.y, 1);
gameEventArray[5] = false;
};
};
if (gameEventArray[6]){
if (gameSortArray[6] > 0){
_local3 = gameSortArray;
_local4 = 6;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[6] == 0){
state.theRoot.soundManager.addMusic(22);
sc.pirateBoss.setUp(sc.pirateBoss.the_hitbox, aniEffects);
sc.pirateBoss.setMoreUp(player);
sc.pirateBoss.addEventListener("soundEvent", enemyEffects.onSoundEvent);
sc.pirateBoss.addEventListener("useAttack", enemyEffects.onAttackUsed);
sc.pirateBoss.addEventListener("defeatEvent", enemyEffects.onDefeat);
sc.pirateBoss.updObj = function (_arg1:Object):void{
sc.pirateBoss.upd(_arg1);
sc.pirateBoss.updAni();
};
gameEventArray[6] = false;
enemyEffects.ides.push(sc.pirateBoss);
dispatchEvent(new SoundsEvent("narrationEvent", 3));
};
};
};
} else {
if (theFrame == 14){
if (sc.specEff.currentFrame > 200){
tempVar = ((mrandom() * (sc.specEff.currentFrame - 200)) / 100);
i = 1;
while (i < tempVar) {
aniEffects.addFlame(sc.fire1.x, sc.fire1.y);
i = (i + 1);
};
};
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
pickupEffects.addGold(sc.gold1.x, sc.gold1.y, 1);
pickupEffects.addGold(sc.gold2.x, sc.gold2.y, 2);
pickupEffects.addGold(sc.gold3.x, sc.gold3.y, 2);
pickupEffects.addGold(sc.gold4.x, sc.gold4.y, 1);
pickupEffects.addGold(sc.gold5.x, sc.gold5.y, 2);
pickupEffects.addGold(sc.gold6.x, sc.gold6.y, 2);
pickupEffects.addGold(sc.gold7.x, sc.gold7.y, 1);
pickupEffects.addGold(sc.gold8.x, sc.gold8.y, 1);
pickupEffects.addGold(sc.gold9.x, sc.gold9.y, 2);
pickupEffects.addGold(sc.gold10.x, sc.gold10.y, 1);
pickupEffects.addGold(sc.gold11.x, sc.gold11.y, 2);
pickupEffects.addGold(sc.gold12.x, sc.gold12.y, 1);
pickupEffects.addGold(sc.gold13.x, sc.gold13.y, 1);
pickupEffects.addMedPack(sc.health1.x, sc.health1.y, 3);
pickupEffects.addMedPack(sc.health2.x, sc.health2.y, 3);
pickupEffects.addWeapon(sc.gun1.x, sc.gun1.y, 5);
pickupEffects.addAmmo(sc.ammo1.x, sc.ammo1.y, 1);
pickupEffects.addAmmo(sc.ammo2.x, sc.ammo2.y, 2);
pickupEffects.addAmmo(sc.ammo3.x, sc.ammo3.y, 1);
pickupEffects.addAmmo(sc.ammo4.x, sc.ammo4.y, 2);
pickupEffects.addAmmo(sc.ammo5.x, sc.ammo5.y, 1);
};
};
} else {
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
state.theRoot.tearEffect.gotoAndPlay(2);
gameEventArray[1] = false;
};
};
} else {
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
sc.preBridge1.gotoAndPlay(3);
gameEventArray[2] = false;
};
};
};
};
};
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
state.theRoot.fearEffect.addFear(state);
};
};
};
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
attackEffects.addDemonAni(state, player);
};
};
};
if (gameEventArray[5]){
if (gameSortArray[5] > 0){
_local3 = gameSortArray;
_local4 = 5;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[5] == 0){
gameEventArray[5] = false;
sc.preBridge2.gotoAndPlay(3);
};
};
};
if (gameEventArray[6]){
if (gameSortArray[6] > 0){
_local3 = gameSortArray;
_local4 = 6;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[6] == 0){
gameEventArray[6] = false;
attackEffects.addDemonAni(state, player);
};
};
};
if (gameEventArray[7]){
if (gameSortArray[7] > 0){
_local3 = gameSortArray;
_local4 = 7;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[7] == 0){
gameEventArray[7] = false;
enemyEffects.addDemon(0);
};
};
};
if (gameEventArray[8]){
if (gameSortArray[8] > 0){
_local3 = gameSortArray;
_local4 = 8;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[8] == 0){
gameEventArray[8] = false;
enemyEffects.addDemon(20, 8);
enemyEffects.addDemon(60, 9);
enemyEffects.addDemon(170, 8);
};
};
};
if (gameEventArray[9]){
if (gameSortArray[9] > 0){
_local3 = gameSortArray;
_local4 = 9;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[9] == 0){
gameEventArray[9] = false;
sc.specEff.gotoAndStop(2);
sc.door2.gotoAndStop(1);
sc.door2.active = false;
};
};
} else {
if ((((sc.specEff.currentFrame > 400)) && ((sc.specEff.currentFrame < 900)))){
if (sc.specEff.currentFrame < 600){
if ((sc.specEff.currentFrame % 32) == 0){
tempClip = sc[("shadowSpawn" + String(ceil((mrandom() * 14))))];
enemyEffects.addShadow(tempClip.x, tempClip.y, tempClip.rotation);
};
} else {
if (sc.specEff.currentFrame < 760){
if ((sc.specEff.currentFrame % 16) == 0){
tempClip = sc[("shadowSpawn" + String(ceil((mrandom() * 14))))];
enemyEffects.addShadow(tempClip.x, tempClip.y, tempClip.rotation);
};
} else {
if ((sc.specEff.currentFrame % 8) == 0){
tempClip = sc[("shadowSpawn" + String(ceil((mrandom() * 14))))];
enemyEffects.addShadow(tempClip.x, tempClip.y, tempClip.rotation);
};
};
};
};
};
if (gameEventArray[10]){
if (gameSortArray[10] > 0){
_local3 = gameSortArray;
_local4 = 10;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[10] == 0){
gameEventArray[10] = false;
enemyEffects.addMermaid(sc.merm1.x, sc.merm1.y, sc.merm1.rotation);
enemyEffects.addMermaid(sc.merm2.x, sc.merm2.y, sc.merm2.rotation);
enemyEffects.addMermaid(sc.merm3.x, sc.merm3.y, sc.merm3.rotation);
enemyEffects.addMermaid(sc.merm4.x, sc.merm4.y, sc.merm4.rotation);
};
};
};
if (gameEventArray[11]){
if (gameSortArray[11] > 0){
_local3 = gameSortArray;
_local4 = 11;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[11] == 0){
enemyEffects.addLobsterMan(sc.ep1.x, sc.ep1.y, sc.ep1.rotation, 1);
enemyEffects.addLobsterMan((sc.ep1.x - 22), (sc.ep1.y + 11), sc.ep1.rotation, 3);
enemyEffects.addLobsterMan((sc.ep1.x + 23), (sc.ep1.y + 9), sc.ep1.rotation, 12);
enemyEffects.addLobsterMan((sc.ep2.x - 30), (sc.ep2.y + 9), sc.ep2.rotation, 8);
enemyEffects.addLobsterMan(sc.ep2.x, sc.ep2.y, sc.ep2.rotation);
enemyEffects.addLobsterMan((sc.ep2.x + 28), (sc.ep2.y - 7), sc.ep2.rotation, 9);
enemyEffects.addLobsterMan((sc.ep3.x - 20), (sc.ep3.y + 18), sc.ep3.rotation);
enemyEffects.addLobsterMan((sc.ep3.x + 20), (sc.ep3.y + 17), sc.ep3.rotation, 13);
enemyEffects.addLobsterMan((sc.ep3.x - 20), (sc.ep3.y - 19), sc.ep3.rotation);
enemyEffects.addLobsterMan((sc.ep3.x + 20), (sc.ep3.y - 18), sc.ep3.rotation, 1);
enemyEffects.addLobsterMan(sc.ep4.x, sc.ep4.y, sc.ep4.rotation, 8);
enemyEffects.addLobsterMan(sc.ep5.x, sc.ep5.y, sc.ep5.rotation, 12);
enemyEffects.addLobsterMan(sc.ep6.x, sc.ep6.y, sc.ep6.rotation);
enemyEffects.addLobsterMan(sc.ep7.x, sc.ep7.y, sc.ep7.rotation, 2);
enemyEffects.addLobsterMan(sc.ep8.x, sc.ep8.y, sc.ep8.rotation, 12);
enemyEffects.addLobsterMan(sc.ep9.x, sc.ep9.y, sc.ep9.rotation, 8);
gameEventArray[11] = false;
};
};
};
} else {
if (theFrame == 15){
if (sc.fountainTop1.hitTestObject(playArea)){
aniEffects.addSplash(((sc.fountainTop1.x - 10) + (mrandom() * 20)), ((sc.fountainTop1.y - 10) + (mrandom() * 20)), (mrandom() < 0.5), 0.6);
if (mrandom() < 0.1){
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
if (sc.fountainTop2.hitTestObject(playArea)){
aniEffects.addSplash(((sc.fountainTop2.x - 10) + (mrandom() * 20)), ((sc.fountainTop2.y - 10) + (mrandom() * 20)), (mrandom() < 0.5), 0.6);
if (mrandom() < 0.1){
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
if (sc.fountainBase1.hitTestObject(playArea)){
aniEffects.addSplash(((sc.fountainBase1.x - 10) + (mrandom() * 20)), ((sc.fountainBase1.y - 10) + (mrandom() * 20)), (mrandom() < 0.5), 0.6, sc.effectsSpecWater);
if (mrandom() < 0.1){
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
if (sc.fountainBase2.hitTestObject(playArea)){
aniEffects.addSplash(((sc.fountainBase2.x - 10) + (mrandom() * 20)), ((sc.fountainBase2.y - 10) + (mrandom() * 20)), (mrandom() < 0.5), 0.6, sc.effectsSpecWater);
if (mrandom() < 0.1){
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
if (sc.fountainBase3.hitTestObject(playArea)){
aniEffects.addSplash(((sc.fountainBase3.x - 10) + (mrandom() * 20)), ((sc.fountainBase3.y - 10) + (mrandom() * 20)), (mrandom() < 0.5), 0.6, sc.effectsSpecWater);
if (mrandom() < 0.1){
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
if (sc.fountainBase4.hitTestObject(playArea)){
aniEffects.addSplash(((sc.fountainBase4.x - 10) + (mrandom() * 20)), ((sc.fountainBase4.y - 10) + (mrandom() * 20)), (mrandom() < 0.5), 0.6, sc.effectsSpecWater);
if (mrandom() < 0.1){
dispatchEvent(new SoundsEvent("soundEvent", (60 + (2 * ceil((mrandom() * 3))))));
};
};
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
pickupEffects.addGold(sc.gold1.x, sc.gold1.y, 1);
pickupEffects.addMedPack(sc.health1.x, sc.health1.y, 2);
pickupEffects.addMedPack(sc.health2.x, sc.health2.y, 3);
pickupEffects.addMedPack(sc.health3.x, sc.health3.y, 2);
pickupEffects.addMedPack(sc.health4.x, sc.health4.y, 3);
pickupEffects.addAmmo(sc.ammo1.x, sc.ammo1.y, 1);
pickupEffects.addAmmo(sc.ammo2.x, sc.ammo2.y, 2);
pickupEffects.addAmmo(sc.ammo3.x, sc.ammo3.y, 1);
pickupEffects.addAmmo(sc.ammo4.x, sc.ammo4.y, 3);
pickupEffects.addAmmo(sc.ammo5.x, sc.ammo5.y, 2);
pickupEffects.addAmmo(sc.ammo6.x, sc.ammo6.y, 1);
pickupEffects.addAmmo(sc.ammo7.x, sc.ammo7.y, 3);
pickupEffects.addAmmo(sc.ammo8.x, sc.ammo8.y, 1);
gameEventArray[0] = false;
};
};
};
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
enemyEffects.addPiper(sc.piperSpawn1.x, sc.piperSpawn1.y, sc.piperSpawn1.rotation);
enemyEffects.addPiper(sc.piperSpawn2.x, sc.piperSpawn2.y, sc.piperSpawn2.rotation);
enemyEffects.addLobsterMan(sc.lobsterMan1.x, sc.lobsterMan1.y, sc.lobsterMan1.rotation);
enemyEffects.addLobsterMan((sc.lobsterMan1.x - 32), (sc.lobsterMan1.y + 18), sc.lobsterMan1.rotation);
enemyEffects.addLobsterMan((sc.lobsterMan1.x + 31), (sc.lobsterMan1.y + 20), sc.lobsterMan1.rotation);
gameEventArray[1] = false;
};
};
};
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
enemyEffects.addLobsterMan(sc.lobsterMan2.x, sc.lobsterMan2.y, sc.lobsterMan2.rotation, 2);
enemyEffects.addLobsterMan((sc.lobsterMan2.x + 10), (sc.lobsterMan2.y + 30), sc.lobsterMan2.rotation);
enemyEffects.addLobsterMan((sc.lobsterMan2.x - 10), (sc.lobsterMan2.y + 60), sc.lobsterMan2.rotation, 8);
enemyEffects.addLobsterMan((sc.lobsterMan2.x - 35), (sc.lobsterMan2.y + 20), sc.lobsterMan2.rotation, 8);
gameEventArray[2] = false;
};
};
};
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
enemyEffects.addLobsterMan(sc.lobsterMan3.x, sc.lobsterMan3.y, sc.lobsterMan3.rotation, 12);
enemyEffects.addLobsterMan((sc.lobsterMan3.x - 30), (sc.lobsterMan3.y + 10), sc.lobsterMan3.rotation);
enemyEffects.addLobsterMan((sc.lobsterMan3.x + 32), (sc.lobsterMan3.y - 8), sc.lobsterMan3.rotation, 1);
gameEventArray[3] = false;
};
};
};
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
enemyEffects.addLobsterMan(sc.lobsterMan4.x, sc.lobsterMan4.y, sc.lobsterMan4.rotation);
enemyEffects.addLobsterMan((sc.lobsterMan4.x - 3), (sc.lobsterMan4.y - 40), sc.lobsterMan4.rotation, 9);
enemyEffects.addLobsterMan((sc.lobsterMan4.x - 4), (sc.lobsterMan4.y + 38), sc.lobsterMan4.rotation);
state.theRoot.soundManager.fadeMusic(30);
gameEventArray[4] = false;
};
};
};
if (gameEventArray[5]){
if (gameSortArray[5] > 0){
_local3 = gameSortArray;
_local4 = 5;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[5] == 0){
sc.bridge4.goingIn = true;
sc.bridge4.active = false;
sc.crabBoss.setUp(sc.crabBoss.the_hitbox, aniEffects);
sc.crabBoss.setMoreUp(player);
sc.crabBoss.addEventListener("soundEvent", enemyEffects.onSoundEvent);
sc.crabBoss.addEventListener("useAttack", enemyEffects.onAttackUsed);
sc.crabBoss.addEventListener("defeatEvent", enemyEffects.onDefeat);
sc.crabBoss.updObj = function (_arg1:Object):void{
sc.crabBoss.upd(_arg1);
sc.crabBoss.updAni();
};
enemyEffects.ides.push(sc.crabBoss);
state.theRoot.soundManager.addMusic(22);
gameEventArray[5] = false;
};
};
};
if (((!(gameEventArray[5])) && ((enemyEffects.ides.length < 1)))){
dispatchEvent(new SoundsEvent("narrationEvent", 4));
if (gameEventArray[6]){
state.theRoot.addMedal(14);
pickupEffects.addMedPack(sc.winhealth.x, sc.winhealth.y, 3);
pickupEffects.addGold(sc.wingold1.x, sc.wingold1.y, 3);
pickupEffects.addGold(sc.wingold2.x, sc.wingold2.y, 2);
pickupEffects.addGold(sc.wingold3.x, sc.wingold3.y, 3);
pickupEffects.addGold(sc.wingold4.x, sc.wingold4.y, 2);
pickupEffects.addGold(sc.wingold5.x, sc.wingold5.y, 2);
pickupEffects.addGold(sc.wingold6.x, sc.wingold6.y, 3);
pickupEffects.addGold(sc.wingold7.x, sc.wingold7.y, 2);
pickupEffects.addGold(sc.wingold8.x, sc.wingold8.y, 1);
pickupEffects.addGold(sc.wingold9.x, sc.wingold9.y, 1);
pickupEffects.addGold(sc.wingold10.x, sc.wingold10.y, 1);
pickupEffects.addGold(sc.wingold11.x, sc.wingold11.y, 1);
pickupEffects.addGold(sc.wingold12.x, sc.wingold12.y, 1);
pickupEffects.addGold(sc.wingold13.x, sc.wingold13.y, 1);
pickupEffects.addGold(sc.wingold14.x, sc.wingold14.y, 1);
pickupEffects.addGold(sc.wingold15.x, sc.wingold15.y, 1);
pickupEffects.addGold(sc.wingold16.x, sc.wingold16.y, 1);
pickupEffects.addGold(sc.wingold17.x, sc.wingold17.y, 1);
pickupEffects.addGold(sc.wingold18.x, sc.wingold18.y, 1);
gameEventArray[6] = false;
};
};
} else {
if (theFrame == 16){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
pickupEffects.addWeapon(sc.gun1.x, sc.gun1.y, 7);
pickupEffects.addGold(sc.gold1.x, sc.gold1.y, 1);
pickupEffects.addGold(sc.gold2.x, sc.gold2.y, 1);
pickupEffects.addGold(sc.gold3.x, sc.gold3.y, 3);
pickupEffects.addGold(sc.gold4.x, sc.gold4.y, 1);
pickupEffects.addGold(sc.gold5.x, sc.gold5.y, 2);
pickupEffects.addGold(sc.gold6.x, sc.gold6.y, 2);
pickupEffects.addMedPack(sc.health1.x, sc.health1.y, 2);
pickupEffects.addAmmo(sc.ammo1.x, sc.ammo1.y, 1);
pickupEffects.addAmmo(sc.ammo2.x, sc.ammo2.y, 3);
pickupEffects.addAmmo(sc.ammo3.x, sc.ammo3.y, 2);
pickupEffects.addAmmo(sc.ammo4.x, sc.ammo4.y, 2);
pickupEffects.addAmmo(sc.ammo5.x, sc.ammo5.y, 1);
pickupEffects.addAmmo(sc.ammo6.x, sc.ammo6.y, 3);
pickupEffects.addAmmo(sc.ammo7.x, sc.ammo7.y, 1);
gameEventArray[0] = false;
};
};
};
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
sc.eskerGrab.gotoAndStop(2);
gameEventArray[1] = false;
};
};
};
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
enemyEffects.addSkeleton(sc.ep1a.x, sc.ep1a.y, sc.ep1a.rotation, 8);
enemyEffects.addSkeleton(sc.ep1b.x, sc.ep1b.y, sc.ep1b.rotation, 12);
enemyEffects.addSkeleton(sc.ep1c.x, sc.ep1c.y, sc.ep1c.rotation, 9);
enemyEffects.addLobsterMan(sc.ep2a.x, sc.ep2a.y, sc.ep2a.rotation);
enemyEffects.addLobsterMan(sc.ep2b.x, sc.ep2b.y, sc.ep2b.rotation);
enemyEffects.addLobsterMan(sc.ep2c.x, sc.ep2c.y, sc.ep2c.rotation, 1);
enemyEffects.addLobsterMan(sc.ep2d.x, sc.ep2d.y, sc.ep2d.rotation);
enemyEffects.addLobsterMan(sc.ep2e.x, sc.ep2e.y, sc.ep2e.rotation, 3);
enemyEffects.addLobsterMan(sc.ep2f.x, sc.ep2f.y, sc.ep2f.rotation, 13);
gameEventArray[2] = false;
};
};
};
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
enemyEffects.addFloatFish(sc.ep3a.x, sc.ep3a.y, sc.ep3a.rotation);
enemyEffects.addFloatFish(sc.ep3b.x, sc.ep3b.y, sc.ep3b.rotation);
enemyEffects.addFloatFish(sc.ep3c.x, sc.ep3c.y, sc.ep3c.rotation);
enemyEffects.addFloatFish(sc.ep3d.x, sc.ep3d.y, sc.ep3d.rotation);
enemyEffects.addFloatFish(sc.ep3e.x, sc.ep3e.y, sc.ep3e.rotation);
gameEventArray[3] = false;
};
};
};
if (((((!(gameEventArray[3])) && (gameEventArray[4]))) && ((enemyEffects.ides.length < 1)))){
dispatchEvent(new SoundsEvent("narrationEvent", 2));
gameEventArray[4] = false;
};
} else {
if (theFrame == 17){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
pickupEffects.addMedPack(sc.health1.x, sc.health1.y, 3);
pickupEffects.addMedPack(sc.health2.x, sc.health2.y, 2);
pickupEffects.addMedPack(sc.health3.x, sc.health3.y, 3);
pickupEffects.addMedPack(sc.health4.x, sc.health4.y, 2);
pickupEffects.addMedPack(sc.health5.x, sc.health5.y, 2);
pickupEffects.addMedPack(sc.health6.x, sc.health6.y, 1);
pickupEffects.addAmmo(sc.ammo1.x, sc.ammo1.y, 4);
pickupEffects.addAmmo(sc.ammo2.x, sc.ammo2.y, 2);
pickupEffects.addAmmo(sc.ammo3.x, sc.ammo3.y, 3);
pickupEffects.addAmmo(sc.ammo4.x, sc.ammo4.y, 1);
pickupEffects.addAmmo(sc.ammo5.x, sc.ammo5.y, 2);
pickupEffects.addAmmo(sc.ammo6.x, sc.ammo6.y, 1);
pickupEffects.addAmmo(sc.ammo7.x, sc.ammo7.y, 2);
pickupEffects.addAmmo(sc.ammo8.x, sc.ammo8.y, 3);
pickupEffects.addAmmo(sc.ammo9.x, sc.ammo9.y, 4);
pickupEffects.addAmmo(sc.ammo10.x, sc.ammo10.y, 2);
pickupEffects.addAmmo(sc.ammo11.x, sc.ammo11.y, 3);
pickupEffects.addAmmo(sc.ammo12.x, sc.ammo12.y, 1);
pickupEffects.addGold(sc.gold1.x, sc.gold1.y, 1);
pickupEffects.addGold(sc.gold2.x, sc.gold2.y, 1);
pickupEffects.addGold(sc.gold3.x, sc.gold3.y, 2);
pickupEffects.addGold(sc.gold4.x, sc.gold4.y, 1);
pickupEffects.addGold(sc.gold5.x, sc.gold5.y, 1);
pickupEffects.addGold(sc.gold6.x, sc.gold6.y, 1);
pickupEffects.addGold(sc.gold7.x, sc.gold7.y, 2);
pickupEffects.addGold(sc.gold8.x, sc.gold8.y, 1);
pickupEffects.addGold(sc.gold9.x, sc.gold9.y, 1);
pickupEffects.addGold(sc.gold10.x, sc.gold10.y, 3);
pickupEffects.addGold(sc.gold11.x, sc.gold11.y, 1);
pickupEffects.addGold(sc.gold12.x, sc.gold12.y, 2);
pickupEffects.addGold(sc.gold13.x, sc.gold13.y, 1);
pickupEffects.addGold(sc.gold14.x, sc.gold14.y, 1);
pickupEffects.addGold(sc.gold15.x, sc.gold15.y, 1);
pickupEffects.addGold(sc.gold16.x, sc.gold16.y, 2);
pickupEffects.addGold(sc.gold17.x, sc.gold17.y, 1);
pickupEffects.addGold(sc.gold18.x, sc.gold18.y, 3);
pickupEffects.addGold(sc.gold19.x, sc.gold19.y, 1);
};
};
};
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
enemyEffects.addLobsterMan(sc.lobster1a.x, sc.lobster1a.y, sc.lobster1a.rotation);
enemyEffects.addLobsterMan(sc.lobster1b.x, sc.lobster1b.y, sc.lobster1b.rotation, 8);
enemyEffects.addLobsterMan(sc.lobster1c.x, sc.lobster1c.y, sc.lobster1c.rotation);
enemyEffects.addLobsterMan(sc.lobster1d.x, sc.lobster1d.y, sc.lobster1d.rotation);
enemyEffects.addLobsterMan(sc.lobster1e.x, sc.lobster1e.y, sc.lobster1e.rotation, 12);
};
};
};
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
gameEventArray[2] = false;
enemyEffects.addMerman(sc.merman1.x, sc.merman1.y, sc.merman1.rotation, 10);
};
};
};
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
enemyEffects.addLobsterMan(sc.lobster2a.x, sc.lobster2a.y, sc.lobster2a.rotation, 2);
enemyEffects.addLobsterMan(sc.lobster2b.x, sc.lobster2b.y, sc.lobster2b.rotation);
enemyEffects.addLobsterMan(sc.lobster2c.x, sc.lobster2c.y, sc.lobster2c.rotation);
enemyEffects.addLobsterMan(sc.lobster2d.x, sc.lobster2d.y, sc.lobster2d.rotation);
enemyEffects.addLobsterMan(sc.lobster2e.x, sc.lobster2e.y, sc.lobster2e.rotation, 12);
enemyEffects.addLobsterMan(sc.lobster2f.x, sc.lobster2f.y, sc.lobster2f.rotation, 1);
};
};
};
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
enemyEffects.addMerman(sc.merman2a.x, sc.merman2a.y, sc.merman2a.rotation, 2);
enemyEffects.addMerman(sc.merman2b.x, sc.merman2b.y, sc.merman2b.rotation);
enemyEffects.addMerman(sc.merman2c.x, sc.merman2c.y, sc.merman2c.rotation, 12);
enemyEffects.addMerman(sc.merman2d.x, sc.merman2d.y, sc.merman2d.rotation);
};
};
};
if (gameEventArray[5]){
if (gameSortArray[5] > 0){
_local3 = gameSortArray;
_local4 = 5;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[5] == 0){
gameEventArray[5] = false;
enemyEffects.addCrawler(sc.crawler1a.x, sc.crawler1a.y, sc.crawler1a.rotation);
enemyEffects.addCrawler(sc.crawler1b.x, sc.crawler1b.y, sc.crawler1b.rotation);
enemyEffects.addCrawler(sc.crawler1c.x, sc.crawler1c.y, sc.crawler1c.rotation, 8);
enemyEffects.addCrawler(sc.crawler1d.x, sc.crawler1d.y, sc.crawler1d.rotation);
enemyEffects.addCrawler(sc.crawler1e.x, sc.crawler1e.y, sc.crawler1e.rotation, 8);
enemyEffects.addCrawler(sc.crawler1f.x, sc.crawler1f.y, sc.crawler1f.rotation);
enemyEffects.addCrawler(sc.crawler1g.x, sc.crawler1g.y, sc.crawler1g.rotation);
enemyEffects.addCrawler(sc.crawler1h.x, sc.crawler1h.y, sc.crawler1h.rotation);
enemyEffects.addCrawler(sc.crawler1i.x, sc.crawler1i.y, sc.crawler1i.rotation);
enemyEffects.addCrawler(sc.crawler1j.x, sc.crawler1j.y, sc.crawler1j.rotation);
enemyEffects.addCrawler(sc.crawler1k.x, sc.crawler1k.y, sc.crawler1k.rotation, 8);
enemyEffects.addCrawler(sc.crawler1l.x, sc.crawler1l.y, sc.crawler1l.rotation);
enemyEffects.addCrawler(sc.crawler1m.x, sc.crawler1m.y, sc.crawler1m.rotation);
enemyEffects.addCrawler(sc.crawler1n.x, sc.crawler1n.y, sc.crawler1n.rotation);
enemyEffects.addCrawler(sc.crawler1o.x, sc.crawler1o.y, sc.crawler1o.rotation, 12);
enemyEffects.addCrawler(sc.crawler1p.x, sc.crawler1p.y, sc.crawler1p.rotation, 13);
enemyEffects.addMermaid(sc.mermaid1.x, sc.mermaid1.y, sc.mermaid1.rotation);
enemyEffects.addMermaid(sc.mermaid2.x, sc.mermaid2.y, sc.mermaid2.rotation);
enemyEffects.addMermaid(sc.mermaid3.x, sc.mermaid3.y, sc.mermaid3.rotation);
};
};
};
if (gameEventArray[6]){
if (gameSortArray[6] > 0){
_local3 = gameEventArray;
_local4 = 6;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[6] == 0){
gameSortArray[6] = false;
enemyEffects.addMermaid(sc.mermaid4.x, sc.mermaid4.y, sc.mermaid4.rotation);
enemyEffects.addMermaid(sc.mermaid5.x, sc.mermaid5.y, sc.mermaid5.rotation);
enemyEffects.addMermaid(sc.mermaid6.x, sc.mermaid6.y, sc.mermaid6.rotation);
};
};
};
if (gameEventArray[7]){
if (gameSortArray[7] > 0){
_local3 = gameSortArray;
_local4 = 7;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[7] == 0){
gameEventArray[7] = false;
enemyEffects.addDemon(10, 9);
enemyEffects.addDemon(50, 8);
enemyEffects.addDemon(90, 9);
enemyEffects.addCrawler(sc.crawler2a.x, sc.crawler2a.y, sc.crawler2a.rotation);
enemyEffects.addCrawler(sc.crawler2b.x, sc.crawler2b.y, sc.crawler2b.rotation);
enemyEffects.addCrawler(sc.crawler2c.x, sc.crawler2c.y, sc.crawler2c.rotation);
enemyEffects.addCrawler(sc.crawler2d.x, sc.crawler2d.y, sc.crawler2d.rotation);
enemyEffects.addCrawler(sc.crawler2e.x, sc.crawler2e.y, sc.crawler2e.rotation);
enemyEffects.addCrawler(sc.crawler2f.x, sc.crawler2f.y, sc.crawler2f.rotation);
enemyEffects.addCrawler(sc.crawler2g.x, sc.crawler2g.y, sc.crawler2g.rotation);
enemyEffects.addCrawler(sc.crawler2h.x, sc.crawler2h.y, sc.crawler2h.rotation);
enemyEffects.addCrawler(sc.crawler2i.x, sc.crawler2i.y, sc.crawler2i.rotation);
enemyEffects.addCrawler(sc.crawler2j.x, sc.crawler2j.y, sc.crawler2j.rotation);
enemyEffects.addCrawler(sc.crawler2k.x, sc.crawler2k.y, sc.crawler2k.rotation);
enemyEffects.addCrawler(sc.crawler2l.x, sc.crawler2l.y, sc.crawler2l.rotation);
enemyEffects.addCrawler(sc.crawler2m.x, sc.crawler2m.y, sc.crawler2m.rotation);
enemyEffects.addCrawler(sc.crawler2n.x, sc.crawler2n.y, sc.crawler2n.rotation);
enemyEffects.addCrawler(sc.crawler2o.x, sc.crawler2o.y, sc.crawler2o.rotation);
enemyEffects.addCrawler(sc.crawler2p.x, sc.crawler2p.y, sc.crawler2p.rotation);
enemyEffects.addCrawler(sc.crawler2q.x, sc.crawler2q.y, sc.crawler2q.rotation);
enemyEffects.addCrawler(sc.crawler2r.x, sc.crawler2r.y, sc.crawler2r.rotation);
};
};
};
if (gameEventArray[8]){
if (gameSortArray[8] > 0){
_local3 = gameSortArray;
_local4 = 8;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[8] == 0){
gameEventArray[8] = false;
enemyEffects.addMerman(sc.merman3a.x, sc.merman3a.y, sc.merman3a.rotation);
enemyEffects.addMerman(sc.merman3b.x, sc.merman3b.y, sc.merman3b.rotation);
};
};
};
if (gameEventArray[9]){
if (gameSortArray[9] > 0){
_local3 = gameSortArray;
_local4 = 9;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[9] == 0){
gameEventArray[9] = false;
enemyEffects.addMerman(sc.merman4a.x, sc.merman4a.y, sc.merman4a.rotation);
enemyEffects.addMerman(sc.merman4b.x, sc.merman4b.y, sc.merman4b.rotation);
enemyEffects.addMerman(sc.merman4c.x, sc.merman4c.y, sc.merman4c.rotation);
};
};
};
if (gameEventArray[10]){
if (gameSortArray[10] > 0){
_local3 = gameSortArray;
_local4 = 10;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[10] == 0){
gameEventArray[10] = false;
enemyEffects.addMerman(sc.merman5a.x, sc.merman5a.y, sc.merman5a.rotation);
enemyEffects.addMerman(sc.merman5b.x, sc.merman5b.y, sc.merman5b.rotation);
enemyEffects.addMerman(sc.merman5c.x, sc.merman5c.y, sc.merman5c.rotation);
enemyEffects.addMerman(sc.merman5d.x, sc.merman5d.y, sc.merman5d.rotation);
};
};
};
} else {
if (theFrame == 18){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
if (!state.theRoot.trinkets[1]){
pickupEffects.addTrinket(sc.trinket1.x, sc.trinket1.y, 2);
};
pickupEffects.addMedPack(sc.health1.x, sc.health1.y, 3);
pickupEffects.addMedPack(sc.health2.x, sc.health2.y, 2);
pickupEffects.addMedPack(sc.health3.x, sc.health3.y, 2);
pickupEffects.addMedPack(sc.health4.x, sc.health4.y, 2);
pickupEffects.addMedPack(sc.health5.x, sc.health5.y, 3);
pickupEffects.addMedPack(sc.health6.x, sc.health6.y, 1);
pickupEffects.addAmmo(sc.ammo1.x, sc.ammo1.y, 4);
pickupEffects.addAmmo(sc.ammo2.x, sc.ammo2.y, 2);
pickupEffects.addAmmo(sc.ammo3.x, sc.ammo3.y, 3);
pickupEffects.addAmmo(sc.ammo4.x, sc.ammo4.y, 1);
pickupEffects.addAmmo(sc.ammo5.x, sc.ammo5.y, 2);
pickupEffects.addAmmo(sc.ammo6.x, sc.ammo6.y, 1);
pickupEffects.addAmmo(sc.ammo7.x, sc.ammo7.y, 2);
pickupEffects.addAmmo(sc.ammo8.x, sc.ammo8.y, 3);
pickupEffects.addAmmo(sc.ammo9.x, sc.ammo9.y, 4);
pickupEffects.addAmmo(sc.ammo10.x, sc.ammo10.y, 2);
pickupEffects.addAmmo(sc.ammo11.x, sc.ammo11.y, 3);
pickupEffects.addAmmo(sc.ammo12.x, sc.ammo12.y, 1);
pickupEffects.addAmmo(sc.ammo13.x, sc.ammo13.y, 3);
pickupEffects.addAmmo(sc.ammo14.x, sc.ammo14.y, 1);
pickupEffects.addAmmo(sc.ammo15.x, sc.ammo15.y, 2);
pickupEffects.addAmmo(sc.ammo16.x, sc.ammo16.y, 1);
pickupEffects.addAmmo(sc.ammo17.x, sc.ammo17.y, 2);
pickupEffects.addAmmo(sc.ammo18.x, sc.ammo18.y, 3);
pickupEffects.addAmmo(sc.ammo19.x, sc.ammo19.y, 4);
pickupEffects.addAmmo(sc.ammo20.x, sc.ammo20.y, 2);
pickupEffects.addAmmo(sc.ammo21.x, sc.ammo21.y, 3);
pickupEffects.addAmmo(sc.ammo22.x, sc.ammo22.y, 1);
pickupEffects.addGold(sc.gold1.x, sc.gold1.y, 3);
pickupEffects.addGold(sc.gold2.x, sc.gold2.y, 3);
pickupEffects.addGold(sc.gold3.x, sc.gold3.y, 2);
pickupEffects.addGold(sc.gold4.x, sc.gold4.y, 4);
pickupEffects.addGold(sc.gold5.x, sc.gold5.y, 4);
pickupEffects.addGold(sc.gold6.x, sc.gold6.y, 2);
pickupEffects.addGold(sc.gold7.x, sc.gold7.y, 2);
pickupEffects.addGold(sc.gold8.x, sc.gold8.y, 3);
pickupEffects.addGold(sc.gold9.x, sc.gold9.y, 3);
pickupEffects.addGold(sc.gold10.x, sc.gold10.y, 2);
pickupEffects.addGold(sc.gold11.x, sc.gold11.y, 3);
pickupEffects.addGold(sc.gold12.x, sc.gold12.y, 2);
pickupEffects.addGold(sc.gold13.x, sc.gold13.y, 1);
pickupEffects.addGold(sc.gold14.x, sc.gold14.y, 1);
pickupEffects.addGold(sc.gold15.x, sc.gold15.y, 1);
pickupEffects.addGold(sc.gold16.x, sc.gold16.y, 1);
pickupEffects.addGold(sc.gold17.x, sc.gold17.y, 1);
};
};
};
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
enemyEffects.addFloatFish(sc.floatfish1a.x, sc.floatfish1a.y, sc.floatfish1a.rotation);
enemyEffects.addFloatFish(sc.floatfish1b.x, sc.floatfish1b.y, sc.floatfish1b.rotation);
enemyEffects.addFloatFish(sc.floatfish1c.x, sc.floatfish1c.y, sc.floatfish1c.rotation);
enemyEffects.addFloatFish(sc.floatfish1d.x, sc.floatfish1d.y, sc.floatfish1d.rotation);
};
};
};
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
gameEventArray[2] = false;
enemyEffects.addOctomage(sc.octomage1a.x, sc.octomage1a.y, sc.octomage1a.rotation);
};
};
};
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
enemyEffects.addMerman(sc.merman1a.x, sc.merman1a.y, sc.merman1a.rotation);
enemyEffects.addMerman(sc.merman1b.x, sc.merman1b.y, sc.merman1b.rotation);
enemyEffects.addMerman(sc.merman1c.x, sc.merman1c.y, sc.merman1c.rotation, 8);
enemyEffects.addMerman(sc.merman1d.x, sc.merman1d.y, sc.merman1d.rotation, 12);
};
};
};
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
enemyEffects.addMerman(sc.merman2a.x, sc.merman2a.y, sc.merman2a.rotation);
enemyEffects.addMerman(sc.merman2b.x, sc.merman2b.y, sc.merman2b.rotation, 8);
enemyEffects.addMerman(sc.merman2c.x, sc.merman2c.y, sc.merman2c.rotation);
enemyEffects.addMerman(sc.merman2d.x, sc.merman2d.y, sc.merman2d.rotation, 8);
};
};
};
if (gameEventArray[5]){
if (gameSortArray[5] > 0){
_local3 = gameSortArray;
_local4 = 5;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[5] == 0){
gameEventArray[5] = false;
enemyEffects.addOctomage(sc.octomage2a.x, sc.octomage2a.y, sc.octomage2a.rotation);
enemyEffects.addOctomage(sc.octomage2b.x, sc.octomage2b.y, sc.octomage2b.rotation, 13);
};
};
};
if (gameEventArray[6]){
if (gameSortArray[6] > 0){
_local3 = gameSortArray;
_local4 = 6;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[6] == 0){
gameEventArray[6] = false;
enemyEffects.addOctomage(sc.octomage3a.x, sc.octomage3a.y, sc.octomage3a.rotation);
enemyEffects.addOctomage(sc.octomage3b.x, sc.octomage3b.y, sc.octomage3b.rotation, 12);
enemyEffects.addOctomage(sc.octomage3c.x, sc.octomage3c.y, sc.octomage3c.rotation);
};
};
};
if (gameEventArray[7]){
if (gameSortArray[7] > 0){
_local3 = gameSortArray;
_local4 = 7;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[7] == 0){
gameEventArray[7] = false;
enemyEffects.addFloatFish(sc.floatfish2a.x, sc.floatfish2a.y, sc.floatfish2a.rotation);
enemyEffects.addFloatFish(sc.floatfish2b.x, sc.floatfish2b.y, sc.floatfish2b.rotation);
enemyEffects.addFloatFish(sc.floatfish2c.x, sc.floatfish2c.y, sc.floatfish2c.rotation);
enemyEffects.addFloatFish(sc.floatfish2d.x, sc.floatfish2d.y, sc.floatfish2d.rotation);
enemyEffects.addFloatFish(sc.floatfish2e.x, sc.floatfish2e.y, sc.floatfish2e.rotation);
enemyEffects.addFloatFish(sc.floatfish2f.x, sc.floatfish2f.y, sc.floatfish2f.rotation);
};
};
};
if (gameEventArray[8]){
if (gameSortArray[8] > 0){
_local3 = gameSortArray;
_local4 = 8;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[8] == 0){
gameEventArray[8] = false;
enemyEffects.addCrawler(sc.crawler1a.x, sc.crawler1a.y, sc.crawler1a.rotation, 2);
enemyEffects.addCrawler(sc.crawler1b.x, sc.crawler1b.y, sc.crawler1b.rotation);
enemyEffects.addCrawler(sc.crawler1c.x, sc.crawler1c.y, sc.crawler1c.rotation, 8);
enemyEffects.addCrawler(sc.crawler1d.x, sc.crawler1d.y, sc.crawler1d.rotation);
enemyEffects.addCrawler(sc.crawler1e.x, sc.crawler1e.y, sc.crawler1e.rotation);
enemyEffects.addCrawler(sc.crawler1f.x, sc.crawler1f.y, sc.crawler1f.rotation);
enemyEffects.addCrawler(sc.crawler1g.x, sc.crawler1g.y, sc.crawler1g.rotation, 8);
enemyEffects.addCrawler(sc.crawler1h.x, sc.crawler1h.y, sc.crawler1h.rotation);
enemyEffects.addCrawler(sc.crawler1i.x, sc.crawler1i.y, sc.crawler1i.rotation);
enemyEffects.addCrawler(sc.crawler1j.x, sc.crawler1j.y, sc.crawler1j.rotation, 1);
enemyEffects.addCrawler(sc.crawler1k.x, sc.crawler1k.y, sc.crawler1k.rotation);
enemyEffects.addCrawler(sc.crawler1l.x, sc.crawler1l.y, sc.crawler1l.rotation);
};
};
};
if (gameEventArray[9]){
if (gameSortArray[9] > 0){
_local3 = gameSortArray;
_local4 = 9;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[9] == 0){
gameEventArray[9] = false;
enemyEffects.addMerman(sc.merman3a.x, sc.merman3a.y, sc.merman3a.rotation);
enemyEffects.addMerman(sc.merman3b.x, sc.merman3b.y, sc.merman3b.rotation, 8);
enemyEffects.addMerman(sc.merman3c.x, sc.merman3c.y, sc.merman3c.rotation);
enemyEffects.addMerman(sc.merman3d.x, sc.merman3d.y, sc.merman3d.rotation, 8);
enemyEffects.addOctomage(sc.octomage4.x, sc.octomage4.y, sc.octomage4.rotation, 12);
};
};
};
if (gameEventArray[10]){
if (gameSortArray[10] > 0){
_local3 = gameSortArray;
_local4 = 10;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[10] == 0){
gameEventArray[10] = false;
enemyEffects.addMerman(sc.merman4a.x, sc.merman4a.y, sc.merman4a.rotation);
enemyEffects.addMerman(sc.merman4b.x, sc.merman4b.y, sc.merman4b.rotation, 8);
enemyEffects.addMerman(sc.merman4c.x, sc.merman4c.y, sc.merman4c.rotation);
enemyEffects.addMerman(sc.merman4d.x, sc.merman4d.y, sc.merman4d.rotation);
enemyEffects.addOctomage(sc.octomage5a.x, sc.octomage5a.y, sc.octomage5a.rotation, 12);
enemyEffects.addOctomage(sc.octomage5b.x, sc.octomage5b.y, sc.octomage5b.rotation);
};
};
};
} else {
if (theFrame == 19){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
if (!state.theRoot.trinkets[3]){
pickupEffects.addTrinket(sc.trinket1.x, sc.trinket1.y, 4);
};
pickupEffects.addMedPack(sc.health1.x, sc.health1.y, 2);
pickupEffects.addMedPack(sc.health2.x, sc.health2.y, 3);
pickupEffects.addMedPack(sc.health3.x, sc.health3.y, 2);
pickupEffects.addMedPack(sc.health4.x, sc.health4.y, 3);
pickupEffects.addAmmo(sc.ammo1.x, sc.ammo1.y, 4);
pickupEffects.addAmmo(sc.ammo2.x, sc.ammo2.y, 2);
pickupEffects.addAmmo(sc.ammo3.x, sc.ammo3.y, 3);
pickupEffects.addAmmo(sc.ammo4.x, sc.ammo4.y, 1);
pickupEffects.addAmmo(sc.ammo5.x, sc.ammo5.y, 2);
pickupEffects.addAmmo(sc.ammo6.x, sc.ammo6.y, 1);
pickupEffects.addAmmo(sc.ammo7.x, sc.ammo7.y, 2);
pickupEffects.addAmmo(sc.ammo8.x, sc.ammo8.y, 3);
pickupEffects.addAmmo(sc.ammo9.x, sc.ammo9.y, 4);
pickupEffects.addAmmo(sc.ammo10.x, sc.ammo10.y, 2);
pickupEffects.addAmmo(sc.ammo11.x, sc.ammo11.y, 3);
pickupEffects.addAmmo(sc.ammo12.x, sc.ammo12.y, 1);
pickupEffects.addAmmo(sc.ammo13.x, sc.ammo13.y, 3);
pickupEffects.addAmmo(sc.ammo14.x, sc.ammo14.y, 1);
pickupEffects.addGold(sc.gold1.x, sc.gold1.y, 3);
pickupEffects.addGold(sc.gold2.x, sc.gold2.y, 3);
pickupEffects.addGold(sc.gold3.x, sc.gold3.y, 4);
pickupEffects.addGold(sc.gold4.x, sc.gold4.y, 3);
pickupEffects.addGold(sc.gold5.x, sc.gold5.y, 3);
pickupEffects.addGold(sc.gold6.x, sc.gold6.y, 4);
pickupEffects.addGold(sc.gold7.x, sc.gold7.y, 1);
pickupEffects.addGold(sc.gold8.x, sc.gold8.y, 1);
pickupEffects.addGold(sc.gold9.x, sc.gold9.y, 1);
pickupEffects.addGold(sc.gold10.x, sc.gold10.y, 1);
pickupEffects.addGold(sc.gold11.x, sc.gold11.y, 1);
pickupEffects.addGold(sc.gold12.x, sc.gold12.y, 1);
pickupEffects.addGold(sc.gold13.x, sc.gold13.y, 1);
pickupEffects.addGold(sc.gold14.x, sc.gold14.y, 1);
pickupEffects.addGold(sc.gold15.x, sc.gold15.y, 1);
pickupEffects.addGold(sc.gold16.x, sc.gold16.y, 1);
pickupEffects.addGold(sc.gold17.x, sc.gold17.y, 1);
pickupEffects.addGold(sc.gold18.x, sc.gold18.y, 1);
pickupEffects.addGold(sc.gold19.x, sc.gold19.y, 1);
pickupEffects.addGold(sc.gold20.x, sc.gold20.y, 1);
};
};
};
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
enemyEffects.addFloatFish(sc.floatfish1a.x, sc.floatfish1a.y, sc.floatfish1a.rotation);
enemyEffects.addFloatFish(sc.floatfish1b.x, sc.floatfish1b.y, sc.floatfish1b.rotation);
enemyEffects.addFloatFish(sc.floatfish1c.x, sc.floatfish1c.y, sc.floatfish1c.rotation);
enemyEffects.addFloatFish(sc.floatfish1d.x, sc.floatfish1d.y, sc.floatfish1d.rotation);
};
};
};
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
gameEventArray[2] = false;
enemyEffects.addFloatFish(sc.floatfish2a.x, sc.floatfish2a.y, sc.floatfish2a.rotation);
enemyEffects.addFloatFish(sc.floatfish2b.x, sc.floatfish2b.y, sc.floatfish2b.rotation);
enemyEffects.addFloatFish(sc.floatfish2c.x, sc.floatfish2c.y, sc.floatfish2c.rotation);
enemyEffects.addFloatFish(sc.floatfish2d.x, sc.floatfish2d.y, sc.floatfish2d.rotation);
};
};
};
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
enemyEffects.addCrawler(sc.crawler1a.x, sc.crawler1a.y, sc.crawler1a.rotation, 1);
enemyEffects.addCrawler(sc.crawler1b.x, sc.crawler1b.y, sc.crawler1b.rotation);
enemyEffects.addCrawler(sc.crawler1c.x, sc.crawler1c.y, sc.crawler1c.rotation);
enemyEffects.addCrawler(sc.crawler1d.x, sc.crawler1d.y, sc.crawler1d.rotation, 8);
enemyEffects.addCrawler(sc.crawler1e.x, sc.crawler1e.y, sc.crawler1e.rotation);
enemyEffects.addCrawler(sc.crawler1f.x, sc.crawler1f.y, sc.crawler1f.rotation);
enemyEffects.addCrawler(sc.crawler1g.x, sc.crawler1g.y, sc.crawler1g.rotation, 2);
enemyEffects.addCrawler(sc.crawler1h.x, sc.crawler1h.y, sc.crawler1h.rotation);
enemyEffects.addCrawler(sc.crawler1i.x, sc.crawler1i.y, sc.crawler1i.rotation);
enemyEffects.addCrawler(sc.crawler1j.x, sc.crawler1j.y, sc.crawler1j.rotation);
enemyEffects.addCrawler(sc.crawler1k.x, sc.crawler1k.y, sc.crawler1k.rotation, 8);
};
};
};
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
enemyEffects.addCrawler(sc.crawler2a.x, sc.crawler2a.y, sc.crawler2a.rotation);
enemyEffects.addCrawler(sc.crawler2b.x, sc.crawler2b.y, sc.crawler2b.rotation);
enemyEffects.addCrawler(sc.crawler2c.x, sc.crawler2c.y, sc.crawler2c.rotation, 2);
enemyEffects.addCrawler(sc.crawler2d.x, sc.crawler2d.y, sc.crawler2d.rotation, 12);
enemyEffects.addCrawler(sc.crawler2e.x, sc.crawler2e.y, sc.crawler2e.rotation);
enemyEffects.addCrawler(sc.crawler2f.x, sc.crawler2f.y, sc.crawler2f.rotation);
enemyEffects.addCrawler(sc.crawler2g.x, sc.crawler2g.y, sc.crawler2g.rotation, 4);
enemyEffects.addCrawler(sc.crawler2h.x, sc.crawler2h.y, sc.crawler2h.rotation);
enemyEffects.addCrawler(sc.crawler2i.x, sc.crawler2i.y, sc.crawler2i.rotation, 8);
enemyEffects.addPiper(sc.piper1a.x, sc.piper1a.y, sc.piper1a.rotation);
enemyEffects.addPiper(sc.piper1b.x, sc.piper1b.y, sc.piper1b.rotation);
enemyEffects.addPiper(sc.piper1c.x, sc.piper1c.y, sc.piper1c.rotation);
enemyEffects.addPiper(sc.piper1d.x, sc.piper1d.y, sc.piper1d.rotation);
enemyEffects.addPiper(sc.piper1e.x, sc.piper1e.y, sc.piper1e.rotation);
};
};
};
if (gameEventArray[5]){
if (gameSortArray[5] > 0){
_local3 = gameSortArray;
_local4 = 5;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[5] == 0){
gameEventArray[5] = false;
enemyEffects.addCrawler(sc.crawler3a.x, sc.crawler3a.y, sc.crawler3a.rotation);
enemyEffects.addCrawler(sc.crawler3b.x, sc.crawler3b.y, sc.crawler3b.rotation);
enemyEffects.addCrawler(sc.crawler3c.x, sc.crawler3c.y, sc.crawler3c.rotation);
enemyEffects.addCrawler(sc.crawler3d.x, sc.crawler3d.y, sc.crawler3d.rotation);
enemyEffects.addCrawler(sc.crawler3e.x, sc.crawler3e.y, sc.crawler3e.rotation, 8);
enemyEffects.addCrawler(sc.crawler3f.x, sc.crawler2f.y, sc.crawler3f.rotation);
enemyEffects.addCrawler(sc.crawler3g.x, sc.crawler3g.y, sc.crawler3g.rotation, 1);
enemyEffects.addCrawler(sc.crawler3h.x, sc.crawler3h.y, sc.crawler3h.rotation);
enemyEffects.addCrawler(sc.crawler3i.x, sc.crawler3i.y, sc.crawler3i.rotation);
enemyEffects.addCrawler(sc.crawler3j.x, sc.crawler3j.y, sc.crawler3j.rotation);
enemyEffects.addCrawler(sc.crawler3k.x, sc.crawler3k.y, sc.crawler3k.rotation, 3);
enemyEffects.addPiper(sc.piper2a.x, sc.piper2a.y, sc.piper2a.rotation);
enemyEffects.addPiper(sc.piper2b.x, sc.piper2b.y, sc.piper2b.rotation);
enemyEffects.addPiper(sc.piper2c.x, sc.piper2c.y, sc.piper2c.rotation);
};
};
};
if (gameEventArray[6]){
if (gameSortArray[6] > 0){
_local3 = gameSortArray;
_local4 = 6;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[6] == 0){
gameEventArray[6] = false;
enemyEffects.addOctomage(sc.octomage1a.x, sc.octomage1a.y, sc.octomage1a.rotation, 12);
enemyEffects.addOctomage(sc.octomage1b.x, sc.octomage1b.y, sc.octomage1b.rotation, 12);
enemyEffects.addFloatFish(sc.floatfish3a.x, sc.floatfish3a.y, sc.floatfish3a.rotation);
enemyEffects.addFloatFish(sc.floatfish3b.x, sc.floatfish3b.y, sc.floatfish3b.rotation);
enemyEffects.addFloatFish(sc.floatfish3c.x, sc.floatfish3c.y, sc.floatfish3c.rotation);
enemyEffects.addFloatFish(sc.floatfish3d.x, sc.floatfish3d.y, sc.floatfish3d.rotation);
enemyEffects.addFloatFish(sc.floatfish3e.x, sc.floatfish3e.y, sc.floatfish3e.rotation);
};
};
};
if (gameEventArray[7]){
if (gameSortArray[7] > 0){
_local3 = gameSortArray;
_local4 = 7;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[7] == 0){
gameEventArray[7] = false;
enemyEffects.addCrawler(sc.crawler4a.x, sc.crawler4a.y, sc.crawler4a.rotation, 2);
enemyEffects.addCrawler(sc.crawler4b.x, sc.crawler4b.y, sc.crawler4b.rotation);
enemyEffects.addCrawler(sc.crawler4c.x, sc.crawler4c.y, sc.crawler4c.rotation);
enemyEffects.addCrawler(sc.crawler4d.x, sc.crawler4d.y, sc.crawler4d.rotation);
enemyEffects.addCrawler(sc.crawler4e.x, sc.crawler4e.y, sc.crawler4e.rotation);
enemyEffects.addCrawler(sc.crawler4f.x, sc.crawler4f.y, sc.crawler4f.rotation, 1);
enemyEffects.addCrawler(sc.crawler4g.x, sc.crawler4g.y, sc.crawler4g.rotation);
enemyEffects.addCrawler(sc.crawler4h.x, sc.crawler4h.y, sc.crawler4h.rotation, 8);
};
};
};
if (gameEventArray[8]){
if (gameSortArray[8] > 0){
_local3 = gameSortArray;
_local4 = 8;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[8] == 0){
gameEventArray[8] = false;
enemyEffects.addFloatFish(sc.floatfish4a.x, sc.floatfish4a.y, sc.floatfish4a.rotation);
enemyEffects.addFloatFish(sc.floatfish4b.x, sc.floatfish4b.y, sc.floatfish4b.rotation);
enemyEffects.addFloatFish(sc.floatfish4c.x, sc.floatfish4c.y, sc.floatfish4c.rotation);
enemyEffects.addFloatFish(sc.floatfish4d.x, sc.floatfish4d.y, sc.floatfish4d.rotation);
enemyEffects.addFloatFish(sc.floatfish4e.x, sc.floatfish4e.y, sc.floatfish4e.rotation);
};
};
};
if (gameEventArray[9]){
if (gameSortArray[9] > 0){
_local3 = gameSortArray;
_local4 = 9;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[9] == 0){
gameEventArray[9] = false;
enemyEffects.addFloatFish(sc.floatfish5a.x, sc.floatfish5a.y, sc.floatfish5a.rotation);
enemyEffects.addFloatFish(sc.floatfish5b.x, sc.floatfish5b.y, sc.floatfish5b.rotation);
enemyEffects.addFloatFish(sc.floatfish5c.x, sc.floatfish5c.y, sc.floatfish5c.rotation);
enemyEffects.addFloatFish(sc.floatfish5d.x, sc.floatfish5d.y, sc.floatfish5d.rotation);
};
};
};
} else {
if (theFrame == 20){
if (gameEventArray[0]){
if (gameSortArray[0] > 0){
_local3 = gameSortArray;
_local4 = 0;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[0] == 0){
gameEventArray[0] = false;
pickupEffects.addMedPack(sc.health1.x, sc.health1.y, 1);
pickupEffects.addMedPack(sc.health2.x, sc.health2.y, 3);
pickupEffects.addAmmo(sc.ammo1.x, sc.ammo1.y, 1);
pickupEffects.addAmmo(sc.ammo2.x, sc.ammo2.y, 2);
pickupEffects.addAmmo(sc.ammo3.x, sc.ammo3.y, 3);
pickupEffects.addAmmo(sc.ammo4.x, sc.ammo4.y, 1);
pickupEffects.addAmmo(sc.ammo5.x, sc.ammo5.y, 2);
pickupEffects.addAmmo(sc.ammo6.x, sc.ammo6.y, 4);
pickupEffects.addAmmo(sc.ammo7.x, sc.ammo7.y, 2);
pickupEffects.addAmmo(sc.ammo8.x, sc.ammo8.y, 3);
pickupEffects.addAmmo(sc.ammo9.x, sc.ammo9.y, 4);
};
};
};
if (gameEventArray[1]){
if (gameSortArray[1] > 0){
_local3 = gameSortArray;
_local4 = 1;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[1] == 0){
gameEventArray[1] = false;
sc.bridge2.gotoAndStop(3);
sc.bridge2.active = true;
};
};
};
if (gameEventArray[2]){
if (gameSortArray[2] > 0){
_local3 = gameSortArray;
_local4 = 2;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[2] == 0){
gameEventArray[2] = false;
sc.bridge2a.gotoAndStop(3);
sc.bridge2a.active = true;
};
};
};
if (gameEventArray[3]){
if (gameSortArray[3] > 0){
_local3 = gameSortArray;
_local4 = 3;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[3] == 0){
gameEventArray[3] = false;
sc.bridge1.gotoAndStop(3);
sc.bridge1.active = true;
};
};
};
if (gameEventArray[4]){
if (gameSortArray[4] > 0){
_local3 = gameSortArray;
_local4 = 4;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[4] == 0){
gameEventArray[4] = false;
sc.shroom1.gotoAndStop(3);
sc.shroom1.active = true;
};
};
};
if (gameEventArray[5]){
if (gameSortArray[5] > 0){
_local3 = gameSortArray;
_local4 = 5;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[5] == 0){
gameEventArray[5] = false;
};
};
};
if (gameEventArray[6]){
if (gameSortArray[6] > 0){
_local3 = gameSortArray;
_local4 = 6;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[6] == 0){
gameEventArray[6] = false;
sc.bridge4.gotoAndStop(3);
sc.bridge4.active = true;
};
};
};
if (gameEventArray[7]){
if (gameSortArray[7] > 0){
_local3 = gameSortArray;
_local4 = 7;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[7] == 0){
gameEventArray[7] = false;
sc.bridge4.goingIn = true;
sc.bridge4.active = false;
};
};
};
if (gameEventArray[8]){
if (gameSortArray[8] > 0){
_local3 = gameSortArray;
_local4 = 8;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[8] == 0){
gameEventArray[8] = false;
sc.eskerBoss.setUp(sc.eskerBoss.the_hitbox, aniEffects);
sc.eskerBoss.setMoreUp(player);
sc.eskerBoss.addEventListener("soundEvent", enemyEffects.onSoundEvent);
sc.eskerBoss.addEventListener("useAttack", enemyEffects.onAttackUsed);
sc.eskerBoss.addEventListener("defeatEvent", enemyEffects.onDefeat);
sc.eskerBoss.updObj = function (_arg1:Object):void{
sc.eskerBoss.upd(_arg1);
sc.eskerBoss.updAni();
};
enemyEffects.ides.push(sc.eskerBoss);
sc.eskerPseud.visible = false;
sc.eskerBoss.visible = true;
sc.eskerShield.gotoAndStop(3);
sc.eskerShield.active = true;
state.theRoot.soundManager.addMusic(14);
gameSortArray[9] = 100;
};
};
};
if (gameEventArray[9]){
if (gameSortArray[9] > 0){
_local3 = gameSortArray;
_local4 = 9;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[9] == 0){
gameSortArray[9] = 90;
if (sc.eskerBoss.currentFrame == 8){
gameEventArray[9] = false;
} else {
i = ceil((mrandom() * 24));
if (mrandom() < 0.3){
pickupEffects.addMedPack(sc[("nd" + String(i))].x, sc[("nd" + String(i))].y, ceil((mrandom() * 2)));
} else {
pickupEffects.addAmmo(sc[("nd" + String(i))].x, sc[("nd" + String(i))].y, ceil((mrandom() * 4)));
};
};
};
};
};
if (gameEventArray[10]){
if (gameSortArray[10] > 0){
_local3 = gameSortArray;
_local4 = 10;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[10] == 0){
state.theRoot.addMedal(0);
gameEventArray[10] = false;
sc.airshipTop.gotoAndStop(2);
sc.airshipBase.active = true;
};
};
};
if ((sc.airshipTop.currentFrame % 25) == 5){
dispatchEvent(new SoundsEvent("soundEvent", 154));
};
if (gameEventArray[11]){
if (gameSortArray[11] > 0){
_local3 = gameSortArray;
_local4 = 11;
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
} else {
if (gameSortArray[11] == 0){
gameEventArray[11] = false;
dispatchEvent(new GameEvent("frameEnd", 1));
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function setSystems(_arg1:Array, _arg2:Array, _arg3:Array, _arg4:Array, _arg5:Array, _arg6:Array=null){
var _local7:uint;
exits = _arg1.slice();
bridges = _arg2.slice();
animatedObjects = _arg3.slice();
noLoops = _arg4.slice();
systems = _arg5.slice();
if (_arg6 != null){
blocks = _arg6.slice();
} else {
blocks = null;
};
_local7 = 0;
while (_local7 < animatedObjects.length) {
animatedObjects[_local7].stop();
_local7++;
};
_local7 = 0;
while (_local7 < noLoops.length) {
noLoops[_local7].gotoAndStop(2);
_local7++;
};
_local7 = 0;
while (_local7 < bridges.length) {
initBridge(bridges[_local7]);
_local7++;
};
_local7 = 0;
while (_local7 < systems.length) {
systems[_local7].isOn = (systems[_local7].prev == null);
systems[_local7].charge = 0;
systems[_local7].charge2 = 0;
systems[_local7].flitTime = 0;
systems[_local7].tar.theGlow.alpha = 0;
systems[_local7].sys.active = false;
_local7++;
};
}
public function useMagic(_arg1:uint, _arg2:MovieClip=null):void{
if (_arg1 == 1){
if (mrandom() < 0.5){
attackEffects.addShadowTrap(player);
} else {
attackEffects.addShadowThrow(player, _arg2);
};
} else {
if (_arg1 == 2){
if (mrandom() < 0.5){
attackEffects.addLightTrap(player);
} else {
attackEffects.addLightThrow(player, _arg2);
};
} else {
if (_arg1 == 3){
attackEffects.addShadowTrap(player);
} else {
if (_arg1 == 4){
attackEffects.addShadowThrow(player, _arg2);
} else {
if (_arg1 == 5){
attackEffects.addLightTrap(player);
} else {
if (_arg1 == 6){
attackEffects.addLightThrow(player, _arg2);
} else {
if (_arg1 == 7){
attackEffects.addAnemoneTrap(player);
} else {
if (_arg1 == 8){
attackEffects.addClawTrap(player);
};
};
};
};
};
};
};
};
}
public function updExits():void{
var _local1:uint;
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Point;
_local1 = 0;
while (_local1 < exits.length) {
_local4 = exits[_local1];
if (_local4.effect.hitTestObject(playArea)){
_local5 = (_local4.effect.rotation * dtr);
_local6 = sin(_local5);
_local7 = -(cos(_local5));
_local3 = (_local4.effect.width * (0.5 - mrandom()));
if (mrandom() < (_local4.effect.width / 400)){
aniEffects.addDotMysterious((_local4.effect.x - (_local7 * _local3)), (_local4.effect.y + (_local6 * _local3)), ((_local6 + 0.5) - mrandom()), ((_local7 + 0.5) - mrandom()));
};
_local8 = sc.localToGlobal(player.position);
if (_local4.clip.hitTestPoint(_local8.x, _local8.y, true)){
dispatchEvent(new GameEvent("frameEnd", _local1));
};
};
_local1++;
};
}
public function get transform():Transform{
return (sc.transform);
}
private function onEnemyDefeat(_arg1:DefeatEvent):void{
var _local2:uint;
var _local3:Object;
_local3 = null;
_local2 = 0;
while (_local2 < systems.length) {
if (systems[_local2].isOn){
if ((((_local3 == null)) || (((((_local3.tar.x - player.x) * (_local3.tar.x - player.x)) + ((_local3.tar.y - player.y) * (_local3.tar.y - player.y))) > (((systems[_local2].tar.x - player.x) * (systems[_local2].tar.x - player.x)) + ((systems[_local2].tar.y - player.y) * (systems[_local2].tar.y - player.y))))))){
_local3 = systems[_local2];
};
};
_local2++;
};
if (_local3 != null){
_local3.charge2 = (_local3.charge2 + _arg1.val);
if (_local3.charge2 >= _local3.thresh){
_local3.isOn = false;
_local3.flitTime = 60;
_local2 = 0;
while (_local2 < systems.length) {
if (systems[_local2].prev == _local3.tar){
systems[_local2].isOn = true;
};
_local2++;
};
};
aniEffects.addEnergyBall(_arg1.x, _arg1.y, _local3.tar, _arg1.val);
};
theRoot.kills++;
theRoot.soul = (theRoot.soul + _arg1.val);
}
public function onUseAttack(_arg1:AttackEvent):void{
var _local2:Point;
var _local3:Point;
var _local4:Number;
if (_arg1.attackGuide != null){
_local2 = sc.globalToLocal(_arg1.attackGuide.localToGlobal(new Point(0, 0)));
_local3 = sc.globalToLocal(_arg1.attackGuide.localToGlobal(new Point(0, -10)));
_local4 = MathsStuff.polarAngle(_local2, _local3);
};
if (_arg1.attackType <= 8){
theRoot.ammo++;
};
switch (_arg1.attackType){
case 1:
aniEffects.addFlash(_local2.x, _local2.y, _local4, 0.8);
attackEffects.addPistolBullet(player, _local2.x, _local2.y, _local4);
addShake(3, 0.7, _local4);
break;
case 2:
if (theFrame == 9){
dispatchEvent(new SoundsEvent("narrationEvent", 3));
};
attackEffects.addCrossbowBolt(player, _local2.x, _local2.y, _local4);
break;
case 3:
if (theFrame == 10){
dispatchEvent(new SoundsEvent("narrationEvent", 3));
};
aniEffects.addFlash(_local2.x, _local2.y, _local4, 1);
attackEffects.addSMGBullet(player, _local2.x, _local2.y, _local4);
addShake(7, 0.8, _local4);
break;
case 4:
aniEffects.addFlash(_local2.x, _local2.y, _local4, 1);
attackEffects.addRifleBullet(player, _local2.x, _local2.y, _local4);
addShake(4, 0.8, _local4);
break;
case 5:
attackEffects.addBalls(player, _local2.x, _local2.y, _local4);
addShake(3, 0.9, _local4);
break;
case 6:
aniEffects.addFlash(_local2.x, _local2.y, _local4, 0.5);
attackEffects.addPiperBullet(player, _local2.x, _local2.y, _local4);
addShake(0.8, 0.95, _local4);
break;
case 7:
aniEffects.addFlash(_local2.x, _local2.y, _local4, 1.4);
attackEffects.addShotgunShellBig(player, _local2.x, _local2.y, _local4);
addShake(30, 0.9, _local4);
break;
case 8:
aniEffects.addFlash(_local2.x, _local2.y, _local4, 1);
attackEffects.addShotgunShellMed(player, _local2.x, _local2.y, _local4);
break;
case 9:
attackEffects.addBlind(player, _local2.x, _local2.y, 8, 20, _local4);
break;
case 10:
attackEffects.addBlind(_arg1.attackHold, _local2.x, _local2.y, 24, 4, _local4);
break;
case 11:
attackEffects.addBlind(_arg1.attackHold, _local2.x, _local2.y, 40, 4, _local4);
break;
case 12:
attackEffects.addDart(_arg1.attackHold, _local2.x, _local2.y, _local4);
break;
case 13:
attackEffects.addBlind(_arg1.attackHold, _local2.x, _local2.y, 30, 20, _local4);
break;
case 14:
attackEffects.addBlind(_arg1.attackHold, _local2.x, _local2.y, 28, 20, _local4);
break;
case 15:
aniEffects.addFlash(_local2.x, _local2.y, _local4, 1.4);
attackEffects.addPirateBullet(_arg1.attackHold, _local2.x, _local2.y, _local4);
break;
case 16:
attackEffects.addBlind(_arg1.attackHold, _local2.x, _local2.y, 19, 6, _local4);
break;
case 17:
attackEffects.addBlind(_arg1.attackHold, _local2.x, _local2.y, 18, 6, _local4);
break;
case 18:
attackEffects.addBlind(_arg1.attackHold, _local2.x, _local2.y, 8, 6, _local4);
break;
case 19:
attackEffects.addPiperSpike(_arg1.attackHold, _local2.x, _local2.y, _local4);
break;
case 20:
useMagic(1, _arg1.attackHold);
break;
case 21:
attackEffects.addBlind(_arg1.attackHold, _local2.x, _local2.y, 24, 8, _local4);
break;
case 22:
useMagic(1, _arg1.attackHold);
break;
case 23:
useMagic(2, _arg1.attackHold);
break;
case 24:
useMagic(3, _arg1.attackHold);
break;
case 25:
useMagic(4, _arg1.attackHold);
break;
case 26:
useMagic(5, _arg1.attackHold);
break;
case 27:
useMagic(6, _arg1.attackHold);
break;
case 28:
useMagic(7, _arg1.attackHold);
break;
case 29:
useMagic(8, _arg1.attackHold);
break;
};
}
public function finishUp():void{
terrainMap.finishUp();
decalEffects.finishUp();
working = false;
}
public function setPaths(_arg1:Array, _arg2:MovieClip, _arg3:DisplayObject){
pathfinder = new Pathfinder(_arg1, _arg2, _arg3);
}
public function moveShake():void{
if (shake > 0){
if (shake > (1 - shakeDown)){
shakeOn = !(shakeOn);
sc.x = (sc.x + ((sin(shakeDir) * (shakeOn) ? 0.5 : -0.5) * shake));
sc.y = (sc.y - ((cos(shakeDir) * (shakeOn) ? 0.5 : -0.5) * shake));
shake = (shake * shakeDown);
} else {
shake = 0;
};
};
}
public function initBridge(_arg1:MovieClip):void{
_arg1.active = true;
if (_arg1.staple != null){
_arg1.prevX = _arg1.staple.x;
_arg1.prevY = _arg1.staple.y;
_arg1.prevR = _arg1.staple.rotation;
_arg1.dx = (_arg1.dy = (_arg1.dr = 0));
};
}
private function updSystems():void{
var _local1:uint;
_local1 = 0;
while (_local1 < systems.length) {
if (systems[_local1].flitTime > 0){
if (systems[_local1].flitTime == 1){
systems[_local1].sys.active = true;
systems[_local1].sys.gotoAndStop(3);
systems[_local1].tar.theGlow.alpha = 1;
if ((((theFrame == 9)) || ((theFrame == 10)))){
dispatchEvent(new SoundsEvent("narrationEvent", 6));
};
};
systems[_local1].flitTime--;
};
_local1++;
};
}
public function snap(_arg1:MovieClip):void{
var _local2:Number;
var _local3:Number;
var _local4:Point;
var _local5:Number;
var _local6:Number;
_local2 = 275;
_local3 = 235;
_local4 = _arg1.localToGlobal(new Point());
_local5 = _local4.x;
_local6 = _local4.y;
sc.x = (sc.x + (_local2 - _local5));
sc.y = (sc.y + (_local3 - _local6));
scrollCorrect();
}
public function scroll(_arg1:MovieClip, _arg2:Object, _arg3:Number=0):void{
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Number;
var _local8:Number;
_local4 = 275;
_local5 = 235;
_local6 = _arg1.localToGlobal(new Point());
_local7 = _local6.x;
_local8 = _local6.y;
_local7 = (_local7 + ((_arg2.mouX - _local7) * _arg3));
_local8 = (_local8 + ((_arg2.mouY - _local8) * _arg3));
sc.x = (sc.x + MathsStuff.translationAmount(_local7, _local4, 0.4));
sc.y = (sc.y + MathsStuff.translationAmount(_local8, _local5, 0.4));
scrollCorrect();
}
private function onNarrationEvent(_arg1:SoundsEvent):void{
dispatchEvent(new SoundsEvent("narrationEvent", _arg1.id, _arg1.soundVolume, _arg1.soundPan));
}
public function scrollCorrect():void{
var _local1:Point;
var _local2:Point;
_local1 = sc.localToGlobal(boundRect.topLeft);
_local2 = sc.localToGlobal(boundRect.bottomRight);
if (_local1.x > 0){
sc.x = 0;
} else {
if (_local2.x < 550){
sc.x = (550 - boundRect.width);
};
};
if (_local1.y > 0){
sc.y = 0;
} else {
if (_local2.y < 450){
sc.y = (450 - boundRect.height);
};
};
}
public function bridgeTweak(_arg1:MovieClip, _arg2:MovieClip):void{
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (((!((_arg1.staple == null))) && (_arg2.hitp(_arg1)))){
_local3 = sc.globalToLocal(_arg1.staple.localToGlobal(new Point()));
_local4 = (_arg2.x - _local3.x);
_local5 = (_arg2.y - _local3.y);
_arg2.x = (_arg2.x + _arg1.dx);
_arg2.y = (_arg2.y + _arg1.dy);
_local8 = (_arg1.dr * dtr);
_arg2.x = (_arg2.x - _local4);
_arg2.y = (_arg2.y - _local5);
_local6 = ((_local4 * cos(_local8)) - (_local5 * sin(_local8)));
_local7 = ((_local4 * sin(_local8)) + (_local5 * cos(_local8)));
_arg2.x = (_arg2.x + _local6);
_arg2.y = (_arg2.y + _local7);
_arg2.rotation = (_arg2.rotation + _arg1.dr);
};
}
public function addShake(_arg1:Number, _arg2:Number=0.8, _arg3:Number=1000):void{
shake = (shake + _arg1);
shakeDown = _arg2;
shakeOn = (mrandom() < 0.5);
if (_arg3 == 1000){
shakeDir = ((mrandom() * 2) * PI);
} else {
shakeDir = (_arg3 + (0.1 - (mrandom() * 0.2)));
};
}
}
}//package project
Section 259
//TerrainMap (project.TerrainMap)
package project {
import flash.geom.*;
import flash.display.*;
public class TerrainMap {
private var typeBitmap:BitmapData;
public var scaling:Number;// = 0.5
private var targBitmap:BitmapData;
private var heightBitmap:BitmapData;
private var bridgeBitmap:BitmapData;
public function TerrainMap(_arg1:MovieClip, _arg2:MovieClip, _arg3:Number=0.4){
var _local4:Matrix;
scaling = 0.5;
super();
scaling = _arg3;
_local4 = new Matrix();
_local4.scale(scaling, scaling);
typeBitmap = new BitmapData((_arg1.width * scaling), (_arg1.height * scaling), true, 0);
typeBitmap.draw(_arg1, _local4);
heightBitmap = new BitmapData((_arg2.width * scaling), (_arg2.height * scaling), true, 0);
heightBitmap.draw(_arg2, _local4);
}
public function getTerrainHeight(_arg1:Number, _arg2:Number):uint{
var _local3:uint;
var _local4:uint;
_arg1 = (_arg1 * scaling);
_arg2 = (_arg2 * scaling);
_local3 = heightBitmap.getPixel32(int(_arg1), int(_arg2));
_local4 = ((_local3 >> 24) & 0xFF);
return (_local4);
}
public function setBridges(_arg1:Array, _arg2:Array, _arg3:MovieClip):void{
var i:uint;
var toCol:ColorTransform;
var mat:Matrix;
var vt = _arg1;
var vb = _arg2;
var varea = _arg3;
toCol = new ColorTransform(0, 0, 0, 1, -255, -255, -255, 0xFF);
try {
bridgeBitmap = typeBitmap.clone();
i = 0;
while (i < vt.length) {
if (((vt[i].active) && (vt[i].hitTestObject(varea)))){
mat = vt[i].transform.matrix;
mat.scale(scaling, scaling);
bridgeBitmap.draw(vt[i], mat, toCol);
};
i = (i + 1);
};
if (vb != null){
i = 0;
while (i < vb.length) {
if (((!(vb[i].tar.active)) && (vb[i].tar.hitTestObject(varea)))){
toCol = new ColorTransform(0, 0, 0, 1, vb[i].rheight, -255, -255, 0xFF);
mat = vb[i].tar.transform.matrix;
mat.scale(scaling, scaling);
bridgeBitmap.draw(vb[i].tar, mat, toCol);
};
i = (i + 1);
};
};
} catch(e:Error) {
};
}
public function getTerrainType(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Object{
var _local4:uint;
var _local5:Object;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_local5 = new Object();
_arg1 = (_arg1 * scaling);
_arg2 = (_arg2 * scaling);
if (_arg3){
_local4 = bridgeBitmap.getPixel32(int(_arg1), int(_arg2));
} else {
_local4 = typeBitmap.getPixel32(int(_arg1), int(_arg2));
};
_local6 = ((_local4 >> 24) & 0xFF);
_local7 = ((_local4 >> 16) & 0xFF);
_local8 = ((_local4 >> 8) & 0xFF);
_local9 = (_local4 & 0xFF);
if (_local6 < 17){
_local5.terrain = "air";
_local5.strength = 0;
} else {
if (_local7 > 17){
_local5.terrain = "wall";
_local5.strength = _local7;
} else {
if (_local8 > 17){
_local5.terrain = "hazard";
_local5.strength = _local8;
} else {
if (_local9 > 17){
_local5.terrain = "water";
_local5.strength = _local9;
};
};
};
};
return (_local5);
}
public function finishUp():void{
typeBitmap.dispose();
heightBitmap.dispose();
targBitmap.dispose();
bridgeBitmap.dispose();
}
public function setTargs(_arg1:Array, _arg2:MovieClip):void{
var i:uint;
var toRed:ColorTransform;
var mat:Matrix;
var vt = _arg1;
var varea = _arg2;
toRed = new ColorTransform(1, 0, 0, 1, 0xFF, -255, -255, 0xFF);
try {
targBitmap = typeBitmap.clone();
i = 0;
while (i < vt.length) {
if (((!((vt[i].targetable === false))) && (vt[i].hitTestObject(varea)))){
mat = vt[i].transform.matrix;
mat.scale(scaling, scaling);
targBitmap.draw(vt[i], mat, toRed);
};
i = (i + 1);
};
} catch(e:Error) {
};
}
public function getHitsTarget(_arg1:Number, _arg2:Number, _arg3=false):Boolean{
var _local4:uint;
_arg1 = (_arg1 * scaling);
_arg2 = (_arg2 * scaling);
if (_arg3){
_local4 = ((typeBitmap.getPixel32(int(_arg1), int(_arg2)) >> 16) & 0xFF);
} else {
_local4 = ((targBitmap.getPixel32(int(_arg1), int(_arg2)) >> 16) & 0xFF);
};
return ((_local4 > 238));
}
}
}//package project
Section 260
//AnemoneTrap (AnemoneTrap)
package {
import flash.display.*;
public dynamic class AnemoneTrap extends MovieClip {
public function AnemoneTrap(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 261
//BallsOnChain (BallsOnChain)
package {
import flash.display.*;
public dynamic class BallsOnChain extends MovieClip {
public var ball1:MovieClip;
public var ball2:MovieClip;
}
}//package
Section 262
//BulletsClip (BulletsClip)
package {
import flash.display.*;
public dynamic class BulletsClip extends MovieClip {
}
}//package
Section 263
//Button_Back (Button_Back)
package {
import project.*;
public dynamic class Button_Back extends MyButton {
}
}//package
Section 264
//Button_MenuAuthor (Button_MenuAuthor)
package {
import project.*;
public dynamic class Button_MenuAuthor extends MyButton {
}
}//package
Section 265
//Button_MenuContinue (Button_MenuContinue)
package {
import project.*;
public dynamic class Button_MenuContinue extends MyButton {
}
}//package
Section 266
//Button_MenuNewGame (Button_MenuNewGame)
package {
import project.*;
public dynamic class Button_MenuNewGame extends MyButton {
}
}//package
Section 267
//Button_MenuOK (Button_MenuOK)
package {
import project.*;
public dynamic class Button_MenuOK extends MyButton {
}
}//package
Section 268
//Button_MenuPlayMore (Button_MenuPlayMore)
package {
import project.*;
public dynamic class Button_MenuPlayMore extends MyButton {
}
}//package
Section 269
//ClawTrap (ClawTrap)
package {
import flash.display.*;
public dynamic class ClawTrap extends MovieClip {
public var hitbox:MovieClip;
public function ClawTrap(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 270
//CrabBossMain (CrabBossMain)
package {
import project.chars.*;
public dynamic class CrabBossMain extends CrabBoss {
public function CrabBossMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 271
//CrawlerMain (CrawlerMain)
package {
import project.chars.*;
public dynamic class CrawlerMain extends Crawler {
public function CrawlerMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 272
//DemonAni (DemonAni)
package {
import flash.display.*;
public dynamic class DemonAni extends MovieClip {
public var dot1:MovieClip;
public var dot2:MovieClip;
public var dot3:MovieClip;
public function DemonAni(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 273
//DemonMain (DemonMain)
package {
import project.chars.*;
public dynamic class DemonMain extends Demon {
public function DemonMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 274
//DotHappy (DotHappy)
package {
import flash.display.*;
public dynamic class DotHappy extends MovieClip {
}
}//package
Section 275
//DotMysterious (DotMysterious)
package {
import flash.display.*;
public dynamic class DotMysterious extends MovieClip {
}
}//package
Section 276
//DotUnhappy (DotUnhappy)
package {
import flash.display.*;
public dynamic class DotUnhappy extends MovieClip {
}
}//package
Section 277
//EffectHolder (EffectHolder)
package {
import project.sound.*;
public dynamic class EffectHolder extends EffectHold {
}
}//package
Section 278
//EnergyFlyer (EnergyFlyer)
package {
import flash.display.*;
public dynamic class EnergyFlyer extends MovieClip {
public var tail:MovieClip;
public var ball:MovieClip;
public function EnergyFlyer(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 279
//EskerBossMain (EskerBossMain)
package {
import project.chars.*;
public dynamic class EskerBossMain extends EskerBoss {
public function EskerBossMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 280
//FlameEffect (FlameEffect)
package {
import flash.display.*;
public dynamic class FlameEffect extends MovieClip {
}
}//package
Section 281
//FloatFishMain (FloatFishMain)
package {
import project.chars.*;
public dynamic class FloatFishMain extends FloatFish {
public function FloatFishMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 282
//FluffiesClip (FluffiesClip)
package {
import flash.display.*;
public dynamic class FluffiesClip extends MovieClip {
public var shadow2:MovieClip;
public var shadow1:MovieClip;
public var image:MovieClip;
public var hitbox:MovieClip;
public function FluffiesClip(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 283
//GameoverMenu (GameoverMenu)
package {
import project.*;
public dynamic class GameoverMenu extends MyButton {
}
}//package
Section 284
//GameoverRetry (GameoverRetry)
package {
import project.*;
public dynamic class GameoverRetry extends MyButton {
}
}//package
Section 285
//ImpactCrater (ImpactCrater)
package {
import flash.display.*;
public dynamic class ImpactCrater extends MovieClip {
public var thecrack:MovieClip;
public function ImpactCrater(){
addFrameScript(0, frame1);
}
function frame1(){
thecrack.gotoAndStop(Math.ceil((Math.random() * thecrack.totalFrames)));
}
}
}//package
Section 286
//ItemsClip (ItemsClip)
package {
import flash.display.*;
public dynamic class ItemsClip extends MovieClip {
public var shadow2:MovieClip;
public var shadow1:MovieClip;
public var image:MovieClip;
public var hitbox:MovieClip;
public function ItemsClip(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 287
//LightThrow (LightThrow)
package {
import flash.display.*;
public dynamic class LightThrow extends MovieClip {
public var hitbox:MovieClip;
public function LightThrow(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 288
//LightTrap (LightTrap)
package {
import flash.display.*;
public dynamic class LightTrap extends MovieClip {
public var hitbox:MovieClip;
public function LightTrap(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 289
//LobsterManMain (LobsterManMain)
package {
import project.chars.*;
public dynamic class LobsterManMain extends LobsterMan {
public function LobsterManMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 290
//MainCharBody (MainCharBody)
package {
import project.chars.*;
public dynamic class MainCharBody extends Player {
public function MainCharBody(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 291
//MainUIMain (MainUIMain)
package {
import project.*;
public dynamic class MainUIMain extends GameUI {
}
}//package
Section 292
//MermaidMain (MermaidMain)
package {
import project.chars.*;
public dynamic class MermaidMain extends Mermaid {
public function MermaidMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 293
//MermanMain (MermanMain)
package {
import project.chars.*;
public dynamic class MermanMain extends Merman {
public function MermanMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 294
//MessageClip (MessageClip)
package {
import flash.display.*;
public dynamic class MessageClip extends MovieClip {
public var message:MovieClip;
public var shadow:MovieClip;
public function MessageClip(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 295
//MessageClip2 (MessageClip2)
package {
import flash.display.*;
public dynamic class MessageClip2 extends MovieClip {
public var message:MovieClip;
public var shadow:MovieClip;
public function MessageClip2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 296
//MoveSplort (MoveSplort)
package {
import flash.display.*;
public dynamic class MoveSplort extends MovieClip {
public function MoveSplort(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 297
//MusicHolder (MusicHolder)
package {
import project.sound.*;
public dynamic class MusicHolder extends MusicHold {
}
}//package
Section 298
//MuzzleFlash (MuzzleFlash)
package {
import flash.display.*;
public dynamic class MuzzleFlash extends MovieClip {
}
}//package
Section 299
//NextBtn (NextBtn)
package {
import project.*;
public dynamic class NextBtn extends MyButton {
}
}//package
Section 300
//OctomageMain (OctomageMain)
package {
import project.chars.*;
public dynamic class OctomageMain extends Octomage {
public function OctomageMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 301
//Pentagon (Pentagon)
package {
import flash.display.*;
public dynamic class Pentagon extends MovieClip {
}
}//package
Section 302
//PiperMain (PiperMain)
package {
import project.chars.*;
public dynamic class PiperMain extends Piper {
public function PiperMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 303
//PirateBossMain (PirateBossMain)
package {
import project.chars.*;
public dynamic class PirateBossMain extends PirateBoss {
public function PirateBossMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 304
//PlayBtn (PlayBtn)
package {
import project.*;
public dynamic class PlayBtn extends MyButton {
}
}//package
Section 305
//RippleEffect (RippleEffect)
package {
import flash.display.*;
public dynamic class RippleEffect extends MovieClip {
}
}//package
Section 306
//RippleEffectSmall (RippleEffectSmall)
package {
import flash.display.*;
public dynamic class RippleEffectSmall extends MovieClip {
}
}//package
Section 307
//ShadowMain (ShadowMain)
package {
import project.chars.*;
public dynamic class ShadowMain extends Shadow {
public function ShadowMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 308
//ShadowThrow (ShadowThrow)
package {
import flash.display.*;
public dynamic class ShadowThrow extends MovieClip {
public var tail:MovieClip;
public var hitbox:MovieClip;
public function ShadowThrow(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 309
//ShadowTrap (ShadowTrap)
package {
import flash.display.*;
public dynamic class ShadowTrap extends MovieClip {
public var hitbox:MovieClip;
public function ShadowTrap(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 310
//ShellsClip (ShellsClip)
package {
import flash.display.*;
public dynamic class ShellsClip extends MovieClip {
}
}//package
Section 311
//SkeletonMain (SkeletonMain)
package {
import project.chars.*;
public dynamic class SkeletonMain extends Skeleton {
public function SkeletonMain(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 312
//SkipBtn (SkipBtn)
package {
import project.*;
public dynamic class SkipBtn extends MyButton {
}
}//package
Section 313
//SteamCloud (SteamCloud)
package {
import flash.display.*;
public dynamic class SteamCloud extends MovieClip {
}
}//package
Section 314
//VoiceHolder (VoiceHolder)
package {
import project.sound.*;
public dynamic class VoiceHolder extends VoiceHold {
}
}//package