Section 1
//BitmapRedrawer (ayz.components.image.BitmapRedrawer)
package ayz.components.image {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ayz.interfaces.*;
import ayz.utils.*;
import flash.utils.*;
import ayz.templates.*;
public class BitmapRedrawer extends Component implements IComponent {
protected var _onError:String;
protected var _removeOriginals:Boolean;
protected var _autoStart:Boolean;
protected var _delay:Number;
private var _inspectables:Array;
protected var currentMC:Number;// = 0
protected var _snapToPixels:String;
protected var _targetMCs:Array;
protected var _onCacheComplete:String;
protected var _yOffset:Number;
public var _content:MovieClip;
protected var totalRequiredInspectables:Number;// = 11
protected var _edgePadding:Number;
protected var _xOffset:Number;
protected var _smoothing:Boolean;
public function BitmapRedrawer():void{
totalRequiredInspectables = 11;
currentMC = 0;
_targetMCs = new Array();
_inspectables = new Array();
super();
addFrameScript(0, frame1);
}
public function set xOffset(_arg1:Number):void{
_xOffset = _arg1;
setInspectable("xOffset");
}
function frame1(){
}
public function get targetMCs():Array{
return (_targetMCs);
}
public function set onCacheComplete(_arg1:String):void{
_onCacheComplete = _arg1;
setInspectable("onCacheComplete");
}
public function get yOffset():Number{
return (_yOffset);
}
public function get removeOriginals():Boolean{
return (_removeOriginals);
}
public function set onError(_arg1:String):void{
_onError = _arg1;
setInspectable("onError");
}
public function set targetMCs(_arg1:Array):void{
_targetMCs = _arg1;
setInspectable("targetMCs");
}
public function set yOffset(_arg1:Number):void{
_yOffset = _arg1;
setInspectable("yOffset");
}
public function set smoothing(_arg1:Boolean):void{
_smoothing = _arg1;
setInspectable("smoothing");
}
public function get snapToPixels():String{
return (_snapToPixels.toString());
}
public function set delay(_arg1:Number):void{
_delay = _arg1;
setInspectable("delay");
}
public function init():void{
var _local1:Timer;
if (_delay == 0){
cacheNow();
} else {
_local1 = new Timer((_delay * 1000), 1);
_local1.addEventListener("timer", cacheNow);
_local1.start();
};
}
public function get xOffset():Number{
return (_xOffset);
}
public function set edgePadding(_arg1:Number):void{
_edgePadding = _arg1;
setInspectable("edgePadding");
}
public function set removeOriginals(_arg1:Boolean):void{
_removeOriginals = _arg1;
setInspectable("removeOriginals");
}
public function get onCacheComplete():String{
return (_onCacheComplete);
}
public function get onError():String{
return (_onError);
}
public function get smoothing():Boolean{
return (_smoothing);
}
public function get delay():Number{
return (_delay);
}
protected function MCsSet():Boolean{
if (_targetMCs.length > 0){
return (true);
};
return (false);
}
protected function runFunction(_arg1:String, _arg2=null):void{
if (((!((_arg1 == ""))) && (Functions.eval(this.parent, _arg1)))){
if (_arg2 != null){
Functions.eval(this.parent, _arg1)(_arg2);
} else {
Functions.eval(this.parent, _arg1)();
};
};
}
protected function cacheNext():void{
var _local1:DisplayObject;
var _local2:Sprite;
var _local3:BitmapData;
var _local4:Matrix;
var _local5:Bitmap;
var _local6:Rectangle;
var _local7:Point;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_local1 = Functions.eval(this.parent, _targetMCs[currentMC]);
if (_local1){
_local2 = new Sprite();
_local3 = new BitmapData((_local1.width + (_edgePadding * 2)), (_local1.height + (_edgePadding * 2)), true, 0);
_local4 = new Matrix();
_local6 = _local1.getBounds(this.parent);
_local7 = new Point(_local1.x, _local1.y);
this.parent.localToGlobal(_local7);
this.parent.globalToLocal(_local7);
_local8 = (_local6.left - _local7.x);
_local9 = (_local6.top - _local7.y);
_local10 = (_edgePadding - _local8);
_local11 = (_edgePadding - _local9);
_local4.scale(_local1.scaleX, _local1.scaleY);
_local4.rotate(((_local1.rotation * Math.PI) / 180));
_local4.translate(_local10, _local11);
_local3.draw(_local1, _local4);
_local5 = new Bitmap(_local3, _snapToPixels, _smoothing);
_local5.x = (_local8 - _edgePadding);
_local5.y = (_local9 - _edgePadding);
_local2.addChild(_local5);
_local2.x = (_local1.x + _xOffset);
_local2.y = (_local1.y + _yOffset);
_local2.alpha = _local1.alpha;
_local2.blendMode = _local1.blendMode;
this.parent.addChild(_local2);
if (_removeOriginals){
_local1.parent.swapChildren(_local1, _local2);
_local1.parent.removeChild(_local1);
};
runFunction(_onCacheComplete, _local2);
if (currentMC < (_targetMCs.length - 1)){
currentMC++;
cacheNext();
};
} else {
runFunction(_onError, ("BITMAP REDRAW ERROR: Invalid or missing Movieclips. Error @ " + this));
};
}
public function get edgePadding():Number{
return (_edgePadding);
}
protected function setInspectable(_arg1:String):void{
if (_inspectables.indexOf(_arg1) == -1){
_inspectables.push(_arg1);
};
if ((((_inspectables.length >= totalRequiredInspectables)) && (MCsSet()))){
if (_autoStart){
init();
};
};
}
public function reinit():void{
init();
}
public function set snapToPixels(_arg1:String):void{
_snapToPixels = _arg1;
setInspectable("snapToPixels");
}
public function set autoStart(_arg1:Boolean):void{
_autoStart = _arg1;
setInspectable("autoStart");
}
public function get autoStart():Boolean{
return (_autoStart);
}
public function cacheNow(_arg1:TimerEvent=null):void{
currentMC = 0;
cacheNext();
}
}
}//package ayz.components.image
Section 2
//AyzEvent (ayz.events.AyzEvent)
package ayz.events {
public class AyzEvent {
public static const SETTINGS_LOADED:String = "SettingsLoaded";
public static const APP_LOADED:String = "AppLoaded";
public static const TEMPORARY_MUTE_ON:String = "TempMuteOn";
public static const APP_LOAD_PROGRESS:String = "AppLoadProgress";
public static const TEMPORARY_MUTE_OFF:String = "TempMuteOff";
public static const STAGE_RESIZED:String = "StageResized";
public static const UNMUTE_ALL:String = "UNMUTE_ALL";
public static const APP_INITIALIZED:String = "AppInit";
public static const LANGUAGE_CHANGE:String = "LanguageChange";
public static const LANGUAGE_CHANGE_COMPLETE:String = "LanguageChangeComplete";
public static const MUTE_ALL:String = "MUTE_ALL";
public static const APP_LOADING:String = "AppLoading";
}
}//package ayz.events
Section 3
//IComponent (ayz.interfaces.IComponent)
package ayz.interfaces {
public interface IComponent {
function removeInterests(_arg1:Array):void;
function catchEvent(_arg1:String, _arg2:Object):void;
function addInterests(_arg1:Array):void;
function destroy():void;
}
}//package ayz.interfaces
Section 4
//EventManager (ayz.managers.EventManager)
package ayz.managers {
public class EventManager {
private static var interestsList:Object = new Object();
public static function fireEvent(_arg1:String, _arg2:Object=null):void{
var _local3:Array;
var _local4:int;
if ((EventManager.interestsList[_arg1] is Array)){
_local3 = EventManager.interestsList[_arg1].concat();
_local4 = 0;
while (_local4 < _local3.length) {
if (((!((_local3[_local4] == null))) && (!((_local3[_local4].catchEvent == null))))){
_local3[_local4].catchEvent(_arg1, _arg2);
} else {
throw (new Error(("catchEvent Function not found on " + _local3[_local4])));
};
_local4++;
};
};
}
public static function unregisterInterests(_arg1, _arg2:Array):void{
var _local3:int;
var _local4:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if ((EventManager.interestsList[_arg2[_local3]] is Array)){
_local4 = EventManager.interestsList[_arg2[_local3]].indexOf(_arg1);
if (_local4 != -1){
EventManager.interestsList[_arg2[_local3]].splice(_local4, 1);
};
};
_local3++;
};
}
public static function registerInterests(_arg1, _arg2:Array):void{
var _local3:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if ((EventManager.interestsList[_arg2[_local3]] is Array)){
if (EventManager.interestsList[_arg2[_local3]].indexOf(_arg1) == -1){
EventManager.interestsList[_arg2[_local3]].push(_arg1);
} else {
throw (new Error(((("Trying to add duplicate interest (" + _arg2[_local3]) + ") on ") + _arg1)));
};
} else {
EventManager.interestsList[_arg2[_local3]] = new Array(_arg1);
};
_local3++;
};
}
}
}//package ayz.managers
Section 5
//Component (ayz.templates.Component)
package ayz.templates {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import ayz.interfaces.*;
import ayz.managers.*;
import ayz.events.*;
import ayz.*;
import ayz.utils.*;
public class Component extends MovieClip implements IComponent {
private var eventInterests:Array;
private var interests:Array;
public var eventCheck:Function;
public function Component():void{
interests = new Array();
eventInterests = new Array();
super();
addInterests(new Array(AyzEvent.MUTE_ALL, AyzEvent.UNMUTE_ALL, AyzEvent.TEMPORARY_MUTE_ON, AyzEvent.TEMPORARY_MUTE_OFF));
if (((Settings.isMuted) || (Settings.isTempMuted))){
soundTransform = new SoundTransform(0);
};
registerEvent(Event.REMOVED_FROM_STAGE, removedFromStage);
}
public function destroy():void{
soundTransform = new SoundTransform(0);
removeAllInterests();
interests = new Array();
unregisterAllEvents();
}
private function _active():void{
}
public function removedFromStage(_arg1:Event):void{
destroy();
}
public function unregisterAllEvents():void{
var _local1:int;
var _local2:Object;
_local1 = 0;
while (_local1 < eventInterests.length) {
_local2 = eventInterests[_local1];
removeEventListener(_local2.type, _local2.listener, _local2.useCapture);
eventInterests.splice(_local1, 1);
_local1++;
};
eventInterests = new Array();
}
public function removeInterests(_arg1:Array):void{
var _local2:int;
var _local3:int;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = interests.indexOf(_arg1[_local2]);
if (_local3 != -1){
interests.splice(_local3, 1);
};
_local2++;
};
EventManager.unregisterInterests(this, _arg1);
}
private function outcomplete():void{
}
public function catchEvent(_arg1:String, _arg2:Object):void{
defaultCatchEvent(_arg1, _arg2);
}
private function _out():void{
}
public function registerEvent(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=true):void{
var _local6:Object;
_local6 = {type:_arg1, listener:_arg2, useCapture:_arg3, priority:_arg4, useWeakReference:_arg5};
addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
eventInterests.push(_local6);
}
public function unregisterEvent(_arg1:String, _arg2:Function=null):void{
var _local3:int;
var _local4:Object;
_local3 = 0;
while (_local3 < eventInterests.length) {
_local4 = eventInterests[_local3];
if (_local4.type == _arg1){
if ((((_arg2 == null)) || ((_local4.listener == _arg2)))){
removeEventListener(_local4.type, _local4.listener, _local4.useCapture);
eventInterests.splice(_local3, 1);
};
};
_local3++;
};
}
public function removeAllInterests():void{
EventManager.unregisterInterests(this, interests);
interests = new Array();
}
protected function defaultCatchEvent(_arg1:String, _arg2:Object):void{
if ((((_arg1 == AyzEvent.MUTE_ALL)) || ((_arg1 == AyzEvent.TEMPORARY_MUTE_ON)))){
soundTransform = new SoundTransform(0);
};
if ((((_arg1 == AyzEvent.UNMUTE_ALL)) || ((_arg1 == AyzEvent.TEMPORARY_MUTE_OFF)))){
soundTransform = new SoundTransform(1);
};
if (eventCheck != null){
eventCheck(_arg1, _arg2);
};
}
private function inComplete():void{
}
private function _in():void{
}
public function addInterests(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
interests.push(_arg1[_local2]);
_local2++;
};
EventManager.registerInterests(this, _arg1);
}
}
}//package ayz.templates
Section 6
//Functions (ayz.utils.Functions)
package ayz.utils {
import flash.display.*;
import flash.geom.*;
public class Functions {
public static function shuffleArray(_arg1:Array, _arg2:int=0, _arg3:int=0):Array{
var _local4:int;
var _local5:int;
var _local6:*;
if (_arg3 == 0){
_arg3 = (_arg1.length - 1);
};
_local4 = _arg3;
while (_local4 > _arg2) {
_local5 = (Math.floor((Math.random() * _arg3)) + _arg2);
_local6 = _arg1[_local4];
_arg1[_local4] = _arg1[_local5];
_arg1[_local5] = _local6;
_local4--;
};
return (_arg1);
}
public static function getName(_arg1):String{
var _local2:String;
_local2 = "";
do {
if (_arg1.name){
_local2 = (_arg1.name + ((_local2 == "")) ? "" : ("." + _local2));
};
_arg1 = _arg1.parent;
} while (_arg1);
return (_local2);
}
public static function showChildren(_arg1:DisplayObjectContainer, _arg2:Number=0):void{
var _local3:int;
var _local4:DisplayObject;
_local3 = 0;
while (_local3 < _arg1.numChildren) {
_local4 = _arg1.getChildAt(_local3);
if ((_local4 is DisplayObjectContainer)){
trace(tabs(_arg2), _local4.name, _local4);
showChildren(DisplayObjectContainer(_local4), (_arg2 + 1));
} else {
trace(tabs((_arg2 + 1)), _local4);
};
_local3++;
};
}
public static function stringToBool(_arg1:String):Boolean{
if ((((_arg1 == "true")) || ((_arg1 == "1")))){
return (true);
};
return (false);
}
public static function trimFront(_arg1:String, _arg2:String=" "):String{
_arg2 = stringToCharacter(_arg2);
if (_arg1.charAt(0) == _arg2){
_arg1 = trimFront(_arg1.substring(1), _arg2);
};
return (_arg1);
}
public static function trim(_arg1:String, _arg2:String=" ", _arg3:Array=null):String{
var _local4:String;
var _local5:int;
_local4 = _arg1;
if (_arg3 != null){
_local5 = 0;
while (_local5 < _arg3.length) {
_local4 = trimBack(trimFront(_local4, _arg3[_local5]), _arg3[_local5]);
_local5++;
};
} else {
_local4 = trimBack(trimFront(_arg1, _arg2), _arg2);
};
return (_local4);
}
public static function stringToObject(_arg1:String):Object{
var _local2:Object;
var _local3:Array;
var _local4:int;
var _local5:Array;
_local2 = new Object();
trace(_arg1);
_arg1 = replace(_arg1, "{", "");
_arg1 = replace(_arg1, "}", "");
_local3 = _arg1.split(",");
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4].split(":");
_local2[trim(String(_local5[0]))] = trim(_local5[1], "", new Array(" ", "'", "\""));
_local4++;
};
return (_local2);
}
public static function trimBack(_arg1:String, _arg2:String=" "):String{
_arg2 = stringToCharacter(_arg2);
if (_arg1.charAt((_arg1.length - 1)) == _arg2){
_arg1 = trimBack(_arg1.substring(0, (_arg1.length - 1)), _arg2);
};
return (_arg1);
}
public static function replace(_arg1:String, _arg2:String, _arg3:String):String{
return (_arg1.split(_arg2).join(_arg3));
}
public static function duplicateDisplayObject(_arg1:DisplayObject):DisplayObject{
var _local2:Class;
var _local3:DisplayObject;
var _local4:Rectangle;
_local2 = Object(_arg1).constructor;
_local3 = new (_local2);
_local3.transform = _arg1.transform;
_local3.filters = _arg1.filters;
_local3.cacheAsBitmap = _arg1.cacheAsBitmap;
_local3.opaqueBackground = _arg1.opaqueBackground;
if (_arg1.scale9Grid){
_local4 = _arg1.scale9Grid;
_local3.scale9Grid = _local4;
};
return (_local3);
}
public static function getPoint(_arg1:MovieClip, _arg2:Boolean=true, _arg3:MovieClip=null):Point{
var _local4:Point;
_local4 = new Point(_arg1.x, _arg1.y);
if (((_arg2) || (!((_arg3 == null))))){
_arg1.localToGlobal(_local4);
if (_arg3 != null){
_arg3.globalToLocal(_local4);
};
};
return (_local4);
}
public static function getPath(_arg1):String{
var _local2:String;
_local2 = "";
do {
if (_arg1.name){
_local2 = (_arg1.toString() + ((_local2 == "")) ? "" : ("." + _local2));
};
_arg1 = _arg1.parent;
} while (_arg1);
return (_local2);
}
public static function eval(_arg1, _arg2:String){
var _local3:Array;
var _local4:Number;
var _local5:*;
_local3 = _arg2.split(".");
_local4 = 0;
_local5 = _arg1;
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local5[_local3[_local4]];
_local4++;
};
return (_local5);
}
public static function stringToCharacter(_arg1:String):String{
if (_arg1.length == 1){
return (_arg1);
};
return (_arg1.slice(0, 1));
}
public static function tabs(_arg1:uint):String{
var _local2:String;
var _local3:uint;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1) {
_local2 = (_local2 + " ");
_local3++;
};
return (_local2);
}
}
}//package ayz.utils
Section 7
//Settings (ayz.Settings)
package ayz {
public class Settings {
public static var preload:Object = new Object();
public static var directories:Object = new Object();
public static var swfPaths:Object = new Object();
public static var flagsHeight:Number;
public static var xmlPaths:Object = new Object();
public static var languages:Object = new Object();
public static var pagePaths:Object = new Object();
public static var isMuted:Boolean = false;
public static var loaded:Boolean = false;
public static var ageGate:Object = new Object();
public static var cssPaths:Object = new Object();
public static var isTempMuted:Boolean = false;
public static var currentLanguage:String = "default";
public static var pageNames:Object = new Object();
public static var flagsSpacing:Number;
public static var flagsWidth:Number;
}
}//package ayz
Section 8
//GameEvents (classes.events.GameEvents)
package classes.events {
public class GameEvents {
public static const LEVEL_LOADED:String = "levelLoaded";
public static const UNMUTE:String = "unmute";
public static const CHAR_KILLED:String = "charKilled";
public static const GAME_PAUSE:String = "gamePaused";
public static const ALL_LEVELS_COMPLETE:String = "allLevelsCompleted";
public static const CHAR_RESTART:String = "charRestart";
public static const GAME_UNPAUSE:String = "gameUnpaused";
public static const CHAR_LIFE_UP:String = "charLifeUp";
public static const LEVEL_FAIL:String = "levelFailed";
public static const JUMP_DOWN:String = "jumpDown";
public static const JUMP_UP:String = "jumpUp";
public static const TICK:String = "tick";
public static const LEVEL_START:String = "levelStarted";
public static const LEVEL_CLEANUP:String = "levelCleanup";
public static const MENU_OPEN:String = "menuOpen";
public static const JUMP_RIGHT:String = "jumpRight";
public static const JUMP:String = "jump";
public static const LEVEL_COMPLETE:String = "levelCompleted";
public static const MENU_CLOSE:String = "menuClosed";
public static const MUTE:String = "mute";
public static const JUMP_LEFT:String = "jumpLeft";
}
}//package classes.events
Section 9
//BonusTimer (classes.gameobjects.hud.BonusTimer)
package classes.gameobjects.hud {
import flash.display.*;
import classes.templates.*;
import classes.managers.*;
import flash.text.*;
public class BonusTimer extends GameObject {
public var timeGauge:MovieClip;
public var timer:TextField;
public var lastFrame:int;
public var bonusMultiplier:MovieClip;
public var multiplier:int;// = 0
public function BonusTimer():void{
multiplier = 0;
super();
multiplier = GameManager.currentSegment;
addInterests(new Array("multiplierChanged"));
updateBonusUI();
}
public function tick():void{
if (!GameManager.timerPaused){
updateBonusUI();
};
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == "multiplierChanged"){
setMultiplier(_arg2.segment);
};
}
public function setMultiplier(_arg1:int):void{
multiplier = _arg1;
bonusMultiplier.multiplierNumber.reload();
trace("DECREASE MULTIPLIER", multiplier);
}
public function updateBonusUI():void{
var _local1:String;
_local1 = String((Math.round(((GameManager.timeRemaining / 1000) * 10)) / 10));
if (_local1.indexOf(".") < 0){
_local1 = (_local1 + ".0");
};
if (((timer) && ((GameManager.timeRemaining >= 0)))){
timer.text = _local1;
timeGauge.gotoAndStop((Math.round((((GameManager.timeProgressed / (GameManager.levelTime * 1000)) * timeGauge.totalFrames) * GameManager.bonusSegments)) % timeGauge.totalFrames));
} else {
timer.text = "0.0";
};
}
}
}//package classes.gameobjects.hud
Section 10
//Lives (classes.gameobjects.hud.Lives)
package classes.gameobjects.hud {
import classes.templates.*;
import classes.managers.*;
import classes.events.*;
public class Lives extends GameObject {
public var lives:int;
public var displayedLives:int;
public function Lives():void{
displayedLives = (lives = GameManager.lives);
addInterests(new Array(GameEvents.CHAR_KILLED));
}
public function reload():void{
gotoAndPlay("RELOAD");
}
public function tick():void{
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.CHAR_KILLED){
setLives();
};
}
public function setLives():void{
lives = GameManager.lives;
reload();
}
}
}//package classes.gameobjects.hud
Section 11
//Character (classes.gameobjects.Character)
package classes.gameobjects {
import classes.templates.*;
import classes.managers.*;
public class Character extends GameObject {
public var velocity:Number;// = 1
public var dx:Number;// = 1
public var dy:Number;// = 0.2
public function Character():void{
dx = 1;
dy = 0.2;
velocity = 1;
super();
}
public function setDirection(_arg1:Number, _arg2:Number):void{
if (_arg1){
dx = _arg1;
};
if (_arg2){
dy = _arg2;
};
}
public function tick():void{
move(velocity);
}
public function move(_arg1:Number):void{
this.x = (this.x + ((dx * _arg1) * LogicManager.gameSpeed));
this.y = (this.y + ((dy * _arg1) * LogicManager.gameSpeed));
}
}
}//package classes.gameobjects
Section 12
//Enemy (classes.gameobjects.Enemy)
package classes.gameobjects {
public class Enemy extends Character {
public var resetDistance:Number;// = 0
public var AI:Boolean;// = true
public var isEnemy:Boolean;// = true
public var distanceMoved:Number;// = 0
public function Enemy():void{
isEnemy = true;
AI = true;
distanceMoved = 0;
resetDistance = 0;
super();
}
override public function tick():void{
super.tick();
}
override public function move(_arg1:Number):void{
super.move(_arg1);
}
}
}//package classes.gameobjects
Section 13
//MainCharacter (classes.gameobjects.MainCharacter)
package classes.gameobjects {
import gs.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.managers.*;
import classes.media.*;
import classes.events.*;
import gs.easing.*;
import classes.utils.*;
import flash.utils.*;
public class MainCharacter extends Character {
protected var jumpDelay:Number;// = 0.05
protected var jumpTime:Number;// = 0.25
public var firstJump:Boolean;// = true
protected var chasing:Boolean;// = false
protected var charPos:Point;
protected var movementDistanceModifiers:Object;
protected var jump_dx:Number;// = 0
protected var xDestination:Number;
protected var endDelay:AyzTimer;
protected var _this:MovieClip;
public var canBeHit:Boolean;// = true
protected var jump_dy:Number;// = 0
public var notJumping:Boolean;// = true
protected var yDistance:Number;
protected var xDistance:Number;
protected var zSkew:Number;// = 2
public var isEnemy:Boolean;// = false
protected var yDestination:Number;
public function MainCharacter():void{
isEnemy = false;
canBeHit = true;
notJumping = true;
firstJump = true;
chasing = false;
jumpTime = 0.25;
jumpDelay = 0.05;
jump_dx = 0;
jump_dy = 0;
zSkew = 2;
super();
this.mouseEnabled = true;
this.mouseChildren = true;
this.name = "mainChar";
_this = this;
movementDistanceModifiers = {up:0, down:0, left:0, right:0};
reinit();
addInterests(new Array(GameEvents.JUMP_UP, GameEvents.JUMP_DOWN, GameEvents.JUMP_LEFT, GameEvents.JUMP_RIGHT, GameEvents.LEVEL_COMPLETE, GameEvents.LEVEL_LOADED, GameEvents.GAME_PAUSE, GameEvents.GAME_UNPAUSE, GameEvents.LEVEL_CLEANUP, "chase"));
}
override public function pause():void{
isPaused = true;
}
protected function endPose():void{
pause();
gotoAndStop("WIN");
}
protected function landingPosIsOK(_arg1:String):Boolean{
var _local2:Number;
_local2 = (stage.stageWidth - 170);
if ((((((((xDestination > 0)) && ((xDestination < stage.stageWidth)))) && ((yDestination > 15)))) && ((yDestination < (stage.stageHeight + 15))))){
if ((((((depth > (LevelManager.currentLevel.rows.length - 2))) && (!((_arg1 == "up"))))) || ((((depth == (LevelManager.currentLevel.rows.length - 2))) && ((_arg1 == "down")))))){
if (xDestination > _local2){
if (((((xDestination - _local2) < xDistance)) && ((depth == (LevelManager.currentLevel.rows.length - 1))))){
xDestination = _local2;
return (true);
};
return (false);
};
};
return (true);
};
return (false);
}
protected function jump(_arg1:String="up"){
var upDown:int;
var zSkewFactor:*;
var jumpComplete:Function;
var direction = _arg1;
upDown = 0;
charPos = new Point(x, y);
charPos = parent.localToGlobal(charPos);
if (firstJump){
EventManager.fireEvent(GameEvents.LEVEL_START);
firstJump = false;
};
if (((((notJumping) && (canBeHit))) && (!(isPaused)))){
EventManager.fireEvent(GameEvents.JUMP);
gotoAndPlay(("JUMP_" + direction.toUpperCase()));
if (direction == "up"){
jump_dx = LevelManager.dy;
jump_dy = -(LevelManager.dx);
upDown = 0;
} else {
if (direction == "down"){
if (depth < LevelManager.currentLevel.rows.length){
jump_dx = -(LevelManager.dy);
jump_dy = LevelManager.dx;
upDown = -1;
} else {
jump_dx = 0;
jump_dy = 0;
};
} else {
if (direction == "left"){
jump_dx = -(LevelManager.dx);
jump_dy = -(LevelManager.dy);
} else {
if (direction == "right"){
jump_dx = LevelManager.dx;
jump_dy = LevelManager.dy;
};
};
};
};
SoundManager.playRandomSound("Hop", 1, true, this);
xDistance = ((LevelManager.getRowHeight((depth - upDown), direction) + movementDistanceModifiers[direction]) * jump_dx);
yDistance = ((LevelManager.getRowHeight((depth - upDown), direction) + movementDistanceModifiers[direction]) * jump_dy);
xDestination = (charPos.x + xDistance);
yDestination = (charPos.y + yDistance);
zSkewFactor = ((Functions.getHypotenuse(xDistance, yDistance) / Functions.getHypotenuse((xDistance * zSkew), yDistance)) + 0);
if ((((direction == "up")) || ((direction == "down")))){
xDestination = (charPos.x + ((xDistance * zSkew) * zSkewFactor));
yDestination = (charPos.y + (yDistance * zSkewFactor));
} else {
xDestination = (xDestination + ((dx * Math.round(((jumpTime + jumpDelay) * stage.frameRate))) * velocity));
yDestination = (yDestination + ((dy * Math.round(((jumpTime + jumpDelay) * stage.frameRate))) * velocity));
};
if (landingPosIsOK(direction)){
jumpComplete = function ():void{
notJumping = true;
};
if ((((direction == "down")) && ((depth < LevelManager.currentLevel.rows.length)))){
depth++;
} else {
if ((((direction == "up")) && ((depth >= 0)))){
depth--;
};
};
if ((((direction == "up")) && ((depth == 0)))){
LogicManager.jumpOnJerryCheck = true;
};
LogicManager.sortDepths(LevelManager.gameContainer, this, depth, 200, false);
notJumping = false;
TweenLite.to(this, jumpTime, {x:xDestination, y:yDestination, ease:Quad.easeInOut, delay:jumpDelay, onComplete:jumpComplete});
};
};
}
protected function nextLife(){
var readyToPlay:Function;
readyToPlay = function ():void{
if (GameManager.lives > 0){
reinit();
};
};
TweenLite.to(this, 0.5, {alpha:1, ease:Quad.easeOut, onComplete:readyToPlay});
}
public function waterBounce():void{
}
override public function tick():void{
var _local1:Rectangle;
super.tick();
if (chasing){
_local1 = this.getBounds(stage);
if (_local1.left > (stage.stageWidth + 50)){
chasing = false;
velocity = 0;
};
};
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.JUMP_UP){
jump("up");
} else {
if (_arg1 == GameEvents.JUMP_DOWN){
jump("down");
} else {
if (_arg1 == GameEvents.JUMP_LEFT){
jump("left");
} else {
if (_arg1 == GameEvents.JUMP_RIGHT){
jump("right");
} else {
if (_arg1 == GameEvents.LEVEL_COMPLETE){
endPose();
} else {
if (_arg1 == GameEvents.LEVEL_LOADED){
unPause();
} else {
if (_arg1 == "chase"){
chase();
};
};
};
};
};
};
};
super.catchEvent(_arg1, _arg2);
}
public function reinit():void{
depth = LevelManager.rowContainers.length;
LogicManager.sortDepths(LevelManager.gameContainer, _this, (LevelManager.rowContainers.length - 1), 50, true);
notJumping = true;
canBeHit = true;
firstJump = true;
chasing = false;
dx = 0;
dy = 0;
gotoAndStop("IDLE");
EventManager.fireEvent(GameEvents.CHAR_RESTART);
}
public function hit():void{
var startPosition:Object;
var honk:Function;
var honkTimer:Timer;
honk = function (_arg1:Event):void{
SoundManager.playRandomSound("Honk", 3, true, _this);
honkTimer.removeEventListener("timer", honk);
honkTimer.stop();
};
SoundManager.playRandomSound("Hit", 1, true, this);
canBeHit = false;
gotoAndPlay("HIT");
startPosition = LevelManager.currentLevel.mainCharPositioning;
TweenLite.to(this, 0.5, {x:startPosition.x, y:startPosition.y, ease:Linear.easeOut, onComplete:nextLife});
LogicManager.sortDepths(LevelManager.gameContainer, _this, (LevelManager.rowContainers.length - 1), 50, true);
if ((Math.random() * 2) < 1){
honkTimer = new Timer((250 + (Math.random() * 750)), 1);
honkTimer.addEventListener("timer", honk);
honkTimer.start();
};
}
override public function move(_arg1:Number):void{
if (notJumping){
super.move(_arg1);
};
}
public function sink():void{
var _local1:WaterSplash;
var _local2:Object;
_local1 = new WaterSplash();
_local1.play();
SoundManager.makeDirectional(Sound(_local1), this);
notJumping = false;
canBeHit = false;
gotoAndPlay("SINK");
_local2 = LevelManager.currentLevel.mainCharPositioning;
TweenLite.to(this, 0, {x:_local2.x, y:_local2.y, alpha:0, ease:Linear.easeOut, delay:1, onComplete:nextLife});
}
override public function unPause():void{
isPaused = false;
}
protected function chase():void{
dx = LevelManager.dx;
dy = LevelManager.dy;
TweenLite.to(this, 0.1, {velocity:10});
notJumping = true;
chasing = true;
}
}
}//package classes.gameobjects
Section 14
//Platform (classes.gameobjects.Platform)
package classes.gameobjects {
public class Platform extends Character {
public var resetDistance:Number;// = 0
public var AI:Boolean;// = true
public var isEnemy:Boolean;// = false
public var isPlatform:Boolean;// = true
public var distanceMoved:Number;// = 0
public function Platform():void{
isPlatform = true;
isEnemy = false;
AI = true;
distanceMoved = 0;
resetDistance = 0;
super();
}
override public function tick():void{
super.tick();
}
override public function move(_arg1:Number):void{
super.move(_arg1);
}
}
}//package classes.gameobjects
Section 15
//Space (classes.gameobjects.Space)
package classes.gameobjects {
public class Space extends Character {
public var isSpacer:Boolean;// = true
public var resetDistance:Number;// = 0
public var AI:Boolean;// = true
public var isEnemy:Boolean;// = false
public var distanceMoved:Number;// = 0
public function Space():void{
isEnemy = false;
isSpacer = true;
AI = true;
distanceMoved = 0;
resetDistance = 0;
super();
this.visible = false;
}
override public function tick():void{
super.tick();
}
override public function move(_arg1:Number):void{
super.move(_arg1);
}
}
}//package classes.gameobjects
Section 16
//Key (classes.input.Key)
package classes.input {
import classes.managers.*;
import flash.utils.*;
public class Key {
protected var pressed:Boolean;// = false
protected var keyFunc:String;
protected var repeatDelay:uint;
protected var keyCode:uint;
protected var lastTick:uint;// = 0
public function Key(_arg1:uint, _arg2:String="keyCallback", _arg3:uint=42):void{
lastTick = 0;
pressed = false;
super();
keyFunc = _arg2;
keyCode = _arg1;
repeatDelay = _arg3;
}
public function activate():void{
pressed = true;
tick();
}
public function deactivate():void{
pressed = false;
}
protected function keyAction():void{
if (InputManager.instance[("input_" + keyFunc)]){
var _local1 = InputManager.instance;
_local1[("input_" + keyFunc)](keyCode);
} else {
trace("ERROR: Key -- Could Not Find Matching Key Callback Function");
};
}
public function getKeyCode():uint{
return (keyCode);
}
public function tick(_arg1:Boolean=false):void{
if (((((pressed) && (((getTimer() - lastTick) > repeatDelay)))) || (_arg1))){
_arg1 = false;
lastTick = getTimer();
keyAction();
};
}
}
}//package classes.input
Section 17
//Level1 (classes.levels.Level1)
package classes.levels {
import classes.templates.*;
public class Level1 extends BaseLevel {
public function Level1():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:1, yOffset:-80, xOffset:0, firstHop:34};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "b1 b2 b3 _ _";
objectPatterns[1] = "b1 b1 _ b4 _ _";
objectPatterns[2] = "t1 t1 _ _ _ t2 t2 _ _";
objectPatterns[3] = "c1 c2 _ _ _ c2 c3 _ _";
objectPatterns[4] = "t1 t1 _ _ t2 t2 _ _";
objectPatterns[5] = "s1 _ _ s1 _ _ _ s1 _ s1 _ _ _ _ _";
objectPatterns[6] = "_ t1 _ _ _ _ ";
objectPatterns[7] = "_ _ _ _ _ _ ";
rows = new Array();
rows[0] = {pattern:new Array({p:7, d:0}, {p:7, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:0, d:0}, {p:0, d:0}), direction:"RIGHT", velocity:1, water:true, rowHeight:45};
rows[2] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"LEFT", velocity:0.25, water:true, rowHeight:45};
rows[3] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"LEFT", velocity:0.25, water:true, rowHeight:45};
rows[4] = {pattern:new Array({p:5, d:0}, {p:4, d:0}), direction:"LEFT", velocity:1, water:false, rowHeight:80};
rows[5] = {pattern:new Array({p:2, d:0}, {p:6, d:0}, {p:6, d:0}), direction:"LEFT", velocity:5, water:false, rowHeight:52};
rows[6] = {pattern:new Array({p:2, d:0}, {p:5, d:0}), direction:"LEFT", velocity:1, water:false, rowHeight:65};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 18
//Level10 (classes.levels.Level10)
package classes.levels {
import classes.templates.*;
public class Level10 extends BaseLevel {
public function Level10():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:1, yOffset:-80, xOffset:0, firstHop:34};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "_ _ _ _ _ _ _ _ _ _";
objectPatterns[1] = "b1 b1 _ _ _ _ _ _ _";
objectPatterns[2] = "b3 b3 _ _ _ _ b2 b3 b2 _ _";
objectPatterns[3] = "b2 _ _ _ _ b1 _ _ _ _ _ _";
objectPatterns[4] = "c1 _ _ _ _ c3 _ _ _ _";
objectPatterns[5] = "t2 _ _ _ _ t2 _ _ _ _";
objectPatterns[6] = "t1 _ _ _ _ _ t1 _ _ _ _ _";
rows = new Array();
rows[0] = {pattern:new Array({p:0, d:0}, {p:0, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"RIGHT", velocity:2, water:true, rowHeight:45};
rows[2] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"LEFT", velocity:4, water:true, rowHeight:45};
rows[3] = {pattern:new Array({p:3, d:0}, {p:3, d:0}), direction:"RIGHT", velocity:0.25, water:true, rowHeight:45};
rows[4] = {pattern:new Array({p:4, d:0}, {p:4, d:0}), direction:"LEFT", velocity:6, water:false, rowHeight:70};
rows[5] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"RIGHT", velocity:7, water:false, rowHeight:62};
rows[6] = {pattern:new Array({p:6, d:0}, {p:6, d:0}), direction:"LEFT", velocity:8, water:false, rowHeight:65};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 19
//Level2 (classes.levels.Level2)
package classes.levels {
import classes.templates.*;
public class Level2 extends BaseLevel {
public function Level2():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:2, yOffset:-80, xOffset:0, firstHop:50};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "b1 b2 b1 b2 _ _";
objectPatterns[1] = "b1 b1 _ _";
objectPatterns[2] = "b2 b2 _ _";
objectPatterns[3] = "b1 b2 _ b3 _ _";
objectPatterns[4] = "_ _ _ _";
objectPatterns[5] = "b1 _ _ b1 _ _ b1 _ _";
rows = new Array();
rows[0] = {pattern:new Array({p:4, d:0}, {p:4, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"RIGHT", velocity:2, water:true, rowHeight:45};
rows[2] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"LEFT", velocity:2, water:true, rowHeight:45};
rows[3] = {pattern:new Array({p:1, d:0}, {p:2, d:0}), direction:"RIGHT", velocity:4, water:true, rowHeight:45};
rows[4] = {pattern:new Array({p:3, d:0}, {p:5, d:0}), direction:"RIGHT", velocity:0.25, water:true, rowHeight:45};
rows[5] = {pattern:new Array({p:1, d:0}, {p:5, d:0}), direction:"LEFT", velocity:1, water:true, rowHeight:45};
rows[6] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"RIGHT", velocity:1, water:true, rowHeight:45};
rows[7] = {pattern:new Array({p:0, d:0}, {p:2, d:0}, {p:0, d:0}), direction:"LEFT", velocity:1, water:true, rowHeight:45};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 20
//Level3 (classes.levels.Level3)
package classes.levels {
import classes.templates.*;
public class Level3 extends BaseLevel {
public function Level3():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:3, yOffset:-80, xOffset:0, firstHop:50};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "_ _ _ _ _ _ ";
objectPatterns[1] = "c1 c2 _ _ _ c3 c2 c3 _ _ _ c1 c2 _ _ _ c3 c2 c3 _ _ _ _ _ _ _ _";
objectPatterns[2] = "t1 t1 _ _ _ t2 t2 _ _ _";
objectPatterns[3] = "_ t1 _ _ _ _ t1 _ t1 _ _";
objectPatterns[4] = "s1 _ _ s1 _ _ _ s1 _ s1 _ _ _ _ _";
objectPatterns[5] = "b1 b2 b3 _ _";
objectPatterns[6] = "b1 b1 _ b4 _ _ _";
rows = new Array();
rows[0] = {pattern:new Array({p:0, d:0}, {p:0, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"LEFT", velocity:1, water:false, rowHeight:40};
rows[2] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"LEFT", velocity:5, water:false, rowHeight:60};
rows[3] = {pattern:new Array({p:3, d:0}, {p:3, d:0}), direction:"LEFT", velocity:1, water:false, rowHeight:60};
rows[4] = {pattern:new Array({p:4, d:0}, {p:4, d:0}), direction:"RIGHT", velocity:5, water:false, rowHeight:50};
rows[5] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"LEFT", velocity:2, water:true, rowHeight:50};
rows[6] = {pattern:new Array({p:6, d:0}, {p:6, d:0}), direction:"LEFT", velocity:0.25, water:true, rowHeight:54};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 21
//Level4 (classes.levels.Level4)
package classes.levels {
import classes.templates.*;
public class Level4 extends BaseLevel {
public function Level4():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:4, yOffset:-80, xOffset:0, firstHop:54};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "c1 c1 _ _ c2 c2 _ _";
objectPatterns[1] = "t1 t1 t1 _ _ _";
objectPatterns[2] = "s1 _ _ _ _ _ s1 _ _ s1 s1 _ _";
objectPatterns[3] = "t1 _ t2 _ _ _ t1 _ t2 _ _ _ _ ";
objectPatterns[4] = "c1 _ c3 _ _ t1 t1 t2 _ _ ";
objectPatterns[5] = "t1 _ _ c1 _ _ t2 _ _ c2 c2 _ _";
objectPatterns[6] = " ";
objectPatterns[7] = "_ _ _ _ _ _ ";
rows = new Array();
rows[0] = {pattern:new Array({p:7, d:0}, {p:7, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"LEFT", velocity:8, water:false, rowHeight:60};
rows[2] = {pattern:new Array({p:3, d:0}, {p:3, d:0}), direction:"RIGHT", velocity:3, water:false, rowHeight:60};
rows[3] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"RIGHT", velocity:2, water:false, rowHeight:60};
rows[4] = {pattern:new Array({p:1, d:0}, {p:0, d:0}), direction:"LEFT", velocity:1, water:false, rowHeight:70};
rows[5] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"RIGHT", velocity:3, water:false, rowHeight:65};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 22
//Level5 (classes.levels.Level5)
package classes.levels {
import classes.templates.*;
public class Level5 extends BaseLevel {
public function Level5():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:1, yOffset:-80, xOffset:0, firstHop:34};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "_ _ _ _ _ _ _ _ _ _ _ _";
objectPatterns[1] = "b1 _ _ b1 _ _ _ _ _ _ _ b1 _ _ b1 _";
objectPatterns[2] = "b2 _ b2 _ _ _ b2 _ _ _ b2 _ _ _";
objectPatterns[3] = "b3 b3 _ b2 b2 b2 _ _ _ b1 b3 b1 _ _";
objectPatterns[4] = "t2 _ _ _ t1 t2 _ _ _";
objectPatterns[5] = "c1 _ _ _ t2 _ _ _ c2 c2 _ _";
objectPatterns[6] = "t1 t1 _ _ _ t1 t2 t2 _ _ ";
objectPatterns[7] = "_ _ _ _ _ _ ";
rows = new Array();
rows[0] = {pattern:new Array({p:0, d:0}, {p:0, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"RIGHT", velocity:6, water:true, rowHeight:45};
rows[2] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"LEFT", velocity:5, water:true, rowHeight:45};
rows[3] = {pattern:new Array({p:3, d:0}, {p:3, d:0}), direction:"RIGHT", velocity:1, water:true, rowHeight:45};
rows[4] = {pattern:new Array({p:4, d:0}, {p:4, d:0}), direction:"LEFT", velocity:2, water:false, rowHeight:70};
rows[5] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:62};
rows[6] = {pattern:new Array({p:6, d:0}, {p:6, d:0}), direction:"LEFT", velocity:1, water:false, rowHeight:65};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 23
//Level6 (classes.levels.Level6)
package classes.levels {
import classes.templates.*;
public class Level6 extends BaseLevel {
public function Level6():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:4, yOffset:-100, xOffset:0, firstHop:54};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "_ _ _ _ _ _ _ _ _ _ _ _";
objectPatterns[1] = "t1 t1 t1 _ _ _ t2 _ _";
objectPatterns[2] = "c1 _ c2 _ c3 _ _ _ _ _ t2 s1 _ _ _ _";
objectPatterns[3] = "c1 c2 _ c2 c1 c2 _ _ _ c1 _ _";
objectPatterns[4] = "t2 _ _ _ t1 t2 _ _ _";
objectPatterns[5] = "_ _ _ _ t2 _ _ c2 c2 _ _";
objectPatterns[6] = " ";
objectPatterns[7] = "_ _ _ _ _ _ ";
rows = new Array();
rows[0] = {pattern:new Array({p:0, d:0}, {p:0, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"LEFT", velocity:1, water:false, rowHeight:70};
rows[2] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"RIGHT", velocity:2, water:false, rowHeight:70};
rows[3] = {pattern:new Array({p:3, d:0}, {p:3, d:0}), direction:"RIGHT", velocity:3, water:false, rowHeight:60};
rows[4] = {pattern:new Array({p:4, d:0}, {p:4, d:0}), direction:"LEFT", velocity:1, water:false, rowHeight:70};
rows[5] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"RIGHT", velocity:2, water:false, rowHeight:65};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 24
//Level7 (classes.levels.Level7)
package classes.levels {
import classes.templates.*;
public class Level7 extends BaseLevel {
public function Level7():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:3, yOffset:-80, xOffset:0, firstHop:46};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "_ _ _ _ _ _ _ _ _ _ _";
objectPatterns[1] = "t1 t1 _ _ t2 t1 _ _ c2 c1 _ _ _ _ t2 t2 _";
objectPatterns[2] = "c2 _ _ _ c3 c2 c1 _ _ c3 t2 _ _";
objectPatterns[3] = "c1 c2 _ _ _ _ c3 _ c1 _ _ _";
objectPatterns[4] = "s1 s1 _ _ _ _ s3 _ _ _ _";
objectPatterns[5] = "b1 b1 _ _ _ _ _ _ b1 _ _ _ _";
objectPatterns[6] = "_ _ _ b2 b3 b1 _ _ _ _ b2 _ _ _ b1 _ _";
objectPatterns[7] = "b3 _ _ _ _ _ b3 _ _ _ _ _ _ _";
rows = new Array();
rows[0] = {pattern:new Array({p:0, d:0}, {p:0, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"LEFT", velocity:3, water:false, rowHeight:48};
rows[2] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"LEFT", velocity:5, water:false, rowHeight:60};
rows[3] = {pattern:new Array({p:3, d:0}, {p:3, d:0}), direction:"RIGHT", velocity:2, water:false, rowHeight:60};
rows[4] = {pattern:new Array({p:4, d:0}, {p:4, d:0}), direction:"LEFT", velocity:6, water:false, rowHeight:50};
rows[5] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"RIGHT", velocity:2.5, water:true, rowHeight:25};
rows[6] = {pattern:new Array({p:6, d:0}, {p:6, d:0}), direction:"RIGHT", velocity:0.5, water:true, rowHeight:50};
rows[7] = {pattern:new Array({p:7, d:0}, {p:7, d:0}), direction:"LEFT", velocity:6, water:true, rowHeight:30};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 25
//Level8 (classes.levels.Level8)
package classes.levels {
import classes.templates.*;
public class Level8 extends BaseLevel {
public function Level8():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:2, yOffset:-80, xOffset:0, firstHop:45};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "_ _ _ _ _ _ _ _ _ _";
objectPatterns[1] = "b1 b1 _ _ _ b1 b1 _ _ _ _ _ _ _";
objectPatterns[2] = "b2 b2 _ _ b2 b2 _ _ _ b2 b2 _ _ b2 b2 _ _ _";
objectPatterns[3] = "b3 b3 b3 _ _ b3 b3 b3 _ _";
objectPatterns[4] = "b2 _ _ b1 _ _ b3 _ _";
objectPatterns[5] = "b2 b2 _ _ b3 b3 _ _ _ _ b1 b1 _ _ _ _ _";
objectPatterns[6] = "b3 _ b2 _ b1 _ b3 _ b2 _ ";
objectPatterns[7] = "b2 b3 b3 _ _ _ _ b2 b3 b2 _ _ _";
rows = new Array();
rows[0] = {pattern:new Array({p:0, d:0}, {p:0, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"LEFT", velocity:6, water:true, rowHeight:45};
rows[2] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"RIGHT", velocity:0.25, water:true, rowHeight:45};
rows[3] = {pattern:new Array({p:3, d:0}, {p:3, d:0}), direction:"LEFT", velocity:4, water:true, rowHeight:45};
rows[4] = {pattern:new Array({p:4, d:0}, {p:4, d:0}), direction:"RIGHT", velocity:0.25, water:true, rowHeight:45};
rows[5] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"LEFT", velocity:2, water:true, rowHeight:45};
rows[6] = {pattern:new Array({p:6, d:0}, {p:6, d:0}), direction:"RIGHT", velocity:0.25, water:true, rowHeight:50};
rows[7] = {pattern:new Array({p:7, d:0}, {p:7, d:0}), direction:"LEFT", velocity:1, water:true, rowHeight:55};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 26
//Level9 (classes.levels.Level9)
package classes.levels {
import classes.templates.*;
public class Level9 extends BaseLevel {
public function Level9():void{
}
override public function destroy():void{
super.destroy();
}
override protected function initLevelData():void{
super.initLevelData();
config = {bgFrame:2, yOffset:-80, xOffset:0, firstHop:45};
mainCharPositioning = {x:50, y:350};
objectPatterns = new Array();
objectPatterns[0] = "_ _ _ _ _ _ _ _ _ _";
objectPatterns[1] = "b1 b1 _ _ _ _ _ _ _";
objectPatterns[2] = "_ _ _ _ b2 _ _ _ b2";
objectPatterns[3] = "b3 b3 _ _ _ _ _ b3 _ _";
objectPatterns[4] = "b2 _ _ _ _ b1 _ _ _ _ _ _";
objectPatterns[5] = "b2 b2 b2 b2 _ _ _ _ b1 b1 b1 b1 b1 _ _ _ _";
objectPatterns[6] = "b3 _ b2 _ b1 _ b3 _ b2 _ _ _ _";
objectPatterns[7] = "b2 b3 _ _ _ _ _ b3 b2 _ _ _";
rows = new Array();
rows[0] = {pattern:new Array({p:0, d:0}, {p:0, d:0}), direction:"RIGHT", velocity:1, water:false, rowHeight:1, goal:true};
rows[1] = {pattern:new Array({p:1, d:0}, {p:1, d:0}), direction:"RIGHT", velocity:2, water:true, rowHeight:45};
rows[2] = {pattern:new Array({p:2, d:0}, {p:2, d:0}), direction:"LEFT", velocity:2, water:true, rowHeight:45};
rows[3] = {pattern:new Array({p:3, d:0}, {p:3, d:0}), direction:"RIGHT", velocity:4, water:true, rowHeight:45};
rows[4] = {pattern:new Array({p:4, d:0}, {p:4, d:0}), direction:"RIGHT", velocity:0.25, water:true, rowHeight:45};
rows[5] = {pattern:new Array({p:5, d:0}, {p:5, d:0}), direction:"LEFT", velocity:1, water:true, rowHeight:45};
rows[6] = {pattern:new Array({p:6, d:0}, {p:6, d:0}), direction:"RIGHT", velocity:1, water:true, rowHeight:50};
rows[7] = {pattern:new Array({p:7, d:0}, {p:7, d:0}), direction:"LEFT", velocity:1, water:true, rowHeight:55};
}
override protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
override public function levelComplete():void{
super.levelComplete();
}
}
}//package classes.levels
Section 27
//EventManager (classes.managers.EventManager)
package classes.managers {
public class EventManager {
private static var interestsList:Object = new Object();
public static function fireEvent(_arg1:String, _arg2:Object=null):void{
var _local3:Array;
var _local4:int;
if ((EventManager.interestsList[_arg1] is Array)){
_local3 = EventManager.interestsList[_arg1].concat();
_local4 = 0;
while (_local4 < _local3.length) {
if (((!((_local3[_local4] == null))) && (!((_local3[_local4].catchEvent == null))))){
_local3[_local4].catchEvent(_arg1, _arg2);
} else {
trace(("WARNING: CatchEvent Function not found on " + _local3[_local4]));
};
_local4++;
};
};
}
public static function unregisterInterests(_arg1, _arg2:Array):void{
var _local3:int;
var _local4:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if ((EventManager.interestsList[_arg2[_local3]] is Array)){
_local4 = EventManager.interestsList[_arg2[_local3]].indexOf(_arg1);
if (_local4 != -1){
EventManager.interestsList[_arg2[_local3]].splice(_local4, 1);
};
};
_local3++;
};
}
public static function registerInterests(_arg1, _arg2:Array):void{
var _local3:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if ((EventManager.interestsList[_arg2[_local3]] is Array)){
EventManager.interestsList[_arg2[_local3]].push(_arg1);
} else {
EventManager.interestsList[_arg2[_local3]] = new Array(_arg1);
};
_local3++;
};
}
}
}//package classes.managers
Section 28
//GameManager (classes.managers.GameManager)
package classes.managers {
import flash.events.*;
import flash.display.*;
import classes.templates.*;
import classes.*;
import classes.events.*;
import classes.utils.*;
import flash.utils.*;
public class GameManager extends BaseManager {
public static var lifeBonus = 200;
public static var lives:int = 0;
private static var _instance:GameManager = new (GameManager);
;
public static var highScore:int = 0;
public static var score:int = 0;
public static var ui:MovieClip;
public static var bonusIncrement:Number = 1.5;
public static var maxBonus:Number = 2000;
public static var timeRemaining:Number;
public static var startingLives:int = 5;
public static var defaultLevelTime:Number = 40;
public static var timeProgressed:Number = 0;
public static var levelCompleteBonus:Number = 1000;
public static var timer:AyzTimer;
public static var lastTimer:Number = 0;
public static var timerPaused:Boolean = true;
public static var bonusSegments:int = 3;
public static var levelTime:Number = 0;
public static var currentSegment:int = 1;
override public function initialize():void{
if (LevelManager.levelLoaded){
resetTimer(levelTime);
};
if (!initialized){
addInterests(new Array(GameEvents.CHAR_RESTART, GameEvents.CHAR_KILLED, GameEvents.LEVEL_COMPLETE, GameEvents.LEVEL_LOADED, GameEvents.LEVEL_START, GameEvents.LEVEL_FAIL, GameEvents.TICK, GameEvents.JUMP));
super.initialize();
};
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.GAME_PAUSE){
pauseTimer();
} else {
if (_arg1 == GameEvents.GAME_UNPAUSE){
resumeTimer();
} else {
if (_arg1 == GameEvents.CHAR_KILLED){
pauseTimer();
} else {
if (_arg1 == GameEvents.CHAR_RESTART){
} else {
if (_arg1 == GameEvents.LEVEL_COMPLETE){
pauseTimer();
} else {
if (_arg1 == GameEvents.LEVEL_LOADED){
resetTimer(levelTime);
} else {
if (_arg1 == GameEvents.LEVEL_START){
} else {
if (_arg1 == GameEvents.LEVEL_FAIL){
} else {
if (_arg1 == GameEvents.TICK){
tick();
} else {
if (_arg1 == GameEvents.JUMP){
firstJump();
};
};
};
};
};
};
};
};
};
};
}
public static function calculateTimeBonus():Number{
var _local1:*;
var _local2:int;
if (currentSegment == bonusSegments){
return (maxBonus);
};
if (currentSegment == 0){
return (0);
};
_local1 = maxBonus;
_local2 = currentSegment;
while (_local2 < bonusSegments) {
_local1 = (_local1 / 2);
_local2++;
};
return (_local1);
}
public static function get instance():GameManager{
if (_instance == null){
_instance = new (GameManager);
};
return ((_instance as GameManager));
}
public static function resumeTimer():void{
lastTimer = getTimer();
timer.resume();
timerPaused = false;
}
public static function tick():void{
if (((timer) && (!(timerPaused)))){
timeProgressed = (timeProgressed + (getTimer() - lastTimer));
timeRemaining = ((levelTime * 1000) - timeProgressed);
lastTimer = getTimer();
};
}
public static function startTimer():void{
if (timer){
resumeTimer();
} else {
resetTimer(levelTime, true);
};
}
public static function gainLife():void{
lives++;
EventManager.fireEvent(GameEvents.CHAR_LIFE_UP);
}
public static function timerComplete(_arg1:Event=null):void{
trace("TIMER EMPTY");
}
public static function loseLife():void{
lives--;
EventManager.fireEvent(GameEvents.CHAR_KILLED);
if (lives <= 0){
Game.endGame();
};
}
public static function resetVars():void{
levelTime = defaultLevelTime;
score = 0;
lives = startingLives;
}
public static function resetTimer(_arg1:Number=60, _arg2:Boolean=false):void{
var _local3:Number;
_local3 = ((levelTime / bonusSegments) * 1000);
currentSegment = bonusSegments;
timeRemaining = (_arg1 * 1000);
timeProgressed = 0;
timerPaused = true;
timer = new AyzTimer(_local3, bonusSegments);
timer.addEventListener("timer", segmentComplete, false, 0, true);
timer.addEventListener("timerComplete", timerComplete, false, 0, true);
if (_arg2){
startTimer();
};
}
public static function calculateLifeBonus():Number{
return ((lives * lifeBonus));
}
public static function pauseTimer():void{
timer.stop();
timerPaused = true;
}
public static function calculateLevelScore():Number{
score = (score + (((levelCompleteBonus + calculateTimeBonus()) + calculateLifeBonus()) * LogicManager.difficulty));
if (score > highScore){
highScore = score;
};
return (score);
}
public static function firstJump():void{
if (((((timer) && (timerPaused))) && ((timeRemaining > 0)))){
startTimer();
};
}
public static function segmentComplete(_arg1:Event=null):void{
currentSegment--;
EventManager.fireEvent("multiplierChanged", {segment:currentSegment});
}
}
}//package classes.managers
Section 29
//InputManager (classes.managers.InputManager)
package classes.managers {
import flash.events.*;
import classes.templates.*;
import classes.*;
import classes.events.*;
import classes.input.*;
import flash.ui.*;
public class InputManager extends BaseManager {
protected var key_down:Key;
protected var interests:Array;
protected var key_pause:Key;
protected var key_space:Key;
protected var key_left:Key;
protected var keys:Array;
protected var key_mute:Key;
protected var key_up:Key;
protected var key_right:Key;
private static var _instance:InputManager = new (InputManager);
;
public function InputManager(){
key_up = new Key(Keyboard.UP);
key_down = new Key(Keyboard.DOWN);
key_left = new Key(Keyboard.LEFT);
key_right = new Key(Keyboard.RIGHT);
key_space = new Key(Keyboard.SPACE, "menuContinue");
key_pause = new Key(80, "pause", 500);
key_mute = new Key(77, "mute", 500);
keys = new Array(key_up, key_down, key_left, key_right, key_space, key_pause, key_mute);
super();
}
public function input_pause(_arg1:uint=0):void{
if (Game.isPaused){
MenuManager.closeMenu();
EventManager.fireEvent(GameEvents.GAME_UNPAUSE);
} else {
MenuManager.openMenu("gamePaused", false);
EventManager.fireEvent(GameEvents.GAME_PAUSE);
};
}
public function input_menuContinue(_arg1:uint=0):void{
if (((MenuManager.menuOpen) && (!((MenuManager.menuID == "gameHUD"))))){
MenuManager.closeMenu();
};
}
override public function initialize():void{
if (!initialized){
super.initialize();
instance.interests = new Array(GameEvents.GAME_PAUSE, GameEvents.GAME_UNPAUSE, GameEvents.LEVEL_START, GameEvents.LEVEL_CLEANUP);
EventManager.registerInterests(instance, instance.interests);
_stage.addEventListener(KeyboardEvent.KEY_DOWN, instance.keyToggled, false, 0, true);
_stage.addEventListener(KeyboardEvent.KEY_UP, instance.keyToggled, false, 0, true);
};
LevelManager.mainCharacter.addEventListener(MouseEvent.CLICK, instance.mouseClick, false, 0, true);
}
public function resetVars():void{
removeAllInterests();
}
public function input_keyCallback(_arg1:uint=0):void{
if (_arg1 == Keyboard.UP){
EventManager.fireEvent(GameEvents.JUMP_UP);
} else {
if (_arg1 == Keyboard.DOWN){
EventManager.fireEvent(GameEvents.JUMP_DOWN);
} else {
if (_arg1 == Keyboard.LEFT){
EventManager.fireEvent(GameEvents.JUMP_LEFT);
} else {
if (_arg1 == Keyboard.RIGHT){
EventManager.fireEvent(GameEvents.JUMP_RIGHT);
};
};
};
};
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.GAME_PAUSE){
} else {
if (_arg1 == GameEvents.GAME_UNPAUSE){
} else {
if (_arg1 == GameEvents.LEVEL_START){
} else {
if (_arg1 == GameEvents.LEVEL_CLEANUP){
instance.resetVars();
};
};
};
};
}
protected function mouseClick(_arg1:MouseEvent):void{
if (_arg1.target.name == "clickArea_up"){
EventManager.fireEvent(GameEvents.JUMP_UP);
} else {
if (_arg1.target.name == "clickArea_down"){
EventManager.fireEvent(GameEvents.JUMP_DOWN);
} else {
if (_arg1.target.name == "clickArea_left"){
EventManager.fireEvent(GameEvents.JUMP_LEFT);
} else {
if (_arg1.target.name == "clickArea_right"){
EventManager.fireEvent(GameEvents.JUMP_RIGHT);
};
};
};
};
}
public function input_mute(_arg1:uint=0):void{
trace(SoundManager.isMuted);
if (SoundManager.isMuted){
EventManager.fireEvent(GameEvents.UNMUTE);
} else {
EventManager.fireEvent(GameEvents.MUTE);
};
}
protected function keyToggled(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = 0;
while (_local2 < keys.length) {
if (keys[_local2].getKeyCode() == _arg1.keyCode){
if (_arg1.type == KeyboardEvent.KEY_DOWN){
keys[_local2].activate();
} else {
if (_arg1.type == KeyboardEvent.KEY_UP){
keys[_local2].deactivate();
};
};
break;
};
_local2++;
};
}
public static function get instance():InputManager{
if (_instance == null){
_instance = new (InputManager);
};
return ((_instance as InputManager));
}
}
}//package classes.managers
Section 30
//LevelManager (classes.managers.LevelManager)
package classes.managers {
import flash.display.*;
import flash.geom.*;
import classes.templates.*;
import classes.*;
import classes.events.*;
import classes.utils.*;
import flash.utils.*;
import classes.levels.*;
public class LevelManager extends BaseManager {
protected var levelData:Object;
protected var levels:Array;
public static var thingScaling:Number = 0.8;
public static var level:int = 0;
public static var currentLevel:Object;
public static var rowContainers:Array;
public static var dx:Number;
public static var dy:Number;
public static var currentRow:int;
public static var jerry:MovieClip;
public static var levelLoaded:Boolean = false;
public static var gameContainer:MovieClip;
public static var mainCharacter:MovieClip;
private static var _instance:LevelManager = new (LevelManager);
;
public static var rowHeight:Number = 52;
public static var bgMc:MovieClip;
public function configLevel(_arg1:int=0):void{
}
protected function levelLoaded():void{
EventManager.fireEvent(GameEvents.LEVEL_LOADED);
}
protected function debug(_arg1:String, _arg2:Object=null):void{
var _local3:*;
var _local4:*;
var _local5:*;
if (_arg1 == "levelData"){
for (_local3 in _arg2) {
trace(_local3, _arg2[_local3]);
for (_local4 in _arg2[_local3]) {
trace("_", _local4, _arg2[_local3][_local4]);
for (_local5 in _arg2[_local3][_local4]) {
trace("___", _local5, _arg2[_local3][_local4][_local5]);
};
};
};
};
}
override public function initialize():void{
if (!initialized){
super.initialize();
instance.levels = new Array();
instance.levels[0] = new Level1();
instance.levels[1] = new Level2();
instance.levels[2] = new Level3();
instance.levels[3] = new Level4();
instance.levels[4] = new Level5();
instance.levels[5] = new Level6();
instance.levels[6] = new Level7();
instance.levels[7] = new Level8();
instance.levels[8] = new Level9();
instance.levels[9] = new Level10();
};
level = 0;
instance.resetVars();
}
protected function configMainChar():void{
mainCharacter = new MainCharacter();
mainCharacter.x = currentLevel.mainCharPositioning.x;
mainCharacter.y = currentLevel.mainCharPositioning.y;
mainCharacter.scaleX = thingScaling;
mainCharacter.scaleY = thingScaling;
gameContainer.addChild(mainCharacter);
}
protected function buildRow(_arg1:MovieClip, _arg2:int):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:Rectangle;
var _local8:Boolean;
var _local9:MovieClip;
var _local10:MovieClip;
var _local11:Array;
var _local12:Number;
var _local13:String;
var _local14:Rectangle;
var _local15:int;
var _local16:Number;
var _local17:Array;
var _local18:Number;
var _local19:int;
var _local20:Class;
var _local21:Object;
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = 1;
_local8 = false;
_local11 = new Array();
_local15 = 0;
while (_local15 < instance.levelData[_arg2].contents.length) {
_local17 = instance.levelData[_arg2].contents[_local15].p;
_local18 = instance.levelData[_arg2].contents[_local15].d;
if (!_local12){
_local12 = instance.levelData[_arg2].velocity;
};
if (!_local13){
_local13 = instance.levelData[_arg2].direction;
};
_local19 = 0;
while (_local19 < _local17.length) {
_local20 = (getDefinitionByName(_local17[_local19].id) as Class);
_local21 = new (_local20);
if (!_local10){
_local21.x = 0;
_local21.y = 0;
} else {
_local21.x = _local10.x;
_local21.y = _local10.y;
};
_local21.d = _local17[_local19].d;
_local21.scaleX = thingScaling;
_local21.scaleY = thingScaling;
_local21.move(((_local4 + _local18) + _local17[_local19].d));
_local21.gotoAndStop(_local13);
_local21.direction = _local13;
_local21.name = _local17[_local19];
_local21.rowContainer = _arg1;
if (_local13 == "RIGHT"){
_local21.velocity = (LogicManager.velocity_current + _local12);
} else {
_local21.velocity = -((LogicManager.velocity_current + _local12));
};
_local3 = (_local21.width + _local17[_local19].d);
_local4 = _local3;
_local11.push(_local21);
_arg1.addChild(MovieClip(_local21));
_local10 = MovieClip(_local21);
if (!_local9){
_local9 = MovieClip(_local21);
};
if ((((_local13 == "RIGHT")) && ((_local11.length == 1)))){
_arg1.lastObject = _local10;
};
_local19++;
};
_local15++;
};
_arg1.velocity = _local12;
_arg1.direction = _local13;
_arg1.rowContents = _local11;
_arg1.lastObjectID = (_local11.length - 1);
if (!_arg1.lastObject){
_arg1.lastObject = _local10;
};
_local7 = _arg1.getBounds(_stage);
if (_local9.direction == "RIGHT"){
_local16 = ((_local9.dy * (_stage.stageWidth - _local7.right)) + _local7.y);
_local5 = Functions.getHypotenuse((_local7.y - _local16), (_stage.stageWidth - _local7.right));
_local11.reverse();
} else {
if (_local9.direction == "LEFT"){
_local16 = ((_local9.dy * (0 - _local7.left)) + _local7.y);
_local5 = Functions.getHypotenuse((_local7.y - _local16), _local7.left);
};
};
if (_local5 > 0){
_arg1.x = (_arg1.x - (_local9.dx * _local5));
_arg1.y = (_arg1.y - (_local9.dy * _local5));
};
if (!dx){
dx = _local9.dx;
};
if (!dy){
dy = _local9.dy;
};
_local15 = 0;
while (_local15 < _local11.length) {
_local21 = _local11[_local15];
_local14 = _local21.getBounds(_stage);
if ((((((_local9.direction == "RIGHT")) && ((_arg1.generationX == null)))) && ((_local14.right < 0)))){
_arg1.generationX = _local21.x;
_arg1.generationY = _local21.y;
break;
} else {
if ((((((_local9.direction == "LEFT")) && ((_arg1.generationX == null)))) && ((_local14.left > _stage.stageWidth)))){
_arg1.generationX = _local21.x;
_arg1.generationY = _local21.y;
break;
};
};
_local15++;
};
}
public function resetVars():void{
if (gameContainer){
cleanup();
};
gameContainer = new MovieClip();
rowContainers = new Array();
Game._root._content.addChild(gameContainer);
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
super.catchEvent(_arg1, _arg2);
}
public static function nextLevel():void{
EventManager.fireEvent(GameEvents.LEVEL_CLEANUP);
level++;
instance.resetVars();
if (level >= instance.levels.length){
if (level >= (instance.levels.length * LogicManager.difficulty)){
GameManager.lives++;
LogicManager.increaseDifficulty();
GameManager.levelTime = (GameManager.defaultLevelTime - ((LogicManager.difficulty - 1) * 10));
};
if ((level % instance.levels.length) > 0){
loadLevel((level % instance.levels.length));
} else {
loadLevel(0);
};
} else {
loadLevel(level);
};
InputManager.instance.initialize();
}
public static function get instance():LevelManager{
if (_instance == null){
_instance = new (LevelManager);
};
return ((_instance as LevelManager));
}
public static function cleanup():void{
gameContainer.parent.removeChild(gameContainer);
gameContainer = null;
}
public static function getRowHeight(_arg1:int, _arg2:String="default"):Number{
if ((((_arg2 == "up")) || ((_arg2 == "down")))){
if (rowContainers[_arg1]){
return (rowContainers[_arg1].rowHeight);
};
return (currentLevel.config.firstHop);
};
return (rowHeight);
}
public static function buildLevel(_arg1:Object):void{
var _local2:Number;
var _local3:int;
var _local4:Number;
var _local5:*;
_local2 = currentLevel.config.yOffset;
instance.levelData = _arg1;
bgMc.reload(currentLevel.config.bgFrame);
_local3 = 0;
while (_local3 < currentLevel.rows.length) {
_local4 = rowHeight;
if (currentLevel.rows[_local3].rowHeight){
_local4 = currentLevel.rows[_local3].rowHeight;
};
_local2 = (_local2 + _local4);
rowContainers[_local3] = new MovieClip();
rowContainers[_local3].x = currentLevel.config.xOffset;
rowContainers[_local3].y = _local2;
rowContainers[_local3].depth = _local3;
rowContainers[_local3].rowHeight = _local4;
for (_local5 in currentLevel.rows[_local3]) {
if (_local5 != "pattern"){
rowContainers[_local3][_local5] = currentLevel.rows[_local3][_local5];
};
};
gameContainer.addChild(rowContainers[_local3]);
instance.buildRow(rowContainers[_local3], _local3);
_local3++;
};
instance.configMainChar();
instance.debug("levelData", _arg1);
instance.levelLoaded();
}
public static function loadLevel(_arg1:int=0):void{
if (currentLevel){
currentLevel.destroy();
};
levelLoaded = false;
currentLevel = instance.levels[_arg1];
if (currentLevel){
buildLevel(currentLevel.parseLevelData());
};
EventManager.fireEvent(GameEvents.LEVEL_LOADED);
levelLoaded = true;
}
}
}//package classes.managers
Section 31
//LogicManager (classes.managers.LogicManager)
package classes.managers {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.templates.*;
import classes.events.*;
import flash.utils.*;
public class LogicManager extends BaseManager {
protected var enableCollision:Boolean;// = true
public static var gameObjects:Array;
public static var velocity_increment:Number = 2;
public static var jumpOnJerryCheck:Boolean = false;
public static var velocity_current:Number = 1;
public static var velocity_default:Number = 1;
private static var _instance:LogicManager = new (LogicManager);
;
public static var gameSpeed:Number = 1;
public static var difficulty:Number = 1;
public function LogicManager(){
enableCollision = true;
super();
}
override public function initialize():void{
if (!initialized){
super.initialize();
};
velocity_current = velocity_default;
resetVars();
}
protected function runAI(_arg1:MovieClip):void{
var _local2:Rectangle;
var _local3:MovieClip;
if (_arg1.AI){
_local2 = _arg1.getBounds(_arg1.parent);
if ((((_arg1.rowContainer.lastObject == _arg1)) && ((((((_arg1.direction == "RIGHT")) && ((_local2.left > _arg1.rowContainer.generationX)))) || ((((_arg1.direction == "LEFT")) && ((_local2.right < _arg1.rowContainer.generationX)))))))){
_local3 = _arg1.rowContainer.rowContents[0];
_local3.x = _arg1.rowContainer.generationX;
_local3.y = _arg1.rowContainer.generationY;
if (_arg1.direction == "RIGHT"){
_local3.move(-((_local3.width + _local3.d)));
} else {
if (_arg1.direction == "LEFT"){
_local3.move(_local3.d);
};
};
_arg1.rowContainer.rowContents.splice(0, 1);
_arg1.rowContainer.rowContents.push(_local3);
_arg1.rowContainer.lastObject = _local3;
};
};
}
protected function resetVars():void{
gameObjects = new Array();
jumpOnJerryCheck = false;
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.GAME_PAUSE){
stopTicking();
} else {
if (_arg1 == GameEvents.GAME_UNPAUSE){
startTicking();
} else {
if (_arg1 == GameEvents.LEVEL_COMPLETE){
instance.enableCollision = false;
} else {
if (_arg1 == GameEvents.LEVEL_START){
instance.enableCollision = true;
} else {
if (_arg1 == GameEvents.LEVEL_CLEANUP){
instance.resetVars();
};
};
};
};
};
}
public static function stopTicking():void{
_stage.removeEventListener(Event.ENTER_FRAME, tick);
}
public static function checkCollision():void{
var _local1:Boolean;
var _local2:MovieClip;
var _local3:int;
var _local4:int;
var _local5:MovieClip;
var _local6:MovieClip;
var _local7:int;
var _local8:MovieClip;
var _local9:MovieClip;
var _local10:Rectangle;
var _local11:int;
_local1 = false;
_local3 = 0;
_local4 = 0;
_local7 = LevelManager.mainCharacter.depth;
_local8 = LevelManager.rowContainers[_local7];
_local10 = LevelManager.mainCharacter._hitArea.getBounds(_stage);
if (((_local8) && (instance.enableCollision))){
LevelManager.currentRow = _local7;
_local4 = _local8.numChildren;
_local11 = 0;
while (_local11 < _local8.rowContents.length) {
_local6 = _local8.rowContents[_local11];
_local5 = _local6;
if (_local5["hitMC"]){
_local6 = _local5["hitMC"];
};
if (((_local6.hitTestObject(LevelManager.mainCharacter._hitArea)) && (LevelManager.mainCharacter.notJumping))){
if (!_local5.isSpacer){
_local1 = true;
_local2 = _local5;
} else {
if (LevelManager.mainCharacter.notJumping){
if (_local8.goal){
EventManager.fireEvent(GameEvents.LEVEL_COMPLETE);
};
};
};
} else {
_local5.colliding = false;
};
_local11++;
};
if (((jumpOnJerryCheck) && ((LevelManager.jerry.currentFrame == 1)))){
if (LevelManager.jerry.hitTestObject(LevelManager.mainCharacter._hitArea)){
trace("CRAP!");
EventManager.fireEvent("runJerryRun");
};
};
if (((((_local1) && (LevelManager.mainCharacter.canBeHit))) && (LevelManager.mainCharacter.notJumping))){
if (!_local2.colliding){
if (((_local2.mc) && (_local2.mc.currentLabels))){
if (((_local2.isPlatform) && (_local8.water))){
LevelManager.mainCharacter.waterBounce();
};
_local2.mc.gotoAndPlay("HIT");
};
};
if (_local2.isEnemy){
GameManager.loseLife();
LevelManager.mainCharacter.hit();
} else {
if (_local2.isPlatform){
if ((((_local10.left > 0)) && ((_local10.right < (_stage.stageWidth - 8))))){
LevelManager.mainCharacter.dx = _local5.dx;
LevelManager.mainCharacter.dy = _local5.dy;
LevelManager.mainCharacter.velocity = _local5.velocity;
} else {
LevelManager.mainCharacter.velocity = 0;
};
} else {
if (!_local2.isPlatform){
LevelManager.mainCharacter.velocity = 0;
};
};
};
_local2.colliding = true;
};
if (_local8.water){
if (((((((!(_local1)) || (((_local1) && (!(_local2.isPlatform)))))) && (LevelManager.mainCharacter.canBeHit))) && (LevelManager.mainCharacter.notJumping))){
GameManager.loseLife();
LevelManager.mainCharacter.sink();
};
};
};
if (((instance.enableCollision) && (((!(_local8)) || (!(_local1)))))){
LevelManager.mainCharacter.velocity = 0;
};
}
public static function setDifficulty(_arg1:Number):void{
difficulty = _arg1;
velocity_current = ((velocity_default * velocity_increment) * difficulty);
if (difficulty <= 3){
SoundManager.resetBGLoop();
};
}
public static function sortDepths(_arg1:MovieClip, _arg2:MovieClip, _arg3:Number, _arg4:int=100, _arg5:Boolean=false):void{
var j:int;
var depthUp:Boolean;
var depthDelayTimer:Timer;
var swapNow:Function;
var pMc = _arg1;
var mc = _arg2;
var depth = _arg3;
var delay = _arg4;
var reset = _arg5;
swapNow = function ():void{
var _local1:int;
var _local2:int;
var _local3:int;
depthDelayTimer.removeEventListener("timer", swapNow);
depthDelayTimer.stop();
if (reset){
depth = LevelManager.rowContainers.length;
pMc.swapChildren(mc, pMc.getChildAt((depth - 1)));
};
if (((LevelManager.rowContainers[depth]) && (LevelManager.rowContainers[depth].water))){
depthUp = true;
};
_local1 = 0;
while (_local1 < (LevelManager.rowContainers.length + 1)) {
if (depth == _local1){
if (depthUp){
_local3 = _local1;
_local2 = (_local1 + 1);
} else {
_local3 = (_local1 + 1);
_local2 = _local1;
};
if (LevelManager.rowContainers[j]){
pMc.addChildAt(LevelManager.rowContainers[j], _local3);
};
pMc.addChildAt(mc, _local2);
_local1++;
} else {
if (LevelManager.rowContainers[j]){
pMc.addChildAt(LevelManager.rowContainers[j], _local1);
};
};
j++;
_local1++;
};
};
j = 0;
depthUp = false;
depthDelayTimer = new Timer(delay, 1);
depthDelayTimer.addEventListener("timer", swapNow);
depthDelayTimer.start();
}
public static function addGameObject(_arg1:MovieClip):void{
gameObjects.push(_arg1);
}
public static function get instance():LogicManager{
if (_instance == null){
_instance = new (LogicManager);
};
return ((_instance as LogicManager));
}
public static function increaseDifficulty():void{
setDifficulty((difficulty + 1));
}
public static function startTicking():void{
_stage.addEventListener(Event.ENTER_FRAME, tick, false, 0, true);
}
public static function tick(_arg1:Event=null):void{
var _local2:int;
_local2 = 0;
while (_local2 < gameObjects.length) {
instance.runAI(gameObjects[_local2]);
checkCollision();
gameObjects[_local2].tick();
_local2++;
};
EventManager.fireEvent(GameEvents.TICK);
}
public static function decreaseDifficulty():void{
setDifficulty((difficulty - 1));
}
}
}//package classes.managers
Section 32
//MenuManager (classes.managers.MenuManager)
package classes.managers {
import flash.display.*;
import classes.templates.*;
import classes.events.*;
public class MenuManager extends BaseManager {
protected var menus:Array;
public static var menuOpen:Boolean = false;
public static var menuPending:String;
public static var menuID:String;
private static var _instance:MenuManager = new (MenuManager);
;
public static var menu:MovieClip;
override public function initialize():void{
if (!initialized){
instance.menus = new Array();
addInterests(new Array(GameEvents.LEVEL_COMPLETE, GameEvents.LEVEL_LOADED, GameEvents.LEVEL_FAIL, GameEvents.ALL_LEVELS_COMPLETE));
super.initialize();
};
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.LEVEL_COMPLETE){
openMenu("levelComplete");
} else {
if (_arg1 == GameEvents.LEVEL_FAIL){
openMenu("gameOver");
} else {
if (_arg1 == GameEvents.ALL_LEVELS_COMPLETE){
openMenu("gameComplete");
} else {
if (_arg1 == GameEvents.LEVEL_LOADED){
openMenu("gameHUD", false);
};
};
};
};
}
public static function addMenu(_arg1:MovieClip, _arg2:String){
if (!instance.menus[_arg2]){
instance.menus[_arg2] = _arg1;
};
if ((((menuPending == _arg2)) && (_arg2))){
openMenu(_arg2);
menuPending = null;
};
}
public static function openMenu(_arg1:String, _arg2:Boolean=true):void{
if (((menu) && (_arg2))){
menu.gotoAndPlay("OUT");
};
menu = instance.menus[_arg1];
if (menu){
menuID = _arg1;
menu.gotoAndPlay("IN");
menuOpen = true;
} else {
menuPending = _arg1;
trace("ERROR: Cannot find & open menu", _arg1);
};
}
public static function get instance():MenuManager{
if (_instance == null){
_instance = new (MenuManager);
};
return ((_instance as MenuManager));
}
public static function closeMenu():void{
if (menu){
menu.gotoAndPlay("OUT");
menu = null;
menuOpen = false;
};
}
}
}//package classes.managers
Section 33
//SoundManager (classes.managers.SoundManager)
package classes.managers {
import gs.*;
import flash.display.*;
import flash.geom.*;
import classes.templates.*;
import classes.media.*;
import flash.media.*;
import classes.events.*;
import flash.utils.*;
public class SoundManager extends BaseManager {
public static var globalSoundTransform:SoundTransform = new SoundTransform();
public static var isMuted:Boolean = false;
private static var _instance:SoundManager = new (SoundManager);
;
public static var gameLoop:SoundChannel;
public static var gameLoopSound:Sound;
public static var gameLoopTransform:SoundTransform;
override public function initialize():void{
resetBGLoop();
if (!initialized){
super.initialize();
};
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.MUTE){
mute();
} else {
if (_arg1 == GameEvents.UNMUTE){
unMute();
} else {
if ((((_arg1 == GameEvents.LEVEL_COMPLETE)) || ((_arg1 == GameEvents.LEVEL_FAIL)))){
fadeMusic(0, 1, 0.6);
} else {
if (_arg1 == GameEvents.LEVEL_LOADED){
resetBGLoop();
};
};
};
};
}
public static function updateVolume():void{
gameLoop.soundTransform = gameLoopTransform;
}
public static function unMute():void{
globalSoundTransform.volume = 1;
SoundMixer.soundTransform = globalSoundTransform;
isMuted = false;
}
public static function fadeMusic(_arg1, _arg2:Number=1, _arg3:Number=0):void{
TweenLite.to(gameLoopTransform, _arg2, {volume:_arg1, onUpdate:updateVolume, delay:_arg3});
}
public static function mute():void{
globalSoundTransform.volume = 0;
SoundMixer.soundTransform = globalSoundTransform;
isMuted = true;
}
public static function get instance():SoundManager{
if (_instance == null){
_instance = new (SoundManager);
};
return ((_instance as SoundManager));
}
public static function playRandomSound(_arg1:String, _arg2:int, _arg3:Boolean=false, _arg4:MovieClip=null):void{
var _local5:Class;
var _local6:Sound;
_local5 = (getDefinitionByName((_arg1 + String((int(((Math.random() * _arg2) - 0.1)) + 1)))) as Class);
_local6 = new (_local5);
_local6.play();
if (_arg3){
makeDirectional(Sound(_local6), _arg4);
};
}
public static function makeDirectional(_arg1:Sound, _arg2:MovieClip){
var _local3:Point;
var _local4:Number;
_local3 = new Point(_arg2.x, _arg2.y);
_arg2.parent.localToGlobal(_local3);
_local4 = (((_local3.x / _stage.stageWidth) * 2) - 1);
if (_local4 < -1){
_local4 = -1;
} else {
if (_local4 > 1){
_local4 = 1;
};
};
_arg1.setPan(_local4, 0.25);
}
public static function resetBGLoop():void{
if (gameLoop){
gameLoop.stop();
};
if (LogicManager.difficulty == 1){
gameLoopSound = new GameLoop1();
} else {
if (LogicManager.difficulty == 2){
gameLoopSound = new GameLoop1Fast();
} else {
gameLoopSound = new GameLoop1Ridiculous();
};
};
if (isMuted){
gameLoopTransform = new SoundTransform(0, 0);
} else {
gameLoopTransform = new SoundTransform(1, 0);
};
gameLoop = gameLoopSound.play(0, 99);
gameLoop.soundTransform = gameLoopTransform;
}
}
}//package classes.managers
Section 34
//Sound (classes.media.Sound)
package classes.media {
import gs.*;
import flash.events.*;
import classes.managers.*;
import flash.net.*;
import flash.media.*;
import classes.events.*;
import gs.easing.*;
public class Sound extends Sound {
public var soundChannel:SoundChannel;
private var interests:Array;
private var eventInterests:Array;
private var volume:Number;// = 1
public var soundTransform:SoundTransform;
private var pan:Number;// = 0
private var soundComplete:Function;
public function Sound(_arg1:URLRequest=null, _arg2:SoundLoaderContext=null, _arg3:Number=1, _arg4:Number=0, _arg5:Function=null){
interests = new Array();
eventInterests = new Array();
volume = 1;
pan = 0;
volume = _arg3;
pan = _arg4;
soundComplete = _arg5;
if (SoundManager.isMuted){
soundTransform = new SoundTransform(0, pan);
} else {
soundTransform = new SoundTransform(volume, pan);
};
addInterests(new Array(GameEvents.MUTE, GameEvents.UNMUTE));
super(_arg1, _arg2);
}
public function unregisterEvent(_arg1:String, _arg2:Function=null):void{
var _local3:int;
var _local4:Object;
_local3 = 0;
while (_local3 < eventInterests.length) {
_local4 = eventInterests[_local3];
if (_local4.type == _arg1){
if ((((_arg2 == null)) || ((_local4.listener == _arg2)))){
removeEventListener(_local4.type, _local4.listener, _local4.useCapture);
eventInterests.splice(_local3, 1);
};
};
_local3++;
};
}
public function setPan(_arg1:Number, _arg2:Number=0.5):void{
TweenLite.to(soundTransform, _arg2, {pan:_arg1, ease:Quad.easeOut, onUpdate:updateSound});
}
public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.MUTE){
mute();
};
if (_arg1 == GameEvents.UNMUTE){
unmute();
};
}
public function mute():void{
setVolume(0, 0);
}
protected function _onSoundComplete(_arg1:Event=null):void{
if (soundComplete != null){
soundComplete();
};
}
public function setVolume(_arg1:Number, _arg2:Number=0.5):void{
TweenLite.to(soundTransform, _arg2, {volume:_arg1, ease:Quad.easeOut, onUpdate:updateSound});
}
public function removeInterests(_arg1:Array):void{
var _local2:int;
var _local3:int;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = interests.indexOf(_arg1[_local2]);
if (_local3 != -1){
interests.splice(_local3, 1);
};
_local2++;
};
EventManager.unregisterInterests(this, _arg1);
}
public function destroy():void{
mute();
soundChannel.stop();
removeInterests(interests);
unregisterAllEvents();
}
protected function updateSound():void{
soundChannel.soundTransform = soundTransform;
}
public function unregisterAllEvents():void{
var _local1:int;
var _local2:Object;
_local1 = 0;
while (_local1 < eventInterests.length) {
_local2 = eventInterests[_local1];
removeEventListener(_local2.type, _local2.listener, _local2.useCapture);
eventInterests.splice(_local1, 1);
_local1++;
};
eventInterests = new Array();
}
public function addInterests(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
interests.push(_arg1[_local2]);
_local2++;
};
EventManager.registerInterests(this, _arg1);
}
public function unmute():void{
setVolume((1 * volume), 0);
}
override public function play(_arg1:Number=0, _arg2:int=0, _arg3:SoundTransform=null):SoundChannel{
var _local4:Number;
if (SoundManager.isMuted){
_local4 = 0;
if (_arg3){
_local4 = _arg3.pan;
};
_arg3 = new SoundTransform(0, _local4);
};
soundChannel = super.play(_arg1, _arg2, _arg3);
soundChannel.addEventListener(Event.SOUND_COMPLETE, _onSoundComplete, false, 0, true);
return (soundChannel);
}
public function registerEvent(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=true):void{
var _local6:Object;
_local6 = {type:_arg1, listener:_arg2, useCapture:_arg3, priority:_arg4, useWeakReference:_arg5};
addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
eventInterests.push(_local6);
}
}
}//package classes.media
Section 35
//BaseLevel (classes.templates.BaseLevel)
package classes.templates {
import classes.managers.*;
import classes.events.*;
public class BaseLevel extends Primitive {
public var objectPatterns:Array;
public var config:Object;
public var rows:Array;
public var objectAssociations:Object;
public var mainCharPositioning:Object;
public function BaseLevel():void{
addInterests(new Array(GameEvents.LEVEL_COMPLETE, GameEvents.LEVEL_CLEANUP));
}
protected function initLevelData():void{
objectAssociations = {b1:{id:"Boat1", d:-10}, b2:{id:"Boat2", d:-15}, b3:{id:"Boat3", d:-15}, b4:{id:"Boat4", d:-20}, c1:{id:"Car1", d:0}, c2:{id:"Car2", d:0}, c3:{id:"Car3", d:0}, t1:{id:"Truck1", d:0}, t2:{id:"Truck2", d:10}, s1:{id:"Scooter1", d:20}, space:{id:"Space", d:0}};
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.LEVEL_COMPLETE){
} else {
if (_arg1 == GameEvents.LEVEL_CLEANUP){
destroy();
};
};
}
protected function throwError(_arg1:String=""):void{
trace(("LEVEL ERROR: " + _arg1));
}
public function parseLevelData():Array{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:String;
var _local7:Array;
var _local8:int;
var _local9:Array;
var _local10:Array;
var _local11:int;
var _local12:String;
_local1 = new Array();
initLevelData();
_local2 = 0;
while (_local2 < rows.length) {
_local3 = 0;
_local4 = 0;
_local5 = rows[_local2].velocity;
_local6 = rows[_local2].direction;
_local7 = new Array();
_local8 = 0;
while (_local8 < rows[_local2].pattern.length) {
if (rows[_local2].pattern[_local8].p){
_local3 = rows[_local2].pattern[_local8].p;
};
if (rows[_local2].pattern[_local8].d){
_local4 = rows[_local2].pattern[_local8].d;
};
_local9 = new Array();
if (objectPatterns[_local3]){
_local10 = objectPatterns[_local3].split(" ");
_local11 = 0;
while (_local11 < _local10.length) {
_local12 = _local10[_local11];
if (_local12 == "_"){
_local12 = "space";
};
if (objectAssociations[_local12]){
_local9.push({id:objectAssociations[_local12].id, d:objectAssociations[_local12].d});
} else {
throwError((("Could not find matching object association with '" + _local12) + "'."));
};
_local11++;
};
_local7.push({p:_local9, d:_local4});
} else {
trace("ERROR: ATTEMPTING TO CALL UNDEFINED PATTERN.");
};
_local8++;
};
_local1.push({contents:_local7, velocity:_local5, direction:_local6});
_local2++;
};
return (_local1);
}
public function levelComplete():void{
}
override public function destroy():void{
super.destroy();
}
}
}//package classes.templates
Section 36
//BaseManager (classes.templates.BaseManager)
package classes.templates {
import flash.display.*;
import classes.managers.*;
import classes.*;
import classes.events.*;
public class BaseManager {
private var interests:Array;
protected var initialized:Boolean;// = false
private static var _instance:BaseManager = new (BaseManager);
;
public static var _stage:Stage;
public function BaseManager(){
interests = new Array();
initialized = false;
super();
}
public function removeInterests(_arg1:Array):void{
var _local2:int;
var _local3:int;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = interests.indexOf(_arg1[_local2]);
if (_local3 != -1){
interests.splice(_local3, 1);
};
_local2++;
};
EventManager.unregisterInterests(this, _arg1);
}
public function removeAllInterests():void{
EventManager.unregisterInterests(this, interests);
interests = new Array();
}
public function addInterests(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
interests.push(_arg1[_local2]);
_local2++;
};
EventManager.registerInterests(this, _arg1);
}
public function initialize():void{
_stage = Game._stage;
initialized = true;
addInterests(new Array(GameEvents.MUTE, GameEvents.UNMUTE, GameEvents.GAME_PAUSE, GameEvents.GAME_UNPAUSE, GameEvents.LEVEL_CLEANUP, GameEvents.LEVEL_START, GameEvents.LEVEL_COMPLETE, GameEvents.LEVEL_LOADED));
}
public function destroy():void{
removeInterests(interests);
interests = new Array();
}
public function catchEvent(_arg1:String, _arg2:Object):void{
}
public static function get instance():BaseManager{
if (_instance == null){
_instance = new (BaseManager);
};
return ((_instance as BaseManager));
}
}
}//package classes.templates
Section 37
//GameObject (classes.templates.GameObject)
package classes.templates {
import classes.managers.*;
import classes.events.*;
public class GameObject extends Primitive {
public var colliding:Boolean;// = false
public var depth:int;// = 0
protected var isPaused:Boolean;// = false
public function GameObject():void{
depth = 0;
colliding = false;
isPaused = false;
super();
this.mouseChildren = false;
this.mouseEnabled = false;
LogicManager.addGameObject(this);
addInterests(new Array(GameEvents.GAME_PAUSE, GameEvents.GAME_UNPAUSE, GameEvents.LEVEL_CLEANUP));
}
public function pause():void{
isPaused = true;
}
override public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.GAME_PAUSE){
pause();
} else {
if (_arg1 == GameEvents.GAME_UNPAUSE){
unPause();
} else {
if (_arg1 == GameEvents.LEVEL_CLEANUP){
destroy();
};
};
};
}
public function unPause():void{
isPaused = false;
}
override public function destroy():void{
pause();
super.destroy();
}
}
}//package classes.templates
Section 38
//Primitive (classes.templates.Primitive)
package classes.templates {
import flash.display.*;
import classes.managers.*;
public class Primitive extends MovieClip {
protected var interests:Array;
public function Primitive():void{
interests = new Array();
super();
}
public function destroy():void{
removeAllInterests();
if (parent){
parent.removeChild(this);
};
}
public function removeInterests(_arg1:Array):void{
var _local2:int;
var _local3:int;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = interests.indexOf(_arg1[_local2]);
if (_local3 != -1){
interests.splice(_local3, 1);
};
_local2++;
};
EventManager.unregisterInterests(this, _arg1);
}
public function catchEvent(_arg1:String, _arg2:Object):void{
}
public function removeAllInterests():void{
EventManager.unregisterInterests(this, interests);
interests = new Array();
}
public function addInterests(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
interests.push(_arg1[_local2]);
_local2++;
};
EventManager.registerInterests(this, _arg1);
}
}
}//package classes.templates
Section 39
//AyzTimer (classes.utils.AyzTimer)
package classes.utils {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class AyzTimer extends EventDispatcher {
var delay:int;// = 0
var timer:Timer;
var useFrames:Boolean;// = false
var startTime:int;// = 0
var timeRemaining:int;// = 0
var obj:Sprite;
var repeats:int;// = 0
var repeatCount:int;// = 0
public function AyzTimer(_arg1:int=1000, _arg2:int=0, _arg3:Boolean=false, _arg4:Function=null, _arg5:Boolean=false):void{
delay = 0;
startTime = 0;
repeats = 0;
repeatCount = 0;
timeRemaining = 0;
useFrames = false;
obj = new Sprite();
super();
timeRemaining = (delay = _arg1);
repeats = _arg2;
repeatCount = 0;
if (_arg5){
useFrames = true;
};
if (_arg3){
start();
};
if (_arg4 != null){
this.addEventListener(TimerEvent.TIMER, _arg4, false, 0, true);
};
}
public function stop():void{
if (useFrames){
obj.removeEventListener(Event.ENTER_FRAME, tick);
} else {
if (timer){
timer.stop();
timeRemaining = (delay - (getTimer() - startTime));
};
};
}
public function destroy():void{
if (timer){
timer.stop();
};
obj.removeEventListener(Event.ENTER_FRAME, tick);
obj = null;
}
public function tick(_arg1:Event=null):void{
timeRemaining--;
if (timeRemaining <= 0){
timerComplete();
};
}
public function start(_arg1:Boolean=true):void{
if (useFrames){
if (_arg1){
resetTimer(delay);
} else {
resetTimer(timeRemaining);
};
} else {
startTime = getTimer();
if (_arg1){
startTime = getTimer();
resetTimer(delay);
} else {
resetTimer(timeRemaining);
};
};
}
public function restart():void{
repeatCount = 0;
start();
}
public function resume():void{
start(false);
}
protected function timerComplete(_arg1:Event=null):void{
repeatCount++;
dispatchEvent(new Event("timer"));
if (repeatCount >= repeats){
if (useFrames){
obj.removeEventListener(Event.ENTER_FRAME, tick);
};
dispatchEvent(new Event("timerComplete"));
destroy();
} else {
start();
};
}
public function changeDelay(_arg1:int){
stop();
if ((getTimer() - startTime) >= _arg1){
timerComplete();
} else {
delay = _arg1;
timeRemaining = (delay - (getTimer() - startTime));
resetTimer(timeRemaining, true);
};
}
protected function resetTimer(_arg1:int, _arg2:Boolean=true):void{
timeRemaining = _arg1;
if (((useFrames) && (_arg2))){
obj.addEventListener(Event.ENTER_FRAME, tick);
} else {
if (!useFrames){
timer = new Timer(_arg1, 1);
if (_arg2){
timer.start();
};
timer.addEventListener("timer", timerComplete);
};
};
}
}
}//package classes.utils
Section 40
//Functions (classes.utils.Functions)
package classes.utils {
public class Functions {
public static function getHypotenuse(_arg1:Number, _arg2:Number):Number{
return (Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2))));
}
public static function addCommas(_arg1:Number):String{
var _local2:String;
var _local3:int;
var _local4:int;
_local2 = String(_arg1);
if (_local2.length > 3){
_local3 = int(((_local2.length - 1) / 3));
_local4 = 1;
while (_local4 <= _local3) {
_local2 = ((_local2.substring(0, ((_local2.length - (3 * _local4)) - (_local4 - 1))) + ",") + _local2.substr(((_local2.length - (3 * _local4)) - (_local4 - 1))));
_local4++;
};
};
return (_local2);
}
}
}//package classes.utils
Section 41
//LazyButton (classes.utils.LazyButton)
package classes.utils {
import gs.*;
import flash.events.*;
import flash.display.*;
import gs.easing.*;
public class LazyButton extends MovieClip {
public var rollOutFunc:String;// = "default_rollOut"
public var activateFunc:String;// = "default_activate"
public var deactivateFunc:String;// = "default_deactivate"
public var rollOverFunc:String;// = "default_rollOver"
public var clickFunc:String;// = "default_click"
public var currentStyle:String;// = "color"
public var styles:Object;
public function LazyButton():void{
rollOverFunc = "default_rollOver";
rollOutFunc = "default_rollOut";
clickFunc = "default_click";
deactivateFunc = "default_deactivate";
activateFunc = "default_activate";
styles = new Object();
currentStyle = "color";
super();
initAnimationStyles();
mouseChildren = false;
buttonMode = true;
addEventListener(MouseEvent.CLICK, btnAction, false, 0, true);
addEventListener(MouseEvent.ROLL_OVER, btnAction, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, btnAction, false, 0, true);
}
protected function defaultRollOut(_arg1:Event=null):void{
TweenLite.to(this, 0.25, styles.rollOuts[currentStyle]);
}
protected function defaultActivate(_arg1:Event=null):void{
TweenLite.to(this, 0.25, {alpha:1, ease:Quad.easeOut});
}
public function initAnimationStyles():void{
var _local1:Object;
var _local2:Object;
var _local3:Object;
var _local4:Object;
_local1 = new Object();
_local2 = new Object();
_local3 = new Object();
_local1.color = {tint:16716564, ease:Quad.easeOut};
_local1.scale = {scaleX:1.2, scaleY:1.2, ease:Quad.easeOut};
_local1.alpha = {alpha:1, ease:Quad.easeOut};
_local2.color = {removeTint:true, ease:Quad.easeOut};
_local2.scale = {scaleX:1, scaleY:1, ease:Quad.easeOut};
_local2.alpha = {alpha:1, ease:Quad.easeOut};
_local4 = Linear;
_local4 = Quad;
_local4 = Cubic;
_local4 = Sine;
_local4 = Elastic;
_local4 = Back;
_local4 = Bounce;
_local4 = Expo;
_local4 = null;
styles = {rollOvers:_local1, rollOuts:_local2};
}
protected function defaultRollOver(_arg1:Event=null):void{
TweenLite.to(this, 0.25, styles.rollOvers[currentStyle]);
}
public function enable():void{
runFunction(activateFunc);
}
public function runFunction(_arg1:String){
if (_arg1 == "default_rollOver"){
defaultRollOver();
} else {
if (_arg1 == "default_rollOut"){
defaultRollOut();
} else {
if (_arg1 == "default_click"){
defaultClick();
} else {
if (_arg1 == "default_deactivate"){
defaultDeactivate();
} else {
if (_arg1 == "default_activate"){
defaultActivate();
} else {
if (((!((_arg1 == ""))) && (!((this.parent[_arg1] == null))))){
var _local2 = this.parent;
_local2[_arg1]();
};
};
};
};
};
};
}
protected function defaultDeactivate(_arg1:Event=null):void{
TweenLite.to(this, 0.25, {alpha:0.5, ease:Quad.easeOut});
}
public function setAnimationStyle(_arg1:String, _arg2=null):void{
var _local3:*;
if (styles.rollOvers[_arg1]){
currentStyle = _arg1;
} else {
currentStyle = "color";
};
if (currentStyle == "scale"){
styles.rollOvers.scale.scaleX = (styles.rollOvers.scale.scaleX * this.scaleX);
styles.rollOvers.scale.scaleY = (styles.rollOvers.scale.scaleY * this.scaleY);
styles.rollOuts.scale.scaleX = this.scaleX;
styles.rollOuts.scale.scaleY = this.scaleY;
};
for (_local3 in _arg2) {
if (styles.rollOvers[_local3]){
styles.rollOvers[_local3] = _arg2[_local3];
};
};
}
protected function btnAction(_arg1:Event):void{
if (_arg1.type == "rollOver"){
runFunction(rollOverFunc);
} else {
if (_arg1.type == "rollOut"){
runFunction(rollOutFunc);
} else {
if (_arg1.type == "click"){
runFunction(clickFunc);
};
};
};
}
protected function defaultClick(_arg1:Event=null):void{
trace("No Click Function Specified!");
}
public function disable():void{
runFunction(deactivateFunc);
}
}
}//package classes.utils
Section 42
//App (classes.App)
package classes {
import flash.events.*;
import flash.display.*;
import classes.managers.*;
public class App extends MovieClip {
public var background:MovieClip;
public var preloader:MovieClip;
public var percLoaded:Number;// = 0
public var _content:MovieClip;
public var lastPerc:Number;// = 0
public function App():void{
percLoaded = 0;
lastPerc = 0;
super();
addFrameScript(12, frame13, 28, frame29);
stop();
initPreloader();
}
protected function preloadComplete():void{
preloader.removeEventListener(Event.ENTER_FRAME, checkPreloadStatus);
preloader.gotoAndPlay("OUT");
}
function frame13(){
gotoAndStop("MAIN_MENU");
}
protected function initPreloader():void{
preloader.addEventListener(Event.ENTER_FRAME, checkPreloadStatus, false, 0, true);
preloader.gotoAndPlay("IN");
}
function frame29(){
LevelManager.bgMc = background;
Game.setStage(stage);
Game.initialize();
}
protected function checkPreloadStatus(_arg1:Event=null):void{
lastPerc = percLoaded;
percLoaded = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal);
if (percLoaded == 1){
preloadComplete();
} else {
if (preloader.progressUpdate){
preloader.progressUpdate(percLoaded);
};
};
}
protected function initialize():void{
}
public function preloaderOutroComplete():void{
initialize();
this.gotoAndStop("INTRO");
}
}
}//package classes
Section 43
//Game (classes.Game)
package classes {
import flash.display.*;
import classes.managers.*;
import classes.events.*;
public class Game extends MovieClip {
public static var _root:MovieClip;
public static var gameActive:Boolean = false;
private static var _instance:Game = new (Game);
;
public static var isPaused:Boolean = false;
public static var _stage:Stage;
protected function resetVars():void{
LevelManager.level = 0;
GameManager.resetVars();
}
public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == GameEvents.LEVEL_LOADED){
instance.levelLoaded();
} else {
if (_arg1 == GameEvents.GAME_PAUSE){
pause();
} else {
if (_arg1 == GameEvents.GAME_UNPAUSE){
unpause();
};
};
};
}
protected function levelLoaded():void{
LogicManager.startTicking();
}
public static function restartGame():void{
EventManager.fireEvent(GameEvents.LEVEL_CLEANUP);
newGame();
}
public static function endGame():void{
EventManager.fireEvent(GameEvents.LEVEL_FAIL);
}
public static function initialize():void{
EventManager.registerInterests(instance, new Array(GameEvents.LEVEL_LOADED, GameEvents.GAME_PAUSE, GameEvents.GAME_UNPAUSE));
newGame();
}
public static function get instance():Game{
if (_instance == null){
_instance = new (Game);
};
return ((_instance as Game));
}
public static function pause():void{
isPaused = true;
}
public static function newGame():void{
instance.resetVars();
LogicManager.instance.initialize();
MenuManager.instance.initialize();
LevelManager.instance.initialize();
LevelManager.loadLevel();
GameManager.instance.initialize();
InputManager.instance.initialize();
SoundManager.instance.initialize();
}
public static function setStage(_arg1:Stage):void{
_stage = _arg1;
_root = MovieClip(_stage.getChildAt(0));
}
public static function unpause():void{
isPaused = false;
}
}
}//package classes
Section 44
//Background_55 (game_fla.Background_55)
package game_fla {
import flash.display.*;
public dynamic class Background_55 extends MovieClip {
public var destination:int;
public var jerry:MovieClip;
public function Background_55(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
destination = -1;
}
function frame2(){
reload();
}
public function reload(_arg1:int=-1){
if (_arg1 > 0){
destination = (_arg1 + 2);
};
if (currentFrame != 2){
gotoAndStop(2);
} else {
if (destination > 0){
gotoAndStop(destination);
} else {
stop();
};
};
}
}
}//package game_fla
Section 45
//bbt_138 (game_fla.bbt_138)
package game_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.managers.*;
import flash.net.*;
import flash.media.*;
import classes.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class bbt_138 extends MovieClip {
public function bbt_138(){
addFrameScript(0, frame1, 1, frame2);
}
public function destroy(_arg1:Event):void{
removeEventListener(MouseEvent.CLICK, toggleMute);
removeEventListener(MouseEvent.ROLL_OVER, btnOver);
removeEventListener(MouseEvent.ROLL_OUT, btnOut);
removeEventListener(Event.REMOVED_FROM_STAGE, destroy);
EventManager.unregisterInterests(this, new Array(GameEvents.MUTE, GameEvents.UNMUTE));
}
public function btnOver(_arg1:Event=null):void{
alpha = 1;
}
public function btnOut(_arg1:Event=null):void{
alpha = 0.5;
}
function frame1(){
addEventListener(MouseEvent.CLICK, toggleMute, false, 0, true);
addEventListener(MouseEvent.ROLL_OVER, btnOver, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, btnOut, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, destroy, false, 0, true);
EventManager.registerInterests(this, new Array(GameEvents.MUTE, GameEvents.UNMUTE));
stop();
}
function frame2(){
stop();
}
public function catchEvent(_arg1:String, _arg2:Object):void{
if ((((((_arg1 == GameEvents.MUTE)) || ((_arg1 == GameEvents.UNMUTE)))) && (!(_arg2.fromBtn)))){
toggleMute();
};
}
public function toggleMute(_arg1:MouseEvent=null):void{
if (SoundManager.isMuted){
gotoAndStop(1);
EventManager.fireEvent(GameEvents.UNMUTE, {fromBtn:true});
} else {
gotoAndStop(2);
EventManager.fireEvent(GameEvents.MUTE, {fromBtn:true});
};
}
}
}//package game_fla
Section 46
//BG_4 (game_fla.BG_4)
package game_fla {
import flash.display.*;
import ayz.components.image.*;
public dynamic class BG_4 extends MovieClip {
public var bg:MovieClip;
public var __id0_:BitmapRedrawer;
public function BG_4(){
__setProp___id0__BG_cacher_1();
}
function __setProp___id0__BG_cacher_1(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.targetMCs = ["bg"];
__id0_.autoStart = true;
__id0_.removeOriginals = true;
__id0_.smoothing = false;
__id0_.snapToPixels = "auto";
__id0_.delay = 0;
__id0_.xOffset = 0;
__id0_.yOffset = 0;
__id0_.edgePadding = 0;
__id0_.onCacheComplete = "onCacheComplete";
__id0_.onError = "onError";
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package game_fla
Section 47
//bgFrame1_56 (game_fla.bgFrame1_56)
package game_fla {
import flash.display.*;
import ayz.components.image.*;
public dynamic class bgFrame1_56 extends MovieClip {
public var startPoint:MovieClip;
public var endPoint:MovieClip;
public var __id3_:BitmapRedrawer;
public var countryRoad:MovieClip;
public function bgFrame1_56(){
addFrameScript(0, frame1);
__setProp___id3__bgFrame1__1();
}
function frame1(){
stop();
}
function __setProp___id3__bgFrame1__1(){
try {
__id3_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id3_.targetMCs = ["endPoint", "countryRoad", "startPoint"];
__id3_.autoStart = true;
__id3_.removeOriginals = true;
__id3_.smoothing = false;
__id3_.snapToPixels = "auto";
__id3_.delay = 0;
__id3_.xOffset = 0;
__id3_.yOffset = 0;
__id3_.edgePadding = 0;
__id3_.onCacheComplete = "onCacheComplete";
__id3_.onError = "onError";
try {
__id3_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package game_fla
Section 48
//bgFrame2_96 (game_fla.bgFrame2_96)
package game_fla {
import flash.display.*;
import ayz.components.image.*;
public dynamic class bgFrame2_96 extends MovieClip {
public var endPoint:MovieClip;
public var grass:MovieClip;
public var __id4_:BitmapRedrawer;
public function bgFrame2_96(){
__setProp___id4__bgFrame2__1();
}
function __setProp___id4__bgFrame2__1(){
try {
__id4_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id4_.targetMCs = ["endPoint", "grass"];
__id4_.autoStart = true;
__id4_.removeOriginals = true;
__id4_.smoothing = false;
__id4_.snapToPixels = "auto";
__id4_.delay = 0;
__id4_.xOffset = 0;
__id4_.yOffset = 0;
__id4_.edgePadding = 0;
__id4_.onCacheComplete = "onCacheComplete";
__id4_.onError = "onError";
try {
__id4_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package game_fla
Section 49
//bgFrame3_117 (game_fla.bgFrame3_117)
package game_fla {
import flash.display.*;
import ayz.components.image.*;
public dynamic class bgFrame3_117 extends MovieClip {
public var __id5_:BitmapRedrawer;
public var startPoint:MovieClip;
public var endPoint:MovieClip;
public var countryRoad:MovieClip;
public function bgFrame3_117(){
__setProp___id5__bgFrame3__1();
}
function __setProp___id5__bgFrame3__1(){
try {
__id5_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id5_.targetMCs = ["endPoint", "countryRoad", "startPoint"];
__id5_.autoStart = true;
__id5_.removeOriginals = true;
__id5_.smoothing = true;
__id5_.snapToPixels = "always";
__id5_.delay = 0;
__id5_.xOffset = 0;
__id5_.yOffset = 0;
__id5_.edgePadding = 0;
__id5_.onCacheComplete = "onCacheComplete";
__id5_.onError = "onError";
try {
__id5_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package game_fla
Section 50
//bgFrame4_120 (game_fla.bgFrame4_120)
package game_fla {
import flash.display.*;
import ayz.components.image.*;
public dynamic class bgFrame4_120 extends MovieClip {
public var __id6_:BitmapRedrawer;
public var startPoint:MovieClip;
public var endPoint:MovieClip;
public var countryRoad:MovieClip;
public function bgFrame4_120(){
__setProp___id6__bgFrame4__1();
}
function __setProp___id6__bgFrame4__1(){
try {
__id6_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id6_.targetMCs = ["endPoint", "countryRoad", "startPoint"];
__id6_.autoStart = true;
__id6_.removeOriginals = true;
__id6_.smoothing = false;
__id6_.snapToPixels = "auto";
__id6_.delay = 0;
__id6_.xOffset = 0;
__id6_.yOffset = 0;
__id6_.edgePadding = 0;
__id6_.onCacheComplete = "onCacheComplete";
__id6_.onError = "onError";
try {
__id6_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package game_fla
Section 51
//boat_left_38 (game_fla.boat_left_38)
package game_fla {
import flash.display.*;
public dynamic class boat_left_38 extends MovieClip {
public var mc:MovieClip;
public function boat_left_38(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 52
//boat1_right_232 (game_fla.boat1_right_232)
package game_fla {
import flash.display.*;
public dynamic class boat1_right_232 extends MovieClip {
public var mc:MovieClip;
public function boat1_right_232(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 53
//boat2_left_41 (game_fla.boat2_left_41)
package game_fla {
import flash.display.*;
public dynamic class boat2_left_41 extends MovieClip {
public var mc:MovieClip;
public function boat2_left_41(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 54
//boat2_right_229 (game_fla.boat2_right_229)
package game_fla {
import flash.display.*;
public dynamic class boat2_right_229 extends MovieClip {
public var mc:MovieClip;
public function boat2_right_229(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 55
//boat3_left_224 (game_fla.boat3_left_224)
package game_fla {
import flash.display.*;
public dynamic class boat3_left_224 extends MovieClip {
public var mc:MovieClip;
public function boat3_left_224(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 56
//boat3_right_226 (game_fla.boat3_right_226)
package game_fla {
import flash.display.*;
public dynamic class boat3_right_226 extends MovieClip {
public var mc:MovieClip;
public function boat3_right_226(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 57
//boat4_left_220 (game_fla.boat4_left_220)
package game_fla {
import flash.display.*;
public dynamic class boat4_left_220 extends MovieClip {
public var mc:MovieClip;
public function boat4_left_220(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 58
//boat4_right_222 (game_fla.boat4_right_222)
package game_fla {
import flash.display.*;
public dynamic class boat4_right_222 extends MovieClip {
public var mc:MovieClip;
public function boat4_right_222(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 59
//bonus_num_135 (game_fla.bonus_num_135)
package game_fla {
import flash.display.*;
public dynamic class bonus_num_135 extends MovieClip {
public var multiplierNumber:MovieClip;
}
}//package game_fla
Section 60
//bonusTimer_133 (game_fla.bonusTimer_133)
package game_fla {
import flash.display.*;
public dynamic class bonusTimer_133 extends MovieClip {
public var _bottom:MovieClip;
public var _top:MovieClip;
public function bonusTimer_133(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 61
//bottomMenu_124 (game_fla.bottomMenu_124)
package game_fla {
import flash.display.*;
public dynamic class bottomMenu_124 extends MovieClip {
public var menu_gameHUD:MovieClip;
public var menu_levelComplete:MovieClip;
}
}//package game_fla
Section 62
//clickToContinueContainer_178 (game_fla.clickToContinueContainer_178)
package game_fla {
import flash.display.*;
import classes.managers.*;
public dynamic class clickToContinueContainer_178 extends MovieClip {
public var clickToContinue:ClickToContinue;
public function clickToContinueContainer_178(){
addFrameScript(0, frame1);
}
public function nextLevel():void{
MenuManager.closeMenu();
}
function frame1(){
clickToContinue.clickFunc = "nextLevel";
}
}
}//package game_fla
Section 63
//country_road_frame1_57 (game_fla.country_road_frame1_57)
package game_fla {
import flash.display.*;
public dynamic class country_road_frame1_57 extends MovieClip {
public function country_road_frame1_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 64
//directions_29 (game_fla.directions_29)
package game_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class directions_29 extends MovieClip {
public var playBtn:SimpleButton;
public function directions_29(){
addFrameScript(25, frame26, 44, frame45);
}
function frame26(){
playBtn.addEventListener(MouseEvent.CLICK, playGame, false, 0, true);
stop();
}
public function playGame(_arg1:MouseEvent=null):void{
var _local2 = parent;
_local2["playGame"](_arg1);
}
function frame45(){
MovieClip(parent).outroComplete();
}
}
}//package game_fla
Section 65
//directions_text_36 (game_fla.directions_text_36)
package game_fla {
import gs.*;
import flash.display.*;
import gs.easing.*;
import ayz.components.image.*;
public dynamic class directions_text_36 extends MovieClip {
public var backBtn:BackBtn;
public var directionsText:MovieClip;
public var startX:Number;
public var nextBtn:NextBtn;
public var directionsMC:Sprite;
public var maxClicks:int;
public var __id2_:BitmapRedrawer;
public var directionsMask:MovieClip;
public var clickNum:int;
public var stepSize:Number;
public function directions_text_36(){
addFrameScript(0, frame1);
__setProp___id2__directions_text__1();
}
public function onCacheComplete(_arg1:Sprite):void{
directionsMC = _arg1;
directionsMC.mask = directionsMask;
startX = directionsMC.x;
}
function frame1(){
maxClicks = 3;
clickNum = 1;
stepSize = 690;
nextBtn.clickFunc = "nextClick";
nextBtn.currentStyle = "scale";
backBtn.clickFunc = "backClick";
backBtn.currentStyle = "scale";
backBtn.alpha = 0;
stop();
}
public function nextClick():void{
if (clickNum < maxClicks){
TweenLite.to(directionsMC, 0.5, {x:(startX - (clickNum * stepSize)), ease:Quad.easeInOut});
TweenLite.to(backBtn, 0.25, {alpha:1});
clickNum++;
if (clickNum == maxClicks){
TweenLite.to(nextBtn, 0.25, {alpha:0});
};
};
}
function __setProp___id2__directions_text__1(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_.targetMCs = ["directionsText"];
__id2_.autoStart = true;
__id2_.removeOriginals = true;
__id2_.smoothing = true;
__id2_.snapToPixels = "auto";
__id2_.delay = 0;
__id2_.xOffset = 0;
__id2_.yOffset = 0;
__id2_.edgePadding = 0;
__id2_.onCacheComplete = "onCacheComplete";
__id2_.onError = "onError";
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function backClick():void{
if (clickNum > 1){
clickNum--;
TweenLite.to(directionsMC, 0.5, {x:(startX - ((clickNum - 1) * stepSize)), ease:Quad.easeInOut});
TweenLite.to(nextBtn, 0.25, {alpha:1});
if (clickNum == 1){
TweenLite.to(backBtn, 0.25, {alpha:0});
};
};
}
}
}//package game_fla
Section 66
//directionscopy_27 (game_fla.directionscopy_27)
package game_fla {
import flash.display.*;
public dynamic class directionscopy_27 extends MovieClip {
public var directionsBtn:MovieClip;
}
}//package game_fla
Section 67
//gameHUD_125 (game_fla.gameHUD_125)
package game_fla {
import flash.display.*;
import classes.managers.*;
public dynamic class gameHUD_125 extends MovieClip {
public function gameHUD_125(){
addFrameScript(0, frame1, 21, frame22, 45, frame46);
}
function frame1(){
MenuManager.addMenu(this, "gameHUD");
stop();
}
function frame22(){
stop();
}
function frame46(){
stop();
}
}
}//package game_fla
Section 68
//gamePaused_180 (game_fla.gamePaused_180)
package game_fla {
import flash.events.*;
import flash.display.*;
import classes.managers.*;
import classes.events.*;
public dynamic class gamePaused_180 extends MovieClip {
public function gamePaused_180(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 24, frame25);
}
function frame7(){
stop();
}
function frame1(){
MenuManager.addMenu(this, "gamePaused");
stop();
}
function frame25(){
stop();
}
public function closeMenu(_arg1:Event=null):void{
EventManager.fireEvent(GameEvents.GAME_UNPAUSE);
MenuManager.closeMenu();
}
function frame2(){
this.addEventListener(MouseEvent.CLICK, closeMenu);
}
}
}//package game_fla
Section 69
//grass2_100 (game_fla.grass2_100)
package game_fla {
import flash.display.*;
public dynamic class grass2_100 extends MovieClip {
public function grass2_100(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndPlay((Math.round((Math.random() * 20)) + 1));
}
}
}//package game_fla
Section 70
//grass3_61 (game_fla.grass3_61)
package game_fla {
import flash.display.*;
public dynamic class grass3_61 extends MovieClip {
public function grass3_61(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndPlay((Math.round((Math.random() * 20)) + 1));
}
}
}//package game_fla
Section 71
//jerry_on_deck_chair_63 (game_fla.jerry_on_deck_chair_63)
package game_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.managers.*;
import flash.net.*;
import flash.media.*;
import classes.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class jerry_on_deck_chair_63 extends MovieClip {
public var interests:Array;
public function jerry_on_deck_chair_63(){
addFrameScript(0, frame1, 40, frame41);
}
function frame1(){
interests = new Array(GameEvents.LEVEL_COMPLETE, "runJerryRun");
EventManager.registerInterests(this, interests);
LevelManager.jerry = this;
this.catchEvent = function (_arg1:String, _arg2:Object):void{
gotoAndPlay("RUN");
EventManager.unregisterInterests(this, interests);
};
stop();
}
function frame41(){
stop();
}
}
}//package game_fla
Section 72
//jerrySunbathing_102 (game_fla.jerrySunbathing_102)
package game_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.managers.*;
import flash.net.*;
import flash.media.*;
import classes.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class jerrySunbathing_102 extends MovieClip {
public var interests:Array;
public function jerrySunbathing_102(){
addFrameScript(0, frame1, 36, frame37);
}
function frame1(){
interests = new Array(GameEvents.LEVEL_COMPLETE, "runJerryRun");
EventManager.registerInterests(this, interests);
LevelManager.jerry = this;
this.catchEvent = function (_arg1:String, _arg2:Object):void{
gotoAndPlay("RUN");
EventManager.unregisterInterests(this, interests);
};
stop();
}
function frame37(){
stop();
}
}
}//package game_fla
Section 73
//level_140 (game_fla.level_140)
package game_fla {
import flash.display.*;
import classes.managers.*;
import classes.utils.*;
import flash.text.*;
public dynamic class level_140 extends MovieClip {
public var txt:TextField;
public function level_140(){
addFrameScript(0, frame1);
}
function frame1(){
txt.autoSize = TextFieldAutoSize.LEFT;
txt.text = ((("LEVEL " + String((LevelManager.level + 1))) + " HIGH-SCORE: ") + Functions.addCommas(GameManager.highScore));
}
}
}//package game_fla
Section 74
//levelComplete_bonus_175 (game_fla.levelComplete_bonus_175)
package game_fla {
import flash.display.*;
import classes.managers.*;
import flash.text.*;
public dynamic class levelComplete_bonus_175 extends MovieClip {
public var bonus:TextField;
public var bonusTimer:MovieClip;
public var multiplier:int;
public function levelComplete_bonus_175(){
addFrameScript(0, frame1);
}
function frame1(){
multiplier = GameManager.currentSegment;
bonusTimer.gotoAndStop((Math.round((((GameManager.timeProgressed / (GameManager.levelTime * 1000)) * bonusTimer.totalFrames) * GameManager.bonusSegments)) % bonusTimer.totalFrames));
bonus.text = (String(multiplier) + "x");
}
}
}//package game_fla
Section 75
//levelComplete_totalPoints_174 (game_fla.levelComplete_totalPoints_174)
package game_fla {
import gs.*;
import flash.display.*;
import classes.managers.*;
import gs.easing.*;
import classes.utils.*;
import flash.text.*;
public dynamic class levelComplete_totalPoints_174 extends MovieClip {
public var totalPoints:TextField;
public var currentScore:Number;
public var totalScore:Number;
public function levelComplete_totalPoints_174(){
addFrameScript(0, frame1);
}
function frame1(){
currentScore = (GameManager.score + GameManager.levelCompleteBonus);
totalScore = GameManager.calculateLevelScore();
setText();
}
public function setText():void{
totalPoints.text = Functions.addCommas(Math.round(currentScore));
}
public function calculateTotal():void{
TweenLite.to(this, (0.5 + ((totalScore - currentScore) / 1500)), {currentScore:totalScore, ease:Linear.easeOut, delay:0.5, onUpdate:setText});
}
}
}//package game_fla
Section 76
//levelCompletecopy_165 (game_fla.levelCompletecopy_165)
package game_fla {
import flash.events.*;
import flash.display.*;
import classes.managers.*;
import flash.utils.*;
public dynamic class levelCompletecopy_165 extends MovieClip {
public var totalPoints:MovieClip;
public var menuWait:Timer;
public var levelNumComplete:MovieClip;
public function levelCompletecopy_165(){
addFrameScript(0, frame1, 1, frame2, 16, frame17, 20, frame21, 57, frame58, 73, frame74);
}
function frame74(){
stop();
}
public function okPlay(_arg1:Event):void{
play();
}
function frame1(){
MenuManager.addMenu(this, "levelComplete");
stop();
}
function frame17(){
}
function frame21(){
stop();
}
function frame2(){
menuWait = new Timer(1500, 1);
menuWait.addEventListener("timer", okPlay);
menuWait.start();
stop();
}
function frame58(){
trace("NEXT LEVEL");
LevelManager.nextLevel();
}
}
}//package game_fla
Section 77
//levelNumComplete_176 (game_fla.levelNumComplete_176)
package game_fla {
import flash.display.*;
import classes.managers.*;
import flash.text.*;
public dynamic class levelNumComplete_176 extends MovieClip {
public var levelComplete:TextField;
public function levelNumComplete_176(){
addFrameScript(0, frame1);
}
function frame1(){
levelComplete.text = (("Level " + String((LevelManager.level + 1))) + " Complete!");
}
}
}//package game_fla
Section 78
//levelScore_177 (game_fla.levelScore_177)
package game_fla {
import gs.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.managers.*;
import flash.net.*;
import flash.media.*;
import gs.easing.*;
import classes.utils.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class levelScore_177 extends MovieClip {
public var bonus:TextField;
public var started:Boolean;
public var currentScore:Number;
public var totalScore:Number;
public function levelScore_177(){
addFrameScript(0, frame1);
}
function frame1(){
currentScore = GameManager.levelCompleteBonus;
totalScore = ((currentScore + GameManager.calculateTimeBonus()) + GameManager.calculateLifeBonus());
started = false;
TweenLite.to(this, (0.5 + ((totalScore - GameManager.levelCompleteBonus) / 1500)), {currentScore:totalScore, ease:Linear.easeOut, delay:0.5, onUpdate:setText});
setText();
}
public function setText():void{
if (!started){
started = true;
parent["totalPoints"].calculateTotal();
};
bonus.text = Functions.addCommas(Math.round(currentScore));
}
}
}//package game_fla
Section 79
//lives_menuIcon_173 (game_fla.lives_menuIcon_173)
package game_fla {
import flash.display.*;
import classes.managers.*;
import flash.text.*;
public dynamic class lives_menuIcon_173 extends MovieClip {
public var lives:TextField;
public function lives_menuIcon_173(){
addFrameScript(0, frame1);
}
function frame1(){
lives.text = String(GameManager.lives);
}
}
}//package game_fla
Section 80
//mainMenu_2 (game_fla.mainMenu_2)
package game_fla {
import flash.events.*;
import flash.display.*;
public dynamic class mainMenu_2 extends MovieClip {
public var menu:MovieClip;
public var playNext:Boolean;
public var menuLoop:GameLoop2;
public var nextMenu:String;
public function mainMenu_2(){
addFrameScript(0, frame1);
}
public function swapMenus(_arg1:String):void{
if (_arg1 != nextMenu){
if (_arg1 == "PLAY"){
playNext = true;
};
nextMenu = _arg1;
menu.gotoAndPlay("OUT");
};
}
public function outroComplete():void{
if (playNext){
menuLoop.destroy();
MovieClip(parent).gotoAndStop("GAME");
} else {
gotoAndStop(nextMenu);
};
}
function frame1(){
stop();
playNext = false;
menuLoop = new GameLoop2();
menuLoop.play(0, 99);
}
public function playGame(_arg1:Event=null):void{
menuLoop.setVolume(0, 0.5);
swapMenus("PLAY");
}
}
}//package game_fla
Section 81
//mainMenu_titleSlate_18 (game_fla.mainMenu_titleSlate_18)
package game_fla {
import flash.display.*;
import ayz.components.image.*;
public dynamic class mainMenu_titleSlate_18 extends MovieClip {
public var cached:MovieClip;
public var __id1_:BitmapRedrawer;
public function mainMenu_titleSlate_18(){
__setProp___id1__mainMenu_titleSlate_Layer2_1();
}
function __setProp___id1__mainMenu_titleSlate_Layer2_1(){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_.targetMCs = ["cached"];
__id1_.autoStart = true;
__id1_.removeOriginals = true;
__id1_.smoothing = true;
__id1_.snapToPixels = "auto";
__id1_.delay = 0;
__id1_.xOffset = 0;
__id1_.yOffset = 0;
__id1_.edgePadding = 0;
__id1_.onCacheComplete = "onCacheComplete";
__id1_.onError = "onError";
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package game_fla
Section 82
//mainMenucopy_3 (game_fla.mainMenucopy_3)
package game_fla {
import gs.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import gs.easing.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class mainMenucopy_3 extends MovieClip {
public var directionsTxt:MovieClip;
public var bg:MovieClip;
public var title:MovieClip;
public var playTxt:MovieClip;
public function mainMenucopy_3(){
addFrameScript(35, frame36, 44, frame45, 58, frame59);
}
public function btnRollOver(_arg1:Event):void{
TweenLite.to(_arg1.currentTarget, 0.1, {scaleX:(_arg1.currentTarget.startingScale + 0.1), scaleY:(_arg1.currentTarget.startingScale + 0.1), ease:Quad.easeOut});
}
public function playGame(_arg1:Event=null):void{
var _local2 = parent;
_local2["playGame"]();
}
function frame36(){
directionsTxt.buttonMode = true;
directionsTxt.startingScale = directionsTxt.scaleX;
directionsTxt.addEventListener(MouseEvent.CLICK, openDirections);
directionsTxt.addEventListener(MouseEvent.ROLL_OVER, btnRollOver);
directionsTxt.addEventListener(MouseEvent.ROLL_OUT, btnRollOut);
playTxt.buttonMode = true;
playTxt.startingScale = playTxt.scaleX;
playTxt.addEventListener(MouseEvent.CLICK, playGame);
playTxt.addEventListener(MouseEvent.ROLL_OVER, btnRollOver);
playTxt.addEventListener(MouseEvent.ROLL_OUT, btnRollOut);
stop();
}
public function btnRollOut(_arg1:Event):void{
TweenLite.to(_arg1.currentTarget, 0.1, {scaleX:_arg1.currentTarget.startingScale, scaleY:_arg1.currentTarget.startingScale, ease:Quad.easeOut});
}
function frame45(){
directionsTxt.removeEventListener(MouseEvent.CLICK, openDirections);
directionsTxt.removeEventListener(MouseEvent.ROLL_OVER, btnRollOver);
directionsTxt.removeEventListener(MouseEvent.ROLL_OUT, btnRollOut);
playTxt.removeEventListener(MouseEvent.CLICK, playGame);
playTxt.removeEventListener(MouseEvent.ROLL_OVER, btnRollOver);
playTxt.removeEventListener(MouseEvent.ROLL_OUT, btnRollOut);
}
public function openDirections(_arg1:Event=null):void{
var _local2 = parent;
_local2["swapMenus"]("DIRECTIONS");
}
function frame59(){
MovieClip(parent).outroComplete();
}
}
}//package game_fla
Section 83
//menu_gameOver_141 (game_fla.menu_gameOver_141)
package game_fla {
import flash.display.*;
import classes.managers.*;
import flash.net.*;
import classes.*;
public dynamic class menu_gameOver_141 extends MovieClip {
public var playAgainBtn:PlayAgainBTN;
public var sender:LocalConnection;
public function menu_gameOver_141(){
addFrameScript(0, frame1, 51, frame52, 87, frame88, 103, frame104);
}
public function restart():void{
MenuManager.closeMenu();
}
function frame88(){
Game.restartGame();
}
function frame1(){
MenuManager.addMenu(this, "gameOver");
stop();
}
function frame104(){
stop();
}
function frame52(){
sender = new LocalConnection();
sender.send("_user", "fnPostScore", GameManager.score);
trace("SEND THIS", GameManager.score);
playAgainBtn.setAnimationStyle("scale");
playAgainBtn.clickFunc = "restart";
stop();
}
}
}//package game_fla
Section 84
//multiplier_animated_136 (game_fla.multiplier_animated_136)
package game_fla {
import flash.display.*;
import classes.managers.*;
public dynamic class multiplier_animated_136 extends MovieClip {
public var multiplier:int;
public function multiplier_animated_136(){
addFrameScript(0, frame1, 8, frame9, 15, frame16);
}
function frame16(){
stop();
}
function frame1(){
multiplier = GameManager.currentSegment;
stop();
}
function frame9(){
multiplier = GameManager.currentSegment;
}
public function reload():void{
trace("RELOAD");
gotoAndPlay("RELOAD");
}
}
}//package game_fla
Section 85
//multiplierNumber_137 (game_fla.multiplierNumber_137)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class multiplierNumber_137 extends MovieClip {
public var multiplier:TextField;
public function multiplierNumber_137(){
addFrameScript(0, frame1);
}
function frame1(){
multiplier.text = (String(parent["multiplier"]) + "x");
}
}
}//package game_fla
Section 86
//numLivesRemaining_129 (game_fla.numLivesRemaining_129)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class numLivesRemaining_129 extends MovieClip {
public var lives:TextField;
public function numLivesRemaining_129(){
addFrameScript(0, frame1);
}
function frame1(){
lives.text = parent["lives"];
}
}
}//package game_fla
Section 87
//Pepefallsinwater_40 (game_fla.Pepefallsinwater_40)
package game_fla {
import flash.display.*;
public dynamic class Pepefallsinwater_40 extends MovieClip {
public function Pepefallsinwater_40(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package game_fla
Section 88
//playText_25 (game_fla.playText_25)
package game_fla {
import flash.display.*;
public dynamic class playText_25 extends MovieClip {
public var playBtn:MovieClip;
}
}//package game_fla
Section 89
//preloader_1 (game_fla.preloader_1)
package game_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class preloader_1 extends MovieClip {
public var loadPercent:TextField;
public function preloader_1(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 34, frame35);
}
function frame10(){
stop();
}
public function progressUpdate(_arg1:Number):void{
loadPercent.text = (String(Math.round((_arg1 * 100))) + "%");
}
function frame1(){
stop();
}
function frame2(){
}
function frame35(){
MovieClip(parent).preloaderOutroComplete();
stop();
}
}
}//package game_fla
Section 90
//timerRotation_134 (game_fla.timerRotation_134)
package game_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.managers.*;
import flash.net.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class timerRotation_134 extends MovieClip {
public var interests:Array;
public function timerRotation_134(){
addFrameScript(0, frame1);
}
public function destroy(_arg1:Event=null):void{
EventManager.unregisterInterests(this, interests);
this.removeEventListener(Event.REMOVED_FROM_STAGE, destroy);
}
function frame1(){
interests = new Array("multiplierChanged");
EventManager.registerInterests(this, interests);
this.addEventListener(Event.REMOVED_FROM_STAGE, destroy);
switchColor(parent.parent["multiplier"]);
stop();
}
public function catchEvent(_arg1:String, _arg2:Object):void{
if (_arg1 == "setMultiplier"){
switchColor(_arg2.segment);
};
}
public function switchColor(_arg1:Number):void{
gotoAndStop(((totalFrames - _arg1) + 1));
}
}
}//package game_fla
Section 91
//Tom_Win_202 (game_fla.Tom_Win_202)
package game_fla {
import flash.display.*;
import classes.managers.*;
public dynamic class Tom_Win_202 extends MovieClip {
public function Tom_Win_202(){
addFrameScript(32, frame33);
}
function frame33(){
EventManager.fireEvent("chase");
stop();
}
}
}//package game_fla
Section 92
//yourscore_164 (game_fla.yourscore_164)
package game_fla {
import flash.display.*;
import classes.managers.*;
import classes.utils.*;
import flash.text.*;
public dynamic class yourscore_164 extends MovieClip {
public var yourScore:TextField;
public function yourscore_164(){
addFrameScript(0, frame1);
}
function frame1(){
yourScore.text = Functions.addCommas(GameManager.score);
}
}
}//package game_fla
Section 93
//Back (gs.easing.Back)
package gs.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package gs.easing
Section 94
//Bounce (gs.easing.Bounce)
package gs.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package gs.easing
Section 95
//Cubic (gs.easing.Cubic)
package gs.easing {
public class Cubic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package gs.easing
Section 96
//Elastic (gs.easing.Elastic)
package gs.easing {
public class Elastic {
private static const _2PI:Number = 6.28318530717959;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) + _arg3) + _arg2));
}
}
}//package gs.easing
Section 97
//Expo (gs.easing.Expo)
package gs.easing {
public class Expo {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : ((_arg3 * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2));
};
--_arg1;
return ((((_arg3 / 2) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
}
}//package gs.easing
Section 98
//Linear (gs.easing.Linear)
package gs.easing {
public class Linear {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package gs.easing
Section 99
//Quad (gs.easing.Quad)
package gs.easing {
public class Quad {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package gs.easing
Section 100
//Sine (gs.easing.Sine)
package gs.easing {
public class Sine {
private static const _HALF_PI:Number = 1.5707963267949;
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * _HALF_PI))) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * _HALF_PI))) + _arg3) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
}
}//package gs.easing
Section 101
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _tweenVisible:Boolean;
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _target:Object;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
this.onComplete = onCompleteTween;
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (((!((_target.visible == true))) && (_tweenVisible))){
_target.visible = true;
};
}
public function onCompleteTween():void{
if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(!((_arg2 == 0)));
_tweenVisible = true;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_tweenVisible = !(Boolean(("visible" in _arg1)));
}
}
}//package gs.plugins
Section 102
//EndArrayPlugin (gs.plugins.EndArrayPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _info:Array;
protected var _a:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function init(_arg1:Array, _arg2:Array):void{
var _local3:int;
_a = _arg1;
_local3 = (_arg2.length - 1);
while (_local3 > -1) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
}
}//package gs.plugins
Section 103
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class FramePlugin extends TweenPlugin {
public var frame:int;
protected var _target:MovieClip;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame"];
this.round = true;
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
}
}//package gs.plugins
Section 104
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin)
package gs.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package gs.plugins
Section 105
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.geom.*;
import gs.utils.tween.*;
public class TintPlugin extends TweenPlugin {
protected var _ct:ColorTransform;
protected var _target:DisplayObject;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.transform.colorTransform = _ct;
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_target = _arg1;
_ct = _target.transform.colorTransform;
_local3 = (_props.length - 1);
while (_local3 > -1) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:ColorTransform;
if (!(_arg1 is DisplayObject)){
return (false);
};
_local4 = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){
_local4.color = uint(_arg2);
};
if (((!((_arg3.exposedVars.alpha == undefined))) || (!((_arg3.exposedVars.autoAlpha == undefined))))){
_local4.alphaMultiplier = ((_arg3.exposedVars.alpha)!=undefined) ? _arg3.exposedVars.alpha : _arg3.exposedVars.autoAlpha;
_arg3.killVars({alpha:1, autoAlpha:1});
} else {
_local4.alphaMultiplier = _arg1.alpha;
};
init((_arg1 as DisplayObject), _local4);
return (true);
}
}
}//package gs.plugins
Section 106
//TweenPlugin (gs.plugins.TweenPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class TweenPlugin {
public var overwriteProps:Array;
protected var _tweens:Array;
public var round:Boolean;
public var onComplete:Function;
public var propName:String;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
_changeFactor = 0;
super();
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (this.overwriteProps.length - 1);
while (_local2 > -1) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
_local2--;
};
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if ((_tweens[_local2].name in _arg1)){
_tweens.splice(_local2, 1);
};
_local2--;
};
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function get changeFactor():Number{
return (_changeFactor);
}
public static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
_local2 = (_arg1.length - 1);
while (_local2 > -1) {
_local3 = new (_arg1[_local2]);
TweenLite.plugins[_local3.propName] = _arg1[_local2];
_local2--;
};
return (true);
}
}
}//package gs.plugins
Section 107
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class VisiblePlugin extends TweenPlugin {
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _target:Object;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
this.onComplete = onCompleteTween;
}
override public function set changeFactor(_arg1:Number):void{
if (_target.visible != true){
_target.visible = true;
};
}
public function onCompleteTween():void{
if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(_arg2);
return (true);
}
}
}//package gs.plugins
Section 108
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _st:SoundTransform;
protected var _target:Object;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
}
}//package gs.plugins
Section 109
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo)
package gs.utils.tween {
public class ArrayTweenInfo {
public var change:Number;
public var index:uint;
public var start:Number;
public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
}//package gs.utils.tween
Section 110
//TweenInfo (gs.utils.tween.TweenInfo)
package gs.utils.tween {
public class TweenInfo {
public var start:Number;
public var name:String;
public var change:Number;
public var target:Object;
public var property:String;
public var isPlugin:Boolean;
public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
}
}
}//package gs.utils.tween
Section 111
//TweenLite (gs.TweenLite)
package gs {
import flash.events.*;
import flash.display.*;
import gs.utils.tween.*;
import gs.plugins.*;
import flash.utils.*;
public class TweenLite {
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _hasPlugins:Boolean;
public var started:Boolean;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
public var gc:Boolean;
public var vars:Object;
public var ease:Function;
public var tweens:Array;
public var exposedVars:Object;
public var combinedTimeScale:Number;
public var initTime:Number;
public static const version:Number = 10.09;
private static var _timer:Timer = new Timer(2000);
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1};
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public static var overwriteManager:Object;
private static var _tlInitted:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:int;
super();
if (_arg1 == null){
return;
};
if (!_tlInitted){
TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]);
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_tlInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
if (typeof(this.vars.ease) != "function"){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars;
this.tweens = [];
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
_local4 = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if (((!((_arg1 in masterList))) || ((_local4 == 1)))){
masterList[_arg1] = [this];
} else {
masterList[_arg1].push(this);
};
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){
this.target.visible = this.exposedVars.visible;
};
};
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (!(this.target in masterList)){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
_local2[_local2.length] = this;
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function clear():void{
this.tweens = [];
this.vars = (this.exposedVars = {ease:this.vars.ease});
_hasUpdate = false;
}
public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
_local2 = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function initTweenVals():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:TweenInfo;
if (((!((this.exposedVars.timeScale == undefined))) && ((this.target is TweenLite)))){
this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false);
};
for (_local1 in this.exposedVars) {
if ((_local1 in _reservedProps)){
} else {
if ((_local1 in plugins)){
_local3 = new (plugins[_local1]);
if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
} else {
this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true);
_hasPlugins = true;
};
} else {
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
};
};
};
if (this.vars.runBackwards == true){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local4 = this.tweens[_local2];
this.tweens[_local2].start = (_local4.start + _local4.change);
_local4.change = -(_local4.change);
_local2--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.exposedVars, this.tweens);
};
}
public function complete(_arg1:Boolean=false):void{
var _local2:int;
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (_hasPlugins){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){
this.tweens[_local2].target.onComplete();
};
_local2--;
};
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function updateAll(_arg1:Event=null):void{
var _local2:uint;
var _local3:Dictionary;
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
_local2 = (currentTime = getTimer());
_local3 = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
_local5--;
};
};
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && ((_arg1 in masterList)))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 112
//BackBtn (BackBtn)
package {
import classes.utils.*;
public dynamic class BackBtn extends LazyButton {
}
}//package
Section 113
//Boat1 (Boat1)
package {
import classes.gameobjects.*;
public dynamic class Boat1 extends Platform {
public function Boat1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 114
//Boat2 (Boat2)
package {
import classes.gameobjects.*;
public dynamic class Boat2 extends Platform {
public function Boat2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 115
//Boat3 (Boat3)
package {
import classes.gameobjects.*;
public dynamic class Boat3 extends Platform {
public function Boat3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 116
//Boat4 (Boat4)
package {
import classes.gameobjects.*;
public dynamic class Boat4 extends Platform {
public function Boat4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 117
//BonusTimer (BonusTimer)
package {
import classes.gameobjects.hud.*;
public dynamic class BonusTimer extends BonusTimer {
}
}//package
Section 118
//Car1 (Car1)
package {
import classes.gameobjects.*;
public dynamic class Car1 extends Enemy {
public function Car1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 119
//Car2 (Car2)
package {
import classes.gameobjects.*;
public dynamic class Car2 extends Enemy {
public function Car2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 120
//Car3 (Car3)
package {
import classes.gameobjects.*;
public dynamic class Car3 extends Enemy {
public function Car3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 121
//ChaChing (ChaChing)
package {
import classes.media.*;
public dynamic class ChaChing extends Sound {
}
}//package
Section 122
//ClickToContinue (ClickToContinue)
package {
import classes.utils.*;
public dynamic class ClickToContinue extends LazyButton {
}
}//package
Section 123
//GameLoop1 (GameLoop1)
package {
import classes.media.*;
public dynamic class GameLoop1 extends Sound {
}
}//package
Section 124
//GameLoop1Fast (GameLoop1Fast)
package {
import classes.media.*;
public dynamic class GameLoop1Fast extends Sound {
}
}//package
Section 125
//GameLoop1Ridiculous (GameLoop1Ridiculous)
package {
import classes.media.*;
public dynamic class GameLoop1Ridiculous extends Sound {
}
}//package
Section 126
//GameLoop2 (GameLoop2)
package {
import classes.media.*;
public dynamic class GameLoop2 extends Sound {
}
}//package
Section 127
//GameOver (GameOver)
package {
import classes.media.*;
public dynamic class GameOver extends Sound {
}
}//package
Section 128
//Hit1 (Hit1)
package {
import classes.media.*;
public dynamic class Hit1 extends Sound {
}
}//package
Section 129
//Honk1 (Honk1)
package {
import classes.media.*;
public dynamic class Honk1 extends Sound {
}
}//package
Section 130
//Honk2 (Honk2)
package {
import classes.media.*;
public dynamic class Honk2 extends Sound {
}
}//package
Section 131
//Honk3 (Honk3)
package {
import classes.media.*;
public dynamic class Honk3 extends Sound {
}
}//package
Section 132
//Hop1 (Hop1)
package {
import classes.media.*;
public dynamic class Hop1 extends Sound {
}
}//package
Section 133
//InstructionsPlay (InstructionsPlay)
package {
import classes.utils.*;
public dynamic class InstructionsPlay extends LazyButton {
}
}//package
Section 134
//MainCharacter (MainCharacter)
package {
import classes.gameobjects.*;
public dynamic class MainCharacter extends MainCharacter {
public function MainCharacter(){
addFrameScript(0, frame1, 15, frame16, 26, frame27, 37, frame38, 46, frame47, 56, frame57, 65, frame66);
}
function frame16(){
stop();
}
function frame1(){
stop();
}
function frame38(){
stop();
}
function frame27(){
stop();
}
function frame47(){
stop();
}
function frame57(){
stop();
}
function frame66(){
stop();
}
}
}//package
Section 135
//MenuHUDHealth (MenuHUDHealth)
package {
import classes.managers.*;
import classes.gameobjects.hud.*;
public dynamic class MenuHUDHealth extends Lives {
public function MenuHUDHealth(){
addFrameScript(0, frame1, 11, frame12, 20, frame21);
}
function frame12(){
displayedLives = GameManager.lives;
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package
Section 136
//NextBtn (NextBtn)
package {
import classes.utils.*;
public dynamic class NextBtn extends LazyButton {
}
}//package
Section 137
//PlayAgainBTN (PlayAgainBTN)
package {
import classes.utils.*;
public dynamic class PlayAgainBTN extends LazyButton {
}
}//package
Section 138
//Scooter1 (Scooter1)
package {
import classes.gameobjects.*;
public dynamic class Scooter1 extends Enemy {
public function Scooter1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 139
//Space (Space)
package {
import classes.gameobjects.*;
public dynamic class Space extends Space {
public function Space(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 140
//Truck1 (Truck1)
package {
import classes.gameobjects.*;
public dynamic class Truck1 extends Enemy {
public function Truck1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 141
//Truck2 (Truck2)
package {
import classes.gameobjects.*;
public dynamic class Truck2 extends Enemy {
public function Truck2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 142
//WaterSplash (WaterSplash)
package {
import classes.media.*;
public dynamic class WaterSplash extends Sound {
}
}//package
Section 143
//Win (Win)
package {
import classes.media.*;
public dynamic class Win extends Sound {
}
}//package