Section 1
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent)
package com.kongregate.as3.client.events {
import flash.events.*;
public class KongregateEvent extends Event {
public static const COMPLETE:String = "component_api_available";
public function KongregateEvent(_arg1:String){
super(_arg1);
}
}
}//package com.kongregate.as3.client.events
Section 2
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService)
package com.kongregate.as3.client.services {
import flash.events.*;
public class AbstractShadowService extends EventDispatcher {
protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{
trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4));
}
}
}//package com.kongregate.as3.client.services
Section 3
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow)
package com.kongregate.as3.client.services {
public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices {
private var mode:String;
public function HighScoreServiceShadow(){
mode = "";
}
public function submit(_arg1:Number, _arg2:String=null):void{
alert("IHighScoreServices", "submit", arguments);
}
public function connect():Boolean{
alert("IKongregateServices", "connect");
return (true);
}
public function requestList(_arg1:Function):void{
alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]"));
_arg1({success:false});
}
public function setMode(_arg1:String):void{
alert("IHighScoreServices", "setMode", arguments);
this.mode = _arg1;
}
}
}//package com.kongregate.as3.client.services
Section 4
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices)
package com.kongregate.as3.client.services {
public interface IHighScoreServices {
function setMode(_arg1:String):void;
function submit(_arg1:Number, _arg2:String=null):void;
function requestList(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 5
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices)
package com.kongregate.as3.client.services {
import flash.events.*;
public interface IKongregateServices extends IEventDispatcher {
function getPlayerInfo(_arg1:Function):void;
function connect(_arg1:Number=-1):Boolean;
}
}//package com.kongregate.as3.client.services
Section 6
//IStatServices (com.kongregate.as3.client.services.IStatServices)
package com.kongregate.as3.client.services {
public interface IStatServices {
function submitArray(_arg1:Array):void;
function submit(_arg1:String, _arg2:Number):void;
}
}//package com.kongregate.as3.client.services
Section 7
//IUserServices (com.kongregate.as3.client.services.IUserServices)
package com.kongregate.as3.client.services {
public interface IUserServices {
function getName():String;
function getPlayerInfo(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 8
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow)
package com.kongregate.as3.client.services {
public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices {
public function getName():String{
alert("IKongregateServices", "getName");
return ("Guest");
}
public function connect(_arg1:Number=-1):Boolean{
alert("IKongregateServices", "connect", arguments);
return (true);
}
public function getPlayerInfo(_arg1:Function):void{
alert("IKongregateServices", "getPlayerInfo");
_arg1(new Object());
}
}
}//package com.kongregate.as3.client.services
Section 9
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow)
package com.kongregate.as3.client.services {
public class StatServiceShadow extends AbstractShadowService implements IStatServices {
public function submitArray(_arg1:Array):void{
alert("IStatServices", "submitArray", arguments);
}
public function submit(_arg1:String, _arg2:Number):void{
alert("IStatServices", "submitStat", arguments);
}
}
}//package com.kongregate.as3.client.services
Section 10
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow)
package com.kongregate.as3.client.services {
public class UserServiceShadow extends AbstractShadowService implements IUserServices {
public function getName():String{
alert("UserService", "getName");
return ("Guest");
}
public function getPlayerInfo(_arg1:Function):void{
alert("UserService", "getPlayerInfo");
_arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""});
}
}
}//package com.kongregate.as3.client.services
Section 11
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
public interface IAPIBootstrap {
function init(_arg1:Event=null, _arg2:Stage=null):void;
function hideLog():void;
function showLog(_arg1:int=0):void;
}
}//package com.kongregate.as3.client
Section 12
//KongregateAPI (com.kongregate.as3.client.KongregateAPI)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
import com.kongregate.as3.client.services.*;
import flash.net.*;
import com.kongregate.as3.client.events.*;
import flash.system.*;
import flash.utils.*;
import flash.errors.*;
public class KongregateAPI extends Sprite {
private const VERSION:Number = 1;
private var loader:Loader;
private var loadedDomain:ApplicationDomain;
private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices";
private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices";
private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices";
private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices";
private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf";
private static var _connected:Boolean;
private static var kUser:IUserServices;
private static var _loaded:Boolean;
private static var kServices:IKongregateServices;
private static var kScores:IHighScoreServices;
private static var mInstance:KongregateAPI;
private static var kStats:IStatServices;
private static var kAPI:IAPIBootstrap;
public function KongregateAPI(){
if (mInstance != null){
throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access."));
};
mInstance = this;
this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
public function get loaded():Boolean{
return (_loaded);
}
public function get connected():Boolean{
return (_connected);
}
private function alertConnected(_arg1:TimerEvent=null):void{
var _local2:KongregateEvent;
var _local3:Boolean;
_local2 = new KongregateEvent(KongregateEvent.COMPLETE);
_local3 = this.dispatchEvent(_local2);
}
private function init(_arg1:Event):void{
var _local2:Object;
var _local3:String;
var _local4:URLRequest;
var _local5:LoaderContext;
this.removeEventListener(Event.ADDED_TO_STAGE, init);
_loaded = false;
_connected = false;
_local2 = LoaderInfo(root.loaderInfo).parameters;
_local3 = _local2.api_path;
if (_local3 == null){
trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded.");
createShadowServices();
return;
};
Security.allowDomain("*.kongregate.com");
Security.allowDomain("kongregatetrunk.com");
_local4 = new URLRequest(_local3);
_local5 = new LoaderContext(false);
_local5.applicationDomain = ApplicationDomain.currentDomain;
_local5.securityDomain = SecurityDomain.currentDomain;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(_local4, _local5);
}
public function get api():IAPIBootstrap{
return (kAPI);
}
private function loadComplete(_arg1:Event):void{
getServices();
}
public function get scores():IHighScoreServices{
return (kScores);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
throw (new IOError(("API file not found. " + _arg1)));
}
public function get services():IKongregateServices{
return (kServices);
}
public function get stats():IStatServices{
return (kStats);
}
private function createShadowServices():void{
var _local1:Timer;
trace(">>> Kongregate Shadow Services instantiated for local development..");
kServices = new KongregateServiceShadow();
kScores = new HighScoreServiceShadow();
kStats = new StatServiceShadow();
kUser = new UserServiceShadow();
_local1 = new Timer(200, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected);
_local1.start();
_connected = true;
}
public function get user():IUserServices{
return (kUser);
}
private function getServices():void{
var _local1:ApplicationDomain;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = ApplicationDomain.currentDomain;
kAPI = IAPIBootstrap(loader.getChildAt(0));
this.addChild(loader);
_local2 = _local1.getDefinition(CLASS_SERVICES);
trace(_local2);
kServices = _local2.getInstance();
_local3 = _local1.getDefinition(CLASS_SCORES);
kScores = _local3.getInstance();
_local4 = _local1.getDefinition(CLASS_STATS);
kStats = _local4.getInstance();
_local5 = _local1.getDefinition(CLASS_USER);
kUser = _local5.getInstance();
kServices.connect(VERSION);
_loaded = true;
_connected = true;
alertConnected();
}
public static function getInstance():KongregateAPI{
if (!mInstance){
throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it."));
};
return (mInstance);
}
}
}//package com.kongregate.as3.client
Section 13
//BestiaryBox_106 (GetOffMyLawn_fla.BestiaryBox_106)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class BestiaryBox_106 extends MovieClip {
public function BestiaryBox_106(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 14
//BossLife_51 (GetOffMyLawn_fla.BossLife_51)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class BossLife_51 extends MovieClip {
public var HP:TextField;
}
}//package GetOffMyLawn_fla
Section 15
//CashStat_41 (GetOffMyLawn_fla.CashStat_41)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class CashStat_41 extends MovieClip {
public var HealthBox:TextField;
}
}//package GetOffMyLawn_fla
Section 16
//CheckCircle_50 (GetOffMyLawn_fla.CheckCircle_50)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class CheckCircle_50 extends MovieClip {
public function CheckCircle_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 17
//ClearStat_19 (GetOffMyLawn_fla.ClearStat_19)
package GetOffMyLawn_fla {
import flash.display.*;
public dynamic class ClearStat_19 extends MovieClip {
public var yesBtn:SimpleButton;
public var noBtn:SimpleButton;
}
}//package GetOffMyLawn_fla
Section 18
//CompleteDeath_113 (GetOffMyLawn_fla.CompleteDeath_113)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class CompleteDeath_113 extends MovieClip {
public function CompleteDeath_113(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 19
//CurrentPts_33 (GetOffMyLawn_fla.CurrentPts_33)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class CurrentPts_33 extends MovieClip {
public var CurrentPtsBox:TextField;
}
}//package GetOffMyLawn_fla
Section 20
//DifficultyStat_15 (GetOffMyLawn_fla.DifficultyStat_15)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class DifficultyStat_15 extends MovieClip {
public var CancelBtn:SimpleButton;
public var ExpertBtn:SimpleButton;
public var NormBtn:SimpleButton;
public var DifficultyBox:TextField;
}
}//package GetOffMyLawn_fla
Section 21
//ElectricFence_29 (GetOffMyLawn_fla.ElectricFence_29)
package GetOffMyLawn_fla {
import flash.display.*;
public dynamic class ElectricFence_29 extends MovieClip {
public var FenceLightning:MovieClip;
}
}//package GetOffMyLawn_fla
Section 22
//FenceLightning_30 (GetOffMyLawn_fla.FenceLightning_30)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class FenceLightning_30 extends MovieClip {
public function FenceLightning_30(){
addFrameScript(0, frame1, 24, frame25);
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop(1);
}
}
}//package GetOffMyLawn_fla
Section 23
//hardwareStoreGuy_61 (GetOffMyLawn_fla.hardwareStoreGuy_61)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class hardwareStoreGuy_61 extends MovieClip {
public function hardwareStoreGuy_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 24
//HealthStat_38 (GetOffMyLawn_fla.HealthStat_38)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HealthStat_38 extends MovieClip {
public var HealthBox:TextField;
}
}//package GetOffMyLawn_fla
Section 25
//InfoStat_40 (GetOffMyLawn_fla.InfoStat_40)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class InfoStat_40 extends MovieClip {
public var TimeBox:TextField;
}
}//package GetOffMyLawn_fla
Section 26
//JellySac_147 (GetOffMyLawn_fla.JellySac_147)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class JellySac_147 extends MovieClip {
public function JellySac_147(){
addFrameScript(0, frame1, 16, frame17, 32, frame33);
}
function frame1(){
stop();
}
function frame17(){
gotoAndPlay("stunned");
}
function frame33(){
gotoAndPlay("blasted");
}
}
}//package GetOffMyLawn_fla
Section 27
//LawnMower_145 (GetOffMyLawn_fla.LawnMower_145)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class LawnMower_145 extends MovieClip {
public var VentL:MovieClip;
public var VentR:MovieClip;
public function LawnMower_145(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
gotoAndStop(1);
}
}
}//package GetOffMyLawn_fla
Section 28
//LawnMower2_149 (GetOffMyLawn_fla.LawnMower2_149)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class LawnMower2_149 extends MovieClip {
public function LawnMower2_149(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
gotoAndStop(1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 29
//mscBtn_23 (GetOffMyLawn_fla.mscBtn_23)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class mscBtn_23 extends MovieClip {
public function mscBtn_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package GetOffMyLawn_fla
Section 30
//PauseBox_44 (GetOffMyLawn_fla.PauseBox_44)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class PauseBox_44 extends MovieClip {
public var TurretCheck:MovieClip;
public var startLvlBtn:SimpleButton;
public var TipBox:MovieClip;
public var DiffBox:TextField;
public var LvlBox:MovieClip;
public var FenceCheck:MovieClip;
public var BladesCheck:MovieClip;
public var SprinklerCheck:MovieClip;
public var quitBtn:SimpleButton;
public var RiderCheck:MovieClip;
public var RepellentCheck:MovieClip;
public var resumeBtn:SimpleButton;
public function PauseBox_44(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame3(){
SprinklerCheck.buttonMode = true;
BladesCheck.buttonMode = true;
TurretCheck.buttonMode = true;
FenceCheck.buttonMode = true;
RiderCheck.buttonMode = true;
RepellentCheck.buttonMode = true;
MovieClip(root).PauseBoxUpdate();
this.addEventListener(MouseEvent.CLICK, MovieClip(root).ClickEquip);
}
function frame2(){
SprinklerCheck.buttonMode = true;
BladesCheck.buttonMode = true;
TurretCheck.buttonMode = true;
FenceCheck.buttonMode = true;
RiderCheck.buttonMode = true;
RepellentCheck.buttonMode = true;
MovieClip(root).PauseBoxUpdate();
this.addEventListener(MouseEvent.CLICK, MovieClip(root).ClickEquip);
LvlBox.gotoAndStop(MovieClip(root).currentLvl);
DiffBox.text = String(MovieClip(root).gameMode);
}
}
}//package GetOffMyLawn_fla
Section 31
//PtsStat_43 (GetOffMyLawn_fla.PtsStat_43)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PtsStat_43 extends MovieClip {
public var PtsBox2:TextField;
public var PtsBox:TextField;
}
}//package GetOffMyLawn_fla
Section 32
//ScoreStat_42 (GetOffMyLawn_fla.ScoreStat_42)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ScoreStat_42 extends MovieClip {
public var ScoreBox:TextField;
}
}//package GetOffMyLawn_fla
Section 33
//sndBtn_22 (GetOffMyLawn_fla.sndBtn_22)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class sndBtn_22 extends MovieClip {
public function sndBtn_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package GetOffMyLawn_fla
Section 34
//SpecStat_39 (GetOffMyLawn_fla.SpecStat_39)
package GetOffMyLawn_fla {
import flash.display.*;
import flash.text.*;
public dynamic class SpecStat_39 extends MovieClip {
public var HealthBox:TextField;
}
}//package GetOffMyLawn_fla
Section 35
//SpinnerBlade_143 (GetOffMyLawn_fla.SpinnerBlade_143)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class SpinnerBlade_143 extends MovieClip {
public var HitCircle:MovieClip;
public var HitCircle2:MovieClip;
public function SpinnerBlade_143(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 36
//TrophyDisplay_1 (GetOffMyLawn_fla.TrophyDisplay_1)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class TrophyDisplay_1 extends MovieClip {
public function TrophyDisplay_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 37
//Turret_34 (GetOffMyLawn_fla.Turret_34)
package GetOffMyLawn_fla {
import flash.display.*;
public dynamic class Turret_34 extends MovieClip {
public var TurretBarrel:MovieClip;
}
}//package GetOffMyLawn_fla
Section 38
//TurretBarrel_35 (GetOffMyLawn_fla.TurretBarrel_35)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class TurretBarrel_35 extends MovieClip {
public function TurretBarrel_35(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
gotoAndStop(1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 39
//TutBox_108 (GetOffMyLawn_fla.TutBox_108)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class TutBox_108 extends MovieClip {
public function TutBox_108(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 40
//Yard_24 (GetOffMyLawn_fla.Yard_24)
package GetOffMyLawn_fla {
import flash.display.*;
public dynamic class Yard_24 extends MovieClip {
public var Repellent:MovieClip;
public var YardArea:MovieClip;
public var FootprintArea:MovieClip;
public var ElectricFence:MovieClip;
public var Sprinkler:MovieClip;
}
}//package GetOffMyLawn_fla
Section 41
//YardArea_25 (GetOffMyLawn_fla.YardArea_25)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class YardArea_25 extends MovieClip {
public function YardArea_25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 42
//You_3 (GetOffMyLawn_fla.You_3)
package GetOffMyLawn_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class You_3 extends MovieClip {
public function You_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GetOffMyLawn_fla
Section 43
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
public class MochiAd {
public static function getVersion():String{
return ("3.02 as3");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = _slot1._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!_slot1.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
_slot1._cleanup(mc);
options.ad_finished();
};
wh = _slot1._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
_slot1.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
_slot1.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = _slot1._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!_slot1.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
_slot1._cleanup(mc);
options.ad_finished();
};
wh = _slot1._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
_slot1.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
_slot1.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
_slot1.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
_slot1.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _slot1._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = _slot1.getVersion();
clip = options.clip;
if (!_slot1._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = _slot1._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
_slot1.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
_slot1.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = _slot1.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = _slot1.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = _slot1._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!_slot1.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
_slot1._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = _slot1._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
_slot1.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
_slot1.unload(clip);
};
};
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
_slot1.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
_slot1.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
_slot1.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
_slot1.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
_slot1.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 44
//BearRoar (BearRoar)
package {
import flash.media.*;
public dynamic class BearRoar extends Sound {
}
}//package
Section 45
//BL2bFinal (BL2bFinal)
package {
import flash.media.*;
public dynamic class BL2bFinal extends Sound {
}
}//package
Section 46
//blodBounce1 (blodBounce1)
package {
import flash.media.*;
public dynamic class blodBounce1 extends Sound {
}
}//package
Section 47
//blodDoink1 (blodDoink1)
package {
import flash.media.*;
public dynamic class blodDoink1 extends Sound {
}
}//package
Section 48
//blodScream1 (blodScream1)
package {
import flash.media.*;
public dynamic class blodScream1 extends Sound {
}
}//package
Section 49
//blodScream10 (blodScream10)
package {
import flash.media.*;
public dynamic class blodScream10 extends Sound {
}
}//package
Section 50
//blodScream11 (blodScream11)
package {
import flash.media.*;
public dynamic class blodScream11 extends Sound {
}
}//package
Section 51
//blodScream2 (blodScream2)
package {
import flash.media.*;
public dynamic class blodScream2 extends Sound {
}
}//package
Section 52
//blodScream3 (blodScream3)
package {
import flash.media.*;
public dynamic class blodScream3 extends Sound {
}
}//package
Section 53
//blodScream4 (blodScream4)
package {
import flash.media.*;
public dynamic class blodScream4 extends Sound {
}
}//package
Section 54
//blodScream5 (blodScream5)
package {
import flash.media.*;
public dynamic class blodScream5 extends Sound {
}
}//package
Section 55
//blodScream6 (blodScream6)
package {
import flash.media.*;
public dynamic class blodScream6 extends Sound {
}
}//package
Section 56
//blodScream7 (blodScream7)
package {
import flash.media.*;
public dynamic class blodScream7 extends Sound {
}
}//package
Section 57
//blodScream8 (blodScream8)
package {
import flash.media.*;
public dynamic class blodScream8 extends Sound {
}
}//package
Section 58
//blodScream9 (blodScream9)
package {
import flash.media.*;
public dynamic class blodScream9 extends Sound {
}
}//package
Section 59
//blodScreamBoss (blodScreamBoss)
package {
import flash.media.*;
public dynamic class blodScreamBoss extends Sound {
}
}//package
Section 60
//BodyHit10 (BodyHit10)
package {
import flash.media.*;
public dynamic class BodyHit10 extends Sound {
}
}//package
Section 61
//chaching (chaching)
package {
import flash.media.*;
public dynamic class chaching extends Sound {
}
}//package
Section 62
//Chatterbox (Chatterbox)
package {
import flash.media.*;
public dynamic class Chatterbox extends Sound {
}
}//package
Section 63
//Cursor (Cursor)
package {
import flash.display.*;
public dynamic class Cursor extends MovieClip {
}
}//package
Section 64
//earRinging (earRinging)
package {
import flash.media.*;
public dynamic class earRinging extends Sound {
}
}//package
Section 65
//ElectrictySurge (ElectrictySurge)
package {
import flash.media.*;
public dynamic class ElectrictySurge extends Sound {
}
}//package
Section 66
//Enemy1 (Enemy1)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy1 extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var enemyRotation:int;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var trappedState:Boolean;// = false
public function Enemy1(_arg1:String){
splatted = false;
trappedState = false;
slowed = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (4 + (Math.random() * 4));
enemyDamage = 2;
cashValue = 4;
} else {
enemySpeed = (3 + (Math.random() * 3));
enemyDamage = 1;
cashValue = 3;
};
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame6(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
}
}//package
Section 67
//Enemy10 (Enemy10)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy10 extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var enemyRotation:int;
public var trapTimer:Timer;
public var launchTimer:Timer;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var evadeTimer:Timer;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var setTrapSnd:gunClick;
public var enemySpeed:Number;
public var launched:Boolean;// = false
public var splatted:Boolean;// = false
public var hits:int;
public var evading:Boolean;// = false
public var slowTimer:Timer;
public var trappedState:Boolean;// = false
public function Enemy10(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
evading = false;
launched = false;
trapTimer = new Timer((1000 + Math.floor((Math.random() * 2500))));
evadeTimer = new Timer(600);
launchTimer = new Timer(1000);
setTrapSnd = new gunClick();
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (8 + (Math.random() * 6));
enemyDamage = 2;
cashValue = 14;
} else {
enemySpeed = (6 + (Math.random() * 5));
enemyDamage = 1;
cashValue = 13;
};
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
trapTimer.addEventListener(TimerEvent.TIMER, TrapSet);
trapTimer.start();
evadeTimer.addEventListener(TimerEvent.TIMER, EvadeReset);
launchTimer.addEventListener(TimerEvent.TIMER, LaunchWindow);
launchTimer.start();
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame6(){
gotoAndStop(1);
}
function frame1(){
stop();
}
public function EvadeReset(_arg1:TimerEvent){
evading = false;
evadeTimer.stop();
}
function frame11(){
stop();
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
trappedState = false;
this.TrapBlob.visible = false;
this.SlowBlob.visible = false;
};
}
public function LaunchWindow(_arg1:TimerEvent){
launched = true;
launchTimer.stop();
}
public function TrapSet(_arg1:TimerEvent){
var _local2:LobieTrap;
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
_local2 = new LobieTrap();
_local2.x = this.x;
_local2.y = this.y;
_local2.rotation = this.rotation;
_local2.scaleX = this.scaleX;
_local2.scaleY = this.scaleY;
if (MovieClip(root).soundToggle == true){
MovieClip(root).sc3 = setTrapSnd.play();
};
MovieClip(root).Yard.FootprintArea.addChild(_local2);
MovieClip(root).traps.push(_local2);
};
}
}
}//package
Section 68
//Enemy11 (Enemy11)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy11 extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var digTimer:Timer;
public var emergeTimer:Timer;
public var enemyDamage:int;
public var HitCircle:MovieClip;
public var enemyRotation:int;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var digging:Boolean;// = false
public var enemySpeed:Number;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var trappedState:Boolean;// = false
public function Enemy11(_arg1:String){
splatted = false;
trappedState = false;
slowed = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
digTimer = new Timer((400 + Math.floor((Math.random() * 1000))));
emergeTimer = new Timer((1000 + Math.floor((Math.random() * 600))));
digging = false;
super();
addFrameScript(1, frame2, 6, frame7, 25, frame26, 39, frame40, 44, frame45);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (3 + (Math.random() * 3));
enemyDamage = 1;
cashValue = 18;
} else {
enemySpeed = (2 + (Math.random() * 2));
enemyDamage = 1;
cashValue = 16;
};
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
digTimer.addEventListener(TimerEvent.TIMER, DigDown);
digTimer.start();
emergeTimer.addEventListener(TimerEvent.TIMER, EmergeUp);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
public function EmergeUp(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
gotoAndPlay("emerging");
digging = false;
enemyDamage = 1;
emergeTimer.stop();
};
}
public function DigDown(_arg1:TimerEvent){
if ((((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))) && ((trappedState == false)))){
enemyDamage = 3;
digging = true;
digTimer.stop();
gotoAndPlay("digging");
emergeTimer.start();
};
}
function frame7(){
gotoAndPlay(1);
}
function frame26(){
stop();
}
function frame40(){
gotoAndPlay(1);
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
function frame2(){
gotoAndPlay(1);
}
function frame45(){
stop();
}
}
}//package
Section 69
//Enemy2 (Enemy2)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy2 extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var enemyRotation:int;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var trappedState:Boolean;// = false
public function Enemy2(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (5 + (Math.random() * 5));
enemyDamage = 2;
cashValue = 5;
} else {
enemySpeed = (4 + (Math.random() * 4));
enemyDamage = 1;
cashValue = 4;
};
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame6(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
}
}//package
Section 70
//Enemy3 (Enemy3)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy3 extends MovieClip {
public var cashValue:int;
public var enemyDamage:int;
public var enemyRotation:int;
public var houseTimer:Timer;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var spikeTimer:Timer;
public var trappedState:Boolean;// = false
public function Enemy3(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
spikeTimer = new Timer((800 + (Math.random() * 1700)));
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (4 + (Math.random() * 4));
enemyDamage = 2;
cashValue = 7;
} else {
enemySpeed = (3 + (Math.random() * 2));
enemyDamage = 1;
cashValue = 6;
};
hits = 0;
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
spikeTimer.addEventListener(TimerEvent.TIMER, ShootSpikes);
spikeTimer.start();
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
public function ShootSpikes(_arg1:TimerEvent){
var _local2:SpikeProjectile;
var _local3:SpikeProjectile;
var _local4:SpikeProjectile;
var _local5:SpikeProjectile;
var _local6:SpikeProjectile;
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
if (MovieClip(root).spikes.length < 20){
_local2 = new SpikeProjectile();
_local2.x = this.x;
_local2.y = this.y;
_local2.rotation = this.rotation;
MovieClip(root).spikes.push(_local2);
parent.addChild(_local2);
_local3 = new SpikeProjectile();
_local3.x = this.x;
_local3.y = this.y;
_local3.rotation = (this.rotation + 60);
parent.addChild(_local3);
MovieClip(root).spikes.push(_local3);
_local4 = new SpikeProjectile();
_local4.x = this.x;
_local4.y = this.y;
_local4.rotation = (this.rotation + 120);
parent.addChild(_local4);
MovieClip(root).spikes.push(_local4);
_local5 = new SpikeProjectile();
_local5.x = this.x;
_local5.y = this.y;
_local5.rotation = (this.rotation + 240);
parent.addChild(_local5);
MovieClip(root).spikes.push(_local5);
_local6 = new SpikeProjectile();
_local6.x = this.x;
_local6.y = this.y;
_local6.rotation = (this.rotation + 300);
parent.addChild(_local6);
MovieClip(root).spikes.push(_local6);
};
};
}
function frame6(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
}
}//package
Section 71
//Enemy4 (Enemy4)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy4 extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var enemyRotation:int;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var trappedState:Boolean;// = false
public function Enemy4(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
super();
addFrameScript(7, frame8, 12, frame13, 17, frame18);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (9 + (Math.random() * 8));
enemyDamage = 2;
cashValue = 9;
} else {
enemySpeed = (7 + (Math.random() * 6));
enemyDamage = 1;
cashValue = 7;
};
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame18(){
stop();
}
function frame13(){
gotoAndStop(1);
}
function frame8(){
gotoAndPlay(1);
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
}
}//package
Section 72
//Enemy5 (Enemy5)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy5 extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var HitCircle:MovieClip;
public var enemyRotation:int;
public var Mask:MovieClip;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var trappedState:Boolean;// = false
public function Enemy5(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (5 + (Math.random() * 4));
enemyDamage = 2;
cashValue = 10;
} else {
enemySpeed = (4 + (Math.random() * 3));
enemyDamage = 1;
cashValue = 8;
};
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame6(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
}
}//package
Section 73
//Enemy6 (Enemy6)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy6 extends MovieClip {
public var houseTimer:Timer;
public var explodeTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var enemyRotation:int;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var exploding:Boolean;// = false
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var explodeSnd:Explosion6;
public var trappedState:Boolean;// = false
public function Enemy6(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
explodeSnd = new Explosion6();
exploding = false;
super();
addFrameScript(4, frame5, 9, frame10, 15, frame16, 42, frame43);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (7 + (Math.random() * 6));
enemyDamage = 3;
cashValue = 12;
} else {
enemySpeed = (6 + (Math.random() * 5));
enemyDamage = 2;
cashValue = 10;
};
hits = 0;
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
explodeTimer = new Timer((1000 + Math.floor((Math.random() * 2500))));
explodeTimer.addEventListener(TimerEvent.TIMER, ExplodeFunction);
explodeTimer.start();
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame10(){
gotoAndStop(1);
}
function frame16(){
stop();
}
function frame5(){
gotoAndPlay(1);
}
function frame43(){
stop();
parent.removeChild(this);
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
public function ExplodeFunction(_arg1:TimerEvent){
if ((((((((this.splatted == false)) && ((this.exploding == false)))) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
exploding = true;
MovieClip(root).remainingEnemies++;
gotoAndPlay("explode");
MovieClip(root).sc1 = explodeSnd.play();
if (this.hitTestObject(MovieClip(root).Yard.YardArea)){
MovieClip(root).health = (MovieClip(root).health - 10);
};
};
}
}
}//package
Section 74
//Enemy7 (Enemy7)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy7 extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var enemyRotation:int;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var indestructible:Boolean;
public var splatted:Boolean;// = false
public var hits:int;
public var metalTimer:Timer;
public var startMetal:Boolean;
public var slowTimer:Timer;
public var Metal:MovieClip;
public var trappedState:Boolean;// = false
public function Enemy7(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
metalTimer = new Timer(200);
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (4 + (Math.random() * 3));
enemyDamage = 2;
cashValue = 12;
} else {
enemySpeed = (3 + (Math.random() * 2));
enemyDamage = 1;
cashValue = 10;
};
this.Metal.alpha = 0;
hits = 0;
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
metalTimer.addEventListener(TimerEvent.TIMER, MetalFunction);
metalTimer.start();
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame6(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
public function MetalFunction(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
if ((((((Math.random() < 0.05)) && ((startMetal == false)))) && ((this.Metal.alpha <= 0)))){
startMetal = true;
} else {
if ((((((Math.random() > 0.75)) && ((startMetal == true)))) && ((this.Metal.alpha >= 1)))){
startMetal = false;
};
};
if ((((startMetal == true)) && ((this.Metal.alpha < 1)))){
if (this.Metal.alpha > 0.5){
indestructible = true;
};
this.Metal.alpha = (this.Metal.alpha + 0.2);
};
if ((((startMetal == false)) && ((this.Metal.alpha > 0)))){
this.Metal.alpha = (this.Metal.alpha - 0.2);
};
if (this.Metal.alpha <= 0){
indestructible = false;
this.Metal.alpha = 0;
};
};
}
}
}//package
Section 75
//Enemy8 (Enemy8)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy8 extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var enemyRotation:int;
public var fatCtr:int;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var fatTimer:Timer;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var trappedState:Boolean;// = false
public function Enemy8(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
fatTimer = new Timer(1000);
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (3 + (Math.random() * 3));
enemyDamage = 2;
cashValue = 13;
} else {
enemySpeed = (2 + (Math.random() * 2));
enemyDamage = 1;
cashValue = 11;
};
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
fatTimer.addEventListener(TimerEvent.TIMER, FatFunction);
fatTimer.start();
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame6(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
public function FatFunction(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
fatCtr++;
if ((((this.scaleX < 1.6)) && ((this.scaleY < 1.6)))){
this.scaleX = (this.scaleX + 0.1);
this.scaleY = (this.scaleY + 0.1);
if (enemyDamage <= 5){
enemyDamage++;
};
};
};
}
}
}//package
Section 76
//Enemy9 (Enemy9)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Enemy9 extends MovieClip {
public var houseTimer:Timer;
public var explodeTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var chatterTimer:Timer;
public var enemyRotation:int;
public var chatterSnd:Chatterbox;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var FlareBody:MovieClip;
public var exploding:Boolean;// = false
public var TrapBlob:MovieClip;
public var slowed:Boolean;// = false
public var enemySpeed:Number;
public var splatted:Boolean;// = false
public var hits:int;
public var slowTimer:Timer;
public var explodeSnd:SmashGlass2;
public var trappedState:Boolean;// = false
public function Enemy9(_arg1:String){
splatted = false;
slowed = false;
trappedState = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
explodeSnd = new SmashGlass2();
chatterSnd = new Chatterbox();
exploding = false;
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11, 37, frame38);
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (6 + (Math.random() * 6));
enemyDamage = 2;
cashValue = 13;
} else {
enemySpeed = (5 + (Math.random() * 5));
enemyDamage = 1;
cashValue = 12;
};
hits = 0;
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
chatterTimer = new Timer((500 + (Math.random() * 500)));
explodeTimer = new Timer(100);
chatterTimer.addEventListener(TimerEvent.TIMER, ChatterFunction);
chatterTimer.start();
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
function frame1(){
stop();
}
public function ChatterFunction(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
if (MovieClip(root).soundToggle == true){
MovieClip(root).scFull = chatterSnd.play();
};
explodeTimer.addEventListener(TimerEvent.TIMER, ExplodeFunction);
explodeTimer.start();
};
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
function frame6(){
gotoAndStop(1);
}
function frame11(){
stop();
}
public function ExplodeFunction(_arg1:TimerEvent){
if ((((((((this.splatted == false)) && ((this.exploding == false)))) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
this.FlareBody.alpha = (this.FlareBody.alpha + 0.1);
if (this.FlareBody.alpha >= 1){
MovieClip(root).remainingEnemies++;
exploding = true;
gotoAndPlay("explode");
if (MovieClip(root).soundToggle == true){
MovieClip(root).sc1 = explodeSnd.play();
MovieClip(root).scFull.stop();
};
MovieClip(root).blindCtr = 0;
MovieClip(root).blindTimer.stop();
MovieClip(root).unblindCtr = 0;
MovieClip(root).unblindTimer.stop();
MovieClip(root).blindTimer.start();
};
};
}
function frame38(){
stop();
parent.removeChild(this);
}
}
}//package
Section 77
//EnemyBoss (EnemyBoss)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class EnemyBoss extends MovieClip {
public var houseTimer:Timer;
public var cashValue:int;
public var enemyDamage:int;
public var mode2:String;
public var HitCircle:MovieClip;
public var freezeCheckTimer:Timer;
public var enemyRotation:int;
public var zoomTimer:Timer;
public var zooming:Boolean;// = false
public var freezeAwayTimer:Timer;
public var freezeCtr:int;
public var teleportSnd:StrikeBlade;
public var launchTimer:Timer;
public var houseHit:Boolean;// = false
public var SlowBlob:MovieClip;
public var freezeFire:FlamethrowerFire;
public var TrapBlob:MovieClip;
public var freezeSnd:BearRoar;
public var slowed:Boolean;// = false
public var zoomAwayTimer:Timer;
public var enemySpeed:Number;
public var launched:Boolean;// = false
public var freezeShotTimer:Timer;
public var splatted:Boolean;// = false
public var Frost:MovieClip;
public var slowTimer:Timer;
public var hits:int;
public var Metal:MovieClip;
public var trappedState:Boolean;// = false
public function EnemyBoss(_arg1:String){
splatted = false;
trappedState = false;
slowed = false;
slowTimer = new Timer(3000);
houseHit = false;
houseTimer = new Timer(800);
freezeShotTimer = new Timer(100);
freezeCheckTimer = new Timer(2000);
freezeAwayTimer = new Timer(1500);
zoomTimer = new Timer(1000);
zoomAwayTimer = new Timer(500);
launchTimer = new Timer(1000);
zooming = false;
launched = false;
teleportSnd = new StrikeBlade();
freezeSnd = new BearRoar();
super();
addFrameScript(0, frame1, 5, frame6, 10, frame11);
mode2 = _arg1;
if ((((_arg1 == "expert")) || ((_arg1 == "time")))){
enemySpeed = (4 + (Math.random() * 10));
enemyDamage = 2;
cashValue = 100;
} else {
enemySpeed = (3 + (Math.random() * 8));
enemyDamage = 1;
cashValue = 60;
};
houseTimer.addEventListener(TimerEvent.TIMER, houseFunc);
slowTimer.addEventListener(TimerEvent.TIMER, SlowRelease);
freezeCheckTimer.addEventListener(TimerEvent.TIMER, FreezeCheck);
freezeCheckTimer.start();
freezeShotTimer.addEventListener(TimerEvent.TIMER, FreezeShot);
freezeAwayTimer.addEventListener(TimerEvent.TIMER, FreezeAway);
zoomTimer.addEventListener(TimerEvent.TIMER, ZoomAttack);
zoomAwayTimer.addEventListener(TimerEvent.TIMER, ZoomAway);
zoomTimer.start();
launchTimer.addEventListener(TimerEvent.TIMER, LaunchWindow);
launchTimer.start();
}
public function houseFunc(_arg1:TimerEvent){
houseTimer.stop();
houseHit = false;
}
public function ZoomEscape(){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
if ((((this.zooming == false)) && ((Math.random() < 0.3)))){
zooming = true;
enemySpeed = 45;
enemyDamage = 3;
this.Metal.visible = true;
this.Frost.alpha = 0;
zoomAwayTimer.start();
MovieClip(root).scBoss = teleportSnd.play();
MovieClip(root).scBoss.soundTransform = MovieClip(root).volTransform;
};
};
}
public function FreezeAway(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
this.freezeFire.visible = false;
this.Frost.alpha = 0;
freezeAwayTimer.stop();
};
}
function frame6(){
gotoAndStop(1);
}
public function ZoomAway(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
zooming = false;
if ((((mode2 == "expert")) || ((mode2 == "time")))){
enemySpeed = (6 + (Math.random() * 10));
this.Metal.visible = false;
enemyDamage = 2;
} else {
enemySpeed = (5 + (Math.random() * 8));
this.Metal.visible = false;
enemyDamage = 1;
};
zoomAwayTimer.stop();
};
}
public function FreezeCheck(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
if ((((this.freezeFire.visible == false)) && ((Math.random() < 0.5)))){
freezeShotTimer.start();
};
};
}
public function SlowRelease(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
slowTimer.stop();
slowed = false;
this.SlowBlob.visible = false;
trappedState = false;
this.TrapBlob.visible = false;
};
}
function frame11(){
stop();
}
public function LaunchWindow(_arg1:TimerEvent){
launched = true;
launchTimer.stop();
}
public function FreezeShot(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
freezeCtr++;
this.Frost.alpha = (this.Frost.alpha + 0.1);
if (freezeCtr >= 10){
this.rotation = (((180 / Math.PI) * Math.atan2((MovieClip(root).avatar.y - this.y), (MovieClip(root).avatar.x - this.x))) + 180);
freezeCtr = 0;
this.freezeFire.visible = true;
freezeShotTimer.stop();
freezeAwayTimer.start();
if (MovieClip(root).soundToggle == true){
MovieClip(root).scBoss = freezeSnd.play();
};
};
};
}
function frame1(){
stop();
}
public function ZoomAttack(_arg1:TimerEvent){
if ((((((this.splatted == false)) && ((MovieClip(root).endGame == false)))) && ((MovieClip(root).gamePaused == false)))){
if ((((this.zooming == false)) && ((Math.random() < 0.3)))){
zooming = true;
enemySpeed = 45;
enemyDamage = 3;
this.Metal.visible = true;
this.Frost.alpha = 0;
zoomAwayTimer.start();
if (MovieClip(root).soundToggle == true){
MovieClip(root).scBoss = teleportSnd.play();
};
};
};
}
}
}//package
Section 78
//Explosion6 (Explosion6)
package {
import flash.media.*;
public dynamic class Explosion6 extends Sound {
}
}//package
Section 79
//FlamethrowerFire (FlamethrowerFire)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class FlamethrowerFire extends MovieClip {
public function FlamethrowerFire(){
addFrameScript(6, frame7);
}
function frame7(){
gotoAndPlay(1);
}
}
}//package
Section 80
//Footprint (Footprint)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Footprint extends MovieClip {
public var disappearTimer:Timer;
public function Footprint(){
disappearTimer = new Timer(100);
super();
disappearTimer.addEventListener(TimerEvent.TIMER, DisappearFunc);
disappearTimer.start();
}
public function DisappearFunc(_arg1:TimerEvent){
if (this.alpha <= 0){
disappearTimer.stop();
parent.removeChild(this);
} else {
this.alpha = (this.alpha - 0.05);
};
}
}
}//package
Section 81
//getoffmyintro (getoffmyintro)
package {
import flash.media.*;
public dynamic class getoffmyintro extends Sound {
}
}//package
Section 82
//GetOffMyLawn (GetOffMyLawn)
package {
import flash.events.*;
import flash.display.*;
import com.kongregate.as3.client.*;
import flash.net.*;
import mochi.as3.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public dynamic class GetOffMyLawn extends MovieClip {
public var BestScoreBox:TextField;
private var trapSlapSnd:Slap2;
private var timeCtr:int;
public var AwardsBox:TextField;
public var PauseBox:MovieClip;
public var e6Btn:SimpleButton;
public var LoseScoreBox:TextField;
private var yardTimer:Timer;
public var fence:Boolean;// = false
public var BG:MovieClip;
public var CashStat:MovieClip;
public var unblindTimer:Timer;
public var currentCash:int;// = 0
private var sndTimer1:Timer;
private var sndTimer3:Timer;
public var scBGM:SoundChannel;
private var sndTimer5:Timer;
public var HASeTrophy5:Boolean;// = false
public var HASeTrophy6:Boolean;// = false
public var HASeTrophy3:Boolean;// = false
public var HASeTrophy4:Boolean;// = false
public var highKills:int;// = 0
public var HASeTrophy7:Boolean;// = false
private var BGMTimer2:Timer;
private var sndTimer2:Timer;
public var trophyDisplayCtr:int;// = 0
private var i:int;
public var HASorderTrophy:Boolean;// = false
public var HASeTrophy8:Boolean;// = false
public var HASeTrophy2:Boolean;// = false
private var j:int;
public var HASeTrophy9:Boolean;// = false
public var w:Water;
public var menuBtn:SimpleButton;
public var HASeTrophy1:Boolean;// = false
private var frozenTimer:Timer;
private var sc5Playing:Boolean;// = false
public var BG2:MovieClip;
public var BG3:MovieClip;
public var BG4:MovieClip;
private var spawnTimer:Timer;
public var careerDamage:int;// = 0
private var spawnRate2:Number;// = 2000
public var PenaltyBox:TextField;
public var LoseCashBox:TextField;
public var BestMultiplierBox:TextField;
public var BGM:RunningToNowhere;
public var gameMode:String;// = "test"
private var spawnCtr:int;
public var trophyCount:int;// = 0
public var awardsBtn:SimpleButton;
private var beenStunned:Boolean;// = false
public var DifficultyStat:MovieClip;
public var SpecStat:MovieClip;
public var storyKills:Array;
private var earRingSnd:earRinging;
public var e8Btn:SimpleButton;
private var twirling:Boolean;// = false
public var bladesBtn:SimpleButton;
public var power:int;// = 100
private var recentScore:int;
public var totHealth:int;// = 100
public var HASboomerangTrophy:Boolean;// = false
public var turret:Boolean;// = false
public var repellent:Boolean;// = false
private var cookieCrunch:LawnCookies;
public var spikes:Array;
public var statsBtn:SimpleButton;
public var soundToggle:Boolean;// = true
private var powerTimer:Timer;
private var spawnType:int;
public var avatar:Spinner;
private var gameLoseTimer:Timer;
public var sprinklerEquipped:Boolean;// = false
public var BestiaryBox:MovieClip;
public var storyPlaying:Boolean;// = false
private var combo:Boolean;
private var ptsTimer:Timer;
public var HASlicenseTrophy:Boolean;// = false
private var enemy1:Enemy1;
private var enemy2:Enemy2;
private var enemy5:Enemy5;
private var enemy6:Enemy6;
private var enemy7:Enemy7;
private var enemy8:Enemy8;
private var enemy9:Enemy9;
private var enemy3:Enemy3;
private var enemy4:Enemy4;
public var spentCash:int;// = 0
public var gameScore:int;// = 0
public var licenseTrophy:MovieClip;
public var lvlKills:int;// = 0
private var enemyS:Enemy1;
public var kongregate:KongregateAPI;
public var CareerEarningsBox:TextField;
public var introBGMTimer:Timer;
public var volTwirl:SoundTransform;
public var trophyDisplayTimer:Timer;
public var musicBtn:MovieClip;
private var sc2Playing:Boolean;// = false
public var defaultItems:ContextMenuBuiltInItems;
private var beenFrozen:Boolean;// = false
public var lvlTime:int;// = 0
public var HarLink:SimpleButton;
public var bestiaryBtn:SimpleButton;
public var ClearStat:MovieClip;
private var bossPlaced:Boolean;// = false
public var torque:int;// = 1
private var completeCtr:int;
public var scEarRing:SoundChannel;
public var throttle2:MovieClip;
public var throttle3:MovieClip;
public var throttle4:MovieClip;
public var throttle5:MovieClip;
public var throttle6:MovieClip;
public var throttle7:MovieClip;
public var CareerTimeBox:TextField;
public var e1Btn:SimpleButton;
public var throttle1:MovieClip;
public var repellentBtn:SimpleButton;
public var health:int;// = 100
private var newEnemyTimer:Timer;
public var TrophyStatBox:TextField;
public var sprinkler:Boolean;// = false
public var nextBtn:SimpleButton;
public var minCtr:int;
public var CareerKillsBox:TextField;
public var lvlCash:int;// = 0
public var scTwirl:SoundChannel;
public var introIsPlaying:Boolean;// = false
private var screamSnd10:blodScream3;
private var screamSnd11:blodScream10;
public var HASeTrophy11:Boolean;// = false
public var HASeTrophy12:Boolean;// = false
private var frozen:Boolean;// = false
public var HASeTrophy10:Boolean;// = false
private var stunTimer:Timer;
public var hardwareStoreGuy:MovieClip;
private var trapped:Boolean;// = false
public var introBGM:getoffmyintro;
public var LoseTimeBox:TextField;
public var HASeasyTrophy:Boolean;// = false
public var boomerangTrophy:MovieClip;
public var sprinklerBtn:SimpleButton;
public var CurrentPts:MovieClip;
public var e11Btn:SimpleButton;
public var BestKillsBox:TextField;
private var beenBlasted:Boolean;// = false
public var traps:Array;
public var TutBox:MovieClip;
public var HealthStat:MovieClip;
public var LvlEarningsBox:TextField;
public var e3Btn:SimpleButton;
public var savedGame:Boolean;// = false
private var deadCtr:int;
public var prevBtn:SimpleButton;
public var throttle:int;// = 1
private var enemyBoss:EnemyBoss;
public var purchasedText:PurchasedText;
public var cursor:Cursor;
public var blades:Boolean;// = false
public var chachingSnd:chaching;
public var endGame:Boolean;// = false
public var Purchases:MovieClip;
private var fenceSnd:ElectrictySurge;
private var storyEnemyTimer:Timer;
public var volTransform3:SoundTransform;
public var volTransform5:SoundTransform;
public var volTransform2:SoundTransform;
public var grassTrophy:MovieClip;
public var highTime:int;// = 0
public var riderEquipped:Boolean;// = false
private var num:int;
public var thumbTrophy:MovieClip;
private var enemy10:Enemy10;
private var enemy11:Enemy11;
public var gamePaused:Boolean;// = false
public var refundBtn:SimpleButton;
public var e5Btn:SimpleButton;
public var clockTimer:Timer;
public var eTrophy1:MovieClip;
public var eTrophy2:MovieClip;
public var clockTrophy:MovieClip;
public var eTrophy5:MovieClip;
public var eTrophy6:MovieClip;
public var sc2:SoundChannel;
public var eTrophy8:MovieClip;
public var eTrophy9:MovieClip;
public var eTrophy3:MovieClip;
public var eTrophy4:MovieClip;
public var sc1:SoundChannel;
public var eTrophy7:MovieClip;
public var sc3:SoundChannel;
public var sc5:SoundChannel;
public var highCash:int;// = 0
public var You:MovieClip;
private var spawnRelease:int;
public var unblindCtr:int;
public var highLvlNormal:int;// = 0
public var HASdogtagTrophy:Boolean;// = false
public var BossLife:MovieClip;
public var continueBtn:SimpleButton;
private var turretTimer:Timer;
public var InfoStat:MovieClip;
public var TrophyDisplay:MovieClip;
public var thermostat:int;// = 1
private var accelerating:Boolean;// = false
public var HASdiamondTrophy:Boolean;// = false
public var fenceBtn:SimpleButton;
public var timeTrophy1:MovieClip;
public var timeTrophy2:MovieClip;
public var timeTrophy3:MovieClip;
private var screamSnd2:blodScream2;
private var screamSnd3:blodScream5;
private var screamSnd5:blodScream6;
private var screamSnd6:blodScream7;
private var screamSnd7:blodScream11;
private var screamSnd1:blodScream1;
private var screamSnd9:blodScream9;
private var spikeHitSnd:BodyHit10;
public var HASpurpleTrophy:Boolean;// = false
private var timeTimer:Timer;
private var screamSnd4:blodScream4;
public var e7Btn:SimpleButton;
public var BGM2:BL2bFinal;
public var CompleteDeath:MovieClip;
public var diamondTrophy:MovieClip;
private var screamSnd8:blodScream8;
public var dogtagTrophy:MovieClip;
public var volEarRinging:SoundTransform;
public var TrophyCountBox:TextField;
public var CareerTurretBox:TextField;
public var giggleSnd1:giggle1;
public var giggleSnd3:giggle3;
public var giggleSnd4:giggle4;
public var giggleSnd2:giggle2;
public var HASgrassTrophy:Boolean;// = false
private var flawlessLvl:Boolean;// = false
public var easyTrophy:MovieClip;
public var KillsBox:TextField;
public var HASthumbTrophy:Boolean;// = false
public var ClearBtn:SimpleButton;
public var HAShardTrophy:Boolean;// = false
private var beenTrapped:Boolean;// = false
public var blindTimer:Timer;
public var scFull:SoundChannel;
private var beenBlinded:Boolean;// = false
public var highMultiplier:int;// = 0
public var repellentEquipped:Boolean;// = false
private var sc1Playing:Boolean;// = false
public var Turret:MovieClip;
public var purpleTrophy:MovieClip;
public var HASclockTrophy:Boolean;// = false
public var ExpertStatBox:TextField;
private var tctr:int;
public var e9Btn:SimpleButton;
public var riderTrophy:MovieClip;
public var howtoplayBtn:SimpleButton;
public var highLvlExpert:int;// = 0
private var speedMultiplier:Number;// = 0
private var bossDead:Boolean;// = false
public var riderBtn:SimpleButton;
private var mowerSnd1:Mower;
private var mowerSnd2:Mower3;
private var screamSndBoss:blodScreamBoss;
public var CareerFenceBox:TextField;
private var fenceTimer:Timer;
private var trappedTimer:Timer;
public var HAStimeTrophy1:Boolean;// = false
public var HAStimeTrophy3:Boolean;// = false
public var multiplier:int;
public var HAStimeTrophy2:Boolean;// = false
public var PtsStat:MovieClip;
public var turretKills:int;// = 0
private var randSize:Number;
public var careerScore:int;// = 0
public var musicToggle:Boolean;// = true
public var scBoss:SoundChannel;
public var CareerDamageBox:TextField;
public var LoseEarningsBox:TextField;
public var volFull:SoundTransform;
public var highScore:int;// = 0
private var enemies:Array;
public var volTransformBGM:SoundTransform;
public var fenceEquipped:Boolean;// = false
public var gnomeTrophy:MovieClip;
public var BlindBox:MovieClip;
private var comboTimer:Timer;
private var turretSnd:MachineGun;
public var myContextMenu:ContextMenu;
public var tickleCtr:int;
private var twirlSnd:TwirlSnd;
public var e10Btn:SimpleButton;
public var rider:Boolean;// = false
private var comboPts:int;
public var blindCtr:int;
private var bounceSnd1:blodBounce1;
private var bounceSnd2:blodDoink1;
public var HASriderTrophy:Boolean;// = false
private var stunned:Boolean;// = false
public var timeAttackBtn:SimpleButton;
public var DeadBox:MovieClip;
public var e2Btn:SimpleButton;
public var thermostat1:MovieClip;
public var thermostat2:MovieClip;
public var thermostat3:MovieClip;
public var thermostat4:MovieClip;
public var thermostat5:MovieClip;
public var thermostat6:MovieClip;
private var gameCompleteTimer:Timer;
public var thermostat7:MovieClip;
private var sc3Playing:Boolean;// = false
public var soundBtn:MovieClip;
public var ShopBox:TextField;
public var UpperYard:MovieClip;
public var mowerSpeed:int;
public var LongestTimeBox:TextField;
public var hardTrophy:MovieClip;
private var powerCtr:Number;// = 0
public var House:MovieClip;
public var gameModeInt:int;// = 0
private var spawnRate:Number;// = 2000
private var twirl:int;// = 10
public var orderTrophy:MovieClip;
public var fenceKills:int;// = 0
public var totPower:int;// = 100
public var fertilizerBtn:SimpleButton;
public var HASbhemothTrophy:Boolean;// = false
public var remainingEnemies:int;// = 0
public var turretBtn:SimpleButton;
public var menuBtn2:SimpleButton;
public var newGameBtn:SimpleButton;
public var Yard:MovieClip;
public var scTurret:SoundChannel;
public var torque1:MovieClip;
public var torque2:MovieClip;
public var torque3:MovieClip;
public var torque4:MovieClip;
public var torque5:MovieClip;
public var torque6:MovieClip;
public var e4Btn:SimpleButton;
private var spawnSide:int;
public var careerTime:int;// = 0
private var BGMTimer:Timer;
public var bhemothTrophy:MovieClip;
public var shopBtn:SimpleButton;
public var bladesEquipped:Boolean;// = false
public var torque7:MovieClip;
public var lvlScore:int;// = 0
public var HASgnomeTrophy:Boolean;// = false
public var CareerScoreBox:TextField;
public var harBtn2:SimpleButton;
public var difficulty:Number;// = 1
public var BestEarningsBox:TextField;
public var MenuBox:TextField;
public var NormalStatBox:TextField;
public var careerCash:int;// = 0
public var eTrophy10:MovieClip;
public var eTrophy11:MovieClip;
public var eTrophy12:MovieClip;
private var attackDamage:Number;// = 5
public var volTransform:SoundTransform;
public var ScoreStat:MovieClip;
public var currentLvl:int;// = 1
public var turretEquipped:Boolean;// = false
public var careerKills:int;// = 0
private var sndCtr:int;// = 0
public function GetOffMyLawn(){
giggleSnd1 = new giggle1();
giggleSnd2 = new giggle2();
giggleSnd3 = new giggle3();
giggleSnd4 = new giggle4();
avatar = new Spinner();
accelerating = false;
enemies = new Array();
twirling = false;
twirl = 10;
storyKills = new Array(15, 25, 30, 30, 40, 45, 50, 40, 45, 50, 50, 40, 60, 70, 50, 70, 50, 100, 100, 120, 40);
difficulty = 1;
bossDead = false;
power = 100;
totPower = 100;
health = 100;
totHealth = 100;
fenceSnd = new ElectrictySurge();
speedMultiplier = 0;
spawnRate = 2000;
spawnRate2 = 2000;
cursor = new Cursor();
gameMode = "test";
gameModeInt = 0;
powerTimer = new Timer(100);
screamSnd1 = new blodScream1();
screamSnd2 = new blodScream2();
screamSnd3 = new blodScream5();
screamSnd4 = new blodScream4();
screamSnd5 = new blodScream6();
screamSnd6 = new blodScream7();
screamSnd7 = new blodScream11();
screamSnd8 = new blodScream8();
screamSnd9 = new blodScream9();
screamSnd10 = new blodScream3();
screamSnd11 = new blodScream10();
screamSndBoss = new blodScreamBoss();
chachingSnd = new chaching();
turretSnd = new MachineGun();
earRingSnd = new earRinging();
trapSlapSnd = new Slap2();
spikeHitSnd = new BodyHit10();
introBGM = new getoffmyintro();
BGM = new RunningToNowhere();
BGM2 = new BL2bFinal();
introIsPlaying = false;
bounceSnd1 = new blodBounce1();
bounceSnd2 = new blodDoink1();
mowerSnd1 = new Mower();
mowerSnd2 = new Mower3();
sc1 = new SoundChannel();
sc2 = new SoundChannel();
sc3 = new SoundChannel();
scBGM = new SoundChannel();
sc5 = new SoundChannel();
scTwirl = new SoundChannel();
scFull = new SoundChannel();
scBoss = new SoundChannel();
scTurret = new SoundChannel();
scEarRing = new SoundChannel();
sc1Playing = false;
sc2Playing = false;
sc3Playing = false;
sc5Playing = false;
sndTimer1 = new Timer(100);
sndTimer2 = new Timer(100);
sndTimer3 = new Timer(100);
sndTimer5 = new Timer(100);
BGMTimer = new Timer(178000);
BGMTimer2 = new Timer(111000);
volTransform = new SoundTransform();
volTransform2 = new SoundTransform();
volTransform3 = new SoundTransform();
volTransformBGM = new SoundTransform();
volTransform5 = new SoundTransform();
volFull = new SoundTransform();
volEarRinging = new SoundTransform();
volTwirl = new SoundTransform();
twirlSnd = new TwirlSnd();
timeTimer = new Timer(100);
yardTimer = new Timer(250);
ptsTimer = new Timer(2000);
comboTimer = new Timer(800);
traps = new Array();
powerCtr = 0;
blindTimer = new Timer(100);
unblindTimer = new Timer(100);
w = new Water();
spikes = new Array();
sndCtr = 0;
gameCompleteTimer = new Timer(100);
gameLoseTimer = new Timer(100);
endGame = false;
currentCash = 0;
spentCash = 0;
gameScore = 0;
lvlCash = 0;
lvlScore = 0;
lvlTime = 0;
lvlKills = 0;
remainingEnemies = 0;
highKills = 0;
highScore = 0;
highTime = 0;
highCash = 0;
highLvlNormal = 0;
highLvlExpert = 0;
highMultiplier = 0;
careerTime = 0;
careerCash = 0;
careerScore = 0;
careerKills = 0;
careerDamage = 0;
trophyCount = 0;
fenceKills = 0;
turretKills = 0;
currentLvl = 1;
HASeTrophy1 = false;
HASeTrophy2 = false;
HASeTrophy3 = false;
HASeTrophy4 = false;
HASeTrophy5 = false;
HASeTrophy6 = false;
HASeTrophy7 = false;
HASeTrophy8 = false;
HASeTrophy9 = false;
HASeTrophy10 = false;
HASeTrophy11 = false;
HASeTrophy12 = false;
HASriderTrophy = false;
HASgrassTrophy = false;
HASeasyTrophy = false;
HAShardTrophy = false;
HASbhemothTrophy = false;
HASclockTrophy = false;
HAStimeTrophy1 = false;
HAStimeTrophy2 = false;
HAStimeTrophy3 = false;
HASthumbTrophy = false;
HASgnomeTrophy = false;
HASlicenseTrophy = false;
HASdogtagTrophy = false;
HASpurpleTrophy = false;
HASorderTrophy = false;
HASboomerangTrophy = false;
HASdiamondTrophy = false;
beenStunned = false;
beenBlasted = false;
beenTrapped = false;
beenFrozen = false;
beenBlinded = false;
trophyDisplayTimer = new Timer(100);
trophyDisplayCtr = 0;
clockTimer = new Timer(1000);
storyPlaying = false;
introBGMTimer = new Timer(85000);
bossPlaced = false;
attackDamage = 5;
stunned = false;
stunTimer = new Timer(1000);
trapped = false;
trappedTimer = new Timer(2000);
frozen = false;
frozenTimer = new Timer(2000);
rider = false;
sprinkler = false;
blades = false;
turret = false;
repellent = false;
fence = false;
riderEquipped = false;
sprinklerEquipped = false;
bladesEquipped = false;
turretEquipped = false;
repellentEquipped = false;
fenceEquipped = false;
gamePaused = false;
throttle = 1;
thermostat = 1;
torque = 1;
spawnTimer = new Timer(1000);
turretTimer = new Timer(3000);
fenceTimer = new Timer(2500);
soundToggle = true;
musicToggle = true;
flawlessLvl = false;
savedGame = false;
cookieCrunch = new LawnCookies();
kongregate = new KongregateAPI();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11);
clockTimer.addEventListener(TimerEvent.TIMER, ClockFunction);
clockTimer.start();
trophyDisplayTimer.addEventListener(TimerEvent.TIMER, TrophyDisplayDrop);
addChild(kongregate);
}
public function NextLvl(_arg1:MouseEvent){
gameMode = "continue";
gotoAndStop("play");
introIsPlaying = false;
introBGMTimer.stop();
scBGM.stop();
}
public function LoadCareer(){
HASeTrophy1 = cookieCrunch.readCookie("HASeTrophy1");
HASeTrophy2 = cookieCrunch.readCookie("HASeTrophy2");
HASeTrophy3 = cookieCrunch.readCookie("HASeTrophy3");
HASeTrophy4 = cookieCrunch.readCookie("HASeTrophy4");
HASeTrophy5 = cookieCrunch.readCookie("HASeTrophy5");
HASeTrophy6 = cookieCrunch.readCookie("HASeTrophy6");
HASeTrophy7 = cookieCrunch.readCookie("HASeTrophy7");
HASeTrophy8 = cookieCrunch.readCookie("HASeTrophy8");
HASeTrophy9 = cookieCrunch.readCookie("HASeTrophy9");
HASeTrophy10 = cookieCrunch.readCookie("HASeTrophy10");
HASeTrophy11 = cookieCrunch.readCookie("HASeTrophy11");
HASeTrophy12 = cookieCrunch.readCookie("HASeTrophy12");
HASriderTrophy = cookieCrunch.readCookie("HASriderTrophy");
HASgrassTrophy = cookieCrunch.readCookie("HASgrassTrophy");
HASeasyTrophy = cookieCrunch.readCookie("HASeasyTrophy");
HAShardTrophy = cookieCrunch.readCookie("HAShardTrophy");
HASbhemothTrophy = cookieCrunch.readCookie("HASbhemothTrophy");
HASclockTrophy = cookieCrunch.readCookie("HASclockTrophy");
HAStimeTrophy1 = cookieCrunch.readCookie("HAStimeTrophy1");
HAStimeTrophy2 = cookieCrunch.readCookie("HAStimeTrophy2");
HAStimeTrophy3 = cookieCrunch.readCookie("HAStimeTrophy3");
HASthumbTrophy = cookieCrunch.readCookie("HASthumbTrophy");
HASgnomeTrophy = cookieCrunch.readCookie("HASgnomeTrophy");
HASlicenseTrophy = cookieCrunch.readCookie("HASlicenseTrophy");
HASdogtagTrophy = cookieCrunch.readCookie("HASdogtagTrophy");
HASpurpleTrophy = cookieCrunch.readCookie("HASpurpleTrophy");
HASorderTrophy = cookieCrunch.readCookie("HASorderTrophy");
HASboomerangTrophy = cookieCrunch.readCookie("HASboomerangTrophy");
HASdiamondTrophy = cookieCrunch.readCookie("HASdiamondTrophy");
careerTime = cookieCrunch.readCookieInt("careerTime");
careerCash = cookieCrunch.readCookieInt("careerCash");
careerKills = cookieCrunch.readCookieInt("careerKills");
careerScore = cookieCrunch.readCookieInt("careerScore");
careerDamage = cookieCrunch.readCookieInt("careerDamage");
trophyCount = cookieCrunch.readCookieInt("trophyCount");
fenceKills = cookieCrunch.readCookieInt("fenceKills");
turretKills = cookieCrunch.readCookieInt("turretKills");
highKills = cookieCrunch.readCookieInt("highKills");
highScore = cookieCrunch.readCookieInt("highScore");
highTime = cookieCrunch.readCookieInt("highTime");
highCash = cookieCrunch.readCookieInt("highCash");
highLvlNormal = cookieCrunch.readCookieInt("highLvlNormal");
highLvlExpert = cookieCrunch.readCookieInt("highLvlExpert");
highMultiplier = cookieCrunch.readCookieInt("highMultiplier");
currentLvl = cookieCrunch.readCookieInt("currentLvl");
currentCash = cookieCrunch.readCookieInt("currentCash");
spentCash = cookieCrunch.readCookieInt("spentCash");
lvlScore = cookieCrunch.readCookieInt("lvlScore");
gameScore = cookieCrunch.readCookieInt("gameScore");
beenStunned = cookieCrunch.readCookie("beenStunned");
beenBlasted = cookieCrunch.readCookie("beenBlasted");
beenTrapped = cookieCrunch.readCookie("beenTrapped");
beenFrozen = cookieCrunch.readCookie("beenFrozen");
beenBlinded = cookieCrunch.readCookie("beenBlinded");
blades = cookieCrunch.readCookie("blades");
rider = cookieCrunch.readCookie("rider");
fence = cookieCrunch.readCookie("fence");
turret = cookieCrunch.readCookie("turret");
sprinkler = cookieCrunch.readCookie("sprinkler");
repellent = cookieCrunch.readCookie("repellent");
health = cookieCrunch.readCookieInt("health");
totHealth = cookieCrunch.readCookieInt("totHealth");
torque = cookieCrunch.readCookieInt("torque");
thermostat = cookieCrunch.readCookieInt("thermostat");
throttle = cookieCrunch.readCookieInt("throttle");
gameModeInt = cookieCrunch.readCookieInt("gameModeInt");
if (rider == true){
riderEquipped = true;
};
if (sprinkler == true){
sprinklerEquipped = true;
};
if (fence == true){
fenceEquipped = true;
};
if (turret == true){
turretEquipped = true;
};
if (blades == true){
bladesEquipped = true;
};
if (repellent == true){
repellentEquipped = true;
};
}
public function ClearAll(_arg1:MouseEvent){
if (_arg1.target == ClearStat.yesBtn){
ClearCookies();
ClearStat.visible = false;
MenuBox.text = String("\nYour saved data has been erased.");
} else {
if (_arg1.target == ClearStat.noBtn){
ClearStat.visible = false;
};
};
}
public function ToAwards(_arg1:MouseEvent){
CleanUp();
gotoAndStop("awards");
}
function frame11(){
menuBtn.addEventListener(MouseEvent.CLICK, BackToMenuWin);
HarLink.addEventListener(MouseEvent.CLICK, ToSite3);
if ((((introIsPlaying == false)) && ((musicToggle == true)))){
scBGM = introBGM.play();
scBGM.soundTransform = volFull;
introIsPlaying = true;
introBGMTimer.start();
introBGMTimer.addEventListener(TimerEvent.TIMER, IntroBGMLoop);
};
if ((((careerCash >= 30000)) && ((HASgnomeTrophy == false)))){
HASgnomeTrophy = true;
TrophyDisplay.gotoAndStop("gnomeTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
SetCookies();
}
public function CollideEnemies(){
if ((((endGame == false)) && ((gamePaused == false)))){
i = (enemies.length - 1);
while (i >= 0) {
if (((Yard.ElectricFence.FenceLightning.hitTestPoint(enemies[i].x, enemies[i].y, true)) && ((enemies[i].splatted == false)))){
if ((enemies[i] is EnemyBoss)){
enemies[i].hits = (enemies[i].hits + 10);
} else {
if ((((enemies[i] is Enemy11)) && ((enemies[i].digging == true)))){
enemies[i].hits = (enemies[i].hits + 0);
} else {
enemies[i].splatted = true;
remainingEnemies++;
lvlKills++;
careerKills++;
fenceKills++;
enemies[i].gotoAndPlay("splat");
PtsStat.rotation = (-5 + (Math.random() * 10));
PtsStat.visible = true;
if (combo == true){
multiplier++;
comboPts = (comboPts + enemies[i].cashValue);
PtsStat.PtsBox.text = String((((((multiplier + " hits: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
} else {
multiplier = 1;
comboPts = enemies[i].cashValue;
PtsStat.PtsBox.text = String((((((multiplier + " hit: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
};
ptsTimer.stop();
ptsTimer.start();
comboTimer.stop();
combo = true;
comboTimer.start();
};
};
};
if (((((avatar.JellySac.hitTestPoint(enemies[i].x, enemies[i].y)) && ((enemies[i].splatted == false)))) && ((twirling == true)))){
enemies[i].hits = (enemies[i].hits + ((2 + attackDamage) + Math.floor((torque / 2))));
if ((enemies[i] is Enemy10)){
enemies[i].trapTimer.stop();
enemies[i].trapTimer.start();
};
enemies[i].x = (enemies[i].x + (105 * Math.cos((((2 * Math.PI) * enemies[i].rotation) / 360))));
enemies[i].y = (enemies[i].y + (105 * Math.sin((((2 * Math.PI) * enemies[i].rotation) / 360))));
} else {
if (((avatar.JellySac.hitTestPoint(enemies[i].x, enemies[i].y)) && ((enemies[i].splatted == false)))){
if ((enemies[i] is EnemyBoss)){
enemies[i].gotoAndPlay("bounced");
} else {
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (85 * Math.cos((((2 * Math.PI) * enemies[i].rotation) / 360))));
enemies[i].y = (enemies[i].y + (85 * Math.sin((((2 * Math.PI) * enemies[i].rotation) / 360))));
};
} else {
if (((((((avatar.SpinnerBlade.HitCircle2.hitTestObject(enemies[i])) || (avatar.SpinnerBlade.HitCircle.hitTestObject(enemies[i])))) || (avatar.HitCircleCenter.hitTestObject(enemies[i])))) && ((enemies[i].splatted == false)))){
if ((((enemies[i] is Enemy3)) && ((enemies[i].hits < ((55 + (speedMultiplier * 2)) * difficulty))))){
enemies[i].hits = (enemies[i].hits + (attackDamage + Math.floor((torque / 2))));
enemies[i].spikeTimer.stop();
enemies[i].spikeTimer.start();
if ((((sc3Playing == false)) && ((soundToggle == true)))){
sc3 = bounceSnd1.play();
sc3Playing = true;
sndTimer3.start();
};
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (20 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (20 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
} else {
if ((enemies[i] is Enemy5)){
if (((avatar.HitCircleCenter.hitTestObject(enemies[i].HitCircle)) || ((((torque == 8)) && ((bladesEquipped == true)))))){
if ((((sc5Playing == false)) && ((soundToggle == true)))){
sc5 = mowerSnd2.play();
sc5Playing = true;
sndTimer5.start();
};
enemies[i].gotoAndPlay("splat");
avatar.LawnMower.gotoAndPlay("runover");
enemies[i].splatted = true;
remainingEnemies++;
lvlKills++;
careerKills++;
if ((((sc2Playing == false)) && ((soundToggle == true)))){
sc2 = screamSnd5.play();
sc2Playing = true;
sndTimer2.start();
};
PtsStat.rotation = (-5 + (Math.random() * 10));
PtsStat.visible = true;
if (combo == true){
multiplier++;
comboPts = (comboPts + enemies[i].cashValue);
PtsStat.PtsBox.text = String((((((multiplier + " hits: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
} else {
multiplier = 1;
comboPts = enemies[i].cashValue;
PtsStat.PtsBox.text = String((((((multiplier + " hit: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
};
ptsTimer.stop();
ptsTimer.start();
comboTimer.stop();
combo = true;
comboTimer.start();
} else {
if (soundToggle == true){
scFull = bounceSnd2.play();
};
enemies[i].x = (enemies[i].x + (20 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (20 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
};
} else {
if ((enemies[i] is Enemy7)){
if ((((((enemies[i].indestructible == false)) || ((((torque == 8)) && ((bladesEquipped == true)))))) && ((enemies[i].hits < ((75 + (speedMultiplier * 2)) * difficulty))))){
enemies[i].hits = (enemies[i].hits + (attackDamage + Math.floor((torque / 2))));
if ((((sc3Playing == false)) && ((soundToggle == true)))){
sc3 = bounceSnd1.play();
sc3Playing = true;
sndTimer3.start();
};
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (20 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (20 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
} else {
if ((((((enemies[i].indestructible == false)) || ((((torque == 8)) && ((bladesEquipped == true)))))) && ((enemies[i].hits >= ((75 + (speedMultiplier * 2)) * difficulty))))){
if ((((sc5Playing == false)) && ((soundToggle == true)))){
sc5 = mowerSnd2.play();
sc5Playing = true;
sndTimer5.start();
};
enemies[i].gotoAndPlay("splat");
avatar.LawnMower.gotoAndPlay("runover");
enemies[i].splatted = true;
remainingEnemies++;
lvlKills++;
careerKills++;
if ((((sc2Playing == false)) && ((soundToggle == true)))){
sc2 = screamSnd7.play();
sc2Playing = true;
sndTimer2.start();
};
PtsStat.rotation = (-5 + (Math.random() * 10));
PtsStat.visible = true;
if (combo == true){
multiplier++;
comboPts = (comboPts + enemies[i].cashValue);
PtsStat.PtsBox.text = String((((((multiplier + " hits: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
} else {
multiplier = 1;
comboPts = enemies[i].cashValue;
PtsStat.PtsBox.text = String((((((multiplier + " hit: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
};
ptsTimer.stop();
ptsTimer.start();
comboTimer.stop();
combo = true;
comboTimer.start();
} else {
if (soundToggle == true){
scFull = bounceSnd2.play();
};
enemies[i].x = (enemies[i].x + (30 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (30 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
};
};
} else {
if ((((((enemies[i] is Enemy6)) && ((enemies[i].hits < ((30 + (speedMultiplier * 2)) * difficulty))))) && ((enemies[i].exploding == false)))){
enemies[i].hits = (enemies[i].hits + (attackDamage + Math.floor((torque / 2))));
if ((((sc3Playing == false)) && ((soundToggle == true)))){
sc3 = bounceSnd1.play();
sc3Playing = true;
sndTimer3.start();
};
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (20 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (20 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
} else {
if ((((enemies[i] is Enemy8)) && ((enemies[i].hits < (((70 + (speedMultiplier * 2)) + (enemies[i].fatCtr * 6)) * difficulty))))){
enemies[i].hits = (enemies[i].hits + (attackDamage + Math.floor((torque / 2))));
if ((((sc3Playing == false)) && ((soundToggle == true)))){
sc3 = bounceSnd1.play();
sc3Playing = true;
sndTimer3.start();
};
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (20 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (20 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
} else {
if ((((((enemies[i] is Enemy9)) && ((enemies[i].hits < ((50 + (speedMultiplier * 2)) * difficulty))))) && ((enemies[i].exploding == false)))){
enemies[i].hits = (enemies[i].hits + (attackDamage + Math.floor((torque / 2))));
if ((((sc3Playing == false)) && ((soundToggle == true)))){
sc3 = bounceSnd1.play();
sc3Playing = true;
sndTimer3.start();
};
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (20 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (20 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
} else {
if ((((enemies[i] is Enemy10)) && ((enemies[i].hits < ((55 + (speedMultiplier * 2)) * difficulty))))){
enemies[i].hits = (enemies[i].hits + (attackDamage + Math.floor((torque / 2))));
enemies[i].trapTimer.stop();
enemies[i].trapTimer.start();
if ((((sc3Playing == false)) && ((soundToggle == true)))){
sc3 = bounceSnd1.play();
sc3Playing = true;
sndTimer3.start();
};
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (20 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (20 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
} else {
if ((enemies[i] is Enemy11)){
if (((((avatar.HitCircleCenter.hitTestObject(enemies[i].HitCircle)) || ((((torque == 8)) && ((bladesEquipped == true)))))) && (!((enemies[i].currentFrame == 26))))){
if (enemies[i].hits < ((75 + (speedMultiplier * 2)) * difficulty)){
enemies[i].hits = (enemies[i].hits + (attackDamage + Math.floor((torque / 2))));
if ((((sc3Playing == false)) && ((soundToggle == true)))){
sc3 = bounceSnd1.play();
sc3Playing = true;
sndTimer3.start();
};
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (20 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (20 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
} else {
if (enemies[i].hits >= ((75 + (speedMultiplier * 2)) * difficulty)){
if ((((sc5Playing == false)) && ((soundToggle == true)))){
sc5 = mowerSnd2.play();
sc5Playing = true;
sndTimer5.start();
};
enemies[i].gotoAndPlay("splat");
avatar.LawnMower.gotoAndPlay("runover");
enemies[i].splatted = true;
enemies[i].emergeTimer.stop();
enemies[i].digTimer.stop();
remainingEnemies++;
lvlKills++;
careerKills++;
if ((((sc2Playing == false)) && ((soundToggle == true)))){
sc2 = screamSnd11.play();
sc2Playing = true;
sndTimer2.start();
};
PtsStat.rotation = (-5 + (Math.random() * 10));
PtsStat.visible = true;
if (combo == true){
multiplier++;
comboPts = (comboPts + enemies[i].cashValue);
PtsStat.PtsBox.text = String((((((multiplier + " hits: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
} else {
multiplier = 1;
comboPts = enemies[i].cashValue;
PtsStat.PtsBox.text = String((((((multiplier + " hit: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
};
ptsTimer.stop();
ptsTimer.start();
comboTimer.stop();
combo = true;
comboTimer.start();
};
};
} else {
if (enemies[i].currentFrame != 26){
if (soundToggle == true){
scFull = bounceSnd2.play();
};
enemies[i].x = (enemies[i].x + (30 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (30 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
};
};
} else {
if ((enemies[i] is EnemyBoss)){
if (((enemies[i].freezeFire.hitTestPoint(avatar.x, avatar.y)) && ((enemies[i].freezeFire.visible == true)))){
frozen = true;
beenFrozen = true;
avatar.JellySac.gotoAndStop("frozen");
frozenTimer.start();
} else {
if (((avatar.HitCircleCenter.hitTestObject(enemies[i].HitCircle)) && ((enemies[i].zooming == true)))){
if (soundToggle == true){
scFull = bounceSnd2.play();
};
} else {
if (((((((((((((avatar.HitCircleCenter.hitTestObject(enemies[i].HitCircle)) && ((enemies[i].hits < 2975)))) && ((enemies[i].zooming == false)))) && ((frozen == false)))) && ((stunned == false)))) && ((trapped == false)))) && ((endGame == false)))){
enemies[i].hits = (enemies[i].hits + (attackDamage + Math.floor((torque / 2))));
BossLife.HP.text = String(((2975 - enemies[i].hits) + "/2975 HP"));
if ((((sc3Playing == false)) && ((soundToggle == true)))){
sc3 = bounceSnd1.play();
sc3Playing = true;
sndTimer3.start();
};
enemies[i].gotoAndPlay("bounced");
enemies[i].x = (enemies[i].x + (30 * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
enemies[i].y = (enemies[i].y + (30 * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
} else {
if (((((((((((avatar.HitCircleCenter.hitTestObject(enemies[i].HitCircle)) && ((enemies[i].hits >= 2975)))) && ((enemies[i].zooming == false)))) && ((frozen == false)))) && ((stunned == false)))) && ((trapped == false)))){
if ((((sc5Playing == false)) && ((soundToggle == true)))){
sc5 = mowerSnd2.play();
sc5Playing = true;
sndTimer5.start();
};
BossLife.visible = false;
enemies[i].gotoAndPlay("splat");
avatar.LawnMower.gotoAndPlay("runover");
enemies[i].splatted = true;
remainingEnemies++;
lvlKills++;
careerKills++;
bossDead = true;
if (HASbhemothTrophy == false){
HASbhemothTrophy = true;
TrophyDisplay.gotoAndStop("bhemothTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
if (soundToggle == true){
scFull = screamSndBoss.play();
};
PtsStat.rotation = (-5 + (Math.random() * 10));
PtsStat.visible = true;
if (combo == true){
multiplier++;
comboPts = (comboPts + enemies[i].cashValue);
PtsStat.PtsBox.text = String((((((multiplier + " hits: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
} else {
multiplier = 1;
comboPts = enemies[i].cashValue;
PtsStat.PtsBox.text = String((((((multiplier + " hit: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
};
ptsTimer.stop();
ptsTimer.start();
comboTimer.stop();
combo = true;
comboTimer.start();
} else {
enemies[i].x = (enemies[i].x + 0);
};
};
};
};
} else {
if ((((sc5Playing == false)) && ((soundToggle == true)))){
sc5 = mowerSnd2.play();
sc5Playing = true;
sndTimer5.start();
};
enemies[i].gotoAndPlay("splat");
avatar.LawnMower.gotoAndPlay("runover");
enemies[i].splatted = true;
remainingEnemies++;
lvlKills++;
careerKills++;
if ((((((enemies[i] is Enemy1)) && ((sc2Playing == false)))) && ((soundToggle == true)))){
sc2 = screamSnd1.play();
sc2Playing = true;
sndTimer2.start();
} else {
if ((((((enemies[i] is Enemy2)) && ((sc2Playing == false)))) && ((soundToggle == true)))){
sc2 = screamSnd2.play();
sc2Playing = true;
sndTimer2.start();
} else {
if ((((((enemies[i] is Enemy3)) && ((sc1Playing == false)))) && ((soundToggle == true)))){
sc1 = screamSnd3.play();
sc1Playing = true;
sndTimer1.start();
} else {
if ((((((enemies[i] is Enemy4)) && ((sc1Playing == false)))) && ((soundToggle == true)))){
sc1 = screamSnd4.play();
sc1Playing = true;
sndTimer1.start();
} else {
if ((((((enemies[i] is Enemy6)) && ((sc1Playing == false)))) && ((soundToggle == true)))){
sc1 = screamSnd6.play();
sc1Playing = true;
sndTimer1.start();
} else {
if ((((((enemies[i] is Enemy8)) && ((sc1Playing == false)))) && ((soundToggle == true)))){
sc1 = screamSnd10.play();
sc1Playing = true;
sndTimer1.start();
} else {
if ((((((enemies[i] is Enemy9)) && ((sc1Playing == false)))) && ((soundToggle == true)))){
sc1 = screamSnd8.play();
sc1Playing = true;
sndTimer1.start();
} else {
if ((((((enemies[i] is Enemy10)) && ((sc1Playing == false)))) && ((soundToggle == true)))){
sc1 = screamSnd9.play();
sc1Playing = true;
sndTimer1.start();
};
};
};
};
};
};
};
};
PtsStat.rotation = (-5 + (Math.random() * 10));
PtsStat.visible = true;
if (combo == true){
multiplier++;
comboPts = (comboPts + enemies[i].cashValue);
PtsStat.PtsBox.text = String((((((multiplier + " hits: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
} else {
multiplier = 1;
comboPts = enemies[i].cashValue;
PtsStat.PtsBox.text = String((((((multiplier + " hit: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
};
ptsTimer.stop();
ptsTimer.start();
comboTimer.stop();
combo = true;
comboTimer.start();
};
};
};
};
};
};
};
};
};
};
};
};
i--;
};
i = (traps.length - 1);
while (i >= 0) {
if (avatar.JellySac.hitTestPoint(traps[i].x, traps[i].y)){
avatar.JellySac.gotoAndStop("trapped");
if (soundToggle == true){
scFull = trapSlapSnd.play();
};
trapped = true;
beenTrapped = true;
trappedTimer.start();
avatar.x = traps[i].x;
avatar.y = traps[i].y;
traps[i].sprung = true;
Yard.FootprintArea.removeChild(traps[i]);
traps.splice(i, 1);
break;
};
j = (enemies.length - 1);
while (j >= 0) {
if (((traps[i].hitTestPoint(enemies[j].x, enemies[j].y)) && ((enemies[j].splatted == false)))){
if ((enemies[j] is Enemy10)){
enemies[j].trappedState = enemies[j].trappedState;
} else {
if ((((((enemies[j] is Enemy6)) || ((enemies[j] is Enemy9)))) && ((enemies[j].exploding == true)))){
enemies[j].trappedState = enemies[j].trappedState;
} else {
if ((enemies[j] is EnemyBoss)){
enemies[j].trappedState = enemies[j].trappedState;
} else {
if (soundToggle == true){
scFull = trapSlapSnd.play();
};
enemies[j].trappedState = true;
enemies[j].x = traps[i].x;
enemies[j].y = traps[i].y;
enemies[j].slowTimer.stop();
enemies[j].slowTimer.start();
enemies[j].TrapBlob.visible = true;
traps[i].sprung = true;
Yard.FootprintArea.removeChild(traps[i]);
traps.splice(i, 1);
break;
};
};
};
};
j--;
};
i--;
};
};
}
public function NewTime(_arg1:MouseEvent){
CleanUp();
MovieClip(root).gameMode = "time";
gotoAndStop("play");
introIsPlaying = false;
introBGMTimer.stop();
scBGM.stop();
}
public function SpawnFunction(_arg1:TimerEvent){
if ((((gamePaused == false)) && ((endGame == false)))){
spawnCtr++;
if (spawnCtr >= 28){
spawnCtr = 0;
if (spawnRate > 1000){
spawnRate = (spawnRate - 100);
} else {
spawnRate = 1000;
};
spawnRelease++;
if (gameMode == "time"){
newEnemyTimer.removeEventListener(TimerEvent.TIMER, NewEnemySet);
newEnemyTimer.stop();
newEnemyTimer = new Timer(spawnRate);
newEnemyTimer.addEventListener(TimerEvent.TIMER, NewEnemySet);
newEnemyTimer.start();
};
};
};
}
public function ToSite(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://hotairraccoon.com/");
navigateToURL(_local2);
}
function frame10(){
currentCash = (currentCash + lvlCash);
careerCash = (careerCash + lvlCash);
LvlEarningsBox.text = String(("$" + lvlCash));
LoseCashBox.text = String(("$" + currentCash));
LoseScoreBox.text = String((lvlScore + " pts."));
CompleteDeath.gotoAndStop((currentLvl - 1));
menuBtn2.addEventListener(MouseEvent.CLICK, BackToMenuLvl);
shopBtn.addEventListener(MouseEvent.CLICK, ToShop2);
continueBtn.addEventListener(MouseEvent.CLICK, NextLvl);
if ((((introIsPlaying == false)) && ((musicToggle == true)))){
scBGM = introBGM.play();
scBGM.soundTransform = volFull;
introIsPlaying = true;
introBGMTimer.start();
introBGMTimer.addEventListener(TimerEvent.TIMER, IntroBGMLoop);
};
if ((((careerCash >= 30000)) && ((HASgnomeTrophy == false)))){
HASgnomeTrophy = true;
TrophyDisplay.gotoAndStop("gnomeTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
SetCookies();
}
public function snd5Func(_arg1:TimerEvent){
if ((((((soundToggle == true)) && ((endGame == false)))) && ((gamePaused == false)))){
sndCtr++;
volTransform5.volume = (volTransform5.volume - 0.05);
if (sndCtr >= 10){
if (sc5 != null){
sc5.stop();
};
volTransform5.volume = 0.5;
sc5Playing = false;
sndTimer5.stop();
sndCtr = 0;
};
};
}
public function LoopGame(_arg1:Event){
var _local2:int;
if ((((((((((twirling == false)) && ((stunned == false)))) && ((frozen == false)))) && ((trapped == false)))) && ((endGame == false)))){
avatar.rotation = (((180 / Math.PI) * Math.atan2((avatar.y - mouseY), (avatar.x - mouseX))) + 180);
};
if (((((((avatar.JellySac.hitTestObject(cursor)) || ((stunned == true)))) || ((frozen == true)))) || ((trapped == true)))){
_local2 = 1;
} else {
if (avatar.hitTestObject(House)){
avatar.x = (avatar.x + ((mowerSpeed * (9 + (throttle * 1.5))) * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
avatar.y = 370;
} else {
if ((((twirling == false)) && ((endGame == false)))){
avatar.x = (avatar.x + ((mowerSpeed * (9 + (throttle * 1.5))) * Math.cos((((2 * Math.PI) * avatar.rotation) / 360))));
avatar.y = (avatar.y + ((mowerSpeed * (9 + (throttle * 1.5))) * Math.sin((((2 * Math.PI) * avatar.rotation) / 360))));
};
};
};
cursor.x = mouseX;
cursor.y = mouseY;
if ((((((((((accelerating == true)) && ((stunned == false)))) && ((trapped == false)))) && ((frozen == false)))) && ((endGame == false)))){
twirling = true;
if (twirl < 70){
twirl = (twirl + 10);
} else {
twirl = 70;
};
avatar.rotation = (avatar.rotation + twirl);
} else {
if ((((twirl > 20)) && ((twirling == true)))){
twirl = (twirl - 6);
avatar.rotation = (avatar.rotation + twirl);
} else {
twirling = false;
twirl = 10;
};
};
avatar.SpinnerBlade.rotation = (avatar.SpinnerBlade.rotation + 80);
MoveEnemies();
CollideEnemies();
if (health < 0){
health = 0;
};
if (sc1 != null){
sc1.soundTransform = volTransform;
};
if (sc2 != null){
sc2.soundTransform = volTransform2;
};
if (sc3 != null){
sc3.soundTransform = volTransform;
};
if (sc5 != null){
sc5.soundTransform = volTransform5;
};
if (scFull != null){
scFull.soundTransform = volFull;
};
if (scTwirl != null){
scTwirl.soundTransform = volTwirl;
};
if (scBoss != null){
scBoss.soundTransform = volTransform;
};
UpdateInfo();
}
public function OutMouse4(_arg1:MouseEvent){
TuneUpCheck();
}
public function SendToKong(){
var _local1:int;
var _local2:int;
var _local3:int;
if (HASeasyTrophy == true){
_local2 = 1;
} else {
_local2 = 0;
};
if (HAShardTrophy == true){
_local1 = 1;
} else {
_local1 = 0;
};
if (rider == true){
_local3 = 1;
} else {
_local3 = 0;
};
if (kongregate.connected){
kongregate.stats.submit("HighScore", highScore);
kongregate.stats.submit("GameCompletedNORMAL", _local2);
kongregate.stats.submit("GameCompletedEXPERT", _local1);
kongregate.stats.submit("CurrentLevel", currentLvl);
kongregate.stats.submit("TotalKills", careerKills);
kongregate.stats.submit("TotalCashEarned", careerCash);
kongregate.stats.submit("hasRidingMower", _local3);
kongregate.stats.submit("trophyCount", trophyCount);
kongregate.stats.submit("Torque", torque);
kongregate.stats.submit("Thermostat", thermostat);
kongregate.stats.submit("Throttle", throttle);
};
}
public function UpdateInfo(){
if ((((endGame == false)) && ((gamePaused == false)))){
if (gameMode == "time"){
KillsBox.text = String(("Kills: " + lvlKills));
if ((((lvlKills >= 500)) && ((HASthumbTrophy == false)))){
HASthumbTrophy = true;
TrophyDisplay.gotoAndStop("thumbTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
} else {
if (bossPlaced == true){
KillsBox.text = String("Kill the Boss to win!");
} else {
KillsBox.text = String(((("Enemies Left: " + (Math.floor((storyKills[(currentLvl - 1)] * difficulty)) - remainingEnemies)) + "/") + Math.floor((storyKills[(currentLvl - 1)] * difficulty))));
};
};
HealthStat.HealthBox.text = String((health + "%"));
SpecStat.HealthBox.text = String((power + "%"));
CashStat.HealthBox.text = String(currentCash);
if ((((((health <= 0)) && ((endGame == false)))) && ((completeCtr == 0)))){
endGame = true;
parent.removeChild(cursor);
gameLoseTimer.addEventListener(TimerEvent.TIMER, GameLose);
gameLoseTimer.start();
} else {
if (health < 10){
Yard.YardArea.gotoAndStop(10);
} else {
if (health < 20){
Yard.YardArea.gotoAndStop(9);
} else {
if (health < 30){
Yard.YardArea.gotoAndStop(8);
} else {
if (health < 40){
Yard.YardArea.gotoAndStop(7);
} else {
if (health < 50){
Yard.YardArea.gotoAndStop(6);
} else {
if (health < 60){
Yard.YardArea.gotoAndStop(5);
} else {
if (health < 70){
Yard.YardArea.gotoAndStop(4);
} else {
if (health < 80){
Yard.YardArea.gotoAndStop(3);
} else {
if (health < 90){
Yard.YardArea.gotoAndStop(2);
} else {
Yard.YardArea.gotoAndStop(1);
};
};
};
};
};
};
};
};
};
};
if ((((((((((((beenStunned == true)) && ((beenBlasted == true)))) && ((beenTrapped == true)))) && ((beenFrozen == true)))) && ((beenBlinded == true)))) && ((HASpurpleTrophy == false)))){
HASpurpleTrophy = true;
TrophyDisplay.gotoAndStop("purpleTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
if ((((turretKills >= 100)) && ((HASdogtagTrophy == false)))){
HASdogtagTrophy = true;
TrophyDisplay.gotoAndStop("dogtagTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
};
if (((((!((gameMode == "time"))) && ((remainingEnemies >= Math.floor((storyKills[(currentLvl - 1)] * difficulty)))))) && ((health > 0)))){
if (currentLvl < 21){
endGame = true;
LvlComplete();
} else {
if ((((currentLvl == 21)) && ((bossPlaced == false)))){
BossSet();
};
};
};
if ((((((bossDead == true)) && ((endGame == false)))) && ((health > 0)))){
endGame = true;
BlindBox.alpha = 0;
gameCompleteTimer.addEventListener(TimerEvent.TIMER, GameComplete);
gameCompleteTimer.start();
};
}
public function InitGame(){
Yard.Repellent.visible = false;
BlindBox.alpha = 0;
DeadBox.alpha = 0;
BossLife.visible = false;
Turret.visible = false;
Yard.Sprinkler.visible = false;
Yard.ElectricFence.visible = false;
stunned = false;
frozen = false;
trapped = false;
if (totHealth < 100){
totHealth = 100;
};
health = totHealth;
lvlCash = 0;
lvlKills = 0;
lvlTime = 0;
remainingEnemies = 0;
bossPlaced = false;
bossDead = false;
minCtr = 0;
timeCtr = 0;
tctr = 0;
spawnRelease = 0;
speedMultiplier = 0;
HealthStat.HealthBox.text = String((health + "%"));
SpecStat.HealthBox.text = String((power + "%"));
CashStat.HealthBox.text = String(currentCash);
PtsStat.visible = false;
CurrentPts.visible = false;
PauseBox.gotoAndStop("newlevel");
PauseBox.visible = true;
PauseBox.TipBox.gotoAndStop(Math.ceil((Math.random() * 50)));
if (soundToggle == true){
volTransform.volume = 0.5;
volTransform2.volume = 0.2;
volTransform3.volume = 0.2;
volTransform5.volume = 0.5;
volFull.volume = 1;
volTwirl.volume = 1;
};
if (musicToggle == true){
volTransformBGM.volume = 0.1;
};
if (Math.random() < 0.5){
BGMTimer.addEventListener(TimerEvent.TIMER, BGMLoop);
BGMTimer.start();
scBGM = BGM.play();
} else {
BGMTimer2.addEventListener(TimerEvent.TIMER, BGMLoop2);
BGMTimer2.start();
scBGM = BGM2.play();
};
scBGM.soundTransform = volTransformBGM;
PauseBox.addEventListener(MouseEvent.CLICK, ResumeFunction);
if (gameMode == "continue"){
if (gameModeInt == 1){
gameMode = "normal";
} else {
if (gameModeInt == 2){
gameMode = "expert";
};
};
lvlScore = 0;
} else {
lvlScore = 0;
};
if (gameMode == "time"){
storyPlaying = false;
lvlTime = 0;
} else {
storyPlaying = true;
};
if (gameMode == "normal"){
gameModeInt = 1;
difficulty = 1;
} else {
if (gameMode == "expert"){
flawlessLvl = true;
gameModeInt = 2;
difficulty = 1.5;
} else {
if (gameMode == "time"){
difficulty = 1.5;
};
};
};
}
public function PauseBoxUpdate(){
if (sprinklerEquipped == true){
PauseBox.SprinklerCheck.gotoAndStop(2);
} else {
if (sprinkler == false){
PauseBox.SprinklerCheck.gotoAndStop(3);
} else {
PauseBox.SprinklerCheck.gotoAndStop(1);
};
};
if (bladesEquipped == true){
PauseBox.BladesCheck.gotoAndStop(2);
} else {
if (blades == false){
PauseBox.BladesCheck.gotoAndStop(3);
} else {
PauseBox.BladesCheck.gotoAndStop(1);
};
};
if (turretEquipped == true){
PauseBox.TurretCheck.gotoAndStop(2);
} else {
if (turret == false){
PauseBox.TurretCheck.gotoAndStop(3);
} else {
PauseBox.TurretCheck.gotoAndStop(1);
};
};
if (fenceEquipped == true){
PauseBox.FenceCheck.gotoAndStop(2);
} else {
if (fence == false){
PauseBox.FenceCheck.gotoAndStop(3);
} else {
PauseBox.FenceCheck.gotoAndStop(1);
};
};
if (riderEquipped == true){
PauseBox.RiderCheck.gotoAndStop(2);
} else {
if (rider == false){
PauseBox.RiderCheck.gotoAndStop(3);
} else {
PauseBox.RiderCheck.gotoAndStop(1);
};
};
if (repellentEquipped == true){
PauseBox.RepellentCheck.gotoAndStop(2);
} else {
if (repellent == false){
PauseBox.RepellentCheck.gotoAndStop(3);
} else {
PauseBox.RepellentCheck.gotoAndStop(1);
};
};
}
public function NewGame(_arg1:MouseEvent){
DifficultyStat.visible = true;
}
public function snd3Func(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
sc3Playing = false;
sndTimer3.stop();
};
}
public function TimeFunction(_arg1:TimerEvent){
if ((((gamePaused == false)) && ((endGame == false)))){
if (timeCtr == 599){
timeCtr = 0;
minCtr++;
if ((((((gameMode == "time")) && ((minCtr >= 2)))) && ((HAStimeTrophy3 == false)))){
HAStimeTrophy3 = true;
TrophyDisplay.gotoAndStop("timeTrophy3");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((((gameMode == "time")) && ((minCtr >= 3)))) && ((HAStimeTrophy2 == false)))){
HAStimeTrophy2 = true;
TrophyDisplay.gotoAndStop("timeTrophy2");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((((gameMode == "time")) && ((minCtr >= 5)))) && ((HAStimeTrophy1 == false)))){
HAStimeTrophy1 = true;
TrophyDisplay.gotoAndStop("timeTrophy1");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
};
};
} else {
timeCtr++;
};
if (tctr == 9){
ScoreGame((1 + minCtr));
lvlTime++;
tctr = 0;
InfoStat.TimeBox.text = String((((minCtr + " min. ") + (timeCtr / 10)) + ".0 sec."));
} else {
tctr++;
InfoStat.TimeBox.text = String((((minCtr + " min. ") + (timeCtr / 10)) + " sec."));
};
if (CurrentPts.visible == true){
CurrentPts.y = (CurrentPts.y - 3);
CurrentPts.alpha = (CurrentPts.alpha - 0.05);
};
};
}
public function OutMouse(_arg1:MouseEvent){
if (_arg1.target == DifficultyStat.NormBtn){
DifficultyStat.DifficultyBox.text = String("");
} else {
if (_arg1.target == DifficultyStat.ExpertBtn){
DifficultyStat.DifficultyBox.text = String("");
};
};
}
public function ToShop2(_arg1:MouseEvent){
gotoAndStop("shop");
}
public function BlindFunction(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
blindCtr++;
if (BlindBox.alpha < 1){
BlindBox.alpha = (BlindBox.alpha + 0.5);
};
if (blindCtr >= 2){
blindCtr = 0;
BlindBox.alpha = 1;
blindTimer.stop();
unblindTimer.start();
beenBlinded = true;
};
};
}
public function snd2Func(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
sc2Playing = false;
sndTimer2.stop();
};
}
public function GameLose(_arg1:TimerEvent){
deadCtr++;
DeadBox.alpha = (DeadBox.alpha + 0.05);
if (deadCtr >= 20){
endGame = false;
storyPlaying = false;
stunned = false;
frozen = false;
trapped = false;
deadCtr = 0;
gameLoseTimer.stop();
gameLoseTimer.removeEventListener(TimerEvent.TIMER, GameLose);
ScoreGame((comboPts * multiplier));
if (multiplier > highMultiplier){
highMultiplier = multiplier;
};
if ((((multiplier > 30)) && ((HASboomerangTrophy == false)))){
HASboomerangTrophy = true;
TrophyDisplay.gotoAndStop("boomerangTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
comboPts = 0;
multiplier = 0;
accelerating = false;
power = totPower;
health = totHealth;
sc1.stop();
sc2.stop();
sc3.stop();
sc5.stop();
scTwirl.stop();
scFull.stop();
scBoss.stop();
scTurret.stop();
scEarRing.stop();
if (enemies.length > 0){
i = (enemies.length - 1);
while (i >= 0) {
if ((enemies[i] is Enemy6)){
if (enemies[i].exploding == false){
enemies[i].splatted = true;
Yard.removeChild(enemies[i]);
enemies.splice(i, 1);
};
} else {
enemies[i].splatted = true;
Yard.removeChild(enemies[i]);
enemies.splice(i, 1);
};
i--;
};
};
if (spikes.length > 0){
i = (spikes.length - 1);
while (i >= 0) {
Yard.removeChild(spikes[i]);
spikes.splice(i, 1);
i--;
};
};
if (traps.length > 0){
i = (traps.length - 1);
while (i >= 0) {
traps[i].sprung = true;
Yard.FootprintArea.removeChild(traps[i]);
traps.splice(i, 1);
i--;
};
};
stage.removeEventListener(Event.ENTER_FRAME, LoopGame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, DownMouse);
stage.removeEventListener(MouseEvent.MOUSE_UP, UpMouse);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, PauseFunction);
PauseBox.removeEventListener(MouseEvent.CLICK, ResumeFunction);
if (gameMode == "time"){
newEnemyTimer.removeEventListener(TimerEvent.TIMER, NewEnemySet);
newEnemyTimer.stop();
} else {
storyEnemyTimer.removeEventListener(TimerEvent.TIMER, StoryEnemySet);
storyEnemyTimer.stop();
};
if (sprinklerEquipped == true){
parent.removeChild(w);
};
powerTimer.removeEventListener(TimerEvent.TIMER, PowerFunction);
powerTimer.stop();
spawnTimer.removeEventListener(TimerEvent.TIMER, SpawnFunction);
spawnTimer.stop();
ptsTimer.removeEventListener(TimerEvent.TIMER, PtsFunction);
ptsTimer.stop();
comboTimer.removeEventListener(TimerEvent.TIMER, ComboFunction);
comboTimer.stop();
BGMTimer.removeEventListener(TimerEvent.TIMER, BGMLoop);
BGMTimer.stop();
BGMTimer2.removeEventListener(TimerEvent.TIMER, BGMLoop2);
BGMTimer2.stop();
yardTimer.removeEventListener(TimerEvent.TIMER, YardCheck);
yardTimer.stop();
scBGM.stop();
sndTimer1.removeEventListener(TimerEvent.TIMER, snd1Func);
sndTimer2.removeEventListener(TimerEvent.TIMER, snd2Func);
sndTimer3.removeEventListener(TimerEvent.TIMER, snd3Func);
sndTimer5.removeEventListener(TimerEvent.TIMER, snd5Func);
timeTimer.removeEventListener(TimerEvent.TIMER, TimeFunction);
timeTimer.stop();
fenceTimer.removeEventListener(TimerEvent.TIMER, FenceFunction);
fenceTimer.stop();
turretTimer.removeEventListener(TimerEvent.TIMER, TurretFunction);
turretTimer.stop();
blindTimer.removeEventListener(TimerEvent.TIMER, BlindFunction);
unblindTimer.removeEventListener(TimerEvent.TIMER, UnblindFunction);
blindTimer.stop();
unblindTimer.stop();
Mouse.show();
if (lvlScore > highScore){
highScore = lvlScore;
};
if (gameScore > highScore){
highScore = gameScore;
};
if (lvlKills > highKills){
highKills = lvlKills;
};
if ((((lvlTime > highTime)) && ((gameMode == "time")))){
highTime = lvlTime;
};
if (lvlCash > highCash){
highCash = lvlCash;
};
if ((((currentLvl > highLvlNormal)) && ((gameMode == "normal")))){
highLvlNormal = currentLvl;
};
if ((((currentLvl > highLvlExpert)) && ((gameMode == "expert")))){
highLvlExpert = currentLvl;
};
if (repellentEquipped == true){
repellent = false;
repellentEquipped = false;
};
SetCookies();
SendToKong();
gotoAndStop("lose");
};
}
public function TrophyStatus(){
if (HASeTrophy1 == true){
eTrophy1.gotoAndStop(3);
} else {
eTrophy1.gotoAndStop(1);
};
if (HASeTrophy2 == true){
eTrophy2.gotoAndStop(3);
} else {
eTrophy2.gotoAndStop(1);
};
if (HASeTrophy3 == true){
eTrophy3.gotoAndStop(3);
} else {
eTrophy3.gotoAndStop(1);
};
if (HASeTrophy4 == true){
eTrophy4.gotoAndStop(3);
} else {
eTrophy4.gotoAndStop(1);
};
if (HASeTrophy5 == true){
eTrophy5.gotoAndStop(3);
} else {
eTrophy5.gotoAndStop(1);
};
if (HASeTrophy6 == true){
eTrophy6.gotoAndStop(3);
} else {
eTrophy6.gotoAndStop(1);
};
if (HASeTrophy7 == true){
eTrophy7.gotoAndStop(3);
} else {
eTrophy7.gotoAndStop(1);
};
if (HASeTrophy8 == true){
eTrophy8.gotoAndStop(3);
} else {
eTrophy8.gotoAndStop(1);
};
if (HASeTrophy9 == true){
eTrophy9.gotoAndStop(3);
} else {
eTrophy9.gotoAndStop(1);
};
if (HASeTrophy10 == true){
eTrophy10.gotoAndStop(3);
} else {
eTrophy10.gotoAndStop(1);
};
if (HASeTrophy11 == true){
eTrophy11.gotoAndStop(3);
} else {
eTrophy11.gotoAndStop(1);
};
if (HASeTrophy12 == true){
eTrophy12.gotoAndStop(3);
} else {
eTrophy12.gotoAndStop(1);
};
if (HASriderTrophy == true){
riderTrophy.gotoAndStop(3);
} else {
riderTrophy.gotoAndStop(1);
};
if (HASgrassTrophy == true){
grassTrophy.gotoAndStop(3);
} else {
grassTrophy.gotoAndStop(1);
};
if (HASeasyTrophy == true){
easyTrophy.gotoAndStop(3);
} else {
easyTrophy.gotoAndStop(1);
};
if (HAShardTrophy == true){
hardTrophy.gotoAndStop(3);
} else {
hardTrophy.gotoAndStop(1);
};
if (HASbhemothTrophy == true){
bhemothTrophy.gotoAndStop(3);
} else {
bhemothTrophy.gotoAndStop(1);
};
if (HASclockTrophy == true){
clockTrophy.gotoAndStop(3);
} else {
clockTrophy.gotoAndStop(1);
};
if (HAStimeTrophy1 == true){
timeTrophy1.gotoAndStop(3);
} else {
timeTrophy1.gotoAndStop(1);
};
if (HAStimeTrophy2 == true){
timeTrophy2.gotoAndStop(3);
} else {
timeTrophy2.gotoAndStop(1);
};
if (HAStimeTrophy3 == true){
timeTrophy3.gotoAndStop(3);
} else {
timeTrophy3.gotoAndStop(1);
};
if (HASthumbTrophy == true){
thumbTrophy.gotoAndStop(3);
} else {
thumbTrophy.gotoAndStop(1);
};
if (HASgnomeTrophy == true){
gnomeTrophy.gotoAndStop(3);
} else {
gnomeTrophy.gotoAndStop(1);
};
if (HASlicenseTrophy == true){
licenseTrophy.gotoAndStop(3);
} else {
licenseTrophy.gotoAndStop(1);
};
if (HASdogtagTrophy == true){
dogtagTrophy.gotoAndStop(3);
} else {
dogtagTrophy.gotoAndStop(1);
};
if (HASpurpleTrophy == true){
purpleTrophy.gotoAndStop(3);
} else {
purpleTrophy.gotoAndStop(1);
};
if (HASorderTrophy == true){
orderTrophy.gotoAndStop(3);
} else {
orderTrophy.gotoAndStop(1);
};
if (HASboomerangTrophy == true){
boomerangTrophy.gotoAndStop(3);
} else {
boomerangTrophy.gotoAndStop(1);
};
if (HASdiamondTrophy == true){
diamondTrophy.gotoAndStop(3);
} else {
diamondTrophy.gotoAndStop(1);
};
}
public function CleanUp(){
stage.removeEventListener(MouseEvent.MOUSE_OVER, OverMouse);
stage.removeEventListener(MouseEvent.MOUSE_OUT, OutMouse);
}
public function ToStats(_arg1:MouseEvent){
CleanUp();
gotoAndStop("stats");
}
public function snd1Func(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
sc1Playing = false;
sndTimer1.stop();
};
}
public function OptionOver(_arg1:MouseEvent){
if (_arg1.target == soundBtn){
if (soundToggle == true){
soundBtn.gotoAndStop("onOVER");
} else {
soundBtn.gotoAndStop("offOVER");
};
if (currentFrame == 3){
Mouse.show();
if (cursor != null){
cursor.visible = false;
};
};
} else {
if (_arg1.target == musicBtn){
if (musicToggle == true){
musicBtn.gotoAndStop("onOVER");
} else {
musicBtn.gotoAndStop("offOVER");
};
if (currentFrame == 3){
Mouse.show();
if (cursor != null){
cursor.visible = false;
};
};
};
};
}
public function ComboFunction(_arg1:TimerEvent){
ScoreGame((comboPts * multiplier));
if (multiplier > highMultiplier){
highMultiplier = multiplier;
};
if ((((multiplier > 30)) && ((HASboomerangTrophy == false)))){
HASboomerangTrophy = true;
TrophyDisplay.gotoAndStop("boomerangTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
combo = false;
if ((comboPts * multiplier) > 0){
recentScore = (comboPts * multiplier);
CurrentPts.visible = true;
CurrentPts.alpha = 1;
CurrentPts.y = 380;
CurrentPts.rotation = (-5 + (Math.random() * 10));
CurrentPts.CurrentPtsBox.text = String(("+" + recentScore));
};
comboPts = 0;
}
public function GameComplete(_arg1:TimerEvent){
completeCtr++;
BlindBox.alpha = (BlindBox.alpha + 0.05);
if (completeCtr >= 20){
storyPlaying = false;
endGame = false;
stunned = false;
frozen = false;
trapped = false;
sc1.stop();
sc2.stop();
sc3.stop();
sc5.stop();
scTwirl.stop();
scFull.stop();
scBoss.stop();
scTurret.stop();
scEarRing.stop();
health = totHealth;
power = totPower;
ScoreGame((comboPts * multiplier));
if (multiplier > highMultiplier){
highMultiplier = multiplier;
};
if ((((multiplier > 30)) && ((HASboomerangTrophy == false)))){
HASboomerangTrophy = true;
TrophyDisplay.gotoAndStop("boomerangTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
completeCtr = 0;
gameCompleteTimer.stop();
gameCompleteTimer.removeEventListener(TimerEvent.TIMER, GameComplete);
if (enemies.length > 0){
i = (enemies.length - 1);
while (i >= 0) {
if ((enemies[i] is Enemy6)){
if (enemies[i].exploding == false){
enemies[i].splatted = true;
Yard.removeChild(enemies[i]);
enemies.splice(i, 1);
};
} else {
enemies[i].splatted = true;
Yard.removeChild(enemies[i]);
enemies.splice(i, 1);
};
i--;
};
};
if (spikes.length > 0){
i = (spikes.length - 1);
while (i >= 0) {
Yard.removeChild(spikes[i]);
spikes.splice(i, 1);
i--;
};
};
if (traps.length > 0){
i = (traps.length - 1);
while (i >= 0) {
traps[i].sprung = true;
Yard.FootprintArea.removeChild(traps[i]);
traps.splice(i, 1);
i--;
};
};
if (sprinklerEquipped == true){
parent.removeChild(w);
};
stage.removeEventListener(Event.ENTER_FRAME, LoopGame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, DownMouse);
stage.removeEventListener(MouseEvent.MOUSE_UP, UpMouse);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, PauseFunction);
PauseBox.removeEventListener(MouseEvent.CLICK, ResumeFunction);
if ((((gameMode == "expert")) || ((gameMode == "normal")))){
storyEnemyTimer.removeEventListener(TimerEvent.TIMER, StoryEnemySet);
storyEnemyTimer.stop();
} else {
if (gameMode == "time"){
newEnemyTimer.removeEventListener(TimerEvent.TIMER, NewEnemySet);
newEnemyTimer.stop();
};
};
if (repellentEquipped == true){
repellent = false;
repellentEquipped = false;
};
powerTimer.removeEventListener(TimerEvent.TIMER, PowerFunction);
powerTimer.stop();
spawnTimer.removeEventListener(TimerEvent.TIMER, SpawnFunction);
spawnTimer.stop();
ptsTimer.removeEventListener(TimerEvent.TIMER, PtsFunction);
ptsTimer.stop();
comboTimer.removeEventListener(TimerEvent.TIMER, ComboFunction);
comboTimer.stop();
BGMTimer.removeEventListener(TimerEvent.TIMER, BGMLoop);
BGMTimer.stop();
BGMTimer2.removeEventListener(TimerEvent.TIMER, BGMLoop2);
BGMTimer2.stop();
yardTimer.removeEventListener(TimerEvent.TIMER, YardCheck);
yardTimer.stop();
scBGM.stop();
sndTimer1.removeEventListener(TimerEvent.TIMER, snd1Func);
sndTimer2.removeEventListener(TimerEvent.TIMER, snd2Func);
sndTimer3.removeEventListener(TimerEvent.TIMER, snd3Func);
sndTimer5.removeEventListener(TimerEvent.TIMER, snd5Func);
timeTimer.removeEventListener(TimerEvent.TIMER, TimeFunction);
timeTimer.stop();
fenceTimer.removeEventListener(TimerEvent.TIMER, FenceFunction);
fenceTimer.stop();
turretTimer.removeEventListener(TimerEvent.TIMER, TurretFunction);
turretTimer.stop();
blindTimer.removeEventListener(TimerEvent.TIMER, BlindFunction);
unblindTimer.removeEventListener(TimerEvent.TIMER, UnblindFunction);
blindTimer.stop();
unblindTimer.stop();
parent.removeChild(cursor);
Mouse.show();
if (lvlScore > highScore){
highScore = lvlScore;
};
if (gameScore > highScore){
highScore = gameScore;
};
if (lvlKills > highKills){
highKills = lvlKills;
};
if ((((lvlTime > highTime)) && ((gameMode == "time")))){
highTime = lvlTime;
};
if (lvlCash > highCash){
highCash = lvlCash;
};
if ((((currentLvl > highLvlNormal)) && ((gameMode == "normal")))){
highLvlNormal = currentLvl;
};
if ((((currentLvl > highLvlExpert)) && ((gameMode == "expert")))){
highLvlExpert = currentLvl;
};
if ((((gameMode == "normal")) && ((HASeasyTrophy == false)))){
HASeasyTrophy = true;
TrophyDisplay.gotoAndStop("easyTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((gameMode == "expert")) && ((HAShardTrophy == false)))){
HAShardTrophy = true;
TrophyDisplay.gotoAndStop("hardTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
};
if ((((((gameMode == "expert")) && ((flawlessLvl == true)))) && ((HASgrassTrophy == false)))){
HASgrassTrophy = true;
TrophyDisplay.gotoAndStop("grassTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
bossDead = false;
bossPlaced = false;
gameModeInt = 0;
SetCookies();
SendToKong();
gotoAndStop("gamecomplete");
};
}
public function ClearData(_arg1:MouseEvent){
ClearStat.visible = true;
}
public function IntroBGMLoop(_arg1:TimerEvent){
if (introIsPlaying == true){
scBGM.stop();
scBGM = introBGM.play();
scBGM.soundTransform = volFull;
};
}
public function ClickEquip(_arg1:MouseEvent){
if ((((_arg1.target == PauseBox.SprinklerCheck)) && ((sprinklerEquipped == true)))){
sprinklerEquipped = false;
PauseBox.SprinklerCheck.gotoAndStop(1);
} else {
if ((((_arg1.target == PauseBox.SprinklerCheck)) && ((sprinkler == true)))){
sprinklerEquipped = true;
PauseBox.SprinklerCheck.gotoAndStop(2);
} else {
if ((((_arg1.target == PauseBox.BladesCheck)) && ((bladesEquipped == true)))){
bladesEquipped = false;
PauseBox.BladesCheck.gotoAndStop(1);
} else {
if ((((_arg1.target == PauseBox.BladesCheck)) && ((blades == true)))){
bladesEquipped = true;
PauseBox.BladesCheck.gotoAndStop(2);
} else {
if ((((_arg1.target == PauseBox.TurretCheck)) && ((turretEquipped == true)))){
turretEquipped = false;
PauseBox.TurretCheck.gotoAndStop(1);
} else {
if ((((_arg1.target == PauseBox.TurretCheck)) && ((turret == true)))){
turretEquipped = true;
PauseBox.TurretCheck.gotoAndStop(2);
} else {
if ((((_arg1.target == PauseBox.FenceCheck)) && ((fenceEquipped == true)))){
fenceEquipped = false;
PauseBox.FenceCheck.gotoAndStop(1);
} else {
if ((((_arg1.target == PauseBox.FenceCheck)) && ((fence == true)))){
fenceEquipped = true;
PauseBox.FenceCheck.gotoAndStop(2);
} else {
if ((((_arg1.target == PauseBox.RiderCheck)) && ((riderEquipped == true)))){
riderEquipped = false;
PauseBox.RiderCheck.gotoAndStop(1);
} else {
if ((((_arg1.target == PauseBox.RiderCheck)) && ((rider == true)))){
riderEquipped = true;
PauseBox.RiderCheck.gotoAndStop(2);
} else {
if ((((_arg1.target == PauseBox.RepellentCheck)) && ((repellentEquipped == true)))){
repellentEquipped = false;
PauseBox.RepellentCheck.gotoAndStop(1);
} else {
if ((((_arg1.target == PauseBox.RepellentCheck)) && ((repellent == true)))){
repellentEquipped = true;
PauseBox.RepellentCheck.gotoAndStop(2);
};
};
};
};
};
};
};
};
};
};
};
};
}
public function PrevFunc(_arg1:MouseEvent){
if (TutBox.currentFrame > 1){
TutBox.gotoAndStop((TutBox.currentFrame - 1));
if (TutBox.currentFrame == 1){
prevBtn.visible = false;
nextBtn.visible = true;
} else {
if (TutBox.currentFrame == 9){
nextBtn.visible = false;
prevBtn.visible = true;
} else {
nextBtn.visible = true;
prevBtn.visible = true;
};
};
};
}
public function PtsFunction(_arg1:TimerEvent){
PtsStat.visible = false;
ptsTimer.stop();
PtsStat.PtsBox.text = String("");
PtsStat.PtsBox2.text = String("");
}
public function StorePurchases(_arg1:MouseEvent){
if (_arg1.target == riderBtn){
if (rider == true){
ShopBox.text = String("\nYou already own the Riding Mower!");
} else {
if (currentCash >= 35000){
if (soundToggle == true){
scFull = chachingSnd.play();
scFull.soundTransform = volFull;
};
rider = true;
riderEquipped = true;
if (HASriderTrophy == false){
HASriderTrophy = true;
TrophyDisplay.gotoAndStop("riderTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
currentCash = (currentCash - 35000);
spentCash = (spentCash + 35000);
ShopBox.text = String("\nNice choice!");
purchasedText = new PurchasedText();
purchasedText.x = riderBtn.x;
purchasedText.y = riderBtn.y;
Purchases.addChild(purchasedText);
} else {
if (currentCash < 35000){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == sprinklerBtn){
if (sprinkler == true){
ShopBox.text = String("\nYou already own the Sprinkler System!");
} else {
if (currentCash >= 2500){
if (soundToggle == true){
scFull = chachingSnd.play();
scFull.soundTransform = volFull;
};
sprinkler = true;
sprinklerEquipped = true;
currentCash = (currentCash - 2500);
spentCash = (spentCash + 2500);
ShopBox.text = String("\nNice choice!");
purchasedText = new PurchasedText();
purchasedText.x = sprinklerBtn.x;
purchasedText.y = sprinklerBtn.y;
Purchases.addChild(purchasedText);
} else {
if (currentCash < 2500){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == bladesBtn){
if (blades == true){
ShopBox.text = String("\nYou already own the Serrated Mower Blades!");
} else {
if (currentCash >= 5500){
if (soundToggle == true){
scFull = chachingSnd.play();
scFull.soundTransform = volFull;
};
blades = true;
bladesEquipped = true;
currentCash = (currentCash - 5500);
spentCash = (spentCash + 5500);
ShopBox.text = String("\nNice choice!");
purchasedText = new PurchasedText();
purchasedText.x = bladesBtn.x;
purchasedText.y = bladesBtn.y;
Purchases.addChild(purchasedText);
} else {
if (currentCash < 5500){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == fenceBtn){
if (fence == true){
ShopBox.text = String("\nYou already own the Electric Doggy Fence!");
} else {
if (currentCash >= 12000){
if (soundToggle == true){
scFull = chachingSnd.play();
scFull.soundTransform = volFull;
};
fence = true;
fenceEquipped = true;
currentCash = (currentCash - 12000);
spentCash = (spentCash + 12000);
ShopBox.text = String("\nNice choice!");
purchasedText = new PurchasedText();
purchasedText.x = fenceBtn.x;
purchasedText.y = fenceBtn.y;
Purchases.addChild(purchasedText);
} else {
if (currentCash < 12000){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == turretBtn){
if (turret == true){
ShopBox.text = String("\nYou already own the Auto-Turret!");
} else {
if (currentCash >= 15000){
if (soundToggle == true){
scFull = chachingSnd.play();
scFull.soundTransform = volFull;
};
turret = true;
turretEquipped = true;
currentCash = (currentCash - 15000);
spentCash = (spentCash + 15000);
ShopBox.text = String("\nNice choice!");
purchasedText = new PurchasedText();
purchasedText.x = turretBtn.x;
purchasedText.y = turretBtn.y;
Purchases.addChild(purchasedText);
} else {
if (currentCash < 15000){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == repellentBtn){
if (repellent == true){
ShopBox.text = String("\nYou already have repellent for the next level!");
} else {
if (currentCash >= 399){
if (soundToggle == true){
scFull = chachingSnd.play();
scFull.soundTransform = volFull;
};
repellent = true;
repellentEquipped = true;
currentCash = (currentCash - 399);
ShopBox.text = String("\nNice choice!");
purchasedText = new PurchasedText();
purchasedText.x = repellentBtn.x;
purchasedText.y = repellentBtn.y;
Purchases.addChild(purchasedText);
} else {
if (currentCash < 399){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == fertilizerBtn){
if (totHealth >= 200){
ShopBox.text = String("\nYou are already at maximum health!");
} else {
if ((((currentCash >= 450)) && ((totHealth < 190)))){
if (soundToggle == true){
scFull = chachingSnd.play();
scFull.soundTransform = volFull;
};
totHealth = (totHealth + 10);
health = (health + 10);
currentCash = (currentCash - 450);
spentCash = (spentCash + 450);
ShopBox.text = String("+10% Maximum Health!");
health = totHealth;
} else {
if ((((currentCash >= 450)) && ((totHealth >= 190)))){
if (soundToggle == true){
scFull = chachingSnd.play();
scFull.soundTransform = volFull;
};
currentCash = (currentCash - 450);
spentCash = (spentCash + 450);
ShopBox.text = String((("+" + (200 - totHealth)) + "Health!"));
totHealth = 200;
health = 200;
health = totHealth;
purchasedText = new PurchasedText();
purchasedText.x = fertilizerBtn.x;
purchasedText.y = fertilizerBtn.y;
Purchases.addChild(purchasedText);
} else {
if (currentCash < 450){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
};
} else {
if (_arg1.target == throttle1){
if (throttle >= 2){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 80){
throttle = 2;
currentCash = (currentCash - 80);
ShopBox.text = String("\nLevel 1 Throttle Purchased!");
} else {
if (currentCash < 80){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == throttle2){
if (throttle >= 3){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 160){
throttle = 3;
currentCash = (currentCash - 160);
ShopBox.text = String("\nLevel 2 Throttle Purchased!");
} else {
if (currentCash < 160){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == throttle3){
if (throttle >= 4){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 320){
throttle = 4;
currentCash = (currentCash - 320);
ShopBox.text = String("\nLevel 3 Throttle Purchased!");
} else {
if (currentCash < 320){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == throttle4){
if (throttle >= 5){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 580){
throttle = 5;
currentCash = (currentCash - 580);
ShopBox.text = String("\nLevel 4 Throttle Purchased!");
} else {
if (currentCash < 580){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == throttle5){
if (throttle >= 6){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 1100){
throttle = 6;
currentCash = (currentCash - 1100);
ShopBox.text = String("\nLevel 5 Throttle Purchased!");
} else {
if (currentCash < 1100){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == throttle6){
if (throttle >= 7){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 2200){
throttle = 7;
currentCash = (currentCash - 2200);
ShopBox.text = String("\nLevel 6 Throttle Purchased!");
} else {
if (currentCash < 2200){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == throttle7){
if (throttle >= 8){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 3600){
throttle = 8;
currentCash = (currentCash - 3600);
ShopBox.text = String("\nLevel 7 Throttle Purchased!");
} else {
if (currentCash < 3600){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == thermostat1){
if (thermostat >= 2){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 50){
thermostat = 2;
currentCash = (currentCash - 50);
ShopBox.text = String("\nLevel 1 Thermostat Purchased!");
} else {
if (currentCash < 50){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == thermostat2){
if (thermostat >= 3){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 150){
thermostat = 3;
currentCash = (currentCash - 150);
ShopBox.text = String("\nLevel 2 Thermostat Purchased!");
} else {
if (currentCash < 150){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == thermostat3){
if (thermostat >= 4){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 300){
thermostat = 4;
currentCash = (currentCash - 300);
ShopBox.text = String("\nLevel 3 Thermostat Purchased!");
} else {
if (currentCash < 300){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == thermostat4){
if (thermostat >= 5){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 600){
thermostat = 5;
currentCash = (currentCash - 600);
ShopBox.text = String("\nLevel 4 Thermostat Purchased!");
} else {
if (currentCash < 600){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == thermostat5){
if (thermostat >= 6){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 1000){
thermostat = 6;
currentCash = (currentCash - 1000);
ShopBox.text = String("\nLevel 5 Thermostat Purchased!");
} else {
if (currentCash < 1000){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == thermostat6){
if (thermostat >= 7){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 2000){
thermostat = 7;
currentCash = (currentCash - 2000);
ShopBox.text = String("\nLevel 6 Thermostat Purchased!");
} else {
if (currentCash < 2000){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == thermostat7){
if (thermostat >= 8){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash > 3500){
thermostat = 8;
currentCash = (currentCash - 3500);
ShopBox.text = String("\nLevel 7 Thermostat Purchased!");
} else {
if (currentCash < 3500){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == torque1){
if (torque >= 2){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 100){
torque = 2;
currentCash = (currentCash - 100);
ShopBox.text = String("\nLevel 1 Engine Torque Purchased!");
} else {
if (currentCash < 100){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == torque2){
if (torque >= 3){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 200){
torque = 3;
currentCash = (currentCash - 200);
ShopBox.text = String("\nLevel 2 Engine Torque Purchased!");
} else {
if (currentCash < 200){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == torque3){
if (torque >= 4){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 400){
torque = 4;
currentCash = (currentCash - 400);
ShopBox.text = String("\nLevel 3 Engine Torque Purchased!");
} else {
if (currentCash < 400){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == torque4){
if (torque >= 5){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 700){
torque = 5;
currentCash = (currentCash - 700);
ShopBox.text = String("\nLevel 4 Engine Torque Purchased!");
} else {
if (currentCash < 700){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == torque5){
if (torque >= 6){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 1200){
torque = 6;
currentCash = (currentCash - 1200);
ShopBox.text = String("\nLevel 5 Engine Torque Purchased!");
} else {
if (currentCash < 1200){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == torque6){
if (torque >= 7){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 2500){
torque = 7;
currentCash = (currentCash - 2500);
ShopBox.text = String("\nLevel 6 Engine Torque Purchased!");
} else {
if (currentCash < 2500){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == torque7){
if (torque >= 8){
ShopBox.text = String("\nYou already have that!");
} else {
if (currentCash >= 5000){
torque = 8;
currentCash = (currentCash - 5000);
ShopBox.text = String("\nLevel 7 Engine Torque Purchased!");
} else {
if (currentCash < 5000){
ShopBox.text = String("\nYou don't have enough money for that.");
};
};
};
} else {
if (_arg1.target == refundBtn){
RefundMoney();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
CashStat.HealthBox.text = String(currentCash);
HealthStat.HealthBox.text = String((health + "%"));
TuneUpCheck();
}
public function Difficulty(_arg1:MouseEvent){
if (_arg1.target == DifficultyStat.NormBtn){
CleanUp();
currentLvl = 1;
MovieClip(root).gameMode = "normal";
gotoAndStop("play");
introIsPlaying = false;
introBGMTimer.stop();
scBGM.stop();
} else {
if (_arg1.target == DifficultyStat.ExpertBtn){
CleanUp();
currentLvl = 1;
MovieClip(root).gameMode = "expert";
gotoAndStop("play");
introIsPlaying = false;
introBGMTimer.stop();
scBGM.stop();
} else {
if (_arg1.target == DifficultyStat.CancelBtn){
DifficultyStat.visible = false;
};
};
};
}
public function RefundMoney(){
currentCash = (currentCash + spentCash);
if (repellent == true){
currentCash = (currentCash + 399);
};
if (torque == 8){
currentCash = (currentCash + 5000);
} else {
if (torque == 7){
currentCash = (currentCash + 2500);
} else {
if (torque == 6){
currentCash = (currentCash + 1200);
} else {
if (torque == 5){
currentCash = (currentCash + 700);
} else {
if (torque == 4){
currentCash = (currentCash + 400);
} else {
if (torque == 3){
currentCash = (currentCash + 200);
} else {
if (torque == 2){
currentCash = (currentCash + 100);
};
};
};
};
};
};
};
if (thermostat == 8){
currentCash = (currentCash + 3500);
} else {
if (thermostat == 7){
currentCash = (currentCash + 2000);
} else {
if (thermostat == 6){
currentCash = (currentCash + 1000);
} else {
if (thermostat == 5){
currentCash = (currentCash + 600);
} else {
if (thermostat == 4){
currentCash = (currentCash + 300);
} else {
if (thermostat == 3){
currentCash = (currentCash + 150);
} else {
if (thermostat == 2){
currentCash = (currentCash + 50);
};
};
};
};
};
};
};
if (throttle == 8){
currentCash = (currentCash + 3600);
} else {
if (throttle == 7){
currentCash = (currentCash + 2200);
} else {
if (throttle == 6){
currentCash = (currentCash + 1100);
} else {
if (throttle == 5){
currentCash = (currentCash + 580);
} else {
if (throttle == 4){
currentCash = (currentCash + 320);
} else {
if (throttle == 3){
currentCash = (currentCash + 160);
} else {
if (throttle == 2){
currentCash = (currentCash + 80);
};
};
};
};
};
};
};
blades = false;
repellent = false;
sprinkler = false;
turret = false;
rider = false;
fence = false;
bladesEquipped = false;
repellentEquipped = false;
sprinklerEquipped = false;
turretEquipped = false;
riderEquipped = false;
fenceEquipped = false;
health = 100;
totHealth = 100;
throttle = 1;
torque = 1;
thermostat = 1;
spentCash = 0;
i = (Purchases.numChildren - 1);
while (i >= 0) {
Purchases.removeChildAt(i);
i--;
};
}
public function PowerFunction(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
if ((((accelerating == true)) && ((power > 0)))){
power = (power - 5);
volTwirl.volume = (power / totPower);
scTwirl.soundTransform = volTwirl;
} else {
if ((((accelerating == false)) && ((power < totPower)))){
powerCtr = (powerCtr + (1 + (thermostat / 2)));
if (powerCtr >= 5){
power++;
powerCtr = 0;
};
};
};
if (power <= 0){
power = 0;
accelerating = false;
} else {
if (power > totPower){
power = totPower;
};
};
};
}
public function OverMouse(_arg1:MouseEvent){
if (_arg1.target == timeAttackBtn){
MenuBox.text = String("\nSee how long you can survive in this unlimited play mode.");
} else {
if (_arg1.target == newGameBtn){
MenuBox.text = String("\nStart a brand new game in Story-Mode.");
} else {
if (_arg1.target == continueBtn){
MenuBox.text = String("\nContinue from where you left off in Story-Mode.");
} else {
if (_arg1.target == shopBtn){
MenuBox.text = String("\nBuy new stuff with the cash you've earned.");
} else {
if (_arg1.target == bestiaryBtn){
MenuBox.text = String("\nLearn about all the enemies you will face.");
} else {
if (_arg1.target == awardsBtn){
MenuBox.text = String("\nView the contents of your trophy room.");
} else {
if (_arg1.target == howtoplayBtn){
MenuBox.text = String("\nGo over basic controls and strategies.");
} else {
if (_arg1.target == You){
MenuBox.text = String("\nThat's you!");
} else {
if (_arg1.target == HarLink){
MenuBox.text = String("\nCome to our site and play our other games!");
} else {
if (_arg1.target == ClearBtn){
MenuBox.text = String("\nClick to erase all of your saved data.");
} else {
if (_arg1.target == statsBtn){
MenuBox.text = String("\nCheck out how you've been progressing so far.");
} else {
if (_arg1.target == DifficultyStat.NormBtn){
DifficultyStat.DifficultyBox.text = String("Normal Mode is suggested for new players. As the levels progress, it can still be quite a challenge.");
} else {
if (_arg1.target == DifficultyStat.ExpertBtn){
DifficultyStat.DifficultyBox.text = String("In Expert Mode, enemies move faster, spawn faster, and cause more damage. On the bright side, you get more points and cash!");
} else {
if (_arg1.target == BG){
MenuBox.text = String("");
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function ToShop(_arg1:MouseEvent){
CleanUp();
gotoAndStop("shop");
}
public function CareerTimeUpdate(_arg1:Event){
CareerTimeBox.text = String((("Total Play Time: " + careerTime) + " seconds"));
}
public function UnblindFunction(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
unblindCtr++;
if (unblindCtr >= 9){
unblindCtr = 0;
BlindBox.alpha = 0;
unblindTimer.stop();
} else {
if ((((unblindCtr >= 5)) && ((BlindBox.alpha > 0)))){
BlindBox.alpha = (BlindBox.alpha - 0.2);
};
};
};
}
public function DentistStun(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
stunned = false;
stunTimer.stop();
avatar.JellySac.gotoAndStop(1);
};
}
function frame1(){
MochiAd.showPreGameAd({clip:root, id:"02c3031c7fb40704", res:"700x500"});
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
defaultItems = myContextMenu.builtInItems;
defaultItems.print = true;
}
function frame2(){
stage.addEventListener(MouseEvent.CLICK, OptionControl);
stage.addEventListener(MouseEvent.MOUSE_OVER, OptionOver);
stage.addEventListener(MouseEvent.MOUSE_OUT, OptionOut);
stop();
DifficultyStat.visible = false;
ClearStat.visible = false;
stage.addEventListener(MouseEvent.MOUSE_OVER, OverMouse);
stage.addEventListener(MouseEvent.MOUSE_OUT, OutMouse);
statsBtn.addEventListener(MouseEvent.CLICK, ToStats);
timeAttackBtn.addEventListener(MouseEvent.CLICK, NewTime);
newGameBtn.addEventListener(MouseEvent.CLICK, NewGame);
DifficultyStat.addEventListener(MouseEvent.CLICK, Difficulty);
continueBtn.addEventListener(MouseEvent.CLICK, ContinueGame);
shopBtn.addEventListener(MouseEvent.CLICK, ToShop);
bestiaryBtn.addEventListener(MouseEvent.CLICK, ToBestiary);
awardsBtn.addEventListener(MouseEvent.CLICK, ToAwards);
howtoplayBtn.addEventListener(MouseEvent.CLICK, ToTut);
HarLink.addEventListener(MouseEvent.CLICK, ToSite);
ClearBtn.addEventListener(MouseEvent.CLICK, ClearData);
ClearStat.addEventListener(MouseEvent.CLICK, ClearAll);
if (trophyCount == 29){
You.gotoAndStop(2);
} else {
You.gotoAndStop(1);
};
if ((((introIsPlaying == false)) && ((musicToggle == true)))){
scBGM = introBGM.play();
scBGM.soundTransform = volFull;
introIsPlaying = true;
introBGMTimer.start();
introBGMTimer.addEventListener(TimerEvent.TIMER, IntroBGMLoop);
};
LoadCareer();
SendToKong();
}
function frame3(){
scBGM.stop();
introIsPlaying = false;
InitGame();
if (gameMode == "time"){
PauseBox.gotoAndStop(3);
KillsBox.text = String(("Kills: " + lvlKills));
} else {
PauseBox.gotoAndStop(2);
KillsBox.text = String(((("Enemies Left: " + (Math.floor((storyKills[(currentLvl - 1)] * difficulty)) - remainingEnemies)) + "/") + Math.floor((storyKills[(currentLvl - 1)] * difficulty))));
};
}
function frame4(){
hardwareStoreGuy.buttonMode = true;
TuneUpCheck();
tickleCtr = 0;
if (storyPlaying == true){
continueBtn.visible = true;
menuBtn.visible = false;
continueBtn.addEventListener(MouseEvent.CLICK, ContinueGame2);
} else {
continueBtn.visible = false;
menuBtn.visible = true;
menuBtn.addEventListener(MouseEvent.CLICK, BackToMenu);
};
CashStat.HealthBox.text = String(currentCash);
HealthStat.HealthBox.text = String((health + "%"));
SpecStat.HealthBox.text = String((power + "%"));
throttle1.gotoAndStop(1);
throttle2.gotoAndStop(1);
throttle3.gotoAndStop(1);
throttle4.gotoAndStop(1);
throttle5.gotoAndStop(1);
throttle6.gotoAndStop(1);
throttle7.gotoAndStop(1);
thermostat1.gotoAndStop(1);
thermostat2.gotoAndStop(1);
thermostat3.gotoAndStop(1);
thermostat4.gotoAndStop(1);
thermostat5.gotoAndStop(1);
thermostat6.gotoAndStop(1);
thermostat7.gotoAndStop(1);
torque1.gotoAndStop(1);
torque2.gotoAndStop(1);
torque3.gotoAndStop(1);
torque4.gotoAndStop(1);
torque5.gotoAndStop(1);
torque6.gotoAndStop(1);
torque7.gotoAndStop(1);
throttle1.buttonMode = true;
throttle2.buttonMode = true;
throttle3.buttonMode = true;
throttle4.buttonMode = true;
throttle5.buttonMode = true;
throttle6.buttonMode = true;
throttle7.buttonMode = true;
thermostat1.buttonMode = true;
thermostat2.buttonMode = true;
thermostat3.buttonMode = true;
thermostat4.buttonMode = true;
thermostat5.buttonMode = true;
thermostat6.buttonMode = true;
thermostat7.buttonMode = true;
torque1.buttonMode = true;
torque2.buttonMode = true;
torque3.buttonMode = true;
torque4.buttonMode = true;
torque5.buttonMode = true;
torque6.buttonMode = true;
torque7.buttonMode = true;
i = (Purchases.numChildren - 1);
while (i >= 0) {
Purchases.removeChildAt(i);
i--;
};
if (rider == true){
purchasedText = new PurchasedText();
purchasedText.x = riderBtn.x;
purchasedText.y = riderBtn.y;
Purchases.addChild(purchasedText);
};
if (sprinkler == true){
purchasedText = new PurchasedText();
purchasedText.x = sprinklerBtn.x;
purchasedText.y = sprinklerBtn.y;
Purchases.addChild(purchasedText);
};
if (totHealth == 200){
purchasedText = new PurchasedText();
purchasedText.x = fertilizerBtn.x;
purchasedText.y = fertilizerBtn.y;
Purchases.addChild(purchasedText);
};
if (blades == true){
purchasedText = new PurchasedText();
purchasedText.x = bladesBtn.x;
purchasedText.y = bladesBtn.y;
Purchases.addChild(purchasedText);
};
if (turret == true){
purchasedText = new PurchasedText();
purchasedText.x = turretBtn.x;
purchasedText.y = turretBtn.y;
Purchases.addChild(purchasedText);
};
if (fence == true){
purchasedText = new PurchasedText();
purchasedText.x = fenceBtn.x;
purchasedText.y = fenceBtn.y;
Purchases.addChild(purchasedText);
};
if (repellent == true){
purchasedText = new PurchasedText();
purchasedText.x = repellentBtn.x;
purchasedText.y = repellentBtn.y;
Purchases.addChild(purchasedText);
};
stage.addEventListener(MouseEvent.MOUSE_OVER, OverMouse4);
stage.addEventListener(MouseEvent.MOUSE_OUT, OutMouse4);
hardwareStoreGuy.addEventListener(MouseEvent.CLICK, Tickle);
if ((((introIsPlaying == false)) && ((musicToggle == true)))){
scBGM = introBGM.play();
scBGM.soundTransform = volFull;
introIsPlaying = true;
introBGMTimer.start();
introBGMTimer.addEventListener(TimerEvent.TIMER, IntroBGMLoop);
};
stage.addEventListener(MouseEvent.CLICK, StorePurchases);
}
function frame5(){
menuBtn.addEventListener(MouseEvent.CLICK, BackToMenu2);
TrophyCountBox.text = String((("You have earned " + trophyCount) + " of the 29 trophies."));
TrophyStatus();
eTrophy1.buttonMode = true;
eTrophy2.buttonMode = true;
eTrophy3.buttonMode = true;
eTrophy4.buttonMode = true;
eTrophy5.buttonMode = true;
eTrophy6.buttonMode = true;
eTrophy7.buttonMode = true;
eTrophy8.buttonMode = true;
eTrophy9.buttonMode = true;
eTrophy10.buttonMode = true;
eTrophy11.buttonMode = true;
eTrophy12.buttonMode = true;
riderTrophy.buttonMode = true;
grassTrophy.buttonMode = true;
easyTrophy.buttonMode = true;
hardTrophy.buttonMode = true;
bhemothTrophy.buttonMode = true;
clockTrophy.buttonMode = true;
timeTrophy1.buttonMode = true;
timeTrophy2.buttonMode = true;
timeTrophy3.buttonMode = true;
thumbTrophy.buttonMode = true;
gnomeTrophy.buttonMode = true;
licenseTrophy.buttonMode = true;
dogtagTrophy.buttonMode = true;
purpleTrophy.buttonMode = true;
orderTrophy.buttonMode = true;
boomerangTrophy.buttonMode = true;
diamondTrophy.buttonMode = true;
stage.addEventListener(MouseEvent.MOUSE_OVER, OverMouse3);
}
function frame6(){
menuBtn.addEventListener(MouseEvent.CLICK, BackToMenu3);
stage.addEventListener(MouseEvent.MOUSE_OVER, OverMouse2);
}
function frame7(){
menuBtn.addEventListener(MouseEvent.CLICK, BackToMenu5);
if (TutBox.currentFrame == 1){
prevBtn.visible = false;
nextBtn.visible = true;
} else {
if (TutBox.currentFrame == 9){
nextBtn.visible = false;
prevBtn.visible = true;
} else {
nextBtn.visible = true;
prevBtn.visible = true;
};
};
nextBtn.addEventListener(MouseEvent.CLICK, NextFunc);
prevBtn.addEventListener(MouseEvent.CLICK, PrevFunc);
}
function frame8(){
menuBtn.addEventListener(MouseEvent.CLICK, BackToMenu6);
CareerScoreBox.text = String((careerScore + " pts."));
CareerKillsBox.text = String((careerKills + " kills"));
CareerEarningsBox.text = String(("$" + careerCash));
CareerDamageBox.text = String((careerDamage + "%"));
CareerTurretBox.text = String((turretKills + " kills"));
CareerFenceBox.text = String((fenceKills + " kills"));
BestScoreBox.text = String((highScore + " pts."));
BestKillsBox.text = String((highKills + " kills"));
BestEarningsBox.text = String(("$" + highCash));
BestMultiplierBox.text = String(("x " + highMultiplier));
LongestTimeBox.text = String((highTime + " seconds"));
NormalStatBox.text = String(highLvlNormal);
ExpertStatBox.text = String(highLvlExpert);
TrophyStatBox.text = String((trophyCount + "/29"));
addEventListener(Event.ENTER_FRAME, CareerTimeUpdate);
}
function frame9(){
menuBtn.addEventListener(MouseEvent.CLICK, BackToMenu4);
harBtn2.addEventListener(MouseEvent.CLICK, ToSite2);
LoseTimeBox.text = String((((minCtr + " min. ") + (timeCtr / 10)) + " sec."));
LoseEarningsBox.text = String(("$" + lvlCash));
if (gameMode == "time"){
currentCash = (currentCash + lvlCash);
careerCash = (careerCash + lvlCash);
PenaltyBox.text = String("(No penalty in Time Attack Mode)");
} else {
gameScore = (gameScore - lvlScore);
currentCash = (currentCash + (lvlCash / 2));
careerCash = (careerCash + (lvlCash / 2));
PenaltyBox.text = String(("-$" + Math.floor((lvlCash / 2))));
};
LoseCashBox.text = String(("$" + currentCash));
LoseScoreBox.text = String((lvlScore + " pts."));
if ((((introIsPlaying == false)) && ((musicToggle == true)))){
scBGM = introBGM.play();
scBGM.soundTransform = volFull;
introIsPlaying = true;
introBGMTimer.start();
introBGMTimer.addEventListener(TimerEvent.TIMER, IntroBGMLoop);
};
if ((((careerCash >= 30000)) && ((HASgnomeTrophy == false)))){
HASgnomeTrophy = true;
TrophyDisplay.gotoAndStop("gnomeTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
SetCookies();
}
public function NextFunc(_arg1:MouseEvent){
if (TutBox.currentFrame < 9){
TutBox.gotoAndStop((TutBox.currentFrame + 1));
if (TutBox.currentFrame == 1){
prevBtn.visible = false;
nextBtn.visible = true;
} else {
if (TutBox.currentFrame == 9){
nextBtn.visible = false;
prevBtn.visible = true;
} else {
nextBtn.visible = true;
prevBtn.visible = true;
};
};
};
}
public function MoveEnemies(){
var _local1:Number;
if ((((endGame == false)) && ((gamePaused == false)))){
if (spikes.length > 0){
i = (spikes.length - 1);
while (i >= 0) {
spikes[i].x = (spikes[i].x + (-27 * Math.cos((((2 * Math.PI) * spikes[i].rotation) / 360))));
spikes[i].y = (spikes[i].y + (-27 * Math.sin((((2 * Math.PI) * spikes[i].rotation) / 360))));
if ((((((((spikes[i].x > 850)) || ((spikes[i].x < -150)))) || ((spikes[i].y > 650)))) || ((spikes[i].y < -150)))){
Yard.removeChild(spikes[i]);
spikes.splice(i, 1);
break;
} else {
if (avatar.JellySac.hitTestPoint(spikes[i].x, spikes[i].y, true)){
stunned = true;
beenStunned = true;
if (soundToggle == true){
scFull = spikeHitSnd.play();
};
stunTimer.start();
avatar.JellySac.gotoAndPlay("stunned");
Yard.removeChild(spikes[i]);
spikes.splice(i, 1);
break;
} else {
if (avatar.hitTestPoint(spikes[i].x, spikes[i].y, true)){
if (soundToggle == true){
scFull = bounceSnd2.play();
};
Yard.removeChild(spikes[i]);
spikes.splice(i, 1);
break;
};
};
};
i--;
};
};
i = (enemies.length - 1);
while (i >= 0) {
if (((((enemies[i].hitTestObject(House)) && ((enemies[i].splatted == false)))) && ((enemies[i].houseHit == false)))){
enemies[i].rotation = (enemies[i].rotation * -1);
enemies[i].houseHit = true;
enemies[i].houseTimer.start();
} else {
if (((((((enemies[i].hitTestObject(Yard.YardArea)) && ((Math.floor((Math.random() * 70)) == 0)))) && ((enemies[i].splatted == false)))) && ((enemies[i].houseHit == false)))){
if ((enemies[i] is EnemyBoss)){
enemies[i].rotation = (enemies[i].rotation + 0);
} else {
enemies[i].rotation = (enemies[i].rotation + (-30 + (Math.random() * 60)));
};
};
};
if (((((((Yard.Repellent.hitTestPoint(enemies[i].x, enemies[i].y, true)) && ((enemies[i].splatted == false)))) && ((enemies[i].slowed == false)))) && ((Yard.Repellent.visible == true)))){
if ((((enemies[i] is Enemy6)) || ((enemies[i] is Enemy9)))){
if (enemies[i].exploding == false){
enemies[i].slowed = true;
enemies[i].slowTimer.stop();
enemies[i].slowTimer.start();
enemies[i].SlowBlob.visible = true;
};
} else {
enemies[i].slowed = true;
enemies[i].slowTimer.stop();
enemies[i].slowTimer.start();
enemies[i].SlowBlob.visible = true;
};
};
if ((((enemies[i].splatted == true)) && ((enemies[i].alpha > 0)))){
enemies[i].alpha = (enemies[i].alpha - 0.008);
enemies[i].scaleX = (enemies[i].scaleX - 0.001);
enemies[i].scaleY = (enemies[i].scaleY - 0.001);
if ((((enemies[i] is Enemy1)) && ((HASeTrophy1 == false)))){
HASeTrophy1 = true;
TrophyDisplay.gotoAndStop("eTrophy1");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy2)) && ((HASeTrophy2 == false)))){
HASeTrophy2 = true;
TrophyDisplay.gotoAndStop("eTrophy2");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy3)) && ((HASeTrophy3 == false)))){
HASeTrophy3 = true;
TrophyDisplay.gotoAndStop("eTrophy3");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy4)) && ((HASeTrophy4 == false)))){
HASeTrophy4 = true;
TrophyDisplay.gotoAndStop("eTrophy4");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy5)) && ((HASeTrophy5 == false)))){
HASeTrophy5 = true;
TrophyDisplay.gotoAndStop("eTrophy5");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy6)) && ((HASeTrophy6 == false)))){
HASeTrophy6 = true;
TrophyDisplay.gotoAndStop("eTrophy6");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((((enemies[i] is Enemy7)) && ((enemies[i].indestructible == true)))) && ((HASeTrophy8 == false)))){
HASeTrophy8 = true;
TrophyDisplay.gotoAndStop("eTrophy8");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy7)) && ((HASeTrophy7 == false)))){
HASeTrophy7 = true;
TrophyDisplay.gotoAndStop("eTrophy7");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy8)) && ((HASeTrophy9 == false)))){
HASeTrophy9 = true;
TrophyDisplay.gotoAndStop("eTrophy9");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy9)) && ((HASeTrophy10 == false)))){
HASeTrophy10 = true;
TrophyDisplay.gotoAndStop("eTrophy10");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy10)) && ((HASeTrophy11 == false)))){
HASeTrophy11 = true;
TrophyDisplay.gotoAndStop("eTrophy11");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
} else {
if ((((enemies[i] is Enemy11)) && ((HASeTrophy12 == false)))){
HASeTrophy12 = true;
TrophyDisplay.gotoAndStop("eTrophy12");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
};
};
};
};
};
};
};
};
};
};
};
} else {
if ((((enemies[i].splatted == true)) && ((enemies[i].alpha <= 0)))){
Yard.removeChild(enemies[i]);
enemies.splice(i, 1);
break;
} else {
if (gameMode == "time"){
speedMultiplier = spawnRelease;
} else {
speedMultiplier = (currentLvl / 8);
};
if (twirling == true){
_local1 = (((180 / Math.PI) * Math.atan2((avatar.y - enemies[i].y), (avatar.x - enemies[i].x))) + 180);
enemies[i].x = (enemies[i].x + ((-(1.5) * (enemies[i].enemySpeed + (thermostat / 4))) * Math.cos((((2 * Math.PI) * _local1) / 360))));
enemies[i].y = (enemies[i].y + ((1.5 * (enemies[i].enemySpeed + (thermostat / 4))) * Math.sin((((2 * Math.PI) * -(_local1)) / 360))));
} else {
if (enemies[i].slowed == true){
enemies[i].x = (enemies[i].x + ((-0.4 * (enemies[i].enemySpeed + speedMultiplier)) * Math.cos((((2 * Math.PI) * enemies[i].rotation) / 360))));
enemies[i].y = (enemies[i].y + ((-0.4 * (enemies[i].enemySpeed + speedMultiplier)) * Math.sin((((2 * Math.PI) * enemies[i].rotation) / 360))));
} else {
if (enemies[i].trappedState == true){
enemies[i].x = (enemies[i].x + 0);
enemies[i].y = (enemies[i].y + 0);
} else {
enemies[i].x = (enemies[i].x + (-((enemies[i].enemySpeed + speedMultiplier)) * Math.cos((((2 * Math.PI) * enemies[i].rotation) / 360))));
enemies[i].y = (enemies[i].y + (-((enemies[i].enemySpeed + speedMultiplier)) * Math.sin((((2 * Math.PI) * enemies[i].rotation) / 360))));
};
};
};
};
};
if (enemies[i].y > (450 - (enemies[i].height / 2))){
enemies[i].y = (450 - (enemies[i].height / 2));
};
if ((((((((enemies[i].x > 950)) || ((enemies[i].x < -250)))) || ((enemies[i].y > 750)))) || ((enemies[i].y < -250)))){
if ((enemies[i] is EnemyBoss)){
enemies[i].x = 350;
enemies[i].y = 250;
} else {
enemies[i].splatted = true;
remainingEnemies++;
Yard.removeChild(enemies[i]);
enemies.splice(i, 1);
};
} else {
if ((enemies[i] is Enemy6)){
if (enemies[i].exploding == true){
if (((((((((avatar.x + 150) >= enemies[i].x)) && (((avatar.x - 150) <= enemies[i].x)))) && (((avatar.y + 150) >= enemies[i].y)))) && (((avatar.y - 150) <= enemies[i].y)))){
stunned = true;
beenBlasted = true;
stunTimer.start();
avatar.JellySac.gotoAndPlay("blasted");
};
enemies[i].splatted = true;
enemies.splice(i, 1);
};
} else {
if ((enemies[i] is Enemy9)){
if (enemies[i].exploding == true){
enemies[i].splatted = true;
enemies.splice(i, 1);
};
} else {
if ((((enemies[i] is Enemy10)) && ((enemies[i].splatted == false)))){
if ((((enemies[i].y <= 50)) && ((enemies[i].launched == true)))){
enemies[i].rotation = (-50 + (Math.random() * 80));
} else {
if ((((enemies[i].x <= 50)) && ((enemies[i].launched == true)))){
enemies[i].rotation = (110 + (Math.random() * 140));
} else {
if ((((enemies[i].x >= 650)) && ((enemies[i].launched == true)))){
enemies[i].rotation = (-70 + (Math.random() * 140));
} else {
if (((((((((avatar.x + 150) >= enemies[i].x)) && (((avatar.x - 150) <= enemies[i].x)))) && (((avatar.y + 150) >= enemies[i].y)))) && (((avatar.y - 150) <= enemies[i].y)))){
if (enemies[i].evading == false){
enemies[i].rotation = ((avatar.rotation + 150) + (Math.random() * 60));
enemies[i].evading = true;
enemies[i].evadeTimer.start();
};
};
};
};
};
} else {
if ((((enemies[i] is EnemyBoss)) && ((enemies[i].splatted == false)))){
if ((((enemies[i].y <= 50)) && ((enemies[i].launched == true)))){
if (Math.random() < 0.5){
enemies[i].rotation = -90;
} else {
enemies[i].rotation = (((180 / Math.PI) * Math.atan2((avatar.y - enemies[i].y), (avatar.x - enemies[i].x))) + 180);
};
if (Math.random() > 0.9){
enemies[i].ZoomEscape();
};
} else {
if ((((enemies[i].x <= 50)) && ((enemies[i].launched == true)))){
if (Math.random() < 0.5){
enemies[i].rotation = 180;
} else {
enemies[i].rotation = (((180 / Math.PI) * Math.atan2((avatar.y - enemies[i].y), (avatar.x - enemies[i].x))) + 180);
};
if (Math.random() > 0.9){
enemies[i].ZoomEscape();
};
} else {
if ((((enemies[i].x >= 650)) && ((enemies[i].launched == true)))){
if (Math.random() < 0.5){
enemies[i].rotation = 0;
} else {
enemies[i].rotation = (((180 / Math.PI) * Math.atan2((avatar.y - enemies[i].y), (avatar.x - enemies[i].x))) + 180);
};
if (Math.random() > 0.9){
enemies[i].ZoomEscape();
};
} else {
if ((((Math.floor((Math.random() * 1000)) > 960)) && ((enemies[i].Frost.alpha == 0)))){
enemies[i].rotation = (enemies[i].rotation + (Math.random() * 360));
};
};
};
};
};
};
};
};
};
i--;
};
};
}
public function ToBestiary(_arg1:MouseEvent){
CleanUp();
gotoAndStop("bestiary");
}
public function TurretFunction(_arg1:TimerEvent){
var _local2:int;
if ((((((gamePaused == false)) && ((endGame == false)))) && ((enemies.length > 0)))){
_local2 = Math.floor((Math.random() * enemies.length));
if ((((enemies[_local2].splatted == true)) || ((enemies[_local2] is EnemyBoss)))){
i = (enemies.length - 1);
while (i >= 0) {
if ((((enemies[i] is EnemyBoss)) && ((enemies[i].splatted == false)))){
enemies[i].hits = (enemies[i].hits + 10);
break;
} else {
if (enemies[i].splatted == false){
Turret.TurretBarrel.gotoAndPlay("shoot");
Turret.TurretBarrel.rotation = (((180 / Math.PI) * Math.atan2((Turret.y - enemies[i].y), (Turret.x - enemies[i].x))) + 180);
enemies[i].splatted = true;
remainingEnemies++;
lvlKills++;
careerKills++;
turretKills++;
enemies[i].gotoAndPlay("splat");
if (soundToggle == true){
scTurret = turretSnd.play();
scTurret.soundTransform = volTransform;
};
PtsStat.rotation = (-5 + (Math.random() * 10));
PtsStat.visible = true;
if (combo == true){
multiplier++;
comboPts = (comboPts + enemies[i].cashValue);
PtsStat.PtsBox.text = String((((((multiplier + " hits: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
} else {
multiplier = 1;
comboPts = enemies[i].cashValue;
PtsStat.PtsBox.text = String((((((multiplier + " hit: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
};
ptsTimer.stop();
ptsTimer.start();
comboTimer.stop();
combo = true;
comboTimer.start();
break;
};
};
i--;
};
} else {
Turret.TurretBarrel.gotoAndPlay("shoot");
Turret.TurretBarrel.rotation = (((180 / Math.PI) * Math.atan2((Turret.y - enemies[_local2].y), (Turret.x - enemies[_local2].x))) + 180);
enemies[_local2].splatted = true;
remainingEnemies++;
lvlKills++;
careerKills++;
turretKills++;
enemies[_local2].gotoAndPlay("splat");
if (soundToggle == true){
scTurret = turretSnd.play();
scTurret.soundTransform = volTransform;
};
PtsStat.rotation = (-5 + (Math.random() * 10));
PtsStat.visible = true;
if (combo == true){
multiplier++;
comboPts = (comboPts + enemies[_local2].cashValue);
PtsStat.PtsBox.text = String((((((multiplier + " hits: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
} else {
multiplier = 1;
comboPts = enemies[_local2].cashValue;
PtsStat.PtsBox.text = String((((((multiplier + " hit: ") + comboPts) + " pts. X ") + multiplier) + " ="));
PtsStat.PtsBox2.text = String(((comboPts * multiplier) + " pts."));
};
ptsTimer.stop();
ptsTimer.start();
comboTimer.stop();
combo = true;
comboTimer.start();
};
};
}
public function DownMouse(_arg1:MouseEvent){
if ((((((((((((power > 3)) && ((trapped == false)))) && ((stunned == false)))) && ((frozen == false)))) && ((endGame == false)))) && ((gamePaused == false)))){
if ((((accelerating == false)) && ((soundToggle == true)))){
scTwirl = twirlSnd.play();
};
accelerating = true;
};
}
public function StoryEnemyPlace(){
if ((((endGame == false)) && ((gamePaused == false)))){
spawnSide = Math.ceil((Math.random() * 3));
spawnType = Math.floor((Math.random() * 100));
if (currentLvl == 1){
if (spawnType < 50){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
};
} else {
if (currentLvl == 2){
if (spawnType < 50){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
};
} else {
if (currentLvl == 3){
if (spawnType < 30){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 60){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
};
};
} else {
if (currentLvl == 4){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (currentLvl == 5){
if (spawnType < 15){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 30){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 60){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
};
};
};
} else {
if (currentLvl == 6){
if (spawnType < 15){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 50){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
};
};
} else {
if (currentLvl == 7){
if (spawnType < 13){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 25){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 45){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 65){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
};
};
};
};
} else {
if (currentLvl == 8){
if (spawnType < 40){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
};
} else {
if (currentLvl == 9){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (currentLvl == 10){
if (spawnType < 10){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 20){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 35){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 50){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 65){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
};
};
};
};
};
} else {
if (currentLvl == 11){
if (spawnType < 8){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 15){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 28){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 40){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 55){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if (spawnType < 75){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
};
};
};
};
};
};
} else {
if (currentLvl == 12){
if (spawnType < 50){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
};
} else {
if (currentLvl == 13){
if (spawnType < 8){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 15){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 28){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 40){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 50){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if (spawnType < 65){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if (spawnType < 80){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
};
};
};
};
};
};
};
} else {
if (currentLvl == 14){
if (spawnType < 5){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 10){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 20){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 30){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 40){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if (spawnType < 50){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if (spawnType < 68){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
if (spawnType < 80){
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
} else {
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
};
};
};
};
};
};
};
};
} else {
if (currentLvl == 15){
if (spawnType < 30){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 30){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 60){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
};
};
};
} else {
if (currentLvl == 16){
if (spawnType < 3){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 6){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 12){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 20){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 30){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if (spawnType < 45){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if (spawnType < 55){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
if (spawnType < 65){
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
} else {
if (spawnType < 80){
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
} else {
enemy10 = new Enemy10(gameMode);
enemies.push(enemy10);
if (spawnSide == 1){
enemy10.x = 725;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy10.y = -25;
enemy10.x = (100 + (Math.random() * 500));
enemy10.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy10.x = -25;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy10.scaleX = (0.7 + randSize);
enemy10.scaleY = (0.7 + randSize);
enemy10.SlowBlob.visible = false;
enemy10.TrapBlob.visible = false;
Yard.addChild(enemy10);
};
};
};
};
};
};
};
};
};
} else {
if (currentLvl == 17){
if (spawnType < 50){
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
} else {
enemy10 = new Enemy10(gameMode);
enemies.push(enemy10);
if (spawnSide == 1){
enemy10.x = 725;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy10.y = -25;
enemy10.x = (100 + (Math.random() * 500));
enemy10.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy10.x = -25;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy10.scaleX = (0.7 + randSize);
enemy10.scaleY = (0.7 + randSize);
enemy10.SlowBlob.visible = false;
enemy10.TrapBlob.visible = false;
Yard.addChild(enemy10);
};
} else {
if (currentLvl == 18){
if (spawnType < 3){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 6){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 12){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 18){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 25){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if (spawnType < 40){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if (spawnType < 50){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
if (spawnType < 55){
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
} else {
if (spawnType < 65){
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
} else {
if (spawnType < 80){
enemy10 = new Enemy10(gameMode);
enemies.push(enemy10);
if (spawnSide == 1){
enemy10.x = 725;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy10.y = -25;
enemy10.x = (100 + (Math.random() * 500));
enemy10.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy10.x = -25;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy10.scaleX = (0.7 + randSize);
enemy10.scaleY = (0.7 + randSize);
enemy10.SlowBlob.visible = false;
enemy10.TrapBlob.visible = false;
Yard.addChild(enemy10);
} else {
enemy11 = new Enemy11(gameMode);
enemies.push(enemy11);
if (spawnSide == 1){
enemy11.x = 725;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy11.y = -25;
enemy11.x = (100 + (Math.random() * 500));
enemy11.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy11.x = -25;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy11.scaleX = (0.5 + randSize);
enemy11.scaleY = (0.5 + randSize);
enemy11.HitCircle.visible = false;
enemy11.SlowBlob.visible = false;
enemy11.TrapBlob.visible = false;
Yard.addChild(enemy11);
enemy11.gotoAndPlay(1);
};
};
};
};
};
};
};
};
};
};
} else {
if (currentLvl == 19){
if (spawnType < 8){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if (spawnType < 20){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if (spawnType < 32){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
if (spawnType < 46){
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
} else {
if (spawnType < 62){
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
} else {
if (spawnType < 80){
enemy10 = new Enemy10(gameMode);
enemies.push(enemy10);
if (spawnSide == 1){
enemy10.x = 725;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy10.y = -25;
enemy10.x = (100 + (Math.random() * 500));
enemy10.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy10.x = -25;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy10.scaleX = (0.7 + randSize);
enemy10.scaleY = (0.7 + randSize);
enemy10.SlowBlob.visible = false;
enemy10.TrapBlob.visible = false;
Yard.addChild(enemy10);
} else {
enemy11 = new Enemy11(gameMode);
enemies.push(enemy11);
if (spawnSide == 1){
enemy11.x = 725;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy11.y = -25;
enemy11.x = (100 + (Math.random() * 500));
enemy11.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy11.x = -25;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy11.scaleX = (0.5 + randSize);
enemy11.scaleY = (0.5 + randSize);
enemy11.HitCircle.visible = false;
enemy11.SlowBlob.visible = false;
enemy11.TrapBlob.visible = false;
Yard.addChild(enemy11);
enemy11.gotoAndPlay(1);
};
};
};
};
};
};
} else {
if (currentLvl == 20){
if (spawnType < 2){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 4){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 10){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 15){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 20){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if (spawnType < 30){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if (spawnType < 35){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
if (spawnType < 40){
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
} else {
if (spawnType < 60){
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
} else {
if (spawnType < 80){
enemy10 = new Enemy10(gameMode);
enemies.push(enemy10);
if (spawnSide == 1){
enemy10.x = 725;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy10.y = -25;
enemy10.x = (100 + (Math.random() * 500));
enemy10.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy10.x = -25;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy10.scaleX = (0.7 + randSize);
enemy10.scaleY = (0.7 + randSize);
enemy10.SlowBlob.visible = false;
enemy10.TrapBlob.visible = false;
Yard.addChild(enemy10);
} else {
enemy11 = new Enemy11(gameMode);
enemies.push(enemy11);
if (spawnSide == 1){
enemy11.x = 725;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy11.y = -25;
enemy11.x = (100 + (Math.random() * 500));
enemy11.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy11.x = -25;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy11.scaleX = (0.5 + randSize);
enemy11.scaleY = (0.5 + randSize);
enemy11.HitCircle.visible = false;
enemy11.SlowBlob.visible = false;
enemy11.TrapBlob.visible = false;
Yard.addChild(enemy11);
enemy11.gotoAndPlay(1);
};
};
};
};
};
};
};
};
};
};
} else {
if (currentLvl == 21){
if (spawnType < 3){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 6){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if (spawnType < 12){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if (spawnType < 18){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if (spawnType < 25){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if (spawnType < 40){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if (spawnType < 50){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
if (spawnType < 55){
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
} else {
if (spawnType < 65){
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
} else {
if (spawnType < 80){
enemy10 = new Enemy10(gameMode);
enemies.push(enemy10);
if (spawnSide == 1){
enemy10.x = 725;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy10.y = -25;
enemy10.x = (100 + (Math.random() * 500));
enemy10.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy10.x = -25;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy10.scaleX = (0.7 + randSize);
enemy10.scaleY = (0.7 + randSize);
enemy10.SlowBlob.visible = false;
enemy10.TrapBlob.visible = false;
Yard.addChild(enemy10);
} else {
enemy11 = new Enemy11(gameMode);
enemies.push(enemy11);
if (spawnSide == 1){
enemy11.x = 725;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy11.y = -25;
enemy11.x = (100 + (Math.random() * 500));
enemy11.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy11.x = -25;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy11.scaleX = (0.5 + randSize);
enemy11.scaleY = (0.5 + randSize);
enemy11.HitCircle.visible = false;
enemy11.SlowBlob.visible = false;
enemy11.TrapBlob.visible = false;
Yard.addChild(enemy11);
enemy11.gotoAndPlay(1);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function NewEnemySet(_arg1:TimerEvent){
if ((((gamePaused == false)) && ((endGame == false)))){
if (enemies.length <= 25){
spawnSide = Math.ceil((Math.random() * 3));
spawnType = Math.floor((Math.random() * 100));
if (spawnType < 1){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 2){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if ((((spawnType < 20)) && ((spawnRelease >= 1)))){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if ((((spawnType < 30)) && ((spawnRelease >= 2)))){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if ((((spawnType < 40)) && ((spawnRelease >= 3)))){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if ((((spawnType < 50)) && ((spawnRelease >= 4)))){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if ((((spawnType < 60)) && ((spawnRelease >= 5)))){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
if ((((spawnType < 70)) && ((spawnRelease >= 6)))){
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
} else {
if ((((spawnType < 80)) && ((spawnRelease >= 7)))){
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
} else {
if ((((spawnType < 90)) && ((spawnRelease >= 8)))){
enemy10 = new Enemy10(gameMode);
enemies.push(enemy10);
if (spawnSide == 1){
enemy10.x = 725;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy10.y = -25;
enemy10.x = (100 + (Math.random() * 500));
enemy10.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy10.x = -25;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy10.scaleX = (0.7 + randSize);
enemy10.scaleY = (0.7 + randSize);
enemy10.SlowBlob.visible = false;
enemy10.TrapBlob.visible = false;
Yard.addChild(enemy10);
} else {
if (spawnRelease >= 9){
enemy11 = new Enemy11(gameMode);
enemies.push(enemy11);
if (spawnSide == 1){
enemy11.x = 725;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy11.y = -25;
enemy11.x = (100 + (Math.random() * 500));
enemy11.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy11.x = -25;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy11.scaleX = (0.5 + randSize);
enemy11.scaleY = (0.5 + randSize);
enemy11.HitCircle.visible = false;
enemy11.SlowBlob.visible = false;
enemy11.TrapBlob.visible = false;
Yard.addChild(enemy11);
enemy11.gotoAndPlay(1);
} else {
enemyS = new Enemy1(gameMode);
enemies.push(enemyS);
if (spawnSide == 1){
enemyS.x = 725;
enemyS.y = (150 + (Math.random() * 200));
enemyS.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemyS.y = -25;
enemyS.x = (100 + (Math.random() * 500));
enemyS.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemyS.x = -25;
enemyS.y = (150 + (Math.random() * 200));
enemyS.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemyS.scaleX = (0.6 + randSize);
enemyS.scaleY = (0.6 + randSize);
enemyS.SlowBlob.visible = false;
enemyS.TrapBlob.visible = false;
Yard.addChild(enemyS);
};
};
};
};
};
};
};
};
};
};
};
};
if (spawnRelease > 0){
i = spawnRelease;
while (i >= 0) {
if ((((enemies.length <= 10)) && ((Math.random() < 0.5)))){
spawnSide = Math.ceil((Math.random() * 3));
spawnType = Math.floor((Math.random() * 100));
if (spawnType < 5){
enemy1 = new Enemy1(gameMode);
enemies.push(enemy1);
if (spawnSide == 1){
enemy1.x = 725;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy1.y = -25;
enemy1.x = (100 + (Math.random() * 500));
enemy1.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy1.x = -25;
enemy1.y = (150 + (Math.random() * 200));
enemy1.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy1.scaleX = (0.6 + randSize);
enemy1.scaleY = (0.6 + randSize);
enemy1.SlowBlob.visible = false;
enemy1.TrapBlob.visible = false;
Yard.addChild(enemy1);
} else {
if (spawnType < 10){
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
} else {
if ((((spawnType < 15)) && ((x >= 1)))){
enemy3 = new Enemy3(gameMode);
enemies.push(enemy3);
if (spawnSide == 1){
enemy3.x = 725;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy3.y = -25;
enemy3.x = (100 + (Math.random() * 500));
enemy3.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy3.x = -25;
enemy3.y = (150 + (Math.random() * 200));
enemy3.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy3.scaleX = (0.7 + randSize);
enemy3.scaleY = (0.7 + randSize);
enemy3.SlowBlob.visible = false;
enemy3.TrapBlob.visible = false;
Yard.addChild(enemy3);
} else {
if ((((spawnType < 25)) && ((spawnRelease >= 2)))){
enemy4 = new Enemy4(gameMode);
enemies.push(enemy4);
if (spawnSide == 1){
enemy4.x = 725;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy4.y = -25;
enemy4.x = (100 + (Math.random() * 500));
enemy4.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy4.x = -25;
enemy4.y = (150 + (Math.random() * 200));
enemy4.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy4.scaleX = (0.5 + randSize);
enemy4.scaleY = (0.5 + randSize);
enemy4.SlowBlob.visible = false;
enemy4.TrapBlob.visible = false;
Yard.addChild(enemy4);
enemy4.gotoAndPlay(1);
} else {
if ((((spawnType < 35)) && ((spawnRelease >= 3)))){
enemy5 = new Enemy5(gameMode);
enemies.push(enemy5);
if (spawnSide == 1){
enemy5.x = 725;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy5.y = -25;
enemy5.x = (100 + (Math.random() * 500));
enemy5.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy5.x = -25;
enemy5.y = (150 + (Math.random() * 200));
enemy5.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.2);
enemy5.scaleX = (1.1 + randSize);
enemy5.scaleY = (1.1 + randSize);
enemy5.HitCircle.visible = false;
enemy5.SlowBlob.visible = false;
enemy5.TrapBlob.visible = false;
Yard.addChild(enemy5);
} else {
if ((((spawnType < 50)) && ((spawnRelease >= 4)))){
enemy6 = new Enemy6(gameMode);
enemies.push(enemy6);
if (spawnSide == 1){
enemy6.x = 725;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy6.y = -25;
enemy6.x = (100 + (Math.random() * 500));
enemy6.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy6.x = -25;
enemy6.y = (150 + (Math.random() * 200));
enemy6.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy6.scaleX = (0.7 + randSize);
enemy6.scaleY = (0.7 + randSize);
enemy6.SlowBlob.visible = false;
enemy6.TrapBlob.visible = false;
Yard.addChild(enemy6);
} else {
if ((((spawnType < 65)) && ((spawnRelease >= 5)))){
enemy7 = new Enemy7(gameMode);
enemies.push(enemy7);
if (spawnSide == 1){
enemy7.x = 725;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy7.y = -25;
enemy7.x = (100 + (Math.random() * 500));
enemy7.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy7.x = -25;
enemy7.y = (150 + (Math.random() * 200));
enemy7.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy7.scaleX = (0.7 + randSize);
enemy7.scaleY = (0.7 + randSize);
enemy7.SlowBlob.visible = false;
enemy7.TrapBlob.visible = false;
Yard.addChild(enemy7);
} else {
if ((((spawnType < 75)) && ((spawnRelease >= 6)))){
enemy8 = new Enemy8(gameMode);
enemies.push(enemy8);
if (spawnSide == 1){
enemy8.x = 725;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy8.y = -25;
enemy8.x = (100 + (Math.random() * 500));
enemy8.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy8.x = -25;
enemy8.y = (150 + (Math.random() * 200));
enemy8.rotation = (150 + (Math.random() * 60));
};
};
};
enemy8.scaleX = 0.5;
enemy8.scaleY = 0.5;
enemy8.SlowBlob.visible = false;
enemy8.TrapBlob.visible = false;
Yard.addChild(enemy8);
} else {
if ((((spawnType < 85)) && ((spawnRelease >= 7)))){
enemy9 = new Enemy9(gameMode);
enemies.push(enemy9);
if (spawnSide == 1){
enemy9.x = 725;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy9.y = -25;
enemy9.x = (100 + (Math.random() * 500));
enemy9.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy9.x = -25;
enemy9.y = (150 + (Math.random() * 200));
enemy9.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy9.scaleX = (0.8 + randSize);
enemy9.scaleY = (0.8 + randSize);
enemy9.SlowBlob.visible = false;
enemy9.TrapBlob.visible = false;
enemy9.FlareBody.alpha = 0;
Yard.addChild(enemy9);
} else {
if ((((spawnType < 95)) && ((spawnRelease >= 8)))){
enemy10 = new Enemy10(gameMode);
enemies.push(enemy10);
if (spawnSide == 1){
enemy10.x = 725;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy10.y = -25;
enemy10.x = (100 + (Math.random() * 500));
enemy10.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy10.x = -25;
enemy10.y = (150 + (Math.random() * 200));
enemy10.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy10.scaleX = (0.7 + randSize);
enemy10.scaleY = (0.7 + randSize);
enemy10.SlowBlob.visible = false;
enemy10.TrapBlob.visible = false;
Yard.addChild(enemy10);
} else {
if (spawnRelease >= 9){
enemy11 = new Enemy11(gameMode);
enemies.push(enemy11);
if (spawnSide == 1){
enemy11.x = 725;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy11.y = -25;
enemy11.x = (100 + (Math.random() * 500));
enemy11.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy11.x = -25;
enemy11.y = (150 + (Math.random() * 200));
enemy11.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.3);
enemy11.scaleX = (0.5 + randSize);
enemy11.scaleY = (0.5 + randSize);
enemy11.HitCircle.visible = false;
enemy11.SlowBlob.visible = false;
enemy11.TrapBlob.visible = false;
Yard.addChild(enemy11);
enemy11.gotoAndPlay(1);
} else {
enemy2 = new Enemy2(gameMode);
enemies.push(enemy2);
if (spawnSide == 1){
enemy2.x = 725;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemy2.y = -25;
enemy2.x = (100 + (Math.random() * 500));
enemy2.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemy2.x = -25;
enemy2.y = (150 + (Math.random() * 200));
enemy2.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemy2.scaleX = (0.6 + randSize);
enemy2.scaleY = (0.6 + randSize);
enemy2.SlowBlob.visible = false;
enemy2.TrapBlob.visible = false;
Yard.addChild(enemy2);
};
};
};
};
};
};
};
};
};
};
};
};
i--;
};
};
};
}
public function ContinueGame(_arg1:MouseEvent){
if ((((gameModeInt == 1)) || ((gameModeInt == 2)))){
CleanUp();
MovieClip(root).gameMode = "continue";
gotoAndStop("play");
introIsPlaying = false;
introBGMTimer.stop();
scBGM.stop();
} else {
MenuBox.text = String("\nNo saved game in Story-Mode found.");
};
}
public function ToTut(_arg1:MouseEvent){
CleanUp();
gotoAndStop("tutorial");
}
public function ScoreGame(_arg1:int){
lvlScore = (lvlScore + _arg1);
if ((((gameMode == "normal")) || ((gameMode == "expert")))){
gameScore = (gameScore + _arg1);
ScoreStat.ScoreBox.text = String((gameScore + " pts."));
trace(gameScore);
} else {
ScoreStat.ScoreBox.text = String((lvlScore + " pts."));
};
careerScore = (careerScore + _arg1);
lvlCash = (lvlCash + _arg1);
if ((((lvlScore >= 20000)) && ((HASdiamondTrophy == false)))){
HASdiamondTrophy = true;
TrophyDisplay.gotoAndStop("diamondTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
if ((((gameScore >= 20000)) && ((HASdiamondTrophy == false)))){
HASdiamondTrophy = true;
TrophyDisplay.gotoAndStop("diamondTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
}
public function BossSet(){
if ((((gamePaused == false)) && ((endGame == false)))){
bossPlaced = true;
BossLife.visible = true;
enemyBoss = new EnemyBoss(gameMode);
enemies.push(enemyBoss);
if (spawnSide == 1){
enemyBoss.x = 725;
enemyBoss.y = (150 + (Math.random() * 200));
enemyBoss.rotation = (-30 + (Math.random() * 60));
} else {
if (spawnSide == 2){
enemyBoss.y = -25;
enemyBoss.x = (100 + (Math.random() * 500));
enemyBoss.rotation = (-60 - (Math.random() * 60));
} else {
if (spawnSide == 3){
enemyBoss.x = -25;
enemyBoss.y = (150 + (Math.random() * 200));
enemyBoss.rotation = (150 + (Math.random() * 60));
};
};
};
randSize = (Math.random() * 0.1);
enemyBoss.scaleX = difficulty;
enemyBoss.scaleY = difficulty;
enemyBoss.SlowBlob.visible = false;
enemyBoss.TrapBlob.visible = false;
enemyBoss.HitCircle.visible = false;
enemyBoss.freezeFire.visible = false;
enemyBoss.Metal.visible = false;
enemyBoss.Frost.alpha = 0;
Yard.addChild(enemyBoss);
};
}
public function BackToMenuWin(_arg1:MouseEvent){
gotoAndStop("menu");
}
public function YardCheck(_arg1:TimerEvent){
var _local2:Boolean;
if ((((endGame == false)) && ((gamePaused == false)))){
_local2 = false;
i = (enemies.length - 1);
while (i >= 0) {
if (((((((Yard.YardArea.hitTestPoint(enemies[i].x, enemies[i].y)) && ((enemies[i].splatted == false)))) && ((enemies[i].trappedState == false)))) && ((twirling == false)))){
health = (health - enemies[i].enemyDamage);
flawlessLvl = false;
careerDamage = (careerDamage + enemies[i].enemyDamage);
_local2 = true;
num = 0;
};
i--;
};
if ((((((sprinklerEquipped == true)) && ((health < totHealth)))) && ((num >= 1)))){
health++;
num = 0;
} else {
if (((((sprinklerEquipped) && ((health < totHealth)))) && ((num < 1)))){
num++;
};
};
};
}
public function ClockFunction(_arg1:TimerEvent){
careerTime++;
if ((((careerTime >= 3600)) && ((HASclockTrophy == false)))){
HASclockTrophy = true;
TrophyDisplay.gotoAndStop("clockTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
}
public function BackToMenu2(_arg1:MouseEvent){
gotoAndStop("menu");
SetCookies();
}
public function BackToMenu3(_arg1:MouseEvent){
gotoAndStop("menu");
SetCookies();
}
public function BackToMenu4(_arg1:MouseEvent){
gotoAndStop("menu");
}
public function BackToMenu5(_arg1:MouseEvent){
gotoAndStop("menu");
SetCookies();
}
public function BackToMenu6(_arg1:MouseEvent){
gotoAndStop("menu");
SetCookies();
SendToKong();
}
public function ContinueGame2(_arg1:MouseEvent){
stage.removeEventListener(MouseEvent.CLICK, StorePurchases);
gotoAndStop("play");
introIsPlaying = false;
introBGMTimer.stop();
scBGM.stop();
SetCookies();
SendToKong();
}
public function BackToMenuLvl(_arg1:MouseEvent){
gotoAndStop("menu");
}
public function LobieTrapFunction(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
trapped = false;
trappedTimer.stop();
avatar.JellySac.gotoAndStop(1);
};
}
public function OverMouse3(_arg1:MouseEvent){
if (_arg1.target == eTrophy1){
eTrophy1.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Red Mollet:\nAwarded for slaying a Red Mollet.");
} else {
if (_arg1.target == eTrophy2){
eTrophy2.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Orange Mollet:\nAwarded for slaying an Orange Mollet.");
} else {
if (_arg1.target == eTrophy3){
eTrophy3.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Dentist:\nAwarded for slaying a Dentist.");
} else {
if (_arg1.target == eTrophy4){
eTrophy4.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Whipster:\nAwarded for slaying a Whipster.");
} else {
if (_arg1.target == eTrophy5){
eTrophy5.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Welderbeast:\nAwarded for slaying a Welderbeast.");
} else {
if (_arg1.target == eTrophy6){
eTrophy6.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Glowflare:\nAwarded for slaying a Glowflare before he explodes.");
} else {
if (_arg1.target == eTrophy7){
eTrophy7.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Hardguy:\nAwarded for slaying a Hardguy.");
} else {
if (_arg1.target == eTrophy8){
eTrophy8.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Metal Hardguy:\nAwarded for slaying a Hardguy, but while he's in Metal Form.");
} else {
if (_arg1.target == eTrophy9){
eTrophy9.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Glutton:\nAwarded for slaying a Glutton.");
} else {
if (_arg1.target == eTrophy10){
eTrophy10.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Chatterbox:\nAwarded for slaying a Chatterbox.");
} else {
if (_arg1.target == eTrophy11){
eTrophy11.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Lobie:\nAwarded for slaying a Lobie.");
} else {
if (_arg1.target == eTrophy12){
eTrophy12.gotoAndStop(2);
AwardsBox.text = String("Taxidermied Moleshark:\nAwarded for slaying a Moleshark.");
} else {
if (_arg1.target == bhemothTrophy){
bhemothTrophy.gotoAndStop(2);
AwardsBox.text = String("Genuine B. Hemoth Skin Rug:\nAwarded for defeating the legendary B. Hemoth. Ooh, he's so soft!");
} else {
if (_arg1.target == riderTrophy){
riderTrophy.gotoAndStop(2);
AwardsBox.text = String("Commemorative Key Chain:\nAwarded for purchasing the Riding Mower, a killer combination of luxury, comfort, and power.");
} else {
if (_arg1.target == grassTrophy){
grassTrophy.gotoAndStop(2);
AwardsBox.text = String("Pristine Sod Sample:\nAwarded for beating an entire level on expert difficulty without letting any enemies on your lawn.");
} else {
if (_arg1.target == easyTrophy){
easyTrophy.gotoAndStop(2);
AwardsBox.text = String("#1 Lawnmower Operator Trophy (Small):\nAwarded for beating the game on Normal Difficulty.");
} else {
if (_arg1.target == hardTrophy){
hardTrophy.gotoAndStop(2);
AwardsBox.text = String("#1 Lawnmower Operator Trophy (Large):\nAwarded for beating the game on Expert Difficulty.");
} else {
if (_arg1.target == clockTrophy){
clockTrophy.gotoAndStop(2);
AwardsBox.text = String("Grandfather Clock:\nAwarded for playing the game for a total of one hour. Wow, you have no life.");
} else {
if (_arg1.target == timeTrophy3){
timeTrophy3.gotoAndStop(2);
AwardsBox.text = String("Bronze Medal:\nAwarded for surviving for two minutes in Time Attack Mode. Sort of prestigious, I guess.");
} else {
if (_arg1.target == timeTrophy2){
timeTrophy2.gotoAndStop(2);
AwardsBox.text = String("Silver Medal:\nAwarded for surviving for three minutes in Time Attack Mode. Prestigious.");
} else {
if (_arg1.target == timeTrophy1){
timeTrophy1.gotoAndStop(2);
AwardsBox.text = String("Gold Medal:\nAwarded for surviving for a whopping five minutes in Time Attack Mode. Very prestigious.");
} else {
if (_arg1.target == thumbTrophy){
thumbTrophy.gotoAndStop(2);
AwardsBox.text = String("Severed Green Thumb:\nAwarded for killing 500 enemies in a single Time Attack game.");
} else {
if (_arg1.target == gnomeTrophy){
gnomeTrophy.gotoAndStop(2);
AwardsBox.text = String("Ceramic Garden Gnome:\nAwarded for earning a career total $30,000.");
} else {
if (_arg1.target == dogtagTrophy){
dogtagTrophy.gotoAndStop(2);
AwardsBox.text = String("Army Dog Tags:\nAwarded for 100 kills with the Auto-Turret.");
} else {
if (_arg1.target == purpleTrophy){
purpleTrophy.gotoAndStop(2);
AwardsBox.text = String("Purple Heart:\nAwarded for being stunned, knocked out, frozen, blinded, and trapped.");
} else {
if (_arg1.target == orderTrophy){
orderTrophy.gotoAndStop(2);
AwardsBox.text = String("Restraining Order:\nAwarded for getting creepy with the clerk at the Hardware Store. (But, we'll still let you shop there)");
} else {
if (_arg1.target == licenseTrophy){
licenseTrophy.gotoAndStop(2);
AwardsBox.text = String("Class C Driver's License:\nAwarded for maxing out your lawnmower's Tune Up Options.");
} else {
if (_arg1.target == boomerangTrophy){
boomerangTrophy.gotoAndStop(2);
AwardsBox.text = String("Authentic Boomerang:\nAwarded for achieving a 30-hit combo.");
} else {
if (_arg1.target == diamondTrophy){
diamondTrophy.gotoAndStop(2);
AwardsBox.text = String("20 Karat Diamond:\nAwarded for a high score of 20,000 or above.");
} else {
if (_arg1.target == BG3){
AwardsBox.text = String("\nRollover a trophy for details about how to earn it.");
TrophyStatus();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function OverMouse4(_arg1:MouseEvent){
if (_arg1.target == fertilizerBtn){
ShopBox.text = String("One bag of grade-A Gro Up fertilizer instantly increases your lawn's maximum health by 10%. [max: 200]");
} else {
if (_arg1.target == repellentBtn){
ShopBox.text = String("Placing this foul smelling deer musk around your yard slows enemy movement by 50% for the next round.");
} else {
if (_arg1.target == turretBtn){
ShopBox.text = String("A must-have for suburban home security. This motion-activated machine gun nest tears through anything that moves (except you of course).");
} else {
if (_arg1.target == bladesBtn){
ShopBox.text = String("Longer and sharper blades do more damage in a larger area. These can also slice through metal, if your torque is maxed out.");
} else {
if (_arg1.target == riderBtn){
ShopBox.text = String("The Rider is the ultimate lawn mowing experience. This baby is much stronger and faster than the standard push mower.");
} else {
if (_arg1.target == sprinklerBtn){
ShopBox.text = String("Installing this sprinkler system replenishes your lawn's health over time. Directions: Just add water.");
} else {
if (_arg1.target == fenceBtn){
ShopBox.text = String("Originally designed to shock pets trying to get out of the yard, this model has been revamped to electrocute anything trying to get in.");
} else {
if (_arg1.target == throttle1){
throttle1.gotoAndStop(3);
ShopBox.text = String("Improving your mower's throttle increases its movement speed. Lvl 1: $80");
} else {
if (_arg1.target == throttle2){
throttle2.gotoAndStop(3);
ShopBox.text = String("Improving your mower's throttle increases its movement speed. Lvl 2: $160");
} else {
if (_arg1.target == throttle3){
throttle3.gotoAndStop(3);
ShopBox.text = String("Improving your mower's throttle increases its movement speed. Lvl 3: $320");
} else {
if (_arg1.target == throttle4){
throttle4.gotoAndStop(3);
ShopBox.text = String("Improving your mower's throttle increases its movement speed. Lvl 4: $580");
} else {
if (_arg1.target == throttle5){
throttle5.gotoAndStop(3);
ShopBox.text = String("Improving your mower's throttle increases its movement speed. Lvl 5: $1100");
} else {
if (_arg1.target == throttle6){
throttle6.gotoAndStop(3);
ShopBox.text = String("Improving your mower's throttle increases its movement speed. Lvl 6: $2200");
} else {
if (_arg1.target == throttle7){
throttle7.gotoAndStop(3);
ShopBox.text = String("Improving your mower's throttle increases its movement speed. Lvl 7: $3600");
} else {
if (_arg1.target == thermostat1){
thermostat1.gotoAndStop(3);
ShopBox.text = String("A better thermostat keeps the engine cool, making your Cyclone Spin ability more effective and recharging it more quickly. Lvl 1: $50");
} else {
if (_arg1.target == thermostat2){
thermostat2.gotoAndStop(3);
ShopBox.text = String("A better thermostat keeps the engine cool, making your Cyclone Spin ability more effective and recharging it more quickly. Lvl 2: $150");
} else {
if (_arg1.target == thermostat3){
thermostat3.gotoAndStop(3);
ShopBox.text = String("A better thermostat keeps the engine cool, making your Cyclone Spin ability more effective and recharging it more quickly. Lvl 3: $300");
} else {
if (_arg1.target == thermostat4){
thermostat4.gotoAndStop(3);
ShopBox.text = String("A better thermostat keeps the engine cool, making your Cyclone Spin ability more effective and recharging it more quickly. Lvl 4: $600");
} else {
if (_arg1.target == thermostat5){
thermostat5.gotoAndStop(3);
ShopBox.text = String("A better thermostat keeps the engine cool, making your Cyclone Spin ability more effective and recharging it more quickly. Lvl 5: $1000");
} else {
if (_arg1.target == thermostat6){
thermostat6.gotoAndStop(3);
ShopBox.text = String("A better thermostat keeps the engine cool, making your Cyclone Spin ability more effective and recharging it more quickly. Lvl 6: $2000");
} else {
if (_arg1.target == thermostat7){
thermostat7.gotoAndStop(3);
ShopBox.text = String("A better thermostat keeps the engine cool, making your Cyclone Spin ability more effective and recharging it more quickly. Lvl 7: $3500");
} else {
if (_arg1.target == torque1){
torque1.gotoAndStop(3);
ShopBox.text = String("More powerful torque spins the mower blades more effectively, causing more damage on impact. Lvl 1: $100");
} else {
if (_arg1.target == torque2){
torque2.gotoAndStop(3);
ShopBox.text = String("More powerful torque spins the mower blades more effectively, causing more damage on impact. Lvl 2: $200");
} else {
if (_arg1.target == torque3){
torque3.gotoAndStop(3);
ShopBox.text = String("More powerful torque spins the mower blades more effectively, causing more damage on impact. Lvl 3: $400");
} else {
if (_arg1.target == torque4){
torque4.gotoAndStop(3);
ShopBox.text = String("More powerful torque spins the mower blades more effectively, causing more damage on impact. Lvl 4: $700");
} else {
if (_arg1.target == torque5){
torque5.gotoAndStop(3);
ShopBox.text = String("More powerful torque spins the mower blades more effectively, causing more damage on impact. Lvl 5: $1200");
} else {
if (_arg1.target == torque6){
torque6.gotoAndStop(3);
ShopBox.text = String("More powerful torque spins the mower blades more effectively, causing more damage on impact. Lvl 6: $2500");
} else {
if (_arg1.target == torque7){
torque7.gotoAndStop(3);
ShopBox.text = String("More powerful torque spins the mower blades more effectively, causing more damage on impact. Lvl 7: $5000");
} else {
if (_arg1.target == refundBtn){
ShopBox.text = String("Sell your stuff and start fresh. You only get your highest tune-up buys and unused repellent. Otherwise no penalty, and it won't affect trophies.");
} else {
if (_arg1.target == BG4){
ShopBox.text = String("Welcome to Face Hardware: Your one-stop shop for all your lawn-care needs. Rollover merchandise to examine. Click to purchase.");
TuneUpCheck();
} else {
if (_arg1.target == hardwareStoreGuy){
ShopBox.text = String("\nFrank the friendly store clerk.");
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function BGMLoop2(_arg1:TimerEvent){
BGMTimer2.stop();
scBGM.stop();
if (Math.random() < 0.5){
scBGM = BGM.play();
scBGM.soundTransform = volTransformBGM;
BGMTimer.start();
} else {
scBGM = BGM2.play();
scBGM.soundTransform = volTransformBGM;
BGMTimer2.start();
};
}
public function OverMouse2(_arg1:MouseEvent){
if (_arg1.target == e1Btn){
BestiaryBox.gotoAndStop(2);
} else {
if (_arg1.target == e2Btn){
BestiaryBox.gotoAndStop(3);
} else {
if (_arg1.target == e3Btn){
BestiaryBox.gotoAndStop(4);
} else {
if (_arg1.target == e4Btn){
BestiaryBox.gotoAndStop(5);
} else {
if (_arg1.target == e5Btn){
BestiaryBox.gotoAndStop(6);
} else {
if (_arg1.target == e6Btn){
BestiaryBox.gotoAndStop(7);
} else {
if (_arg1.target == e7Btn){
BestiaryBox.gotoAndStop(8);
} else {
if (_arg1.target == e8Btn){
BestiaryBox.gotoAndStop(9);
} else {
if (_arg1.target == e9Btn){
BestiaryBox.gotoAndStop(10);
} else {
if (_arg1.target == e10Btn){
BestiaryBox.gotoAndStop(11);
} else {
if (_arg1.target == e11Btn){
BestiaryBox.gotoAndStop(12);
} else {
if (_arg1.target == BG2){
BestiaryBox.gotoAndStop(1);
};
};
};
};
};
};
};
};
};
};
};
};
}
public function BackToMenu(_arg1:MouseEvent){
stage.removeEventListener(MouseEvent.CLICK, StorePurchases);
gotoAndStop("menu");
SetCookies();
SendToKong();
}
public function TrophyDisplayDrop(_arg1:TimerEvent){
trophyDisplayCtr++;
if (trophyDisplayCtr <= 5){
TrophyDisplay.y = (TrophyDisplay.y + 15);
} else {
if (trophyDisplayCtr <= 15){
TrophyDisplay.y = (TrophyDisplay.y + 0);
} else {
if (trophyDisplayCtr <= 20){
TrophyDisplay.y = (TrophyDisplay.y - 15);
} else {
if (trophyDisplayCtr > 20){
trophyDisplayCtr = 0;
trophyDisplayTimer.stop();
};
};
};
};
}
public function OptionOut(_arg1:MouseEvent){
if (_arg1.target == soundBtn){
if (soundToggle == true){
soundBtn.gotoAndStop("on");
} else {
soundBtn.gotoAndStop("off");
};
if (cursor != null){
if (currentFrame == 3){
if (PauseBox.visible == false){
Mouse.hide();
cursor.visible = true;
};
};
};
} else {
if (_arg1.target == musicBtn){
if (musicToggle == true){
musicBtn.gotoAndStop("on");
} else {
musicBtn.gotoAndStop("off");
};
if (cursor != null){
if (currentFrame == 3){
if (PauseBox.visible == false){
Mouse.hide();
cursor.visible = true;
};
};
};
};
};
}
public function UpMouse(_arg1:MouseEvent){
accelerating = false;
volTwirl.volume = 0;
}
public function FrozenFunction(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
frozen = false;
frozenTimer.stop();
avatar.JellySac.gotoAndStop(1);
};
}
public function OptionControl(_arg1:MouseEvent){
if (_arg1.target == soundBtn){
if (soundToggle == true){
soundBtn.gotoAndStop("off");
volTransform.volume = 0;
volTransform2.volume = 0;
volTransform3.volume = 0;
volTransform5.volume = 0;
volFull.volume = 0;
volTwirl.volume = 0;
volEarRinging.volume = 0;
soundToggle = false;
} else {
soundBtn.gotoAndStop("on");
volTransform.volume = 0.5;
volTransform2.volume = 0.2;
volTransform3.volume = 0.2;
volTransform5.volume = 0.5;
volFull.volume = 1;
volTwirl.volume = 1;
soundToggle = true;
};
} else {
if (_arg1.target == musicBtn){
if (musicToggle == true){
volTransformBGM.volume = 0;
scBGM.soundTransform = volTransformBGM;
musicToggle = false;
musicBtn.gotoAndStop("off");
} else {
musicBtn.gotoAndStop("on");
volTransformBGM.volume = 0.1;
scBGM.soundTransform = volTransformBGM;
musicToggle = true;
};
};
};
}
public function FenceFunction(_arg1:TimerEvent){
if ((((endGame == false)) && ((gamePaused == false)))){
if (soundToggle == true){
scFull = fenceSnd.play();
};
Yard.ElectricFence.FenceLightning.gotoAndPlay("shock");
};
}
public function ResumeFunction(_arg1:MouseEvent){
if (_arg1.target == PauseBox.startLvlBtn){
gamePaused = false;
PauseBox.visible = false;
stage.addEventListener(Event.ENTER_FRAME, LoopGame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, DownMouse);
stage.addEventListener(MouseEvent.MOUSE_UP, UpMouse);
stage.addEventListener(KeyboardEvent.KEY_DOWN, PauseFunction);
PauseBox.removeEventListener(MouseEvent.CLICK, MovieClip(root).ClickEquip);
avatar.x = 275;
avatar.y = 250;
avatar.scaleX = 0.6;
avatar.scaleY = 0.6;
UpperYard.addChild(avatar);
if ((((bladesEquipped == true)) && ((riderEquipped == true)))){
avatar.gotoAndStop(2);
avatar.SpinnerBlade.scaleX = 1.7;
avatar.SpinnerBlade.scaleY = 1.7;
mowerSpeed = 1.5;
attackDamage = 10;
} else {
if (riderEquipped == true){
avatar.gotoAndStop(2);
mowerSpeed = 1.5;
attackDamage = 8;
avatar.SpinnerBlade.scaleX = 2;
avatar.SpinnerBlade.scaleY = 2;
} else {
if (bladesEquipped == true){
avatar.gotoAndStop(1);
avatar.SpinnerBlade.scaleX = 1;
avatar.SpinnerBlade.scaleY = 1;
mowerSpeed = 1;
attackDamage = 7;
} else {
avatar.SpinnerBlade.scaleX = 1;
avatar.SpinnerBlade.scaleY = 1;
avatar.gotoAndStop(1);
mowerSpeed = 1;
attackDamage = 5;
};
};
};
if (repellentEquipped == true){
Yard.Repellent.visible = true;
} else {
Yard.Repellent.visible = false;
};
avatar.SpinnerBlade.HitCircle.visible = false;
avatar.SpinnerBlade.HitCircle2.visible = false;
avatar.HitCircleCenter.visible = false;
if (bladesEquipped == true){
avatar.SpinnerBlade.gotoAndStop(2);
} else {
avatar.SpinnerBlade.gotoAndStop(1);
};
if (sprinklerEquipped == true){
Yard.Sprinkler.visible = true;
w.x = Yard.Sprinkler.x;
w.y = Yard.Sprinkler.y;
w.alpha = 0.5;
w.scaleX = 0.7;
w.scaleY = 0.7;
parent.addChild(w);
} else {
Yard.Sprinkler.visible = false;
};
if (turretEquipped == true){
Turret.TurretBarrel.rotation = -90;
Turret.visible = true;
turretTimer.addEventListener(TimerEvent.TIMER, TurretFunction);
turretTimer.start();
} else {
Turret.visible = false;
};
if (fenceEquipped == true){
Yard.ElectricFence.visible = true;
Yard.ElectricFence.FenceLightning.alpha = 0.8;
fenceTimer.addEventListener(TimerEvent.TIMER, FenceFunction);
fenceTimer.start();
} else {
Yard.ElectricFence.visible = false;
};
if (gameMode == "time"){
newEnemyTimer = new Timer(spawnRate);
newEnemyTimer.addEventListener(TimerEvent.TIMER, NewEnemySet);
newEnemyTimer.start();
} else {
spawnRate2 = ((2000 - (30 * (currentLvl - 1))) / difficulty);
storyEnemyTimer = new Timer(spawnRate2);
storyEnemyTimer.addEventListener(TimerEvent.TIMER, StoryEnemySet);
storyEnemyTimer.start();
};
powerTimer.addEventListener(TimerEvent.TIMER, PowerFunction);
powerTimer.start();
if (gameMode == "time"){
spawnTimer.addEventListener(TimerEvent.TIMER, SpawnFunction);
spawnTimer.start();
};
stunTimer.addEventListener(TimerEvent.TIMER, DentistStun);
trappedTimer.addEventListener(TimerEvent.TIMER, LobieTrapFunction);
frozenTimer.addEventListener(TimerEvent.TIMER, FrozenFunction);
ptsTimer.addEventListener(TimerEvent.TIMER, PtsFunction);
comboTimer.addEventListener(TimerEvent.TIMER, ComboFunction);
blindTimer.addEventListener(TimerEvent.TIMER, BlindFunction);
unblindTimer.addEventListener(TimerEvent.TIMER, UnblindFunction);
Mouse.hide();
cursor.visible = true;
cursor.x = mouseX;
cursor.y = mouseY;
parent.addChild(cursor);
sndTimer1.addEventListener(TimerEvent.TIMER, snd1Func);
sndTimer2.addEventListener(TimerEvent.TIMER, snd2Func);
sndTimer3.addEventListener(TimerEvent.TIMER, snd3Func);
sndTimer5.addEventListener(TimerEvent.TIMER, snd5Func);
timeTimer.addEventListener(TimerEvent.TIMER, TimeFunction);
timeTimer.start();
yardTimer.addEventListener(TimerEvent.TIMER, YardCheck);
yardTimer.start();
} else {
if ((((_arg1.target == PauseBox.resumeBtn)) && ((endGame == false)))){
gamePaused = false;
PauseBox.visible = false;
stage.addEventListener(Event.ENTER_FRAME, LoopGame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, DownMouse);
stage.addEventListener(MouseEvent.MOUSE_UP, UpMouse);
powerTimer.addEventListener(TimerEvent.TIMER, PowerFunction);
powerTimer.start();
stunTimer.addEventListener(TimerEvent.TIMER, DentistStun);
trappedTimer.addEventListener(TimerEvent.TIMER, LobieTrapFunction);
frozenTimer.addEventListener(TimerEvent.TIMER, FrozenFunction);
ptsTimer.addEventListener(TimerEvent.TIMER, PtsFunction);
comboTimer.addEventListener(TimerEvent.TIMER, ComboFunction);
blindTimer.addEventListener(TimerEvent.TIMER, BlindFunction);
unblindTimer.addEventListener(TimerEvent.TIMER, UnblindFunction);
Mouse.hide();
cursor.visible = true;
cursor.x = mouseX;
cursor.y = mouseY;
parent.addChild(cursor);
sndTimer1.addEventListener(TimerEvent.TIMER, snd1Func);
sndTimer2.addEventListener(TimerEvent.TIMER, snd2Func);
sndTimer3.addEventListener(TimerEvent.TIMER, snd3Func);
sndTimer5.addEventListener(TimerEvent.TIMER, snd5Func);
yardTimer.addEventListener(TimerEvent.TIMER, YardCheck);
yardTimer.start();
} else {
if ((((_arg1.target == PauseBox.quitBtn)) && ((endGame == false)))){
PauseBox.visible = false;
endGame = true;
gameLoseTimer.addEventListener(TimerEvent.TIMER, GameLose);
gameLoseTimer.start();
};
};
};
}
public function LvlComplete(){
completeCtr++;
BlindBox.alpha = (BlindBox.alpha + 0.05);
if (completeCtr >= 20){
endGame = false;
stunned = false;
frozen = false;
trapped = false;
completeCtr = 0;
ScoreGame((comboPts * multiplier));
if (multiplier > highMultiplier){
highMultiplier = multiplier;
};
if ((((multiplier > 30)) && ((HASboomerangTrophy == false)))){
HASboomerangTrophy = true;
TrophyDisplay.gotoAndStop("boomerangTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
comboPts = 0;
multiplier = 0;
accelerating = false;
currentLvl++;
power = totPower;
health = totHealth;
sc1.stop();
sc2.stop();
sc3.stop();
sc5.stop();
scTwirl.stop();
scFull.stop();
scBoss.stop();
scTurret.stop();
scEarRing.stop();
if (enemies.length > 0){
i = (enemies.length - 1);
while (i >= 0) {
if ((enemies[i] is Enemy6)){
if (enemies[i].exploding == false){
enemies[i].splatted = true;
Yard.removeChild(enemies[i]);
enemies.splice(i, 1);
};
} else {
enemies[i].splatted = true;
Yard.removeChild(enemies[i]);
enemies.splice(i, 1);
};
i--;
};
};
if (spikes.length > 0){
i = (spikes.length - 1);
while (i >= 0) {
Yard.removeChild(spikes[i]);
spikes.splice(i, 1);
i--;
};
};
if (traps.length > 0){
i = (traps.length - 1);
while (i >= 0) {
traps[i].sprung = true;
Yard.FootprintArea.removeChild(traps[i]);
traps.splice(i, 1);
i--;
};
};
if (sprinklerEquipped == true){
parent.removeChild(w);
};
stage.removeEventListener(Event.ENTER_FRAME, LoopGame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, DownMouse);
stage.removeEventListener(MouseEvent.MOUSE_UP, UpMouse);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, PauseFunction);
PauseBox.removeEventListener(MouseEvent.CLICK, ResumeFunction);
if (gameMode == "time"){
newEnemyTimer.removeEventListener(TimerEvent.TIMER, NewEnemySet);
newEnemyTimer.stop();
} else {
storyEnemyTimer.removeEventListener(TimerEvent.TIMER, StoryEnemySet);
storyEnemyTimer.stop();
};
powerTimer.removeEventListener(TimerEvent.TIMER, PowerFunction);
powerTimer.stop();
spawnTimer.removeEventListener(TimerEvent.TIMER, SpawnFunction);
spawnTimer.stop();
ptsTimer.removeEventListener(TimerEvent.TIMER, PtsFunction);
ptsTimer.stop();
comboTimer.removeEventListener(TimerEvent.TIMER, ComboFunction);
comboTimer.stop();
BGMTimer.removeEventListener(TimerEvent.TIMER, BGMLoop);
BGMTimer.stop();
BGMTimer2.removeEventListener(TimerEvent.TIMER, BGMLoop2);
BGMTimer2.stop();
yardTimer.removeEventListener(TimerEvent.TIMER, YardCheck);
yardTimer.stop();
scBGM.stop();
sndTimer1.removeEventListener(TimerEvent.TIMER, snd1Func);
sndTimer2.removeEventListener(TimerEvent.TIMER, snd2Func);
sndTimer3.removeEventListener(TimerEvent.TIMER, snd3Func);
sndTimer5.removeEventListener(TimerEvent.TIMER, snd5Func);
timeTimer.removeEventListener(TimerEvent.TIMER, TimeFunction);
timeTimer.stop();
fenceTimer.removeEventListener(TimerEvent.TIMER, FenceFunction);
fenceTimer.stop();
turretTimer.removeEventListener(TimerEvent.TIMER, TurretFunction);
turretTimer.stop();
blindTimer.removeEventListener(TimerEvent.TIMER, BlindFunction);
unblindTimer.removeEventListener(TimerEvent.TIMER, UnblindFunction);
blindTimer.stop();
unblindTimer.stop();
parent.removeChild(cursor);
Mouse.show();
if (lvlScore > highScore){
highScore = lvlScore;
} else {
if (gameScore > highScore){
highScore = gameScore;
};
};
if (lvlKills > highKills){
highKills = lvlKills;
};
if ((((lvlTime > highTime)) && ((gameMode == "time")))){
highTime = lvlTime;
};
if (lvlCash > highCash){
highCash = lvlCash;
};
if ((((currentLvl > highLvlNormal)) && ((gameMode == "normal")))){
highLvlNormal = currentLvl;
};
if ((((currentLvl > highLvlExpert)) && ((gameMode == "expert")))){
highLvlExpert = currentLvl;
};
if ((((((gameMode == "expert")) && ((flawlessLvl == true)))) && ((HASgrassTrophy == false)))){
HASgrassTrophy = true;
TrophyDisplay.gotoAndStop("grassTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
if (repellentEquipped == true){
repellent = false;
repellentEquipped = false;
};
SetCookies();
SendToKong();
gotoAndStop("levelcomplete");
};
}
public function BGMLoop(_arg1:TimerEvent){
BGMTimer.stop();
scBGM.stop();
if (Math.random() < 0.5){
scBGM = BGM.play();
scBGM.soundTransform = volTransformBGM;
BGMTimer.start();
} else {
scBGM = BGM2.play();
scBGM.soundTransform = volTransformBGM;
BGMTimer2.start();
};
}
public function ClearCookies(){
cookieCrunch.deleteCookie();
currentCash = 0;
lvlCash = 0;
lvlScore = 0;
gameScore = 0;
lvlTime = 0;
lvlKills = 0;
remainingEnemies = 0;
highKills = 0;
highScore = 0;
highTime = 0;
highCash = 0;
highLvlNormal = 0;
highLvlExpert = 0;
highMultiplier = 0;
careerTime = 0;
careerCash = 0;
careerScore = 0;
careerKills = 0;
careerDamage = 0;
trophyCount = 0;
fenceKills = 0;
turretKills = 0;
currentLvl = 1;
HASeTrophy1 = false;
HASeTrophy2 = false;
HASeTrophy3 = false;
HASeTrophy4 = false;
HASeTrophy5 = false;
HASeTrophy6 = false;
HASeTrophy7 = false;
HASeTrophy8 = false;
HASeTrophy9 = false;
HASeTrophy10 = false;
HASeTrophy11 = false;
HASeTrophy12 = false;
HASriderTrophy = false;
HASgrassTrophy = false;
HASeasyTrophy = false;
HAShardTrophy = false;
HASbhemothTrophy = false;
HASclockTrophy = false;
HAStimeTrophy1 = false;
HAStimeTrophy2 = false;
HAStimeTrophy3 = false;
HASthumbTrophy = false;
HASgnomeTrophy = false;
HASlicenseTrophy = false;
HASdogtagTrophy = false;
HASpurpleTrophy = false;
HASorderTrophy = false;
HASboomerangTrophy = false;
HASdiamondTrophy = false;
beenStunned = false;
beenBlasted = false;
beenTrapped = false;
beenFrozen = false;
beenBlinded = false;
blades = false;
repellent = false;
sprinkler = false;
turret = false;
rider = false;
fence = false;
bladesEquipped = false;
repellentEquipped = false;
sprinklerEquipped = false;
turretEquipped = false;
riderEquipped = false;
fenceEquipped = false;
health = 100;
totHealth = 100;
throttle = 1;
torque = 1;
thermostat = 1;
gameModeInt = 0;
gameMode = "test";
}
public function StoryEnemySet(_arg1:TimerEvent){
if ((((((gamePaused == false)) && ((enemies.length <= 25)))) && ((endGame == false)))){
StoryEnemyPlace();
if (bossPlaced == false){
if ((((gameMode == "expert")) && ((Math.random() < 0.3)))){
StoryEnemyPlace();
};
if (currentLvl > 1){
i = Math.ceil((currentLvl / 2));
while (i >= 0) {
if (Math.random() < 0.1){
StoryEnemyPlace();
};
i--;
};
};
};
};
}
public function PauseFunction(_arg1:KeyboardEvent){
if ((((((_arg1.keyCode == 32)) && ((PauseBox.visible == false)))) && ((endGame == false)))){
stage.removeEventListener(Event.ENTER_FRAME, LoopGame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, DownMouse);
stage.removeEventListener(MouseEvent.MOUSE_UP, UpMouse);
gamePaused = true;
powerTimer.removeEventListener(TimerEvent.TIMER, PowerFunction);
powerTimer.stop();
ptsTimer.removeEventListener(TimerEvent.TIMER, PtsFunction);
comboTimer.removeEventListener(TimerEvent.TIMER, ComboFunction);
parent.removeChild(cursor);
Mouse.show();
sndTimer1.removeEventListener(TimerEvent.TIMER, snd1Func);
sndTimer2.removeEventListener(TimerEvent.TIMER, snd2Func);
sndTimer3.removeEventListener(TimerEvent.TIMER, snd3Func);
sndTimer5.removeEventListener(TimerEvent.TIMER, snd5Func);
stunTimer.removeEventListener(TimerEvent.TIMER, DentistStun);
stunTimer.stop();
trappedTimer.removeEventListener(TimerEvent.TIMER, LobieTrapFunction);
trappedTimer.stop();
frozenTimer.removeEventListener(TimerEvent.TIMER, FrozenFunction);
frozenTimer.stop();
yardTimer.removeEventListener(TimerEvent.TIMER, YardCheck);
yardTimer.stop();
PauseBox.gotoAndStop("pauselevel");
PauseBox.visible = true;
} else {
if ((((((_arg1.keyCode == 32)) && ((PauseBox.visible == true)))) && ((endGame == false)))){
PauseBox.visible = false;
gamePaused = false;
stage.addEventListener(Event.ENTER_FRAME, LoopGame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, DownMouse);
stage.addEventListener(MouseEvent.MOUSE_UP, UpMouse);
powerTimer.addEventListener(TimerEvent.TIMER, PowerFunction);
powerTimer.start();
stunTimer.addEventListener(TimerEvent.TIMER, DentistStun);
stunTimer.start();
trappedTimer.addEventListener(TimerEvent.TIMER, LobieTrapFunction);
trappedTimer.start();
frozenTimer.addEventListener(TimerEvent.TIMER, FrozenFunction);
frozenTimer.start();
ptsTimer.addEventListener(TimerEvent.TIMER, PtsFunction);
comboTimer.addEventListener(TimerEvent.TIMER, ComboFunction);
Mouse.hide();
cursor.visible = true;
cursor.x = mouseX;
cursor.y = mouseY;
parent.addChild(cursor);
sndTimer1.addEventListener(TimerEvent.TIMER, snd1Func);
sndTimer2.addEventListener(TimerEvent.TIMER, snd2Func);
sndTimer3.addEventListener(TimerEvent.TIMER, snd3Func);
sndTimer5.addEventListener(TimerEvent.TIMER, snd5Func);
yardTimer.addEventListener(TimerEvent.TIMER, YardCheck);
yardTimer.start();
};
};
}
public function SetCookies(){
cookieCrunch.setCookie("HASeTrophy1", HASeTrophy1);
cookieCrunch.setCookie("HASeTrophy2", HASeTrophy2);
cookieCrunch.setCookie("HASeTrophy3", HASeTrophy3);
cookieCrunch.setCookie("HASeTrophy4", HASeTrophy4);
cookieCrunch.setCookie("HASeTrophy5", HASeTrophy5);
cookieCrunch.setCookie("HASeTrophy6", HASeTrophy6);
cookieCrunch.setCookie("HASeTrophy7", HASeTrophy7);
cookieCrunch.setCookie("HASeTrophy8", HASeTrophy8);
cookieCrunch.setCookie("HASeTrophy9", HASeTrophy9);
cookieCrunch.setCookie("HASeTrophy10", HASeTrophy10);
cookieCrunch.setCookie("HASeTrophy11", HASeTrophy11);
cookieCrunch.setCookie("HASeTrophy12", HASeTrophy12);
cookieCrunch.setCookie("HASriderTrophy", HASriderTrophy);
cookieCrunch.setCookie("HASgrassTrophy", HASgrassTrophy);
cookieCrunch.setCookie("HASeasyTrophy", HASeasyTrophy);
cookieCrunch.setCookie("HAShardTrophy", HAShardTrophy);
cookieCrunch.setCookie("HASbhemothTrophy", HASbhemothTrophy);
cookieCrunch.setCookie("HASclockTrophy", HASclockTrophy);
cookieCrunch.setCookie("HAStimeTrophy1", HAStimeTrophy1);
cookieCrunch.setCookie("HAStimeTrophy2", HAStimeTrophy2);
cookieCrunch.setCookie("HAStimeTrophy3", HAStimeTrophy3);
cookieCrunch.setCookie("HASthumbTrophy", HASthumbTrophy);
cookieCrunch.setCookie("HASgnomeTrophy", HASgnomeTrophy);
cookieCrunch.setCookie("HASlicenseTrophy", HASlicenseTrophy);
cookieCrunch.setCookie("HASdogtagTrophy", HASdogtagTrophy);
cookieCrunch.setCookie("HASpurpleTrophy", HASpurpleTrophy);
cookieCrunch.setCookie("HASorderTrophy", HASorderTrophy);
cookieCrunch.setCookie("HASboomerangTrophy", HASboomerangTrophy);
cookieCrunch.setCookie("HASdiamondTrophy", HASdiamondTrophy);
cookieCrunch.setCookie("beenStunned", beenStunned);
cookieCrunch.setCookie("beenBlasted", beenBlasted);
cookieCrunch.setCookie("beenTrapped", beenTrapped);
cookieCrunch.setCookie("beenFrozen", beenFrozen);
cookieCrunch.setCookie("beenBlinded", beenBlinded);
cookieCrunch.setCookie("blades", blades);
cookieCrunch.setCookie("rider", rider);
cookieCrunch.setCookie("fence", fence);
cookieCrunch.setCookie("turret", turret);
cookieCrunch.setCookie("sprinkler", sprinkler);
cookieCrunch.setCookie("repellent", repellent);
cookieCrunch.setCookieInt("careerTime", careerTime);
cookieCrunch.setCookieInt("careerCash", careerCash);
cookieCrunch.setCookieInt("careerKills", careerKills);
cookieCrunch.setCookieInt("careerScore", careerScore);
cookieCrunch.setCookieInt("careerDamage", careerDamage);
cookieCrunch.setCookieInt("trophyCount", trophyCount);
cookieCrunch.setCookieInt("fenceKills", fenceKills);
cookieCrunch.setCookieInt("turretKills", turretKills);
cookieCrunch.setCookieInt("highKills", highKills);
cookieCrunch.setCookieInt("highScore", highScore);
cookieCrunch.setCookieInt("highTime", highTime);
cookieCrunch.setCookieInt("highCash", highCash);
cookieCrunch.setCookieInt("highLvlNormal", highLvlNormal);
cookieCrunch.setCookieInt("highLvlExpert", highLvlExpert);
cookieCrunch.setCookieInt("highMultiplier", highMultiplier);
cookieCrunch.setCookieInt("currentCash", currentCash);
cookieCrunch.setCookieInt("spentCash", spentCash);
cookieCrunch.setCookieInt("currentLvl", currentLvl);
cookieCrunch.setCookieInt("lvlScore", lvlScore);
cookieCrunch.setCookieInt("gameScore", gameScore);
cookieCrunch.setCookieInt("totHealth", totHealth);
cookieCrunch.setCookieInt("health", health);
cookieCrunch.setCookieInt("torque", torque);
cookieCrunch.setCookieInt("thermostat", thermostat);
cookieCrunch.setCookieInt("throttle", throttle);
cookieCrunch.setCookieInt("gameModeInt", gameModeInt);
cookieCrunch.soFlush();
}
public function ToSite2(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://hotairraccoon.com/");
navigateToURL(_local2);
}
public function ToSite3(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://hotairraccoon.com/");
navigateToURL(_local2);
}
public function TuneUpCheck(){
if (torque == 8){
torque7.gotoAndStop(4);
} else {
if (currentCash >= 5000){
torque7.gotoAndStop(2);
} else {
torque7.gotoAndStop(1);
};
};
if (torque >= 7){
torque6.gotoAndStop(4);
} else {
if (currentCash >= 2500){
torque6.gotoAndStop(2);
} else {
torque6.gotoAndStop(1);
};
};
if (torque >= 6){
torque5.gotoAndStop(4);
} else {
if (currentCash >= 1200){
torque5.gotoAndStop(2);
} else {
torque5.gotoAndStop(1);
};
};
if (torque >= 5){
torque4.gotoAndStop(4);
} else {
if (currentCash >= 700){
torque4.gotoAndStop(2);
} else {
torque4.gotoAndStop(1);
};
};
if (torque >= 4){
torque3.gotoAndStop(4);
} else {
if (currentCash >= 400){
torque3.gotoAndStop(2);
} else {
torque3.gotoAndStop(1);
};
};
if (torque >= 3){
torque2.gotoAndStop(4);
} else {
if (currentCash >= 200){
torque2.gotoAndStop(2);
} else {
torque2.gotoAndStop(1);
};
};
if (torque >= 2){
torque1.gotoAndStop(4);
} else {
if (currentCash >= 100){
torque1.gotoAndStop(2);
} else {
torque1.gotoAndStop(1);
};
};
if (thermostat == 8){
thermostat7.gotoAndStop(4);
} else {
if (currentCash >= 3500){
thermostat7.gotoAndStop(2);
} else {
thermostat7.gotoAndStop(1);
};
};
if (thermostat >= 7){
thermostat6.gotoAndStop(4);
} else {
if (currentCash >= 2000){
thermostat6.gotoAndStop(2);
} else {
thermostat6.gotoAndStop(1);
};
};
if (thermostat >= 6){
thermostat5.gotoAndStop(4);
} else {
if (currentCash >= 1000){
thermostat5.gotoAndStop(2);
} else {
thermostat5.gotoAndStop(1);
};
};
if (thermostat >= 5){
thermostat4.gotoAndStop(4);
} else {
if (currentCash >= 600){
thermostat4.gotoAndStop(2);
} else {
thermostat4.gotoAndStop(1);
};
};
if (thermostat >= 4){
thermostat3.gotoAndStop(4);
} else {
if (currentCash >= 300){
thermostat3.gotoAndStop(2);
} else {
thermostat3.gotoAndStop(1);
};
};
if (thermostat >= 3){
thermostat2.gotoAndStop(4);
} else {
if (currentCash >= 150){
thermostat2.gotoAndStop(2);
} else {
thermostat2.gotoAndStop(1);
};
};
if (thermostat >= 2){
thermostat1.gotoAndStop(4);
} else {
if (currentCash >= 50){
thermostat1.gotoAndStop(2);
} else {
thermostat1.gotoAndStop(1);
};
};
if (throttle == 8){
throttle7.gotoAndStop(4);
} else {
if (currentCash >= 3600){
throttle7.gotoAndStop(2);
} else {
throttle7.gotoAndStop(1);
};
};
if (throttle >= 7){
throttle6.gotoAndStop(4);
} else {
if (currentCash >= 2200){
throttle6.gotoAndStop(2);
} else {
throttle6.gotoAndStop(1);
};
};
if (throttle >= 6){
throttle5.gotoAndStop(4);
} else {
if (currentCash >= 1100){
throttle5.gotoAndStop(2);
} else {
throttle5.gotoAndStop(1);
};
};
if (throttle >= 5){
throttle4.gotoAndStop(4);
} else {
if (currentCash >= 580){
throttle4.gotoAndStop(2);
} else {
throttle4.gotoAndStop(1);
};
};
if (throttle >= 4){
throttle3.gotoAndStop(4);
} else {
if (currentCash >= 320){
throttle3.gotoAndStop(2);
} else {
throttle3.gotoAndStop(1);
};
};
if (throttle >= 3){
throttle2.gotoAndStop(4);
} else {
if (currentCash >= 160){
throttle2.gotoAndStop(2);
} else {
throttle2.gotoAndStop(1);
};
};
if (throttle >= 2){
throttle1.gotoAndStop(4);
} else {
if (currentCash >= 80){
throttle1.gotoAndStop(2);
} else {
throttle1.gotoAndStop(1);
};
};
if ((((((((throttle == 8)) && ((thermostat == 8)))) && ((torque == 8)))) && ((HASlicenseTrophy == false)))){
HASlicenseTrophy = true;
TrophyDisplay.gotoAndStop("licenseTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
}
public function Tickle(_arg1:MouseEvent){
tickleCtr++;
if (tickleCtr == 1){
ShopBox.text = String("\nThat tickles!");
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd1.play();
scFull.soundTransform = volFull;
};
} else {
if (tickleCtr == 2){
ShopBox.text = String("\nHey stop it!");
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd2.play();
scFull.soundTransform = volFull;
};
} else {
if (tickleCtr == 3){
ShopBox.text = String("\nPlease stop tickling me.");
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd3.play();
scFull.soundTransform = volFull;
};
} else {
if (tickleCtr == 4){
ShopBox.text = String("\nYou're creeping me out.");
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd4.play();
scFull.soundTransform = volFull;
};
} else {
if (tickleCtr == 5){
ShopBox.text = String("\nI said STOP!");
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd1.play();
scFull.soundTransform = volFull;
};
} else {
if (tickleCtr == 6){
ShopBox.text = String("\nI'm going to call the cops on you.");
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd4.play();
scFull.soundTransform = volFull;
};
} else {
if (tickleCtr == 7){
ShopBox.text = String("\nHelp! Police!");
if (HASorderTrophy == false){
HASorderTrophy = true;
TrophyDisplay.gotoAndStop("orderTrophy");
TrophyDisplay.y = -40;
trophyDisplayCtr = 0;
trophyDisplayTimer.start();
trophyCount++;
};
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd3.play();
scFull.soundTransform = volFull;
};
} else {
if (Math.random() < 0.25){
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd1.play();
scFull.soundTransform = volFull;
};
} else {
if (Math.random() < 0.5){
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd2.play();
scFull.soundTransform = volFull;
};
} else {
if (Math.random() < 0.75){
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd3.play();
scFull.soundTransform = volFull;
};
} else {
if (soundToggle == true){
scFull.stop();
scFull = giggleSnd4.play();
scFull.soundTransform = volFull;
};
};
};
};
ShopBox.text = String("\nYou're weird.");
};
};
};
};
};
};
};
}
}
}//package
Section 83
//giggle1 (giggle1)
package {
import flash.media.*;
public dynamic class giggle1 extends Sound {
}
}//package
Section 84
//giggle2 (giggle2)
package {
import flash.media.*;
public dynamic class giggle2 extends Sound {
}
}//package
Section 85
//giggle3 (giggle3)
package {
import flash.media.*;
public dynamic class giggle3 extends Sound {
}
}//package
Section 86
//giggle4 (giggle4)
package {
import flash.media.*;
public dynamic class giggle4 extends Sound {
}
}//package
Section 87
//gunClick (gunClick)
package {
import flash.media.*;
public dynamic class gunClick extends Sound {
}
}//package
Section 88
//LawnCookies (LawnCookies)
package {
import flash.net.*;
public class LawnCookies {
private var so:SharedObject;
public function LawnCookies(){
so = SharedObject.getLocal("LawnCookie");
}
public function soFlush(){
so.flush();
}
public function readCookieInt(_arg1:String):int{
return (so.data[_arg1]);
}
public function setCookie(_arg1:String, _arg2:Object):void{
so.data[_arg1] = _arg2;
}
public function setCookieInt(_arg1:String, _arg2:int):void{
so.data[_arg1] = _arg2;
}
public function readCookie(_arg1:String):Object{
return (so.data[_arg1]);
}
public function deleteCookie(){
so.clear();
}
}
}//package
Section 89
//lobieSet (lobieSet)
package {
import flash.media.*;
public dynamic class lobieSet extends Sound {
}
}//package
Section 90
//LobieTrap (LobieTrap)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class LobieTrap extends MovieClip {
public var sprung:Boolean;// = false
public var disappearTimer:Timer;
public function LobieTrap(){
disappearTimer = new Timer(2000);
sprung = false;
super();
disappearTimer.addEventListener(TimerEvent.TIMER, DisappearFunction);
disappearTimer.start();
}
public function DisappearFunction(_arg1:TimerEvent){
if (this.sprung == false){
this.sprung = true;
disappearTimer.stop();
MovieClip(root).traps.splice(this, 1);
parent.removeChild(this);
};
}
}
}//package
Section 91
//MachineGun (MachineGun)
package {
import flash.media.*;
public dynamic class MachineGun extends Sound {
}
}//package
Section 92
//Mower (Mower)
package {
import flash.media.*;
public dynamic class Mower extends Sound {
}
}//package
Section 93
//Mower3 (Mower3)
package {
import flash.media.*;
public dynamic class Mower3 extends Sound {
}
}//package
Section 94
//PurchasedText (PurchasedText)
package {
import flash.display.*;
public dynamic class PurchasedText extends MovieClip {
}
}//package
Section 95
//RunningToNowhere (RunningToNowhere)
package {
import flash.media.*;
public dynamic class RunningToNowhere extends Sound {
}
}//package
Section 96
//Slap2 (Slap2)
package {
import flash.media.*;
public dynamic class Slap2 extends Sound {
}
}//package
Section 97
//SmashGlass2 (SmashGlass2)
package {
import flash.media.*;
public dynamic class SmashGlass2 extends Sound {
}
}//package
Section 98
//SpikeProjectile (SpikeProjectile)
package {
import flash.display.*;
public dynamic class SpikeProjectile extends MovieClip {
}
}//package
Section 99
//Spinner (Spinner)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class Spinner extends MovieClip {
public var JellySac:MovieClip;
public var HitCircleCenter:MovieClip;
public var SpinnerBlade:MovieClip;
public var LawnMower:MovieClip;
public function Spinner(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 100
//StrikeBlade (StrikeBlade)
package {
import flash.media.*;
public dynamic class StrikeBlade extends Sound {
}
}//package
Section 101
//TwirlSnd (TwirlSnd)
package {
import flash.media.*;
public dynamic class TwirlSnd extends Sound {
}
}//package
Section 102
//Water (Water)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class Water extends MovieClip {
public function Water(){
addFrameScript(8, frame9);
}
function frame9(){
gotoAndPlay(1);
}
}
}//package