Section 1
//Character (asfiles.char.Character)
package asfiles.char {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.setting.*;
import gs.easing.*;
public class Character extends MovieClip {
private var counter:int;// = 0
public var destination:String;
private var queuedSpeech:String;// = ""
private var currentPath:Array;
public var nope:MovieClip;
private var ultimateDest:Point;
private var currentDest:Point;
public var spriteIn:MovieClip;
public var frameLabels:Array;
private var frameActions:Array;
private var currentStep:Point;
private var animationQueue:Array;
public var triedRelocate:Boolean;// = false
public static const RETURN_IDLE:String = "returnIdle";
public static const REEMUS_HEIGHT:Number = 265;
public static const MOVING:String = "moving";
public static const PATH_COMPLETE:String = "pathComplete";
public static const LIAM_HEIGHT:Number = 150;
public static var heldItemReemus:int = 0;
public static var liam:Liam;
public static var liamSettingId:String;
public static var reemusSettingId:String;
public static var heldItemLiam:int = 0;
public static var reemus:Reemus;
public function Character(){
var _local1:int;
triedRelocate = false;
counter = 0;
queuedSpeech = "";
super();
gotoAndStop(2);
TweenLite.delayedCall(0.05, init, []);
frameLabels = new Array();
_local1 = 0;
while (_local1 < currentLabels.length) {
frameLabels.push(currentLabels[_local1].name);
_local1++;
};
mouseChildren = false;
mouseEnabled = false;
}
public function say(_arg1:String, _arg2:Object=null):void{
var _local3:SpeechEvent;
_local3 = new SpeechEvent(_arg1, _arg2);
queuedSpeech = "";
_local3.origin = this;
dispatchEvent(_local3);
}
protected function init():void{
animationQueue = new Array();
frameActions = new Array();
currentPath = new Array();
ultimateDest = new Point(point.x, point.y);
goto("waiting");
addEventListener(Event.ENTER_FRAME, update);
}
public function dislodge():void{
var _local1:int;
if (((MovieClip(setting).bounds) && (!(MovieClip(setting).bounds.hitTestPoint(this.x, this.y, true))))){
_local1 = 0;
while (_local1 < 150) {
if (MovieClip(setting).bounds.hitTestPoint(((this.x + MovieClip(setting).x) - _local1), this.y, true)){
this.x = (this.x - _local1);
return;
};
if (MovieClip(setting).bounds.hitTestPoint(((this.x + MovieClip(setting).x) + _local1), this.y, true)){
this.x = (this.x + _local1);
return;
};
if (MovieClip(setting).bounds.hitTestPoint((this.x + MovieClip(setting).x), (this.y - _local1), true)){
this.y = (this.y - _local1);
return;
};
if (MovieClip(setting).bounds.hitTestPoint((this.x + MovieClip(setting).x), (this.y + _local1), true)){
this.y = (this.y + _local1);
return;
};
_local1 = (_local1 + 15);
};
};
}
protected function triggerFrameAction(_arg1:Object):void{
if (_arg1.param == null){
_arg1.func();
} else {
_arg1.func(_arg1.param);
};
}
public function queueSprite(_arg1:Object, _arg2:Boolean=true):void{
if (_arg2){
animationQueue = [_arg1];
} else {
animationQueue.push(_arg1);
};
}
public function halt():void{
TweenLite.killTweensOf(this);
if ((((currentPath.length > 0)) || (!(Setting.identicalPoints(point, ultimateDest))))){
currentPath = [];
currentDest = point;
ultimateDest = point;
goto("bounce");
queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
};
}
public function get setting():Setting{
return (Setting(parent));
}
public function shush():void{
if (((spriteIn) && (spriteIn.mouth))){
spriteIn.mouth.gotoAndStop(1);
};
}
public function goto(_arg1:String, _arg2:int=1, _arg3:Boolean=true):void{
var _local4:Function;
frameActions = [];
if ((((heldItem > 0)) && ((frameLabels.indexOf((_arg1 + "_held")) >= 0)))){
gotoAndStop((_arg1 + "_held"));
} else {
gotoAndStop(_arg1);
};
if (spriteIn){
_local4 = (_arg3) ? spriteIn.gotoAndPlay : spriteIn.gotoAndStop;
_local4(_arg2);
};
if (_arg1 == "waiting"){
TweenLite.delayedCall(0.1, dispatchEvent, [new Event(RETURN_IDLE)]);
};
}
public function queueSpeech(_arg1:String):void{
queuedSpeech = _arg1;
}
protected function finalizePath():void{
currentPath = [];
currentDest = point;
ultimateDest = point;
goto("bounce");
queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(PATH_COMPLETE));
}
public function get properName():String{
return (((this is Reemus)) ? "Reemus" : "Liam");
}
public function get point():Point{
return (new Point(Math.round(x), Math.round(y)));
}
public function walkPath(_arg1:Array, _arg2:String):void{
animationQueue = [];
destination = _arg2;
currentPath = _arg1;
currentPath.shift();
ultimateDest = currentPath[(currentPath.length - 1)];
currentDest = currentPath.shift();
otherCharacter.triedRelocate = false;
this.spriteIn.play();
walkNext(currentDest);
}
public function addFrameAction(_arg1:int, _arg2:Function, _arg3:Object=null):void{
frameActions.push({frm:_arg1, func:_arg2, param:_arg3});
}
protected function walkNext(_arg1:Point):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
dislodge();
_local2 = Math.abs((x - _arg1.x));
_local3 = Math.abs((y - _arg1.y));
_local4 = Math.sqrt((Math.pow(_local2, 2) + Math.pow(_local3, 2)));
if (_local2 > _local3){
this.goto("walkingSide");
} else {
this.goto(((_arg1.y > y)) ? "walkingFront" : "walkingBack", 1, false);
};
this.scaleX = ((_arg1.x > x)) ? Math.abs(scaleX) : -(Math.abs(scaleX));
currentStep = Setting.getSteps((x - _arg1.x), (y - _arg1.y));
TweenLite.killTweensOf(this);
TweenLite.to(this, (_local4 / 170), {x:_arg1.x, y:_arg1.y, ease:Linear.easeNone, onComplete:reachPoint});
}
public function get dest():String{
return (destination);
}
public function getOuttaTheWay(_arg1:Character):void{
var _local2:Number;
var _local3:Number;
var _local4:Array;
var _local5:int;
if ((((currentFrame > 20)) || (!(visible)))){
return;
};
_local2 = ((point.x - _arg1.point.x) * 1.5);
_local3 = ((point.y - _arg1.point.y) * 1.5);
_local4 = [new Point((point.x + _local2), (point.y - _local3)), new Point((point.x - _local2), (point.y - _local3)), new Point((point.x - _local2), (point.y + _local3)), new Point((point.x - 100), point.y), new Point((point.x + 100), point.y), new Point((point.x + _local2), (point.y + _local3))];
_local5 = 0;
while (_local5 < _local4.length) {
if (((Setting.onScreen(_local4[_local5])) && (setting.unobstructed(point, _local4[_local5])))){
triedRelocate = true;
this.walkPath([point, _local4[_local5]], "");
return;
};
_local5++;
};
}
protected function update(_arg1:Event):void{
var _local2:Object;
var _local3:int;
counter = ((counter + 1) % 100);
if (spriteIn){
if (spriteIn.currentFrame == spriteIn.totalFrames){
if (animationQueue.length > 0){
_local2 = animationQueue.shift();
goto(_local2.sprite, _local2.frm, _local2.andPlay);
if ((((_local2.sprite == "waiting")) && ((setting.activeCharacter == this)))){
dispatchEvent(new Event(Setting.HIDE_CATCHER));
if (queuedSpeech.length > 0){
say(queuedSpeech);
};
};
};
} else {
_local3 = 0;
while (_local3 < frameActions.length) {
if (spriteIn.currentFrame == frameActions[_local3].frm){
triggerFrameAction(frameActions[_local3]);
};
_local3++;
};
};
};
if (((!((currentDest == null))) && (!(Setting.identicalPoints(point, ultimateDest))))){
if ((counter % 3) == 0){
dispatchEvent(new Event(MOVING));
} else {
if ((counter % 5) == 0){
if (((((((((((!(otherCharacter.triedRelocate)) && ((otherCharacter.setting == setting)))) && ((setting.activeCharacter == this)))) && (parent))) && ((parent.toString().indexOf("TempleMiddle") < 0)))) && ((Setting.pointDistance(ultimateDest, otherCharacter.point) < 60)))){
otherCharacter.getOuttaTheWay(this);
};
};
};
};
}
public function set heldItem(_arg1:int):void{
if ((this is Reemus)){
heldItemReemus = _arg1;
} else {
heldItemLiam = _arg1;
};
}
protected function reachPoint():void{
if (currentPath.length > 0){
walkNext(currentPath.shift());
} else {
finalizePath();
};
}
public function get heldItem():int{
return (((this is Reemus)) ? heldItemReemus : heldItemLiam);
}
public function get otherCharacter():Character{
if ((this is Reemus)){
return (liam);
};
return (reemus);
}
}
}//package asfiles.char
Section 2
//HeldItemLiam (asfiles.char.HeldItemLiam)
package asfiles.char {
import flash.display.*;
public class HeldItemLiam extends MovieClip {
public function HeldItemLiam(){
gotoAndStop(Character.heldItemLiam);
}
}
}//package asfiles.char
Section 3
//HeldItemReemus (asfiles.char.HeldItemReemus)
package asfiles.char {
import flash.display.*;
public class HeldItemReemus extends MovieClip {
public function HeldItemReemus(){
gotoAndStop(Character.heldItemReemus);
}
}
}//package asfiles.char
Section 4
//IconSelect (asfiles.char.IconSelect)
package asfiles.char {
import flash.events.*;
import flash.display.*;
public class IconSelect extends MovieClip {
public var reemusIcon:MovieClip;
public var reemustalk:MovieClip;
public var liamIcon:MovieClip;
public static const SELECT_LIAM:String = "selectLiam";
public static const HIDE_ICON_SELECT:String = "hideIconSelect";
public static const SELECT_REEMUS:String = "selectReemus";
public function IconSelect(){
addFrameScript(18, frame19);
liamIcon.stop();
reemusIcon.stop();
addEventListener(Event.ENTER_FRAME, onIconFrame);
}
private function killFunctionality():void{
liamIcon.removeEventListener(MouseEvent.CLICK, onClickLiamIcon);
liamIcon.buttonMode = false;
reemusIcon.removeEventListener(MouseEvent.CLICK, onClickReemusIcon);
reemusIcon.buttonMode = false;
}
private function onRolloverIcon(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(2);
}
private function onRolloutIcon(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(1);
}
private function onIconFrame(_arg1:Event):void{
if (currentFrame == 19){
liamIcon.buttonMode = true;
liamIcon.addEventListener(MouseEvent.CLICK, onClickLiamIcon);
liamIcon.addEventListener(MouseEvent.ROLL_OVER, onRolloverIcon);
liamIcon.addEventListener(MouseEvent.ROLL_OUT, onRolloutIcon);
reemusIcon.buttonMode = true;
reemusIcon.addEventListener(MouseEvent.CLICK, onClickReemusIcon);
reemusIcon.addEventListener(MouseEvent.ROLL_OVER, onRolloverIcon);
reemusIcon.addEventListener(MouseEvent.ROLL_OUT, onRolloutIcon);
} else {
if ((((currentFrame == 80)) || ((currentFrame == 141)))){
dispatchEvent(new Event(HIDE_ICON_SELECT));
stop();
};
};
}
private function onClickLiamIcon(_arg1:Event):void{
killFunctionality();
gotoAndPlay(81);
dispatchEvent(new Event(SELECT_LIAM));
}
function frame19(){
stop();
}
private function onClickReemusIcon(_arg1:Event):void{
killFunctionality();
gotoAndPlay(20);
dispatchEvent(new Event(SELECT_REEMUS));
}
}
}//package asfiles.char
Section 5
//Portrait (asfiles.char.Portrait)
package asfiles.char {
import flash.events.*;
import flash.display.*;
import gs.*;
public class Portrait extends MovieClip {
public var reemustalk:MovieClip;
private static const NUM_GEMS:int = 6;
public static const SWITCH_CHARACTER:String = "switchCharacter";
public function Portrait(){
stop();
visible = false;
buttonMode = true;
addEventListener(MouseEvent.CLICK, onClickPortrait);
}
private function onClickPortrait(_arg1:Event):void{
dispatchEvent(new Event(SWITCH_CHARACTER));
}
public function show(_arg1:Boolean):void{
if (!_arg1){
visible = false;
} else {
if (!visible){
visible = true;
TweenLite.to(this, 0, {tint:0xFFFFFF});
TweenLite.to(this, 1, {tint:null});
};
};
}
}
}//package asfiles.char
Section 6
//SpeechBubble (asfiles.char.SpeechBubble)
package asfiles.char {
import flash.display.*;
import flash.text.*;
public class SpeechBubble extends MovieClip {
private var flippedH:Boolean;// = false
public var label:TextField;
public var bubble:MovieClip;
public static const STD_WIDTH:Number = 250;
public static const STD_HEIGHT:Number = 15;
public function SpeechBubble(_arg1:String, _arg2:Number=250){
flippedH = false;
super();
label.text = _arg1.toUpperCase();
label.width = _arg2;
label.height = (label.textHeight + 10);
bubble.width = (_arg2 + 20);
bubble.height = (STD_HEIGHT + label.textHeight);
label.x = (-(bubble.width) + 50);
label.y = (-(label.textHeight) - 11);
label.mouseEnabled = false;
mouseChildren = false;
mouseEnabled = false;
}
private function flipHorizontal():void{
if (!flippedH){
flippedH = true;
scaleX = -(Math.abs(scaleX));
label.scaleX = -(Math.abs(scaleX));
label.x = (label.x + label.width);
};
}
public function assessOrientation():void{
if (x < bubble.width){
flipHorizontal();
};
y = Math.max(height, y);
}
}
}//package asfiles.char
Section 7
//SpeechEvent (asfiles.char.SpeechEvent)
package asfiles.char {
import flash.events.*;
public class SpeechEvent extends Event {
public var speech:String;
public var params:Object;
public var origin;
public static const SILENCE:String = "silence";
public static const SPEAK:String = "speak";
public function SpeechEvent(_arg1:String, _arg2:Object=null):void{
super(SPEAK);
speech = _arg1;
params = ((_arg2 == null)) ? new Object() : _arg2;
}
}
}//package asfiles.char
Section 8
//Bee (asfiles.setting.features.Bee)
package asfiles.setting.features {
import flash.display.*;
import flash.geom.*;
import asfiles.*;
public class Bee extends MovieClip {
private static var currentParent:MovieClip;
private static var snagged:Array;
private static var beeNames:Array;
private static var grabbable:Array;
public static var docile:Boolean = false;
public static var allBees:Array;
private static var beePoints:Array;
public function Bee(){
var _local1:int;
super();
addFrameScript(0, frame1, 8, frame9);
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
if (!allBees){
allBees = new Array();
beeNames = new Array();
grabbable = new Array();
snagged = new Array();
beePoints = new Array(new Point(525, 423), new Point(540, 403), new Point(415, 390), new Point(385, 345));
};
currentParent = MovieClip(this.parent);
if (allBees.indexOf(this) < 0){
if (beeNames.indexOf(this.name) < 0){
if (this.name.indexOf("bee") == 0){
grabbable.push(this.name);
};
beeNames.push(this.name);
allBees.push(this);
} else {
_local1 = 0;
while (_local1 < allBees.length) {
if (allBees[_local1].name == this.name){
allBees[_local1] = this;
};
_local1++;
};
};
};
gotoAndStop((Bee.docile) ? 9 : 1);
if (snagged.indexOf(this.name) >= 0){
visible = false;
return;
};
}
function frame1(){
stop();
}
function frame9(){
stop();
}
public static function relaxAllBees(_arg1:Boolean=true):void{
var _local2:int;
_local2 = 0;
while (_local2 < allBees.length) {
if (((((!(docile)) && (_arg1))) && (!((allBees[_local2].currentFrame == 9))))){
allBees[_local2].gotoAndPlay(2);
} else {
if (((((docile) && (!(_arg1)))) && (!((allBees[_local2].currentFrame == 1))))){
allBees[_local2].gotoAndPlay(10);
};
};
_local2++;
};
docile = _arg1;
}
public static function reset():void{
allBees = null;
beeNames = null;
grabbable = null;
snagged = null;
docile = false;
currentParent = null;
}
public static function nextGrabbable():MovieClip{
if (grabbable.length > 0){
return (MovieClip(currentParent.getChildByName(grabbable[0])));
};
return (null);
}
public static function removeGrabbed():void{
var _local1:MovieClip;
if (grabbable.length > 0){
_local1 = MovieClip(currentParent.getChildByName(grabbable.splice(0, 1)[0]));
snagged.push(_local1.name);
_local1.parent.removeChild(_local1);
};
}
public static function nextPoint():Point{
return (beePoints[snagged.length]);
}
}
}//package asfiles.setting.features
Section 9
//Carriage (asfiles.setting.features.Carriage)
package asfiles.setting.features {
import flash.display.*;
import flash.geom.*;
import asfiles.*;
public class Carriage extends MovieClip {
public var seat:MovieClip;
private var beePoints:Array;
public var liam:MovieClip;
private var beeIndex:int;// = 0
private var allBees:Array;
public var bee1:MovieClip;
public var bee3:MovieClip;
public var bee4:MovieClip;
public var bee2:MovieClip;
public function Carriage(){
var _local1:int;
beeIndex = 0;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
liam.visible = false;
seat.visible = false;
allBees = [bee1, bee2, bee3, bee4];
_local1 = 0;
while (_local1 < allBees.length) {
allBees[_local1].visible = false;
_local1++;
};
beePoints = [new Point(330, 526), new Point(367, 513), new Point(455, 497), new Point(470, 497)];
}
public function hasAllBees():Boolean{
return ((beeIndex >= 4));
}
public function allReady():Boolean{
return ((((currentFrame == 2)) || (((hasAllBees()) && (seat.visible)))));
}
public function addNextBee():void{
allBees[beeIndex].visible = true;
beeIndex++;
}
public function getNextBeePoint():Point{
return (beePoints[beeIndex]);
}
}
}//package asfiles.setting.features
Section 10
//PaintStatue (asfiles.setting.features.PaintStatue)
package asfiles.setting.features {
import flash.events.*;
import flash.display.*;
import gs.*;
import asfiles.*;
import com.relish.managers.*;
public class PaintStatue extends MovieClip {
private var currentDrain:MovieClip;
public var midFill:MovieClip;
public var bottomFill:MovieClip;
private var fillQueue:Array;
public var topFill:MovieClip;
public var midDrain:MovieClip;
public var lastCombo:String;
public var bottomDrain:MovieClip;
public var topDrain:MovieClip;
private var currentFill:MovieClip;
private var drainQueue:Array;
public static const FINISHED:String = "finished";
public function PaintStatue(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 18, frame19, 19, frame20, 31, frame32);
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
topFill.gotoAndStop(topFill.totalFrames);
midFill.gotoAndStop(midFill.totalFrames);
bottomFill.gotoAndStop(bottomFill.totalFrames);
topDrain.gotoAndStop(topDrain.totalFrames);
midDrain.gotoAndStop(midDrain.totalFrames);
bottomDrain.gotoAndStop(bottomDrain.totalFrames);
}
public function drain():void{
fillQueue = new Array();
drainQueue = new Array();
lastCombo = "";
play();
if (topFill.currentFrame != topFill.totalFrames){
fillQueue.push(topFill);
drainQueue.push(topDrain);
lastCombo = (lastCombo + String(topFill.currentFrame));
};
if (midFill.currentFrame != midFill.totalFrames){
fillQueue.push(midFill);
drainQueue.push(midDrain);
lastCombo = (lastCombo + String(midFill.currentFrame));
};
if (bottomFill.currentFrame != bottomFill.totalFrames){
fillQueue.push(bottomFill);
drainQueue.push(bottomDrain);
lastCombo = (lastCombo + String(bottomFill.currentFrame));
};
if (drainQueue.length > 0){
currentFill = fillQueue.shift();
currentDrain = drainQueue.shift();
TweenLite.delayedCall(1, currentDrain.gotoAndStop, [currentFill.currentFrame]);
TweenLite.delayedCall(1, currentFill.gotoAndStop, [currentFill.totalFrames]);
TweenLite.delayedCall(1, AudioManager.playSoundFromLibrary, ["PourSound"]);
};
TweenLite.delayedCall(1, addEventListener, [Event.ENTER_FRAME, continueDrain]);
}
function frame10(){
AudioManager.playSoundFromLibrary("Tomb3Sound");
}
function frame1(){
stop();
}
function frame19(){
if (currentFrame == 19){
stop();
};
}
function frame20(){
AudioManager.playSoundFromLibrary("Tomb3Sound");
}
private function continueDrain(_arg1:Event):void{
if (((!(currentDrain)) && ((currentFrame == 19)))){
removeEventListener(Event.ENTER_FRAME, continueDrain);
gotoAndPlay(20);
dispatchEvent(new Event(FINISHED));
} else {
if (((currentDrain) && (currentDrain.inner))){
if (currentDrain.inner.currentFrame < currentDrain.inner.totalFrames){
currentDrain.inner.play();
} else {
if (drainQueue.length > 0){
currentDrain = drainQueue.shift();
currentFill = fillQueue.shift();
currentDrain.gotoAndStop(currentFill.currentFrame);
currentFill.gotoAndStop(currentFill.totalFrames);
} else {
removeEventListener(Event.ENTER_FRAME, continueDrain);
play();
dispatchEvent(new Event(FINISHED));
};
};
};
};
}
function frame2(){
}
function frame32(){
AudioManager.playSoundFromLibrary("BurpSound");
}
}
}//package asfiles.setting.features
Section 11
//Tinkertok (asfiles.setting.features.Tinkertok)
package asfiles.setting.features {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.*;
import com.relish.managers.*;
public class Tinkertok extends MovieClip {
private var firstAppearance:Boolean;// = true
public var setting:MovieClip;
public var flagRef:MovieClip;
public function Tinkertok(){
firstAppearance = true;
super();
addFrameScript(47, frame48);
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function destroy():void{
removeEventListener(Event.ENTER_FRAME, mainLoop);
}
private function returnControl():void{
Main.lockCatcher = false;
setting.dispatchEvent(new Event(Setting.HIDE_CATCHER));
setting.dispatchEvent(new Event(Main.SHOW_PORTRAIT));
setting.dispatchEvent(new Event(Setting.SHOW_LEFT));
gotoAndStop(93);
}
private function get correctSolution():Boolean{
return (((flagRef.circle.visible) && (!(flagRef.splatter.visible))));
}
private function rant():void{
var _local1:String;
var _local2:SpeechEvent;
var _local3:Object;
_local3 = {point:new Point(581, 204)};
if (firstAppearance){
gotoAndStop(70);
firstAppearance = false;
setting.processSpeechTree("tinkertok_intro", "endTinkerDialogue");
} else {
if (correctSolution){
gotoAndPlay(224);
return;
};
if (((flagRef.flag.visible) && ((flagRef.flag.currentFrame == 1)))){
_local2 = new SpeechEvent("WHO KEEPS LEAVING THEIR LAUNDRY ON MY ROCK! ARGH! IF I EVER CATCH YOU PERRIWINKLE, IT’S WAR!", _local3);
setting.dispatchEvent(_local2);
setting.endSpeechFunction = "tinkerTug";
} else {
if (flagRef.splatter.visible){
_local2 = new SpeechEvent("ARGH! IF I EVER HAVE PROOF THAT IT’S YOU DOING THIS GRAFFITI, PERRIWINKLE, IT’S GOING TO BE WAR!", _local3);
setting.dispatchEvent(_local2);
setting.endSpeechFunction = "tinkerTug";
} else {
_local2 = new SpeechEvent("Quit playing around, and get off my property!", _local3);
setting.dispatchEvent(_local2);
setting.endSpeechFunction = "endTinkerDialogue";
};
};
gotoAndStop(70);
};
}
function frame48(){
AudioManager.playSoundFromLibrary("CartoonZipSound");
}
private function mainLoop(_arg1:Event):void{
var _local2:SpeechEvent;
if (currentFrame == 69){
rant();
} else {
if ((((((currentFrame == 92)) || ((currentFrame == 211)))) || ((currentFrame == 451)))){
returnControl();
} else {
if (currentFrame == 137){
if (!(((flagRef.flag.currentFrame == 1)) && (flagRef.flag.visible))){
gotoAndPlay(361);
};
} else {
if (currentFrame == 163){
if (flagRef.splatter.visible){
gotoAndPlay(361);
};
} else {
if (currentFrame == 370){
TweenLite.to(flagRef.splatter, 1, {autoAlpha:0});
TweenLite.to(flagRef.overSplatter, 1, {autoAlpha:0});
TweenLite.to(flagRef.circle, 1, {autoAlpha:0});
} else {
if ((((currentFrame == 145)) || ((currentFrame == 263)))){
if (flagRef.flag.visible){
flagRef.flag.gotoAndPlay(2);
flagRef.mouseEnabled = true;
flagRef.overSplatter.alpha = 0;
flagRef.overSplatter.visible = false;
};
} else {
if (currentFrame == 295){
gotoAndStop(296);
_local2 = new SpeechEvent("WHAT? THE OFFICIAL EMBLEM OF PERRIWINKLE! ON MY ROCK! THAT DOES IT, IT’S WAR!", {point:new Point(198, 276)});
setting.dispatchEvent(_local2);
setting.endSpeechFunction = "startWar";
} else {
if (currentFrame == 314){
gotoAndStop(315);
};
};
};
};
};
};
};
};
}
}
}//package asfiles.setting.features
Section 12
//Vase (asfiles.setting.features.Vase)
package asfiles.setting.features {
import flash.display.*;
import asfiles.*;
public class Vase extends MovieClip {
public static var filled:Boolean = false;
public static var color:int = 0;
public static var pouring:Boolean = false;
public static var pourColor:int = 0;
public function Vase(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
if (color <= 0){
gotoAndStop(10);
} else {
if (pouring){
gotoAndStop((20 + pourColor));
color = 0;
pouring = false;
filled = false;
} else {
if (filled){
gotoAndStop((10 + color));
} else {
filled = true;
gotoAndStop(color);
};
};
};
}
}
}//package asfiles.setting.features
Section 13
//GenusPegPuzzle (asfiles.setting.overlay.GenusPegPuzzle)
package asfiles.setting.overlay {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.setting.*;
public class GenusPegPuzzle extends MovieClip {
public var solved:Boolean;// = false
private var draggedPeg:MovieClip;
public var plug10:MovieClip;
public var plug11:MovieClip;
public var plug13:MovieClip;
public var plug14:MovieClip;
public var plug15:MovieClip;
public var plug16:MovieClip;
public var plug17:MovieClip;
public var plug18:MovieClip;
public var plug12:MovieClip;
private var originalPoint:Point;
private var placements:Array;
public var plug1:MovieClip;
public var plug3:MovieClip;
public var plug5:MovieClip;
public var plug7:MovieClip;
public var plug2:MovieClip;
public var plug4:MovieClip;
public var plug6:MovieClip;
public var plug8:MovieClip;
public var plug9:MovieClip;
private var birthPoints:Array;
private var allHoles:Array;
public var hole10:MovieClip;
public var hole11:MovieClip;
public var hole12:MovieClip;
public var hole13:MovieClip;
public var hole14:MovieClip;
public var hole15:MovieClip;
public var hole16:MovieClip;
public var hole17:MovieClip;
public var hole18:MovieClip;
private var allPegs:Array;
public var hole1:MovieClip;
public var hole2:MovieClip;
public var hole3:MovieClip;
public var hole5:MovieClip;
public var hole6:MovieClip;
public var hole7:MovieClip;
public var hole8:MovieClip;
public var hole9:MovieClip;
public var hole4:MovieClip;
public function GenusPegPuzzle(){
var _local1:int;
solved = false;
super();
birthPoints = new Array();
allHoles = new Array();
allPegs = new Array();
placements = new Array();
_local1 = 1;
while (_local1 <= 18) {
allPegs.push(this.getChildByName(("plug" + String(_local1))));
allHoles.push(this.getChildByName(("hole" + String(_local1))));
placements.push(null);
birthPoints.push(new Point(allPegs[(_local1 - 1)].x, allPegs[(_local1 - 1)].y));
allPegs[(_local1 - 1)].gotoAndStop(_local1);
allPegs[(_local1 - 1)].buttonMode = true;
allPegs[(_local1 - 1)].addEventListener(MouseEvent.MOUSE_DOWN, onStartDrag);
allHoles[(_local1 - 1)].gotoAndStop(19);
allHoles[(_local1 - 1)].buttonMode = true;
allHoles[(_local1 - 1)].mouseEnabled = false;
allHoles[(_local1 - 1)].mouseChildren = false;
allHoles[(_local1 - 1)].addEventListener(MouseEvent.MOUSE_DOWN, onRestartDrag);
_local1++;
};
addEventListener(MouseEvent.MOUSE_UP, onReleaseDrag);
}
private function onDragPeg(_arg1:Event):void{
if (draggedPeg){
draggedPeg.x = mouseX;
draggedPeg.y = mouseY;
};
}
private function onReleaseDrag(_arg1:Event):void{
var _local2:Boolean;
var _local3:String;
var _local4:String;
var _local5:int;
_local2 = false;
if (draggedPeg){
_local4 = draggedPeg.name.substring(4, draggedPeg.name.length);
_local5 = 0;
while (_local5 < allHoles.length) {
_local3 = allPegs[_local5].name.substring(4, allPegs[_local5].name.length);
if ((((allHoles[_local5].currentFrame == 19)) && (allHoles[_local5].hitTestPoint(draggedPeg.x, draggedPeg.y, true)))){
placements[_local5] = draggedPeg;
allHoles[_local5].gotoAndStop(_local4);
allHoles[_local5].mouseEnabled = true;
_local2 = true;
checkSolution();
break;
};
_local5++;
};
if (_local2){
draggedPeg.visible = false;
} else {
draggedPeg.x = originalPoint.x;
draggedPeg.y = originalPoint.y;
};
draggedPeg = null;
};
}
private function onRestartDrag(_arg1:Event):void{
draggedPeg = placements[allHoles.indexOf(_arg1.currentTarget)];
draggedPeg.x = mouseX;
draggedPeg.y = mouseY;
draggedPeg.visible = true;
originalPoint = birthPoints[allPegs.indexOf(draggedPeg)];
placements[allHoles.indexOf(_arg1.currentTarget)] = null;
MovieClip(_arg1.currentTarget).gotoAndStop(19);
MovieClip(_arg1.currentTarget).mouseEnabled = false;
addEventListener(Event.ENTER_FRAME, onDragPeg);
}
private function lockHole(_arg1:MovieClip):void{
_arg1.circle.gotoAndStop(2);
}
private function checkSolution():void{
var _local1:int;
var _local2:Array;
var _local3:Array;
var _local4:Boolean;
var _local5:int;
var _local6:int;
_local4 = false;
_local5 = 0;
while (_local5 < 6) {
_local1 = (_local5 * 3);
_local2 = [];
_local6 = 0;
while (_local6 < 3) {
_local2.push(Math.floor(((allHoles[(_local1 + _local6)].currentFrame - 1) / 3)));
_local6++;
};
if (((!((_local2[0] == _local2[1]))) || (!((_local2[1] == _local2[2]))))){
_local4 = true;
} else {
_local6 = 0;
while (_local6 < 3) {
allHoles[(_local1 + _local6)].mouseEnabled = false;
allHoles[(_local1 + _local6)].mouseChildren = false;
allHoles[(_local1 + _local6)].alpha = 0.8;
_local6++;
};
};
_local5++;
};
if (((_local4) || ((placements.indexOf(null) >= 0)))){
return;
};
mouseChildren = false;
solved = true;
TweenLite.delayedCall(2, dispatchEvent, [new Event(Setting.HIDE_OVERLAY)]);
}
private function onRolloverBack(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(2);
}
private function onRolloutBack(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(1);
}
private function onClickBack(_arg1:Event):void{
dispatchEvent(new Event(Setting.HIDE_OVERLAY));
}
private function onStartDrag(_arg1:Event):void{
draggedPeg = MovieClip(_arg1.currentTarget);
originalPoint = new Point(draggedPeg.x, draggedPeg.y);
addEventListener(Event.ENTER_FRAME, onDragPeg);
}
}
}//package asfiles.setting.overlay
Section 14
//PegPuzzle (asfiles.setting.overlay.PegPuzzle)
package asfiles.setting.overlay {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.setting.*;
public class PegPuzzle extends MovieClip {
public var hole_snake:MovieClip;
public var peg_plant:MovieClip;
public var hole_plant:MovieClip;
private var placements:Array;
public var solved:Boolean;// = false
public var peg_mouse:MovieClip;
private var originalPoint:Point;
public var peg_carrot:MovieClip;
public var hole_mouse:MovieClip;
private var myPegs:Array;
private var draggedPeg:MovieClip;
public var hole_rabbit:MovieClip;
private var allHoles:Array;
private var birthPoints:Array;
public var hole_owl:MovieClip;
public var peg_frog:MovieClip;
public var hole_frog:MovieClip;
public var peg_snake:MovieClip;
public var peg_owl:MovieClip;
public var hole_carrot:MovieClip;
public var peg_rabbit:MovieClip;
private var allPegs:Array;
public var backButton:MovieClip;
public function PegPuzzle(){
var _local1:int;
solved = false;
super();
birthPoints = new Array();
allPegs = [peg_owl, peg_mouse, peg_snake, peg_frog, peg_rabbit, peg_plant, peg_carrot];
allHoles = [hole_owl, hole_mouse, hole_snake, hole_frog, hole_rabbit, hole_plant, hole_carrot];
placements = [null, null, null, null, null, null, null];
_local1 = 0;
while (_local1 < allPegs.length) {
allPegs[_local1].gotoAndStop(allPegs[_local1].name.substring(4, allPegs[_local1].name.length));
allPegs[_local1].buttonMode = true;
allPegs[_local1].addEventListener(MouseEvent.MOUSE_DOWN, onStartDrag);
allHoles[_local1].stop();
allHoles[_local1].buttonMode = true;
allHoles[_local1].mouseEnabled = false;
allHoles[_local1].mouseChildren = false;
allHoles[_local1].addEventListener(MouseEvent.MOUSE_DOWN, onRestartDrag);
birthPoints.push(new Point(allPegs[_local1].x, allPegs[_local1].y));
_local1++;
};
backButton.gotoAndStop(1);
backButton.buttonMode = true;
backButton.addEventListener(MouseEvent.ROLL_OVER, onRolloverBack);
backButton.addEventListener(MouseEvent.ROLL_OUT, onRolloutBack);
backButton.addEventListener(MouseEvent.CLICK, onClickBack);
addEventListener(MouseEvent.MOUSE_UP, onReleaseDrag);
}
private function onDragPeg(_arg1:Event):void{
if (draggedPeg){
draggedPeg.x = mouseX;
draggedPeg.y = mouseY;
};
}
private function onReleaseDrag(_arg1:Event):void{
var _local2:Boolean;
var _local3:String;
var _local4:String;
var _local5:int;
_local2 = false;
if (draggedPeg){
_local4 = draggedPeg.name.substring(4, draggedPeg.name.length);
_local5 = 0;
while (_local5 < allHoles.length) {
_local3 = allPegs[_local5].name.substring(4, allPegs[_local5].name.length);
if ((((allHoles[_local5].currentFrame == 1)) && (allHoles[_local5].hitTestPoint(draggedPeg.x, draggedPeg.y, true)))){
placements[_local5] = draggedPeg;
allHoles[_local5].gotoAndStop(_local4);
allHoles[_local5].mouseEnabled = true;
_local2 = true;
checkSolution();
break;
};
_local5++;
};
if (_local2){
draggedPeg.visible = false;
} else {
draggedPeg.x = originalPoint.x;
draggedPeg.y = originalPoint.y;
};
draggedPeg = null;
};
}
private function onClickBack(_arg1:Event):void{
dispatchEvent(new Event(Setting.HIDE_OVERLAY));
}
private function onRestartDrag(_arg1:Event):void{
draggedPeg = placements[allHoles.indexOf(_arg1.currentTarget)];
draggedPeg.x = mouseX;
draggedPeg.y = mouseY;
draggedPeg.visible = true;
originalPoint = birthPoints[allPegs.indexOf(draggedPeg)];
placements[allHoles.indexOf(_arg1.currentTarget)] = null;
MovieClip(_arg1.currentTarget).gotoAndStop(1);
MovieClip(_arg1.currentTarget).mouseEnabled = false;
addEventListener(Event.ENTER_FRAME, onDragPeg);
}
private function onStartDrag(_arg1:Event):void{
draggedPeg = MovieClip(_arg1.currentTarget);
originalPoint = new Point(draggedPeg.x, draggedPeg.y);
addEventListener(Event.ENTER_FRAME, onDragPeg);
}
private function checkSolution():void{
var _local1:Boolean;
var _local2:Array;
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
_local2 = new Array();
trace("checkSolution");
if (placements.indexOf(null) >= 0){
return;
};
_local2[allHoles[0].currentLabel] = ((allHoles[2].currentLabel + ",") + allHoles[4].currentLabel);
_local2[allHoles[2].currentLabel] = ((allHoles[1].currentLabel + ",") + allHoles[3].currentLabel);
_local2[allHoles[4].currentLabel] = ((allHoles[5].currentLabel + ",") + allHoles[6].currentLabel);
_local3 = ((((!((_local2["owl"] == undefined))) && ((_local2["owl"].indexOf("rabbit") >= 0)))) && ((_local2["owl"].indexOf("snake") >= 0)));
_local4 = ((((!((_local2["snake"] == undefined))) && ((_local2["snake"].indexOf("frog") >= 0)))) && ((_local2["snake"].indexOf("mouse") >= 0)));
_local5 = ((((!((_local2["rabbit"] == undefined))) && ((_local2["rabbit"].indexOf("plant") >= 0)))) && ((_local2["rabbit"].indexOf("carrot") >= 0)));
trace(((((_local3 + ", ") + _local4) + ", ") + _local5));
if (!((((_local3) && (_local4))) && (_local5))){
return;
};
mouseChildren = false;
solved = true;
TweenLite.delayedCall(2, dispatchEvent, [new Event(Setting.HIDE_OVERLAY)]);
}
private function lockHole(_arg1:MovieClip):void{
_arg1.circle.gotoAndStop(2);
}
public function updateCollection(_arg1:Array):void{
var _local2:String;
var _local3:int;
_local3 = 0;
while (_local3 < allPegs.length) {
_local2 = allPegs[_local3].name.substring(4, allPegs[_local3].name.length);
allPegs[_local3].visible = (((_arg1.indexOf(_local2) >= 0)) && ((placements.indexOf(allPegs[_local3]) < 0)));
_local3++;
};
}
private function onRolloutBack(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(1);
}
private function onRolloverBack(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(2);
}
}
}//package asfiles.setting.overlay
Section 15
//RPSOverlay (asfiles.setting.overlay.RPSOverlay)
package asfiles.setting.overlay {
import flash.events.*;
import flash.display.*;
public class RPSOverlay extends MovieClip {
public var selector:MovieClip;
public static const SELECT_ROCK:String = "selectRock";
public static const SELECT_PAPER:String = "selectPaper";
public static const SELECT_SCISSORS:String = "selectScissors";
private function onClickIcon(_arg1:Event):void{
rock.removeEventListener(MouseEvent.ROLL_OVER, onRolloverIcon);
paper.removeEventListener(MouseEvent.ROLL_OVER, onRolloverIcon);
scissors.removeEventListener(MouseEvent.ROLL_OVER, onRolloverIcon);
rock.removeEventListener(MouseEvent.ROLL_OUT, onRolloutIcon);
paper.removeEventListener(MouseEvent.ROLL_OUT, onRolloutIcon);
scissors.removeEventListener(MouseEvent.ROLL_OUT, onRolloutIcon);
switch (_arg1.currentTarget){
case rock:
dispatchEvent(new Event(SELECT_ROCK));
break;
case paper:
dispatchEvent(new Event(SELECT_PAPER));
break;
case scissors:
dispatchEvent(new Event(SELECT_SCISSORS));
break;
};
}
public function activate():void{
MovieClip(selector).gotoAndPlay(2);
addEventListener(Event.ENTER_FRAME, awaitIcons);
}
private function get scissors():MovieClip{
return (MovieClip(MovieClip(selector).getChildByName("scissorsClip")));
}
private function onRolloverIcon(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(2);
}
private function awaitIcons(_arg1:Event):void{
if (selector.currentFrame == (selector.totalFrames - 1)){
removeEventListener(Event.ENTER_FRAME, awaitIcons);
rock.addEventListener(MouseEvent.CLICK, onClickIcon);
paper.addEventListener(MouseEvent.CLICK, onClickIcon);
scissors.addEventListener(MouseEvent.CLICK, onClickIcon);
rock.addEventListener(MouseEvent.ROLL_OVER, onRolloverIcon);
paper.addEventListener(MouseEvent.ROLL_OVER, onRolloverIcon);
scissors.addEventListener(MouseEvent.ROLL_OVER, onRolloverIcon);
rock.addEventListener(MouseEvent.ROLL_OUT, onRolloutIcon);
paper.addEventListener(MouseEvent.ROLL_OUT, onRolloutIcon);
scissors.addEventListener(MouseEvent.ROLL_OUT, onRolloutIcon);
rock.buttonMode = true;
paper.buttonMode = true;
scissors.buttonMode = true;
selector.buttonMode = true;
selector.stop();
};
}
private function onRolloutIcon(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(1);
}
private function get rock():MovieClip{
return (MovieClip(MovieClip(selector).getChildByName("rockClip")));
}
private function get paper():MovieClip{
return (MovieClip(MovieClip(selector).getChildByName("paperClip")));
}
}
}//package asfiles.setting.overlay
Section 16
//BeachLeft (asfiles.setting.BeachLeft)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
public class BeachLeft extends Setting {
private var firstVisit:Boolean;// = true
public var bounds:MovieClip;
public var tree:MovieClip;
public var sap:MovieClip;
public static const WAX_FALL:String = "waxFall";
public function BeachLeft(){
firstVisit = true;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("BeachMusic");
rightExitId = "BeachMiddle";
TweenLite.delayedCall(0.1, delayedInit);
}
private function onWaxFall(_arg1:Event):void{
Character.liam.spriteIn.gotoAndPlay(8);
tree.removeEventListener(WAX_FALL, onWaxFall);
tree.gotoAndPlay(1);
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="406" y="388"/>
<point id="rightEntry" x="740" y="400"/>
<point id="rightExit" x="790" y="400"/>
<point id="sap" x="290" y="431"/>
<point id="" x="322" y="438"/>
<point id="" x="420" y="390"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="sap" active="y" depthExclude="y" arriveFunction="arriveSap"/>
<feature id="tree" active="n" depthExclude="y"/>
<feature id="flower" active="y" depthExclude="y" arriveFunction="arriveFlower"/>
<feature id="circleRock" active="y" depthExclude="y" arriveFunction="arriveGraffiti"/>
<feature id="crossRock" active="y" depthExclude="y" arriveFunction="arriveGraffiti"/>
<feature id="descriptiveRock" active="y" depthExclude="y" arriveFunction="arriveDescriptiveRock"/>
<feature id="field" active="y" depthExclude="y" clickFunction="clickField"/>
</features>
</setting>
;
}
public function arriveSap():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 10){
tree.addEventListener(WAX_FALL, onWaxFall);
activeCharacter.goto("getWax");
activeCharacter.heldItem = 11;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("IF I CAN FIND A ROYAL STAMP, I THINK WE COULD PASS THIS OFF AS AN OFFICIAL MESSAGE.");
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if (activeCharacter.heldItem == 0){
activeCharacter.say("I'D BETTER NOT TOUCH THAT WAXY GOO WITH MY HANDS.");
};
};
} else {
activeCharacter.say("YUCK!");
};
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
}
override protected function initialize():void{
super.initialize();
Character.liam.scaleX = 0.85;
Character.liam.scaleY = 0.85;
}
protected function delayedInit():void{
if (firstVisit){
tree.play();
Character.liam.goto("drop");
Character.liam.queueSprite({sprite:"bounce", frm:1, andPlay:true}, true);
Character.liam.queueSprite({sprite:"waiting", frm:1, andPlay:true}, false);
moveCharacter(Character.reemus, new Point((Character.reemus.x + 100), (Character.reemus.y + 30)));
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
firstVisit = false;
};
}
override public function destroy():void{
super.destroy();
tree.removeEventListener(WAX_FALL, onWaxFall);
}
}
}//package asfiles.setting
Section 17
//BeachMiddle (asfiles.setting.BeachMiddle)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
public class BeachMiddle extends Setting {
public var bounds:MovieClip;
public var bark:MovieClip;
public var foreground:MovieClip;
public var crate:MovieClip;
public function BeachMiddle(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
leftExitId = "BeachLeft";
rightExitId = "BeachRight";
}
public function arriveBark():void{
if ((activeCharacter is Liam)){
bark.visible = false;
activeCharacter.goto("grabBark");
activeCharacter.heldItem = 10;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("LOOKS JUST LIKE ROYAL PARCHMENT!");
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
activeCharacter.say("THAT’S WHAT THEY MAKE ROYAL STATIONERY FROM.");
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="leftEntry" x="-30" y="410"/>
<point id="leftExit" x="-60" y="410"/>
<point id="rightEntry" x="740" y="440"/>
<point id="rightExit" x="790" y="440"/>
<point id="bark" x="268" y="330"/>
<point id="crate" x="531" y="340"/>
<point id="" x="70" y="372"/>
<point id="" x="368" y="350"/>
<point id="" x="544" y="360"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="bark" active="y" depthExclude="y" arriveFunction="arriveBark"/>
<feature id="crate" active="y" depthExclude="y" clickFunction="clickCrate" arriveFunction="arriveCrate"/>
</features>
</setting>
;
}
public function clickCrate():void{
if ((((activeCharacter is Liam)) && ((activeCharacter.heldItem == 11)))){
dynamicLoc["crateLiam"] = new Point(510, 315);
} else {
dynamicLoc["crateLiam"] = undefined;
};
moveCharacterToLoc(activeCharacter, "crate");
}
public function arriveCrate():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 25){
activeCharacter.goto("openCrate");
activeCharacter.addFrameAction(13, openCrate);
activeCharacter.heldItem = 0;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if ((((activeCharacter.heldItem == 11)) && ((crate.currentFrame > 1)))){
activeCharacter.goto("getSeal");
activeCharacter.heldItem = 12;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("OOOH, OFFICIAL LOOKING!");
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if (crate.currentFrame == 1){
activeCharacter.say("LOCKED! MAYBE THERE’S A KEY SOMEWHERE.");
} else {
activeCharacter.say("IT’S FULL OF FANCY UNIFORMS, COMPLETE WITH CUFFLINKS FEATURING THE ROYAL SEAL.");
};
};
};
} else {
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem == 25){
activeCharacter.goto("openCrate");
activeCharacter.addFrameAction(13, openCrate);
activeCharacter.heldItem = 0;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if (crate.currentFrame == 1){
activeCharacter.say("I WONDER IF IT’S FILLED WITH CHOCOLATE COVERED COINS.");
} else {
activeCharacter.say("BORING UNIFORMS.");
};
};
};
};
}
override protected function initialize():void{
super.initialize();
Character.liam.scaleX = 0.85;
Character.liam.scaleY = 0.85;
}
public function openCrate():void{
if (crate.currentFrame <= 1){
crate.play();
};
}
}
}//package asfiles.setting
Section 18
//BeachRight (asfiles.setting.BeachRight)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.overlay.*;
public class BeachRight extends Setting {
private var liamGuardChatted:Boolean;// = false
private var guardSelection:String;// = ""
private var rpsOverlay:RPSOverlay;
public var keyCrate:MovieClip;
public var guard:MovieClip;
public var bounds:MovieClip;
public var crates:MovieClip;
private var rpsSelection:String;// = ""
public var foreground:MovieClip;
public var keys:MovieClip;
public function BeachRight(){
rpsSelection = "";
guardSelection = "";
liamGuardChatted = false;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
keys.visible = false;
speechPoints["guard"] = new Point(594, 173);
dynamicLoc["keysReemus"] = new Point(244, 431);
leftExitId = "BeachMiddle";
}
public function arriveGuard():void{
if ((activeCharacter is Reemus)){
if (keyCrate.currentFrame == 1){
processSpeechTree("reemus_request", "initRPS");
} else {
if ((((keyCrate.currentFrame < keyCrate.totalFrames)) && (!(keys.visible)))){
initRPS();
} else {
processSpeechTree("guard_reject");
};
};
} else {
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 12){
processSpeechTree("guard_approve", "finishLevel");
} else {
if (liamGuardChatted){
processSpeechTree("guard_reiterate");
} else {
if (activeCharacter.heldItem == 11){
processSpeechTree("no_seal");
} else {
processSpeechTree("liam_request");
liamGuardChatted = true;
};
};
};
};
};
}
private function onSelectPaper(_arg1:Event):void{
rpsSelection = "paper";
guardSelection = "scissors";
handleRPSSelection();
}
public function arriveKeyCrate():void{
if ((activeCharacter is Reemus)){
processSpeechTree("guard_warn_reemus");
} else {
processSpeechTree("guard_warn_liam");
};
}
public function finishLevel():void{
dispatchEvent(new Event(Main.FADE_OUT));
TweenLite.delayedCall(1.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:""})]);
TweenLite.delayedCall(1.5, Main(root).gotoAndStop, [10]);
}
public function initRPS():void{
rpsOverlay = new RPSOverlay();
rpsOverlay.addEventListener(RPSOverlay.SELECT_ROCK, onSelectRock);
rpsOverlay.addEventListener(RPSOverlay.SELECT_PAPER, onSelectPaper);
rpsOverlay.addEventListener(RPSOverlay.SELECT_SCISSORS, onSelectScissors);
rpsOverlay.activate();
dispatchEvent(new Event(Main.HIDE_PORTRAIT));
dispatchEvent(new Event(Setting.HIDE_LEFT));
Character.reemus.goto("rockPaperScissors");
Character.reemus.addFrameAction(48, showHands);
Main.lockCatcher = false;
dispatchEvent(new Event(Setting.SHOW_CATCHER));
dispatchEvent(new InfoEvent(Setting.SPECIAL_OVERLAY, {overlay:rpsOverlay}));
TweenLite.delayedCall(0.5, dispatchEvent, [new Event(Setting.HIDE_CATCHER)]);
}
public function arriveCrates():void{
}
public function moveKey():void{
if (keyCrate.currentFrame < 32){
if (keyCrate.currentFrame > 1){
keys.visible = true;
};
keyCrate.play();
};
TweenLite.delayedCall(1, dispatchEvent, [new Event(Setting.HIDE_CATCHER)]);
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="leftEntry" x="-10" y="490"/>
<point id="leftExit" x="-40" y="490"/>
<point id="crates" x="132" y="440"/>
<point id="keyCrate" x="345" y="457"/>
<point id="keys" x="256" y="437"/>
<point id="guard" x="345" y="457"/>
<point id="" x="322" y="438"/>
<point id="" x="420" y="390"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="crates" active="y" depthExclude="y" arriveFunction="arriveKeyCrate"/>
<feature id="keyCrate" active="y" depthExclude="y" arriveFunction="arriveKeyCrate"/>
<feature id="keys" active="y" depthExclude="y" arriveFunction="arriveKeys"/>
<feature id="guard" active="y" depthExclude="y" arriveFunction="arriveGuard"/>
</features>
<dialogue>
<tree id="reemus_request">
<step origin="reemus" text="HEY CHIEF, WE NEED A RIDE ACROSS THE LAKE. CAN YOU HOOK US UP?"/>
<step origin="guard" text="SORRY, THIS BOAT IS FOR ROYAL DELIVERIES ONLY. "/>
<step origin="reemus" text="AW COME ON! LIVE A LITTLE!"/>
<step origin="guard" text="ALRIGHT, IF YOU CAN BEAT ME IN A BATTLE OF WITS, I’LL TAKE YOU ACROSS. BEST 2 OUT OF 3!"/>
</tree>
<tree id="guard_reject">
<step origin="guard" text="YOU LOST FAIR AND SQUARE. BEAT IT, OLD MAN."/>
</tree>
<tree id="guard_warn_liam">
<step origin="guard" text="KEEP YOUR FURRY PAWS AWAY FROM THE DELIVERIES."/>
</tree>
<tree id="guard_warn_reemus">
<step origin="guard" text="HANDS OFF, IT’S AN OFFENSE FOR PEASANTS TO TOUCH ROYAL PARCELS."/>
</tree>
<tree id="liam_request">
<step origin="liam" text="EXCUSE ME SIR, BUT WE REALLY NEED A RIDE."/>
<step origin="guard" text="SORRY, ROYAL DELIVERIES ONLY!"/>
<step origin="liam" text="BUT WE HAVE AN URGENT MESSAGE FOR THE KING."/>
<step origin="guard" text="IN THAT CASE, HAND IT OVER AND LETS GO!"/>
<step origin="liam" text="UM, WELL… WE NEED TO DELIVER IT IN PERSON."/>
<step origin="guard" text="SORRY, I ONLY DELIVER MESSAGES CARRYING THE ROYAL SEAL."/>
</tree>
<tree id="no_seal">
<step origin="guard" text="I CAN’T DELIVER THIS, IT’S MISSING THE ROYAL SEAL."/>
</tree>
<tree id="guard_approve">
<step origin="guard" text="THE ROYAL SEAL! WHY DIDN’T SAY SO EARLIER, LETS GO!"/>
</tree>
<tree id="guard_reiterate">
<step origin="guard" text="I already told you, I only deliver messages carrying the royal seal."/>
</tree>
</dialogue>
</setting>
;
}
public function showHands():void{
Character.reemus.spriteIn.gotoAndPlay(rpsSelection);
guard.gotoAndPlay(guardSelection);
TweenLite.delayedCall(1, failRPS);
}
private function onSelectScissors(_arg1:Event):void{
rpsSelection = "scissors";
guardSelection = "rock";
handleRPSSelection();
}
public function removeKey():void{
keyCrate.gotoAndStop(33);
keys.visible = false;
}
override protected function handleSpecialSpeaker(_arg1:String):void{
if (_arg1 == "guard"){
guard.gotoAndStop("talk");
} else {
guard.gotoAndStop("wait");
};
}
private function handleRPSSelection():void{
MovieClip(rpsOverlay).dispatchEvent(new Event(Setting.HIDE_OVERLAY));
dispatchEvent(new Event(Setting.SHOW_CATCHER));
Character.reemus.spriteIn.gotoAndPlay(3);
guard.gotoAndPlay("shoot");
}
public function arriveKeys():void{
if (activeCharacter.heldItem == 0){
removeKey();
activeCharacter.goto("grabKeys");
activeCharacter.heldItem = 25;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
activeCharacter.say("My hands are full.");
};
}
override protected function initialize():void{
super.initialize();
Character.liam.scaleX = 0.85;
Character.liam.scaleY = 0.85;
}
private function onSelectRock(_arg1:Event):void{
rpsSelection = "rock";
guardSelection = "paper";
handleRPSSelection();
}
private function failRPS():void{
Character.reemus.spriteIn.gotoAndPlay(103);
Character.reemus.addFrameAction(112, moveKey);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
guard.gotoAndPlay("laugh");
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
dispatchEvent(new Event(Setting.SHOW_LEFT));
}
override public function destroy():void{
super.destroy();
TweenLite.killDelayedCallsTo(dispatchEvent);
TweenLite.killDelayedCallsTo(failRPS);
rpsOverlay.removeEventListener(RPSOverlay.SELECT_ROCK, onSelectRock);
rpsOverlay.removeEventListener(RPSOverlay.SELECT_PAPER, onSelectPaper);
rpsOverlay.removeEventListener(RPSOverlay.SELECT_SCISSORS, onSelectScissors);
}
}
}//package asfiles.setting
Section 19
//BurrowLeft (asfiles.setting.BurrowLeft)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
public class BurrowLeft extends Setting {
private var nutExists:Boolean;// = true
private var firstVisit:Boolean;// = true
public var bounds:MovieClip;
private var actionBlocker:ActionBlocker;
public var exit:MovieClip;
public var beach:MovieClip;
public var rock2:MovieClip;
public var squirrel:MovieClip;
public var rock1:MovieClip;
public var tree:MovieClip;
public static var showSquirrel:Boolean = false;
public function BurrowLeft(){
firstVisit = true;
nutExists = true;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
rightExitId = "BurrowMiddle";
squirrel.visible = false;
squirrel.stop();
TweenLite.delayedCall(0.1, delayedInit);
}
public function showRock1():void{
rock1.visible = true;
}
public function showRock2():void{
rock2.visible = true;
}
override public function handleCharacterSwitch():void{
actionBlocker.visible = !((activeCharacter.alpha > 0));
}
public function arriveExit():void{
Character.liam.heldItem = 0;
Character.liam.alpha = 0;
Character.liam.goto("waiting", 1, false);
Character.reemus.heldItem = 0;
Character.reemus.goto("squirrelFly");
Character.reemus.addFrameAction(90, endLevel);
mouseEnabled = false;
mouseChildren = false;
dispatchEvent(new Event(Main.HIDE_PORTRAIT));
dispatchEvent(new Event(Setting.HIDE_RIGHT));
dispatchEvent(new Event(Setting.SHOW_CATCHER));
}
public function arriveBeach():void{
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem == 23){
if (!bothCharacters){
addCharacter(Character.liam, "rightEntry");
};
moveCharacterToLoc(Character.liam, "exit");
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
activeCharacter.say("A beautiful sandy beach below and we're stuck up here with no way down! Story of my life");
};
} else {
activeCharacter.say("IT’S TOO STEEP TO JUMP. WE NEED SOME SORT OF PARACHUTE.");
};
}
private function onReturnReemus(_arg1:Event):void{
Character.reemus.alpha = 1;
actionBlocker.visible = false;
tree.gotoAndStop("idle");
}
private function onClickBlocker(_arg1:Event):void{
if ((((activeCharacter is Reemus)) && ((tree.currentLabel == "reemus")))){
tree.inner.play();
};
}
public function arriveRock1():void{
if (activeCharacter.heldItem == 0){
rock1.visible = false;
activeCharacter.goto("grabRock");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
if ((activeCharacter is Reemus)){
activeCharacter.heldItem = 22;
} else {
activeCharacter.queueSpeech("IT’S TOO HEAVY!");
activeCharacter.addFrameAction(30, showRock1);
};
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
}
public function arriveRock2():void{
if (activeCharacter.heldItem == 0){
rock2.visible = false;
activeCharacter.goto("grabRock");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
if ((activeCharacter is Reemus)){
activeCharacter.heldItem = 22;
} else {
activeCharacter.queueSpeech("IT’S TOO HEAVY!");
activeCharacter.addFrameAction(30, showRock2);
};
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="rightEntry" x="732" y="456"/>
<point id="rightExit" x="790" y="456"/>
<point id="rock1" x="413" y="497"/>
<point id="rock2" x="707" y="399"/>
<point id="tree" x="532" y="420"/>
<point id="beach" x="266" y="468"/>
<point id="exit" x="194" y="469"/>
<point id="" x="362" y="472"/>
<point id="" x="458" y="425"/>
<point id="" x="581" y="421"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="squirrel" active="n"/>
<feature id="rock1" active="y" arriveFunction="arriveRock1"/>
<feature id="rock2" active="y" depthExclude="y" arriveFunction="arriveRock2"/>
<feature id="tree" active="y" clickFunction="clickTree" arriveFunction="arriveTree"/>
<feature id="beach" active="y" depthExclude="y" arriveFunction="arriveBeach"/>
<feature id="exit" active="n" depthExclude="y" arriveFunction="arriveExit"/>
</features>
</setting>
;
}
private function onRemovedFromStage(_arg1:Event):void{
actionBlocker.visible = false;
}
private function onSquirrelEscape(_arg1:Event):void{
dispatchEvent(new Event(Setting.RETURN_VIEW));
dispatchEvent(new Event(Setting.HIDE_CATCHER));
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
BurrowRight.activeChar.say("hmm, if we can catch that squirrel, we might be able to glide on out of here.");
}
public function arriveTree():void{
if ((activeCharacter is Reemus)){
if (((((nutExists) && ((activeCharacter.heldItem == 0)))) && ((tree.currentLabel == "idle")))){
activeCharacter.alpha = 0;
actionBlocker.visible = true;
tree.gotoAndStop("reemus");
};
} else {
if ((activeCharacter is Liam)){
if (tree.currentLabel == "reemus"){
if ((((activeCharacter.heldItem == 0)) && (nutExists))){
nutExists = false;
tree.inner.gotoAndStop(58);
activeCharacter.scaleX = -(Math.abs(activeCharacter.scaleX));
activeCharacter.heldItem = 13;
activeCharacter.goto("grabNut");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
} else {
activeCharacter.alpha = 0;
actionBlocker.visible = true;
tree.gotoAndStop("liam");
tree.addEventListener("returnLiam", onReturnLiam);
};
};
};
}
private function onReturnLiam(_arg1:Event):void{
Character.liam.alpha = 1;
actionBlocker.visible = false;
tree.gotoAndStop("idle");
}
public function clickTree():void{
if ((activeCharacter is Liam)){
if (tree.currentLabel == "reemus"){
dynamicLoc["treeLiam"] = new Point(316, 458);
} else {
dynamicLoc["treeLiam"] = new Point(0x0202, 419);
};
};
moveCharacterToLoc(activeCharacter, "tree");
}
public function endLevel():void{
dispatchEvent(new Event(Main.FADE_OUT));
TweenLite.delayedCall(1.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"Spire"})]);
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
}
override protected function initialize():void{
super.initialize();
Character.reemus.scaleX = 0.86;
Character.reemus.scaleY = 0.86;
Character.liam.scaleX = 0.86;
Character.liam.scaleY = 0.86;
}
protected function delayedInit():void{
if (firstVisit){
dynamicLoc["rock1Liam"] = new Point((414 - 60), (498 + 3));
dynamicLoc["rock2Liam"] = new Point((707 - 61), (400 + 1));
tree.addEventListener("returnReemus", onReturnReemus);
tree.addEventListener("returnLiam", onReturnLiam);
addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
actionBlocker = new ActionBlocker();
actionBlocker.visible = false;
actionBlocker.addEventListener(MouseEvent.CLICK, onClickBlocker);
dispatchEvent(new InfoEvent(Setting.SPECIAL_OVERLAY, {overlay:actionBlocker}));
dispatchEvent(new Event(Setting.HIDE_CATCHER));
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
};
}
override protected function onAddedToStage(_arg1:Event):void{
super.onAddedToStage(_arg1);
if (showSquirrel){
showSquirrel = false;
if (((contains(Character.reemus)) && ((Character.reemus.y > 456)))){
setChildIndex(squirrel, getChildIndex(Character.reemus));
} else {
setChildIndex(squirrel, (numChildren - 1));
};
squirrel.addEventListener("escape", onSquirrelEscape);
squirrel.gotoAndPlay(1);
squirrel.visible = true;
};
if (((((actionBlocker) && (actionBlocker.visible))) && (contains(actionBlocker)))){
setChildIndex(actionBlocker, (numChildren - 1));
Character.reemus.alpha = 0;
};
}
override public function destroy():void{
super.destroy();
tree.removeEventListener("returnReemus", onReturnReemus);
tree.removeEventListener("returnLiam", onReturnLiam);
removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
actionBlocker.removeEventListener(MouseEvent.CLICK, onClickBlocker);
squirrel.removeEventListener("escape", onSquirrelEscape);
showSquirrel = false;
}
}
}//package asfiles.setting
Section 20
//BurrowMiddle (asfiles.setting.BurrowMiddle)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
public class BurrowMiddle extends Setting {
public var lowHole:MovieClip;
public var bounds:MovieClip;
public var foreground:MovieClip;
public var droppedRock:MovieClip;
private var firstEscape:Boolean;// = true
public var squirrel:MovieClip;
public var hole3:MovieClip;
public var hole4:MovieClip;
public var highHole:MovieClip;
public static var caughtSquirrel:Boolean = false;
public static var showSquirrel:Boolean = false;
public function BurrowMiddle(){
firstEscape = true;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
leftExitId = "BurrowLeft";
rightExitId = "BurrowRight";
squirrel.stop();
squirrel.visible = false;
droppedRock.visible = false;
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
TweenLite.delayedCall(0.1, delayedInit);
}
public function freeUpHands():void{
droppedRock.visible = true;
droppedRock.gotoAndPlay(1);
}
public function showRock():void{
droppedRock.visible = true;
}
private function onCatchFrame(_arg1:Event):void{
if (Character.reemus.currentLabel.indexOf("grabSquirrel") >= 0){
caughtSquirrel = true;
Character.reemus.spriteIn.play();
Character.reemus.heldItem = 23;
squirrel.gotoAndStop(1);
squirrel.visible = false;
} else {
if (Character.liam.currentLabel.indexOf("missSquirrel") >= 0){
Character.liam.spriteIn.gotoAndPlay(12);
};
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="354" y="436"/>
<point id="leftEntry" x="-40" y="480"/>
<point id="leftExit" x="-90" y="480"/>
<point id="rightEntry" x="740" y="470"/>
<point id="rightExit" x="790" y="470"/>
<point id="hole3" x="725" y="445"/>
<point id="hole4" x="420" y="476"/>
<point id="highHole" x="183" y="420"/>
<point id="lowHole" x="58" y="419"/>
<point id="droppedRock" x="58" y="419"/>
<point id="" x="141" y="470"/>
<point id="" x="280" y="431"/>
<point id="" x="403" y="463"/>
<point id="" x="278" y="519"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="hole3" active="y" arriveFunction="arriveHole3"/>
<feature id="hole4" active="y" arriveFunction="arriveHole4"/>
<feature id="highHole" active="y" depthExclude="y" arriveFunction="arriveHighHole"/>
<feature id="lowHole" active="y" depthExclude="y" arriveFunction="arriveLowHole"/>
<feature id="droppedRock" active="y" depthExclude="y" arriveFunction="arriveDroppedRock"/>
</features>
</setting>
;
}
public function arriveHole4():void{
handleHole(hole4);
}
public function arriveHole3():void{
handleHole(hole3);
}
private function onSquirrelEscape(_arg1:Event):void{
if (firstEscape){
firstEscape = false;
BurrowLeft.showSquirrel = true;
dispatchEvent(new InfoEvent(Setting.SWITCH_VIEW, {dest:"BurrowLeft"}));
} else {
dispatchEvent(new Event(Setting.RETURN_VIEW));
dispatchEvent(new Event(Setting.HIDE_CATCHER));
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
TweenLite.delayedCall(0.1, dispatchEvent, [new Event(Setting.HIDE_RIGHT)]);
};
}
protected function handleHole(_arg1:MovieClip){
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem == 22){
if (_arg1.currentFrame == 1){
activeCharacter.heldItem = 0;
activeCharacter.goto("plugHole");
activeCharacter.addFrameAction(13, plugHole, {clip:_arg1});
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
} else {
if (activeCharacter.heldItem == 0){
if (_arg1.currentFrame == 2){
activeCharacter.heldItem = 22;
activeCharacter.goto("retrieveRock");
activeCharacter.addFrameAction(13, collectRock, {clip:_arg1});
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
activeCharacter.say("I’M GLAD THIS ISN’T MY LAWN.");
};
};
};
} else {
activeCharacter.say("SQUIRREL APARTMENTS!");
};
}
public function handleHandsFree():void{
activeCharacter.goto("grabSquirrel");
activeCharacter.addFrameAction(44, returnView);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
}
public function arriveLowHole():void{
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem == 23){
activeCharacter.say("Letting him go after all that trouble? Fat chance.");
} else {
if (((droppedRock.visible) && ((activeCharacter.heldItem > 0)))){
activeCharacter.say("Hmmm, maybe I can leverage the sitatuation in my favor using these rocks.");
} else {
if (activeCharacter.heldItem <= 0){
handleHandsFree();
} else {
activeCharacter.heldItem = 0;
activeCharacter.goto("plugHole");
activeCharacter.addFrameAction(13, freeUpHands);
activeCharacter.addFrameAction(24, handleHandsFree);
};
};
};
} else {
activeCharacter.goto("missSquirrel");
activeCharacter.addFrameAction(44, returnView);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
};
}
protected function plugHole(_arg1:Object):void{
_arg1.clip.gotoAndStop(2);
}
public function arriveHighHole():void{
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem == 23){
activeCharacter.say("Letting him go after all that trouble? Fat chance.");
} else {
if (activeCharacter.heldItem > 0){
activeCharacter.goto("poiseHighRock");
} else {
activeCharacter.goto("poiseHigh");
};
};
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
};
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
if ((((_arg2 == "entry")) || ((_arg2 == "")))){
TweenLite.delayedCall(0.1, _arg1.goto, ["drop"]);
if ((_arg1 is Reemus)){
_arg1.x = (_arg1.x + 30);
_arg1.y = (_arg1.y + 50);
};
};
}
override protected function initialize():void{
super.initialize();
Character.reemus.scaleX = 0.86;
Character.reemus.scaleY = 0.86;
Character.liam.scaleX = 0.86;
Character.liam.scaleY = 0.86;
}
protected function delayedInit():void{
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
dynamicLoc["droppedRockLiam"] = new Point((58 + 65), (419 + 3));
}
override protected function onAddedToStage(_arg1:Event):void{
super.onAddedToStage(_arg1);
if (showSquirrel){
showSquirrel = false;
squirrel.addEventListener("escape", onSquirrelEscape);
squirrel.addEventListener("catchFrame", onCatchFrame);
if (((contains(Character.reemus)) && ((Character.reemus.y > 440)))){
setChildIndex(squirrel, getChildIndex(Character.reemus));
} else {
setChildIndex(squirrel, (numChildren - 1));
};
if (hole4.currentFrame == 1){
squirrel.gotoAndPlay("hole2");
squirrel.visible = true;
} else {
if (hole3.currentFrame == 1){
squirrel.gotoAndPlay("hole1");
squirrel.visible = true;
} else {
squirrel.stop();
squirrel.visible = false;
TweenLite.delayedCall(2, dispatchEvent, [new Event(Setting.RETURN_VIEW)]);
TweenLite.delayedCall(2, dispatchEvent, [new Event(Setting.HIDE_CATCHER)]);
TweenLite.delayedCall(2, dispatchEvent, [new Event(Main.SHOW_PORTRAIT)]);
};
};
};
}
protected function collectRock(_arg1:Object):void{
_arg1.clip.gotoAndStop(1);
}
public function arriveDroppedRock():void{
if (activeCharacter.heldItem == 0){
droppedRock.visible = false;
activeCharacter.goto("grabRock");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
if ((activeCharacter is Reemus)){
activeCharacter.heldItem = 22;
} else {
activeCharacter.queueSpeech("IT’S TOO HEAVY!");
activeCharacter.addFrameAction(30, showRock);
};
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
}
override public function destroy():void{
super.destroy();
squirrel.removeEventListener("escape", onSquirrelEscape);
squirrel.removeEventListener("catchFrame", onCatchFrame);
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
showSquirrel = false;
caughtSquirrel = false;
TweenLite.killDelayedCallsTo(dispatchEvent);
}
public function returnView():void{
squirrel.gotoAndStop(1);
dispatchEvent(new Event(Setting.RETURN_VIEW));
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
}
}
}//package asfiles.setting
Section 21
//BurrowRight (asfiles.setting.BurrowRight)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import asfiles.char.*;
import asfiles.*;
public class BurrowRight extends Setting {
private var firstVisit:Boolean;// = true
public var bounds:MovieClip;
public var feeder:MovieClip;
public var foreground:MovieClip;
public var squirrel:MovieClip;
public var hole2:MovieClip;
public var hole1:MovieClip;
public var nut:MovieClip;
public static var activeChar:Character;
public function BurrowRight(){
firstVisit = true;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("SquirrelMusic");
leftExitId = "BurrowMiddle";
nut.visible = false;
TweenLite.delayedCall(0.1, delayedInit);
}
override public function handleReturnView():void{
dispatchEvent(new Event(Setting.SHOW_LEFT));
}
public function arriveFeeder():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 13){
activeCharacter.heldItem = 0;
activeCharacter.goto("tossNut");
activeCharacter.addFrameAction(31, placeNut);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if (feeder.currentFrame == 1){
activeCharacter.say("THE SQUIRRELS REALLY CLEANED THAT FEEDER OUT.");
} else {
activeCharacter.say("I THINK WE'LL HAVE TO GIVE THE SQUIRREL SOME PRIVACY BEFORE HE'LL GO AFTER THE NUT.");
};
};
} else {
if (feeder.currentFrame == 1){
activeCharacter.say("AWW, IT’S EMPTY. THERE GOES MY LUNCH PLANS.");
} else {
activeCharacter.say("IT'S BEST THAT I DON'T EAT LIAM'S PLAN.");
};
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="577" y="493"/>
<point id="leftEntry" x="-40" y="447"/>
<point id="leftExit" x="-90" y="447"/>
<point id="hole2" x="310" y="450"/>
<point id="hole1" x="280" y="419"/>
<point id="feeder" x="493" y="450"/>
<point id="nut" x="285" y="437"/>
<point id="" x="42" y="446"/>
<point id="" x="162" y="420"/>
<point id="" x="158" y="484"/>
<point id="" x="278" y="446"/>
<point id="" x="428" y="463"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="nut" active="y" depthExclude="y" arriveFunction="arriveNut"/>
<feature id="hole1" active="y" depthExclude="y" arriveFunction="arriveHole1"/>
<feature id="hole2" active="y" arriveFunction="arriveHole2"/>
<feature id="feeder" active="y" depthExclude="y" arriveFunction="arriveFeeder"/>
<feature id="squirrel" active="n" depX1="-20" depY1="160" depX2="20" depY2="160"/>
</features>
</setting>
;
}
public function arriveHole2():void{
handleHole(hole2);
}
public function arriveHole1():void{
handleHole(hole1);
}
private function onSquirrelEscape(_arg1:Event):void{
if (squirrel.currentLabel != "hole3"){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
dispatchEvent(new InfoEvent(Setting.SWITCH_VIEW, {dest:"BurrowMiddle"}));
} else {
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
dispatchEvent(new Event(Setting.SHOW_LEFT));
};
}
public function placeNut():void{
feeder.gotoAndStop(2);
}
protected function handleHole(_arg1:MovieClip){
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem == 22){
if (_arg1.currentFrame == 1){
activeCharacter.heldItem = 0;
activeCharacter.goto("plugHole");
activeCharacter.addFrameAction(13, plugHole, {clip:_arg1});
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
} else {
if (activeCharacter.heldItem == 0){
if (_arg1.currentFrame == 2){
activeCharacter.heldItem = 22;
activeCharacter.goto("retrieveRock");
activeCharacter.addFrameAction(13, collectRock, {clip:_arg1});
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
activeCharacter.say("I’M GLAD THIS ISN’T MY LAWN.");
};
};
};
} else {
activeCharacter.say("SQUIRREL APARTMENTS!");
};
}
public function arriveNut():void{
if ((activeCharacter is Liam)){
if (!BurrowMiddle.caughtSquirrel){
nut.visible = false;
activeCharacter.heldItem = 13;
activeCharacter.goto("bounce");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
};
}
protected function plugHole(_arg1:Object):void{
_arg1.clip.gotoAndStop(2);
}
private function handleSquirrelEscape():void{
dispatchEvent(new Event(Main.HIDE_PORTRAIT));
dispatchEvent(new Event(Setting.SHOW_CATCHER));
dispatchEvent(new Event(Setting.HIDE_LEFT));
TweenLite.delayedCall(0.11, dispatchEvent, [new Event(Setting.HIDE_LEFT)]);
activeChar = activeCharacter;
squirrel.gotoAndStop(1);
squirrel.visible = true;
squirrel.addEventListener("escape", onSquirrelEscape);
nut.visible = true;
nut.gotoAndPlay(1);
feeder.gotoAndStop(1);
if (hole1.currentFrame == 1){
BurrowMiddle.showSquirrel = true;
squirrel.gotoAndPlay("hole1");
} else {
if (hole2.currentFrame == 1){
BurrowMiddle.showSquirrel = true;
squirrel.gotoAndPlay("hole2");
} else {
squirrel.gotoAndPlay("hole3");
};
};
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
if (firstVisit){
squirrel.gotoAndStop(1);
squirrel.visible = true;
if (_arg1.x < 200){
TweenLite.delayedCall(2, squirrel.gotoAndPlay, ["hole3"]);
} else {
TweenLite.delayedCall(1, squirrel.gotoAndPlay, ["hole1"]);
};
firstVisit = false;
} else {
if (feeder.currentFrame > 1){
handleSquirrelEscape();
};
};
}
override protected function initialize():void{
super.initialize();
Character.reemus.scaleX = 0.86;
Character.reemus.scaleY = 0.86;
Character.liam.scaleX = 0.86;
Character.liam.scaleY = 0.86;
}
protected function delayedInit():void{
Character.reemus.scaleX = -(Math.abs(Character.reemus.scaleX));
Character.liam.scaleX = -(Math.abs(Character.liam.scaleX));
refreshDepths(Character.reemus.point);
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
}
protected function collectRock(_arg1:Object):void{
_arg1.clip.gotoAndStop(1);
}
override public function destroy():void{
super.destroy();
activeChar = null;
TweenLite.killDelayedCallsTo(squirrel.gotoAndPlay);
squirrel.removeEventListener("escape", onSquirrelEscape);
}
}
}//package asfiles.setting
Section 22
//CaveDoor (asfiles.setting.CaveDoor)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import com.newgrounds.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.overlay.*;
public class CaveDoor extends Setting {
public var carriage:MovieClip;
private var allRocks:Array;
public var bounds:MovieClip;
private var firstRockLift:Boolean;// = true
private var allPegs:Array;
public var roach:MovieClip;
public var foreground:MovieClip;
public var log:MovieClip;
public var rock2:MovieClip;
public var rock3:MovieClip;
public var rock1:MovieClip;
public var rock4:MovieClip;
private var myPegs:Array;
public var cave:MovieClip;
public var door:MovieClip;
private var pegPuzzle:PegPuzzle;
public static const CARRIAGE_EVENT:String = "carriageEvent";
public function CaveDoor(){
firstRockLift = true;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("CaveDoorMusic");
roach.visible = false;
carriage.addEventListener(CARRIAGE_EVENT, onCarriageEvent);
allRocks = [rock1, rock2, rock3, rock4];
allPegs = [["snake", "plant"], ["owl"], ["rabbit", "mouse"], ["carrot", "frog"]];
myPegs = new Array();
CaveInterior.roachDead = false;
pegPuzzle = new PegPuzzle();
TweenLite.delayedCall(0.1, initPegs);
speechPoints["roach"] = new Point(402, 146);
}
public function grabPegs():void{
var _local1:Array;
var _local2:MovieClip;
var _local3:int;
_local2 = MovieClip(getChildByName(activeCharacter.destination));
_local1 = allPegs[allRocks.indexOf(_local2)];
_local3 = 0;
while (_local3 < _local1.length) {
myPegs.push(_local1[_local3]);
_local3++;
};
_local2.peg1.visible = false;
_local2.peg2.visible = false;
}
public function clickRoach():void{
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem > 0){
dynamicLoc["roachReemus"] = new Point(215, 331);
} else {
dynamicLoc["roachReemus"] = undefined;
};
};
moveCharacterToLoc(activeCharacter, "roach");
}
public function arriveRoach():void{
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem > 0){
CaveInterior.roachDead = true;
activeCharacter.goto("bugSquish");
activeCharacter.addFrameAction(10, squishBug);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("THAT FELT EVEN BETTER THAN i IMAGINED.");
} else {
activeCharacter.goto("bugPunch");
activeCharacter.say("move it or lose it roach...");
activeCharacter.addFrameAction(18, venomSprayed);
activeCharacter.addFrameAction(53, venomRecover);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
roach.gotoAndStop(2);
};
} else {
if ((activeCharacter is Liam)){
processSpeechTree("bug_question");
};
};
}
private function initPegs():void{
var _local1:int;
_local1 = 0;
while (_local1 < allRocks.length) {
allRocks[_local1].peg1.gotoAndStop(allPegs[_local1][0]);
if (allPegs[_local1].length > 1){
allRocks[_local1].peg2.gotoAndStop(allPegs[_local1][1]);
} else {
allRocks[_local1].peg2.visible = false;
};
_local1++;
};
dispatchEvent(new Event(Setting.SHOW_CATCHER));
dispatchEvent(new Event(Setting.FORCE_SWITCH));
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="-175" y="400"/>
<point id="rock1" x="420" y="500"/>
<point id="rock2" x="355" y="421"/>
<point id="rock3" x="138" y="367"/>
<point id="rock4" x="138" y="333"/>
<point id="roach" x="308" y="331"/>
<point id="log" x="308" y="331"/>
<point id="door" x="518" y="420"/>
<point id="" x="155" y="332"/>
<point id="" x="157" y="402"/>
<point id="" x="234" y="467"/>
<point id="" x="621" y="500"/>
<point id="" x="58" y="444"/>
<point id="" x="417" y="516"/>
<point id="" x="440" y="470"/>
<point id="" x="466" y="534"/>
</points>
<features>
<feature id="rock1" active="y" arriveFunction="arriveRock"/>
<feature id="rock2" active="y" arriveFunction="arriveRock"/>
<feature id="rock3" active="y" arriveFunction="arriveRock"/>
<feature id="rock4" active="y" arriveFunction="arriveRock"/>
<feature id="roach" active="y" clickFunction="clickRoach" arriveFunction="arriveRoach" depthExclude="y"/>
<feature id="door" active="y" arriveFunction="arriveDoor" depthExclude="y"/>
<feature id="log" active="y" arriveFunction="arriveLog" depthExclude="y"/>
<feature id="cave" active="n" depX1="0" depY1="100" depX2="150" depY2="100"/>
<feature id="foreground" active="n"/>
</features>
<dialogue>
<tree id="bug_question">
<step origin="liam" text="are you sure this is the way?"/>
<step origin="roach" text="yes, just find a way through that door and you're home free..."/>
</tree>
</dialogue>
</setting>
;
}
public function arriveLog():void{
if ((activeCharacter is Reemus)){
activeCharacter.say("Liam hurry up and find a way through that door, I see a beach on the other side!");
} else {
activeCharacter.say("I gotta stay focused on solving this door...");
};
}
public function venomRecover():void{
Character.reemus.say("");
}
public function arriveRock():void{
if ((activeCharacter is Reemus)){
activeCharacter.say("No way, Liam wanted to go this way he can do the heavy lifting.");
} else {
if ((activeCharacter is Liam)){
activeCharacter.goto("liftRock");
activeCharacter.addFrameAction(9, liftRock);
activeCharacter.addFrameAction(20, grabPegs);
activeCharacter.addFrameAction(29, resetRock);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
};
}
public function liftRock():void{
var _local1:MovieClip;
if (firstRockLift){
Character.liam.say("hey, there's some weird plugs under here...");
};
firstRockLift = false;
_local1 = MovieClip(getChildByName(activeCharacter.destination));
_local1.gotoAndStop(2);
_local1.mouseEnabled = false;
_local1.mouseChildren = false;
}
public function arriveDoor():void{
if ((activeCharacter is Reemus)){
activeCharacter.say("what an amazingly complicated way to keep a door locked.");
} else {
dispatchEvent(new InfoEvent(Setting.SPECIAL_OVERLAY, {overlay:pegPuzzle}));
dispatchEvent(new Event(Main.HIDE_PORTRAIT));
pegPuzzle.updateCollection(myPegs);
TweenLite.delayedCall(0.1, dispatchEvent, [new Event(Setting.HIDE_CATCHER)]);
};
}
override protected function handleSpecialSpeaker(_arg1:String):void{
if ((((_arg1 == "roach")) && ((roach.currentFrame == 1)))){
roach.gotoAndStop(4);
} else {
if (roach.currentFrame == 4){
roach.gotoAndStop(1);
};
};
}
override public function exitOverlay(_arg1:MovieClip):void{
if ((((_arg1 is PegPuzzle)) && (PegPuzzle(_arg1).solved))){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
cave.gotoAndPlay(2);
TweenLite.delayedCall(2.5, dispatchEvent, [new Event(Main.FADE_OUT)]);
TweenLite.delayedCall(3.9, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"CaveInterior"})]);
} else {
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
};
}
public function resetRock():void{
var _local1:MovieClip;
_local1 = MovieClip(getChildByName(activeCharacter.destination));
_local1.gotoAndStop(1);
}
private function onCarriageEvent(_arg1:Event):void{
var _local2:SpeechEvent;
moveCharacter(Character.reemus, new Point(42, 470));
carriage.stop();
removeChild(carriage);
Character.liam.alpha = 1;
roach.visible = true;
roach.gotoAndStop(4);
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
_local2 = new SpeechEvent("here ya go, this cave will lead you out. just a small matter of solving the door lock...", {point:speechPoints["roach"]});
dispatchEvent(_local2);
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
if ((_arg1 is Liam)){
_arg1.x = 141;
_arg1.y = 398.5;
_arg1.scaleX = -(Math.abs(_arg1.scaleX));
_arg1.alpha = 0;
};
}
public function squishBug():void{
roach.gotoAndStop(3);
roach.mouseEnabled = false;
roach.mouseChildren = false;
if (NewgroundsAPI.hasUserSession()){
MovieClip(root).medal_popup.unlockMedal("THE PASSION OF THE EXTERMINATOR");
};
}
public function venomSprayed():void{
Character.reemus.say("ARGH!");
}
override public function destroy():void{
super.destroy();
if (carriage){
carriage.removeEventListener(CARRIAGE_EVENT, onCarriageEvent);
};
}
}
}//package asfiles.setting
Section 23
//CaveInterior (asfiles.setting.CaveInterior)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.overlay.*;
public class CaveInterior extends Setting {
private const scrollSpan:Number = 680;
public var fuzzy:MovieClip;
public var vines:MovieClip;
public var pondArea:MovieClip;
public var stalactite:MovieClip;
private var liamScreen:int;// = 1
public var cabinet:MovieClip;
public var mushroom:MovieClip;
public var bounds:MovieClip;
public var stalagmites:MovieClip;
private var stalacClicks:StalacClicks;
public var mushrooms:MovieClip;
public var roach:MovieClip;
private var sleepingHard:Boolean;// = false
public var foreground:MovieClip;
public var cave:MovieClip;
private var axedFurry:Boolean;// = false
public static var roachDead:Boolean = false;
public function CaveInterior(){
liamScreen = 1;
sleepingHard = false;
axedFurry = false;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("CaveInteriorMusic");
if (roachDead){
roach.visible = false;
};
cave.pond.stop();
Character.liam.scaleX = (0.7 / 1.11);
Character.liam.scaleY = Character.liam.scaleX;
Character.reemus.scaleX = (Character.reemus.scaleX / 1.5);
Character.reemus.scaleY = Character.reemus.scaleX;
speechPoints["roach"] = new Point(609, 400);
speechPoints["liam_hang"] = new Point(677, 212);
TweenLite.delayedCall(0.1, delayedInit);
addEventListener(Event.ENTER_FRAME, monitorScrolling);
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
public function awaitLiamProgress():void{
Character.liam.spriteIn.addEventListener("liamProgress", onLiamProgress);
}
public function jellofyPond():void{
cave.pond.gotoAndPlay(2);
}
public function wakeFuzzyAxe():void{
fuzzy.gotoAndStop("wake");
dispatchEvent(new Event(Setting.HIDE_CATCHER));
TweenLite.delayedCall((5 + (20 * Math.random())), fuzzyRoar);
}
public function fuzzyRoar():void{
TweenLite.killDelayedCallsTo(fuzzyRoar);
if (fuzzy.currentLabel == "wake"){
fuzzy.spriteIn.gotoAndPlay(1);
TweenLite.delayedCall((5 + (20 * Math.random())), fuzzyRoar);
};
}
public function arriveMushroom():void{
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem == 0){
mushroom.visible = false;
mushrooms.gotoAndStop(2);
activeCharacter.goto("getMushroom");
activeCharacter.heldItem = 24;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
activeCharacter.say("I'VE ALREADY GOT MY HANDS FULL.");
};
} else {
activeCharacter.say("BEST TO STAY AWAY FROM THOSE, THEY INDUCE EXTREME DROWSINESS IF INGESTED.");
};
}
override public function handleCharacterSwitch():void{
if ((((Character.liam.currentLabel == "jumpJello")) || ((liamScreen > 1)))){
mouseChildren = (activeCharacter == Character.reemus);
if (activeCharacter == Character.reemus){
addEventListener(Event.ENTER_FRAME, monitorScrolling);
stalacClicks.gotoAndStop(1);
dispatchEvent(new Event(Setting.HIDE_CATCHER));
} else {
x = Math.min(0, Math.max(-680, (-80 * liamScreen)));
stalacClicks.x = x;
removeEventListener(Event.ENTER_FRAME, monitorScrolling);
stalacClicks.gotoAndStop(liamScreen);
};
};
}
public function arriveStalactite():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 0){
if (cave.pond.currentFrame == 1){
activeCharacter.goto("jumpWater");
activeCharacter.addFrameAction(107, leavePond);
activeCharacter.queueSpeech("HMM, THEY LOOK CLIMBABLE. IF ONLY I COULD REACH THEM.");
removeEventListener(Event.ENTER_FRAME, monitorScrolling);
TweenLite.to(this, 2, {x:-263, delay:1});
TweenLite.to(stalacClicks, 2, {x:-263, delay:1});
} else {
mouseChildren = false;
liamScreen = 2;
stalacClicks.gotoAndStop(2);
activeCharacter.goto("jumpJello");
activeCharacter.addFrameAction(2, awaitLiamProgress);
activeCharacter.addFrameAction(113, wakeFuzzyRocks);
activeCharacter.addFrameAction(173, reachEdge);
removeEventListener(Event.ENTER_FRAME, monitorScrolling);
TweenLite.to(this, 3.5, {x:-80, delay:2});
TweenLite.to(stalacClicks, 3.5, {x:-80, delay:2});
};
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
} else {
activeCharacter.say("I DON'T THINK I'M QUITE NIMBLE ENOUGH FOR THAT.");
};
}
public function wakeFuzzyRocks():void{
if (!sleepingHard){
fuzzy.gotoAndStop("wake");
TweenLite.delayedCall((5 + (20 * Math.random())), fuzzyRoar);
};
dispatchEvent(new Event(Setting.HIDE_CATCHER));
}
public function endBugDialogue():void{
roach.play();
}
public function clickRoach():void{
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem > 0){
dynamicLoc["roachReemus"] = new Point(215, 331);
} else {
dynamicLoc["roachReemus"] = undefined;
};
};
moveCharacterToLoc(activeCharacter, "roach");
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="142" y="315"/>
<point id="mushroom" x="213" y="474"/>
<point id="stalactite" x="142" y="313"/>
<point id="pondArea" x="639" y="390"/>
<point id="fuzzy" x="767" y="457"/>
<point id="vines" x="1231" y="445"/>
<point id="cabinet" x="700" y="387"/>
<point id="" x="176" y="369"/>
<point id="" x="326" y="459"/>
<point id="" x="605" y="491"/>
<point id="" x="822" y="514"/>
<point id="" x="1264" y="461"/>
</points>
<features>
<feature id="fuzzy" active="y" arriveFunction="arriveFuzzy"/>
<feature id="cabinet" active="y" arriveFunction="arriveCabinet" depthExclude="y"/>
<feature id="mushrooms" active="n"/>
<feature id="mushroom" active="y" depthExclude="y" arriveFunction="arriveMushroom"/>
<feature id="pondArea" active="y" depthExclude="y" arriveFunction="arrivePond"/>
<feature id="stalactite" active="y" depthExclude="y" clickFunction="clickStalactite" arriveFunction="arriveStalactite"/>
<feature id="vines" active="y" depthExclude="y" arriveFunction="arriveVines"/>
<feature id="stalagmites" active="n"/>
<feature id="foreground" active="n"/>
</features>
<dialogue>
<tree id="cavebug_intro">
<step origin="roach" text=" I JUST LIVE IN A HOLE OVER THERE. I’M SURE YOU GUYS CAN FIND YOUR OWN WAY OUT. LATER!"/>
<step origin="reemus" text="I CAN’T BELIEVE YOU CONVINCED ME TO GO THIS WAY."/>
</tree>
<tree id="cave_intro">
<step origin="reemus" text="I CAN’T BELIEVE YOU CONVINCED ME TO GO THIS WAY."/>
</tree>
</dialogue>
</setting>
;
}
private function onLiamProgress(_arg1:Event):void{
stalacClicks.visible = true;
dispatchEvent(new Event(Setting.HIDE_CATCHER));
}
public function dropVine():void{
liamScreen++;
stalacClicks.gotoAndStop(liamScreen);
vines.gotoAndPlay(2);
Character.liam.say("Okay Reemus, climb up!");
}
public function leavePond():void{
Character.liam.goto("waiting");
Character.liam.x = 613;
Character.liam.y = 395;
addEventListener(Event.ENTER_FRAME, monitorScrolling);
}
public function arriveVines():void{
if ((activeCharacter is Reemus)){
if (vines.currentFrame > 1){
if (activeCharacter.heldItem == 4){
activeCharacter.goto("dropAxe");
activeCharacter.heldItem = 0;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
};
dispatchEvent(new Event(Main.FADE_OUT));
TweenLite.delayedCall(1.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"BeachLeft"})]);
} else {
activeCharacter.say("IF THOSE VINES WERE IN REACH, I COULD CLIMB OUT OF HERE.");
};
} else {
activeCharacter.say("IF WE CAN GET UP THERE, WE CAN GET OUT.");
};
}
public function arrivePond():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 21){
activeCharacter.goto("throwGelatin");
activeCharacter.heldItem = 0;
activeCharacter.addFrameAction(26, jellofyPond);
activeCharacter.queueSprite({sprite:"bounce", frm:1, andPlay:true}, true);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("OOH BOUNCY! IT’S LIKE A STRAWBERRY TRAMPOLINE!");
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
} else {
if (cave.pond.currentFrame == 1){
activeCharacter.say("I’D RATHER NOT WALK AROUND IN WET PANTS.");
} else {
activeCharacter.say("MMMM, IF ONLY I HAD A SPOON.");
};
};
}
public function arriveFuzzy():void{
if ((activeCharacter is Reemus)){
if ((((activeCharacter.heldItem >= 2)) && ((activeCharacter.heldItem <= 4)))){
axedFurry = true;
if (activeCharacter.heldItem == 4){
activeCharacter.goto("bustAxe");
activeCharacter.queueSpeech("YOUR THICK SKIN RUINED A PERFECTLY GOOD AXE!");
} else {
if (activeCharacter.heldItem == 3){
activeCharacter.goto("breakGlueStick");
activeCharacter.queueSpeech("WELL THAT DIDN'T WORK.");
} else {
if (activeCharacter.heldItem == 2){
activeCharacter.goto("breakStick");
activeCharacter.queueSpeech("WELL THAT DIDN'T WORK.");
};
};
};
activeCharacter.heldItem = 0;
activeCharacter.addFrameAction(6, wakeFuzzyAxe);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if (activeCharacter.heldItem == 24){
if (fuzzy.currentLabel == "wake"){
fuzzy.gotoAndStop("eat");
sleepingHard = true;
activeCharacter.goto("throwMushroom");
activeCharacter.heldItem = 0;
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
activeCharacter.say("HE'S NOT AWAKE, AND I DON'T INTEND TO FORCE-FEED HIM.");
};
} else {
if (fuzzy.currentLabel == "sleep"){
activeCharacter.say("IT’S BEST TO LET SLEEPING FURRY BEASTS LIE.");
} else {
activeCharacter.say("I’LL JUST STAY HERE, I DON’T WANT TO LOSE AN ARM.");
};
};
};
} else {
activeCharacter.say("I DON’T WANT TO GO NEAR IT.");
};
}
public function arriveCabinet():void{
if (cabinet.currentFrame == 1){
cabinet.gotoAndStop(2);
} else {
if ((activeCharacter is Reemus)){
activeCharacter.say("OOOH POWDERED GELATIN! I DON’T CARE IF IT IS MADE FROM COW HOOVES, I LOVE IT!");
} else {
if ((activeCharacter is Liam)){
cabinet.mouseEnabled = false;
cabinet.mouseChildren = false;
activeCharacter.goto("getGelatin");
activeCharacter.heldItem = 21;
activeCharacter.queueSprite({sprite:"bounce", frm:1, andPlay:true}, true);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("IT’S FULL OF STRAWBERRY GELATIN!");
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
};
};
}
private function delayedInit():void{
Character.liam.x = (Character.liam.x + 17);
Character.liam.y = (Character.liam.y + 69);
refreshDepths(Character.liam.point);
if (roachDead){
processSpeechTree("cave_intro");
} else {
roach.addEventListener("roachStop", onRoachStop);
};
stalacClicks = new StalacClicks();
if (!Main.debugMode){
stalacClicks.alpha = 0;
};
stalacClicks.buttonMode = true;
stalacClicks.gotoAndStop(1);
stalacClicks.addEventListener(MouseEvent.CLICK, onClickStalac);
dispatchEvent(new InfoEvent(Setting.SPECIAL_OVERLAY, {overlay:stalacClicks}));
dispatchEvent(new Event(Setting.SHOW_CATCHER));
dispatchEvent(new Event(Setting.FORCE_SWITCH));
}
override protected function onAddedToStage(_arg1:Event):void{
Main(root).portrait.show(true);
}
private function onRoachStop(_arg1:Event):void{
roach.removeEventListener("roachStop", onRoachStop);
processSpeechTree("cavebug_intro", "endBugDialogue");
}
private function monitorScrolling(_arg1:Event):void{
if (activeCharacter){
x = Math.min(0, Math.max(-680, (350 - activeCharacter.x)));
if (stalacClicks){
stalacClicks.x = x;
};
};
}
public function clickStalactite():void{
var _local1:Object;
var _local2:SpeechEvent;
if ((activeCharacter is Liam)){
if (activeCharacter.currentLabel == "jumpJello"){
if ((((fuzzy.currentLabel == "wake")) && ((liamScreen == 6)))){
_local1 = {point:speechPoints["liam_hang"], altTip:true, color:6697881};
_local2 = new SpeechEvent("I’M NOT GOING ANY FURTHER, THAT THING WILL SWALLOW ME WHOLE!", _local1);
dispatchEvent(_local2);
} else {
TweenLite.to(this, 1, {x:Math.min(0, Math.max(-680, (liamScreen * -80)))});
TweenLite.to(stalacClicks, 1, {x:Math.min(0, Math.max(-680, (liamScreen * -80)))});
Character.liam.spriteIn.play();
stalacClicks.visible = false;
liamScreen++;
stalacClicks.gotoAndStop(liamScreen);
};
} else {
moveCharacterToLoc(activeCharacter, "stalactite");
};
} else {
moveCharacterToLoc(activeCharacter, "stalactite");
};
}
private function onClickStalac(_arg1:Event):void{
if (liamScreen < 10){
clickStalactite();
} else {
Character.liam.goto("dropVine");
Character.liam.addFrameAction(10, dropVine);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
}
public function reachEdge():void{
Character.liam.goto("waiting");
Character.liam.x = 1260;
Character.liam.y = 180;
}
override public function destroy():void{
super.destroy();
roachDead = false;
removeEventListener(Event.ENTER_FRAME, monitorScrolling);
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
roach.removeEventListener("roachStop", onRoachStop);
if (stalacClicks){
stalacClicks.removeEventListener(MouseEvent.CLICK, onClickStalac);
};
if (Character.liam.spriteIn){
Character.liam.spriteIn.removeEventListener("liamProgress", onLiamProgress);
};
TweenLite.killTweensOf(this, false);
TweenLite.killDelayedCallsTo(fuzzyRoar);
if (stalacClicks){
TweenLite.killTweensOf(stalacClicks, false);
};
}
}
}//package asfiles.setting
Section 24
//CliffLeft (asfiles.setting.CliffLeft)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
public class CliffLeft extends Setting {
public var flower:MovieClip;
public var bounds:MovieClip;
public var levelExit:MovieClip;
public var peri:MovieClip;
public var foreground:MovieClip;
public var flag:MovieClip;
public var keepOut:MovieClip;
public static var instance:CliffLeft;
public function CliffLeft(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
instance = this;
speechPoints["peri"] = new Point(100, 0xFF);
flag.play();
leftExitId = "Hypothetical";
rightExitId = "CliffMiddle";
}
public function removeFlag():void{
flag.visible = false;
}
override public function exitLeft():void{
if (bounds.leftExit.visible){
moveCharacterToLoc(activeCharacter, "levelExit");
} else {
moveCharacterToLoc(activeCharacter, "peri");
};
}
public function arrivePeri():void{
if ((activeCharacter is Reemus)){
if (peri.currentLabel != "war"){
processSpeechTree("peri_and_reemus", "beatReemus");
};
} else {
if (peri.currentLabel == "beat"){
activeCharacter.say("REEMUS SEEMS TO HAVE THIS ONE UNDER CONTROL. I'LL SEE WHAT I CAN DO ELSEWHERE.");
} else {
activeCharacter.say("I BETTER KEEP MY DISTANCE, HE LOOKS LIKE HE MEANS BUSINESS.");
};
};
}
public function addFlower():void{
flower.visible = true;
}
override public function handleCharacterSwitch():void{
if (Character.reemus.currentLabel == "beaten"){
mouseChildren = (activeCharacter is Liam);
dispatchEvent(new Event(Setting.HIDE_LEFT));
if ((activeCharacter is Reemus)){
dispatchEvent(new Event(Setting.HIDE_RIGHT));
} else {
dispatchEvent(new Event(Setting.SHOW_RIGHT));
};
} else {
mouseChildren = true;
dispatchEvent(new Event(Setting.SHOW_LEFT));
dispatchEvent(new Event(Setting.SHOW_RIGHT));
};
}
public function arriveExit():void{
Character.liam.heldItem = 0;
dispatchEvent(new Event(Main.FADE_OUT));
TweenLite.delayedCall(1.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"BurrowRight"})]);
}
public function arriveKeepOut():void{
if ((activeCharacter is Reemus)){
activeCharacter.say("PFFT, WHATEVER.");
} else {
activeCharacter.say("THESE GUYS TAKE THEIR TERRITORY VERY SERIOUSLY.");
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="leftEntry" x="0" y="0"/>
<point id="leftExit" x="0" y="0"/>
<point id="rightEntry" x="750" y="490"/>
<point id="rightExit" x="800" y="490"/>
<point id="peri" x="280" y="418"/>
<point id="keepOut" x="445" y="447"/>
<point id="flag" x="336" y="384"/>
<point id="levelExit" x="-91" y="440"/>
<point id="" x="203" y="450"/>
<point id="" x="356" y="443"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="peri" active="y" arriveFunction="arrivePeri"/>
<feature id="keepOut" active="y" depthExclude="y" arriveFunction="arriveKeepOut"/>
<feature id="flag" active="y" depthExclude="y" arriveFunction="arriveFlag"/>
<feature id="levelExit" active="n" depthExclude="y" arriveFunction="arriveExit"/>
</features>
<dialogue>
<tree id="perriwinkle_and_liam">
<step origin="liam" text="HMM, THAT MIGHT BE USEFUL."/>
<step origin="peri" text="TOUCH THAT FLAG AND YOU WILL PAY A HEAVY PRICE MY FRIEND!"/>
</tree>
<tree id="peri_and_reemus">
<step origin="reemus" text="EXCUSE ME, COMING THROUGH…"/>
<step origin="peri" text="CAN’T YOU READ THE SIGN! THIS IS PRIVATE PROPERTY!"/>
</tree>
</dialogue>
</setting>
;
}
public function arriveFlag():void{
if ((activeCharacter is Liam)){
if (peri.currentLabel != "beat"){
processSpeechTree("perriwinkle_and_liam");
} else {
if (activeCharacter.heldItem > 0){
activeCharacter.goto("dropFlower");
activeCharacter.heldItem = 0;
activeCharacter.addFrameAction(17, addFlower);
activeCharacter.addFrameAction(18, liamGrabFlag);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
liamGrabFlag();
};
};
} else {
activeCharacter.say("SWEET FLAG! IT WOULD MAKE A KILLER STENCIL ON MY EXTERMINATOR WAGON.");
};
}
override protected function handleSpecialSpeaker(_arg1:String):void{
if ((((_arg1 == "peri")) && (peri.spriteIn))){
peri.gotoAndStop("talk");
} else {
if (peri.currentLabel == "talk"){
peri.gotoAndStop("stamp");
};
};
}
public function beatReemus():void{
mouseChildren = false;
activeCharacter.goto("beaten");
peri.gotoAndStop("beat");
dispatchEvent(new Event(Setting.HIDE_LEFT));
dispatchEvent(new Event(Setting.HIDE_RIGHT));
}
public function liamGrabFlag():void{
activeCharacter.goto("grabFlag");
activeCharacter.heldItem = 4;
activeCharacter.addFrameAction(13, removeFlag);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
flower.visible = false;
if (Character.reemus.currentLabel == "beaten"){
mouseChildren = (activeCharacter is Liam);
dispatchEvent(new Event(Setting.HIDE_LEFT));
TweenLite.delayedCall(0.1, dispatchEvent, [new Event(Setting.HIDE_LEFT)]);
};
}
override protected function initialize():void{
super.initialize();
Character.liam.scaleX = 1;
Character.liam.scaleY = 1;
bounds.leftExit.visible = false;
}
override public function destroy():void{
super.destroy();
instance = null;
}
public static function startWar():void{
CliffMiddle.showTinkertok = false;
instance.peri.gotoAndStop("war");
instance.peri.mouseEnabled = false;
instance.peri.mouseChildren = false;
instance.bounds.leftExit.visible = true;
Character.reemus.goto("waiting");
Character.reemus.x = 380;
Character.reemus.y = 465;
}
}
}//package asfiles.setting
Section 25
//CliffMiddle (asfiles.setting.CliffMiddle)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import asfiles.char.*;
import asfiles.*;
public class CliffMiddle extends Setting {
public var descriptiveRock:MovieClip;
public var flower:MovieClip;
public var circleRock:MovieClip;
public var bounds:MovieClip;
public var field:MovieClip;
public var foreground:MovieClip;
public var crossRock:MovieClip;
public var tinkertok:MovieClip;
public static var showTinkertok:Boolean = false;
public function CliffMiddle(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
tinkertok.visible = false;
leftExitId = "CliffLeft";
rightExitId = "CliffRight";
}
public function arriveFlower():void{
if ((activeCharacter is Liam)){
if ((((flower.currentFrame == 1)) && ((activeCharacter.heldItem <= 0)))){
activeCharacter.goto("grabFlower");
activeCharacter.heldItem = 7;
activeCharacter.addFrameAction(8, removeFlower);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
activeCharacter.say("MY HANDS ARE FULL.");
};
} else {
activeCharacter.say("I DON’T’ WANT TO TOUCH IT, I’LL GET PAINT ALL OVER MY HANDS.");
};
}
public function clickField():void{
if ((activeCharacter is Reemus)){
activeCharacter.say("A FIELD OF PAINTED FLOWERS.");
} else {
activeCharacter.say("PAINTED TULIPS, NATURE’S PAINTBRUSH.");
};
activeCharacter.halt();
}
public function arriveDescriptiveRock():void{
if ((activeCharacter is Reemus)){
activeCharacter.say("IT’S SOME KIND OF BORING LEGAL DOCUMENT DEALING WITH A TRUCE. SOUNDS LIKE WAR IS IMMINENT.");
} else {
activeCharacter.say("IT’S A DECLARATION OF TRUCE BETWEEN TINKERTOK THE YELLOW AND PERRIWINKLE THE ORANGE. THERE’S A LIST OF AGREEMENTS DEALING WITH TRESPASSING AND GRAFFITI AMONG OTHER THINGS.");
};
}
public function arriveGraffiti():void{
if ((activeCharacter is Reemus)){
activeCharacter.say("IT’S NOT THE BEST GRAFFITI ART I’VE SEEN.");
} else {
activeCharacter.say("A STENCILED TERRITORY MARKER.");
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="rightEntry" x="700" y="457"/>
<point id="rightExit" x="790" y="457"/>
<point id="leftEntry" x="-30" y="438"/>
<point id="leftExit" x="-110" y="438"/>
<point id="flower" x="377" y="372"/>
<point id="circleRock" x="218" y="387"/>
<point id="crossRock" x="510" y="410"/>
<point id="descriptiveRock" x="382" y="382"/>
<point id="" x="482" y="420"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="tree" active="n"/>
<feature id="flower" active="y" depthExclude="y" arriveFunction="arriveFlower"/>
<feature id="circleRock" active="y" depthExclude="y" arriveFunction="arriveGraffiti"/>
<feature id="crossRock" active="y" depthExclude="y" arriveFunction="arriveGraffiti"/>
<feature id="descriptiveRock" active="y" depthExclude="y" arriveFunction="arriveDescriptiveRock"/>
<feature id="field" active="y" depthExclude="y" clickFunction="clickField"/>
</features>
</setting>
;
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
flower.gotoAndStop(1);
if (showTinkertok){
tinkertok.gotoAndPlay(1);
tinkertok.visible = true;
showTinkertok = false;
};
}
override protected function initialize():void{
super.initialize();
Character.liam.scaleX = 1;
Character.liam.scaleY = 1;
}
override public function destroy():void{
super.destroy();
showTinkertok = false;
}
public function removeFlower():void{
flower.gotoAndStop(2);
}
}
}//package asfiles.setting
Section 26
//CliffRight (asfiles.setting.CliffRight)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.features.*;
public class CliffRight extends Setting {
public var flower:MovieClip;
public var bounds:MovieClip;
public var hole:MovieClip;
public var bell:MovieClip;
public var foreground:MovieClip;
public var rock:MovieClip;
public var flag:MovieClip;
public var tree:MovieClip;
public var tinkertok:Tinkertok;
public function CliffRight(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("WarMusic");
speechPoints["tinkertok"] = new Point(581, 204);
speechPoints["tinkertokAlt"] = new Point(235, 0x0100);
TweenLite.delayedCall(0.1, delayedInit);
leftExitId = "CliffMiddle";
}
public function dropFlower():void{
activeCharacter.goto("dropFlower");
activeCharacter.addFrameAction(17, addFlower);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
}
public function drapeFlag():void{
flag.flag.gotoAndStop(1);
flag.flag.visible = true;
flag.splatter.gotoAndStop(1);
flag.splatter.visible = false;
flag.overSplatter.gotoAndStop(1);
flag.overSplatter.visible = false;
flag.circle.gotoAndStop(1);
flag.circle.visible = false;
}
public function tinkerTug():void{
tinkertok.gotoAndPlay(106);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
}
public function clickHole():void{
if ((activeCharacter is Liam)){
activeCharacter.say("SOUNDS LIKE HE’S ITCHING TO GO TO WAR.");
} else {
activeCharacter.say("WHAT A HOTHEAD! IT WOULDN’T TAKE MUCH TO SET HIM OFF.");
};
activeCharacter.halt();
}
public function addFlower():void{
flower.visible = true;
}
public function arriveBell():void{
Main.lockCatcher = true;
if ((activeCharacter is Reemus)){
bell.gotoAndPlay(2);
} else {
bell.gotoAndPlay(10);
};
activeCharacter.goto("ringBell");
activeCharacter.addFrameAction(19, alertTinkertok);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="338" y="437"/>
<point id="leftEntry" x="0" y="385"/>
<point id="leftExit" x="-70" y="385"/>
<point id="bell" x="368" y="430"/>
<point id="rock" x="199" y="420"/>
<point id="flag" x="201" y="426"/>
<point id="miniSquish" x="100" y="443"/>
<point id="" x="350" y="450"/>
<point id="" x="254" y="447"/>
<point id="" x="143" y="450"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="tree" active="n"/>
<feature id="bell" active="y" depthExclude="y" arriveFunction="arriveBell"/>
<feature id="rock" active="y" depthExclude="y" clickFunction="clickRock" arriveFunction="arriveRock"/>
<feature id="flag" active="y" depthExclude="y" arriveFunction="arriveFlag"/>
<feature id="hole" active="y" depthExclude="y" clickFunction="clickHole"/>
<feature id="tinkertok" active="n" depthExclude="y"/>
</features>
<dialogue>
<tree id="tinkertok_intro">
<step origin="tinkertok" text="WHAT? WHAT HAPPENED TO MY DINNER? PERRIWINKLE THIS IS THE LAST STRAW! IF I FIND OUT THIS WAS YOUR DOING, IT’LL BE WAR!"/>
<step origin="reemus" text="TOUCHY!"/>
</tree>
</dialogue>
</setting>
;
}
public function arriveRock():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 4){
activeCharacter.goto("tossFlag");
activeCharacter.heldItem = 0;
activeCharacter.addFrameAction(16, drapeFlag);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if (activeCharacter.heldItem == 7){
if (((flag.flag.visible) && ((flag.flag.currentFrame == 1)))){
flag.overSplatter.gotoAndPlay(1);
flag.overSplatter.alpha = 1;
flag.overSplatter.visible = true;
flag.circle.gotoAndPlay(1);
flag.circle.alpha = 1;
flag.circle.visible = true;
} else {
if (!flag.splatter.visible){
flag.splatter.gotoAndPlay(1);
flag.splatter.alpha = 1;
flag.splatter.visible = true;
};
};
activeCharacter.goto("paint");
activeCharacter.heldItem = 0;
activeCharacter.addFrameAction(60, dropFlower);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
};
};
}
public function clickRock():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 4){
dynamicLoc["rockLiam"] = new Point(119, 412);
} else {
dynamicLoc["rockLiam"] = undefined;
};
};
moveCharacterToLoc(activeCharacter, "rock");
}
public function arriveFlag():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 0){
flag.flag.gotoAndStop(1);
flag.flag.visible = false;
flag.mouseEnabled = false;
activeCharacter.goto("grabDroppedFlag");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.heldItem = 4;
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
};
}
public function startWar():void{
CliffMiddle.showTinkertok = true;
CliffLeft.startWar();
bell.mouseEnabled = false;
bell.mouseChildren = false;
tinkertok.play();
flag.mouseEnabled = false;
flag.mouseChildren = false;
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
flower.visible = false;
}
override protected function initialize():void{
super.initialize();
Character.liam.scaleX = 1;
Character.liam.scaleY = 1;
}
private function delayedInit():void{
Character.liam.scaleX = 0.9;
Character.liam.scaleY = Character.liam.scaleX;
Character.liam.x = (Character.liam.x + 80);
TweenLite.delayedCall(0.2, moveCharacter, [Character.reemus, new Point(240, 437)]);
TweenLite.delayedCall(0.1, moveCharacter, [Character.liam, new Point(340, 437)]);
flag.flag.visible = false;
flag.splatter.visible = false;
flag.splatter.alpha = 0;
flag.splatter.mouseEnabled = false;
flag.splatter.stop();
flag.overSplatter.visible = false;
flag.overSplatter.alpha = 0;
flag.overSplatter.mouseEnabled = false;
flag.overSplatter.stop();
flag.circle.visible = false;
flag.circle.alpha = 0;
flag.circle.mouseEnabled = false;
flag.circle.stop();
flag.mouseEnabled = false;
tinkertok.flagRef = flag;
tinkertok.setting = this;
dynamicLoc["bellLiam"] = new Point(400, 426);
refreshDepths(new Point(338, 437));
dispatchEvent(new Event(Main.FADE_IN));
dispatchEvent(new Event(Setting.HIDE_LEFT));
dispatchEvent(new Event(Setting.SHOW_CATCHER));
Main.lockCatcher = true;
TweenLite.delayedCall(2, alertTinkertok);
}
public function endTinkerDialogue():void{
tinkertok.gotoAndPlay(71);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
}
public function alertTinkertok():void{
tinkertok.gotoAndPlay(2);
tinkertok.visible = true;
setChildIndex(tinkertok, (numChildren - 1));
}
override public function destroy():void{
super.destroy();
TweenLite.killDelayedCallsTo(alertTinkertok);
}
}
}//package asfiles.setting
Section 27
//Feature (asfiles.setting.Feature)
package asfiles.setting {
import flash.display.*;
import flash.geom.*;
public class Feature extends MovieClip {
public var departFunction:String;
public var active:Boolean;// = true
public var clip:MovieClip;
private var leftEdge:Point;
public var clickFunction:String;
public var depthExclude:Boolean;// = false
public var virtualY:Number;
public var arriveFunction:String;
private var rightEdge:Point;
public function Feature(){
active = true;
depthExclude = false;
super();
virtualY = y;
}
public function setEdges(_arg1:String, _arg2:String, _arg3:String, _arg4:String):void{
leftEdge = new Point(Number(_arg1), Number(_arg2));
rightEdge = new Point(Number(_arg3), Number(_arg4));
}
public function calculateVirtualY(_arg1:Point):Number{
var _local2:Number;
if ((((leftEdge == null)) || ((rightEdge == null)))){
return (clip.y);
};
_local2 = ((rightEdge.y - leftEdge.y) / (rightEdge.x - leftEdge.x));
return (((_local2 * (_arg1.x - (clip.x + leftEdge.x))) + (clip.y + leftEdge.y)));
}
}
}//package asfiles.setting
Section 28
//ForestLeft (asfiles.setting.ForestLeft)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.features.*;
public class ForestLeft extends Setting {
public var carriage:Carriage;
private var skipDialogue:SkipDialogueOverlay;
private var firstVisit:Boolean;// = true
public var trees:MovieClip;
public var bounds:MovieClip;
private var iconSelect:IconSelect;
public var liamOutro:MovieClip;
public var roach:MovieClip;
public var burrow:MovieClip;
public var redTree:MovieClip;
public function ForestLeft(){
firstVisit = true;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("ForestMusic");
trees.bug.stop();
liamOutro.stop();
liamOutro.visible = false;
skipDialogue = new SkipDialogueOverlay();
skipDialogue.buttonMode = true;
skipDialogue.addEventListener(MouseEvent.CLICK, onClickSkip);
rightExitId = "ForestMiddle";
speechPoints["roach"] = new Point(156, 163);
}
private function onClickSkip(_arg1:Event):void{
Main.lockCatcher = false;
dispatchEvent(new Event(Setting.END_OF_DIALOGUE));
handleSpecialSpeaker("");
endBugDialogue();
endSpeechFunction = "";
}
public function arriveCarriage():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 6){
activeCharacter.heldItem = 0;
activeCharacter.goto("setDownMushroom");
activeCharacter.addFrameAction(18, dropMushroom);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if (activeCharacter.heldItem == 5){
activeCharacter.heldItem = 0;
activeCharacter.goto("tieBee");
activeCharacter.addFrameAction(31, addNextBee);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.scaleX = -(Math.abs(activeCharacter.scaleX));
dispatchEvent(new Event(Setting.SHOW_CATCHER));
} else {
if (carriage.allReady()){
if (redTree.currentFrame > 3){
activeCharacter.say("I THINK IT'S A LITTLE LATE FOR HEROICS NOW.");
} else {
dispatchEvent(new Event(Setting.HIDE_RIGHT));
dispatchEvent(new Event(Main.HIDE_PORTRAIT));
activeCharacter.visible = false;
activeCharacter.x = (activeCharacter.x - 65);
carriage.gotoAndStop(1);
carriage.liam.gotoAndPlay(1);
carriage.liam.visible = true;
activeCharacter.say("UP, UP AND AWAY!");
endSpeechFunction = "doLiamOutro";
};
} else {
if (carriage.hasAllBees()){
activeCharacter.say("A BEE POWERED CHARIOT! NOW IT JUST NEEDS A SEAT...");
} else {
if (carriage.seat.visible){
activeCharacter.say("hmm, now this has potential...");
} else {
activeCharacter.say("HMM, THIS COULD BE USEFUL");
};
};
};
};
};
} else {
activeCharacter.say("I'M NOT TOUCHING THAT THING, IT'S COVERED IN THORNS...");
};
}
public function dropMushroom():void{
carriage.seat.visible = true;
if (carriage.allReady()){
carriage.gotoAndStop(2);
};
}
public function endBugDialogue():void{
iconSelect = new IconSelect();
iconSelect.x = (stage.stageWidth / 2);
iconSelect.y = (stage.stageHeight / 2);
iconSelect.addEventListener(IconSelect.HIDE_ICON_SELECT, onHideIconSelect);
iconSelect.addEventListener(IconSelect.SELECT_LIAM, onSelectLiam);
iconSelect.addEventListener(IconSelect.SELECT_REEMUS, onSelectReemus);
addChild(iconSelect);
skipDialogue.visible = false;
speechIndex = 0;
speechTree = null;
}
public function arriveRoach():void{
if ((activeCharacter is Liam)){
activeCharacter.say("HOLD TIGHT, I'LL FIND A WAY TO SAVE YOU!");
} else {
activeCharacter.say("i hate POLITICAN ROACHEs. ONE INFESTATION AND they take FOUR YEARS to get rid of.");
};
}
public function finalizeLiamOutro():void{
dispatchEvent(new Event(Main.FADE_OUT));
TweenLite.delayedCall(1.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"CaveDoor"})]);
}
public function addNextBee():void{
carriage.addNextBee();
if (carriage.allReady()){
carriage.gotoAndStop(2);
};
}
public function arriveBurrow():void{
if ((activeCharacter is Liam)){
activeCharacter.say("I'D RATHER NOT FIND OUT WHAT LIVES IN THERE...");
} else {
activeCharacter.say("i'm sure whatever lives in there won't mind me toppling a tree ONTO THEIR DINNER...");
};
}
private function onSelectLiam(_arg1:Event):void{
activeCharacter = Character.liam;
}
public function doLiamOutro():void{
carriage.visible = false;
addChild(liamOutro);
trees.bug.visible = false;
liamOutro.visible = true;
liamOutro.gotoAndPlay(2);
liamOutro.addEventListener("roachSendoff", onRoachSendoff);
Character.liam.halt();
Main.lockCatcher = true;
mouseChildren = false;
mouseEnabled = false;
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="632" y="498"/>
<point id="rightEntry" x="710" y="465"/>
<point id="rightExit" x="730" y="475"/>
<point id="redTree" x="617" y="467"/>
<point id="carriage" x="493" y="510"/>
<point id="trees" x="422" y="509"/>
<point id="roach" x="422" y="509"/>
<point id="burrow" x="422" y="509"/>
<point id="" x="455" y="522"/>
<point id="" x="603" y="527"/>
<point id="" x="644" y="481"/>
<point id="" x="595" y="413"/>
</points>
<features>
<feature id="redTree" active="y" clickFunction="clickRedTree" arriveFunction="arriveRedTree" depX1="0" depY1="320" depX2="150" depY2="286"/>
<feature id="trees" active="n" arriveFunction="arriveTrees" depX1="0" depY1="139" depX2="150" depY2="90"/>
<feature id="carriage" active="y" clickFunction="clickCarriage" arriveFunction="arriveCarriage" depX1="-20" depY1="4" depX2="20" depY2="4"/>
<feature id="roach" active="y" arriveFunction="arriveRoach"/>
<feature id="burrow" active="y" arriveFunction="arriveBurrow"/>
</features>
<dialogue>
<tree id="bug_intro">
<step origin="reemus" text="watch your step liam, there's a big drop off right here..."/>
<step origin="liam" text="yikes! how are we going to get across that?"/>
<step origin="roach" text="hey! you guys need to get out of the forest? i know a secret way out. "/>
<step origin="liam" text="really?"/>
<step origin="roach" text="sure thing! just get me down from here and i'll show you! "/>
<step origin="liam" text="HOW'D YOU GET UP THERE?"/>
<step origin="roach" text="LET'S JUST SAY ROACH LEGS ARE ON THE MENU TONIGHT..."/>
<step origin="liam" text="OH! reemus, we've got to help him..."/>
<step origin="reemus" text="pffft! are you kidding? that's a politician roach, they'll say anything to get what they want!"/>
<step origin="roach" text="read my mandibles, I CAN HELP YOU!"/>
<step origin="liam" text="he seems trustworthy to me..."/>
<step origin="roach" text="thank you kindly."/>
<step origin="reemus" text="LIAM, YOU'RE S0 GULLIBLE. let's just knock this tree down and walk out of here."/>
<step origin="liam" text="but the tree will crush him..."/>
<step origin="reemus" text="yes, and your point is..."/>
<step origin="liam" text="ugh! i'm going to find a way to help him..."/>
<step origin="reemus" text="fine, i'm going to find something heavy to swing..."/>
</tree>
</dialogue>
</setting>
;
}
private function onRoachSendoff(_arg1:Event):void{
var _local2:SpeechEvent;
_local2 = new SpeechEvent("well a deal's a deal! let's go...", {point:new Point(364, 167)});
endSpeechFunction = "finalizeLiamOutro";
dispatchEvent(_local2);
}
public function clickRedTree():void{
if ((((((activeCharacter is Reemus)) && ((activeCharacter.heldItem == 4)))) && ((redTree.currentFrame <= 3)))){
dynamicLoc["redTreeReemus"] = new Point(640, 400);
} else {
dynamicLoc["redTreeReemus"] = undefined;
};
moveCharacterToLoc(activeCharacter, "redTree");
}
public function arriveRedTree():void{
if (redTree.currentFrame > 3){
Character.liam.heldItem = 0;
Character.reemus.goto("dropAxe");
Character.reemus.heldItem = 0;
Main.lockCatcher = true;
TweenLite.delayedCall(1, dispatchEvent, [new Event(Main.FADE_OUT)]);
TweenLite.delayedCall(2.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"CliffRight"})]);
} else {
if ((activeCharacter is Reemus)){
if ((((activeCharacter.heldItem == 2)) || ((activeCharacter.heldItem == 3)))){
if (getChildIndex(activeCharacter) < getChildIndex(redTree)){
setChildIndex(activeCharacter, getChildIndex(redTree));
};
if (redTree.currentFrame <= 3){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
if (activeCharacter.heldItem == 2){
activeCharacter.goto("stickSwing");
} else {
if (activeCharacter.heldItem == 3){
activeCharacter.goto("swingAxeGlue");
};
};
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("HMM, I NEED TO MAKE MORE OF AN IMPACT...");
};
} else {
if (activeCharacter.heldItem == 4){
if (getChildIndex(activeCharacter) < getChildIndex(redTree)){
setChildIndex(activeCharacter, getChildIndex(redTree));
};
if (redTree.currentFrame <= 3){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
activeCharacter.goto("axeSwing");
activeCharacter.addFrameAction(5, chopTree);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
};
} else {
activeCharacter.say("what a magnificient tree... it'll make an even better bridge...");
};
};
} else {
if ((activeCharacter is Liam)){
activeCharacter.say("IT WOULD BE SUCH A SHAME TO KNOCK THIS ANCIENT BEAUTY DOWN...");
};
};
};
}
override protected function handleSpecialSpeaker(_arg1:String):void{
if (_arg1 == "roach"){
trees.bug.gotoAndStop(2);
} else {
trees.bug.gotoAndStop(1);
};
}
private function onHideIconSelect(_arg1:Event):void{
removeChild(iconSelect);
iconSelect.removeEventListener(IconSelect.HIDE_ICON_SELECT, onHideIconSelect);
iconSelect.removeEventListener(IconSelect.SELECT_LIAM, onSelectLiam);
iconSelect.removeEventListener(IconSelect.SELECT_REEMUS, onSelectReemus);
iconSelect = null;
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
dispatchEvent(new Event(Setting.SHOW_RIGHT));
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
if (firstVisit){
if ((_arg1 is Liam)){
_arg1.x = (_arg1.x - 140);
_arg1.y = (_arg1.y + 20);
};
if (bothCharacters){
TweenLite.delayedCall(0.1, initiateFirstVisit);
};
};
}
private function onSelectReemus(_arg1:Event):void{
activeCharacter = Character.reemus;
}
public function clickCarriage():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 5){
dynamicLoc["carriageLiam"] = carriage.getNextBeePoint();
} else {
dynamicLoc["carriageLiam"] = undefined;
};
};
moveCharacterToLoc(activeCharacter, "carriage");
}
private function onBranchCollision(_arg1:Event):void{
trees.gotoAndStop(2);
trees.removeEventListener(Main.FRAME_ACTION_PRIMARY, onBranchCollision);
}
public function chopTree():void{
if (redTree.currentFrame < 3){
redTree.nextFrame();
} else {
if (redTree.currentFrame == 3){
redTree.addEventListener(Main.FRAME_ACTION_PRIMARY, onBranchCollision);
redTree.play();
activeCharacter.say("TIMBER!");
};
};
}
private function initiateFirstVisit():void{
activeCharacter.x = 670;
activeCharacter.y = 500;
inactiveCharacter.x = 730;
inactiveCharacter.y = 530;
dispatchEvent(new Event(Setting.HIDE_RIGHT));
TweenLite.delayedCall(0.2, moveCharacter, [activeCharacter.otherCharacter, new Point(500, 530)]);
TweenLite.delayedCall(0.1, moveCharacterToLoc, [activeCharacter, "trees"]);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
Main.lockCatcher = true;
}
override public function destroy():void{
super.destroy();
redTree.removeEventListener(Main.FRAME_ACTION_PRIMARY, onBranchCollision);
skipDialogue.removeEventListener(MouseEvent.CLICK, onClickSkip);
}
public function arriveTrees():void{
if (firstVisit){
firstVisit = false;
processSpeechTree("bug_intro");
endSpeechFunction = "endBugDialogue";
dispatchEvent(new InfoEvent(Setting.SPECIAL_OVERLAY, {overlay:skipDialogue}));
} else {
if ((activeCharacter is Liam)){
activeCharacter.say("HOLD TIGHT, I'LL FIND A WAY TO SAVE YOU!");
};
};
}
}
}//package asfiles.setting
Section 29
//ForestMiddle (asfiles.setting.ForestMiddle)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import asfiles.char.*;
import asfiles.*;
public class ForestMiddle extends Setting {
public var axeHead:MovieClip;
public var mushroom:MovieClip;
public var stick:MovieClip;
public var bounds:MovieClip;
public var foreground:MovieClip;
public function ForestMiddle(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
leftExitId = "ForestLeft";
rightExitId = "ForestRight";
}
public function arriveMushroom():void{
if ((activeCharacter is Liam)){
if ((((activeCharacter.heldItem <= 0)) && (mushroom.cap.visible))){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
mushroom.mouseChildren = false;
mushroom.mouseEnabled = false;
mushroom.cap.visible = false;
activeCharacter.heldItem = 6;
activeCharacter.goto("pickUpMushroom");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("SO SOFT AND PLUSH...");
};
} else {
activeCharacter.say("EW GROSS!");
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="632" y="498"/>
<point id="leftEntry" x="0" y="416"/>
<point id="leftExit" x="-30" y="416"/>
<point id="rightEntry" x="700" y="450"/>
<point id="rightExit" x="730" y="450"/>
<point id="stick" x="236" y="358"/>
<point id="mushroom" x="475" y="357"/>
<point id="axeHead" x="460" y="390"/>
<point id="" x="129" y="383"/>
<point id="" x="335" y="383"/>
<point id="" x="448" y="386"/>
<point id="" x="610" y="424"/>
</points>
<features>
<feature id="stick" active="y" arriveFunction="arriveStick" depthExclude="y"/>
<feature id="mushroom" active="y" arriveFunction="arriveMushroom" depthExclude="y"/>
<feature id="axeHead" active="y" arriveFunction="arriveAxeHead" depthExclude="y"/>
<feature id="foreground" active="n" depX1="-9" depY1="150" depX2="9" depY2="150"/>
</features>
</setting>
;
}
public function arriveAxeHead():void{
if ((activeCharacter is Reemus)){
if (activeCharacter.heldItem == 3){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
axeHead.visible = false;
activeCharacter.heldItem = 4;
activeCharacter.goto("pickUpAxe");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("NOW THAT'S AN AXE!!");
} else {
activeCharacter.say("I better not touch it with my hands, the edges are razor sharp.");
};
} else {
activeCharacter.say("EVEN IF I COULD LIFT THAT, IT'D CUT MY HANDS CLEAN OFF...");
};
}
public function arriveStick():void{
if ((activeCharacter is Reemus)){
if (stick.currentFrame == 1){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
activeCharacter.heldItem = 2;
activeCharacter.goto("pullStick");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("now that's a sturdy piece of wood!");
stick.visible = false;
};
} else {
activeCharacter.say("I'M NOT STRONG ENOUGH TO PULL it OUT...");
};
}
}
}//package asfiles.setting
Section 30
//ForestRight (asfiles.setting.ForestRight)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.features.*;
public class ForestRight extends Setting {
public var bees:MovieClip;
public var miniSquish:MovieClip;
public var bounds:MovieClip;
public var squishHole:MovieClip;
public var foreground:MovieClip;
public var nestHitArea:MovieClip;
public var smoke:MovieClip;
public function ForestRight(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
leftExitId = "ForestMiddle";
}
public function takeBee():void{
Bee.removeGrabbed();
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="leftEntry" x="0" y="400"/>
<point id="leftExit" x="-30" y="416"/>
<point id="squishHole" x="90" y="315"/>
<point id="nestHitArea" x="391" y="408"/>
<point id="miniSquish" x="100" y="443"/>
<point id="" x="200" y="435"/>
<point id="" x="191" y="349"/>
<point id="" x="314" y="369"/>
<point id="" x="400" y="400"/>
</points>
<features>
<feature id="foreground" active="n" depX1="-9" depY1="0" depX2="9" depY2="0"/>
<feature id="squishHole" active="y" depthExclude="y"/>
<feature id="miniSquish" active="n" depthExclude="y"/>
<feature id="smoke" active="n" depthExclude="y"/>
<feature id="nestHitArea" active="y" depthExclude="y" clickFunction="clickBees" arriveFunction="arriveBees"/>
<feature id="bees" active="n" depthExclude="y"/>
</features>
</setting>
;
}
override protected function onCharacterMoving(_arg1:Event):void{
var _local2:Character;
var _local3:Boolean;
var _local4:Boolean;
_local2 = Character(_arg1.currentTarget);
_local3 = (((((Math.abs((_local2.x - squishHole.x)) < 80)) && ((Math.abs((_local2.y - squishHole.y)) < 40)))) || ((((((_local2.setting == _local2.otherCharacter.setting)) && ((Math.abs((_local2.otherCharacter.x - squishHole.x)) < 80)))) && ((Math.abs((_local2.otherCharacter.y - squishHole.y)) < 40)))));
_local4 = (((((Math.abs((_local2.x - miniSquish.x)) < 30)) && ((Math.abs((_local2.y - miniSquish.y)) < 20)))) || ((((((_local2.setting == _local2.otherCharacter.setting)) && ((Math.abs((_local2.otherCharacter.x - miniSquish.x)) < 30)))) && ((Math.abs((_local2.otherCharacter.y - miniSquish.y)) < 20)))));
if (_local3){
squishHole.gotoAndStop(3);
smoke.gotoAndStop(2);
Bee.relaxAllBees(true);
} else {
if (squishHole.currentFrame == 3){
squishHole.gotoAndStop(4);
smoke.gotoAndStop(3);
Bee.relaxAllBees(false);
};
};
if (_local4){
if (!_local3){
squishHole.gotoAndStop(2);
};
miniSquish.gotoAndStop(3);
} else {
if (((!((miniSquish.currentFrame == 1))) && (!((miniSquish.currentFrame == 4))))){
miniSquish.gotoAndStop(4);
};
if (squishHole.currentFrame == 2){
squishHole.gotoAndStop(5);
};
};
if (bees.currentFrame == 2){
bees.spriteIn.play();
};
super.onCharacterMoving(_arg1);
}
public function arriveBees():void{
activeCharacter.scaleX = Math.abs(activeCharacter.scaleX);
if ((activeCharacter is Reemus)){
if (smoke.currentFrame == 1){
bees.gotoAndStop(2);
activeCharacter.say("a glue nest! I CAN SMELL IT FROM HERE...");
} else {
if (activeCharacter.heldItem == 2){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
activeCharacter.heldItem = 3;
activeCharacter.goto("getGlue");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.queueSpeech("i gotta watch what I touch with this thing, bee glue will bond to anything..");
};
};
} else {
if (smoke.currentFrame == 1){
if (smoke.currentFrame == 1){
bees.gotoAndStop(2);
};
activeCharacter.say("I BETTER NOT GET TOO CLOSE, THOSE BEES LOOK MEAN...");
} else {
if (((!((dynamicLoc["nestHitAreaLiam"] == undefined))) && ((activeCharacter.heldItem <= 0)))){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
activeCharacter.heldItem = 5;
activeCharacter.goto("grabBee");
activeCharacter.addFrameAction(12, takeBee);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
} else {
if (activeCharacter.heldItem > 0){
activeCharacter.say("MY HANDS ARE FULL.");
} else {
if (activeCharacter.heldItem <= 0){
activeCharacter.say("I THINK THAT'S ENOUGH BEES.");
};
};
};
};
};
}
public function clickBees():void{
var _local1:MovieClip;
if ((((activeCharacter is Liam)) && (Bee.docile))){
_local1 = Bee.nextGrabbable();
if (_local1 != null){
dynamicLoc["nestHitAreaLiam"] = Bee.nextPoint();
} else {
dynamicLoc["nestHitAreaLiam"] = undefined;
};
};
moveCharacterToLoc(activeCharacter, "nestHitArea");
}
override public function destroy():void{
super.destroy();
Bee.reset();
}
}
}//package asfiles.setting
Section 31
//LevelSelect (asfiles.setting.LevelSelect)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import com.newgrounds.*;
import flash.net.*;
import asfiles.char.*;
import asfiles.*;
public class LevelSelect extends MovieClip {
private var destinations:Array;
public var locked1:MovieClip;
public var locked2:MovieClip;
public var liam:MovieClip;
public var locked4:MovieClip;
public var locked5:MovieClip;
public var locked7:MovieClip;
public var locked8:MovieClip;
public var locked9:MovieClip;
public var locked3:MovieClip;
public var locked6:MovieClip;
public var continueButton:MovieClip;
public var ranking1:MovieClip;
public var ranking2:MovieClip;
public var button1:MovieClip;
public var button4:MovieClip;
public var button5:MovieClip;
public var button6:MovieClip;
public var button7:MovieClip;
public var button9:MovieClip;
public var button3:MovieClip;
public var button8:MovieClip;
public var button2:MovieClip;
private var buttons:Array;
public var smash1:MovieClip;
public var smash2:MovieClip;
public var smash3:MovieClip;
public var smash4:MovieClip;
public var smash5:MovieClip;
public var smash6:MovieClip;
public var smash7:MovieClip;
public var smash8:MovieClip;
public var smash9:MovieClip;
public var reemus:MovieClip;
private static const NUM_BUTTONS:int = 9;
public static const MAKE_SELECTION:String = "makeSelection";
public static var saveFile:SharedObject;
public static var currentPath:int = 0;
public function LevelSelect(){
var _local1:int;
super();
if (Character.liam){
Character.liam.heldItem = 0;
Character.reemus.heldItem = 0;
};
buttons = new Array();
destinations = ["VisitorLeft", "ForestLeft", "CliffRight", "CaveDoor", "BurrowRight", "CaveInterior", "Spire", "TempleLeft", "BeachLeft"];
_local1 = 1;
while (_local1 <= NUM_BUTTONS) {
buttons.push(getChildByName(("button" + _local1)));
MovieClip(getChildByName(("button" + _local1))).gotoAndStop(1);
MovieClip(getChildByName(("locked" + _local1))).mouseEnabled = false;
MovieClip(getChildByName(("locked" + _local1))).mouseChildren = false;
MovieClip(getChildByName(("locked" + _local1))).gotoAndStop(1);
MovieClip(getChildByName(("locked" + _local1))).visible = false;
MovieClip(getChildByName(("smash" + _local1))).gotoAndStop(1);
MovieClip(getChildByName(("smash" + _local1))).visible = false;
MovieClip(getChildByName(("smash" + _local1))).mouseEnabled = false;
MovieClip(getChildByName(("smash" + _local1))).mouseChildren = false;
_local1++;
};
continueButton.buttonMode = true;
continueButton.addEventListener(MouseEvent.CLICK, onClickContinue);
checkCompletion();
}
private function activateList(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
activateNode(_arg1[_local2]);
_local2++;
};
}
private function showRanking():void{
if (root){
if (currentPath == 1){
ranking1.gotoAndPlay(1);
ranking1.visible = true;
if ((((MovieClip(root).medal_popup.currentFrame == 1)) || ((MovieClip(root).medal_popup.currentFrame == MovieClip(root).medal_popup.totalFrames)))){
if (NewgroundsAPI.hasUserSession()){
MovieClip(root).medal_popup.unlockMedal("PATH OF AGGRESSION");
};
};
if (Main.kongregate){
Main.kongregate.stats.submit("ReemusEnding", 1);
};
} else {
if (currentPath == 2){
ranking2.gotoAndPlay(1);
ranking2.visible = true;
if ((((MovieClip(root).medal_popup.currentFrame == 1)) || ((MovieClip(root).medal_popup.currentFrame == MovieClip(root).medal_popup.totalFrames)))){
if (NewgroundsAPI.hasUserSession()){
MovieClip(root).medal_popup.unlockMedal("PATH OF LEAST RESISTANCE");
};
};
if (Main.kongregate){
Main.kongregate.stats.submit("LiamEnding", 1);
};
};
};
};
}
private function checkAvailability():void{
unlockActivated();
if (((saveFile.data.path1New) && (saveFile.data.path1))){
saveFile.data.path1New = false;
};
if (((saveFile.data.path2New) && (saveFile.data.path2))){
saveFile.data.path2New = false;
};
saveFile.flush();
}
private function smashList(_arg1:Array, _arg2:Number=0):void{
var _local3:int;
activateList(_arg1);
_local3 = 0;
while (_local3 < _arg1.length) {
TweenLite.delayedCall(((0.2 * _local3) + _arg2), smashNode, [_arg1[_local3]]);
_local3++;
};
}
private function onClickNode(_arg1:Event):void{
Main(root).gotoAndStop(9);
TweenLite.delayedCall(0.1, Main(root).selectLevel, [destinations[buttons.indexOf(_arg1.currentTarget)]]);
}
private function onClickContinue(_arg1:Event):void{
continueButton.visible = false;
TweenLite.to(liam, 0.5, {x:"900"});
TweenLite.to(reemus, 0.5, {x:"-100"});
TweenLite.to(this, 0.5, {x:"-225", onComplete:checkAvailability});
TweenLite.to(MovieClip(parent).credits, 0.5, {y:-237});
}
private function unlockActivated():void{
var _local1:int;
_local1 = 0;
while (_local1 < buttons.length) {
if (buttons[_local1].currentFrame == 2){
unlockNode((_local1 + 1));
} else {
MovieClip(getChildByName(("locked" + (_local1 + 1)))).visible = true;
};
_local1++;
};
}
private function checkCompletion():void{
saveFile = SharedObject.getLocal("reemusData");
if (currentPath == 1){
saveFile.data.path1 = true;
} else {
if (currentPath == 2){
saveFile.data.path2 = true;
};
};
if (((((saveFile.data.path1New) && (!(saveFile.data.path2)))) || (((saveFile.data.path2New) && (!(saveFile.data.path1)))))){
smashList([1, 2]);
} else {
activateList([1, 2]);
};
if (saveFile.data.path1){
if (saveFile.data.path1New){
smashList([3, 5, 7, 8], 0.4);
} else {
activateList([3, 5, 7, 8]);
};
};
if (saveFile.data.path2){
if (saveFile.data.path2New){
smashList([4, 6, 9], 0.4);
} else {
activateList([4, 6, 9]);
};
};
if (currentPath == 1){
liam.stop();
} else {
if (currentPath == 2){
reemus.stop();
} else {
liam.visible = false;
liam.stop();
reemus.visible = false;
reemus.stop();
};
};
ranking2.visible = false;
ranking1.visible = false;
TweenLite.killDelayedCallsTo(showRanking);
TweenLite.delayedCall(1, showRanking);
saveFile.flush();
}
private function unlockNode(_arg1:int):void{
MovieClip(getChildByName(("locked" + _arg1))).gotoAndStop(3);
MovieClip(getChildByName(("locked" + _arg1))).visible = true;
MovieClip(getChildByName(("button" + _arg1))).mouseEnabled = true;
MovieClip(getChildByName(("button" + _arg1))).buttonMode = true;
MovieClip(getChildByName(("button" + _arg1))).addEventListener(MouseEvent.CLICK, onClickNode);
}
private function activateNode(_arg1:int):void{
MovieClip(getChildByName(("button" + _arg1))).gotoAndStop(2);
}
private function smashNode(_arg1:int):void{
MovieClip(getChildByName(("smash" + _arg1))).visible = true;
MovieClip(getChildByName(("smash" + _arg1))).gotoAndPlay(1);
}
public static function get returnVisitor():Boolean{
saveFile = SharedObject.getLocal("reemusData");
return (((saveFile.data.path1) || (saveFile.data.path2)));
}
public static function initSaveFile():void{
saveFile = SharedObject.getLocal("reemusData");
if (saveFile.data.path1 == undefined){
saveFile.data.path1 = false;
saveFile.data.path2 = false;
saveFile.data.path1New = true;
saveFile.data.path2New = true;
saveFile.flush();
};
}
}
}//package asfiles.setting
Section 32
//Setting (asfiles.setting.Setting)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import asfiles.char.*;
import asfiles.*;
public class Setting extends MovieClip {
protected var rightExitId:String;// = ""
protected var network:Array;
protected var features:Array;
protected var featureIndeces:Array;
protected var speechPoints:Array;
protected var dynamicLoc:Array;
public var endSpeechFunction:String;// = ""
protected var info:XML;
protected var nodes:Array;
public var activeCharacter:Character;
protected var bothCharacters:Boolean;// = false
protected var debugColor:uint;// = 0xFF
protected var plainNodes:Array;
protected var speechIndex:int;// = 0
protected var debugSprite:Sprite;
public var id:String;
protected var currentPath:Array;
protected var speechTree:XML;
protected var leftExitId:String;// = ""
protected static const INF:Number = 9999;
public static const SHOW_CATCHER:String = "showCatcher";
public static const SHOW_LEFT:String = "showLeft";
public static const SPECIAL_OVERLAY:String = "specialOverlay";
public static const HIDE_CATCHER:String = "hideCatcher";
public static const SWITCH_VIEW:String = "switchView";
public static const COMPLETE_AREA:String = "completeArea";
public static const TRAVEL:String = "travel";
public static const RETURN_VIEW:String = "returnView";
protected static const STEP_SIZE:Number = 10;
public static const HIDE_LEFT:String = "hideLeft";
public static const FORCE_SWITCH:String = "forceSwitch";
public static const HIDE_OVERLAY:String = "hideOverlay";
public static const SHOW_RIGHT:String = "showRight";
public static const END_OF_DIALOGUE:String = "endOfDialogue";
public static const HIDE_RIGHT:String = "hideRight";
public static var dummyRef:Object;
public static var musicMuted:Boolean = false;
protected static var music:SoundChannel;
protected static var musicId:String;
public function Setting(){
endSpeechFunction = "";
speechIndex = 0;
debugColor = 0xFF;
bothCharacters = false;
leftExitId = "";
rightExitId = "";
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
initData();
initialize();
buildFeatureList();
buildNodeList();
TweenLite.delayedCall(0.1, buildNodeNetwork);
}
protected function byClosest(_arg1:Object, _arg2:Object):int{
if (!(((_arg1.total > 0)) || ((_arg2.total > 0)))){
return (-1);
};
if (_arg1.total > _arg2.total){
return (1);
};
return (-1);
}
protected function getValidNodes(_arg1:Array):Array{
var _local2:Array;
var _local3:int;
_local2 = new Array();
_local3 = 0;
while (_local3 < nodes.length) {
if (((((!(identicalPoints(_arg1[(_arg1.length - 1)], nodes[_local3]))) && (!(inPath(_arg1, nodes[_local3]))))) && (unobstructed(_arg1[(_arg1.length - 1)], nodes[_local3])))){
_local2.push(nodes[_local3]);
};
_local3++;
};
return (_local2);
}
protected function byVirtualY(_arg1:DisplayObject, _arg2:DisplayObject):int{
var _local3:Number;
var _local4:Number;
if ((((_arg1 == null)) || ((_arg2 == null)))){
return (0);
};
_local3 = ((_arg1 is Feature)) ? Feature(_arg1).virtualY : _arg1.y;
_local4 = ((_arg2 is Feature)) ? Feature(_arg2).virtualY : _arg2.y;
if (_local3 > _local4){
return (1);
};
if (_local3 < _local4){
return (-1);
};
return (0);
}
protected function bestPath(_arg1:Number, _arg2:Array, _arg3:Point):Object{
var _local4:Number;
var _local5:Array;
var _local6:Array;
var _local7:Array;
var _local8:int;
var _local9:int;
var _local10:int;
_local6 = new Array();
_local7 = new Array();
_local8 = indexOfPoint(_arg2[(_arg2.length - 1)], plainNodes);
if (unobstructed(_arg2[(_arg2.length - 1)], _arg3)){
_arg2.push(_arg3);
return ({path:_arg2, total:(_arg1 + pointDistance(_arg2[(_arg2.length - 2)], _arg3))});
};
_local9 = 0;
while (_local9 < plainNodes.length) {
if (((!((_local9 == _local8))) && ((indexOfPoint(plainNodes[_local9], _arg2) < 0)))){
if (_local8 < 0){
_local4 = pointDistance(_arg2[(_arg2.length - 1)], plainNodes[_local9]);
if ((((_local4 < INF)) && (unobstructed(_arg2[(_arg2.length - 1)], plainNodes[_local9])))){
_local6.push({ind:_local9, dist:_local4});
};
} else {
if (network[_local8][_local9] < INF){
_local6.push({ind:_local9, dist:network[_local8][_local9]});
};
};
};
_local9++;
};
if (_local6.length <= 0){
return ({path:_arg2, total:INF});
};
_local10 = 0;
while (_local10 < _local6.length) {
_local5 = _arg2.slice(0, _arg2.length);
_local5.push(plainNodes[_local6[_local10].ind]);
_local4 = pointDistance(_local5[(_local5.length - 1)], _local5[(_local5.length - 2)]);
_local7.push(bestPath((_arg1 + _local4), _local5, _arg3));
_local10++;
};
_local7.sort(byClosest);
return (_local7[0]);
}
public function exitLeft():void{
moveCharacterToLoc(activeCharacter, "leftExit");
}
public function handleReturnView():void{
}
public function moveCharacter(_arg1:Character, _arg2:Point, _arg3:String=""):void{
_arg1.dislodge();
if (((((((!((_arg1.dest == null))) && (!((_arg1.dest == ""))))) && (!((features[_arg1.dest] == undefined))))) && (!((features[_arg1.dest].departFunction == ""))))){
var _local4 = this;
_local4[features[_arg1.dest].departFunction]();
};
if (identicalPoints(_arg1.point, _arg2)){
if (features[_arg3].arriveFunction != ""){
_local4 = this;
_local4[features[_arg3].arriveFunction]();
};
return;
} else {
if (unobstructed(_arg1.point, _arg2)){
currentPath = [_arg1.point, _arg2];
} else {
currentPath = calculatePath(_arg1.point, _arg2);
};
};
_arg1.walkPath(currentPath, _arg3);
}
protected function closestUnobstructed(_arg1:Array):Point{
var _local2:Point;
var _local3:Array;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:int;
_local2 = _arg1[(_arg1.length - 1)];
_local5 = 9999;
_local6 = -1;
_local3 = getValidNodes(_arg1);
_local7 = 0;
while (_local7 < _local3.length) {
_local4 = Math.sqrt((Math.pow(Math.abs((_local3[_local7].x - _local2.x)), 2) + Math.pow(Math.abs((_local3[_local7].y - _local2.y)), 2)));
if (_local4 < _local5){
_local5 = _local4;
_local6 = _local7;
};
_local7++;
};
return (_local3[_local6]);
}
protected function buildNodeList():void{
var _local1:XML;
nodes = new Array();
for each (_local1 in info.points.point) {
nodes.push(new Point(Number(_local1.@x), Number(_local1.@y)));
if (Main.debugMode){
debugSprite.graphics.beginFill(0xFF0000);
debugSprite.graphics.drawRect((Number(_local1.@x) - 8), (Number(_local1.@y) - 8), 4, 4);
};
};
}
public function handleCharacterSwitch():void{
}
protected function buildNodeNetwork():void{
var _local1:Point;
var _local2:Point;
var _local3:XML;
var _local4:int;
var _local5:int;
plainNodes = new Array();
for each (_local3 in info.points.point) {
if ((((_local3.@id == "")) || ((_local3.@id == "entry")))){
plainNodes.push(new Point(Number(_local3.@x), Number(_local3.@y)));
};
};
network = new Array();
_local4 = 0;
while (_local4 < plainNodes.length) {
network.push(new Array());
_local1 = plainNodes[_local4];
_local5 = 0;
while (_local5 < plainNodes.length) {
_local2 = plainNodes[_local5];
if (_local4 != _local5){
network[_local4][_local5] = (unobstructed(_local1, _local2)) ? pointDistance(_local1, _local2) : INF;
} else {
network[_local4][_local5] = 0;
};
_local5++;
};
_local4++;
};
}
protected function charAtFeature(_arg1:Character, _arg2:String):void{
var _local3:InfoEvent;
if (_arg2 == "rightExit"){
_local3 = new InfoEvent(TRAVEL, {dest:rightExitId, entryPoint:"leftEntry"});
dispatchEvent(_local3);
} else {
if (_arg2 == "leftExit"){
_local3 = new InfoEvent(TRAVEL, {dest:leftExitId, entryPoint:"rightEntry"});
dispatchEvent(_local3);
};
};
}
protected function onClickFloor(_arg1:Event):void{
moveCharacter(activeCharacter, new Point(mouseX, mouseY));
}
protected function calculatePath(_arg1:Point, _arg2:Point):Array{
var _local3:Array;
_local3 = bestPath(0, [_arg1], _arg2).path;
return (_local3);
}
public function handleMuteState(_arg1:Boolean):void{
}
protected function onAlphaRollover(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.currentTarget);
TweenLite.to(_local2, 0.3, {alpha:1});
}
public function refreshDepths(_arg1:Point):void{
var _local2:Array;
var _local3:Feature;
var _local4:int;
_local2 = new Array();
debugSprite.graphics.beginFill(0x4444);
_local4 = 0;
while (_local4 < featureIndeces.length) {
_local3 = features[featureIndeces[_local4]];
if (!_local3.depthExclude){
_local3.virtualY = _local3.calculateVirtualY(_arg1);
_local2.push(_local3);
};
_local4++;
};
_local2.push(activeCharacter);
if (bothCharacters){
_local2.push(activeCharacter.otherCharacter);
};
_local2.sort(byVirtualY);
_local4 = 0;
while (_local4 < _local2.length) {
if ((_local2[_local4] is Feature)){
addChild(_local2[_local4].clip);
} else {
addChild(_local2[_local4]);
};
_local4++;
};
}
protected function initData():void{
}
protected function inPath(_arg1:Array, _arg2:Point):Boolean{
var _local3:int;
_local3 = 0;
while (_local3 < _arg1.length) {
if (identicalPoints(_arg1[_local3], _arg2)){
return (true);
};
_local3++;
};
return (false);
}
protected function onCharacterMoving(_arg1:Event):void{
var _local2:Character;
_local2 = Character(_arg1.currentTarget);
refreshDepths(_local2.point);
}
public function get inactiveCharacter():Character{
return (activeCharacter.otherCharacter);
}
public function removeCharacter(_arg1:Character):void{
_arg1.removeEventListener(Character.MOVING, onCharacterMoving);
_arg1.removeEventListener(Character.PATH_COMPLETE, onPathComplete);
_arg1.removeEventListener(Setting.SHOW_CATCHER, onShowCatcher);
_arg1.removeEventListener(Setting.HIDE_CATCHER, onHideCatcher);
if (bothCharacters){
activeCharacter = activeCharacter.otherCharacter;
} else {
activeCharacter = null;
};
bothCharacters = false;
}
public function moveCharacterToLoc(_arg1:Character, _arg2:String):void{
var locXml:XML;
var char = _arg1;
var loc = _arg2;
if (dynamicLoc[(loc + char.properName)] == undefined){
locXml = XML(info.points.point.(@id == loc));
moveCharacter(char, new Point(Number(locXml.@x), Number(locXml.@y)), loc);
} else {
moveCharacter(char, new Point(dynamicLoc[(loc + char.properName)].x, dynamicLoc[(loc + char.properName)].y), loc);
};
}
protected function handleSpecialSpeaker(_arg1:String):void{
}
public function exitOverlay(_arg1:MovieClip):void{
}
protected function buildFeatureList():void{
var _local1:String;
var _local2:XML;
features = new Array();
featureIndeces = new Array();
for each (_local2 in info.features.feature) {
_local1 = _local2.@id.toString();
if ((((_local1.length > 0)) && (!((this.getChildByName(_local1) == null))))){
features[_local1] = new Feature();
features[_local1].depthExclude = (_local2.@depthExclude == "y");
features[_local1].clip = this.getChildByName(_local1);
features[_local1].clickFunction = _local2.@clickFunction.toString();
features[_local1].arriveFunction = _local2.@arriveFunction.toString();
features[_local1].departFunction = _local2.@departFunction.toString();
if (features[_local1].clip != null){
features[_local1].clip.gotoAndStop(1);
if (_local2.@active != "n"){
features[_local1].clip.buttonMode = true;
features[_local1].clip.mouseEnabled = true;
features[_local1].clip.addEventListener(MouseEvent.MOUSE_DOWN, onClickFeature);
} else {
features[_local1].clip.mouseEnabled = false;
features[_local1].clip.mouseChildren = false;
};
};
if (_local2.@depX1.toString().length > 0){
features[_local1].setEdges(_local2.@depX1, _local2.@depY1, _local2.@depX2, _local2.@depY2);
};
if (featureIndeces.indexOf(_local1) < 0){
featureIndeces.push(_local1);
};
};
};
}
public function processSpeechTree(_arg1:String, _arg2:String=""):void{
var $treeId = _arg1;
var $endFunc = _arg2;
speechTree = XML(info.dialogue.tree.(@id == $treeId.toString()));
speechIndex = 0;
endSpeechFunction = $endFunc;
advanceSpeechTree();
}
public function unobstructed(_arg1:Point, _arg2:Point):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:Point;
_local3 = (_arg2.x - _arg1.x);
_local4 = (_arg2.y - _arg1.y);
_local5 = getSteps(_local3, _local4);
_local6 = new Point(0, 0);
_local6.x = _arg1.x;
_local6.y = _arg1.y;
while ((Math.abs((_local6.x - _arg2.x)) + Math.abs((_local6.y - _arg2.y))) > (STEP_SIZE * 2)) {
_local6.x = (_local6.x + _local5.x);
_local6.y = (_local6.y + _local5.y);
if (Main.debugMode){
debugSprite.graphics.beginFill(debugColor);
debugSprite.graphics.drawRect(_local6.x, _local6.y, 2, 2);
};
if (!MovieClip(this).bounds.hitTestPoint((_local6.x + x), _local6.y, true)){
if (Main.debugMode){
debugSprite.graphics.beginFill(0xFFFF00);
debugSprite.graphics.drawRect((_local6.x - 3), (_local6.y - 3), 6, 6);
};
return (false);
};
};
return (true);
}
public function addCharacter(_arg1:Character, _arg2:String=""):void{
var char = _arg1;
var loc = _arg2;
trace(((((("[Setting] addCharacter - " + char) + " to ") + this) + " at ") + loc));
loc = ((loc.length)>0) ? loc : info.points.children()[0].@id.toString();
addChild(char);
char.visible = true;
char.x = Number(info.points.point.(@id == loc).@x);
char.y = Number(info.points.point.(@id == loc).@y);
char.addEventListener(Character.MOVING, onCharacterMoving);
char.addEventListener(Character.PATH_COMPLETE, onPathComplete);
char.addEventListener(Setting.SHOW_CATCHER, onShowCatcher);
char.addEventListener(Setting.HIDE_CATCHER, onHideCatcher);
if ((char is Reemus)){
Character.reemusSettingId = id;
} else {
if ((char is Liam)){
Character.liamSettingId = id;
};
};
if (activeCharacter != null){
bothCharacters = true;
};
activeCharacter = char;
}
protected function initialize():void{
debugSprite = new Sprite();
addChild(debugSprite);
Character.liam.scaleX = 1;
Character.liam.scaleY = 1;
Character.reemus.scaleX = 1;
Character.reemus.scaleY = 1;
dynamicLoc = new Array();
speechPoints = new Array();
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
MovieClip(this).bounds.addEventListener(MouseEvent.MOUSE_DOWN, onClickFloor);
if (!Main.debugMode){
MovieClip(this).bounds.alpha = 0;
};
}
protected function onShowCatcher(_arg1:Event):void{
dispatchEvent(new Event(SHOW_CATCHER));
}
public function exitRight():void{
moveCharacterToLoc(activeCharacter, "rightExit");
}
protected function onAddedToStage(_arg1:Event):void{
tabIndex = 1;
if (((root) && (!(Main(root).ignoreStageActions)))){
if (rightExitId != ""){
dispatchEvent(new Event(Setting.SHOW_RIGHT));
};
if (leftExitId != ""){
dispatchEvent(new Event(Setting.SHOW_LEFT));
};
};
}
protected function onHideCatcher(_arg1:Event):void{
dispatchEvent(new Event(HIDE_CATCHER));
}
public function advanceSpeechTree():void{
var _local1:XML;
if ((((speechTree == null)) || ((speechIndex >= speechTree.children().length())))){
Main.lockCatcher = false;
dispatchEvent(new Event(Setting.END_OF_DIALOGUE));
handleSpecialSpeaker("");
if (endSpeechFunction.length > 0){
var _local2 = this;
_local2[endSpeechFunction]();
endSpeechFunction = "";
};
} else {
_local1 = speechTree.children()[speechIndex];
processSpeechNode(_local1);
speechIndex++;
};
}
protected function onClickFeature(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Feature;
_local2 = MovieClip(_arg1.currentTarget);
_local3 = features[_local2.name];
if (_local3.clickFunction.length > 0){
var _local4 = this;
_local4[_local3.clickFunction]();
} else {
moveCharacterToLoc(activeCharacter, _local2.name);
};
}
public function processSpeechNode(_arg1:XML):void{
var _local2:SpeechEvent;
_local2 = new SpeechEvent(_arg1.@text);
handleSpecialSpeaker("");
if (_arg1.@origin == "reemus"){
Character.reemus.dispatchEvent(_local2);
} else {
if (_arg1.@origin == "liam"){
Character.liam.dispatchEvent(_local2);
} else {
if (_arg1.@origin == "active"){
activeCharacter.dispatchEvent(_local2);
} else {
handleSpecialSpeaker(_arg1.@origin);
_local2.params.point = speechPoints[_arg1.@origin];
dispatchEvent(_local2);
};
};
};
}
protected function onAlphaRollout(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.currentTarget);
TweenLite.to(_local2, 0.3, {alpha:0.3});
}
public function destroy():void{
var _local1:int;
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
Character.liam.removeEventListener(Character.MOVING, onCharacterMoving);
Character.liam.removeEventListener(Character.PATH_COMPLETE, onPathComplete);
Character.liam.removeEventListener(Setting.SHOW_CATCHER, onShowCatcher);
Character.liam.removeEventListener(Setting.HIDE_CATCHER, onHideCatcher);
Character.reemus.removeEventListener(Character.MOVING, onCharacterMoving);
Character.reemus.removeEventListener(Character.PATH_COMPLETE, onPathComplete);
Character.reemus.removeEventListener(Setting.SHOW_CATCHER, onShowCatcher);
Character.reemus.removeEventListener(Setting.HIDE_CATCHER, onHideCatcher);
if (MovieClip(this).bounds){
MovieClip(this).bounds.removeEventListener(MouseEvent.MOUSE_DOWN, onClickFloor);
};
_local1 = 0;
while (_local1 < featureIndeces.length) {
features[featureIndeces[_local1]].clip.removeEventListener(MouseEvent.MOUSE_DOWN, onClickFeature);
_local1++;
};
}
protected function onPathComplete(_arg1:Event):void{
var _local2:Character;
_local2 = Character(_arg1.currentTarget);
if (_local2.dest != ""){
if (features[_local2.dest]){
_local2.scaleX = (Math.abs(_local2.scaleX) * ((features[_local2.dest].clip.x)<_local2.x) ? -1 : 1);
if (features[_local2.dest].arriveFunction != ""){
var _local3 = this;
_local3[features[_local2.dest].arriveFunction]();
};
} else {
charAtFeature(_local2, _local2.dest);
};
};
}
public static function stopMusic():void{
musicId = "";
music.stop();
}
public static function identicalPoints(_arg1:Point, _arg2:Point):Boolean{
return ((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y))));
}
public static function indexOfPoint(_arg1:Point, _arg2:Array):int{
var _local3:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if (identicalPoints(_arg2[_local3], _arg1)){
return (_local3);
};
_local3++;
};
return (-1);
}
public static function playMusic(_arg1:String):void{
var _local2:Class;
var _local3:Sound;
if (((!((_arg1 == musicId))) && (!(musicMuted)))){
if (music){
music.stop();
};
_local2 = (getDefinitionByName(_arg1) as Class);
_local3 = new (_local2);
music = _local3.play(0, 9999);
};
musicId = _arg1;
}
public static function unmuteMusic():void{
var _local1:String;
_local1 = musicId;
musicId = "";
musicMuted = false;
playMusic(_local1);
}
public static function pointDistance(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
_local3 = (Math.pow(Math.abs((_arg1.x - _arg2.x)), 2) + Math.pow(Math.abs((_arg1.y - _arg2.y)), 2));
_local3 = Math.sqrt(_local3);
return (_local3);
}
public static function getSteps(_arg1:Number, _arg2:Number):Point{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local5 = (Math.abs(_arg1) / (Math.abs(_arg1) + Math.abs(_arg2)));
_local6 = (Math.abs(_arg2) / (Math.abs(_arg1) + Math.abs(_arg2)));
if (Math.abs(_arg1) <= 1){
_local3 = 0;
_local4 = ((Math.abs(_arg2) / _arg2) * STEP_SIZE);
} else {
if (Math.abs(_arg2) <= 1){
_local3 = ((Math.abs(_arg1) / _arg1) * STEP_SIZE);
_local4 = 0;
} else {
_local3 = (Math.min(STEP_SIZE, (_local5 * STEP_SIZE)) * (Math.abs(_arg1) / _arg1));
_local4 = (Math.min(STEP_SIZE, (_local6 * STEP_SIZE)) * (Math.abs(_arg2) / _arg2));
};
};
return (new Point(_local3, _local4));
}
public static function onScreen(_arg1:Point):Boolean{
return (Boolean((((((((_arg1.x > 0)) && ((_arg1.x < 700)))) && ((_arg1.y > 0)))) && ((_arg1.y < 540)))));
}
public static function muteMusic():void{
musicMuted = true;
music.stop();
}
}
}//package asfiles.setting
Section 33
//Spire (asfiles.setting.Spire)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.geom.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.overlay.*;
public class Spire extends Setting {
public var bounds:MovieClip;
public var spriteIn:MovieClip;
public var door:MovieClip;
private var pegPuzzle:GenusPegPuzzle;
public function Spire(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("SpireMusic");
speechPoints["liamStatic"] = new Point(232, 154);
speechPoints["bottomEdge"] = new Point(232, 530);
pegPuzzle = new GenusPegPuzzle();
TweenLite.delayedCall(0.1, delayedInit);
}
public function endLevelIntro():void{
dispatchEvent(new InfoEvent(Setting.SPECIAL_OVERLAY, {overlay:pegPuzzle}));
TweenLite.delayedCall(0.1, processSpeechTree, ["puzz_intro"]);
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="1" y="1"/>
</points>
<features>
<feature id="door" active="y" depthExclude="y" clickFunction="clickDoor"/>
</features>
<dialogue>
<tree id="level_intro">
<step origin="liamStatic" text="looks like the only way out of here is through this weird door in the ground."/>
</tree>
<tree id="puzz_intro">
<step origin="bottomEdge" text="hmm, looks like we have to organize these pegs into groups of three?"/>
</tree>
</dialogue>
</setting>
;
}
public function endIntroDialogue():void{
dispatchEvent(new InfoEvent(Setting.SPECIAL_OVERLAY, {overlay:pegPuzzle}));
dispatchEvent(new Event(Setting.HIDE_CATCHER));
}
override public function exitOverlay(_arg1:MovieClip):void{
if ((((_arg1 is GenusPegPuzzle)) && (GenusPegPuzzle(_arg1).solved))){
dispatchEvent(new Event(Setting.SHOW_CATCHER));
door.gotoAndPlay(2);
TweenLite.delayedCall(0.6, dispatchEvent, [new Event(Main.FADE_OUT)]);
TweenLite.delayedCall(2, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"TempleLeft"})]);
};
}
public function clickDoor():void{
if (door.currentFrame == 1){
dispatchEvent(new InfoEvent(Setting.SPECIAL_OVERLAY, {overlay:pegPuzzle}));
TweenLite.delayedCall(0.1, processSpeechTree, ["puzz_intro"]);
} else {
dispatchEvent(new Event(Main.FADE_OUT));
TweenLite.delayedCall(1.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"TempleLeft"})]);
};
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
_arg1.visible = false;
}
private function delayedInit():void{
processSpeechTree("level_intro");
endSpeechFunction = "endLevelIntro";
}
}
}//package asfiles.setting
Section 34
//TempleLeft (asfiles.setting.TempleLeft)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.media.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.features.*;
import com.relish.managers.*;
public class TempleLeft extends Setting {
public var pool:MovieClip;
public var vase:MovieClip;
private var firstVisit:Boolean;// = true
public var streamRight:MovieClip;
public var bounds:MovieClip;
public var streams:MovieClip;
public var streamMiddle:MovieClip;
public var foreground:MovieClip;
public var streamLeft:MovieClip;
private var flowChannel:SoundChannel;
public static var flow:String = "none";
public function TempleLeft(){
firstVisit = true;
super();
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("TempleMusic");
rightExitId = "TempleMiddle";
TweenLite.delayedCall(0.1, delayedInit);
}
protected function fillVase(_arg1:Object):void{
Vase.color = _arg1.color;
Vase.filled = false;
Vase.pouring = false;
activeCharacter.goto("fillVase");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
activeCharacter.heldItem = (14 + Vase.color);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="112" y="425"/>
<point id="rightEntry" x="720" y="438"/>
<point id="rightExit" x="790" y="438"/>
<point id="vase" x="340" y="413"/>
<point id="pool" x="360" y="413"/>
<point id="streamLeft" x="241" y="413"/>
<point id="streamMiddle" x="340" y="413"/>
<point id="streamRight" x="442" y="413"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="vase" active="y" depthExclude="y" arriveFunction="arriveVase"/>
<feature id="pool" active="y" depthExclude="y" arriveFunction="arrivePool"/>
<feature id="streamLeft" active="y" depthExclude="y" arriveFunction="arriveStreamLeft"/>
<feature id="streamMiddle" active="y" depthExclude="y" arriveFunction="arriveStreamMiddle"/>
<feature id="streamRight" active="y" depthExclude="y" arriveFunction="arriveStreamRight"/>
<feature id="streams" active="n" depthExclude="y"/>
</features>
</setting>
;
}
public function removeVase():void{
vase.visible = false;
}
protected function onRemovedFromStage(_arg1:Event):void{
if (flowChannel){
flowChannel.stop();
};
}
public function arriveStreamRight():void{
handleStream((3 + (3 * int((streams.currentFrame == 2)))));
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
_arg1.visible = true;
_arg1.alpha = 1;
}
override protected function initialize():void{
super.initialize();
Character.reemus.scaleX = 1.19;
Character.reemus.scaleY = 1.19;
Character.liam.scaleX = 1.05;
Character.liam.scaleY = 1.05;
}
protected function delayedInit():void{
if (firstVisit){
dispatchEvent(new Event(Setting.HIDE_CATCHER));
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
Character.reemus.x = (Character.reemus.x + 60);
Character.reemus.goto("bounce");
vase.play();
firstVisit = false;
};
}
public function arrivePool():void{
if ((activeCharacter is Liam)){
if ((((activeCharacter.heldItem > 14)) && ((activeCharacter.heldItem <= 20)))){
Vase.pouring = true;
Vase.pourColor = Vase.color;
activeCharacter.heldItem = 14;
activeCharacter.goto("dumpVase");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
} else {
activeCharacter.say("SOMEONE NEEDS TO FLUSH THIS TOILET.");
};
}
override protected function onAddedToStage(_arg1:Event):void{
var _local2:Sound;
super.onAddedToStage(_arg1);
if (flow == "left"){
streams.gotoAndStop(1);
} else {
if (flow == "right"){
streams.gotoAndStop(2);
} else {
streams.gotoAndStop(3);
};
};
if ((((flow == "left")) || ((flow == "right")))){
_local2 = new WaterfallSound();
flowChannel = _local2.play(0, 999);
AudioManager.allSounds.push(_local2);
};
streamLeft.mouseEnabled = !((streams.currentFrame == 3));
streamMiddle.mouseEnabled = !((streams.currentFrame == 3));
streamRight.mouseEnabled = !((streams.currentFrame == 3));
addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
}
public function arriveStreamMiddle():void{
handleStream((2 + (3 * int((streams.currentFrame == 2)))));
}
public function arriveVase():void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 0){
activeCharacter.heldItem = 14;
activeCharacter.goto("getVase");
activeCharacter.addFrameAction(10, removeVase);
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
} else {
activeCharacter.say("I DRAW THE LINE AT FISHING HOUSEWARES OUT OF BROWN SLUDGE.");
};
}
protected function handleStream(_arg1:int):void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem == 14){
Vase.filled = false;
Vase.color = _arg1;
activeCharacter.goto("fillVase");
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
activeCharacter.heldItem = (14 + Vase.color);
} else {
if ((((activeCharacter.heldItem > 14)) && ((activeCharacter.heldItem <= 20)))){
Vase.pouring = true;
Vase.pourColor = Vase.color;
activeCharacter.goto("dumpVase");
activeCharacter.addFrameAction(30, fillVase, {color:_arg1});
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
};
} else {
activeCharacter.say("TROPICAL PUNCH FOUNTAIN? NO... WISHFUL THINKING.");
};
}
public function arriveStreamLeft():void{
handleStream((1 + (3 * int((streams.currentFrame == 2)))));
}
override public function destroy():void{
super.destroy();
flow = "none";
if (flowChannel){
flowChannel.stop();
};
removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
}
}
}//package asfiles.setting
Section 35
//TempleMiddle (asfiles.setting.TempleMiddle)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import asfiles.char.*;
import asfiles.*;
public class TempleMiddle extends Setting {
public var stoneLeft:MovieClip;
public var statueLeft:MovieClip;
public var pipesLeft:MovieClip;
public var pipesRight:MovieClip;
public var statueRight:MovieClip;
public var bounds:MovieClip;
public var stoneRight:MovieClip;
public var foreground:MovieClip;
public function TempleMiddle(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
leftExitId = "TempleLeft";
rightExitId = "TempleRight";
TweenLite.delayedCall(0.1, delayedInit);
}
public function departStatueRight():void{
if ((activeCharacter is Reemus)){
TempleLeft.flow = "none";
if (pipesRight.currentFrame >= 10){
pipesRight.play();
} else {
pipesRight.gotoAndStop(1);
};
if (stoneRight.currentFrame >= 10){
stoneRight.play();
} else {
stoneRight.gotoAndStop(1);
};
};
}
public function arriveStatueLeft():void{
if ((activeCharacter is Reemus)){
TempleLeft.flow = "left";
if (pipesLeft.currentFrame < 10){
pipesLeft.play();
} else {
if (pipesLeft.currentFrame > 10){
pipesLeft.gotoAndPlay(2);
};
};
if (stoneLeft.currentFrame < 13){
stoneLeft.play();
} else {
if (stoneLeft.currentFrame > 13){
stoneLeft.gotoAndPlay(2);
};
};
} else {
activeCharacter.say("IT FEELS LIKE THIS STONE SHOULD MOVE, BUT I'M NOT HEAVY ENOUGH");
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="leftEntry" x="-20" y="430"/>
<point id="leftExit" x="-90" y="430"/>
<point id="rightEntry" x="720" y="430"/>
<point id="rightExit" x="790" y="430"/>
<point id="statueLeft" x="208" y="365"/>
<point id="statueRight" x="499" y="365"/>
<point id="stoneLeft" x="208" y="365"/>
<point id="stoneRight" x="499" y="365"/>
<point id="exit" x="194" y="469"/>
<point id="" x="581" y="421"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="pipesLeft" active="y" depthExclude="y" clickFunction="clickPipes"/>
<feature id="pipesRight" active="y" depthExclude="y" clickFunction="clickPipes"/>
<feature id="statueLeft" active="y" depthExclude="y" clickFunction="clickStatueLeft" arriveFunction="arriveStatueLeft" departFunction="departStatueLeft"/>
<feature id="statueRight" active="y" depthExclude="y" clickFunction="clickStatueRight" arriveFunction="arriveStatueRight" departFunction="departStatueRight"/>
<feature id="stoneLeft" active="y" depthExclude="y" clickFunction="clickStatueLeft" arriveFunction="arriveStatueLeft" departFunction="departStatueLeft"/>
<feature id="stoneRight" active="y" depthExclude="y" clickFunction="clickStatueRight" arriveFunction="arriveStatueRight" departFunction="departStatueRight"/>
</features>
</setting>
;
}
public function departStatueLeft():void{
if ((activeCharacter is Reemus)){
TempleLeft.flow = "none";
if (pipesLeft.currentFrame >= 10){
pipesLeft.play();
} else {
pipesLeft.gotoAndStop(1);
};
if (stoneLeft.currentFrame >= 10){
stoneLeft.play();
} else {
stoneLeft.gotoAndStop(1);
};
};
}
public function arriveStatueRight():void{
if ((activeCharacter is Reemus)){
TempleLeft.flow = "right";
if (pipesRight.currentFrame < 10){
pipesRight.play();
} else {
if (pipesRight.currentFrame > 10){
pipesRight.gotoAndPlay(2);
};
};
if (stoneRight.currentFrame < 10){
stoneRight.play();
} else {
if (stoneRight.currentFrame > 10){
stoneRight.gotoAndPlay(2);
};
};
} else {
activeCharacter.say("IT FEELS LIKE THIS STONE SHOULD MOVE, BUT I'M NOT HEAVY ENOUGH");
};
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
}
override protected function initialize():void{
super.initialize();
Character.reemus.scaleX = 1.19;
Character.reemus.scaleY = 1.19;
Character.liam.scaleX = 1.05;
Character.liam.scaleY = 1.05;
}
protected function delayedInit():void{
dispatchEvent(new Event(Setting.HIDE_CATCHER));
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
}
override protected function onAddedToStage(_arg1:Event):void{
super.onAddedToStage(_arg1);
}
public function clickStatueLeft():void{
if (pipesLeft.currentFrame > 1){
activeCharacter.say("ONLY ROOM FOR ONE ON THERE, AND REEMUS ISN'T A CUDDLER.");
} else {
moveCharacterToLoc(activeCharacter, "statueLeft");
};
}
public function clickTubes():void{
if ((activeCharacter is Liam)){
activeCharacter.say("THESE TUBES SEEM TO LEAD BACK TO THE FOUNTAIN.");
};
}
public function clickStatueRight():void{
if (pipesRight.currentFrame > 1){
activeCharacter.say("ONLY ROOM FOR ONE ON THERE, AND REEMUS ISN'T A CUDDLER.");
} else {
moveCharacterToLoc(activeCharacter, "statueRight");
};
}
}
}//package asfiles.setting
Section 36
//TempleRight (asfiles.setting.TempleRight)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import asfiles.char.*;
import asfiles.*;
import asfiles.setting.features.*;
public class TempleRight extends Setting {
public var leftButton:MovieClip;
public var rightButton:MovieClip;
public var bounds:MovieClip;
public var leftStatue:PaintStatue;
public var rightStatue:PaintStatue;
public var foreground:MovieClip;
public var door:MovieClip;
public function TempleRight(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
leftExitId = "TempleMiddle";
TweenLite.delayedCall(0.1, delayedInit);
}
public function drainLeft():void{
leftButton.gotoAndStop(1);
leftStatue.addEventListener(PaintStatue.FINISHED, onLeftStatueFinish);
leftStatue.drain();
}
public function handleStatue(_arg1:PaintStatue):void{
if ((activeCharacter is Liam)){
if (activeCharacter.heldItem <= 14){
activeCharacter.say("THEY’RE HOLDING VASES FOR CERMEMONIAL OFFERINGS.");
} else {
if ((((activeCharacter.heldItem > 14)) && ((activeCharacter.heldItem <= 20)))){
if (_arg1.topFill.currentFrame != _arg1.topFill.totalFrames){
activeCharacter.say("THIS ONE'S FULL. I CAN'T POUR ANY MORE IN.");
} else {
Vase.pourColor = Vase.color;
Vase.pouring = true;
activeCharacter.heldItem = 14;
activeCharacter.goto("pourVase");
if (_arg1.bottomFill.currentFrame == _arg1.bottomFill.totalFrames){
_arg1.bottomFill.gotoAndStop(Vase.color);
} else {
if (_arg1.midFill.currentFrame == _arg1.midFill.totalFrames){
_arg1.midFill.gotoAndStop(Vase.color);
} else {
_arg1.topFill.gotoAndStop(Vase.color);
};
};
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
};
};
} else {
activeCharacter.say("IT’S STAGGER AND SWAY, THE GODS OF BINGE DRINKING.");
};
}
public function arriveLeftButton():void{
handleButton(leftButton);
}
private function checkDoor():void{
if ((((leftButton.currentFrame == 2)) && ((rightButton.currentFrame == 2)))){
door.play();
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="leftEntry" x="-20" y="414"/>
<point id="leftExit" x="-80" y="414"/>
<point id="door" x="339" y="348"/>
<point id="leftButton" x="93" y="335"/>
<point id="leftStatue" x="93" y="335"/>
<point id="rightButton" x="456" y="370"/>
<point id="rightStatue" x="456" y="370"/>
<point id="" x="8" y="372"/>
</points>
<features>
<feature id="foreground" active="n"/>
<feature id="leftButton" active="y" depthExclude="y" arriveFunction="arriveLeftButton"/>
<feature id="rightButton" active="y" depthExclude="y" arriveFunction="arriveRightButton"/>
<feature id="door" active="y" depthExclude="y" arriveFunction="arriveDoor"/>
<feature id="leftStatue" active="y" depthExclude="y" arriveFunction="arriveLeftStatue"/>
<feature id="rightStatue" active="y" depthExclude="y" arriveFunction="arriveRightStatue"/>
</features>
</setting>
;
}
public function drainRight():void{
rightButton.gotoAndStop(1);
rightStatue.addEventListener(PaintStatue.FINISHED, onRightStatueFinish);
rightStatue.drain();
}
public function arriveLeftStatue():void{
handleStatue(leftStatue);
}
public function arriveRightButton():void{
handleButton(rightButton);
}
public function arriveDoor():void{
if (door.currentFrame > 1){
dispatchEvent(new Event(Main.FADE_OUT));
TweenLite.delayedCall(1.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:""})]);
TweenLite.delayedCall(1.5, Main(root).gotoAndStop, [11]);
} else {
if ((activeCharacter is Reemus)){
activeCharacter.say("I DON'T SEE A DOORKNOB ANYWHERE.");
} else {
activeCharacter.say("IT LOOKS LIKE SOME SORT OF DOOR, BUT I COULDN'T POSSIBLY PUSH IT OPEN.");
};
};
}
private function onLeftStatueFinish(_arg1:Event):void{
if (leftStatue.lastCombo == "341"){
leftButton.gotoAndStop(2);
leftStatue.mouseEnabled = false;
leftButton.mouseEnabled = false;
} else {
leftButton.gotoAndStop(3);
};
dispatchEvent(new Event(Setting.HIDE_CATCHER));
checkDoor();
}
public function handleButton(_arg1:MovieClip):void{
if ((activeCharacter is Liam)){
activeCharacter.goto("pushButton");
if (_arg1 == leftButton){
activeCharacter.addFrameAction(13, drainLeft);
} else {
activeCharacter.addFrameAction(13, drainRight);
};
activeCharacter.queueSprite({sprite:"waiting", frm:1, andPlay:true}, true);
dispatchEvent(new Event(Setting.SHOW_CATCHER));
};
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
}
override protected function initialize():void{
super.initialize();
Character.reemus.scaleX = 1.19;
Character.reemus.scaleY = 1.19;
Character.liam.scaleX = 1.05;
Character.liam.scaleY = 1.05;
}
protected function delayedInit():void{
dispatchEvent(new Event(Setting.HIDE_CATCHER));
dispatchEvent(new Event(Main.SHOW_PORTRAIT));
}
override protected function onAddedToStage(_arg1:Event):void{
super.onAddedToStage(_arg1);
}
private function onRightStatueFinish(_arg1:Event):void{
if (rightStatue.lastCombo == "526"){
rightButton.gotoAndStop(2);
rightStatue.mouseEnabled = false;
rightButton.mouseEnabled = false;
} else {
rightButton.gotoAndStop(3);
};
dispatchEvent(new Event(Setting.HIDE_CATCHER));
checkDoor();
}
public function arriveRightStatue():void{
handleStatue(rightStatue);
}
override public function destroy():void{
super.destroy();
leftStatue.removeEventListener(PaintStatue.FINISHED, onLeftStatueFinish);
rightStatue.removeEventListener(PaintStatue.FINISHED, onRightStatueFinish);
}
}
}//package asfiles.setting
Section 37
//VisitorLeft (asfiles.setting.VisitorLeft)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import asfiles.char.*;
import asfiles.*;
public class VisitorLeft extends Setting {
public var bounds:MovieClip;
public var mainFeature:MovieClip;
public var web:MovieClip;
public var cave:MovieClip;
public var branch:MovieClip;
public var trunk:MovieClip;
public var grass:MovieClip;
public function VisitorLeft(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("VisitorLeftMusic");
mainFeature.addEventListener("endOfClip", onEndOfClip);
TweenLite.delayedCall(0.1, delayedInit);
}
public function clickWeb():void{
branch.visible = false;
web.visible = false;
mainFeature.gotoAndStop(4);
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="1" y="1"/>
</points>
<features>
<feature id="mainFeature" active="n" depthExclude="y"/>
<feature id="trunk" active="y" depthExclude="y" clickFunction="clickTrunk"/>
<feature id="branch" active="y" depthExclude="y" clickFunction="clickBranch"/>
<feature id="web" active="y" depthExclude="y" clickFunction="clickWeb"/>
<feature id="cave" active="y" depthExclude="y" clickFunction="clickCave"/>
<feature id="grass" active="y" depthExclude="y" clickFunction="clickGrass"/>
</features>
</setting>
;
}
public function clickGrass():void{
cave.visible = false;
grass.visible = false;
mainFeature.gotoAndStop(10);
}
public function clickTrunk():void{
trunk.visible = false;
mainFeature.gotoAndStop(2);
}
public function clickCave():void{
cave.visible = false;
grass.visible = false;
if (mainFeature.currentFrame <= 9){
mainFeature.gotoAndStop(1);
mainFeature.gotoAndStop(9);
} else {
mainFeature.gotoAndStop(11);
TweenLite.delayedCall(2.5, dispatchEvent, [new Event(Main.FADE_OUT)]);
TweenLite.delayedCall(3.9, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {proceedTo:"VisitorRight"})]);
};
}
private function onEndOfClip(_arg1:Event):void{
if (mainFeature.currentFrame == 1){
trunk.visible = true;
} else {
if ((((mainFeature.currentFrame == 2)) || ((mainFeature.currentFrame == 3)))){
branch.visible = true;
web.visible = true;
} else {
if (mainFeature.currentFrame == 4){
mainFeature.gotoAndStop(5);
} else {
if (mainFeature.currentFrame == 5){
branch.visible = true;
} else {
if (mainFeature.currentFrame == 6){
mainFeature.gotoAndStop(7);
} else {
if (mainFeature.currentFrame == 7){
mainFeature.gotoAndStop(8);
} else {
if ((((mainFeature.currentFrame == 8)) || ((mainFeature.currentFrame == 9)))){
grass.visible = true;
cave.visible = true;
} else {
if (mainFeature.currentFrame == 10){
cave.visible = true;
};
};
};
};
};
};
};
};
}
public function clickBranch():void{
branch.visible = false;
web.visible = false;
if (mainFeature.currentFrame == 3){
mainFeature.spriteIn.gotoAndPlay(1);
} else {
if (mainFeature.currentFrame < 3){
mainFeature.gotoAndStop(3);
} else {
mainFeature.gotoAndStop(6);
};
};
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
_arg1.visible = false;
}
private function delayedInit():void{
trunk.visible = false;
branch.visible = false;
web.visible = false;
cave.visible = false;
grass.visible = false;
}
}
}//package asfiles.setting
Section 38
//VisitorRight (asfiles.setting.VisitorRight)
package asfiles.setting {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.media.*;
import asfiles.char.*;
import asfiles.*;
import com.relish.managers.*;
public class VisitorRight extends Setting {
public var fruit:MovieClip;
public var frogBeast:MovieClip;
public var fisherman:MovieClip;
public var fish:MovieClip;
public var flyFruitTree:MovieClip;
public var bounds:MovieClip;
public var branch1:MovieClip;
public var branch3:MovieClip;
public var branch2:MovieClip;
public var mainFeature:MovieClip;
public var water:MovieClip;
private var delayedFunc:Function;
public var flyFruit:MovieClip;
public var frog:MovieClip;
public var rod:MovieClip;
private var fireChannel:SoundChannel;
public function VisitorRight(){
if (((root) && ((Main(root).currentFrame == 2)))){
return;
};
Setting.playMusic("VisitorRightMusic");
frogBeast.visible = false;
mainFeature.addEventListener("endOfClip", onEndOfClip);
frog.addEventListener("endOfClip", onEndOfFrog);
frogBeast.addEventListener("endOfClip", onFrogBeastStop);
fisherman.addEventListener("endOfClip", onFishermanStop);
TweenLite.delayedCall(0.1, delayedInit);
}
public function clickFish():void{
mouseChildren = false;
if (mainFeature.currentFrame != 3){
mainFeature.gotoAndStop(3);
delayedFunc = clickFish;
} else {
if (fish.currentFrame < 4){
branch1.visible = false;
fish.mouseEnabled = false;
fish.gotoAndStop(4);
fish.addEventListener("endOfClip", onEatFish);
};
};
}
public function clickBranch1():void{
mouseChildren = false;
if (mainFeature.currentFrame != 3){
mainFeature.gotoAndStop(3);
delayedFunc = clickBranch1;
} else {
if (frog.currentFrame < 4){
mainFeature.gotoAndStop(11);
} else {
rod.visible = false;
branch1.visible = false;
frogBeast.gotoAndPlay(1);
frogBeast.visible = true;
};
};
}
public function clickBranch3():void{
mouseChildren = false;
branch3.visible = false;
if (fruit.currentFrame == 1){
fruit.mouseEnabled = true;
};
frogBeast.gotoAndPlay("lastHop");
}
public function clickBranch2():void{
mouseChildren = false;
branch2.visible = false;
branch3.visible = true;
frogBeast.gotoAndPlay("nextHop");
}
private function onFishermanStop(_arg1:Event):void{
if (fisherman.currentFrame < 4){
fisherman.gotoAndStop(1);
mainFeature.gotoAndStop(2);
mouseChildren = true;
} else {
dispatchEvent(new Event(Main.FADE_OUT));
TweenLite.delayedCall(1.4, dispatchEvent, [new InfoEvent(Setting.COMPLETE_AREA, {})]);
TweenLite.delayedCall(1.4, Main(root).gotoAndStop, [4]);
};
}
public function clickWater():void{
mouseChildren = false;
water.visible = false;
branch2.visible = false;
branch3.visible = false;
fruit.mouseEnabled = false;
fruit.mouseChildren = false;
if (frogBeast.currentLabel == "emerge"){
frogBeast.gotoAndPlay("lowDive");
} else {
if (frogBeast.currentLabel == "nextHop"){
frogBeast.gotoAndPlay("mediumDive");
} else {
frogBeast.gotoAndPlay("highDive");
};
};
}
override public function handleMuteState(_arg1:Boolean):void{
trace(("[VisitorRight] handleMuteState - " + _arg1));
if (!_arg1){
playFireSound();
} else {
if (fireChannel){
fireChannel.stop();
};
};
}
override protected function initData():void{
info = <setting minScale="0.2" maxScale="1.2">
<points>
<point id="entry" x="1" y="1"/>
</points>
<features>
<feature id="mainFeature" active="n" depthExclude="y"/>
<feature id="flyFruitTree" active="n" depthExclude="y"/>
<feature id="frogBeast" active="n" depthExclude="y"/>
<feature id="flyFruit" active="y" depthExclude="y" clickFunction="clickFlyFruit"/>
<feature id="frog" active="y" depthExclude="y" clickFunction="clickFrog"/>
<feature id="fish" active="y" depthExclude="y" clickFunction="clickFish"/>
<feature id="rod" active="y" depthExclude="y" clickFunction="clickRod"/>
<feature id="fruit" active="y" depthExclude="y" clickFunction="clickFruit"/>
<feature id="branch1" active="y" depthExclude="y" clickFunction="clickBranch1"/>
<feature id="branch2" active="y" depthExclude="y" clickFunction="clickBranch2"/>
<feature id="branch3" active="y" depthExclude="y" clickFunction="clickBranch3"/>
<feature id="water" active="y" depthExclude="y" clickFunction="clickWater"/>
</features>
</setting>
;
}
private function onEatFish(_arg1:Event):void{
mainFeature.gotoAndStop(8);
mouseChildren = true;
}
protected function onRemovedFromStage(_arg1:Event):void{
if (fireChannel){
fireChannel.stop();
};
}
public function clickFlyFruit():void{
mouseChildren = false;
if (flyFruitTree.currentFrame == 1){
if (mainFeature.currentFrame != 3){
mainFeature.gotoAndStop(3);
delayedFunc = clickFlyFruit;
} else {
mainFeature.gotoAndStop(4);
flyFruit.visible = false;
flyFruitTree.play();
frog.gotoAndStop(2);
};
};
}
private function onFrogBeastStop(_arg1:Event):void{
if (frogBeast.currentLabel == "emerge"){
mouseChildren = true;
branch1.visible = false;
branch2.visible = true;
water.visible = true;
} else {
if ((((frogBeast.currentLabel == "nextHop")) || ((frogBeast.currentLabel == "lastHop")))){
mouseChildren = true;
} else {
if (frogBeast.currentLabel == "chew"){
mouseChildren = true;
fruit.gotoAndStop(2);
} else {
if (frogBeast.currentLabel.indexOf("Dive") >= 0){
mouseChildren = true;
rod.visible = true;
branch1.visible = true;
fish.mouseEnabled = true;
mainFeature.gotoAndStop(2);
};
};
};
};
}
public function clickRod():void{
mouseChildren = false;
if (((!((mainFeature.currentFrame == 3))) && ((fish.currentFrame < 4)))){
mainFeature.gotoAndStop(3);
delayedFunc = clickRod;
} else {
if (fish.currentFrame >= 4){
mainFeature.visible = false;
fisherman.gotoAndStop(4);
} else {
if (frog.currentFrame < 4){
fisherman.gotoAndStop(2);
} else {
fisherman.gotoAndStop(3);
};
};
};
}
public function clickFrog():void{
mouseChildren = false;
if (mainFeature.currentFrame != 3){
mainFeature.gotoAndStop(3);
delayedFunc = clickFrog;
} else {
if (flyFruitTree.currentFrame == 1){
frog.gotoAndStop(3);
} else {
branch1.visible = true;
frog.gotoAndStop(4);
};
};
}
private function onEndOfClip(_arg1:Event):void{
if (mainFeature.currentFrame == 1){
flyFruit.visible = true;
branch1.visible = true;
rod.visible = true;
mainFeature.gotoAndStop(2);
} else {
if (mainFeature.currentFrame == 3){
delayedFunc();
} else {
if (mainFeature.currentFrame == 4){
mouseChildren = true;
mainFeature.gotoAndStop(2);
} else {
if (mainFeature.currentFrame == 11){
mainFeature.gotoAndStop(12);
} else {
if (mainFeature.currentFrame == 12){
mouseChildren = true;
mainFeature.gotoAndStop(2);
};
};
};
};
};
}
public function clickFruit():void{
mouseChildren = false;
fish.gotoAndStop(2);
fruit.mouseEnabled = false;
fruit.mouseChildren = false;
frogBeast.gotoAndPlay("chew");
}
override public function addCharacter(_arg1:Character, _arg2:String=""):void{
super.addCharacter(_arg1, _arg2);
_arg1.visible = false;
}
private function delayedInit():void{
flyFruit.visible = false;
frog.mouseEnabled = false;
fish.mouseEnabled = false;
fruit.mouseEnabled = false;
branch1.visible = false;
branch2.visible = false;
branch3.visible = false;
water.visible = false;
fisherman.gotoAndStop(2);
fisherman.gotoAndStop(1);
}
override protected function onAddedToStage(_arg1:Event):void{
if (!AudioManager.isMuted){
playFireSound();
};
addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
}
private function playFireSound():void{
var _local1:Sound;
if (fireChannel){
fireChannel.stop();
fireChannel = null;
};
_local1 = new CampfireSound();
fireChannel = _local1.play(0, 999);
}
private function onEndOfFrog(_arg1:Event):void{
if (frog.currentFrame == 3){
frog.gotoAndStop(1);
mainFeature.gotoAndStop(2);
mouseChildren = true;
} else {
if (frog.currentFrame == 4){
mainFeature.gotoAndStop(2);
mouseChildren = true;
};
};
}
override public function destroy():void{
super.destroy();
if (fireChannel){
fireChannel.stop();
fireChannel = null;
};
}
}
}//package asfiles.setting
Section 39
//Credits (asfiles.Credits)
package asfiles {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import asfiles.setting.*;
public class Credits extends MovieClip {
public var sponsorButton:MovieClip;
public var favorButton:MovieClip;
public var restartButton:MovieClip;
public var mitchButton:MovieClip;
public var betaButton:MovieClip;
public var reemusButton:MovieClip;
public var negativeButton:MovieClip;
public var zeebarfButton:MovieClip;
public function Credits(){
zeebarfButton.buttonMode = true;
zeebarfButton.addEventListener(MouseEvent.CLICK, onClickZeebarf);
negativeButton.buttonMode = true;
negativeButton.addEventListener(MouseEvent.CLICK, onClickNegative);
mitchButton.buttonMode = true;
mitchButton.addEventListener(MouseEvent.CLICK, onClickMitch);
betaButton.buttonMode = true;
betaButton.addEventListener(MouseEvent.CLICK, onClickBeta);
favorButton.buttonMode = true;
favorButton.addEventListener(MouseEvent.CLICK, onClickFavor);
restartButton.buttonMode = true;
restartButton.addEventListener(MouseEvent.CLICK, onClickRestart);
reemusButton.buttonMode = true;
reemusButton.addEventListener(MouseEvent.CLICK, onClickReemus);
sponsorButton.buttonMode = true;
sponsorButton.addEventListener(MouseEvent.CLICK, onClickSponsor);
}
private function onClickZeebarf(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.zeebarf.com"), "_blank");
}
private function onClickNegative(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.negativeflash.com"), "_blank");
}
private function onClickMitch(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.myspace.com/mitchellbowden"), "_blank");
}
private function onClickBeta(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.zeebarf.com/zeelist.html"), "_blank");
}
private function onClickFavor(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com/collection/asmallfavor"), "_blank");
}
private function onClickRestart(_arg1:Event):void{
Setting.stopMusic();
Main(root).gotoAndStop(3);
}
private function onClickSponsor(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com/refer/zeebarf"), "_blank");
}
private function onClickReemus(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com/collection/reemus.html"), "_blank");
}
}
}//package asfiles
Section 40
//Cutscene (asfiles.Cutscene)
package asfiles {
import flash.events.*;
import flash.display.*;
public class Cutscene extends MovieClip {
protected var skipButton:SkipButton;
public var monstermouth3:MovieClip;
public var monstermouth4:MovieClip;
public var monstermouth2:MovieClip;
public var monstermouth1:MovieClip;
public var spriteIn:MovieClip;
public function Cutscene(){
buttonMode = true;
addEventListener(MouseEvent.CLICK, onClickAnywhere);
skipButton = new SkipButton();
skipButton.x = (640 - x);
skipButton.y = (507 - y);
skipButton.buttonMode = true;
skipButton.addEventListener(MouseEvent.MOUSE_DOWN, onClickSkip);
addChild(skipButton);
addEventListener(Event.ENTER_FRAME, updateDepths);
addEventListener(Event.REMOVED_FROM_STAGE, selfCleanup);
}
protected function onClickSkip(_arg1:Event):void{
if ((((MovieClip(root).currentFrame >= 4)) && ((MovieClip(root).currentFrame <= 6)))){
Main(root).gotoAndStop(7);
} else {
gotoAndPlay(totalFrames);
};
}
protected function updateDepths(_arg1:Event):void{
addChild(skipButton);
}
protected function onClickAnywhere(_arg1:Event):void{
play();
}
protected function selfCleanup(_arg1:Event):void{
skipButton.removeEventListener(MouseEvent.MOUSE_DOWN, onClickSkip);
removeEventListener(Event.REMOVED_FROM_STAGE, selfCleanup);
}
}
}//package asfiles
Section 41
//GameIntroDialogue (asfiles.GameIntroDialogue)
package asfiles {
import flash.events.*;
import flash.display.*;
public class GameIntroDialogue extends MovieClip {
public var newGameButton:MovieClip;
public var continueGameButton:MovieClip;
public function GameIntroDialogue(){
addFrameScript(12, frame13);
visible = false;
newGameButton.addEventListener(MouseEvent.CLICK, onClickNew);
newGameButton.buttonMode = true;
continueGameButton.addEventListener(MouseEvent.CLICK, onClickContinue);
continueGameButton.buttonMode = true;
}
private function onClickNew(_arg1:Event):void{
Main(root).intro.play();
visible = false;
}
function frame13(){
stop();
}
private function onClickContinue(_arg1:Event):void{
Main(root).gotoAndStop(12);
visible = false;
}
}
}//package asfiles
Section 42
//InfoEvent (asfiles.InfoEvent)
package asfiles {
import flash.events.*;
public class InfoEvent extends Event {
public var data:Object;
public function InfoEvent(_arg1:String, _arg2:Object=null){
super(_arg1);
data = ((_arg2 == null)) ? new Object() : _arg2;
}
}
}//package asfiles
Section 43
//Main (asfiles.Main)
package asfiles {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.utils.*;
import flash.geom.*;
import flash.net.*;
import com.kongregate.as3.client.*;
import asfiles.char.*;
import asfiles.setting.*;
import com.relish.managers.*;
public class Main extends MovieClip {
private var clickCatcher:Sprite;
private var reemus:Reemus;
public var poop:MovieClip;
private var areaKeys:Array;
public var leftArrow:MovieClip;
public var setting:Setting;
public var resetDialogue:ResetDialogue;
private var liam:Liam;
public var intro:introshot1;
private var bubble:SpeechBubble;
private var area:Array;
private var saveFile:SharedObject;
public var musicMuteButton:MusicMuteButton;
public var API_Settings:Object;
private var blackout:Sprite;
public var soundMuteButton:SoundMuteButton;
private var forcedView:Setting;
public var rightArrow:MovieClip;
private var specialOverlay:MovieClip;
public var medal_popup:MovieClip;
private var bubbleOwner:String;// = ""
public var gameIntroDialogue:GameIntroDialogue;
private var levelSelect:LevelSelect;
public var portrait:Portrait;
private var entrySetting:String;
public var firstEvent:InfoEvent;
public var newgroundsAPIconnector:MovieClip;
public static const FRAME_ACTION_PRIMARY:String = "faPrimary";
public static const SHOW_PORTRAIT:String = "showPortrait";
public static const FADE_IN:String = "fadeIn";
public static const FADE_OUT:String = "fadeOut";
public static const HIDE_PORTRAIT:String = "hidePortrait";
public static var debugMode:Boolean = false;
public static var dummyRef:Object;
public static var lockCatcher:Boolean = false;
public static var kongregate:KongregateAPI;
public function Main(){
bubbleOwner = "";
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 6, frame7, 7, frame8, 8, frame9, 12, frame13);
AudioManager.init();
LevelSelect.initSaveFile();
kongregate = new KongregateAPI();
this.addChild(kongregate);
dummyRef = new Object();
Setting.dummyRef = dummyRef;
area = new Array();
areaKeys = new Array();
}
public function resetSetting():void{
Character.reemus.visible = true;
Character.liam.visible = true;
Character.reemus.alpha = 1;
Character.liam.alpha = 1;
Character.reemus.heldItem = 0;
Character.liam.heldItem = 0;
Character.reemus.goto("bounce");
Character.liam.goto("bounce");
Character.reemus.goto("waiting");
Character.liam.goto("waiting");
onCompleteArea(new InfoEvent("x", {proceedTo:entrySetting}));
}
private function onFeatureSpeak(_arg1:SpeechEvent):void{
clickCatcher.visible = true;
clickCatcher.buttonMode = true;
setting.activeCharacter.shush();
setting.activeCharacter.otherCharacter.shush();
bubbleOwner = "";
destroyBubble();
bubble = new SpeechBubble(_arg1.speech);
bubble.x = (setting.x + _arg1.params.point.x);
bubble.y = _arg1.params.point.y;
if (_arg1.params.altTip){
bubble.bubble.tip.alpha = 0;
bubble.bubble.altTip.alpha = 1;
bubble.bubble.altTip.x = 32;
bubble.bubble.altTip.y = -53;
} else {
bubble.assessOrientation();
};
bubble.bubble.tip.scaleY = 1;
if (_arg1.params.color){
TweenLite.to(bubble.label, 0, {tint:_arg1.params.color});
} else {
TweenLite.to(bubble.label, 0, {tint:0});
};
addChild(bubble);
}
private function onClickReemusButton(_arg1:Event):void{
switchCharacter(reemus);
}
private function onShowLeftArrow(_arg1:Event):void{
TweenLite.killTweensOf(leftArrow);
leftArrow.alpha = 0;
TweenLite.to(leftArrow, 0.5, {autoAlpha:1, delay:0.2});
}
private function onRolloverArrow(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(2);
}
private function onLevelSelect(_arg1:InfoEvent):void{
travelTo(_arg1.data.id);
Character.reemus.goto("bounce");
Character.liam.goto("bounce");
Character.reemus.goto("waiting");
Character.liam.goto("waiting");
setting.addCharacter(liam);
setting.addCharacter(reemus);
fadeIn();
addChildAt(setting, 0);
if (((levelSelect) && (contains(levelSelect)))){
removeChild(levelSelect);
};
}
public function showResetDialogue():void{
resetDialogue.visible = true;
restackUI();
}
private function onRolloutArrow(_arg1:Event):void{
MovieClip(_arg1.currentTarget).gotoAndStop(1);
}
private function onFadeOut(_arg1:Event):void{
fadeOut();
}
function frame2(){
}
function frame3(){
stop();
if (LevelSelect.returnVisitor){
intro.stop();
gameIntroDialogue.visible = true;
};
}
function frame4(){
fadeIn();
}
function frame7(){
firstEvent = new InfoEvent(LevelSelect.MAKE_SELECTION, {id:"ForestLeft"});
onLevelSelect(firstEvent);
initialize();
}
private function buildInterface():void{
if (Character.liam == null){
liam = new Liam();
liam.addEventListener(SpeechEvent.SPEAK, onCharacterSpeak);
liam.addEventListener(Character.RETURN_IDLE, onIdle);
Character.liam = liam;
} else {
liam = Character.liam;
};
if (Character.reemus == null){
reemus = new Reemus();
reemus.addEventListener(SpeechEvent.SPEAK, onCharacterSpeak);
reemus.addEventListener(Character.RETURN_IDLE, onIdle);
Character.reemus = reemus;
} else {
reemus = Character.reemus;
};
if (clickCatcher == null){
clickCatcher = new Sprite();
clickCatcher.graphics.beginFill(0xFFFF00, (debugMode) ? 0.4 : 0);
clickCatcher.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
clickCatcher.visible = false;
clickCatcher.addEventListener(MouseEvent.CLICK, onCaughtClick);
addChild(clickCatcher);
};
if (blackout == null){
blackout = new Sprite();
blackout.graphics.beginFill(0, 1);
blackout.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
blackout.alpha = 0;
blackout.visible = false;
addChild(blackout);
};
restackUI();
}
private function switchCharacter(_arg1:Character):void{
if (_arg1 != setting.activeCharacter){
_arg1.otherCharacter.halt();
_arg1.otherCharacter.triedRelocate = true;
_arg1.visible = true;
if (setting != _arg1.setting){
removeChild(setting);
if (areaKeys.indexOf(Setting(_arg1.parent).id) >= 0){
setting = area[Setting(_arg1.parent).id];
} else {
if ((_arg1 is Reemus)){
setting = area[Character.reemusSettingId];
} else {
setting = area[Character.liamSettingId];
};
};
leftArrow.visible = false;
rightArrow.visible = false;
addChildAt(setting, 0);
};
setting.activeCharacter = _arg1;
setting.refreshDepths(_arg1.point);
setting.handleCharacterSwitch();
};
portrait.gotoAndStop(setting.activeCharacter.otherCharacter.properName.toLowerCase());
}
function frame13(){
gotoAndStop(14);
}
private function onIdle(_arg1:Event):void{
var _local2:Character;
_local2 = Character(_arg1.currentTarget);
if (((bubble) && ((bubbleOwner == _local2.properName.toLowerCase())))){
if (((_local2.spriteIn) && (_local2.spriteIn.mouth))){
_local2.spriteIn.mouth.gotoAndPlay("talk");
};
};
}
private function onSwitchCharacter(_arg1:Event):void{
switchCharacter(setting.inactiveCharacter);
}
function frame9(){
initialize();
buildInterface();
}
private function onHidePortrait(_arg1:Event):void{
portrait.show(false);
}
private function onEndOfDialogue(_arg1:Event):void{
destroyBubble();
if (!lockCatcher){
clickCatcher.visible = false;
clickCatcher.buttonMode = false;
};
setting.activeCharacter.shush();
setting.activeCharacter.otherCharacter.shush();
}
function frame1(){
stop();
stage.showDefaultContextMenu = false;
API_Settings = {movie_id:7787, enc_key:"S5upWSwyivIDaarTeFIuaQcdQhAST35h", debug_mode:false, movie_version:""};
newgroundsAPIconnector.initialize(API_Settings);
}
private function onClickLeft(_arg1:Event):void{
setting.exitLeft();
}
function frame8(){
initialize();
buildInterface();
firstRun();
}
private function onClickRight(_arg1:Event):void{
setting.exitRight();
}
public function fadeIn():void{
TweenLite.to(blackout, 0, {autoAlpha:1});
TweenLite.to(blackout, 1, {autoAlpha:0});
}
private function onClickLiamButton(_arg1:Event):void{
switchCharacter(liam);
}
private function onCompleteArea(_arg1:InfoEvent):void{
if (_arg1.data.proceedTo == undefined){
destroyArea();
} else {
if (_arg1.data.atPoint == undefined){
destroyArea(_arg1.data.proceedTo, "");
} else {
destroyArea(_arg1.data.proceedTo, _arg1.data.atPoint);
};
};
if (_arg1.data.proceedTo != undefined){
if (setting){
setting.addCharacter(liam);
setting.addCharacter(reemus);
};
fadeIn();
};
}
private function onCaughtClick(_arg1:Event):void{
if (bubble){
removeChild(bubble);
bubble = null;
setting.advanceSpeechTree();
};
}
public function get ignoreStageActions():Boolean{
return (!((forcedView == null)));
}
private function onSpecialOverlay(_arg1:InfoEvent):void{
specialOverlay = _arg1.data.overlay;
specialOverlay.addEventListener(Setting.HIDE_OVERLAY, onHideOverlay);
if (!_arg1.data.ignoreCatcher){
clickCatcher.visible = true;
};
addChildAt(specialOverlay, getChildIndex(portrait));
restackUI();
}
private function destroyBubble():void{
if (bubble){
if (contains(bubble)){
removeChild(bubble);
};
bubble = null;
};
}
public function fadeOut():void{
TweenLite.to(blackout, 1, {autoAlpha:1});
}
private function travelTo(_arg1:String, _arg2:String="entryPoint"):void{
var _local3:Class;
var _local4:Character;
leftArrow.visible = false;
rightArrow.visible = false;
if (setting != null){
_local4 = setting.activeCharacter;
setting.removeCharacter(setting.activeCharacter);
removeChild(setting);
};
if (areaKeys.indexOf(_arg1) >= 0){
setting = area[_arg1];
} else {
_local3 = (getDefinitionByName(("asfiles.setting." + _arg1)) as Class);
setting = new (_local3);
setting.id = _arg1;
setting.addEventListener(Setting.TRAVEL, onTravel);
area[_arg1] = setting;
if (areaKeys.length <= 0){
entrySetting = _arg1;
};
areaKeys.push(_arg1);
};
setting.addEventListener(Setting.SHOW_LEFT, onShowLeftArrow);
setting.addEventListener(Setting.SHOW_RIGHT, onShowRightArrow);
setting.addEventListener(Setting.HIDE_LEFT, onHideLeftArrow);
setting.addEventListener(Setting.HIDE_RIGHT, onHideRightArrow);
setting.addEventListener(Setting.SHOW_CATCHER, onShowCatcher);
setting.addEventListener(Setting.HIDE_CATCHER, onHideCatcher);
setting.addEventListener(Setting.END_OF_DIALOGUE, onEndOfDialogue);
setting.addEventListener(Setting.SPECIAL_OVERLAY, onSpecialOverlay);
setting.addEventListener(Setting.SWITCH_VIEW, onSwitchView);
setting.addEventListener(Setting.RETURN_VIEW, onReturnView);
setting.addEventListener(Setting.FORCE_SWITCH, onSwitchCharacter);
setting.addEventListener(Setting.COMPLETE_AREA, onCompleteArea);
setting.addEventListener(SpeechEvent.SPEAK, onFeatureSpeak);
setting.addEventListener(SHOW_PORTRAIT, onShowPortrait);
setting.addEventListener(HIDE_PORTRAIT, onHidePortrait);
setting.addEventListener(FADE_IN, onFadeIn);
setting.addEventListener(FADE_OUT, onFadeOut);
if (_local4 != null){
setting.addCharacter(_local4, _arg2);
if (_local4.x < 100){
TweenLite.delayedCall(0.1, setting.moveCharacter, [_local4, new Point((_local4.x + 60), _local4.y)]);
} else {
if (_local4.x > (stage.stageWidth - 50)){
TweenLite.delayedCall(0.1, setting.moveCharacter, [_local4, new Point((_local4.x - 60), _local4.y)]);
};
};
};
addChildAt(setting, 0);
addChild(clickCatcher);
addChild(blackout);
restackUI();
}
private function onSwitchView(_arg1:InfoEvent):void{
switchView(_arg1.data.dest);
}
private function onReturnView(_arg1:Event):void{
returnView();
}
private function onShowPortrait(_arg1:Event):void{
portrait.gotoAndStop(setting.activeCharacter.otherCharacter.properName.toLowerCase());
portrait.show(true);
}
private function onHideOverlay(_arg1:Event):void{
specialOverlay.removeEventListener(Setting.HIDE_OVERLAY, onHideOverlay);
clickCatcher.visible = false;
setting.exitOverlay(specialOverlay);
removeChild(specialOverlay);
specialOverlay = null;
}
private function onHideLeftArrow(_arg1:Event):void{
TweenLite.killTweensOf(leftArrow);
leftArrow.visible = false;
leftArrow.alpha = 0;
}
private function restackUI():void{
var _local1:Array;
var _local2:int;
_local1 = ["musicMuteButton", "soundMuteButton", "refreshButton", "skipButton", "resetDialogue"];
_local2 = 0;
while (_local2 < _local1.length) {
if (getChildByName(_local1[_local2]) != null){
addChild(getChildByName(_local1[_local2]));
};
_local2++;
};
if (((specialOverlay) && ((specialOverlay is SkipDialogueOverlay)))){
addChild(specialOverlay);
};
}
private function onFadeIn(_arg1:Event):void{
fadeIn();
}
private function initialize():void{
leftArrow.buttonMode = true;
leftArrow.addEventListener(MouseEvent.CLICK, onClickLeft);
leftArrow.addEventListener(MouseEvent.ROLL_OVER, onRolloverArrow);
leftArrow.addEventListener(MouseEvent.ROLL_OUT, onRolloutArrow);
leftArrow.gotoAndStop(1);
rightArrow.buttonMode = true;
rightArrow.addEventListener(MouseEvent.CLICK, onClickRight);
rightArrow.addEventListener(MouseEvent.ROLL_OVER, onRolloverArrow);
rightArrow.addEventListener(MouseEvent.ROLL_OUT, onRolloutArrow);
rightArrow.gotoAndStop(1);
portrait.addEventListener(Portrait.SWITCH_CHARACTER, onSwitchCharacter);
}
private function onShowCatcher(_arg1:Event):void{
clickCatcher.visible = true;
if (!bubble){
clickCatcher.buttonMode = false;
};
restackUI();
}
private function destroyArea(_arg1:String="", _arg2:String=""):void{
var _local3:Setting;
var _local4:int;
Setting.stopMusic();
_local4 = 0;
while (_local4 < areaKeys.length) {
_local3 = area[areaKeys[_local4]];
_local3.removeEventListener(Setting.SHOW_LEFT, onShowLeftArrow);
_local3.removeEventListener(Setting.SHOW_RIGHT, onShowRightArrow);
_local3.removeEventListener(Setting.HIDE_LEFT, onHideLeftArrow);
_local3.removeEventListener(Setting.HIDE_RIGHT, onHideRightArrow);
_local3.removeEventListener(Setting.SHOW_CATCHER, onShowCatcher);
_local3.removeEventListener(Setting.HIDE_CATCHER, onHideCatcher);
_local3.removeEventListener(Setting.END_OF_DIALOGUE, onEndOfDialogue);
_local3.removeEventListener(Setting.SPECIAL_OVERLAY, onSpecialOverlay);
_local3.removeEventListener(Setting.SWITCH_VIEW, onSwitchView);
_local3.removeEventListener(Setting.RETURN_VIEW, onReturnView);
_local3.removeEventListener(Setting.TRAVEL, onTravel);
_local3.removeEventListener(Setting.FORCE_SWITCH, onSwitchCharacter);
_local3.removeEventListener(Setting.COMPLETE_AREA, onCompleteArea);
_local3.removeEventListener(SpeechEvent.SPEAK, onFeatureSpeak);
_local3.removeEventListener(SHOW_PORTRAIT, onShowPortrait);
_local3.removeEventListener(HIDE_PORTRAIT, onHidePortrait);
_local3.removeEventListener(FADE_IN, onFadeIn);
_local3.removeEventListener(FADE_OUT, onFadeOut);
_local3.scaleX = 0.5;
_local3.destroy();
if (_local3.contains(liam)){
_local3.removeChild(liam);
};
if (_local3.contains(reemus)){
_local3.removeChild(reemus);
};
while (_local3.numChildren > 0) {
_local3.removeChildAt(0);
};
if (contains(_local3)){
removeChild(_local3);
};
area[areaKeys[_local4]] = null;
_local3 = null;
_local4++;
};
if (specialOverlay){
if (contains(specialOverlay)){
removeChild(specialOverlay);
};
specialOverlay.removeEventListener(Setting.HIDE_OVERLAY, onHideOverlay);
specialOverlay = null;
};
addChild(liam);
removeChild(liam);
addChild(reemus);
removeChild(reemus);
setting = null;
areaKeys = [];
AudioManager.destroyAllSounds();
if (_arg1 != ""){
travelTo(_arg1, _arg2);
};
}
private function onHideCatcher(_arg1:Event):void{
if (((!(lockCatcher)) && (!(bubble)))){
clickCatcher.visible = false;
clickCatcher.buttonMode = false;
};
}
private function firstRun():void{
var _local1:InfoEvent;
if (Main.debugMode){
gotoAndStop(12);
} else {
_local1 = new InfoEvent(LevelSelect.MAKE_SELECTION, {id:"VisitorLeft"});
onLevelSelect(_local1);
};
}
private function onTravel(_arg1:InfoEvent):void{
travelTo(_arg1.data.dest, _arg1.data.entryPoint);
}
public function selectLevel(_arg1:String):void{
travelTo(_arg1);
setting.addCharacter(liam);
setting.addCharacter(reemus);
fadeIn();
addChildAt(setting, 0);
}
private function onShowRightArrow(_arg1:Event):void{
TweenLite.killTweensOf(rightArrow);
rightArrow.alpha = 0;
TweenLite.to(rightArrow, 0.5, {autoAlpha:1, delay:0.2});
}
private function onHideRightArrow(_arg1:Event):void{
TweenLite.killTweensOf(rightArrow);
rightArrow.visible = false;
rightArrow.alpha = 0;
}
private function onCharacterSpeak(_arg1:SpeechEvent):void{
var _local2:Character;
var _local3:uint;
_local2 = Character(_arg1.currentTarget);
_local3 = ((_local2 is Reemus)) ? 0xDD0000 : 6697881;
if (_arg1.speech.length <= 0){
clickCatcher.visible = false;
clickCatcher.buttonMode = false;
_local2.shush();
destroyBubble();
return;
};
clickCatcher.visible = true;
clickCatcher.buttonMode = true;
_local2.otherCharacter.shush();
bubbleOwner = ((_local2 is Reemus)) ? "reemus" : "liam";
if (((_local2.spriteIn) && (_local2.spriteIn.mouth))){
_local2.spriteIn.mouth.gotoAndPlay("talk");
};
destroyBubble();
bubble = new SpeechBubble(_arg1.speech);
bubble.x = (((setting.x + _local2.x) - 20) + (30 * int((_local2.scaleX > 0))));
bubble.y = (_local2.y - (((_local2 is Reemus)) ? Character.REEMUS_HEIGHT : Character.LIAM_HEIGHT * _local2.scaleY));
bubble.assessOrientation();
bubble.bubble.tip.scaleY = (1 / bubble.bubble.scaleY);
TweenLite.to(bubble.label, 0, {tint:_local3});
addChild(bubble);
}
private function returnView():void{
if (((forcedView) && (contains(forcedView)))){
removeChild(forcedView);
};
forcedView = null;
setting.handleReturnView();
}
private function switchView(_arg1:String):void{
if (area[_arg1] == setting){
return;
};
if (((forcedView) && (contains(forcedView)))){
removeChild(forcedView);
};
forcedView = area[_arg1];
addChild(forcedView);
}
}
}//package asfiles
Section 44
//MiniCredits (asfiles.MiniCredits)
package asfiles {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class MiniCredits extends MovieClip {
public var mitchButton:MovieClip;
public var moreReemusButton:MovieClip;
public var negativeButton:MovieClip;
public var zeebarfButton:MovieClip;
public function MiniCredits(){
zeebarfButton.buttonMode = true;
zeebarfButton.addEventListener(MouseEvent.CLICK, onClickZeebarf);
negativeButton.buttonMode = true;
negativeButton.addEventListener(MouseEvent.CLICK, onClickNegative);
mitchButton.buttonMode = true;
mitchButton.addEventListener(MouseEvent.CLICK, onClickMitch);
moreReemusButton.buttonMode = true;
moreReemusButton.addEventListener(MouseEvent.CLICK, onClickReemus);
}
private function onClickZeebarf(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.zeebarf.com"), "_blank");
}
private function onClickNegative(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.negativeflash.com"), "_blank");
}
private function onClickMitch(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.myspace.com/mitchellbowden"), "_blank");
}
private function onClickReemus(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com/collection/reemus.html"), "_blank");
}
}
}//package asfiles
Section 45
//MusicMuteButton (asfiles.MusicMuteButton)
package asfiles {
import flash.events.*;
import flash.display.*;
import asfiles.setting.*;
public class MusicMuteButton extends MovieClip {
public var hitBox:MovieClip;
public function MusicMuteButton(){
addFrameScript(0, frame1);
trace(("construct " + Setting.musicMuted));
buttonMode = true;
gotoAndStop((Setting.musicMuted) ? 2 : 1);
hitBox.addEventListener(MouseEvent.CLICK, onClickToggle);
}
function frame1(){
stop();
}
private function onClickToggle(_arg1:Event):void{
trace(("click " + currentFrame));
if (currentFrame == 1){
gotoAndStop(2);
Setting.muteMusic();
} else {
gotoAndStop(1);
Setting.unmuteMusic();
};
}
}
}//package asfiles
Section 46
//ResetButton (asfiles.ResetButton)
package asfiles {
import flash.events.*;
import flash.display.*;
public class ResetButton extends MovieClip {
public function ResetButton(){
stop();
buttonMode = true;
addEventListener(MouseEvent.CLICK, onClick);
}
private function onClick(_arg1:Event):void{
if (root){
Main(root).showResetDialogue();
};
}
}
}//package asfiles
Section 47
//ResetDialogue (asfiles.ResetDialogue)
package asfiles {
import flash.events.*;
import flash.display.*;
public class ResetDialogue extends MovieClip {
public var noButton:MovieClip;
public var yesButton:MovieClip;
public function ResetDialogue(){
visible = false;
yesButton.addEventListener(MouseEvent.CLICK, onClickYes);
yesButton.buttonMode = true;
noButton.addEventListener(MouseEvent.CLICK, onClickNo);
noButton.buttonMode = true;
}
private function onClickYes(_arg1:Event):void{
if (root){
Main(root).resetSetting();
};
visible = false;
}
private function onClickNo(_arg1:Event):void{
visible = false;
}
}
}//package asfiles
Section 48
//SoundMuteButton (asfiles.SoundMuteButton)
package asfiles {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public class SoundMuteButton extends MovieClip {
public var hitBox:MovieClip;
public function SoundMuteButton(){
addFrameScript(0, frame1);
buttonMode = true;
gotoAndStop((AudioManager.isMuted) ? 2 : 1);
hitBox.addEventListener(MouseEvent.CLICK, onClickToggle);
}
function frame1(){
stop();
}
private function onClickToggle(_arg1:Event):void{
if (currentFrame == 1){
gotoAndStop(2);
AudioManager.toggleMuting(true);
if (root){
MovieClip(root).setting.handleMuteState(true);
};
} else {
gotoAndStop(1);
AudioManager.toggleMuting(false);
if (root){
MovieClip(root).setting.handleMuteState(false);
};
};
}
}
}//package asfiles
Section 49
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class MD5 {
public static var digest:ByteArray;
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public static function hashBinary(_arg1:ByteArray):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
}
}//package com.adobe.crypto
Section 50
//JSON (com.adobe.serialization.json.JSON)
package com.adobe.serialization.json {
public class JSON {
public static function decode(_arg1:String){
var _local2:JSONDecoder;
_local2 = new JSONDecoder(_arg1);
return (_local2.getValue());
}
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder;
_local2 = new JSONEncoder(_arg1);
return (_local2.getString());
}
}
}//package com.adobe.serialization.json
Section 51
//JSONDecoder (com.adobe.serialization.json.JSONDecoder)
package com.adobe.serialization.json {
public class JSONDecoder {
private var value;
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
public function JSONDecoder(_arg1:String){
tokenizer = new JSONTokenizer(_arg1);
nextToken();
value = parseValue();
}
private function nextToken():JSONToken{
return ((token = tokenizer.getNextToken()));
}
private function parseObject():Object{
var _local1:Object;
var _local2:String;
_local1 = new Object();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
while (true) {
if (token.type == JSONTokenType.STRING){
_local2 = String(token.value);
nextToken();
if (token.type == JSONTokenType.COLON){
nextToken();
_local1[_local2] = parseValue();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting } or , but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting : but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting string but found " + token.value));
};
};
return (null);
}
private function parseArray():Array{
var _local1:Array;
_local1 = new Array();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
while (true) {
_local1.push(parseValue());
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting ] or , but found " + token.value));
};
};
return (null);
}
public function getValue(){
return (value);
}
private function parseValue():Object{
if (token == null){
tokenizer.parseError("Unexpected end of input");
};
switch (token.type){
case JSONTokenType.LEFT_BRACE:
return (parseObject());
case JSONTokenType.LEFT_BRACKET:
return (parseArray());
case JSONTokenType.STRING:
case JSONTokenType.NUMBER:
case JSONTokenType.TRUE:
case JSONTokenType.FALSE:
case JSONTokenType.NULL:
return (token.value);
default:
tokenizer.parseError(("Unexpected " + token.value));
};
return (null);
}
}
}//package com.adobe.serialization.json
Section 52
//JSONEncoder (com.adobe.serialization.json.JSONEncoder)
package com.adobe.serialization.json {
import flash.utils.*;
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1){
jsonString = convertToString(_arg1);
}
private function arrayToString(_arg1:Array):String{
var _local2:String;
var _local3:int;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
private function convertToString(_arg1):String{
if ((_arg1 is String)){
return (escapeString((_arg1 as String)));
};
if ((_arg1 is Number)){
return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null");
} else {
if ((_arg1 is Boolean)){
return ((_arg1) ? "true" : "false");
} else {
if ((_arg1 is Array)){
return (arrayToString((_arg1 as Array)));
};
if ((((_arg1 is Object)) && (!((_arg1 == null))))){
return (objectToString(_arg1));
};
};
};
return ("null");
}
private function escapeString(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:int;
var _local6:String;
var _local7:String;
_local2 = "";
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
_local3 = _arg1.charAt(_local5);
switch (_local3){
case "\"":
_local2 = (_local2 + "\\\"");
break;
case "\\":
_local2 = (_local2 + "\\\\");
break;
case "\b":
_local2 = (_local2 + "\\b");
break;
case "\f":
_local2 = (_local2 + "\\f");
break;
case "\n":
_local2 = (_local2 + "\\n");
break;
case "\r":
_local2 = (_local2 + "\\r");
break;
case "\t":
_local2 = (_local2 + "\\t");
break;
default:
if (_local3 < " "){
_local6 = _local3.charCodeAt(0).toString(16);
_local7 = ((_local6.length == 2)) ? "00" : "000";
_local2 = (_local2 + (("\\u" + _local7) + _local6));
} else {
_local2 = (_local2 + _local3);
};
};
_local5++;
};
return ((("\"" + _local2) + "\""));
}
private function objectToString(_arg1:Object):String{
var s:String;
var classInfo:XML;
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
s = "";
classInfo = describeType(o);
if (classInfo.@name.toString() == "Object"){
for (key in o) {
value = o[key];
if ((value is Function)){
} else {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(key) + ":") + convertToString(value)));
};
};
} else {
for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(v.@name.toString()) + ":") + convertToString(o[v.@name])));
};
};
return ((("{" + s) + "}"));
}
public function getString():String{
return (jsonString);
}
}
}//package com.adobe.serialization.json
Section 53
//JSONParseError (com.adobe.serialization.json.JSONParseError)
package com.adobe.serialization.json {
public class JSONParseError extends Error {
private var _text:String;
private var _location:int;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
name = "JSONParseError";
_location = _arg2;
_text = _arg3;
}
public function get text():String{
return (_text);
}
public function get location():int{
return (_location);
}
}
}//package com.adobe.serialization.json
Section 54
//JSONToken (com.adobe.serialization.json.JSONToken)
package com.adobe.serialization.json {
public class JSONToken {
private var _value:Object;
private var _type:int;
public function JSONToken(_arg1:int=-1, _arg2:Object=null){
_type = _arg1;
_value = _arg2;
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
public function get value():Object{
return (_value);
}
public function set type(_arg1:int):void{
_type = _arg1;
}
public function get type():int{
return (_type);
}
}
}//package com.adobe.serialization.json
Section 55
//JSONTokenizer (com.adobe.serialization.json.JSONTokenizer)
package com.adobe.serialization.json {
public class JSONTokenizer {
private var loc:int;
private var ch:String;
private var obj:Object;
private var jsonString:String;
public function JSONTokenizer(_arg1:String){
jsonString = _arg1;
loc = 0;
nextChar();
}
private function skipComments():void{
if (ch == "/"){
nextChar();
switch (ch){
case "/":
do {
nextChar();
} while (((!((ch == "\n"))) && (!((ch == "")))));
nextChar();
break;
case "*":
nextChar();
while (true) {
if (ch == "*"){
nextChar();
if (ch == "/"){
nextChar();
break;
};
} else {
nextChar();
};
if (ch == ""){
parseError("Multi-line comment not closed");
};
};
break;
default:
parseError((("Unexpected " + ch) + " encountered (expecting '/' or '*' )"));
};
};
}
private function isDigit(_arg1:String):Boolean{
return ((((_arg1 >= "0")) && ((_arg1 <= "9"))));
}
private function readNumber():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:Number;
_local1 = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
_local2 = "";
if (ch == "-"){
_local2 = (_local2 + "-");
nextChar();
};
if (!isDigit(ch)){
parseError("Expecting a digit");
};
if (ch == "0"){
_local2 = (_local2 + ch);
nextChar();
if (isDigit(ch)){
parseError("A digit cannot immediately follow 0");
};
} else {
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if (ch == "."){
_local2 = (_local2 + ".");
nextChar();
if (!isDigit(ch)){
parseError("Expecting a digit");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if ((((ch == "e")) || ((ch == "E")))){
_local2 = (_local2 + "e");
nextChar();
if ((((ch == "+")) || ((ch == "-")))){
_local2 = (_local2 + ch);
nextChar();
};
if (!isDigit(ch)){
parseError("Scientific notation number needs exponent value");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
_local3 = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
private function nextChar():String{
return ((ch = jsonString.charAt(loc++)));
}
public function getNextToken():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:String;
var _local4:String;
_local1 = new JSONToken();
skipIgnored();
switch (ch){
case "{":
_local1.type = JSONTokenType.LEFT_BRACE;
_local1.value = "{";
nextChar();
break;
case "}":
_local1.type = JSONTokenType.RIGHT_BRACE;
_local1.value = "}";
nextChar();
break;
case "[":
_local1.type = JSONTokenType.LEFT_BRACKET;
_local1.value = "[";
nextChar();
break;
case "]":
_local1.type = JSONTokenType.RIGHT_BRACKET;
_local1.value = "]";
nextChar();
break;
case ",":
_local1.type = JSONTokenType.COMMA;
_local1.value = ",";
nextChar();
break;
case ":":
_local1.type = JSONTokenType.COLON;
_local1.value = ":";
nextChar();
break;
case "t":
_local2 = ((("t" + nextChar()) + nextChar()) + nextChar());
if (_local2 == "true"){
_local1.type = JSONTokenType.TRUE;
_local1.value = true;
nextChar();
} else {
parseError(("Expecting 'true' but found " + _local2));
};
break;
case "f":
_local3 = (((("f" + nextChar()) + nextChar()) + nextChar()) + nextChar());
if (_local3 == "false"){
_local1.type = JSONTokenType.FALSE;
_local1.value = false;
nextChar();
} else {
parseError(("Expecting 'false' but found " + _local3));
};
break;
case "n":
_local4 = ((("n" + nextChar()) + nextChar()) + nextChar());
if (_local4 == "null"){
_local1.type = JSONTokenType.NULL;
_local1.value = null;
nextChar();
} else {
parseError(("Expecting 'null' but found " + _local4));
};
break;
case "\"":
_local1 = readString();
break;
default:
if (((isDigit(ch)) || ((ch == "-")))){
_local1 = readNumber();
} else {
if (ch == ""){
return (null);
};
parseError((("Unexpected " + ch) + " encountered"));
};
};
return (_local1);
}
private function skipWhite():void{
while (isWhiteSpace(ch)) {
nextChar();
};
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r"))));
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, loc, jsonString));
}
private function skipIgnored():void{
var _local1:int;
do {
_local1 = loc;
skipWhite();
skipComments();
} while (_local1 != loc);
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String;
_local2 = _arg1.toUpperCase();
return (((isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
private function readString():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:String;
var _local4:int;
_local1 = new JSONToken();
_local1.type = JSONTokenType.STRING;
_local2 = "";
nextChar();
while (((!((ch == "\""))) && (!((ch == ""))))) {
if (ch == "\\"){
nextChar();
switch (ch){
case "\"":
_local2 = (_local2 + "\"");
break;
case "/":
_local2 = (_local2 + "/");
break;
case "\\":
_local2 = (_local2 + "\\");
break;
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local3 = "";
_local4 = 0;
while (_local4 < 4) {
if (!isHexDigit(nextChar())){
parseError((" Excepted a hex digit, but found: " + ch));
};
_local3 = (_local3 + ch);
_local4++;
};
_local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16)));
break;
default:
_local2 = (_local2 + ("\\" + ch));
};
} else {
_local2 = (_local2 + ch);
};
nextChar();
};
if (ch == ""){
parseError("Unterminated string literal");
};
nextChar();
_local1.value = _local2;
return (_local1);
}
}
}//package com.adobe.serialization.json
Section 56
//JSONTokenType (com.adobe.serialization.json.JSONTokenType)
package com.adobe.serialization.json {
public class JSONTokenType {
public static const NUMBER:int = 11;
public static const FALSE:int = 8;
public static const RIGHT_BRACKET:int = 4;
public static const NULL:int = 9;
public static const TRUE:int = 7;
public static const RIGHT_BRACE:int = 2;
public static const UNKNOWN:int = -1;
public static const COMMA:int = 0;
public static const LEFT_BRACKET:int = 3;
public static const STRING:int = 10;
public static const LEFT_BRACE:int = 1;
public static const COLON:int = 6;
}
}//package com.adobe.serialization.json
Section 57
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 58
//StringUtil (com.adobe.utils.StringUtil)
package com.adobe.utils {
public class StringUtil {
public static function beginsWith(_arg1:String, _arg2:String):Boolean{
return ((_arg2 == _arg1.substring(0, _arg2.length)));
}
public static function trim(_arg1:String):String{
return (StringUtil.ltrim(StringUtil.rtrim(_arg1)));
}
public static function stringsAreEqual(_arg1:String, _arg2:String, _arg3:Boolean):Boolean{
if (_arg3){
return ((_arg1 == _arg2));
};
return ((_arg1.toUpperCase() == _arg2.toUpperCase()));
}
public static function replace(_arg1:String, _arg2:String, _arg3:String):String{
var _local4:String;
var _local5:Boolean;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local4 = new String();
_local5 = false;
_local6 = _arg1.length;
_local7 = _arg2.length;
_local8 = 0;
while (_local8 < _local6) {
if (_arg1.charAt(_local8) == _arg2.charAt(0)){
_local5 = true;
_local9 = 0;
while (_local9 < _local7) {
if (_arg1.charAt((_local8 + _local9)) != _arg2.charAt(_local9)){
_local5 = false;
break;
};
_local9++;
};
//unresolved if
_local4 = (_local4 + _arg3);
_local8 = (_local8 + (_local7 - 1));
} else {
_local4 = (_local4 + _arg1.charAt(_local8));
};
_local8++;
};
return (_local4);
}
public static function rtrim(_arg1:String):String{
var _local2:Number;
var _local3:Number;
_local2 = _arg1.length;
_local3 = _local2;
while (_local3 > 0) {
if (_arg1.charCodeAt((_local3 - 1)) > 32){
return (_arg1.substring(0, _local3));
};
_local3--;
};
return ("");
}
public static function endsWith(_arg1:String, _arg2:String):Boolean{
return ((_arg2 == _arg1.substring((_arg1.length - _arg2.length))));
}
public static function stringHasValue(_arg1:String):Boolean{
return (((!((_arg1 == null))) && ((_arg1.length > 0))));
}
public static function remove(_arg1:String, _arg2:String):String{
return (StringUtil.replace(_arg1, _arg2, ""));
}
public static function ltrim(_arg1:String):String{
var _local2:Number;
var _local3:Number;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (_arg1.charCodeAt(_local3) > 32){
return (_arg1.substring(_local3));
};
_local3++;
};
return ("");
}
}
}//package com.adobe.utils
Section 59
//SWFAddress (com.asual.swfaddress.SWFAddress)
package com.asual.swfaddress {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.errors.*;
import flash.external.*;
public class SWFAddress {
public static var onInit:Function;
private static var _queue:Array = new Array();
private static var _initTimer:Timer = new Timer(10);
private static var _initializer:Boolean = _initialize();
private static var _availability:Boolean = ExternalInterface.available;
private static var _initChanged:Boolean = false;
private static var _dispatcher:EventDispatcher = new EventDispatcher();
private static var _queueTimer:Timer = new Timer(10);
private static var _strict:Boolean = true;
private static var _init:Boolean = false;
private static var _value:String = "";
public static var onChange:Function;
private static var _initChange:Boolean = false;
public function SWFAddress(){
throw (new IllegalOperationError("SWFAddress cannot be instantiated."));
}
private static function _strictCheck(_arg1:String, _arg2:Boolean):String{
if (SWFAddress.getStrict()){
if (_arg2){
if (_arg1.substr(0, 1) != "/"){
_arg1 = ("/" + _arg1);
};
} else {
if (_arg1 == ""){
_arg1 = "/";
};
};
};
return (_arg1);
}
public static function getTracker():String{
return ((_availability) ? (ExternalInterface.call("SWFAddress.getTracker") as String) : "");
}
public static function setStatus(_arg1:String):void{
_call("SWFAddress.setStatus", encodeURI(decodeURI(_arg1)));
}
private static function _check(_arg1:TimerEvent):void{
if ((((((typeof(SWFAddress["onInit"]) == "function")) || (_dispatcher.hasEventListener(SWFAddressEvent.INIT)))) && (!(_init)))){
SWFAddress._setValueInit(_getValue());
SWFAddress._init = true;
};
if ((((typeof(SWFAddress["onChange"]) == "function")) || (_dispatcher.hasEventListener(SWFAddressEvent.CHANGE)))){
_initTimer.stop();
SWFAddress._init = true;
SWFAddress._setValueInit(_getValue());
};
}
private static function _setValue(_arg1:String):void{
if ((((_arg1 == "undefined")) || ((_arg1 == null)))){
_arg1 = "";
};
if ((((SWFAddress._value == _arg1)) && (SWFAddress._init))){
return;
};
if (!SWFAddress._initChange){
return;
};
SWFAddress._value = _arg1;
if (!_init){
SWFAddress._init = true;
if ((((typeof(SWFAddress["onInit"]) == "function")) || (_dispatcher.hasEventListener(SWFAddressEvent.INIT)))){
_dispatchEvent(SWFAddressEvent.INIT);
};
};
_dispatchEvent(SWFAddressEvent.CHANGE);
}
public static function getStatus():String{
var _local1:String;
_local1 = (_availability) ? (ExternalInterface.call("SWFAddress.getStatus") as String) : "";
if ((((_local1 == "undefined")) || ((_local1 == null)))){
_local1 = "";
};
return (decodeURI(_local1));
}
private static function _getValue():String{
var _local1:String;
var _local2:String;
var _local3:Array;
_local2 = null;
if (_availability){
_local1 = (ExternalInterface.call("SWFAddress.getValue") as String);
_local3 = (ExternalInterface.call("SWFAddress.getIds") as Array);
if (_local3 != null){
_local2 = _local3.toString();
};
};
if ((((((_local2 == null)) || (!(_availability)))) || (_initChanged))){
_local1 = SWFAddress._value;
} else {
if ((((_local1 == "undefined")) || ((_local1 == null)))){
_local1 = "";
};
};
return (_strictCheck(((_local1) || ("")), false));
}
public static function up():void{
var _local1:String;
_local1 = SWFAddress.getPath();
SWFAddress.setValue(_local1.substr(0, (_local1.lastIndexOf("/", (_local1.length - 2)) + ((_local1.substr((_local1.length - 1)) == "/")) ? 1 : 0)));
}
public static function getParameterNames():Array{
var _local1:String;
var _local2:Number;
var _local3:Array;
var _local4:Array;
var _local5:Number;
_local1 = SWFAddress.getValue();
_local2 = _local1.indexOf("?");
_local3 = new Array();
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 1));
if (((!((_local1 == ""))) && (!((_local1.indexOf("=") == -1))))){
_local4 = _local1.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local3.push(_local4[_local5].split("=")[0]);
_local5++;
};
};
};
return (_local3);
}
public static function setTitle(_arg1:String):void{
_call("SWFAddress.setTitle", encodeURI(decodeURI(_arg1)));
}
public static function resetStatus():void{
_call("SWFAddress.resetStatus");
}
public static function getBaseURL():String{
var _local1:String;
_local1 = null;
if (_availability){
_local1 = String(ExternalInterface.call("SWFAddress.getBaseURL"));
};
return (((((((_local1 == null)) || ((_local1 == "null")))) || (!(_availability)))) ? "" : _local1);
}
public static function getTitle():String{
var _local1:String;
_local1 = (_availability) ? (ExternalInterface.call("SWFAddress.getTitle") as String) : "";
if ((((_local1 == "undefined")) || ((_local1 == null)))){
_local1 = "";
};
return (decodeURI(_local1));
}
public static function getPath():String{
var _local1:String;
_local1 = SWFAddress.getValue();
if (_local1.indexOf("?") != -1){
return (_local1.split("?")[0]);
};
if (_local1.indexOf("#") != -1){
return (_local1.split("#")[0]);
};
return (_local1);
}
public static function href(_arg1:String, _arg2:String="_self"):void{
if (((_availability) && ((Capabilities.playerType == "ActiveX")))){
ExternalInterface.call("SWFAddress.href", _arg1, _arg2);
return;
};
navigateToURL(new URLRequest(_arg1), _arg2);
}
private static function _initialize():Boolean{
if (_availability){
try {
_availability = (ExternalInterface.call("function() { return (typeof SWFAddress != \"undefined\"); }") as Boolean);
ExternalInterface.addCallback("getSWFAddressValue", function ():String{
return (_value);
});
ExternalInterface.addCallback("setSWFAddressValue", _setValue);
} catch(e:Error) {
_availability = false;
};
};
_queueTimer.addEventListener(TimerEvent.TIMER, _callQueue);
_initTimer.addEventListener(TimerEvent.TIMER, _check);
_initTimer.start();
return (true);
}
public static function popup(_arg1:String, _arg2:String="popup", _arg3:String="""", _arg4:String=""):void{
if (((_availability) && ((((Capabilities.playerType == "ActiveX")) || (ExternalInterface.call("asual.util.Browser.isSafari")))))){
ExternalInterface.call("SWFAddress.popup", _arg1, _arg2, _arg3, _arg4);
return;
};
navigateToURL(new URLRequest((((((((("javascript:popup=window.open(\"" + _arg1) + "\",\"") + _arg2) + "\",") + _arg3) + ");") + _arg4) + ";void(0);")), "_self");
}
public static function setValue(_arg1:String):void{
if ((((_arg1 == "undefined")) || ((_arg1 == null)))){
_arg1 = "";
};
_arg1 = encodeURI(decodeURI(_strictCheck(_arg1, true)));
if (SWFAddress._value == _arg1){
return;
};
SWFAddress._value = _arg1;
_call("SWFAddress.setValue", _arg1);
if (SWFAddress._init){
_dispatchEvent(SWFAddressEvent.CHANGE);
} else {
_initChanged = true;
};
}
public static function getValue():String{
return (decodeURI(_strictCheck(((_value) || ("")), false)));
}
private static function _call(_arg1:String, _arg2:Object=""):void{
if (_availability){
if (Capabilities.os.indexOf("Mac") != -1){
if (_queue.length == 0){
_queueTimer.start();
};
_queue.push({fn:_arg1, param:_arg2});
} else {
ExternalInterface.call(_arg1, _arg2);
};
};
}
private static function _setValueInit(_arg1:String):void{
SWFAddress._value = _arg1;
if (!_init){
_dispatchEvent(SWFAddressEvent.INIT);
} else {
_dispatchEvent(SWFAddressEvent.CHANGE);
};
_initChange = true;
}
public static function getStrict():Boolean{
var _local1:String;
_local1 = null;
if (_availability){
_local1 = (ExternalInterface.call("SWFAddress.getStrict") as String);
};
return (((_local1)==null) ? _strict : (_local1 == "true"));
}
public static function dispatchEvent(_arg1:Event):Boolean{
return (_dispatcher.dispatchEvent(_arg1));
}
private static function _dispatchEvent(_arg1:String):void{
if (_dispatcher.hasEventListener(_arg1)){
_dispatcher.dispatchEvent(new SWFAddressEvent(_arg1));
};
_arg1 = (_arg1.substr(0, 1).toUpperCase() + _arg1.substring(1));
if (typeof(SWFAddress[("on" + _arg1)]) == "function"){
var _local2 = SWFAddress;
_local2[("on" + _arg1)]();
};
}
public static function getQueryString():String{
var _local1:String;
var _local2:Number;
_local1 = SWFAddress.getValue();
_local2 = _local1.indexOf("?");
if (((!((_local2 == -1))) && ((_local2 < _local1.length)))){
return (_local1.substr((_local2 + 1)));
};
return ("");
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public static function setStrict(_arg1:Boolean):void{
_call("SWFAddress.setStrict", _arg1);
_strict = _arg1;
}
public static function forward():void{
_call("SWFAddress.forward");
}
public static function setHistory(_arg1:Boolean):void{
_call("SWFAddress.setHistory", _arg1);
}
private static function _callQueue(_arg1:TimerEvent):void{
var _local2:String;
var _local3:int;
var _local4:Object;
if (_queue.length != 0){
_local2 = "";
_local3 = 0;
while ((_local4 = _queue[_local3])) {
if ((_local4.param is String)){
_local4.param = (("\"" + _local4.param) + "\"");
};
_local2 = (_local2 + (((_local4.fn + "(") + _local4.param) + ");"));
_local3++;
};
_queue = new Array();
navigateToURL(new URLRequest((("javascript:" + _local2) + "void(0);")), "_self");
} else {
_queueTimer.stop();
};
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function back():void{
_call("SWFAddress.back");
}
public static function getHistory():Boolean{
return ((_availability) ? (ExternalInterface.call("SWFAddress.getHistory") as Boolean) : false);
}
public static function getParameter(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:Array;
var _local5:Array;
var _local6:Number;
_local2 = SWFAddress.getValue();
_local3 = _local2.indexOf("?");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 1));
_local4 = _local2.split("&");
_local6 = _local4.length;
while (_local6--) {
_local5 = _local4[_local6].split("=");
if (_local5[0] == _arg1){
return (_local5[1]);
};
};
};
return ("");
}
public static function go(_arg1:int):void{
_call("SWFAddress.go", _arg1);
}
public static function hasEventListener(_arg1:String):Boolean{
return (_dispatcher.hasEventListener(_arg1));
}
public static function getPathNames():Array{
var _local1:String;
var _local2:Array;
_local1 = SWFAddress.getPath();
_local2 = _local1.split("/");
if ((((_local1.substr(0, 1) == "/")) || ((_local1.length == 0)))){
_local2.splice(0, 1);
};
if (_local1.substr((_local1.length - 1), 1) == "/"){
_local2.splice((_local2.length - 1), 1);
};
return (_local2);
}
public static function setTracker(_arg1:String):void{
_call("SWFAddress.setTracker", _arg1);
}
}
}//package com.asual.swfaddress
Section 60
//SWFAddressEvent (com.asual.swfaddress.SWFAddressEvent)
package com.asual.swfaddress {
import flash.events.*;
public class SWFAddressEvent extends Event {
private var _path:String;
private var _parameters:Object;
private var _pathNames:Array;
private var _value:String;
private var _parameterNames:Array;
public static const INIT:String = "init";
public static const CHANGE:String = "change";
public function SWFAddressEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function get target():Object{
return (SWFAddress);
}
override public function clone():Event{
return (new SWFAddressEvent(type, bubbles, cancelable));
}
public function get parameterNames():Array{
if (_parameterNames == null){
_parameterNames = SWFAddress.getParameterNames();
};
return (_parameterNames);
}
public function get pathNames():Array{
if (_pathNames == null){
_pathNames = SWFAddress.getPathNames();
};
return (_pathNames);
}
public function get path():String{
if (_path == null){
_path = SWFAddress.getPath();
};
return (_path);
}
override public function toString():String{
return (formatToString("SWFAddressEvent", "type", "bubbles", "cancelable", "eventPhase", "value", "path", "pathNames", "parameterNames", "parameters"));
}
override public function get currentTarget():Object{
return (SWFAddress);
}
public function get value():String{
if (_value == null){
_value = SWFAddress.getValue();
};
return (_value);
}
public function get parameters():Object{
var _local1:int;
if (_parameters == null){
_parameters = new Object();
_local1 = 0;
while (_local1 < parameterNames.length) {
_parameters[parameterNames[_local1]] = SWFAddress.getParameter(parameterNames[_local1]);
_local1++;
};
};
return (_parameters);
}
override public function get type():String{
return (super.type);
}
}
}//package com.asual.swfaddress
Section 61
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent)
package com.kongregate.as3.client.events {
import flash.events.*;
public class KongregateEvent extends Event {
public static const COMPLETE:String = "component_api_available";
public function KongregateEvent(_arg1:String){
super(_arg1);
}
}
}//package com.kongregate.as3.client.events
Section 62
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService)
package com.kongregate.as3.client.services {
import flash.events.*;
public class AbstractShadowService extends EventDispatcher {
protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{
trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4));
}
}
}//package com.kongregate.as3.client.services
Section 63
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow)
package com.kongregate.as3.client.services {
public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices {
private var mode:String;
public function HighScoreServiceShadow(){
mode = "";
}
public function submit(_arg1:Number, _arg2:String=null):void{
alert("IHighScoreServices", "submit", arguments);
}
public function connect():Boolean{
alert("IKongregateServices", "connect");
return (true);
}
public function requestList(_arg1:Function):void{
alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]"));
_arg1({success:false});
}
public function setMode(_arg1:String):void{
alert("IHighScoreServices", "setMode", arguments);
this.mode = _arg1;
}
}
}//package com.kongregate.as3.client.services
Section 64
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices)
package com.kongregate.as3.client.services {
public interface IHighScoreServices {
function setMode(_arg1:String):void;
function submit(_arg1:Number, _arg2:String=null):void;
function requestList(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 65
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices)
package com.kongregate.as3.client.services {
import flash.events.*;
public interface IKongregateServices extends IEventDispatcher {
function getPlayerInfo(_arg1:Function):void;
function connect(_arg1:Number=-1):Boolean;
}
}//package com.kongregate.as3.client.services
Section 66
//IStatServices (com.kongregate.as3.client.services.IStatServices)
package com.kongregate.as3.client.services {
public interface IStatServices {
function submitArray(_arg1:Array):void;
function submit(_arg1:String, _arg2:Number):void;
}
}//package com.kongregate.as3.client.services
Section 67
//IUserServices (com.kongregate.as3.client.services.IUserServices)
package com.kongregate.as3.client.services {
public interface IUserServices {
function getName():String;
function getPlayerInfo(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 68
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow)
package com.kongregate.as3.client.services {
public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices {
public function getName():String{
alert("IKongregateServices", "getName");
return ("Guest");
}
public function connect(_arg1:Number=-1):Boolean{
alert("IKongregateServices", "connect", arguments);
return (true);
}
public function getPlayerInfo(_arg1:Function):void{
alert("IKongregateServices", "getPlayerInfo");
_arg1(new Object());
}
}
}//package com.kongregate.as3.client.services
Section 69
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow)
package com.kongregate.as3.client.services {
public class StatServiceShadow extends AbstractShadowService implements IStatServices {
public function submitArray(_arg1:Array):void{
alert("IStatServices", "submitArray", arguments);
}
public function submit(_arg1:String, _arg2:Number):void{
alert("IStatServices", "submitStat", arguments);
}
}
}//package com.kongregate.as3.client.services
Section 70
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow)
package com.kongregate.as3.client.services {
public class UserServiceShadow extends AbstractShadowService implements IUserServices {
public function getName():String{
alert("UserService", "getName");
return ("Guest");
}
public function getPlayerInfo(_arg1:Function):void{
alert("UserService", "getPlayerInfo");
_arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""});
}
}
}//package com.kongregate.as3.client.services
Section 71
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
public interface IAPIBootstrap {
function init(_arg1:Event=null, _arg2:Stage=null):void;
function hideLog():void;
function showLog(_arg1:int=0):void;
}
}//package com.kongregate.as3.client
Section 72
//KongregateAPI (com.kongregate.as3.client.KongregateAPI)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import com.kongregate.as3.client.services.*;
import flash.system.*;
import com.kongregate.as3.client.events.*;
import flash.errors.*;
public class KongregateAPI extends Sprite {
private const VERSION:Number = 1;
private var loader:Loader;
private var loadedDomain:ApplicationDomain;
private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices";
private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices";
private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices";
private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices";
private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf";
private static var _connected:Boolean;
private static var kUser:IUserServices;
private static var _loaded:Boolean;
private static var kServices:IKongregateServices;
private static var kScores:IHighScoreServices;
private static var mInstance:KongregateAPI;
private static var kStats:IStatServices;
private static var kAPI:IAPIBootstrap;
public function KongregateAPI(){
if (mInstance != null){
throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access."));
};
mInstance = this;
this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
public function get loaded():Boolean{
return (_loaded);
}
public function get connected():Boolean{
return (_connected);
}
private function alertConnected(_arg1:TimerEvent=null):void{
var _local2:KongregateEvent;
var _local3:Boolean;
_local2 = new KongregateEvent(KongregateEvent.COMPLETE);
_local3 = this.dispatchEvent(_local2);
}
private function init(_arg1:Event):void{
var _local2:Object;
var _local3:String;
var _local4:URLRequest;
var _local5:LoaderContext;
this.removeEventListener(Event.ADDED_TO_STAGE, init);
_loaded = false;
_connected = false;
_local2 = LoaderInfo(root.loaderInfo).parameters;
_local3 = _local2.api_path;
if (_local3 == null){
trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded.");
createShadowServices();
return;
};
Security.allowDomain("*.kongregate.com");
Security.allowDomain("kongregatetrunk.com");
_local4 = new URLRequest(_local3);
_local5 = new LoaderContext(false);
_local5.applicationDomain = ApplicationDomain.currentDomain;
_local5.securityDomain = SecurityDomain.currentDomain;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(_local4, _local5);
}
public function get api():IAPIBootstrap{
return (kAPI);
}
private function loadComplete(_arg1:Event):void{
getServices();
}
public function get scores():IHighScoreServices{
return (kScores);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
throw (new IOError(("API file not found. " + _arg1)));
}
public function get services():IKongregateServices{
return (kServices);
}
public function get stats():IStatServices{
return (kStats);
}
private function createShadowServices():void{
var _local1:Timer;
trace(">>> Kongregate Shadow Services instantiated for local development..");
kServices = new KongregateServiceShadow();
kScores = new HighScoreServiceShadow();
kStats = new StatServiceShadow();
kUser = new UserServiceShadow();
_local1 = new Timer(200, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected);
_local1.start();
_connected = true;
}
public function get user():IUserServices{
return (kUser);
}
private function getServices():void{
var _local1:ApplicationDomain;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = ApplicationDomain.currentDomain;
kAPI = IAPIBootstrap(loader.getChildAt(0));
this.addChild(loader);
_local2 = _local1.getDefinition(CLASS_SERVICES);
trace(_local2);
kServices = _local2.getInstance();
_local3 = _local1.getDefinition(CLASS_SCORES);
kScores = _local3.getInstance();
_local4 = _local1.getDefinition(CLASS_STATS);
kStats = _local4.getInstance();
_local5 = _local1.getDefinition(CLASS_USER);
kUser = _local5.getInstance();
kServices.connect(VERSION);
_loaded = true;
_connected = true;
alertConnected();
}
public static function getInstance():KongregateAPI{
if (!mInstance){
throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it."));
};
return (mInstance);
}
}
}//package com.kongregate.as3.client
Section 73
//BaseN (com.newgrounds.BaseN)
package com.newgrounds {
import flash.utils.*;
public class BaseN {
private var _hashIndex:String;
private var _base:Number;
private var _hashVal:Dictionary;
public function BaseN(_arg1:String=null){
var _local2:uint;
super();
if (_arg1){
_hashIndex = _arg1;
} else {
_hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
};
_base = _hashIndex.length;
_hashVal = new Dictionary();
_local2 = 0;
while (_local2 < _base) {
_hashVal[_hashIndex.charAt(_local2)] = _local2;
_local2++;
};
}
private function baseNDecoder(_arg1:String):uint{
var _local2:uint;
var _local3:uint;
_local2 = 0;
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 * _base);
_local2 = (_local2 + _hashVal[_arg1.charAt(_local3)]);
_local3++;
};
return (_local2);
}
public function decode(_arg1:String):Number{
var _local2:String;
var _local3:Array;
_local2 = "";
if (_arg1.charAt(0) == "-"){
_local2 = "-";
_arg1 = _arg1.substring(1);
};
_local3 = _arg1.split(".", 2);
_local2 = (_local2 + baseNDecoder(_local3[0]));
if (_local3.length > 1){
_local2 = (_local2 + ".");
_local2 = (_local2 + baseNDecoder(_local3[1]));
};
return (Number(_local2));
}
public function encode(_arg1:Number, _arg2:uint=1):String{
var _local3:String;
var _local4:String;
var _local5:Array;
_local3 = _arg1.toString();
_local4 = "";
if (_local3.charAt(0) == "-"){
_local4 = "-";
_local3 = _local3.substring(1);
};
_local5 = _local3.split(".", 2);
_local4 = (_local4 + baseNEncoder(_local5[0], _arg2));
if (_local5.length > 1){
_local4 = (_local4 + ("." + baseNEncoder(_local5[1])));
};
return (_local4);
}
private function baseNEncoder(_arg1:uint, _arg2:uint=1):String{
var _local3:String;
var _local4:uint;
_local3 = "";
_local4 = _arg1;
while (_local4 != 0) {
_local3 = (_hashIndex.charAt((_local4 % _base)) + _local3);
_local4 = (_local4 / _base);
};
if (_arg2){
while (_local3.length < _arg2) {
_local3 = (_hashIndex.charAt(0) + _local3);
};
};
return (_local3);
}
}
}//package com.newgrounds
Section 74
//NewgroundsAPI (com.newgrounds.NewgroundsAPI)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.adobe.serialization.json.*;
import flash.net.*;
import flash.system.*;
import com.adobe.crypto.*;
import flash.text.*;
public class NewgroundsAPI extends EventDispatcher {
private static const COMMANDS_WIKI_URL:String = "http://www.newgrounds.com/wiki/flashapi/commands/";
public static const events:Object = {MOVIE_CONNECTED:1, ADS_APPROVED:2, AD_ATTACHED:3, HOST_BLOCKED:4, NEW_VERSION_AVAILABLE:5, EVENT_LOGGED:6, SCORE_POSTED:7, SCORES_LOADED:8, MEDAL_UNLOCKED:9, MEDALS_LOADED:10, FILE_PRIVS_LOADED:11, FILE_SAVED:12};
private static const AD_TERMS_URL:String = "http://www.newgrounds.com/wiki/flashads/terms/";
private static const REMOVED_FROM_STAGE:String = "removedFromStage";
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway_v2.php";
private static var connected:Boolean;
private static var error_format:TextFormat;
private static var user_id:Number;
private static var _initialized:Boolean = false;
private static var ad_swf_url:String;
private static var ad:Loader;
private static var user_email:String;
private static var ad_reset:Number = 0;
private static var publisher_id:Number;
private static var listeners:Array = setDefaultListeners();
private static var debug:Boolean;
private static var normal_format:TextFormat;
private static var do_echo:Boolean = false;
private static var ad_url:String;
private static var medals:Array = null;
private static var session_id:String;
private static var timeoutTimer:Timer;
public static var errors:Dictionary = NewgroundsAPIError.init_codes();
private static var adURLLoader:URLLoader;
private static var tracker_id:uint;
private static var user_name:String;
private static var movie_id:String;
private static var adContainer:Sprite;
private static var encryption_key:String;
private static var flashAdTarget:DisplayObjectContainer;
private static var host:String;
private static var loaders:Array = [];
private static var compressor:BaseN = new BaseN(compression_radix);
private static var period_aliases:Object = {t:{name:"Today", alias:"TODAY"}, p:{name:"Yesterday", alias:"YESTERDAY"}, w:{name:"This Week", alias:"THIS_WEEK"}, m:{name:"This Month", alias:"THIS_MONTH"}, y:{name:"This Year", alias:"THIS_YEAR"}, a:{name:"All-Time", alias:"ALL_TIME"}};
private static var score_page_counts:Object = new Object();
private static var version:String;
private static var link_format:TextFormat;
public static var periods:Object = getPeriodAliases();
private static var root:DisplayObject;
private static var compression_radix:String = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
private static var sharedObjects:Object = new Object();
private static var header_format:TextFormat;
private static var save_file = null;
public static function setMovieVersion(_arg1:String):void{
if (_arg1){
version = String(_arg1);
};
}
public static function unlockMedal(_arg1:String, _arg2:Boolean=false):void{
var _local3:Object;
if (!_arg1){
sendError({command_id:getCommandID("unlockMedal")}, new NewgroundsAPIError("MISSING_PARAM", "missing required medal name"));
return;
};
_local3 = new Object();
_local3.medal = _arg1;
_local3.get_score = _arg2;
sendSecureCommand("unlockMedal", _local3);
}
private static function uncompressHex(_arg1:String):String{
var _local2:uint;
var _local3:String;
var _local4:uint;
var _local5:uint;
var _local6:String;
var _local7:uint;
var _local8:String;
_local2 = uint(_arg1.charAt(0));
_local3 = "";
_local5 = 1;
while (_local5 < _arg1.length) {
_local6 = _arg1.substr(_local5, 4);
_local7 = uint(compressor.decode(_local6));
_local8 = _local7.toString(16);
if ((_local5 + 4) < _arg1.length){
_local4 = 6;
} else {
_local4 = _local2;
};
while (_local8.length < _local4) {
_local8 = ("0" + _local8);
};
_local3 = (_local3 + _local8);
_local5 = (_local5 + 4);
};
return (_local3);
}
public static function isFlashVersion(_arg1:uint, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0):Boolean{
var _local6:Array;
var _local7:Array;
var _local8:uint;
_local6 = Capabilities.version.split(" ")[1].split(",");
_local7 = arguments;
_local8 = 0;
while (_local8 < _local7.length) {
_local6[_local8] = uint(_local6[_local8]);
_local8++;
};
_local8 = 0;
while (_local8 < _local7.length) {
if (_local6[_local8] > _local7[_local8]){
return (true);
};
if (_local6[_local8] < _local7[_local8]){
return (false);
};
_local8++;
};
return (true);
}
public static function loadLocal(_arg1:String){
var _local2:SharedObject;
if (!sharedObjects[_arg1]){
sharedObjects[_arg1] = SharedObject.getLocal(((("ng_ap_secure_" + movie_id) + "_") + _arg1));
};
_local2 = sharedObjects[_arg1];
_local2.flush();
if (_local2.data[_arg1]){
return (decodeData(sharedObjects.data[_arg1]));
};
return (null);
}
public static function hasUserEmail():Boolean{
return (((!((user_email == null))) && (!((user_email == "")))));
}
private static function getHost():String{
return (host);
}
public static function getYesterdaysScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "y", _arg2, "getYesterdaysScores");
}
public static function onNewVersionAvailable(_arg1:Object, _arg2:Object):void{
}
private static function echo(_arg1:String):void{
if (do_echo){
trace(_arg1);
};
}
public static function attachFlashAd(_arg1:DisplayObjectContainer):void{
var _local2:URLRequest;
Security.allowDomain("http://server.cpmstar.com");
Security.allowDomain("http://www.cpmstar.com");
Security.allowDomain("https://server.cpmstar.com");
Security.allowDomain("https://www.cpmstar.com");
Security.allowInsecureDomain("http://server.cpmstar.com");
Security.allowInsecureDomain("http://www.cpmstar.com");
Security.allowInsecureDomain("https://server.cpmstar.com");
Security.allowInsecureDomain("https://www.cpmstar.com");
flashAdTarget = _arg1;
sendMessage("You may get a security sandbox violation from this ad. This is nothing to worry about!");
if (resetAdTimer()){
if (ad_url){
adURLLoader = new URLLoader();
adURLLoader.addEventListener(Event.COMPLETE, adLoaderHandler);
adURLLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
if (ad_url.indexOf("?") > -1){
_local2 = new URLRequest(((ad_url + "&random=") + Math.random()));
adURLLoader.load(_local2);
} else {
_local2 = new URLRequest(((ad_url + "?random=") + Math.random()));
adURLLoader.load(_local2);
};
};
} else {
renderAd(_arg1);
};
}
public static function getThisMonthsScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "m", _arg2, "getThisMonthsScores");
}
public static function getScores(_arg1:String, _arg2:String, _arg3:Object=null, _arg4:String=null):void{
var _local5:String;
if (!_arg3){
_arg3 = new Object();
};
if (!hasUserSession()){
callListener(events.SCORES_LOADED, false, new NewgroundsAPIError("SITE_ID_REQUIRED", (("Host '" + getHost()) + "' does not have high scores enabled")));
return;
};
_arg3.publisher_id = publisher_id;
_arg3.period = _arg2;
_arg3.score = _arg1;
if (_arg3.user_id){
_local5 = _arg2;
} else {
_local5 = (_arg2 + "-u");
};
if (score_page_counts[_local5] == undefined){
_arg3.request_page_count = true;
};
sendCommand("getScores", _arg3);
}
public static function sendSecureCommand(_arg1:String, _arg2:Object, _arg3:Object=null, _arg4:Object=null):void{
var _local5:String;
var _local6:uint;
var _local7:String;
var _local8:String;
var _local9:String;
if (((((!(debug)) && (!(hasUserSession())))) && (!(hasUserEmail())))){
sendError({command_id:getCommandID(_arg1)}, new NewgroundsAPIError("IDENTIFICATION_REQUIRED", (("You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail(\"name@domain.com\"); ) to use " + _arg1) + "().")));
return;
};
if (!_arg1){
fatalError("Missing command", "sendSecureCommand");
};
if (!_arg2){
fatalError("Missing secure_params", "sendSecureCommand");
};
if (!_arg3){
_arg3 = new Object();
};
_local5 = "";
_local6 = 0;
while (_local6 < 16) {
_local5 = (_local5 + compression_radix.charAt(Math.floor((Math.random() * compression_radix.length))));
_local6++;
};
if (debug){
_arg2.session_id = "";
} else {
_arg2.session_id = session_id;
};
_arg2.as_version = 3;
_arg2.user_email = user_email;
_arg2.publisher_id = publisher_id;
_arg2.seed = _local5;
_arg2.command_id = getCommandID(_arg1);
_local7 = MD5.hash(_local5);
_local8 = RC4.encrypt(JSON.encode(_arg2), encryption_key);
_local9 = (_local7 + _local8);
_arg3.secure = compressHex(_local9);
sendCommand("securePacket", _arg3, false, _arg4);
}
private static function initTextFormats():void{
if (!error_format){
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 0xFF0000;
};
if (!header_format){
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 0xFFFFFF;
};
if (!normal_format){
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 0xFFFFFF;
};
if (!link_format){
link_format = new TextFormat();
link_format.color = 0xFFFF00;
link_format.underline = true;
};
}
private static function getCommandName(_arg1:String):String{
return (_arg1);
}
private static function getPeriodAliases():Object{
var _local1:Object;
var _local2:String;
_local1 = new Object();
for (_local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
};
return (_local1);
}
public static function removeEventListener(_arg1:uint):void{
delete listeners[_arg1];
}
public static function getThisWeeksScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "w", _arg2, "getThisWeeksScores");
}
public static function setUserEmail(_arg1:String):void{
user_email = _arg1;
}
public static function hasUserSession():Boolean{
return (((((!((session_id == null))) && (!((session_id == ""))))) && (!((publisher_id == 0)))));
}
public static function getMedals():Array{
return (medals);
}
public static function addEventListener(_arg1:uint, _arg2:Function, _arg3:Object=null):void{
listeners[_arg1] = {listener:_arg2, params:_arg3};
}
private static function callListener(_arg1:uint, _arg2:Boolean, _arg3=undefined, _arg4=undefined):void{
echo(("Fired Event: " + getEventName(_arg1)));
if (listeners[_arg1]){
if ((_arg3 is NewgroundsAPIError)){
listeners[_arg1].listener({event:_arg1, success:_arg2, error:_arg3, target:_arg4}, listeners[_arg1].params);
} else {
listeners[_arg1].listener({event:_arg1, success:_arg2, data:_arg3, target:_arg4}, listeners[_arg1].params);
};
};
}
private static function compressHex(_arg1:String):String{
var _local2:uint;
var _local3:String;
var _local4:uint;
_local2 = (_arg1.length % 6);
_local3 = "";
_local4 = 0;
while (_local4 < _arg1.length) {
_local3 = (_local3 + compressor.encode(uint(("0x" + _arg1.substr(_local4, 6))), 4));
_local4 = (_local4 + 6);
};
return ((_local2.toString() + _local3));
}
private static function adLoaderHandler(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
if (_local2.data){
ad_swf_url = String(_local2.data);
} else {
ad_swf_url = null;
};
renderAd(flashAdTarget);
}
public static function checkFilePrivs(_arg1:String, _arg2:String):void{
var _local3:uint;
var _local4:Object;
if (user_id){
_local3 = user_id;
} else {
_local3 = 0;
};
_local4 = {folder:_arg1, filename:_arg2, user_id:_local3, publisher_id:publisher_id};
sendCommand("checkFilePrivs", _local4);
}
public static function connectMovie(_arg1:DisplayObject, _arg2:String, _arg3:String, _arg4:Boolean):void{
initialize(_arg1);
if (connected){
return;
};
timeoutTimer.start();
if (!_arg2){
fatalError("NewgroundsAPI.connectMovie() - missing required movie_id parameter", "connectMovie");
};
movie_id = String(_arg2);
tracker_id = uint(movie_id.substring(0, movie_id.indexOf(":")));
encryption_key = _arg3;
debug = _arg4;
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
private static function sendMessage(_arg1:String, _arg2:Boolean=false):String{
var _local3:String;
_local3 = ("[NewgroundsAPI] :: " + _arg1);
if (_arg2){
return (_local3);
};
trace(_local3);
return (null);
}
private static function renderAd(_arg1:DisplayObjectContainer):void{
var _local2:Shape;
var _local3:Shape;
if (ad){
removeAd();
};
if (ad_swf_url){
_local2 = new Shape();
_local2.graphics.beginFill(0);
_local2.graphics.moveTo(0, 0);
_local2.graphics.lineTo(300, 0);
_local2.graphics.lineTo(300, 250);
_local2.graphics.lineTo(0, 250);
_local2.graphics.lineTo(0, 0);
_local2.graphics.endFill();
_local3 = new Shape();
_local3.graphics.beginFill(0);
_local3.graphics.moveTo(0, 0);
_local3.graphics.lineTo(300, 0);
_local3.graphics.lineTo(300, 250);
_local3.graphics.lineTo(0, 250);
_local3.graphics.lineTo(0, 0);
_local3.graphics.endFill();
ad = new Loader();
adContainer = new Sprite();
adContainer.addChild(_local2);
adContainer.addChild(ad);
adContainer.addChild(_local3);
ad.mask = _local3;
_arg1.addChild(adContainer);
if (isFlashVersion(9, 0, 28)){
adContainer.addEventListener(REMOVED_FROM_STAGE, removeAdHandler);
};
ad.load(new URLRequest(ad_swf_url));
callListener(events.AD_ATTACHED, true, null, _arg1);
} else {
callListener(events.AD_ATTACHED, false, new NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad"));
};
}
private static function fatalError(_arg1:String, _arg2:String):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n\tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
throw (new Error(("***ERROR*** class=NewgroundsAPI\n\n" + _arg1)));
}
private static function ioErrorHandler(_arg1:IOErrorEvent):void{
sendWarning(("Ad failed to load:" + _arg1.toString()));
}
private static function sendError(_arg1:Object, _arg2:NewgroundsAPIError):void{
trace(((((("[NewgroundsAPI ERROR] :: " + getCommandName(_arg1.command_id)) + "() - ") + _arg2.name) + ":\n\t\t\t\t") + _arg2.message));
}
public static function connectionTimeOut(_arg1:Event=null):void{
callListener(events.MOVIE_CONNECTED, false, new NewgroundsAPIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out."));
}
private static function setDefaultListeners():Array{
var _local1:Array;
_local1 = new Array();
_local1[events.HOST_BLOCKED] = {listener:doBlockHost};
_local1[events.NEW_VERSION_AVAILABLE] = {listener:onNewVersionAvailable};
return (_local1);
}
public static function hasPublisher():Boolean{
return (!((publisher_id == 0)));
}
public static function getEventName(_arg1:uint):String{
var _local2:String;
for (_local2 in events) {
if (events[_local2] == _arg1){
return (_local2);
};
};
return (undefined);
}
public static function initialize(_arg1:DisplayObject):void{
var _local2:Object;
if (_initialized){
return;
};
_initialized = true;
NewgroundsAPI.root = _arg1;
timeoutTimer = new Timer(8000, 1);
if (_arg1.loaderInfo){
_local2 = _arg1.loaderInfo.parameters;
host = _arg1.loaderInfo.url;
};
if (_local2){
user_name = _local2.NewgroundsAPI_UserName;
user_id = _local2.NewgroundsAPI_UserID;
publisher_id = _local2.NewgroundsAPI_PublisherID;
session_id = _local2.NewgroundsAPI_SessionID;
} else {
publisher_id = 1;
session_id = null;
user_id = 0;
user_name = "Guest";
};
if ((((host.indexOf("http://") > -1)) || ((host.indexOf("https://") > -1)))){
host = host.split("/")[2].toLowerCase();
} else {
host = "localhost";
};
}
private static function removeAdHandler(_arg1:Event):void{
removeAd();
}
private static function resetAdTimer():Boolean{
var _local1:Date;
if (!ad_url){
return (false);
};
_local1 = new Date();
if (_local1.getTime() >= ad_reset){
ad_reset = (_local1.getTime() + ((1000 * 60) * 5));
return (true);
};
return (false);
}
public static function loadCustomLink(_arg1:String):void{
sendCommand("loadCustomLink", {host:getHost(), link:_arg1}, true);
}
public static function loadMySite():void{
sendCommand("loadMySite", {host:getHost()});
}
public static function saveFile(_arg1:String, _arg2:String, _arg3:Object, _arg4):void{
}
public static function getTodaysScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "t", _arg2, "getTodaysScores");
}
private static function doBlockHost(_arg1:Object):void{
}
private static function sendCommand(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Object=null):void{
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:String;
var _local9:Array;
var _local10:String;
var _local11:URLLoader;
if (((!(connected)) && (!((_arg1 == "connectMovie"))))){
_local8 = (("NewgroundsAPI." + _arg1) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called\n");
fatalError(_local8, "connectMovie");
};
_local5 = new URLVariables();
_local5.command_id = getCommandID(_arg1);
_local5.tracker_id = movie_id;
if (debug){
_local5.debug = debug;
};
if (_arg2){
for (_local6 in _arg2) {
_local5[_local6] = _arg2[_local6];
};
};
if (_arg4){
for (_local6 in _arg4) {
_local5[_local6] = _arg4[_local6];
};
};
echo((("OUTPUT: \n" + JSON.encode(_local5)) + "\n"));
_local7 = new URLRequest(((GATEWAY_URL + "?seed=") + Math.random()));
_local7.data = _local5;
if (_arg3){
_local7.method = URLRequestMethod.GET;
_local7.data = _local5;
navigateToURL(_local7, "_blank");
} else {
_local9 = new Array();
for (_local10 in _local5) {
_local9.push(((_local10 + "=") + escape(_local5[_local10])));
};
echo(((("POST " + GATEWAY_URL) + "?") + _local9.join("&")));
_local7.method = URLRequestMethod.POST;
_local11 = new URLLoader();
_local11.addEventListener(Event.COMPLETE, loaderHandler);
loaders.push(_local11);
_local11.load(_local7);
trace(_local7.data);
};
}
public static function getConfirmation(_arg1:String, _arg2:uint, _arg3:String, _arg4:Object, _arg5:String, _arg6:String):void{
}
private static function loaderHandler(_arg1:Event):void{
var _local2:URLLoader;
var _local3:uint;
var _local4:Object;
var _local5:NewgroundsAPIError;
_local2 = URLLoader(_arg1.target);
echo((("INPUT: \n" + _local2.data) + "\n"));
_local3 = 0;
while (_local3 < loaders.length) {
if (loaders[_local3] == _local2){
loaders.splice(_local3, 1);
break;
};
_local3++;
};
if (_local2.data){
_local4 = JSON.decode(_local2.data);
} else {
_local4 = {success:false};
};
if (!_local4.success){
_local5 = new NewgroundsAPIError(_local4.error_code, _local4.error_msg);
sendError(_local4, _local5);
} else {
doEvent(_local4);
};
}
public static function loadNewgrounds():void{
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
public static function getOfficialVersionURL():String{
var _local1:String;
_local1 = ((((((GATEWAY_URL + "?tracker_id=") + movie_id) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random());
if (debug){
_local1 = (_local1 + "&debug=1");
};
return (_local1);
}
public static function getFiles(_arg1:String, _arg2:Object):void{
}
public static function logCustomEvent(_arg1:String):void{
sendCommand("logCustomEvent", {host:getHost(), event:_arg1});
}
public static function removeAd():void{
if (adURLLoader){
try {
adURLLoader.close();
} catch(e:Error) {
};
adURLLoader = null;
};
if (ad){
try {
ad.close();
} catch(e:Error) {
};
try {
Object(ad).unloadAndStop(true);
trace("uas");
} catch(e:Error) {
ad.unload();
};
if (ad.parent){
ad.parent.removeChild(ad);
};
};
if (adContainer){
if (isFlashVersion(9, 0, 28, 0)){
adContainer.removeEventListener(REMOVED_FROM_STAGE, removeAdHandler);
};
if (adContainer.parent){
adContainer.parent.removeChild(adContainer);
};
};
ad = null;
adContainer = null;
}
public static function postScore(_arg1:String, _arg2:Number, _arg3:Boolean):void{
sendSecureCommand("postScore", {score:_arg1, value:_arg2, get_best:_arg3});
}
public static function finishFileSave(_arg1:String, _arg2:String, _arg3:String, _arg4:Boolean, _arg5, _arg6):void{
}
private static function sendNotice(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("[NewgroundsAPI NOTICE] :: " + _arg1));
}
public static function decodeData(_arg1:String){
return (JSON.decode(RC4.decrypt(uncompressHex(_arg1), encryption_key)));
}
public static function encodeData(_arg1:Object):String{
return (compressHex(RC4.encrypt(JSON.encode(_arg1), encryption_key)));
}
public static function getThisYearsScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "y", _arg2, "getThisYearsScores");
}
private static function doEvent(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:String;
var _local5:Boolean;
var _local6:String;
var _local7:uint;
switch (getCommandName(_arg1.command_id)){
case "connectMovie":
timeoutTimer.stop();
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage((("Movie identified as \"" + _arg1.movie_name) + "\""));
callListener(events.MOVIE_CONNECTED, _arg1.success, {movie_name:_arg1.movie_name});
_local5 = false;
if (_arg1.ad_status === -1){
_local2 = "This movie was not approved to run Flash Ads.";
sendWarning(_local2);
sendWarning((("visit " + AD_TERMS_URL) + " to view our approval guidelines"));
if (!_arg1.ad_url){
callListener(events.ADS_APPROVED, false, new NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
} else {
if (_arg1.ad_status === 0){
_local2 = "Flash Ads are currently awaiting approval.";
sendNotice(_local2);
if (!_arg1.ad_url){
callListener(events.ADS_APPROVED, false, new NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
};
};
if (_arg1.ad_url){
ad_url = unescape(_arg1.ad_url);
if (!_local5){
sendMessage("This movie has been approved to run Flash Ads!");
};
callListener(events.ADS_APPROVED, true);
};
if (_arg1.deny_host){
_local2 = (getHost() + " does not have permission to run this movie!");
sendWarning(_local2);
sendWarning(("\tUpdate your API configuration to unblock " + getHost()));
callListener(events.HOST_BLOCKED, true, {movie_url:unescape(_arg1.movie_url), redirect_url:getOfficialVersionURL()});
};
if (_arg1.movie_version){
sendWarning("According to your API Configuration, this version is out of date.");
if (version){
sendWarning(("\tThe this movie is version " + version));
};
sendWarning(("\tThe most current version is " + _arg1.movie_version));
callListener(events.NEW_VERSION_AVAILABLE, true, {movie_version:_arg1.movie_version, movie_url:unescape(_arg1.movie_url), redirect_url:getOfficialVersionURL()});
};
if (_arg1.request_portal_url){
sendCommand("setPortalID", {portal_url:host});
};
break;
case "logCustomEvent":
if (_arg1.success){
sendMessage((("Event '" + _arg1.event) + "' was logged."));
};
callListener(events.EVENT_LOGGED, _arg1.success, {event:_arg1.event});
break;
case "postScore":
if (_arg1.success){
_local4 = "User";
if (user_email){
_local4 = user_email;
} else {
if (user_name){
_local4 = user_name;
};
};
sendMessage((((((_local4 + " posted ") + _arg1.value) + " to '") + _arg1.score) + "'"));
_local3 = {score:_arg1.score, value:_arg1.value, username:_local4};
};
callListener(events.SCORE_POSTED, _arg1.success, _local3);
break;
case "getScores":
if (_arg1.user_id){
_local6 = _arg1.period;
} else {
_local6 = (_arg1.period + "-u");
};
if (_arg1.total_pages){
score_page_counts[_local6] = _arg1.total_pages;
};
_local3.user_id = _arg1.user_id;
_local3.current_page = _arg1.current_page;
_local3.total_pages = score_page_counts[_local6];
_local3.scores = _arg1.scores;
_local3.period = getPeriodName(_arg1.period);
callListener(events.SCORES_LOADED, _arg1.success, _local3);
break;
case "unlockMedal":
if (medals){
_local7 = 0;
while (_local7 < medals.length) {
if (medals[_local7].medal_name === _arg1.medal_name){
medals[_local7].medal_unlocked = true;
break;
};
_local7++;
};
};
_local3 = {medal_name:_arg1.medal_name, medal_value:_arg1.medal_value, medal_difficulty:_arg1.medal_difficulty};
callListener(events.MEDAL_UNLOCKED, _arg1.success, _local3);
break;
case "getMedals":
medals = _arg1.medals;
_local3 = {medals:_arg1.medals};
callListener(events.MEDALS_LOADED, _arg1.success, _local3);
break;
case "getFiles":
break;
case "getSystemFiles":
break;
case "saveFile":
save_file = null;
_local3 = {file_id:_arg1.file_id, filename:_arg1.filename, file_url:_arg1.file_url, thumbnail:_arg1.thumbnail, icon:_arg1.icon};
callListener(events.FILE_SAVED, _arg1.success, _local3);
break;
case "checkFilePrivs":
if (save_file){
save_file.checkPrivs(_arg1);
} else {
_local3 = {filename:_arg1.filename, folder:_arg1.folder, can_read:_arg1.can_read, can_write:_arg1.can_write};
callListener(events.FILE_PRIVS_LOADED, _arg1.success, _local3);
};
break;
};
}
public static function getPeriodAlias(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].alias);
};
};
return (null);
}
public static function loadMedals():void{
var _local1:Object;
if (medals){
callListener(events.MEDALS_LOADED, true, {medals:medals});
return;
};
_local1 = new Object();
if (hasUserSession()){
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
};
sendCommand("getMedals", _local1);
}
public static function saveLocal(_arg1:String, _arg2, _arg3:uint=0):void{
var _local4:SharedObject;
if (!sharedObjects[_arg1]){
sharedObjects[_arg1] = SharedObject.getLocal(((("ng_ap_secure_" + movie_id) + "_") + _arg1));
};
_local4 = sharedObjects[_arg1];
_local4.data[_arg1] = encodeData(_arg2);
_local4.flush();
}
public static function getPeriodName(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].name);
};
};
return (null);
}
private static function sendWarning(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("[NewgroundsAPI WARNING] :: " + _arg1));
}
public static function isNewgrounds():Boolean{
return ((((publisher_id == 1)) || ((getHost().toLowerCase().indexOf("ungrounded.net") > -1))));
}
private static function getCommandID(_arg1:String):String{
return (_arg1);
}
public static function getAlltimeScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "a", _arg2, "getAlltimeScores");
}
}
}//package com.newgrounds
Section 75
//NewgroundsAPIError (com.newgrounds.NewgroundsAPIError)
package com.newgrounds {
import flash.utils.*;
public class NewgroundsAPIError {
public var message:String;
public var name:String;
public var code:Number;// = 0
public var alias:String;
private static const always_caps:Array = new Array("API", "URL", "ID");
public static const error_names:Object = init_names();
public static const aliases:Array = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_FOLDER", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "CONNECTION_FAILED");
public static const error_codes:Object = init_codes();
public function NewgroundsAPIError(_arg1, _arg2:String){
code = 0;
super();
if ((_arg1 is String)){
_arg1 = error_codes[_arg1];
} else {
if (!(_arg1 is uint)){
_arg1 = 0;
};
};
trace(_arg1);
code = _arg1;
message = _arg2;
name = error_names[_arg1];
trace(name);
alias = aliases[_arg1];
}
public function isError():Boolean{
return (true);
}
private static function init_names():Array{
var _local1:Array;
var _local2:uint;
var _local3:Array;
var _local4:uint;
var _local5:String;
_local1 = new Array();
_local2 = 0;
while (_local2 < aliases.length) {
_local3 = aliases[_local2].toLowerCase().split("_");
_local4 = 0;
while (_local4 < _local3.length) {
_local3[_local4] = (_local3[_local4].substr(0, 1).toUpperCase() + _local3[_local4].substr(1, _local3[_local4].length));
for each (_local5 in always_caps) {
if (_local3[_local4].toUpperCase() == _local5){
_local3[_local4] = _local3[_local4].toUpperCase();
};
};
_local4++;
};
_local1[_local2] = _local3.join(" ");
_local2++;
};
return (_local1);
}
public static function init_codes():Dictionary{
var _local1:Dictionary;
var _local2:uint;
_local1 = new Dictionary();
_local2 = 0;
while (_local2 < aliases.length) {
_local1[aliases[_local2]] = _local2;
_local2++;
};
return (_local1);
}
}
}//package com.newgrounds
Section 76
//RC4 (com.newgrounds.RC4)
package com.newgrounds {
public class RC4 {
private static var mykey:Array = new Array(0xFF);
private static var sbox:Array = new Array(0xFF);
private static function charsToHex(_arg1:Array):String{
var _local2:String;
var _local3:Array;
var _local4:uint;
_local2 = new String("");
_local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
_local4 = 0;
while (_local4 < _arg1.length) {
_local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)]));
_local4++;
};
return (_local2);
}
public static function encrypt(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:Array;
var _local5:Array;
_local3 = strToChars(_arg1);
_local4 = strToChars(_arg2);
_local5 = calculate(_local3, _local4);
return (charsToHex(_local5));
}
private static function hexToChars(_arg1:String):Array{
var _local2:Array;
var _local3:uint;
_local2 = new Array();
_local3 = ((_arg1.substr(0, 2))=="0x") ? 2 : 0;
while (_local3 < _arg1.length) {
_local2.push(parseInt(_arg1.substr(_local3, 2), 16));
_local3 = (_local3 + 2);
};
return (_local2);
}
public static function encryptbin(_arg1:String, _arg2:String):Array{
var _local3:Array;
var _local4:Array;
var _local5:Array;
_local3 = strToChars(_arg1);
_local4 = strToChars(_arg2);
_local5 = calculate(_local3, _local4);
return (_local5);
}
public static function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:Array;
var _local5:Array;
_local3 = hexToChars(_arg1);
_local4 = strToChars(_arg2);
_local5 = calculate(_local3, _local4);
return (charsToStr(_local5));
}
private static function strToChars(_arg1:String):Array{
var _local2:Array;
var _local3:uint;
_local2 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
private static function calculate(_arg1:Array, _arg2:Array):Array{
var _local3:uint;
var _local4:uint;
var _local5:Array;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
initialize(_arg2);
_local3 = 0;
_local4 = 0;
_local5 = new Array();
_local9 = 0;
while (_local9 < _arg1.length) {
_local3 = ((_local3 + 1) % 0x0100);
_local4 = ((_local4 + sbox[_local3]) % 0x0100);
_local7 = sbox[_local3];
sbox[_local3] = sbox[_local4];
sbox[_local4] = _local7;
_local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100);
_local6 = sbox[_local10];
_local8 = (_arg1[_local9] ^ _local6);
_local5.push(_local8);
_local9++;
};
return (_local5);
}
private static function initialize(_arg1:Array):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
_local2 = 0;
_local4 = _arg1.length;
_local5 = 0;
while (_local5 <= 0xFF) {
mykey[_local5] = _arg1[(_local5 % _local4)];
sbox[_local5] = _local5;
_local5++;
};
_local5 = 0;
while (_local5 <= 0xFF) {
_local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100);
_local3 = sbox[_local5];
sbox[_local5] = sbox[_local2];
sbox[_local2] = _local3;
_local5++;
};
}
private static function charsToStr(_arg1:Array):String{
var _local2:String;
var _local3:uint;
_local2 = new String("");
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 77
//ContentLoadEvent (com.relish.events.ContentLoadEvent)
package com.relish.events {
import flash.events.*;
public class ContentLoadEvent extends Event {
public var progressObject:Object;
public static const CONTENT_PROGRESS:String = "contentProgress";
public function ContentLoadEvent(){
super(CONTENT_PROGRESS);
}
}
}//package com.relish.events
Section 78
//InfoEvent (com.relish.events.InfoEvent)
package com.relish.events {
import flash.events.*;
public class InfoEvent extends Event {
public var data:Object;
public static const INFO:String = "info";
public function InfoEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.data = _arg2;
}
override public function clone():Event{
return (new InfoEvent(this.type, this.data, this.bubbles, this.cancelable));
}
}
}//package com.relish.events
Section 79
//AudioManager (com.relish.managers.AudioManager)
package com.relish.managers {
import flash.events.*;
import gs.*;
import com.relish.media.*;
import flash.utils.*;
import com.relish.view.*;
import flash.net.*;
import flash.media.*;
import gs.easing.*;
import com.relish.net.*;
public class AudioManager {
public static var allSounds:Array;
private static var cachedSounds:Array;
private static var muted:Boolean = false;
private static var useCaching:Boolean;
public static function killSounds(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
killSound(_arg1[_local2]);
_local2++;
};
}
private static function getCachingId(_arg1:String):String{
return (_arg1.split(".").join(""));
}
public static function pauseAll():void{
var _local1:int;
_local1 = 0;
while (_local1 < allSounds.length) {
if (allSounds[_local1] != null){
allSounds[_local1].pause();
};
_local1++;
};
}
public static function init(_arg1:Boolean=true):void{
useCaching = _arg1;
cachedSounds = new Array();
allSounds = new Array();
}
public static function killSound(_arg1:String):void{
var _local2:String;
_local2 = getCachingId(_arg1);
if (((!((cachedSounds[_local2] == null))) && (!((cachedSounds[_local2] == undefined))))){
if (cachedSounds[_local2].loadCompleted){
cachedSounds[_local2].stop();
};
};
}
private static function onSoundLoaded(_arg1:Event):void{
}
public static function toggleMuting(_arg1:Boolean):void{
muted = _arg1;
if (muted){
muteAllSounds();
} else {
unmuteAllSounds();
};
}
public static function loadSoundFromUrl(_arg1:String, _arg2:Object=null):ManagedSound{
var _local3:ManagedSound;
var _local4:String;
var _local5:String;
_local4 = "";
_local5 = ((Sitemap.baseUrl == null)) ? "" : Sitemap.baseUrl;
if (((((((useCaching) && ((_arg1.lastIndexOf("/") >= 0)))) && ((_arg1.lastIndexOf(".") >= 0)))) && ((_arg1.lastIndexOf(".") > _arg1.lastIndexOf("/"))))){
_local4 = getCachingId(_arg1);
};
if ((((((_local4 == "")) || ((cachedSounds[_local4] == null)))) || ((cachedSounds[_local4] == undefined)))){
_local3 = new ManagedSound(_arg2);
_local3.addEventListener(Event.COMPLETE, onSoundLoaded);
_local3.load(new URLRequest(((_local5 + _arg1) + BasicSite.version)));
allSounds.push(_local3);
if (useCaching){
cachedSounds[_local4] = _local3;
};
return (ManagedSound(_local3));
} else {
if (cachedSounds[_local4].loadCompleted){
cachedSounds[_local4].playCached(_arg2);
return (cachedSounds[_local4]);
};
};
return (null);
}
public static function get isMuted():Boolean{
return (muted);
}
public static function unpauseAll():void{
var _local1:int;
_local1 = 0;
while (_local1 < allSounds.length) {
if (allSounds[_local1] != null){
allSounds[_local1].unpause();
};
_local1++;
};
}
public static function changeVolume(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false){
var _local5:String;
_local5 = getCachingId(_arg1);
if (((!((cachedSounds[_local5] == null))) && (!((cachedSounds[_local5] == undefined))))){
cachedSounds[_local5].retainedVol = _arg2;
if (!muted){
if (((((!((cachedSounds[_local5] == undefined))) && (!((cachedSounds[_local5] == null))))) && ((cachedSounds[_local5].channel is SoundChannel)))){
if (_arg4){
TweenMax.to(cachedSounds[_local5].channel, _arg3, {volume:_arg2, onComplete:killSound, onCompleteParams:[_arg1]});
} else {
TweenMax.to(cachedSounds[_local5].channel, _arg3, {volume:_arg2});
};
};
};
};
}
public static function muteAllSounds(_arg1:Boolean=false):void{
var _local2:int;
_local2 = 0;
while (_local2 < allSounds.length) {
if (allSounds[_local2] != null){
if (allSounds[_local2].channel){
if (!_arg1){
allSounds[_local2].channel.stop();
};
TweenMax.to(allSounds[_local2].channel, 0, {volume:0});
};
};
_local2++;
};
}
public static function batchPreload(_arg1:Array, _arg2:int=10):void{
var _local3:int;
_local3 = 0;
while ((((_local3 < _arg1.length)) && ((_local3 < _arg2)))) {
_local3++;
};
}
public static function destroyAllSounds():void{
var _local1:int;
_local1 = 0;
while (_local1 < allSounds.length) {
if (allSounds[_local1] != null){
if (allSounds[_local1].channel){
allSounds[_local1].channel.stop();
allSounds[_local1].channel = null;
};
if (allSounds[_local1].stop){
allSounds[_local1].stop();
};
allSounds[_local1] = null;
};
_local1++;
};
allSounds = [];
}
public static function unmuteAllSounds():void{
var _local1:int;
trace("[AudioManager] unmuteAllSounds");
_local1 = 0;
while (_local1 < allSounds.length) {
if (allSounds[_local1] != null){
if (allSounds[_local1].channel){
if (allSounds[_local1].soundParams.repeat){
allSounds[_local1].channel = allSounds[_local1].play(0, 9999);
};
TweenMax.to(allSounds[_local1].channel, 0, {volume:allSounds[_local1].retainedVol});
};
};
_local1++;
};
}
public static function playSoundFromLibrary(_arg1:String, _arg2:Boolean=false):void{
var _local3:Class;
var _local4:SoundChannel;
var _local5:*;
if (muted){
return;
};
_local3 = (getDefinitionByName(_arg1) as Class);
_local5 = new (_local3);
_local4 = _local5.play(0, (int(_arg2) * 999));
_local4.addEventListener(Event.SOUND_COMPLETE, onSoundCompleted);
if ((_local5 is ManagedSound)){
ManagedSound(_local5).channel = _local4;
};
allSounds.push(_local5);
}
private static function onSoundCompleted(_arg1:Event):void{
trace("[AudioManager] onSoundCompleted");
}
}
}//package com.relish.managers
Section 80
//DialogManager (com.relish.managers.DialogManager)
package com.relish.managers {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.utils.*;
import com.relish.view.*;
import com.relish.util.*;
import com.relish.ui.*;
import flash.net.*;
import com.relish.events.*;
import com.relish.net.*;
public class DialogManager {
public static const DIALOG_TRANSITIONED:String = "dialogTransitioned";
public static const DIALOG_READY:String = "dialogReady";
public static const REMOVE_DIALOG:String = "removeDialog";
public static const DELETE_ALL:String = "deleteAll";
protected static var cachedAssets:Array;
protected static var currentSubpageId:String = "";
protected static var dialogData:Array;
protected static var reusingDialog:Boolean = false;
protected static var dispatcher:EventDispatcher;
public static var dialogs:Array;
protected static var dialogParams:Object;
protected static var packageName:String;
protected static var progressDispatcher:EventDispatcher;
protected static var dialogLoader:AdvancedLoader;
protected static var currentDialogXml:XML;
public static var currentDialogId:String;
public function DialogManager(){
trace("!----------!----------!");
trace("[DialogManager] DO NOT CREATE AN INSTANCE OF THIS STATIC CLASS - REVISE YOUR CODE");
trace("!----------!----------!");
}
protected static function onTransitionDialogXmlLoad(_arg1:Event):void{
if (BasicSite.verbose){
trace("[DialogeManager] onTransitionDialogXmlLoad - dialog transition xml successfully loaded");
};
currentDialogXml = Sitemap.currentDialogXml;
dialogData[currentDialogId].dialogXml = currentDialogXml;
dialogData[currentDialogId].assetList = new AssetList(XML(currentDialogXml.assets));
if (dialogData[currentDialogId].assetList.length > 0){
TweenLite.delayedCall(0.1, pollDialogProgress, []);
} else {
dialogs[(dialogs.length - 1)].setAssets(dialogData[currentDialogId].assetList);
dialogs[(dialogs.length - 1)].setContent(currentDialogXml);
dialogs[(dialogs.length - 1)].transitionIn();
};
}
protected static function loadInternalDialog(_arg1:String):void{
var _local2:String;
var _local3:Class;
var _local4:*;
if (BasicSite.verbose){
trace("[DialogManager] loadInternalDialog - Attaching class.");
};
_local2 = ((packageName + ".dialogs.") + dialogData[_arg1].loadInfo.@template.split(":")[1]);
_local3 = (getDefinitionByName(_local2) as Class);
_local4 = new (_local3);
presentDialog(PageTemplate(_local4));
}
private static function transitionDialog(_arg1:EventDispatcher, _arg2:String):void{
dialogs[(dialogs.length - 1)].setParams(dialogParams);
dialogData[_arg2].loadInfo = Sitemap.transitionDialogXml(_arg1, _arg2);
}
protected static function pollDialogProgress():void{
var contentLoadEvent:ContentLoadEvent;
var progressObject:Object;
var recentDialogAssets:AssetList;
try {
recentDialogAssets = dialogData[currentDialogId].assetList;
} catch(err:Error) {
trace(("[DialogManager] pollDialogProgress - ERROR - could not find an assetList for this dialog - " + err.message));
};
if (recentDialogAssets != null){
try {
progressObject = recentDialogAssets.pollProgress();
} catch(err:Error) {
trace(("[DialogManager] pollDialogProgress - ERROR in collecting dialog assets - " + err.message));
};
try {
if (((!((progressObject == null))) && (!((dialogLoader == null))))){
progressObject.preloadBytes = (progressObject.preloadBytes + dialogLoader.contentLoaderInfo.bytesLoaded);
progressObject.primaryTotal = (progressObject.primaryTotal + dialogLoader.contentLoaderInfo.bytesTotal);
};
if (((((!((progressObject == null))) && (progressObject.accurateValues))) && (!((progressDispatcher == null))))){
contentLoadEvent = new ContentLoadEvent();
contentLoadEvent.progressObject = progressObject;
progressDispatcher.dispatchEvent(contentLoadEvent);
};
} catch(err:Error) {
trace(("[DialogManager] pollDialogProgress - ERROR in calculating load progress - " + err.message));
};
if ((((((progressObject.currentTier > AssetList.PRELOAD)) && (!((dialogLoader.content == null))))) && ((dialogLoader.contentLoaderInfo.bytesLoaded >= dialogLoader.contentLoaderInfo.bytesTotal)))){
if (!reusingDialog){
PageTemplate(dialogLoader.content).setAssets(recentDialogAssets);
presentDialog(PageTemplate(dialogLoader.content));
dispatcher.dispatchEvent(new Event(Sitemap.DIALOG_LOADED));
} else {
dialogs[(dialogs.length - 1)].setAssets(recentDialogAssets);
dialogs[(dialogs.length - 1)].setContent(XML(currentDialogXml.content));
dialogs[(dialogs.length - 1)].transitionIn();
dispatcher.dispatchEvent(new Event(DIALOG_TRANSITIONED));
};
} else {
TweenLite.delayedCall(0.3, pollDialogProgress, []);
};
} else {
if (progressDispatcher != null){
progressObject = new Object();
progressObject.preloadBytes = dialogLoader.contentLoaderInfo.bytesLoaded;
progressObject.primaryTotal = dialogLoader.contentLoaderInfo.bytesTotal;
contentLoadEvent = new ContentLoadEvent();
contentLoadEvent.progressObject = progressObject;
progressDispatcher.dispatchEvent(contentLoadEvent);
if (progressObject.preloadBytes < progressObject.primaryTotal){
TweenLite.delayedCall(0.1, pollDialogProgress, []);
};
};
};
}
protected static function onDialogLoad(_arg1:Event):void{
if (BasicSite.verbose){
trace("[DialogManager] onDialogLoad - external content successfully loaded");
};
BasicSite.rootRef.setURL(currentDialogId);
if (dialogData[currentDialogId].assetList == null){
presentDialog(PageTemplate(_arg1.target.content));
dispatcher.dispatchEvent(new Event(Sitemap.DIALOG_LOADED));
};
}
public static function destroyDialog(_arg1:String):void{
var _local2:int;
_local2 = 0;
while (_local2 < dialogs.length) {
if (((!((dialogs[_local2] == undefined))) && ((((dialogs[_local2].id == _arg1)) || ((_arg1 == DELETE_ALL)))))){
dialogData[_arg1] = undefined;
dialogs[_local2].dispatchEvent(new Event(REMOVE_DIALOG));
dialogs[_local2] = null;
break;
};
_local2++;
};
cleanGarbage();
}
public static function init(_arg1:EventDispatcher):void{
dispatcher = _arg1;
dialogs = new Array();
dialogData = new Array();
}
public static function loadDialog(_arg1:String, _arg2:Object=null):Boolean{
var _local3:EventDispatcher;
var _local4:Object;
_local3 = new EventDispatcher();
trace(("[DialogManager] loadDialog - " + _arg1));
if (_arg1.charAt(0) == "/"){
_arg1 = _arg1.slice(1, _arg1.length);
};
if (_arg1.indexOf("/") >= 0){
_local4 = ((_arg2 == null)) ? new Object() : _arg2;
_local4.subpage = _arg1.split("/")[1];
return (DialogManager.loadDialog(_arg1.split("/")[0], _local4));
};
if (_arg1 == currentDialogId){
trace(("[DialogManager] loadDialog - already on dialog " + currentDialogId));
if ((((_arg2 == null)) || ((_arg2.subpage == null)))){
return (false);
};
if (_arg2.subpage == currentSubpageId){
trace(("[DialogManager] loadDialog - already on subpage " + _arg2.subpage));
return (false);
};
dialogs[(dialogs.length - 1)].setParams(_arg2);
if (_arg2 != null){
dialogData[_arg1].params = _arg2;
};
dialogParams = _arg2;
currentSubpageId = _arg2.subpage;
return (false);
};
if (BasicSite.verbose){
trace(("[DialogManager] loadDialog - attempt to load DIALOG " + _arg1));
};
if (((((BasicSite.verbose) && (!((_arg2 == null))))) && (!((_arg2.subpage == null))))){
trace(("[DialogManager] - with subpage " + _arg2.subpage));
};
while (dialogs.indexOf(null) >= 0) {
dialogs.splice(dialogs.indexOf(null), 1);
};
TweenLite.killDelayedCallsTo(pollDialogProgress);
dialogData[_arg1] = new Object();
if (_arg2 != null){
dialogData[_arg1].params = _arg2;
};
dialogParams = _arg2;
currentSubpageId = ((((_arg2 == null)) || ((_arg2.subpage == null)))) ? "" : _arg2.subpage;
if (Sitemap.siblingDialogs(_arg1, currentDialogId)){
trace("[DialogManager] loadDialog - same template - use transition");
reusingDialog = true;
currentDialogId = _arg1;
_local3.addEventListener(Sitemap.DIALOG_TRANSITIONED, onTransitionDialogXmlLoad);
TweenLite.delayedCall(dialogs[(dialogs.length - 1)].transitionOut(), transitionDialog, [_local3, _arg1]);
return (false);
};
reusingDialog = false;
currentDialogId = _arg1;
_local3.addEventListener(Sitemap.DIALOG_LOADED, onDialogXmlLoad);
dialogData[_arg1].loadInfo = Sitemap.loadDialogXml(_local3, _arg1);
return (true);
}
public static function closeDialog(_arg1:String):void{
var _local2:int;
_local2 = 0;
while (_local2 < dialogs.length) {
if (((((!((dialogs[_local2] == undefined))) && (!((dialogs[_local2] == null))))) && ((((dialogs[_local2].id == _arg1)) || ((_arg1 == DELETE_ALL)))))){
TweenLite.delayedCall(dialogs[_local2].animateOut(), destroyDialog, [_arg1]);
};
_local2++;
};
if (_arg1 == DELETE_ALL){
currentDialogId = "";
};
}
public static function get currentDialog():PageTemplate{
if (dialogs.length <= 0){
return (null);
};
return (dialogs[(dialogs.length - 1)]);
}
protected static function onDialogXmlLoad(_arg1:Event):void{
var _local2:*;
if (BasicSite.verbose){
trace("[DialogeManager] onDialogXmlLoad - dialog xml successfully loaded");
};
_local2 = Sitemap.currentDialogXml;
dialogData[currentDialogId].dialogXml = Sitemap.currentDialogXml;
if (_local2.assets.children().length() > 0){
if (dialogData[currentDialogId].loadInfo.@template.toString().split(":")[0] == "ext"){
createDialog();
};
dialogData[currentDialogId].assetList = new AssetList(XML(_local2.assets));
dispatcher.dispatchEvent(new Event(AssetList.RESUME_LOAD));
} else {
createDialog();
};
TweenLite.delayedCall(0.1, pollDialogProgress, []);
}
protected static function presentDialog(_arg1:PageTemplate):void{
if (BasicSite.verbose){
trace("[DialogManager] presentDialog");
};
_arg1.id = currentDialogId;
dialogData[_arg1.id].clip = _arg1;
if (dialogs.indexOf(_arg1) < 0){
dialogs.push(_arg1);
};
_arg1.setContent(XML(dialogData[_arg1.id].dialogXml.content));
if (dialogParams != null){
_arg1.setParams(dialogParams);
};
dispatcher.dispatchEvent(new Event(DIALOG_READY));
}
public static function setPackageName(_arg1:String):void{
packageName = _arg1;
}
public static function cleanGarbage():void{
var _local1:int;
_local1 = 0;
while (_local1 < dialogs.length) {
if ((((dialogs[_local1] == null)) || (!((dialogs[_local1] is PageTemplate))))){
dialogs.splice(_local1, 1);
_local1--;
};
_local1++;
};
if (dialogs.length <= 0){
currentDialogId = "";
};
}
public static function addProgressDispatcher(_arg1:EventDispatcher):void{
progressDispatcher = _arg1;
}
protected static function loadExternalDialog(_arg1:String):void{
var _local2:String;
var _local3:String;
_local2 = "";
_local3 = ("dialogs/" + dialogData[_arg1].loadInfo.@template.split(":")[1]);
_local2 = Sitemap.getDialogPath(currentDialogId);
if (BasicSite.verbose){
trace((("[DialogManager] loadExternalDialog - Loading external swf (" + _local3) + ")"));
};
dialogLoader = new AdvancedLoader();
dialogLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onDialogLoad);
dialogLoader.load(new URLRequest((_local3 + BasicSite.version)));
}
protected static function createDialog():void{
if (dialogData[currentDialogId].loadInfo.@template.toString().split(":")[0] == "int"){
loadInternalDialog(currentDialogId);
} else {
loadExternalDialog(currentDialogId);
};
}
}
}//package com.relish.managers
Section 81
//PageManager (com.relish.managers.PageManager)
package com.relish.managers {
import flash.events.*;
import flash.display.*;
import gs.*;
import flash.utils.*;
import com.relish.view.*;
import com.relish.util.*;
import com.relish.ui.*;
import flash.net.*;
import com.relish.events.*;
import com.asual.swfaddress.*;
import com.relish.net.*;
public class PageManager {
public static const PAGE_READY:String = "pageReady";
public static const PAGE_TRANSITIONED:String = "pageTransitioned";
public static const PAGE_XML_LOADED:String = "pageXmlLoaded";
protected static var pageLoader:AdvancedLoader;
public static var cachedXml:Array;
public static var queuedSubpageId:String = "";
protected static var offsetX:Number = 0;
protected static var dispatcher:EventDispatcher;
public static var currentPage:PageTemplate;
protected static var offsetY:Number = 0;
protected static var assetList:AssetList;
protected static var progressDispatcher:EventDispatcher;
protected static var loadInfo:XML;
public static var cachedAssets:Array;
protected static var currentPageXml:XML;
public static var currentSubpageId:String = "";
public static var queuedPageId:String = "";
protected static var reusingPage:Boolean = false;
public static var currentPageId:String = "";
protected static var packageName:String;
protected static var pageParams:Object;
public function PageManager(){
trace("!----------!----------!");
trace("[PageManager] DO NOT CREATE AN INSTANCE OF THIS STATIC CLASS - REVISE YOUR CODE");
trace("!----------!----------!");
}
protected static function loadExternalPage(_arg1:String):void{
var extUrl:String;
var aPageId = _arg1;
extUrl = ("pages/" + loadInfo.@template.split(":")[1]);
if (BasicSite.verbose){
trace((("[PageManager] loadExternalPage - Loading external swf (" + extUrl) + ")"));
};
if (pageLoader != null){
try {
pageLoader.close();
} catch(e:Error) {
};
pageLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onPageLoad);
pageLoader = null;
};
pageLoader = new AdvancedLoader();
pageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onPageLoad);
pageLoader.load(new URLRequest((extUrl + BasicSite.version)));
}
private static function transitionPage(_arg1:EventDispatcher, _arg2:String):void{
currentPage.setParams(pageParams);
loadInfo = Sitemap.transitionPageXml(_arg1, _arg2);
}
protected static function pollProgress():void{
var contentLoadEvent:ContentLoadEvent;
var progressObject:Object;
if (assetList != null){
try {
progressObject = assetList.pollProgress();
} catch(err:Error) {
trace("[PageManager] pollProgress - ERROR in polling asset list");
TweenLite.delayedCall(0.1, pollProgress, []);
return;
};
try {
if (((!((progressObject == null))) && (!((pageLoader == null))))){
progressObject.preloadBytes = (progressObject.preloadBytes + pageLoader.contentLoaderInfo.bytesLoaded);
progressObject.primaryTotal = (progressObject.primaryTotal + pageLoader.contentLoaderInfo.bytesTotal);
};
if (((((!((progressObject == null))) && (progressObject.accurateValues))) && (!((progressDispatcher == null))))){
contentLoadEvent = new ContentLoadEvent();
contentLoadEvent.progressObject = progressObject;
progressDispatcher.dispatchEvent(contentLoadEvent);
};
} catch(err:Error) {
trace(("[PageManager] pollProgress - ERROR in calculating load progress - " + err.message));
};
if ((((((((progressObject.currentTier > AssetList.PRELOAD)) && (!((pageLoader == null))))) && (!((pageLoader.content == null))))) && ((pageLoader.contentLoaderInfo.bytesLoaded >= pageLoader.contentLoaderInfo.bytesTotal)))){
finalizeLoad();
} else {
TweenLite.delayedCall(0.1, pollProgress, []);
};
} else {
if (progressDispatcher != null){
progressObject = new Object();
progressObject.preloadBytes = pageLoader.contentLoaderInfo.bytesLoaded;
progressObject.primaryTotal = pageLoader.contentLoaderInfo.bytesTotal;
contentLoadEvent = new ContentLoadEvent();
contentLoadEvent.progressObject = progressObject;
progressDispatcher.dispatchEvent(contentLoadEvent);
if (progressObject.preloadBytes < progressObject.primaryTotal){
TweenLite.delayedCall(0.1, pollProgress, []);
};
};
};
}
public static function init(_arg1:EventDispatcher):void{
dispatcher = _arg1;
cachedAssets = new Array();
cachedXml = new Array();
}
protected static function onPageLoad(_arg1:Event):void{
if (BasicSite.verbose){
trace("[PageManager] onPageLoad - external content successfully loaded");
};
if (assetList == null){
switchPage(PageTemplate(_arg1.target.content));
dispatcher.dispatchEvent(new Event(Sitemap.PAGE_LOADED));
};
}
public static function loadPage(_arg1:String, _arg2:Object=null):Boolean{
var _local3:EventDispatcher;
var _local4:Object;
if (_arg1.charAt(0) == "/"){
_arg1 = _arg1.slice(1, _arg1.length);
};
if (_arg1.indexOf("/") >= 0){
_local4 = ((_arg2 == null)) ? new Object() : _arg2;
_local4.subpage = _arg1.split("/")[1];
return (PageManager.loadPage(_arg1.split("/")[0], _local4));
};
if (!Sitemap.siblingPages(_arg1, currentPageId)){
if (BasicSite.verbose){
trace((((("[PageManager] loadPage - attempt to load PAGE '" + _arg1) + "' from '") + currentPageId) + "'"));
};
if (currentPageId == _arg1){
trace("[PageManager] loadPage - matches current page id");
if (!(((((_arg2 == null)) || ((_arg2.subpage == undefined)))) || ((_arg2.subpage == currentSubpageId)))){
trace((("[PageManager] loadPage - attempt to load SUBPAGE '" + currentSubpageId) + "'"));
currentSubpageId = _arg2.subpage;
currentPage.setParams(_arg2);
} else {
if (BasicSite.verbose){
trace(((("[PageManager] loadPage - ignored, already on page " + currentPageId) + " - ") + currentSubpageId));
};
};
return (false);
} else {
if (currentPage != null){
TweenLite.killDelayedCallsTo(pollProgress);
queuedPageId = _arg1;
if (((!((_arg2 == null))) && (!((_arg2.subpage == undefined))))){
queuedSubpageId = _arg2.subpage;
} else {
queuedSubpageId = "";
};
TweenLite.delayedCall(currentPage.animateOut(), replaceCurrentPage, [_arg1, _arg2]);
return (true);
};
};
};
queuedPageId = _arg1;
if (_local3 != null){
_local3.removeEventListener(Sitemap.PAGE_LOADED, onPageXmlLoad);
_local3 = null;
};
_local3 = new EventDispatcher();
if (Sitemap.siblingPages(_arg1, currentPageId)){
trace("[PageManager] loadPage - same template - use transition");
reusingPage = true;
currentPageId = _arg1;
_local3.addEventListener(Sitemap.PAGE_TRANSITIONED, onTransitionPageXmlLoad);
TweenLite.delayedCall(currentPage.transitionOut(), transitionPage, [_local3, _arg1]);
return (false);
};
_local3.addEventListener(Sitemap.PAGE_LOADED, onPageXmlLoad);
loadInfo = Sitemap.loadPageXml(_local3, _arg1);
reusingPage = false;
TweenLite.killDelayedCallsTo(pollProgress);
if (assetList != null){
assetList.pauseDownload();
cachedAssets[currentPageId] = assetList;
assetList = null;
};
pageParams = _arg2;
return (true);
}
public static function getAssetPointer():AssetList{
return (assetList);
}
protected static function finalizeLoad():void{
trace(("[PageManager] finalizeLoad - for " + currentPageId));
if (!reusingPage){
if (assetList != null){
cachedAssets[currentPageId] = assetList;
PageTemplate(pageLoader.content).setAssets(assetList);
};
switchPage(PageTemplate(pageLoader.content));
dispatcher.dispatchEvent(new Event(Sitemap.PAGE_LOADED));
} else {
currentPage.setAssets(assetList);
currentPage.setContent(XML(currentPageXml.content));
currentPage.transitionIn();
dispatcher.dispatchEvent(new Event(PAGE_TRANSITIONED));
};
}
protected static function createPage():void{
if (loadInfo.@template.toString().split(":")[0] == "int"){
loadInternalPage(currentPageId);
} else {
loadExternalPage(currentPageId);
};
}
public static function setPackageName(_arg1:String):void{
packageName = _arg1;
}
protected static function onPageXmlLoad(_arg1:Event):void{
if (BasicSite.verbose){
trace(("[PageManager] onPageXmlLoad - page xml successfully loaded - " + queuedPageId));
};
currentPageXml = Sitemap.currentPageXml;
currentPageId = queuedPageId;
currentSubpageId = queuedSubpageId;
cachedXml[currentPageId] = currentPageXml;
if (currentPageXml.assets.children().length() > 0){
trace("[PageManager] onPageXmlLoad - has assets to load");
if (loadInfo.@template.toString().split(":")[0] == "ext"){
createPage();
};
if (cachedAssets[queuedPageId] == undefined){
assetList = new AssetList(XML(currentPageXml.assets));
dispatcher.dispatchEvent(new Event(AssetList.RESUME_LOAD));
trace("[PageManager] onPageXmlLoad - cachedAssets do not yet exist");
} else {
assetList = cachedAssets[queuedPageId];
trace(((("[PageManager] onPageXmlLoad - cachedAssets at " + queuedPageId) + " = ") + assetList));
if (!assetList.isComplete()){
trace("[PageManager] onPageXmlLoad - cachedAssets incomplete");
dispatcher.dispatchEvent(new Event(AssetList.RESUME_LOAD));
assetList.resumeDownload();
};
};
} else {
createPage();
};
dispatcher.dispatchEvent(new Event(PAGE_XML_LOADED));
TweenLite.delayedCall(0.1, pollProgress, []);
}
public static function addProgressDispatcher(_arg1:EventDispatcher):void{
progressDispatcher = _arg1;
}
public static function offsetPage(_arg1:Number, _arg2:Number):void{
offsetX = _arg1;
offsetY = _arg2;
if (currentPage != null){
currentPage.x = _arg1;
currentPage.y = _arg2;
};
}
protected static function trueId(_arg1:Object=null):String{
_arg1 = ((_arg1 == null)) ? pageParams : _arg1;
if (((((!((_arg1 == null))) && (!((_arg1.subpage == undefined))))) && ((_arg1.subpage.length > 0)))){
return (_arg1.subpage);
};
return (currentPageId);
}
public static function updateSubpage(_arg1:String):void{
currentSubpageId = _arg1;
}
protected static function replaceCurrentPage(_arg1:String, _arg2:Object=null):void{
if (currentPage != null){
currentPage.destroy();
currentPage = null;
};
loadPage(_arg1, _arg2);
}
public static function getPageRef():PageTemplate{
return (currentPage);
}
protected static function onTransitionPageXmlLoad(_arg1:Event):void{
if (BasicSite.verbose){
trace("[PageManager] onTransitionPageXmlLoad - page transition xml successfully loaded");
};
currentPageXml = Sitemap.currentPageXml;
assetList = new AssetList(XML(currentPageXml.assets));
if (assetList.length > 0){
TweenLite.delayedCall(0.1, pollProgress, []);
} else {
currentPage.setAssets(assetList);
currentPage.setContent(XML(currentPageXml.content));
currentPage.transitionIn();
};
if (!assetList.isComplete()){
dispatcher.dispatchEvent(new Event(AssetList.RESUME_LOAD));
};
}
protected static function onPageProgress(_arg1:ProgressEvent):void{
dispatcher.dispatchEvent(_arg1);
}
protected static function switchPage(_arg1:PageTemplate):void{
var newPage = _arg1;
trace(("[PageManager] switchPage - " + newPage));
currentPage = newPage;
currentPage.x = offsetX;
currentPage.y = offsetY;
currentPage.id = queuedPageId;
BasicSite.rootRef.setURL((currentPage.id + (((((!((pageParams == null))) && (!((pageParams.subpage == undefined))))) && ((pageParams.subpage.length > 0)))) ? ("/" + pageParams.subpage) : ""));
try {
currentPage.setContent(XML(currentPageXml.content));
} catch(err:Error) {
trace(err.message);
trace("Error in drawing content from page XML.");
trace("There should be a content node in either the sitemap.pages.page node or the page xml");
};
if (pageParams != null){
currentPage.setParams(pageParams);
};
dispatcher.dispatchEvent(new Event(PAGE_READY));
}
protected static function loadInternalPage(_arg1:String):void{
var _local2:String;
var _local3:Class;
var _local4:*;
if (BasicSite.verbose){
trace("[PageManager] loadInternalPage - Attaching class.");
};
_local2 = ((packageName + ".pages.") + loadInfo.@template.split(":")[1]);
_local3 = (getDefinitionByName(_local2) as Class);
_local4 = new (_local3);
switchPage(PageTemplate(_local4));
}
}
}//package com.relish.managers
Section 82
//ManagedSound (com.relish.media.ManagedSound)
package com.relish.media {
import flash.events.*;
import gs.*;
import flash.net.*;
import flash.media.*;
import com.relish.managers.*;
public class ManagedSound extends Sound {
public var channel:SoundChannel;
public var loadCompleted:Boolean;// = false
public var autoPlay:Boolean;// = true
public var loadInitiated:Boolean;// = false
public var paused:Boolean;// = false
private var pausePosition:Number;// = 0
public var retainedVol:Number;// = 1
public var soundParams:Object;
public static const DEFAULT_VOLUME:Number = 1;
public static const PLAYBACK_COMPLETE:String = "playbackComplete";
public function ManagedSound(_arg1:Object=null){
paused = false;
autoPlay = true;
loadInitiated = false;
loadCompleted = false;
retainedVol = 1;
pausePosition = 0;
soundParams = ((_arg1)!=null) ? setParams(_arg1) : setParams({volume:DEFAULT_VOLUME, autoplay:true, repeat:false, delay:0});
if (soundParams.autoplay != undefined){
autoPlay = soundParams.autoplay;
};
if (soundParams.retainedVol != undefined){
retainedVol = _arg1.retainedVol;
};
super();
}
public function stop():void{
if (channel != null){
pausePosition = 0;
channel.stop();
};
TweenLite.killDelayedCallsTo(startSound);
}
private function setParams(_arg1:Object=null):Object{
var _local2:Object;
_local2 = new Object();
_local2.volume = ((_arg1.volume)!=null) ? _arg1.volume : DEFAULT_VOLUME;
_local2.autoplay = ((_arg1.autoplay)==false) ? false : true;
_local2.repeat = ((_arg1.repeat)==true) ? true : false;
_local2.delay = ((_arg1.delay)>0) ? _arg1.delay : 0;
return (_local2);
}
public function playCached(_arg1:Object=null):SoundChannel{
if (AudioManager.isMuted){
return (channel);
};
soundParams = ((_arg1)!=null) ? setParams(_arg1) : setParams({volume:DEFAULT_VOLUME, autoplay:true, repeat:false, delay:0});
if (soundParams.autoplay){
TweenLite.delayedCall(soundParams.delay, startSound, [(soundParams.repeat) ? 9999 : 0]);
};
return (channel);
}
private function onSoundLoaded(_arg1:Event):void{
trace(((("[ManagedSound] onSoundLoaded - " + soundParams.autoplay) + ", ") + soundParams.repeat));
loadCompleted = true;
if (((autoPlay) && (!(AudioManager.isMuted)))){
if (soundParams.repeat){
TweenLite.delayedCall(soundParams.delay, startSound, [9999]);
} else {
TweenLite.delayedCall(soundParams.delay, startSound);
};
};
}
public function mute(_arg1:Number=0.5):void{
TweenLite.to(channel, _arg1, {volume:0});
}
private function onLoopSound(_arg1:Event):void{
channel = play(0, 9999);
channel.addEventListener(Event.SOUND_COMPLETE, onLoopSound);
}
public function unmute(_arg1:Number=0.5):void{
TweenLite.to(channel, _arg1, {volume:soundParams.volume});
}
private function onRewindSound(_arg1:Event):void{
dispatchEvent(new Event(PLAYBACK_COMPLETE));
channel.stop();
}
public function get playheadPercentage():Number{
if (channel == null){
return (0);
};
return (Math.max(0, Math.min(1, (channel.position / Sound(this).length))));
}
private function startSound(_arg1:int=0):void{
if (AudioManager.isMuted){
return;
};
channel = play(0, _arg1);
TweenLite.to(channel, 0, {volume:soundParams.volume});
if (!soundParams.repeat){
channel.addEventListener(Event.SOUND_COMPLETE, onRewindSound);
};
}
override public function load(_arg1:URLRequest, _arg2:SoundLoaderContext=null):void{
loadInitiated = true;
addEventListener(Event.COMPLETE, onSoundLoaded);
super.load(_arg1);
}
public function pause():void{
if (!paused){
paused = true;
pausePosition = channel.position;
channel.stop();
};
}
public function unpause():void{
if (((paused) || ((pausePosition == 0)))){
paused = false;
if (!soundParams.repeat){
channel = play(pausePosition);
} else {
channel = play(pausePosition, 9999);
};
};
}
}
}//package com.relish.media
Section 83
//Sitemap (com.relish.net.Sitemap)
package com.relish.net {
import flash.events.*;
import flash.display.*;
import gs.*;
import com.relish.view.*;
import flash.net.*;
import com.relish.managers.*;
public class Sitemap {
public static const LOADED:String = "loaded";
public static const XML_ONLY_LOADED:String = "xmlOnlyLoaded";
public static const PAGE_LOADED:String = "pageLoaded";
public static const DIALOG_TRANSITIONED:String = "dialogTransitioned";
public static const DIALOG_LOADED:String = "dialogLoaded";
public static const PAGE_TRANSITIONED:String = "pageTransitioned";
protected static var pageLoader:URLLoader;
protected static var dialogDispatcher:EventDispatcher;
protected static var dialogLoader:URLLoader;
protected static var dispatcher:EventDispatcher;
protected static var sitemapXml:XML;
public static var currentDialogXml:XML;
public static var currentPageXml:XML;
public static var baseUrl:String;
protected static var lang:String = "";
public function Sitemap(){
trace("!----------!----------!");
trace("[Sitemap] DO NOT CREATE AN INSTANCE OF THIS STATIC CLASS - REVISE YOUR CODE");
trace("!----------!----------!");
}
public static function getDialogPath(_arg1:String):String{
var curNode:XML;
var fullPath:String;
var ofId = _arg1;
fullPath = ofId;
curNode = XML(sitemapXml.sitemap.dialogs..dialog.(@id == ofId));
while (curNode.parent().@id.toString().length > 0) {
fullPath = ((curNode.parent().@id.toString() + "/") + fullPath);
curNode = XML(curNode.parent()[0]);
};
return (fullPath);
}
public static function siblingDialogs(_arg1:String, _arg2:String):Boolean{
var templateA:String;
var templateB:String;
var idA = _arg1;
var idB = _arg2;
templateA = sitemapXml.sitemap.dialogs..dialog.(@id == idA).@template.toString();
templateB = sitemapXml.sitemap.dialogs..dialog.(@id == idB).@template.toString();
return (Boolean(((!((idA == idB))) && ((templateA == templateB)))));
}
protected static function onPageXmlLoaded(_arg1:Event):void{
var e = _arg1;
if (BasicSite.verbose){
trace("[Sitemap] onPageXmlLoaded");
};
try {
currentPageXml = new XML(e.target.data);
} catch(e:Error) {
if (BasicSite.verbose){
trace(("[Sitemap] onSitemapLoaded - error:" + e.message));
};
};
dispatcher.dispatchEvent(new Event(PAGE_LOADED));
}
public static function getMenuXml(_arg1:String="main"):XML{
var _local2:int;
trace(("[Sitemap] getMenuXml - " + _arg1));
_local2 = 0;
while (_local2 < sitemapXml.navigation.children().length()) {
if (sitemapXml.navigation.children()[_local2].name() == _arg1){
return (XML(sitemapXml.navigation.children()[_local2]));
};
_local2++;
};
return (XML(sitemapXml.navigation.main));
}
public static function pageExistsWithId(_arg1:String):Boolean{
var of = _arg1;
return (Boolean((sitemapXml.sitemap.pages..page.(@id == of).@id.toString().length > 0)));
}
public static function siblingPages(_arg1:String, _arg2:String):Boolean{
var templateA:String;
var templateB:String;
var idA = _arg1;
var idB = _arg2;
templateA = sitemapXml.sitemap.pages..page.(@id == idA).@template.toString();
templateB = sitemapXml.sitemap.pages..page.(@id == idB).@template.toString();
return (Boolean(((!((idA == idB))) && ((templateA == templateB)))));
}
public static function getContentByTag(_arg1:String):XML{
return (XML(sitemapXml[_arg1]));
}
public static function loadPageXml(_arg1:EventDispatcher, _arg2:String):XML{
var pagePath:String;
var aDisp = _arg1;
var aPageId = _arg2;
pagePath = getPagePath(aPageId);
dispatcher = aDisp;
if (pageLoader != null){
try {
pageLoader.close();
} catch(e:Error) {
if (BasicSite.verbose){
trace("[Sitemap] loadPageXML - no stream to close");
};
};
};
if (sitemapXml.sitemap.pages..page.(@id == aPageId).content.length() >= 1){
currentPageXml = XML(sitemapXml.sitemap.pages..page.(@id == aPageId));
TweenLite.delayedCall(0.1, dispatcher.dispatchEvent, [new Event(PAGE_LOADED)]);
} else {
trace((((((("[Sitemap] loadPageXML - load " + baseUrl) + "xml/") + lang) + "pages/") + pagePath) + ".xml"));
pageLoader = new URLLoader();
pageLoader.addEventListener(Event.COMPLETE, onPageXmlLoaded);
pageLoader.load(new URLRequest(((((((baseUrl + "xml/") + lang) + "pages/") + pagePath) + ".xml") + BasicSite.version)));
};
return (XML(sitemapXml.sitemap.pages..page.(@id == aPageId)));
}
public static function getGlobalAssetXml():XML{
if (sitemapXml.assets.length() <= 0){
return (null);
};
return (XML(sitemapXml.assets));
}
public static function getPagePath(_arg1:String):String{
var curNode:XML;
var fullPath:String;
var ofId = _arg1;
fullPath = ofId;
curNode = XML(sitemapXml.sitemap.pages..page.(@id == ofId));
while (curNode.parent().@id.toString().length > 0) {
fullPath = ((curNode.parent().@id.toString() + "/") + fullPath);
curNode = XML(curNode.parent()[0]);
};
return (fullPath);
}
protected static function onDialogXmlLoaded(_arg1:Event):void{
var e = _arg1;
if (BasicSite.verbose){
trace("[Sitemap] onDialogXmlLoaded");
};
try {
currentDialogXml = new XML(e.target.data);
} catch(e:Error) {
if (BasicSite.verbose){
trace(("[Sitemap] onSitemapLoaded - error:" + e.message));
};
};
dialogDispatcher.dispatchEvent(new Event(DIALOG_LOADED));
}
public static function getParam(_arg1:String):String{
var paramName = _arg1;
return (sitemapXml.params.param.(@name == paramName).@value);
}
public static function transitionDialogXml(_arg1:EventDispatcher, _arg2:String):XML{
var dialogPath:String;
var aDisp = _arg1;
var aDialogId = _arg2;
dialogPath = getDialogPath(aDialogId);
dialogDispatcher = aDisp;
if (sitemapXml.sitemap.dialogs..dialog.(@id == aDialogId).children().length() >= 1){
currentDialogXml = XML(sitemapXml.sitemap.dialogs..dialog.(@id == aDialogId));
TweenLite.delayedCall(0.1, dispatcher.dispatchEvent, [new Event(DIALOG_LOADED)]);
} else {
trace((((((("[Sitemap] loadDialogXML - load " + baseUrl) + "xml/") + lang) + "dialogs/") + dialogPath) + ".xml"));
dialogLoader = new URLLoader();
dialogLoader.addEventListener(Event.COMPLETE, onTransitionDialogXmlLoaded);
dialogLoader.load(new URLRequest(((((((baseUrl + "xml/") + lang) + "dialogs/") + dialogPath) + ".xml") + BasicSite.version)));
};
return (XML(sitemapXml.sitemap.dialogs..dialog.(@id == aDialogId)));
}
public static function getEntryParams():Array{
var _local1:Array;
var _local2:XML;
_local1 = new Array();
for each (_local2 in sitemapXml.params.param) {
_local1[_local2.@name] = _local2.@value;
};
return (_local1);
}
public static function dialogExistsWithId(_arg1:String):Boolean{
var of = _arg1;
return (Boolean((sitemapXml.sitemap.dialogs..dialog.(@id == of).@id.toString().length > 0)));
}
public static function getEntryPageId():String{
return (sitemapXml.params.param.(@name == "entryPage").@value);
}
protected static function onTransitionDialogXmlLoaded(_arg1:Event):void{
var e = _arg1;
if (BasicSite.verbose){
trace("[Sitemap] onTransitionDialogXmlLoaded");
};
try {
currentDialogXml = new XML(e.target.data);
} catch(e:Error) {
if (BasicSite.verbose){
trace(("[Sitemap] onSitemapLoaded - error:" + e.message));
};
};
dialogDispatcher.dispatchEvent(new Event(DIALOG_TRANSITIONED));
}
public static function loadDialogXml(_arg1:EventDispatcher, _arg2:String):XML{
var dialogPath:String;
var aDisp = _arg1;
var aDialogId = _arg2;
dialogDispatcher = aDisp;
dialogPath = getDialogPath(aDialogId);
if (sitemapXml.sitemap.dialogs..dialog.(@id == aDialogId).children().length() >= 1){
currentDialogXml = XML(sitemapXml.sitemap.dialogs..dialog.(@id == aDialogId));
TweenLite.delayedCall(0.1, dispatcher.dispatchEvent, [new Event(DIALOG_LOADED)]);
} else {
trace((((((("[Sitemap] loadDialogXML - load " + baseUrl) + "xml/") + lang) + "dialogs/") + dialogPath) + ".xml"));
dialogLoader = new URLLoader();
dialogLoader.addEventListener(Event.COMPLETE, onDialogXmlLoaded);
dialogLoader.load(new URLRequest(((((((baseUrl + "xml/") + lang) + "dialogs/") + dialogPath) + ".xml") + BasicSite.version)));
};
return (XML(sitemapXml.sitemap.dialogs..dialog.(@id == aDialogId)));
}
public static function loadSitemap(_arg1:EventDispatcher, _arg2:String, _arg3:String=""):void{
var _local4:URLLoader;
dispatcher = _arg1;
baseUrl = _arg2;
lang = (_arg3 + ((_arg3.length > 0)) ? "/" : "");
_local4 = new URLLoader();
_local4.addEventListener(Event.COMPLETE, onSitemapLoaded);
_local4.load(new URLRequest((((baseUrl + "xml/") + lang) + "site.xml")));
}
public static function transitionPageXml(_arg1:EventDispatcher, _arg2:String):XML{
var pagePath:String;
var aDisp = _arg1;
var aPageId = _arg2;
pagePath = getPagePath(aPageId);
dispatcher = aDisp;
if (sitemapXml.sitemap.pages..page.(@id == aPageId).children().length() >= 1){
currentPageXml = XML(sitemapXml.sitemap.pages..page.(@id == aPageId));
TweenLite.delayedCall(0.1, dispatcher.dispatchEvent, [new Event(DIALOG_LOADED)]);
} else {
trace((((((("[Sitemap] loadPageXML - load " + baseUrl) + "xml/") + lang) + "pages/") + pagePath) + ".xml"));
pageLoader = new URLLoader();
pageLoader.addEventListener(Event.COMPLETE, onTransitionPageXmlLoaded);
pageLoader.load(new URLRequest(((((((baseUrl + "xml/") + lang) + "pages/") + pagePath) + ".xml") + BasicSite.version)));
};
return (XML(sitemapXml.sitemap.pages..page.(@id == aPageId)));
}
protected static function onTransitionPageXmlLoaded(_arg1:Event):void{
var e = _arg1;
if (BasicSite.verbose){
trace("[Sitemap] onTransitionPageXmlLoaded");
};
try {
currentPageXml = new XML(e.target.data);
} catch(e:Error) {
if (BasicSite.verbose){
trace(("[Sitemap] onSitemapLoaded - error:" + e.message));
};
};
dispatcher.dispatchEvent(new Event(PAGE_TRANSITIONED));
}
protected static function onSitemapLoaded(_arg1:Event):void{
var e = _arg1;
if (BasicSite.verbose){
trace("[Sitemap] onSitemapLoaded");
};
try {
sitemapXml = new XML(e.target.data);
} catch(e:Error) {
if (BasicSite.verbose){
trace(("[Sitemap] onSitemapLoaded - error:" + e.message));
};
};
if (getGlobalAssetXml() != null){
dispatcher.dispatchEvent(new Event(XML_ONLY_LOADED));
} else {
dispatcher.dispatchEvent(new Event(LOADED));
};
}
}
}//package com.relish.net
Section 84
//AdvancedLoader (com.relish.ui.AdvancedLoader)
package com.relish.ui {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdvancedLoader extends Loader {
public var url:String;// = ""
public var params:Object;
public static const LOAD_COMPLETE:String = "loadComplete";
public static const PROGRESS:String = "loadProgress";
public static var filePath:String = "";
public function AdvancedLoader(_arg1:Object=null){
url = "";
super();
params = _arg1;
initialize();
}
private function onAdvancedLoadComplete(_arg1:Event):void{
enableProgressDispatch(false);
dispatchEvent(new Event(LOAD_COMPLETE));
}
private function onAdvancedLoadProgress(_arg1:Event):void{
dispatchEvent(new Event(PROGRESS));
}
public function get bytesLoaded():Number{
return ((this.contentLoaderInfo) ? contentLoaderInfo.bytesLoaded : 0);
}
public function enableProgressDispatch(_arg1:Boolean=true):void{
if (this.contentLoaderInfo){
if (_arg1){
this.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onAdvancedLoadProgress);
} else {
this.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onAdvancedLoadProgress);
};
};
}
private function initialize():void{
if (!params){
params = new Object();
};
if (params.dispatchProgress){
enableProgressDispatch();
};
this.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onCatchIOError);
}
public function get bytesTotal():Number{
return ((this.contentLoaderInfo) ? contentLoaderInfo.bytesTotal : 1);
}
override public function load(_arg1:URLRequest, _arg2:LoaderContext=null):void{
var $urlReq = _arg1;
var $context = _arg2;
if ($context == null){
$context = new LoaderContext();
};
$context.checkPolicyFile = true;
$context.applicationDomain = ApplicationDomain.currentDomain;
if ((((filePath.length > 0)) && (($urlReq.url.indexOf(filePath) < 0)))){
$urlReq = new URLRequest((filePath + $urlReq.url));
};
try {
url = $urlReq.url;
super.load($urlReq, $context);
contentLoaderInfo.addEventListener(Event.COMPLETE, onAdvancedLoadComplete);
} catch($error:Error) {
trace((("[AdvancedLoader] load - encountered an error while attempting to load " + url) + ":"));
trace($error.message);
};
}
private function onCatchIOError(_arg1:IOErrorEvent):void{
trace((("[AdvancedLoader] onCatchIOError - encountered an i/o error while loading " + url) + "."));
_arg1.stopImmediatePropagation();
}
}
}//package com.relish.ui
Section 85
//AnalyticsUtil (com.relish.util.AnalyticsUtil)
package com.relish.util {
import flash.events.*;
import flash.external.*;
public class AnalyticsUtil extends EventDispatcher {
private var trackers:Array;
public static const GA_V1:String = "Google Analytics v1";
public static const GA_V2:String = "Google Analytics v2";
public static const HITBOX:String = "HitBox";
public static const OMNITURE_SC:String = "Omniture Site Catalyst";
public function AnalyticsUtil(){
initialize();
}
private function initialize():void{
trackers = new Array();
}
public function addTracker(_arg1:String, _arg2:Object=null):void{
trackers.push(_arg1);
}
public function trackPage(_arg1:String):void{
trace(("[AnalyticsUtil] trackPage - Page hit for /" + _arg1));
if (trackers.indexOf(GA_V2) >= 0){
ExternalInterface.call("pageTracker._trackPageview", ("/" + _arg1));
};
if (trackers.indexOf(HITBOX) >= 0){
ExternalInterface.call("_hbLink", ("/flash/" + _arg1), "left", "0,0,0,0");
};
if (trackers.indexOf(OMNITURE_SC) >= 0){
ExternalInterface.call("scTrack", _arg1);
};
}
}
}//package com.relish.util
Section 86
//AssetList (com.relish.util.AssetList)
package com.relish.util {
import flash.events.*;
import flash.display.*;
import com.relish.view.*;
import com.relish.ui.*;
import flash.net.*;
import flash.media.*;
import com.relish.net.*;
public class AssetList extends EventDispatcher {
private var assetKeys:Array;
private var infos:Array;
private var totalBytes:Number;// = 0
private var assetsXml:XML;
private var loadsWithinTier:int;// = 0
private var numSized:int;// = 0
private var completeBytes:Number;// = 0
private var dataKeys:Array;
private var numSkippable:int;// = 0
private var assetArray:Array;
private var dataArray:Array;
private var dataLoaded:int;// = 0
private var urlLoaders:Array;
private var batchSize:int;// = 0
private var loaders:Array;
private var tieredAssets:Array;
private var totalPrimaryBytes:Number;// = 0
private var isCurrent:Boolean;// = false
private var skipReady:Boolean;// = false
private var currentTier:int;// = 1
public static const POSTLOAD:uint = 2;
public static const TYPE_DATA:uint = 3;
public static const PRELOAD:uint = 1;
public static const REQUEST:uint = 3;
public static const TYPE_AUDIO:uint = 2;
public static const TYPE_VIDEO:uint = 1;
public static const TYPE_SIMPLE:uint = 0;
public static var ASSET_READY:String = "assetReady";
public static var RESUME_LOAD:String = "resumeLoad";
public function AssetList(_arg1:XML){
currentTier = 1;
dataLoaded = 0;
loadsWithinTier = 0;
completeBytes = 0;
totalBytes = 0;
totalPrimaryBytes = 0;
numSized = 0;
isCurrent = false;
batchSize = 0;
numSkippable = 0;
skipReady = false;
super();
assetsXml = _arg1;
batchSize = ((int(assetsXml.@buffer) > 0)) ? int(assetsXml.@buffer) : 0;
isCurrent = true;
initialize();
}
public function pollProgress():Object{
var _local1:Object;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
_local1 = new Object();
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = 0;
while (_local6 < assetArray.length) {
if (assetArray[_local6].priority.toString() == String(currentTier)){
if (assetArray[_local6].assetType == TYPE_SIMPLE){
_local3 = (_local3 + assetArray[_local6].content.contentLoaderInfo.bytesLoaded);
_local4 = (_local4 + assetArray[_local6].content.contentLoaderInfo.bytesTotal);
if (assetArray[_local6].priority.toString() == String(PRELOAD)){
_local5 = (_local5 + assetArray[_local6].content.contentLoaderInfo.bytesLoaded);
};
} else {
if (assetArray[_local6].stream == undefined){
} else {
if (assetArray[_local6].skipped){
_local2 = 0;
} else {
_local2 = (assetArray[_local6].stream.bytesTotal * Number(assetArray[_local6].readyPercent));
};
_local4 = (_local4 + _local2);
_local3 = (_local3 + Math.min(assetArray[_local6].stream.bytesLoaded, _local2));
if (assetArray[_local6].priority.toString() == String(PRELOAD)){
_local5 = (_local5 + Math.min(assetArray[_local6].stream.bytesLoaded, _local2));
};
if (((!(assetArray[_local6].loaded)) && ((assetArray[_local6].stream.bytesLoaded >= _local2)))){
trace((((("[AssetList] pollProgress - " + assetArray[_local6].stream.bytesLoaded) + " / ") + _local2) + " is good enough."));
assetArray[_local6].loaded = true;
onAssetLoaded(null);
};
};
};
};
_local6++;
};
_local6 = 0;
while (_local6 < dataKeys.length) {
if ((((dataArray[dataKeys[_local6]].content.bytesLoaded > 0)) && ((dataArray[dataKeys[_local6]].content.bytesLoaded >= dataArray[dataKeys[_local6]].content.bytesTotal)))){
_local4 = (_local4 + 10);
_local3 = (_local3 + 10);
_local5 = (_local5 + 10);
};
_local6++;
};
if ((((((currentTier == PRELOAD)) && ((assetKeys.length <= 0)))) && ((_local5 >= totalPrimaryBytes)))){
currentTier++;
};
_local1 = {currentTier:currentTier, localBytes:_local4, loadedBytes:_local3, totalBytes:totalBytes, preloadBytes:_local5, primaryTotal:totalPrimaryBytes};
_local1.accurateValues = Boolean(!((tieredAssets == null)));
return (_local1);
}
private function initialize():void{
var _local1:Object;
var _local2:AdvancedLoader;
var _local3:Object;
var _local4:URLLoader;
var _local5:URLLoader;
var _local6:XML;
var _local7:int;
assetKeys = new Array();
assetArray = new Array();
dataKeys = new Array();
dataArray = new Array();
infos = new Array();
loaders = new Array();
urlLoaders = new Array();
_local7 = 0;
while (_local7 < assetsXml.children().length()) {
_local1 = new Object();
_local6 = assetsXml.children()[_local7];
if ((((_local6.@url.toString().indexOf(".xml") > 0)) || ((_local6.@url.toString().indexOf(".asp") > 0)))){
_local3 = new Object();
_local3.assetType = TYPE_DATA;
_local3.id = _local6.@id.toString();
if (_local6.@url.toString().indexOf("http://") >= 0){
_local3.url = _local6.@url;
} else {
_local3.url = ((Sitemap.baseUrl + _local6.@url) + BasicSite.version);
};
totalBytes = (totalBytes + 10);
totalPrimaryBytes = (totalPrimaryBytes + 10);
dataKeys.push(_local3.id);
dataArray[_local3.id] = _local3;
_local4 = new URLLoader();
_local4.addEventListener(Event.COMPLETE, onDataLoaded);
_local4.load(new URLRequest(_local3.url));
_local3.content = _local4;
} else {
if (_local6.@canSkip == "y"){
numSkippable++;
};
if ((((_local6.@url.toString().indexOf(".flv") < 0)) && ((_local6.@url.toString().indexOf(".f4v") < 0)))){
_local2 = new AdvancedLoader();
if (_local6.@priority.toString() == String(PRELOAD)){
_local2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onPrimaryByteInfo);
};
_local2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onByteInfo);
_local2.name = _local6.@id.toString();
_local2.load(new URLRequest(((Sitemap.baseUrl + _local6.@url) + BasicSite.version)));
infos.push(_local2.contentLoaderInfo);
loaders.push(_local2);
urlLoaders.push("");
_local1.assetType = TYPE_SIMPLE;
_local1.content = _local2;
} else {
_local5 = new URLLoader();
if (_local6.@priority.toString() == String(PRELOAD)){
_local5.addEventListener(ProgressEvent.PROGRESS, onPrimaryByteInfo);
};
_local5.addEventListener(ProgressEvent.PROGRESS, onByteInfo);
_local5.load(new URLRequest(((Sitemap.baseUrl + _local6.@url) + BasicSite.version)));
urlLoaders.push(_local5);
infos.push("");
loaders.push("");
_local1.assetType = TYPE_VIDEO;
_local1.content = _local5;
_local1.readyPercent = ((_local6.@readyPercent.toString().length > 0)) ? _local6.@readyPercent.toString() : "1";
};
_local1.type = _local6.@type.toString();
_local1.id = _local6.@id.toString();
_local1.name = _local6.@name.toString();
_local1.url = _local6.@url.toString();
_local1.fullUrl = (Sitemap.baseUrl + _local6.@url.toString());
_local1.priority = _local6.@priority;
_local1.loadInitiated = false;
_local1.loaded = false;
_local1.canSkip = Boolean((_local6.@canSkip == "y"));
assetKeys.push(_local1.id);
assetArray.push(_local1);
};
_local7++;
};
}
public function getAssetNameByIndex(_arg1:int):String{
return (assetKeys[_arg1]);
}
public function getAssetInfo(_arg1:String):Object{
return (assetArray[assetKeys.indexOf(_arg1)]);
}
private function onPrimaryByteInfo(_arg1:Event):void{
if ((_arg1.currentTarget is LoaderInfo)){
LoaderInfo(_arg1.currentTarget).removeEventListener(ProgressEvent.PROGRESS, onPrimaryByteInfo);
totalPrimaryBytes = (totalPrimaryBytes + LoaderInfo(_arg1.currentTarget).bytesTotal);
} else {
URLLoader(_arg1.currentTarget).removeEventListener(ProgressEvent.PROGRESS, onPrimaryByteInfo);
totalPrimaryBytes = (totalPrimaryBytes + (URLLoader(_arg1.currentTarget).bytesTotal * Number(assetArray[urlLoaders.indexOf(_arg1.currentTarget)].readyPercent)));
};
}
public function isComplete():Boolean{
var _local1:int;
trace(("[AssetList] isComplete - " + tieredAssets));
if (tieredAssets == null){
return (false);
};
_local1 = 0;
while (_local1 < tieredAssets[PRELOAD].length) {
if (((((!(tieredAssets[PRELOAD][_local1].loadInitiated)) || ((((tieredAssets[PRELOAD][_local1].assetType == TYPE_SIMPLE)) && ((((tieredAssets[PRELOAD][_local1].content.content == null)) || ((tieredAssets[PRELOAD][_local1].content.contentLoaderInfo.bytesLoaded < tieredAssets[PRELOAD][_local1].content.contentLoaderInfo.bytesTotal)))))))) || ((((tieredAssets[PRELOAD][_local1].assetType == TYPE_VIDEO)) && ((tieredAssets[PRELOAD][_local1].stream == null)))))){
return (false);
};
_local1++;
};
trace("[AssetList] isComplete - already fully cached, no need to preload");
return (true);
}
public function getData(_arg1:String){
var _local2:*;
if (dataKeys.indexOf(_arg1) < 0){
trace((("[AssetList] getData - ERROR: no data \"" + _arg1) + "\" found"));
return (null);
};
_local2 = dataArray[_arg1];
if ((((_local2 == null)) || ((_local2 == undefined)))){
trace((("[AssetList] getData - ERROR: data found at \"" + _arg1) + "\" is null"));
};
return (dataArray[_arg1].content.data);
}
public function getAssetByIndex(_arg1:int){
return (getAsset(assetKeys[_arg1]));
}
protected function secondaryAssetLoaded(_arg1:Event):void{
var _local2:StatusEvent;
trace(("[AssetList] secondaryAssetLoaded - " + LoaderInfo(_arg1.target).loader.name));
_local2 = new StatusEvent(ASSET_READY);
_local2.code = LoaderInfo(_arg1.target).loader.name;
dispatchEvent(_local2);
}
public function getAssetLoader(_arg1:String, _arg2:Boolean=true):AdvancedLoader{
var _local3:*;
_local3 = assetArray[assetKeys.indexOf(_arg1)];
if (((_arg2) && (!(_local3.loadInitiated)))){
_local3.content.load(new URLRequest(((Sitemap.baseUrl + _local3.url) + BasicSite.version)));
_local3.loadInitiated = true;
};
return (assetArray[assetKeys.indexOf(_arg1)].content);
}
public function loadAsset(_arg1:String):void{
var _local2:AdvancedLoader;
var _local3:StatusEvent;
_local3 = new StatusEvent(ASSET_READY);
_local3.code = _arg1;
if (getAssetLoader(_arg1).content != null){
dispatchEvent(_local3);
} else {
_local2 = getAssetLoader(_arg1);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, secondaryAssetLoaded);
_local2.name = _arg1;
};
}
function onVideoMetadata(_arg1):void{
}
public function pauseDownload():void{
var i:int;
trace("[AssetList] pauseDownload");
isCurrent = false;
i = 0;
while (i < assetArray.length) {
if (((assetArray[i].loadInitiated) && ((assetArray[i].content.contentLoaderInfo.bytesLoaded < assetArray[i].content.contentLoaderInfo.bytesTotal)))){
assetArray[i].loadInitiated = false;
assetArray[i].content.contentLoaderInfo.removeEventListener(Event.COMPLETE, onAssetLoaded);
try {
assetArray[i].content.close();
} catch(e:Error) {
};
assetArray[i].content = null;
assetArray[i].content = new AdvancedLoader();
assetArray[i].content.name = assetArray[i].id;
};
i = (i + 1);
};
}
public function getLoadedSecondaries():Array{
var _local1:Array;
var _local2:int;
_local1 = new Array();
if (((tieredAssets) && ((tieredAssets.length > 0)))){
_local2 = 0;
while (_local2 < tieredAssets[POSTLOAD].length) {
if (((!((tieredAssets[POSTLOAD][_local2] == undefined))) && (!((tieredAssets[POSTLOAD][_local2].content.content == null))))){
_local1.push(tieredAssets[POSTLOAD][_local2].id);
};
_local2++;
};
};
return (_local1);
}
public function getAssetLoaderByIndex(_arg1:int, _arg2:Boolean=true):AdvancedLoader{
return (getAssetLoader(assetKeys[_arg1]));
}
private function initializeTiers():void{
var i:int;
var priority:uint;
if (BasicSite.verbose){
trace("[AssetList] initializeTiers");
};
i = 0;
while (i < assetArray.length) {
try {
assetArray[i].content.close();
} catch(e:Error) {
};
assetArray[i].content = new AdvancedLoader();
assetArray[i].content.name = assetArray[i].id;
i = (i + 1);
};
tieredAssets = new Array();
tieredAssets[PRELOAD] = new Array();
tieredAssets[POSTLOAD] = new Array();
tieredAssets[REQUEST] = new Array();
i = 0;
while (i < assetArray.length) {
priority = uint(assetArray[i].priority);
tieredAssets[priority].push(assetArray[i]);
i = (i + 1);
};
loadTier(PRELOAD);
}
private function onDataLoaded(_arg1:Event):void{
dataLoaded++;
}
private function onAssetLoaded(_arg1:Event):void{
var _local2:int;
var _local3:StatusEvent;
var _local4:int;
loadsWithinTier++;
if (loadsWithinTier >= tieredAssets[currentTier].length){
if (currentTier == PRELOAD){
currentTier = POSTLOAD;
loadTier(POSTLOAD);
};
} else {
if (batchSize > 0){
_local2 = 0;
while (_local2 < tieredAssets[currentTier].length) {
if (!tieredAssets[currentTier][_local2].loadInitiated){
if (tieredAssets[currentTier][_local2].assetType == TYPE_SIMPLE){
tieredAssets[currentTier][_local2].content.contentLoaderInfo.addEventListener(Event.COMPLETE, onAssetLoaded);
tieredAssets[currentTier][_local2].content.load(new URLRequest(((Sitemap.baseUrl + tieredAssets[currentTier][_local2].url) + BasicSite.version)));
tieredAssets[currentTier][_local2].loadInitiated = true;
} else {
if (tieredAssets[currentTier][_local2].assetType == TYPE_VIDEO){
createVideoLoader(currentTier, _local2);
};
};
break;
};
_local2++;
};
};
};
if (assetArray[_local4].priority == POSTLOAD){
_local3 = new StatusEvent(ASSET_READY);
if (assetArray[_local4].assetType != TYPE_VIDEO){
_local4 = assetKeys.indexOf(LoaderInfo(_arg1.target).loader.name);
LoaderInfo(_arg1.target).loader.name;
};
dispatchEvent(_local3);
};
}
public function getAsset(_arg1:String){
var _local2:*;
if (assetKeys.indexOf(_arg1) < 0){
trace((("[AssetList] getAsset - ERROR: no asset \"" + _arg1) + "\" found"));
return (null);
};
_local2 = assetArray[assetKeys.indexOf(_arg1)];
if ((((_local2 == null)) || ((_local2 == undefined)))){
trace((("[AssetList] getAsset - ERROR: asset found at \"" + _arg1) + "\" is null"));
};
if (_local2.assetType == TYPE_VIDEO){
return (assetArray[assetKeys.indexOf(_arg1)].stream);
};
return (assetArray[assetKeys.indexOf(_arg1)].content.content);
}
private function createVideoLoader(_arg1:int, _arg2:int):void{
var nc:NetConnection;
var stream:NetStream;
var customClient:Object;
var id = _arg1;
var i = _arg2;
nc = new NetConnection();
nc.connect(null);
stream = new NetStream(nc);
customClient = new Object();
customClient.onCuePoint = function (... _args):void{
};
customClient.onMetaData = onVideoMetadata;
customClient.onPlayStatus = function (... _args):void{
};
stream.client = customClient;
tieredAssets[id][i].stream = stream;
tieredAssets[id][i].stream.addEventListener(NetStatusEvent.NET_STATUS, onVideoNetStatus);
tieredAssets[id][i].loadInitiated = true;
try {
stream.play(((Sitemap.baseUrl + tieredAssets[id][i].url) + BasicSite.version));
} catch(e:SecurityError) {
};
}
public function resumeDownload():Number{
var _local1:int;
var _local2:int;
var _local3:int;
trace("[AssetList] resumeDownload");
_local1 = 0;
_local2 = 0;
isCurrent = true;
if (currentTier < REQUEST){
_local3 = 0;
while (_local3 < tieredAssets[currentTier].length) {
if (((((!(tieredAssets[currentTier][_local3].loadInitiated)) && ((((_local2 < batchSize)) || ((batchSize == 0)))))) && ((((tieredAssets[currentTier][_local3].content.contentLoaderInfo.bytesLoaded <= 0)) || ((tieredAssets[currentTier][_local3].content.contentLoaderInfo.bytesLoaded < tieredAssets[currentTier][_local3].content.contentLoaderInfo.bytesTotal)))))){
tieredAssets[currentTier][_local3].loadInitiated = true;
tieredAssets[currentTier][_local3].content.contentLoaderInfo.addEventListener(Event.COMPLETE, onAssetLoaded);
tieredAssets[currentTier][_local3].content.load(new URLRequest((tieredAssets[currentTier][_local3].url + BasicSite.version)));
_local1++;
};
_local3++;
};
};
return (_local1);
}
private function onByteInfo(_arg1:Event):void{
if ((_arg1.currentTarget is LoaderInfo)){
LoaderInfo(_arg1.currentTarget).removeEventListener(ProgressEvent.PROGRESS, onByteInfo);
totalBytes = (totalBytes + LoaderInfo(_arg1.currentTarget).bytesTotal);
loaders[infos.indexOf(LoaderInfo(_arg1.currentTarget))].close();
} else {
URLLoader(_arg1.currentTarget).removeEventListener(ProgressEvent.PROGRESS, onByteInfo);
totalBytes = (totalBytes + (URLLoader(_arg1.currentTarget).bytesTotal * Number(assetArray[urlLoaders.indexOf(_arg1.currentTarget)].readyPercent)));
URLLoader(_arg1.currentTarget).close();
};
numSized++;
if (numSized >= assetArray.length){
trace(("[AssetList] onByteInfo - primary bytes: " + totalPrimaryBytes));
initializeTiers();
};
}
public function get length():int{
return (assetKeys.length);
}
private function loadTier(_arg1:int):void{
var _local2:int;
trace(("[AssetList] loadTier - " + _arg1));
loadsWithinTier = 0;
if (tieredAssets[_arg1].length > 0){
_local2 = 0;
while ((((_local2 < tieredAssets[_arg1].length)) && ((((_local2 < batchSize)) || ((batchSize == 0)))))) {
if ((((tieredAssets[_arg1][_local2].url.indexOf(".f4v") < 0)) && ((tieredAssets[_arg1][_local2].url.indexOf(".flv") < 0)))){
tieredAssets[_arg1][_local2].content.contentLoaderInfo.addEventListener(Event.COMPLETE, onAssetLoaded);
tieredAssets[_arg1][_local2].content.load(new URLRequest(((Sitemap.baseUrl + tieredAssets[_arg1][_local2].url) + BasicSite.version)));
tieredAssets[_arg1][_local2].loadInitiated = true;
} else {
createVideoLoader(_arg1, _local2);
};
_local2++;
};
} else {
if (currentTier == PRELOAD){
currentTier = POSTLOAD;
loadTier(POSTLOAD);
};
};
}
public function skipAssets():void{
var _local1:Array;
var _local2:int;
_local1 = getSkippable();
_local2 = 0;
while (_local2 < _local1.length) {
if (_local1[_local2].loaded){
_local1[_local2].skipped = true;
} else {
if (_local1[_local2].assetType == TYPE_VIDEO){
_local1[_local2].stream.removeEventListener(NetStatusEvent.NET_STATUS, onVideoNetStatus);
_local1[_local2].stream.close();
_local1[_local2].skipped = true;
} else {
if (_local1[_local2].assetType == TYPE_SIMPLE){
};
};
};
_local2++;
};
}
override public function toString():String{
var _local1:String;
var _local2:int;
_local1 = "";
_local2 = 0;
while ((((_local2 < 3)) && ((_local2 < assetArray.length)))) {
_local1 = (_local1 + ((assetArray[_local2].id + (assetArray[_local2].loadInitiated) ? "(y)" : "(n)") + ", "));
_local2++;
};
if (_local1.length > 0){
_local1 = _local1.slice(0, (_local1.length - 2));
};
return (_local1);
}
public function getSkippable():Array{
var _local1:Array;
var _local2:int;
_local1 = new Array();
_local2 = 0;
while (_local2 < tieredAssets[PRELOAD].length) {
if (((((tieredAssets[PRELOAD][_local2].canSkip) && ((tieredAssets[PRELOAD][_local2].assetType == TYPE_VIDEO)))) && (!((tieredAssets[PRELOAD][_local2].stream == null))))){
_local1.push(tieredAssets[PRELOAD][_local2]);
} else {
if (((((((tieredAssets[PRELOAD][_local2].canSkip) && (!((tieredAssets[PRELOAD][_local2].content == null))))) && ((tieredAssets[PRELOAD][_local2].assetType == TYPE_SIMPLE)))) && (!((tieredAssets[PRELOAD][_local2].content.contentLoaderInfo == null))))){
_local1.push(tieredAssets[PRELOAD][_local2]);
};
};
_local2++;
};
return (_local1);
}
private function onVideoNetStatus(_arg1:NetStatusEvent):void{
if (_arg1.info.code == "NetStream.Play.Start"){
NetStream(_arg1.currentTarget).pause();
NetStream(_arg1.currentTarget).removeEventListener(NetStatusEvent.NET_STATUS, onVideoNetStatus);
};
}
public function get canSkip():Boolean{
var _local1:Array;
if ((((((tieredAssets == null)) || ((tieredAssets[PRELOAD] == undefined)))) || ((numSkippable <= 0)))){
return (false);
};
_local1 = getSkippable();
return (Boolean((_local1.length >= numSkippable)));
}
}
}//package com.relish.util
Section 87
//BasicMenu (com.relish.view.BasicMenu)
package com.relish.view {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import com.relish.managers.*;
public class BasicMenu extends Sprite {
public var menuClips:Array;
public var id:String;// = ""
protected var menuXml:XML;
public var menuOptions:Array;
public static const FADE_OUT:String = "fadeOutMenu";
public static const ALL_MENUS:String = "allMenus";
public function BasicMenu(){
id = "";
super();
menuClips = new Array();
}
protected function clickMenuOption(_arg1:Event):void{
var _local2:int;
_local2 = ((_arg1.currentTarget == stage)) ? menuClips.indexOf(_arg1.target) : menuClips.indexOf(_arg1.currentTarget);
interpretAction(menuOptions[_local2].action, menuOptions[_local2].id);
}
public function set clips(_arg1:Array):void{
menuClips = _arg1;
}
public function get options():Array{
return (menuOptions);
}
public function setContent(_arg1:XML):void{
var _local2:XML;
id = _arg1.name();
if (BasicSite.verbose){
trace("[BasicMenu] setContent");
};
menuOptions = new Array();
for each (_local2 in _arg1.item) {
menuOptions.push({title:_local2.@name, id:_local2.@id, action:_local2.@action, fullNode:_local2});
};
refresh();
}
protected function interpretAction(_arg1:String, _arg2:String):Boolean{
if (BasicSite.verbose){
trace(("[BasicMenu] interpretAction - " + _arg1));
};
switch (_arg1.split(":")[0]){
case "page":
return (PageManager.loadPage(_arg1.split(":")[1]));
case "dialog":
return (DialogManager.loadDialog(_arg1.split(":")[1]));
case "event":
dispatchEvent(new Event(_arg1.split(":")[1]));
return (true);
case "link":
navigateToURL(new URLRequest(_arg1.substring((_arg1.indexOf(":") + 1), _arg1.length)));
return (true);
case "func":
var _local3 = this;
_local3[_arg1.split(":")[1]](_arg2);
return (true);
default:
trace(("[BasicMenu] interpretAction - unable to interpret " + _arg1));
return (false);
};
}
public function getClipById(_arg1:String):DisplayObject{
var _local2:int;
_local2 = 0;
while ((((_local2 < menuOptions.length)) && ((_local2 < menuClips.length)))) {
if (menuOptions[_local2].id == _arg1){
return (menuClips[_local2]);
};
_local2++;
};
return (null);
}
protected function refresh():void{
}
public function updateHighlight(_arg1:String):void{
}
}
}//package com.relish.view
Section 88
//BasicSite (com.relish.view.BasicSite)
package com.relish.view {
import flash.events.*;
import flash.display.*;
import gs.*;
import com.relish.util.*;
import com.relish.events.*;
import com.asual.swfaddress.*;
import com.relish.managers.*;
import com.relish.net.*;
import flash.external.*;
public class BasicSite extends Sprite {
protected var dialogDispatcher:EventDispatcher;
protected var dialogs:Array;
protected var menus:Array;
protected var tracker:AnalyticsUtil;
protected var sitemapDispatcher:EventDispatcher;
protected var pageDispatcher:EventDispatcher;
protected var page:PageTemplate;
public static var verbose:Boolean = true;
public static var usePartialCaching:Boolean = true;
protected static var initialURL:String = "";
public static var globalAssets:AssetList;
public static var rootRef:BasicSite;
public static var useCacheBusting:Boolean = true;
protected static var ignoreNext:Boolean = true;
public static var useDeepLinking:Boolean = false;
public static var useAssetCaching:Boolean = true;
public static var version:String = "";
public function BasicSite(){
rootRef = this;
menus = new Array();
dialogs = new Array();
tracker = new AnalyticsUtil();
addEventListener(Event.ADDED_TO_STAGE, addedToStage);
}
protected function removeDialog(_arg1:PageTemplate):void{
if (_arg1 != null){
_arg1.destroy();
if (dialogs.indexOf(_arg1) >= 0){
dialogs.splice(dialogs.indexOf(_arg1), 1);
};
if (this.contains(_arg1)){
trace("[BasicSite] removeDialog - success");
removeChild(_arg1);
_arg1 = null;
};
};
}
public function getPage():PageTemplate{
return (page);
}
public function getPackage():String{
return ("com.relish");
}
protected function pollProgress():void{
var contentLoadEvent:ContentLoadEvent;
var progressObject:Object;
try {
progressObject = globalAssets.pollProgress();
} catch(err:Error) {
trace("[BasicSite] pollProgress - ERROR in polling asset list");
TweenLite.delayedCall(0.1, pollProgress, []);
return;
};
try {
if (((!((progressObject == null))) && (progressObject.accurateValues))){
contentLoadEvent = new ContentLoadEvent();
contentLoadEvent.progressObject = progressObject;
};
} catch(err:Error) {
trace(("[BasicSite] pollProgress - ERROR in calculating load progress - " + err.message));
};
if ((((((progressObject.currentTier > AssetList.PRELOAD)) || ((((progressObject.preloadBytes > 0)) && ((progressObject.preloadBytes >= progressObject.primaryTotal)))))) && ((progressObject.primaryTotal > 0)))){
onSitemapLoaded(new Event(Sitemap.LOADED));
} else {
TweenLite.delayedCall(0.1, pollProgress, []);
};
}
protected function loadFirstPage():void{
var _local1:String;
if (initialURL.length > 0){
_local1 = initialURL.split("/")[0];
} else {
_local1 = Sitemap.getEntryPageId();
};
if (_local1.length > 0){
PageManager.loadPage(_local1);
};
}
protected function handleInvalidNavigation(_arg1:String):void{
trace((("[BasicSite] handleInvalidNavigation - " + _arg1) + "could not be found in the sitemap"));
}
protected function addedToStage(_arg1:Event):void{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, onStageResize);
refreshLayout();
}
public function getCurrentPageId():String{
return (PageManager.currentPageId);
}
protected function onPageReady(_arg1:Event):void{
var _local2:int;
_local2 = 0;
while (_local2 < dialogs.length) {
DialogManager.destroyDialog(dialogs[_local2].id);
_local2++;
};
if (((!((page == null))) && (this.contains(page)))){
removeChild(page);
page = null;
};
_local2 = 0;
while (_local2 < menus.length) {
menus[_local2].updateHighlight(PageManager.currentPageId);
_local2++;
};
page = PageManager.currentPage;
page.addEventListener(BasicMenu.FADE_OUT, fadeOutMenu);
page.animateIn();
addChild(page);
tracker.trackPage(Sitemap.getPagePath(page.id));
refreshLayout();
}
protected function loadDialogFromAddressBar(_arg1:String):void{
trace(("[PageManager] loadDialogFromAddressBar - handles " + _arg1));
if (_arg1.indexOf("/") > 0){
DialogManager.loadDialog(_arg1.split("/")[0], {subpage:_arg1.split("/")[1]});
} else {
DialogManager.loadDialog(_arg1);
};
}
protected function onDialogTransitioned(_arg1:Event):void{
trace("[BasicSite] onDialogTransitioned");
tracker.trackPage(Sitemap.getDialogPath(dialogs[(dialogs.length - 1)].id));
refreshLayout();
}
protected function handleSWFAddress(_arg1:SWFAddressEvent){
var _local2:String;
trace(("[BasicSite] handleSWFAddress - " + ignoreNext));
_local2 = _arg1.value;
if ((((_local2.length > 0)) && ((_local2.charAt((_local2.length - 1)) == "/")))){
_local2 = _local2.slice(0, (_local2.length - 1));
};
if ((((_local2.length > 0)) && ((_local2.charAt(0) == "/")))){
_local2 = _local2.slice(1, _local2.length);
};
if ((((initialURL == "")) && (!((_local2 == ""))))){
initialURL = _local2;
trace(("[BasicSite] handleSWFAddress - Establishes initialURL as " + initialURL));
} else {
if (!ignoreNext){
trace(("[BasicSite] handleSWFAddress - handles " + _local2));
if (Sitemap.pageExistsWithId(_local2.split("/")[0])){
loadPageFromAddressBar(_local2);
} else {
if (Sitemap.dialogExistsWithId(_local2.split("/")[0])){
loadDialogFromAddressBar(_local2);
} else {
handleInvalidNavigation(_local2.split("/")[0]);
};
};
};
};
ignoreNext = false;
}
protected function onSitemapLoaded(_arg1:Event):void{
trace("[BasicSite] onSitemapLoaded");
sitemapDispatcher.removeEventListener(Sitemap.LOADED, onSitemapLoaded);
sitemapDispatcher.removeEventListener(Sitemap.XML_ONLY_LOADED, onSitemapXmlLoaded);
sitemapDispatcher = null;
if (Sitemap.getEntryParams()["packageName"] != undefined){
PageManager.setPackageName(Sitemap.getEntryParams()["packageName"]);
DialogManager.setPackageName(Sitemap.getEntryParams()["packageName"]);
};
if (useDeepLinking){
SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleSWFAddress);
};
if (((((useCacheBusting) && ((version == "")))) && ((loaderInfo.url.indexOf("file://") < 0)))){
version = ("?v=" + Sitemap.getParam("version"));
};
TweenLite.delayedCall(0.1, loadFirstPage, []);
}
public function setURL(_arg1:String):void{
if (BasicSite.useDeepLinking){
if (_arg1.length > 0){
while ((((_arg1.length > 0)) && ((_arg1.charAt((_arg1.length - 1)) == "/")))) {
_arg1 = _arg1.slice(0, (_arg1.length - 1));
};
} else {
_arg1 = Sitemap.getEntryPageId();
};
trace((("[PageManager] setURL - sets deep link '" + _arg1) + "'"));
ignoreNext = true;
SWFAddress.setValue(_arg1);
};
}
protected function fadeOutMenu(_arg1:InfoEvent):void{
var _local2:int;
_local2 = 0;
while (_local2 < menus.length) {
if ((((_arg1.data.id == BasicMenu.ALL_MENUS)) || ((menus[_local2].id == _arg1.data.id)))){
TweenLite.to(menus[_local2], 0.3, {autoAlpha:0});
};
_local2++;
};
}
protected function loadPageFromAddressBar(_arg1:String):void{
trace(("[PageManager] loadPageFromAddressBar - handles " + _arg1));
while (dialogs.length > 0) {
removeDialog(dialogs[0]);
};
if (_arg1.indexOf("/") > 0){
PageManager.loadPage(_arg1.split("/")[0], {subpage:_arg1.split("/")[1]});
} else {
PageManager.loadPage(_arg1);
};
}
protected function onSitemapXmlLoaded(_arg1:Event):void{
trace("[BasicSite] onSitemapXmlLoaded");
globalAssets = new AssetList(Sitemap.getGlobalAssetXml());
pollProgress();
}
protected function deleteDialog(_arg1:Event):void{
var _local2:PageTemplate;
trace("[BasicSite] deleteDialog");
_local2 = PageTemplate(_arg1.currentTarget);
if (dialogs.indexOf(_local2) >= 0){
dialogs.splice(dialogs.indexOf(_local2), 1);
};
TweenLite.delayedCall(_local2.animateOut(), removeDialog, [_local2]);
if (dialogs.length > 0){
BasicSite.rootRef.setURL(dialogs[(dialogs.length - 1)].id);
} else {
BasicSite.rootRef.setURL((PageManager.currentPageId + ((PageManager.currentSubpageId.length > 0)) ? ("/" + PageManager.currentSubpageId) : ""));
};
refreshLayout();
}
protected function refreshLayout():void{
}
protected function onPageTransitioned(_arg1:Event):void{
trace("[BasicSite] onPageTransitioned");
tracker.trackPage(Sitemap.getPagePath(page.id));
refreshLayout();
}
protected function onDialogReady(_arg1:Event):void{
var _local2:int;
trace("[BasicSite] onDialogReady");
_local2 = 0;
while (_local2 < dialogs.length) {
TweenLite.delayedCall(dialogs[_local2].animateOut(), DialogManager.destroyDialog, [dialogs[_local2].id]);
_local2++;
};
dialogs.push(DialogManager.dialogs[(DialogManager.dialogs.length - 1)]);
dialogs[(dialogs.length - 1)].addEventListener(DialogManager.REMOVE_DIALOG, deleteDialog);
dialogs[(dialogs.length - 1)].addEventListener(BasicMenu.FADE_OUT, fadeOutMenu);
dialogs[(dialogs.length - 1)].animateIn();
addChild(dialogs[(dialogs.length - 1)]);
tracker.trackPage(Sitemap.getDialogPath(dialogs[(dialogs.length - 1)].id));
refreshLayout();
}
protected function loadSitemap(_arg1:String, _arg2:String=""):void{
pageDispatcher = new EventDispatcher();
pageDispatcher.addEventListener(PageManager.PAGE_READY, onPageReady);
pageDispatcher.addEventListener(PageManager.PAGE_TRANSITIONED, onPageTransitioned);
PageManager.init(pageDispatcher);
dialogDispatcher = new EventDispatcher();
dialogDispatcher.addEventListener(DialogManager.DIALOG_READY, onDialogReady);
dialogDispatcher.addEventListener(DialogManager.DIALOG_TRANSITIONED, onDialogTransitioned);
DialogManager.init(dialogDispatcher);
sitemapDispatcher = new EventDispatcher();
sitemapDispatcher.addEventListener(Sitemap.LOADED, onSitemapLoaded);
sitemapDispatcher.addEventListener(Sitemap.XML_ONLY_LOADED, onSitemapXmlLoaded);
Sitemap.loadSitemap(sitemapDispatcher, _arg1, _arg2);
}
protected function onStageResize(_arg1:Event):void{
refreshLayout();
}
public static function getInitialURL():String{
return (initialURL);
}
}
}//package com.relish.view
Section 89
//PageTemplate (com.relish.view.PageTemplate)
package com.relish.view {
import flash.events.*;
import flash.display.*;
import gs.*;
import com.relish.util.*;
import flash.net.*;
import flash.text.*;
public class PageTemplate extends MovieClip {
public var id:String;// = ""
protected var assets:AssetList;
public var filePath:String;// = ""
public function PageTemplate(){
id = "";
filePath = "";
super();
}
public function destroy():void{
}
protected function handleSecondaryAsset(_arg1:String):void{
}
public function transitionIn():void{
alpha = 0;
TweenLite.to(this, 0.3, {autoAlpha:1});
}
protected function onSecondaryAssetLoaded(_arg1:StatusEvent):void{
handleSecondaryAsset(_arg1.code);
}
protected function initialize():void{
}
public function setParams(_arg1:Object):void{
if (((!((_arg1 == null))) && (!((_arg1.subpage == null))))){
trace(("[PageTemplate] setParams - params include a subpage: " + _arg1.subpage));
};
trace(("[PageTemplate] setParams - no setParams behaviour found on " + this));
}
public function adjustLayout():void{
}
public function setAssets(_arg1:AssetList):void{
var _local2:Array;
var _local3:int;
trace("[PageTemplate] setAssets");
assets = _arg1;
assets.addEventListener(AssetList.ASSET_READY, onSecondaryAssetLoaded);
if (BasicSite.usePartialCaching){
_local2 = assets.getLoadedSecondaries();
_local3 = 0;
while (_local3 < _local2.length) {
handleSecondaryAsset(_local2[_local3]);
_local3++;
};
};
}
public function animateOut():Number{
TweenLite.to(this, 0.3, {autoAlpha:0});
return (0.3);
}
public function setContent(_arg1:XML):void{
trace(("[PageTemplate] setContent - no setContent behaviour found on " + this));
}
public function transitionOut():Number{
TweenLite.to(this, 0.3, {autoAlpha:0});
return (0.3);
}
public function removeChildIfPresent(_arg1:DisplayObject, _arg2:DisplayObjectContainer=null):DisplayObject{
if (_arg2 == null){
_arg2 = this;
};
if (_arg2.contains(_arg1)){
trace("[PageTemplate] removeChildIfPresent - removed successfully");
return (_arg2.removeChild(_arg1));
};
trace("[PageTemplate] removeChildIfPresent - could not remove child, it was not present in the specified context");
return (null);
}
public function animateIn():void{
alpha = 0;
TweenLite.to(this, 0.3, {autoAlpha:1});
}
}
}//package com.relish.view
Section 90
//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 91
//TweenEvent (gs.events.TweenEvent)
package gs.events {
import flash.events.*;
public class TweenEvent extends Event {
public var info:Object;
public static const UPDATE:String = "update";
public static const START:String = "start";
public static const version:Number = 0.9;
public static const COMPLETE:String = "complete";
public function TweenEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.info = _arg2;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable));
}
}
}//package gs.events
Section 92
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 93
//BevelFilterPlugin (gs.plugins.BevelFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class BevelFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function BevelFilterPlugin(){
this.propName = "bevelFilter";
this.overwriteProps = ["bevelFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = BevelFilter;
initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2))));
return (true);
}
}
}//package gs.plugins
Section 94
//BezierPlugin (gs.plugins.BezierPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orient:Boolean;
protected var _orientData:Array;
protected var _beziers:Object;
protected var _target:Object;
protected static const _RAD2DEG:Number = 57.2957795130823;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function BezierPlugin(){
_future = {};
super();
this.propName = "bezier";
this.overwriteProps = [];
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:String;
var _local4:Object;
var _local5:Number;
var _local6:uint;
var _local7:Number;
var _local8:int;
var _local9:Object;
var _local10:Boolean;
var _local11:Number;
var _local12:Number;
var _local13:Array;
var _local14:Number;
if (_arg1 == 1){
for (_local3 in _beziers) {
_local2 = (_beziers[_local3].length - 1);
_target[_local3] = _beziers[_local3][_local2][2];
};
} else {
for (_local3 in _beziers) {
_local6 = _beziers[_local3].length;
if (_arg1 < 0){
_local2 = 0;
} else {
if (_arg1 >= 1){
_local2 = (_local6 - 1);
} else {
_local2 = int((_local6 * _arg1));
};
};
_local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6);
_local4 = _beziers[_local3][_local2];
if (this.round){
_local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
_local8 = ((_local7)<0) ? -1 : 1;
_target[_local3] = ((((_local7 % 1) * _local8))>0.5) ? (int(_local7) + _local8) : int(_local7);
} else {
_target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
};
};
};
if (_orient){
_local9 = _target;
_local10 = this.round;
_target = _future;
this.round = false;
_orient = false;
this.changeFactor = (_arg1 + 0.01);
_target = _local9;
this.round = _local10;
_orient = true;
_local2 = 0;
while (_local2 < _orientData.length) {
_local13 = _orientData[_local2];
_local14 = ((_local13[3]) || (0));
_local11 = (_future[_local13[0]] - _target[_local13[0]]);
_local12 = (_future[_local13[1]] - _target[_local13[1]]);
_target[_local13[2]] = ((Math.atan2(_local12, _local11) * _RAD2DEG) + _local14);
_local2++;
};
};
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local4:Object;
var _local5:int;
var _local6:String;
_target = _arg1.target;
if (_arg1.exposedVars.orientToBezier == true){
_orientData = [["x", "y", "rotation", 0]];
_orient = true;
} else {
if ((_arg1.exposedVars.orientToBezier is Array)){
_orientData = _arg1.exposedVars.orientToBezier;
_orient = true;
};
};
_local4 = {};
_local5 = 0;
while (_local5 < _arg2.length) {
for (_local6 in _arg2[_local5]) {
if (_local4[_local6] == undefined){
_local4[_local6] = [_arg1.target[_local6]];
};
if (typeof(_arg2[_local5][_local6]) == "number"){
_local4[_local6].push(_arg2[_local5][_local6]);
} else {
_local4[_local6].push((_arg1.target[_local6] + Number(_arg2[_local5][_local6])));
};
};
_local5++;
};
for (_local6 in _local4) {
this.overwriteProps[this.overwriteProps.length] = _local6;
if (_arg1.exposedVars[_local6] != undefined){
if (typeof(_arg1.exposedVars[_local6]) == "number"){
_local4[_local6].push(_arg1.exposedVars[_local6]);
} else {
_local4[_local6].push((_arg1.target[_local6] + Number(_arg1.exposedVars[_local6])));
};
delete _arg1.exposedVars[_local6];
_local5 = (_arg1.tweens.length - 1);
while (_local5 > -1) {
if (_arg1.tweens[_local5].name == _local6){
_arg1.tweens.splice(_local5, 1);
};
_local5--;
};
};
};
_beziers = parseBeziers(_local4, _arg3);
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
override public function killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:int;
var _local4:Array;
var _local5:Object;
var _local6:String;
var _local7:Object;
_local7 = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]];
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]];
_local3++;
};
} else {
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)];
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)];
_local3++;
};
_local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]];
} else {
if (_local4.length == 3){
_local5[_local5.length] = [_local4[0], _local4[1], _local4[2]];
} else {
if (_local4.length == 2){
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
};
};
};
return (_local7);
}
}
}//package gs.plugins
Section 95
//BezierThroughPlugin (gs.plugins.BezierThroughPlugin)
package gs.plugins {
import gs.*;
public class BezierThroughPlugin extends BezierPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function BezierThroughPlugin(){
this.propName = "bezierThrough";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), true);
return (true);
}
}
}//package gs.plugins
Section 96
//BlurFilterPlugin (gs.plugins.BlurFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class BlurFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function BlurFilterPlugin(){
this.propName = "blurFilter";
this.overwriteProps = ["blurFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = BlurFilter;
initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2))));
return (true);
}
}
}//package gs.plugins
Section 97
//ColorMatrixFilterPlugin (gs.plugins.ColorMatrixFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class ColorMatrixFilterPlugin extends FilterPlugin {
protected var _matrix:Array;
protected var _matrixTween:EndArrayPlugin;
public static const API:Number = 1;
public static const VERSION:Number = 1.01;
protected static var _lumG:Number = 0.71516;
protected static var _lumR:Number = 0.212671;
protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
protected static var _lumB:Number = 0.072169;
public function ColorMatrixFilterPlugin(){
this.propName = "colorMatrixFilter";
this.overwriteProps = ["colorMatrixFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:Object;
var _local5:Array;
_target = _arg1;
_type = ColorMatrixFilter;
_local4 = _arg2;
initFilter({}, new ColorMatrixFilter(_idMatrix.slice()));
_matrix = ColorMatrixFilter(_filter).matrix;
_local5 = [];
if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){
_local5 = _local4.matrix;
} else {
if (_local4.relative == true){
_local5 = _matrix.slice();
} else {
_local5 = _idMatrix.slice();
};
_local5 = setBrightness(_local5, _local4.brightness);
_local5 = setContrast(_local5, _local4.contrast);
_local5 = setHue(_local5, _local4.hue);
_local5 = setSaturation(_local5, _local4.saturation);
_local5 = setThreshold(_local5, _local4.threshold);
if (!isNaN(_local4.colorize)){
_local5 = colorize(_local5, _local4.colorize, _local4.amount);
};
};
_matrixTween = new EndArrayPlugin();
_matrixTween.init(_matrix, _local5);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = (1 - _arg2);
_local4 = (_local3 * _lumR);
_local5 = (_local3 * _lumG);
_local6 = (_local3 * _lumB);
_local7 = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
_local3 = Math.cos(_arg2);
_local4 = Math.sin(_arg2);
_local5 = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
_local3 = [];
_local4 = 0;
_local5 = 0;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
_local4 = (((_arg2 >> 16) & 0xFF) / 0xFF);
_local5 = (((_arg2 >> 8) & 0xFF) / 0xFF);
_local6 = ((_arg2 & 0xFF) / 0xFF);
_local7 = (1 - _arg3);
_local8 = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
_local3 = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
}
}//package gs.plugins
Section 98
//DropShadowFilterPlugin (gs.plugins.DropShadowFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class DropShadowFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function DropShadowFilterPlugin(){
this.propName = "dropShadowFilter";
this.overwriteProps = ["dropShadowFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = DropShadowFilter;
initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject));
return (true);
}
}
}//package gs.plugins
Section 99
//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 100
//FilterPlugin (gs.plugins.FilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
import gs.utils.tween.*;
public class FilterPlugin extends TweenPlugin {
protected var _index:int;
protected var _filter:BitmapFilter;
protected var _type:Class;
protected var _remove:Boolean;
protected var _target:Object;
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Array;
_local4 = _target.filters;
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
if (!(_local4[_index] is _type)){
_index = (_local4.length - 1);
_local2 = (_local4.length - 1);
while (_local2 > -1) {
if ((_local4[_local2] is _type)){
_index = _local2;
break;
};
_local2--;
};
};
_local4[_index] = _filter;
_target.filters = _local4;
}
public function onCompleteTween():void{
var _local1:int;
var _local2:Array;
if (_remove){
_local2 = _target.filters;
if (!(_local2[_index] is _type)){
_local1 = (_local2.length - 1);
while (_local1 > -1) {
if ((_local2[_local1] is _type)){
_local2.splice(_local1, 1);
break;
};
_local1--;
};
} else {
_local2.splice(_index, 1);
};
_target.filters = _local2;
};
}
protected function initFilter(_arg1:Object, _arg2:BitmapFilter):void{
var _local3:Array;
var _local4:String;
var _local5:int;
var _local6:HexColorsPlugin;
var _local7:Object;
_local3 = _target.filters;
_index = -1;
if (_arg1.index != null){
_index = _arg1.index;
} else {
_local5 = (_local3.length - 1);
while (_local5 > -1) {
if ((_local3[_local5] is _type)){
_index = _local5;
break;
};
_local5--;
};
};
if ((((((_index == -1)) || ((_local3[_index] == null)))) || ((_arg1.addFilter == true)))){
_index = ((_arg1.index)!=null) ? _arg1.index : _local3.length;
_local3[_index] = _arg2;
_target.filters = _local3;
};
_filter = _local3[_index];
_remove = Boolean((_arg1.remove == true));
if (_remove){
this.onComplete = onCompleteTween;
};
_local7 = ((_arg1.isTV)==true) ? _arg1.exposedVars : _arg1;
for (_local4 in _local7) {
if (((((((((!((_local4 in _filter))) || ((_filter[_local4] == _local7[_local4])))) || ((_local4 == "remove")))) || ((_local4 == "index")))) || ((_local4 == "addFilter")))){
} else {
if ((((((_local4 == "color")) || ((_local4 == "highlightColor")))) || ((_local4 == "shadowColor")))){
_local6 = new HexColorsPlugin();
_local6.initColor(_filter, _local4, _filter[_local4], _local7[_local4]);
_tweens[_tweens.length] = new TweenInfo(_local6, "changeFactor", 0, 1, _local4, false);
} else {
if ((((((((_local4 == "quality")) || ((_local4 == "inner")))) || ((_local4 == "knockout")))) || ((_local4 == "hideObject")))){
_filter[_local4] = _local7[_local4];
} else {
addTween(_filter, _local4, _filter[_local4], _local7[_local4], _local4);
};
};
};
};
}
}
}//package gs.plugins
Section 101
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class FramePlugin extends TweenPlugin {
public var frame:int;
protected var _target:MovieClip;
public static const VERSION:Number = 1;
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);
addTween(this, "frame", _target.currentFrame, _arg2, "frame");
return (true);
}
}
}//package gs.plugins
Section 102
//GlowFilterPlugin (gs.plugins.GlowFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class GlowFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function GlowFilterPlugin(){
this.propName = "glowFilter";
this.overwriteProps = ["glowFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = GlowFilter;
initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout));
return (true);
}
}
}//package gs.plugins
Section 103
//HexColorsPlugin (gs.plugins.HexColorsPlugin)
package gs.plugins {
import gs.*;
public class HexColorsPlugin extends TweenPlugin {
protected var _colors:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function HexColorsPlugin(){
this.propName = "hexColors";
this.overwriteProps = [];
_colors = [];
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:Array;
_local2 = (_colors.length - 1);
while (_local2 > -1) {
_local3 = _colors[_local2];
_local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7])));
_local2--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
for (_local4 in _arg2) {
initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4]));
};
return (true);
}
override public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (_colors.length - 1);
while (_local2 > -1) {
if (_arg1[_colors[_local2][1]] != undefined){
_colors.splice(_local2, 1);
};
_local2--;
};
super.killProps(_arg1);
}
public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_arg3 != _arg4){
_local5 = (_arg3 >> 16);
_local6 = ((_arg3 >> 8) & 0xFF);
_local7 = (_arg3 & 0xFF);
_colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)];
this.overwriteProps[this.overwriteProps.length] = _arg2;
};
}
}
}//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
//RoundPropsPlugin (gs.plugins.RoundPropsPlugin)
package gs.plugins {
public class RoundPropsPlugin extends TweenPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function RoundPropsPlugin(){
this.propName = "roundProps";
this.overwriteProps = [];
this.round = true;
}
public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package gs.plugins
Section 106
//ShortRotationPlugin (gs.plugins.ShortRotationPlugin)
package gs.plugins {
import gs.*;
public class ShortRotationPlugin extends TweenPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function ShortRotationPlugin(){
this.propName = "shortRotation";
this.overwriteProps = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
if (typeof(_arg2) == "number"){
trace("WARNING: You appear to be using the old shortRotation syntax. Instead of passing a number, please pass an object with properties that correspond to the rotations values For example, TweenMax.to(mc, 2, {shortRotation:{rotationX:-170, rotationY:25}})");
return (false);
};
for (_local4 in _arg2) {
initRotation(_arg1, _local4, _arg1[_local4], _arg2[_local4]);
};
return (true);
}
public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local5:Number;
_local5 = ((_arg4 - _arg3) % 360);
if (((_arg4 - _arg3) % 360) != (_local5 % 180)){
_local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360);
};
addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package gs.plugins
Section 107
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 108
//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 109
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 110
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 111
//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 112
//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 113
//OverwriteManager (gs.OverwriteManager)
package gs {
import flash.utils.*;
import gs.utils.tween.*;
import flash.errors.*;
public class OverwriteManager {
public static const ALL:int = 1;
public static const NONE:int = 0;
public static const AUTO:int = 2;
public static const CONCURRENT:int = 3;
public static const version:Number = 3.12;
public static var mode:int;
public static var enabled:Boolean;
public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array):void{
var _local4:int;
var _local5:String;
var _local6:TweenInfo;
_local4 = (_arg3.length - 1);
while (_local4 > -1) {
_local6 = _arg3[_local4];
if ((_local6.name in _arg1)){
_arg3.splice(_local4, 1);
} else {
if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){
_local6.target.killProps(_arg1);
if (_local6.target.overwriteProps.length == 0){
_arg3.splice(_local4, 1);
};
};
};
_local4--;
};
for (_local5 in _arg1) {
delete _arg2[_local5];
};
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Array):void{
var _local3:Object;
var _local4:int;
var _local5:Number;
var _local6:Array;
var _local7:int;
var _local8:TweenLite;
var _local9:int;
var _local10:Array;
var _local11:Object;
var _local12:int;
var _local13:TweenInfo;
var _local14:Array;
_local3 = _arg1.vars;
_local4 = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite);
if ((((_local4 < 2)) || ((_arg2 == null)))){
return;
};
_local5 = _arg1.startTime;
_local6 = [];
_local9 = -1;
_local7 = (_arg2.length - 1);
while (_local7 > -1) {
_local8 = _arg2[_local7];
if (_local8 == _arg1){
_local9 = _local7;
} else {
if ((((((_local7 < _local9)) && ((_local8.startTime <= _local5)))) && (((_local8.startTime + ((_local8.duration * 1000) / _local8.combinedTimeScale)) > _local5)))){
_local6[_local6.length] = _local8;
};
};
_local7--;
};
if ((((_local6.length == 0)) || ((_arg1.tweens.length == 0)))){
return;
};
if (_local4 == AUTO){
_local10 = _arg1.tweens;
_local11 = {};
_local7 = (_local10.length - 1);
while (_local7 > -1) {
_local13 = _local10[_local7];
if (_local13.isPlugin){
if (_local13.name == "_MULTIPLE_"){
_local14 = _local13.target.overwriteProps;
_local12 = (_local14.length - 1);
while (_local12 > -1) {
_local11[_local14[_local12]] = true;
_local12--;
};
} else {
_local11[_local13.name] = true;
};
_local11[_local13.target.propName] = true;
} else {
_local11[_local13.name] = true;
};
_local7--;
};
_local7 = (_local6.length - 1);
while (_local7 > -1) {
killVars(_local11, _local6[_local7].exposedVars, _local6[_local7].tweens);
_local7--;
};
} else {
_local7 = (_local6.length - 1);
while (_local7 > -1) {
_local6[_local7].enabled = false;
_local7--;
};
};
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 10.09){
trace("TweenLite warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com.");
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
}
}//package gs
Section 114
//TweenLite (gs.TweenLite)
package gs {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import gs.utils.tween.*;
import gs.plugins.*;
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 115
//TweenMax (gs.TweenMax)
package gs {
import flash.events.*;
import flash.utils.*;
import gs.utils.tween.*;
import gs.plugins.*;
import gs.events.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _dispatcher:EventDispatcher;
protected var _callbacks:Object;
public var pauseTime:Number;
protected var _repeatCount:Number;
protected var _timeScale:Number;
public static const version:Number = 10.1;
public static var removeTween:Function = TweenLite.removeTween;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init();
;
protected static var _pausedTweens:Dictionary = new Dictionary(false);
protected static var _globalTimeScale:Number = 1;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _activatedPlugins:Boolean = TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin, HexColorsPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, BevelFilterPlugin, DropShadowFilterPlugin, GlowFilterPlugin, RoundPropsPlugin, BezierPlugin, BezierThroughPlugin, ShortRotationPlugin]);
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
if (TweenLite.version < 10.09){
trace("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com.");
};
if (((!((this.combinedTimeScale == 1))) && ((this.target is TweenMax)))){
_timeScale = 1;
this.combinedTimeScale = _globalTimeScale;
} else {
_timeScale = this.combinedTimeScale;
this.combinedTimeScale = (this.combinedTimeScale * _globalTimeScale);
};
if (((!((this.combinedTimeScale == 1))) && (!((this.delay == 0))))){
this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale)));
};
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
initDispatcher();
if ((((_arg2 == 0)) && ((this.delay == 0)))){
onUpdateDispatcher();
onCompleteDispatcher();
};
};
_repeatCount = 0;
if (((!(isNaN(this.vars.yoyo))) || (!(isNaN(this.vars.loop))))){
this.vars.persist = true;
};
}
override public function set enabled(_arg1:Boolean):void{
if (!_arg1){
_pausedTweens[this] = null;
delete _pausedTweens[this];
};
super.enabled = _arg1;
if (_arg1){
this.combinedTimeScale = (_timeScale * _globalTimeScale);
};
}
public function set reversed(_arg1:Boolean):void{
if (this.reversed != _arg1){
reverse();
};
}
override public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
_local2 = (((_arg1 - this.startTime) * 0.001) * this.combinedTimeScale);
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);
};
}
protected function adjustStartValues():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:TweenInfo;
var _local6:int;
_local1 = this.progress;
if (_local1 != 0){
_local2 = this.ease(_local1, 0, 1, 1);
_local3 = (1 / (1 - _local2));
_local6 = (this.tweens.length - 1);
while (_local6 > -1) {
_local5 = this.tweens[_local6];
_local4 = (_local5.start + _local5.change);
if (_local5.isPlugin){
_local5.change = ((_local4 - _local2) * _local3);
} else {
_local5.change = ((_local4 - _local5.target[_local5.property]) * _local3);
};
_local5.start = (_local4 - _local5.change);
_local6--;
};
};
}
public function get timeScale():Number{
return (_timeScale);
}
public function restart(_arg1:Boolean=false):void{
if (_arg1){
this.initTime = currentTime;
this.startTime = (currentTime + (this.delay * (1000 / this.combinedTimeScale)));
} else {
this.startTime = currentTime;
this.initTime = (currentTime - (this.delay * (1000 / this.combinedTimeScale)));
};
_repeatCount = 0;
if (this.target != this.vars.onComplete){
render(this.startTime);
};
this.pauseTime = NaN;
_pausedTweens[this] = null;
delete _pausedTweens[this];
this.enabled = true;
}
public function get paused():Boolean{
return (!(isNaN(this.pauseTime)));
}
public function killProperties(_arg1:Array):void{
var _local2:Object;
var _local3:int;
_local2 = {};
_local3 = (_arg1.length - 1);
while (_local3 > -1) {
_local2[_arg1[_local3]] = true;
_local3--;
};
killVars(_local2);
}
public function resume():void{
this.enabled = true;
if (!isNaN(this.pauseTime)){
this.initTime = (this.initTime + (currentTime - this.pauseTime));
this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale)));
this.pauseTime = NaN;
if (((!(this.started)) && ((currentTime >= this.startTime)))){
activate();
} else {
this.active = this.started;
};
_pausedTweens[this] = null;
delete _pausedTweens[this];
};
}
override public function complete(_arg1:Boolean=false):void{
if (((((!(isNaN(this.vars.yoyo))) && ((((_repeatCount < this.vars.yoyo)) || ((this.vars.yoyo == 0)))))) || (((!(isNaN(this.vars.loop))) && ((((_repeatCount < this.vars.loop)) || ((this.vars.loop == 0)))))))){
_repeatCount++;
if (!isNaN(this.vars.yoyo)){
this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease;
};
this.startTime = (_arg1) ? (this.startTime + (this.duration * (1000 / this.combinedTimeScale))) : currentTime;
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
} else {
if (this.vars.persist == true){
pause();
};
};
super.complete(_arg1);
}
public function invalidate(_arg1:Boolean=true):void{
var _local2:Number;
if (this.initted){
_local2 = this.progress;
if (((!(_arg1)) && (!((_local2 == 0))))){
this.progress = 0;
};
this.tweens = [];
_hasPlugins = false;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars;
initTweenVals();
_timeScale = ((this.vars.timeScale) || (1));
this.combinedTimeScale = (_timeScale * _globalTimeScale);
this.delay = ((this.vars.delay) || (0));
if (isNaN(this.pauseTime)){
this.startTime = (this.initTime + ((this.delay * 1000) / this.combinedTimeScale));
};
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
if (_dispatcher != null){
this.vars.onStart = _callbacks.onStart;
this.vars.onUpdate = _callbacks.onUpdate;
this.vars.onComplete = _callbacks.onComplete;
_dispatcher = null;
};
initDispatcher();
};
if (_local2 != 0){
if (_arg1){
adjustStartValues();
} else {
this.progress = _local2;
};
};
};
}
public function get progress():Number{
var _local1:Number;
var _local2:Number;
_local1 = (isNaN(this.pauseTime)) ? currentTime : this.pauseTime;
_local2 = (((((_local1 - this.initTime) * 0.001) - (this.delay / this.combinedTimeScale)) / this.duration) * this.combinedTimeScale);
if (_local2 > 1){
return (1);
};
if (_local2 < 0){
return (0);
};
return (_local2);
}
public function willTrigger(_arg1:String):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.willTrigger(_arg1));
}
public function dispatchEvent(_arg1:Event):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.dispatchEvent(_arg1));
}
public function get reversed():Boolean{
return ((this.ease == reverseEase));
}
protected function onStartDispatcher(... _args):void{
if (_callbacks.onStart != null){
_callbacks.onStart.apply(null, this.vars.onStartParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
}
public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{
var _local4:Number;
var _local5:int;
var _local6:Object;
var _local7:Array;
var _local8:Boolean;
var _local9:Array;
var _local10:Object;
var _local11:int;
var _local12:Array;
_local4 = this.progress;
if (this.initted){
if (((!(_arg3)) && (!((_local4 == 0))))){
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
if (this.tweens[_local5].name == _arg1){
this.tweens[_local5].target[this.tweens[_local5].property] = this.tweens[_local5].start;
};
_local5--;
};
};
_local6 = this.vars;
_local7 = this.tweens;
_local8 = _hasPlugins;
this.tweens = [];
this.vars = (this.exposedVars = {});
this.vars[_arg1] = _arg2;
initTweenVals();
if (((!((this.ease == reverseEase))) && ((_local6.ease is Function)))){
this.ease = _local6.ease;
};
if (((_arg3) && (!((_local4 == 0))))){
adjustStartValues();
};
_local9 = this.tweens;
this.vars = _local6;
this.tweens = _local7;
_local10 = {};
_local5 = (_local9.length - 1);
while (_local5 > -1) {
if (_local9[_local5].name == "_MULTIPLE_"){
_local12 = _local9[_local5].target.overwriteProps;
_local11 = (_local12.length - 1);
while (_local11 > -1) {
_local10[_local12[_local11]] = true;
_local11--;
};
} else {
_local10[_local9[_local5].name] = true;
};
_local5--;
};
killVars(_local10);
this.tweens = this.tweens.concat(_local9);
_hasPlugins = Boolean(((_local8) || (_hasPlugins)));
};
this.vars[_arg1] = _arg2;
}
public function set timeScale(_arg1:Number):void{
if (_arg1 < 1E-5){
_arg1 = (_timeScale = 1E-5);
} else {
_timeScale = _arg1;
_arg1 = (_arg1 * _globalTimeScale);
};
this.initTime = ((currentTime - ((((currentTime - this.initTime) - (this.delay * (1000 / this.combinedTimeScale))) * this.combinedTimeScale) * (1 / _arg1))) - (this.delay * (1000 / _arg1)));
if (this.startTime != 999999999999999){
this.startTime = (this.initTime + (this.delay * (1000 / _arg1)));
};
this.combinedTimeScale = _arg1;
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher != null){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
override public function initTweenVals():void{
var _local1:int;
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Object;
var _local7:TweenInfo;
if (this.exposedVars.startAt != null){
this.exposedVars.startAt.overwrite = 0;
new TweenMax(this.target, 0, this.exposedVars.startAt);
};
super.initTweenVals();
if ((((this.exposedVars.roundProps is Array)) && (!((TweenLite.plugins.roundProps == null))))){
_local5 = this.exposedVars.roundProps;
_local1 = (_local5.length - 1);
while (_local1 > -1) {
_local3 = _local5[_local1];
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local7 = this.tweens[_local2];
if (_local7.name == _local3){
if (_local7.isPlugin){
_local7.target.round = true;
} else {
if (_local6 == null){
_local6 = new TweenLite.plugins.roundProps();
_local6.add(_local7.target, _local3, _local7.start, _local7.change);
_hasPlugins = true;
this.tweens[_local2] = new TweenInfo(_local6, "changeFactor", 0, 1, _local3, true);
} else {
_local6.add(_local7.target, _local3, _local7.start, _local7.change);
this.tweens.splice(_local2, 1);
};
};
} else {
if (((((_local7.isPlugin) && ((_local7.name == "_MULTIPLE_")))) && (!(_local7.target.round)))){
_local4 = ((" " + _local7.target.overwriteProps.join(" ")) + " ");
if (_local4.indexOf(((" " + _local3) + " ")) != -1){
_local7.target.round = true;
};
};
};
_local2--;
};
_local1--;
};
};
}
protected function initDispatcher():void{
var _local1:Object;
var _local2:String;
if (_dispatcher == null){
_dispatcher = new EventDispatcher(this);
_callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete};
if (this.vars.isTV == true){
this.vars = this.vars.clone();
} else {
_local1 = {};
for (_local2 in this.vars) {
_local1[_local2] = this.vars[_local2];
};
this.vars = _local1;
};
this.vars.onStart = onStartDispatcher;
this.vars.onComplete = onCompleteDispatcher;
if ((this.vars.onStartListener is Function)){
_dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true);
};
if ((this.vars.onUpdateListener is Function)){
_dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true);
this.vars.onUpdate = onUpdateDispatcher;
_hasUpdate = true;
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
};
}
protected function onUpdateDispatcher(... _args):void{
if (_callbacks.onUpdate != null){
_callbacks.onUpdate.apply(null, this.vars.onUpdateParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
}
public function set progress(_arg1:Number):void{
this.startTime = (currentTime - ((this.duration * _arg1) * 1000));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
if (!this.started){
activate();
};
render(currentTime);
if (!isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.active = false;
};
}
public function reverse(_arg1:Boolean=true, _arg2:Boolean=true):void{
var _local3:Number;
this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease;
_local3 = this.progress;
if (((_arg1) && ((_local3 > 0)))){
this.startTime = (currentTime - ((((1 - _local3) * this.duration) * 1000) / this.combinedTimeScale));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
};
if (_arg2 != false){
if (_local3 < 1){
resume();
} else {
restart();
};
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_dispatcher == null){
initDispatcher();
};
if ((((_arg1 == TweenEvent.UPDATE)) && (!((this.vars.onUpdate == onUpdateDispatcher))))){
this.vars.onUpdate = onUpdateDispatcher;
_hasUpdate = true;
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function set paused(_arg1:Boolean):void{
if (_arg1){
pause();
} else {
resume();
};
}
public function hasEventListener(_arg1:String):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.hasEventListener(_arg1));
}
public function pause():void{
if (isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.enabled = false;
_pausedTweens[this] = this;
};
}
public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.ease((_arg4 - _arg1), _arg2, _arg3, _arg4));
}
protected function onCompleteDispatcher(... _args):void{
if (_callbacks.onComplete != null){
_callbacks.onComplete.apply(null, this.vars.onCompleteParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
}
public static function set globalTimeScale(_arg1:Number):void{
setGlobalTimeScale(_arg1);
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(true, _arg1, _arg2);
}
public static function killAllDelayedCalls(_arg1:Boolean=false):void{
killAll(_arg1, false, true);
}
public static function setGlobalTimeScale(_arg1:Number):void{
var _local2:Dictionary;
var _local3:int;
var _local4:Array;
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
_local2 = masterList;
_globalTimeScale = _arg1;
for each (_local4 in _local2) {
_local3 = (_local4.length - 1);
while (_local3 > -1) {
if ((_local4[_local3] is TweenMax)){
_local4[_local3].timeScale = (_local4[_local3].timeScale * 1);
};
_local3--;
};
};
}
public static function get globalTimeScale():Number{
return (_globalTimeScale);
}
public static function getTweensOf(_arg1:Object):Array{
var _local2:Array;
var _local3:Array;
var _local4:TweenLite;
var _local5:int;
_local2 = masterList[_arg1];
_local3 = [];
if (_local2 != null){
_local5 = (_local2.length - 1);
while (_local5 > -1) {
if (!_local2[_local5].gc){
_local3[_local3.length] = _local2[_local5];
};
_local5--;
};
};
for each (_local4 in _pausedTweens) {
if (_local4.target == _arg1){
_local3[_local3.length] = _local4;
};
};
return (_local3);
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{
return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, persist:_arg4, overwrite:0}));
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:Array;
var _local3:int;
_local2 = getTweensOf(_arg1);
_local3 = (_local2.length - 1);
while (_local3 > -1) {
if (((((_local2[_local3].active) || ((_local2[_local3].startTime == currentTime)))) && (!(_local2[_local3].gc)))){
return (true);
};
_local3--;
};
return (false);
}
public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local4:Array;
var _local5:Boolean;
var _local6:int;
_local4 = getAllTweens();
_local6 = (_local4.length - 1);
while (_local6 > -1) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local4[_local6] is TweenMax)) && ((((_local5 == _arg3)) || (!((_local5 == _arg2))))))){
_local4[_local6].paused = _arg1;
};
_local6--;
};
}
public static function killAllTweens(_arg1:Boolean=false):void{
killAll(_arg1, true, false);
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local4:Array;
var _local5:Boolean;
var _local6:int;
_local4 = getAllTweens();
_local6 = (_local4.length - 1);
while (_local6 > -1) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
if (_arg1){
_local4[_local6].complete(false);
_local4[_local6].clear();
} else {
TweenLite.removeTween(_local4[_local6], true);
};
};
_local6--;
};
}
public static function getAllTweens():Array{
var _local1:Dictionary;
var _local2:Array;
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
_local1 = masterList;
_local2 = [];
for each (_local3 in _local1) {
_local4 = (_local3.length - 1);
while (_local4 > -1) {
if (!_local3[_local4].gc){
_local2[_local2.length] = _local3[_local4];
};
_local4--;
};
};
for each (_local5 in _pausedTweens) {
_local2[_local2.length] = _local5;
};
return (_local2);
}
public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(false, _arg1, _arg2);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 116
//3_151 (reemus3_fla.3_151)
package reemus3_fla {
import flash.display.*;
public dynamic class 3_151 extends MovieClip {
public function 3_151(){
addFrameScript(0, frame1, 14, frame15, 24, frame25, 34, frame35, 43, frame44, 54, frame55, 94, frame95, 125, frame126);
}
function frame95(){
gotoAndPlay("talk");
}
function frame15(){
stop();
}
function frame1(){
stop();
}
function frame25(){
stop();
}
function frame35(){
stop();
}
function frame126(){
gotoAndPlay("talk");
}
function frame44(){
stop();
}
function frame55(){
stop();
}
}
}//package reemus3_fla
Section 117
//Action_4 (reemus3_fla.Action_4)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.errors.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Action_4 extends MovieClip {
public function Action_4(){
addFrameScript(0, frame1);
}
public function onComplete(_arg1:Event):void{
MovieClip(parent).gotoAndPlay("loaded");
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:int;
_local2 = Math.round(((_arg1.target.bytesLoaded / _arg1.target.bytesTotal) * 100));
MovieClip(parent).gotoAndStop(_local2);
}
function frame1(){
MovieClip(root).stop();
if (root.loaderInfo.bytesLoaded == root.loaderInfo.bytesTotal){
MovieClip(parent).gotoAndPlay("loaded");
};
root.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
root.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
}
}
}//package reemus3_fla
Section 118
//alien_364 (reemus3_fla.alien_364)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class alien_364 extends MovieClip {
public var bird:MovieClip;
public var spriteIn:MovieClip;
public function alien_364(){
addFrameScript(10, frame11);
}
function frame11(){
AudioManager.playSoundFromLibrary("HissSound");
}
}
}//package reemus3_fla
Section 119
//alieneye_413 (reemus3_fla.alieneye_413)
package reemus3_fla {
import flash.display.*;
public dynamic class alieneye_413 extends MovieClip {
public function alieneye_413(){
addFrameScript(125, frame126, 162, frame163);
}
function frame163(){
stop();
}
function frame126(){
gotoAndPlay(1);
}
}
}//package reemus3_fla
Section 120
//alienresubmerge_401 (reemus3_fla.alienresubmerge_401)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class alienresubmerge_401 extends MovieClip {
public function alienresubmerge_401(){
addFrameScript(15, frame16);
}
function frame16(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 121
//attackfrogmiss_429 (reemus3_fla.attackfrogmiss_429)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class attackfrogmiss_429 extends MovieClip {
public function attackfrogmiss_429(){
addFrameScript(18, frame19, 23, frame24, 52, frame53);
}
function frame19(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame24(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame53(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 122
//barkingmonster_264 (reemus3_fla.barkingmonster_264)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class barkingmonster_264 extends MovieClip {
public function barkingmonster_264(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
AudioManager.playSoundFromLibrary("SnarlSound");
}
function frame17(){
stop();
}
}
}//package reemus3_fla
Section 123
//beesflying_59 (reemus3_fla.beesflying_59)
package reemus3_fla {
import flash.display.*;
import asfiles.setting.features.*;
public dynamic class beesflying_59 extends MovieClip {
public var dud2:Bee;
public var dud1:Bee;
public var bee1:Bee;
public var bee3:Bee;
public var bee4:Bee;
public var bee2:Bee;
}
}//package reemus3_fla
Section 124
//beesmokeshrinkdown_55 (reemus3_fla.beesmokeshrinkdown_55)
package reemus3_fla {
import flash.display.*;
public dynamic class beesmokeshrinkdown_55 extends MovieClip {
public function beesmokeshrinkdown_55(){
addFrameScript(9, frame10);
}
function frame10(){
if (currentFrame == 10){
MovieClip(parent).gotoAndStop(1);
};
}
}
}//package reemus3_fla
Section 125
//beesprotect_62 (reemus3_fla.beesprotect_62)
package reemus3_fla {
import flash.display.*;
import asfiles.setting.features.*;
public dynamic class beesprotect_62 extends MovieClip {
public var dud2:Bee;
public var dud1:Bee;
public var bee1:Bee;
public var bee3:Bee;
public var bee4:Bee;
public var bee2:Bee;
public function beesprotect_62(){
addFrameScript(1, frame2, 13, frame14, 50, frame51);
}
function frame14(){
stop();
}
function frame2(){
}
function frame51(){
if (currentFrame == 51){
MovieClip(parent).gotoAndStop(1);
};
}
}
}//package reemus3_fla
Section 126
//beesrildup_58 (reemus3_fla.beesrildup_58)
package reemus3_fla {
import flash.display.*;
public dynamic class beesrildup_58 extends MovieClip {
public var spriteIn:MovieClip;
}
}//package reemus3_fla
Section 127
//BELL_310 (reemus3_fla.BELL_310)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class BELL_310 extends MovieClip {
public function BELL_310(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
AudioManager.playSoundFromLibrary("RingBellSound");
}
}
}//package reemus3_fla
Section 128
//bendingdownliam_99 (reemus3_fla.bendingdownliam_99)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class bendingdownliam_99 extends MovieClip {
public var mouth:MovieClip;
public function bendingdownliam_99(){
addFrameScript(33, frame34);
}
function frame34(){
AudioManager.playSoundFromLibrary("PopSound");
}
}
}//package reemus3_fla
Section 129
//bendytree_219 (reemus3_fla.bendytree_219)
package reemus3_fla {
import flash.display.*;
public dynamic class bendytree_219 extends MovieClip {
public var inner:MovieClip;
}
}//package reemus3_fla
Section 130
//bigcave_242 (reemus3_fla.bigcave_242)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class bigcave_242 extends MovieClip {
public function bigcave_242(){
addFrameScript(4, frame5, 39, frame40);
}
function frame5(){
AudioManager.playSoundFromLibrary("TombOpenSound");
}
function frame40(){
stop();
}
}
}//package reemus3_fla
Section 131
//birdexplode_378 (reemus3_fla.birdexplode_378)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class birdexplode_378 extends MovieClip {
public function birdexplode_378(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
AudioManager.playSoundFromLibrary("SplatSound");
}
function frame20(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 132
//blocktreeholereemus_177 (reemus3_fla.blocktreeholereemus_177)
package reemus3_fla {
import flash.display.*;
public dynamic class blocktreeholereemus_177 extends MovieClip {
public var reemusmouth:MovieClip;
public function blocktreeholereemus_177(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 133
//blocktreeholewithrock_196 (reemus3_fla.blocktreeholewithrock_196)
package reemus3_fla {
import flash.display.*;
public dynamic class blocktreeholewithrock_196 extends MovieClip {
public var reemusmouth:MovieClip;
public function blocktreeholewithrock_196(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 134
//bluefill_85 (reemus3_fla.bluefill_85)
package reemus3_fla {
import flash.display.*;
public dynamic class bluefill_85 extends MovieClip {
public function bluefill_85(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 135
//bluefungusblowout_52 (reemus3_fla.bluefungusblowout_52)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class bluefungusblowout_52 extends MovieClip {
public function bluefungusblowout_52(){
addFrameScript(1, frame2, 11, frame12);
}
function frame12(){
stop();
}
function frame2(){
AudioManager.playSoundFromLibrary("WhooshSound");
}
}
}//package reemus3_fla
Section 136
//bluefunguspopup_54 (reemus3_fla.bluefunguspopup_54)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class bluefunguspopup_54 extends MovieClip {
public function bluefunguspopup_54(){
addFrameScript(1, frame2, 15, frame16);
}
function frame16(){
if (currentFrame == 16){
MovieClip(parent).gotoAndStop(1);
};
}
function frame2(){
AudioManager.playSoundFromLibrary("Spring3Sound");
}
}
}//package reemus3_fla
Section 137
//blueliquid_91 (reemus3_fla.blueliquid_91)
package reemus3_fla {
import flash.display.*;
public dynamic class blueliquid_91 extends MovieClip {
public function blueliquid_91(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package reemus3_fla
Section 138
//bluetreeclimb_371 (reemus3_fla.bluetreeclimb_371)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class bluetreeclimb_371 extends MovieClip {
public function bluetreeclimb_371(){
addFrameScript(69, frame70, 82, frame83);
}
function frame70(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame83(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 139
//boatguard_210 (reemus3_fla.boatguard_210)
package reemus3_fla {
import flash.display.*;
public dynamic class boatguard_210 extends MovieClip {
public function boatguard_210(){
addFrameScript(0, frame1, 88, frame89, 103, frame104, 124, frame125);
}
function frame89(){
gotoAndPlay("laugh");
}
function frame1(){
stop();
}
function frame104(){
gotoAndPlay("laugh");
}
function frame125(){
gotoAndPlay("laugh");
}
}
}//package reemus3_fla
Section 140
//branchsplinters_30 (reemus3_fla.branchsplinters_30)
package reemus3_fla {
import flash.display.*;
public dynamic class branchsplinters_30 extends MovieClip {
public function branchsplinters_30(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package reemus3_fla
Section 141
//breakjuststick_193 (reemus3_fla.breakjuststick_193)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class breakjuststick_193 extends MovieClip {
public var reemustalk:MovieClip;
public var reemusmouth:MovieClip;
public function breakjuststick_193(){
addFrameScript(2, frame3, 5, frame6, 30, frame31);
}
function frame3(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame6(){
AudioManager.playSoundFromLibrary("WoodFallSound");
}
function frame31(){
stop();
}
}
}//package reemus3_fla
Section 142
//bubble_539 (reemus3_fla.bubble_539)
package reemus3_fla {
import flash.display.*;
public dynamic class bubble_539 extends MovieClip {
public var altTip:MovieClip;
public var tip:MovieClip;
}
}//package reemus3_fla
Section 143
//bustaxe_185 (reemus3_fla.bustaxe_185)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class bustaxe_185 extends MovieClip {
public var reemustalk:MovieClip;
public var reemusmouth:MovieClip;
public function bustaxe_185(){
addFrameScript(2, frame3, 5, frame6);
}
function frame3(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame6(){
AudioManager.playSoundFromLibrary("WoodFallSound");
}
}
}//package reemus3_fla
Section 144
//cabinet_267 (reemus3_fla.cabinet_267)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class cabinet_267 extends MovieClip {
public function cabinet_267(){
addFrameScript(1, frame2);
}
function frame2(){
AudioManager.playSoundFromLibrary("DoorOpenSound");
}
}
}//package reemus3_fla
Section 145
//carriagehovers_40 (reemus3_fla.carriagehovers_40)
package reemus3_fla {
import flash.display.*;
public dynamic class carriagehovers_40 extends MovieClip {
public var seat:MovieClip;
public var bee1:MovieClip;
public var bee3:MovieClip;
public var bee4:MovieClip;
public var bee2:MovieClip;
}
}//package reemus3_fla
Section 146
//castrod_410 (reemus3_fla.castrod_410)
package reemus3_fla {
import flash.display.*;
public dynamic class castrod_410 extends MovieClip {
public var monstermouth3:MovieClip;
}
}//package reemus3_fla
Section 147
//CaveDoor_251 (reemus3_fla.CaveDoor_251)
package reemus3_fla {
import flash.display.*;
public dynamic class CaveDoor_251 extends MovieClip {
public var foreground:MovieClip;
}
}//package reemus3_fla
Section 148
//CAVEPANBG_257 (reemus3_fla.CAVEPANBG_257)
package reemus3_fla {
import flash.display.*;
public dynamic class CAVEPANBG_257 extends MovieClip {
public var pond:MovieClip;
}
}//package reemus3_fla
Section 149
//circle_247 (reemus3_fla.circle_247)
package reemus3_fla {
import flash.display.*;
public dynamic class circle_247 extends MovieClip {
public function circle_247(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 150
//CliffLeft_280 (reemus3_fla.CliffLeft_280)
package reemus3_fla {
import flash.display.*;
public dynamic class CliffLeft_280 extends MovieClip {
public var leftExit:MovieClip;
}
}//package reemus3_fla
Section 151
//climblog_369 (reemus3_fla.climblog_369)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class climblog_369 extends MovieClip {
public function climblog_369(){
addFrameScript(84, frame85);
}
function frame85(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 152
//climbtreespider_374 (reemus3_fla.climbtreespider_374)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class climbtreespider_374 extends MovieClip {
public var bird:MovieClip;
public function climbtreespider_374(){
addFrameScript(139, frame140, 171, frame172);
}
function frame172(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
function frame140(){
AudioManager.playSoundFromLibrary("GulpSound");
}
}
}//package reemus3_fla
Section 153
//colouredpipes2_339 (reemus3_fla.colouredpipes2_339)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class colouredpipes2_339 extends MovieClip {
public function colouredpipes2_339(){
addFrameScript(0, frame1, 1, frame2, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame2(){
AudioManager.playSoundFromLibrary("BubblingSound");
}
}
}//package reemus3_fla
Section 154
//colourpipes1_338 (reemus3_fla.colourpipes1_338)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class colourpipes1_338 extends MovieClip {
public function colourpipes1_338(){
addFrameScript(0, frame1, 1, frame2, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame2(){
AudioManager.playSoundFromLibrary("BubblingSound");
}
}
}//package reemus3_fla
Section 155
//drain_354 (reemus3_fla.drain_354)
package reemus3_fla {
import flash.display.*;
public dynamic class drain_354 extends MovieClip {
public var inner:MovieClip;
}
}//package reemus3_fla
Section 156
//drainblue_358 (reemus3_fla.drainblue_358)
package reemus3_fla {
import flash.display.*;
public dynamic class drainblue_358 extends MovieClip {
public function drainblue_358(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package reemus3_fla
Section 157
//draingreen_360 (reemus3_fla.draingreen_360)
package reemus3_fla {
import flash.display.*;
public dynamic class draingreen_360 extends MovieClip {
public function draingreen_360(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package reemus3_fla
Section 158
//drainorange_356 (reemus3_fla.drainorange_356)
package reemus3_fla {
import flash.display.*;
public dynamic class drainorange_356 extends MovieClip {
public function drainorange_356(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package reemus3_fla
Section 159
//drainpurple_359 (reemus3_fla.drainpurple_359)
package reemus3_fla {
import flash.display.*;
public dynamic class drainpurple_359 extends MovieClip {
public function drainpurple_359(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package reemus3_fla
Section 160
//drainred_357 (reemus3_fla.drainred_357)
package reemus3_fla {
import flash.display.*;
public dynamic class drainred_357 extends MovieClip {
public function drainred_357(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package reemus3_fla
Section 161
//drainyellow_355 (reemus3_fla.drainyellow_355)
package reemus3_fla {
import flash.display.*;
public dynamic class drainyellow_355 extends MovieClip {
public function drainyellow_355(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package reemus3_fla
Section 162
//dropaxe_186 (reemus3_fla.dropaxe_186)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class dropaxe_186 extends MovieClip {
public var reemusmouth:MovieClip;
public function dropaxe_186(){
addFrameScript(10, frame11, 134, frame135);
}
function frame11(){
AudioManager.playSoundFromLibrary("WoodFallSound");
}
function frame135(){
stop();
}
}
}//package reemus3_fla
Section 163
//droppedrock_229 (reemus3_fla.droppedrock_229)
package reemus3_fla {
import flash.display.*;
public dynamic class droppedrock_229 extends MovieClip {
public function droppedrock_229(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package reemus3_fla
Section 164
//emergealienspider_373 (reemus3_fla.emergealienspider_373)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emergealienspider_373 extends MovieClip {
public function emergealienspider_373(){
addFrameScript(27, frame28);
}
function frame28(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 165
//endliam_521 (reemus3_fla.endliam_521)
package reemus3_fla {
import flash.display.*;
public dynamic class endliam_521 extends MovieClip {
public var mouth:MovieClip;
public function endliam_521(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
}
}
}//package reemus3_fla
Section 166
//endreemus_520 (reemus3_fla.endreemus_520)
package reemus3_fla {
import flash.display.*;
public dynamic class endreemus_520 extends MovieClip {
public var spriteIn:MovieClip;
public function endreemus_520(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
}
}
}//package reemus3_fla
Section 167
//enterhole_388 (reemus3_fla.enterhole_388)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class enterhole_388 extends MovieClip {
public function enterhole_388(){
addFrameScript(31, frame32);
}
function frame32(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 168
//feedfuzzy_265 (reemus3_fla.feedfuzzy_265)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class feedfuzzy_265 extends MovieClip {
public function feedfuzzy_265(){
addFrameScript(0, frame1, 41, frame42);
}
function frame1(){
AudioManager.playSoundFromLibrary("GrowlSound");
}
function frame42(){
if (currentFrame == 42){
MovieClip(parent).gotoAndStop("sleep");
};
}
}
}//package reemus3_fla
Section 169
//fillliquid_131 (reemus3_fla.fillliquid_131)
package reemus3_fla {
import flash.display.*;
import asfiles.setting.features.*;
import com.relish.managers.*;
public dynamic class fillliquid_131 extends MovieClip {
public var vase:Vase;
public var mouth:MovieClip;
public function fillliquid_131(){
addFrameScript(9, frame10);
}
function frame10(){
AudioManager.playSoundFromLibrary("PourSound2");
}
}
}//package reemus3_fla
Section 170
//firepit_420 (reemus3_fla.firepit_420)
package reemus3_fla {
import flash.display.*;
public dynamic class firepit_420 extends MovieClip {
public function firepit_420(){
addFrameScript(1, frame2);
}
function frame2(){
}
}
}//package reemus3_fla
Section 171
//fishdie_424 (reemus3_fla.fishdie_424)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class fishdie_424 extends MovieClip {
public function fishdie_424(){
addFrameScript(4, frame5, 25, frame26);
}
function frame26(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
function frame5(){
AudioManager.playSoundFromLibrary("BubblingSound");
}
}
}//package reemus3_fla
Section 172
//fishitmonster_417 (reemus3_fla.fishitmonster_417)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class fishitmonster_417 extends MovieClip {
public var monstermouth3:MovieClip;
public function fishitmonster_417(){
addFrameScript(0, frame1, 16, frame17, 22, frame23, 28, frame29, 41, frame42, 57, frame58);
}
function frame1(){
AudioManager.playSoundFromLibrary("Splash1Sound");
}
function frame17(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame29(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame23(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame42(){
AudioManager.playSoundFromLibrary("Splash1Sound");
}
function frame58(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 173
//fishitmonster2_418 (reemus3_fla.fishitmonster2_418)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class fishitmonster2_418 extends MovieClip {
public var monstermouth3:MovieClip;
public function fishitmonster2_418(){
addFrameScript(0, frame1, 16, frame17, 22, frame23, 28, frame29, 39, frame40, 62, frame63);
}
function frame1(){
AudioManager.playSoundFromLibrary("Splash1Sound");
}
function frame17(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame29(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame23(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame40(){
AudioManager.playSoundFromLibrary("Splash1Sound");
}
function frame63(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 174
//fishy_422 (reemus3_fla.fishy_422)
package reemus3_fla {
import flash.display.*;
public dynamic class fishy_422 extends MovieClip {
public function fishy_422(){
addFrameScript(95, frame96);
}
function frame96(){
if (MovieClip(parent).currentFrame == 2){
MovieClip(parent).gotoAndStop(3);
};
}
}
}//package reemus3_fla
Section 175
//flagfall_308 (reemus3_fla.flagfall_308)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class flagfall_308 extends MovieClip {
public function flagfall_308(){
addFrameScript(0, frame1, 2, frame3, 10, frame11);
}
function frame3(){
AudioManager.playSoundFromLibrary("FlutterSound");
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package reemus3_fla
Section 176
//flagstencil_305 (reemus3_fla.flagstencil_305)
package reemus3_fla {
import flash.display.*;
public dynamic class flagstencil_305 extends MovieClip {
public var flag:MovieClip;
public var overSplatter:MovieClip;
public var splatter:MovieClip;
public var circle:MovieClip;
}
}//package reemus3_fla
Section 177
//flyfruittree_405 (reemus3_fla.flyfruittree_405)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class flyfruittree_405 extends MovieClip {
public function flyfruittree_405(){
addFrameScript(18, frame19, 30, frame31, 39, frame40, 69, frame70);
}
function frame70(){
stop();
}
function frame19(){
AudioManager.playSoundFromLibrary("WhipSound");
}
function frame31(){
AudioManager.playSoundFromLibrary("SquirtSound");
}
function frame40(){
AudioManager.playSoundFromLibrary("FlySound");
}
}
}//package reemus3_fla
Section 178
//flyintomiddle_381 (reemus3_fla.flyintomiddle_381)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class flyintomiddle_381 extends MovieClip {
public function flyintomiddle_381(){
addFrameScript(0, frame1, 24, frame25);
}
function frame1(){
AudioManager.playSoundFromLibrary("FlappingSound");
}
function frame25(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 179
//flytobush_386 (reemus3_fla.flytobush_386)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class flytobush_386 extends MovieClip {
public function flytobush_386(){
addFrameScript(0, frame1, 29, frame30, 78, frame79, 176, frame177);
}
function frame79(){
AudioManager.playSoundFromLibrary("SplatSound");
}
function frame177(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
function frame1(){
AudioManager.playSoundFromLibrary("FlappingSound");
}
function frame30(){
AudioManager.playSoundFromLibrary("SnakeAttackSound");
}
}
}//package reemus3_fla
Section 180
//flytogopher_384 (reemus3_fla.flytogopher_384)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class flytogopher_384 extends MovieClip {
public function flytogopher_384(){
addFrameScript(0, frame1, 44, frame45, 125, frame126, 178, frame179);
}
function frame1(){
AudioManager.playSoundFromLibrary("FlappingSound");
}
function frame179(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
function frame126(){
AudioManager.playSoundFromLibrary("FlappingSound");
}
function frame45(){
AudioManager.playSoundFromLibrary("HissSound");
}
}
}//package reemus3_fla
Section 181
//frog2_428 (reemus3_fla.frog2_428)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class frog2_428 extends MovieClip {
public function frog2_428(){
addFrameScript(1, frame2, 30, frame31, 45, frame46, 46, frame47, 53, frame54, 70, frame71);
}
function frame71(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
function frame2(){
AudioManager.playSoundFromLibrary("CroakSound");
}
function frame31(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame46(){
AudioManager.playSoundFromLibrary("CroakSound");
}
function frame47(){
AudioManager.playSoundFromLibrary("WhipSound");
}
function frame54(){
AudioManager.playSoundFromLibrary("GulpSound");
}
}
}//package reemus3_fla
Section 182
//frogbeastjumpup_404 (reemus3_fla.frogbeastjumpup_404)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class frogbeastjumpup_404 extends MovieClip {
public function frogbeastjumpup_404(){
addFrameScript(1, frame2, 29, frame30, 35, frame36, 54, frame55, 60, frame61, 90, frame91, 116, frame117, 124, frame125, 127, frame128, 140, frame141, 142, frame143, 145, frame146, 153, frame154, 155, frame156, 158, frame159, 165, frame166);
}
function frame143(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame159(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame154(){
dispatchEvent(new Event("endOfClip"));
stop();
}
function frame166(){
dispatchEvent(new Event("endOfClip"));
stop();
}
function frame156(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame91(){
dispatchEvent(new Event("endOfClip"));
stop();
}
function frame2(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame30(){
dispatchEvent(new Event("endOfClip"));
stop();
}
function frame36(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame117(){
dispatchEvent(new Event("endOfClip"));
stop();
}
function frame125(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame128(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame55(){
dispatchEvent(new Event("endOfClip"));
stop();
}
function frame141(){
dispatchEvent(new Event("endOfClip"));
stop();
}
function frame146(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame61(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
}
}//package reemus3_fla
Section 183
//froggylookeyes_427 (reemus3_fla.froggylookeyes_427)
package reemus3_fla {
import flash.display.*;
public dynamic class froggylookeyes_427 extends MovieClip {
public function froggylookeyes_427(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package reemus3_fla
Section 184
//fruitfall_408 (reemus3_fla.fruitfall_408)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class fruitfall_408 extends MovieClip {
public function fruitfall_408(){
addFrameScript(11, frame12, 19, frame20, 26, frame27, 34, frame35, 42, frame43, 49, frame50);
}
function frame12(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame20(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame27(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame35(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame43(){
AudioManager.playSoundFromLibrary("Splash1Sound");
}
function frame50(){
stop();
}
}
}//package reemus3_fla
Section 185
//fuzzywuzzy_260 (reemus3_fla.fuzzywuzzy_260)
package reemus3_fla {
import flash.display.*;
public dynamic class fuzzywuzzy_260 extends MovieClip {
public var spriteIn:MovieClip;
}
}//package reemus3_fla
Section 186
//getwax_111 (reemus3_fla.getwax_111)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class getwax_111 extends MovieClip {
public function getwax_111(){
addFrameScript(6, frame7, 7, frame8);
}
function frame7(){
stop();
}
function frame8(){
AudioManager.playSoundFromLibrary("SquirtSound");
}
}
}//package reemus3_fla
Section 187
//giantexplosion_528 (reemus3_fla.giantexplosion_528)
package reemus3_fla {
import flash.display.*;
public dynamic class giantexplosion_528 extends MovieClip {
public function giantexplosion_528(){
addFrameScript(37, frame38);
}
function frame38(){
stop();
}
}
}//package reemus3_fla
Section 188
//glueaxe_163 (reemus3_fla.glueaxe_163)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class glueaxe_163 extends MovieClip {
public var reemusmouth:MovieClip;
public function glueaxe_163(){
addFrameScript(12, frame13);
}
function frame13(){
AudioManager.playSoundFromLibrary("Squirt2Sound");
}
}
}//package reemus3_fla
Section 189
//gluestickbreak_194 (reemus3_fla.gluestickbreak_194)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class gluestickbreak_194 extends MovieClip {
public var reemustalk:MovieClip;
public var reemusmouth:MovieClip;
public function gluestickbreak_194(){
addFrameScript(2, frame3, 5, frame6);
}
function frame3(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame6(){
AudioManager.playSoundFromLibrary("WoodFallSound");
}
}
}//package reemus3_fla
Section 190
//gluestickhittree_195 (reemus3_fla.gluestickhittree_195)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class gluestickhittree_195 extends MovieClip {
public var reemustalk:MovieClip;
public var reemusmouth:MovieClip;
public function gluestickhittree_195(){
addFrameScript(2, frame3, 37, frame38);
}
function frame3(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame38(){
stop();
}
}
}//package reemus3_fla
Section 191
//grabflag_104 (reemus3_fla.grabflag_104)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class grabflag_104 extends MovieClip {
public function grabflag_104(){
addFrameScript(12, frame13);
}
function frame13(){
AudioManager.playSoundFromLibrary("RipSound");
}
}
}//package reemus3_fla
Section 192
//grabgelatin_127 (reemus3_fla.grabgelatin_127)
package reemus3_fla {
import flash.display.*;
public dynamic class grabgelatin_127 extends MovieClip {
public var mouth:MovieClip;
}
}//package reemus3_fla
Section 193
//grabnutliam_117 (reemus3_fla.grabnutliam_117)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class grabnutliam_117 extends MovieClip {
public function grabnutliam_117(){
addFrameScript(8, frame9);
}
function frame9(){
AudioManager.playSoundFromLibrary("PopSound");
}
}
}//package reemus3_fla
Section 194
//grabsquirrel_178 (reemus3_fla.grabsquirrel_178)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class grabsquirrel_178 extends MovieClip {
public var reemusmouth:MovieClip;
public function grabsquirrel_178(){
addFrameScript(14, frame15, 19, frame20);
}
function frame15(){
stop();
}
function frame20(){
AudioManager.playSoundFromLibrary("SquirrelDistressSound");
}
}
}//package reemus3_fla
Section 195
//grabvineliam_125 (reemus3_fla.grabvineliam_125)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class grabvineliam_125 extends MovieClip {
public function grabvineliam_125(){
addFrameScript(12, frame13);
}
function frame13(){
AudioManager.playSoundFromLibrary("FlutterSound");
}
}
}//package reemus3_fla
Section 196
//greenfill_87 (reemus3_fla.greenfill_87)
package reemus3_fla {
import flash.display.*;
public dynamic class greenfill_87 extends MovieClip {
public function greenfill_87(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 197
//greenliquid_93 (reemus3_fla.greenliquid_93)
package reemus3_fla {
import flash.display.*;
public dynamic class greenliquid_93 extends MovieClip {
public function greenliquid_93(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package reemus3_fla
Section 198
//HANDROLLOVER_175 (reemus3_fla.HANDROLLOVER_175)
package reemus3_fla {
import flash.display.*;
public dynamic class HANDROLLOVER_175 extends MovieClip {
public function HANDROLLOVER_175(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 199
//heshufflesoff_481 (reemus3_fla.heshufflesoff_481)
package reemus3_fla {
import flash.display.*;
public dynamic class heshufflesoff_481 extends MovieClip {
public function heshufflesoff_481(){
addFrameScript(73, frame74);
}
function frame74(){
stop();
}
}
}//package reemus3_fla
Section 200
//introbox_440 (reemus3_fla.introbox_440)
package reemus3_fla {
import flash.display.*;
public dynamic class introbox_440 extends MovieClip {
public function introbox_440(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 201
//jellocabinetdooropen_268 (reemus3_fla.jellocabinetdooropen_268)
package reemus3_fla {
import flash.display.*;
public dynamic class jellocabinetdooropen_268 extends MovieClip {
public function jellocabinetdooropen_268(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package reemus3_fla
Section 202
//jumpbug_249 (reemus3_fla.jumpbug_249)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class jumpbug_249 extends MovieClip {
public function jumpbug_249(){
addFrameScript(7, frame8, 16, frame17, 56, frame57);
}
function frame8(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame17(){
AudioManager.playSoundFromLibrary("SpitSound");
}
function frame57(){
if (currentFrame == 57){
MovieClip(parent).gotoAndStop(1);
};
}
}
}//package reemus3_fla
Section 203
//jumplandliam_136 (reemus3_fla.jumplandliam_136)
package reemus3_fla {
import flash.display.*;
public dynamic class jumplandliam_136 extends MovieClip {
public var mouth:MovieClip;
public function jumplandliam_136(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package reemus3_fla
Section 204
//jumponjello_120 (reemus3_fla.jumponjello_120)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class jumponjello_120 extends MovieClip {
public function jumponjello_120(){
addFrameScript(8, frame9, 26, frame27, 49, frame50, 52, frame53, 61, frame62, 65, frame66, 81, frame82, 85, frame86, 98, frame99, 102, frame103, 106, frame107, 113, frame114, 116, frame117, 127, frame128, 132, frame133, 143, frame144, 146, frame147, 155, frame156, 158, frame159, 169, frame170, 173, frame174);
}
function frame156(){
stop();
dispatchEvent(new Event("liamProgress"));
}
function frame144(){
stop();
dispatchEvent(new Event("liamProgress"));
}
function frame159(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame86(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame82(){
stop();
dispatchEvent(new Event("liamProgress"));
}
function frame170(){
dispatchEvent(new Event("liamProgress"));
}
function frame174(){
stop();
}
function frame107(){
AudioManager.playSoundFromLibrary("CrumblingSound");
}
function frame103(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame9(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame114(){
stop();
dispatchEvent(new Event("liamProgress"));
}
function frame27(){
AudioManager.playSoundFromLibrary("Spring2Sound");
}
function frame117(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame99(){
stop();
dispatchEvent(new Event("liamProgress"));
}
function frame128(){
stop();
dispatchEvent(new Event("liamProgress"));
}
function frame50(){
stop();
dispatchEvent(new Event("liamProgress"));
}
function frame53(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame133(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame62(){
stop();
dispatchEvent(new Event("liamProgress"));
}
function frame66(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame147(){
AudioManager.playSoundFromLibrary("SwingSound");
}
}
}//package reemus3_fla
Section 205
//liamattemptsrock_119 (reemus3_fla.liamattemptsrock_119)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liamattemptsrock_119 extends MovieClip {
public function liamattemptsrock_119(){
addFrameScript(19, frame20);
}
function frame20(){
AudioManager.playSoundFromLibrary("LightThudSound");
}
}
}//package reemus3_fla
Section 206
//liambeebody_73 (reemus3_fla.liambeebody_73)
package reemus3_fla {
import flash.display.*;
public dynamic class liambeebody_73 extends MovieClip {
public function liambeebody_73(){
addFrameScript(0, frame1, 4, frame5, 9, frame10, 14, frame15, 19, frame20);
}
function frame10(){
stop();
}
function frame15(){
stop();
}
function frame1(){
stop();
}
function frame5(){
stop();
}
function frame20(){
stop();
}
}
}//package reemus3_fla
Section 207
//liambeeintro_253 (reemus3_fla.liambeeintro_253)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class liambeeintro_253 extends MovieClip {
public function liambeeintro_253(){
addFrameScript(30, frame31, 35, frame36, 50, frame51);
}
function frame36(){
AudioManager.playSoundFromLibrary("ThudLandSound");
}
function frame31(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame51(){
dispatchEvent(new Event("carriageEvent"));
}
}
}//package reemus3_fla
Section 208
//liambounce_97 (reemus3_fla.liambounce_97)
package reemus3_fla {
import flash.display.*;
public dynamic class liambounce_97 extends MovieClip {
public var mouth:MovieClip;
}
}//package reemus3_fla
Section 209
//liambuttonpress2_129 (reemus3_fla.liambuttonpress2_129)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liambuttonpress2_129 extends MovieClip {
public function liambuttonpress2_129(){
addFrameScript(8, frame9, 33, frame34);
}
function frame9(){
AudioManager.playSoundFromLibrary("ClickSound");
}
function frame34(){
stop();
}
}
}//package reemus3_fla
Section 210
//liamfumblesquirrel_118 (reemus3_fla.liamfumblesquirrel_118)
package reemus3_fla {
import flash.display.*;
public dynamic class liamfumblesquirrel_118 extends MovieClip {
public function liamfumblesquirrel_118(){
addFrameScript(10, frame11, 40, frame41);
}
function frame11(){
stop();
}
function frame41(){
stop();
}
}
}//package reemus3_fla
Section 211
//liamgetkey_110 (reemus3_fla.liamgetkey_110)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liamgetkey_110 extends MovieClip {
public function liamgetkey_110(){
addFrameScript(5, frame6);
}
function frame6(){
AudioManager.playSoundFromLibrary("JingleSound");
}
}
}//package reemus3_fla
Section 212
//liamgetseal_115 (reemus3_fla.liamgetseal_115)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liamgetseal_115 extends MovieClip {
public function liamgetseal_115(){
addFrameScript(10, frame11);
}
function frame11(){
AudioManager.playSoundFromLibrary("SquishSound");
}
}
}//package reemus3_fla
Section 213
//liamgrabflag2_109 (reemus3_fla.liamgrabflag2_109)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liamgrabflag2_109 extends MovieClip {
public function liamgrabflag2_109(){
addFrameScript(9, frame10);
}
function frame10(){
AudioManager.playSoundFromLibrary("FlutterSound");
}
}
}//package reemus3_fla
Section 214
//liamgrabtreebark_112 (reemus3_fla.liamgrabtreebark_112)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liamgrabtreebark_112 extends MovieClip {
public function liamgrabtreebark_112(){
addFrameScript(7, frame8);
}
function frame8(){
AudioManager.playSoundFromLibrary("RipSound");
}
}
}//package reemus3_fla
Section 215
//liamgrabvase_133 (reemus3_fla.liamgrabvase_133)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liamgrabvase_133 extends MovieClip {
public var mouth:MovieClip;
public function liamgrabvase_133(){
addFrameScript(9, frame10);
}
function frame10(){
AudioManager.playSoundFromLibrary("Splash1Sound");
}
}
}//package reemus3_fla
Section 216
//liamhidingbehidncave_491 (reemus3_fla.liamhidingbehidncave_491)
package reemus3_fla {
import flash.display.*;
public dynamic class liamhidingbehidncave_491 extends MovieClip {
public var spriteIn:MovieClip;
public function liamhidingbehidncave_491(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package reemus3_fla
Section 217
//liamholding_96 (reemus3_fla.liamholding_96)
package reemus3_fla {
import flash.display.*;
public dynamic class liamholding_96 extends MovieClip {
public var mouth:MovieClip;
}
}//package reemus3_fla
Section 218
//liamholdstuffbounce_98 (reemus3_fla.liamholdstuffbounce_98)
package reemus3_fla {
import flash.display.*;
public dynamic class liamholdstuffbounce_98 extends MovieClip {
public var mouth:MovieClip;
}
}//package reemus3_fla
Section 219
//liamjumpin_122 (reemus3_fla.liamjumpin_122)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liamjumpin_122 extends MovieClip {
public function liamjumpin_122(){
addFrameScript(8, frame9, 27, frame28, 107, frame108);
}
function frame9(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame108(){
stop();
}
function frame28(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
}
}//package reemus3_fla
Section 220
//liammouth_38 (reemus3_fla.liammouth_38)
package reemus3_fla {
import flash.display.*;
public dynamic class liammouth_38 extends MovieClip {
public function liammouth_38(){
addFrameScript(0, frame1, 61, frame62);
}
function frame1(){
stop();
}
function frame62(){
gotoAndPlay("talk");
}
}
}//package reemus3_fla
Section 221
//liampaints_108 (reemus3_fla.liampaints_108)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liampaints_108 extends MovieClip {
public function liampaints_108(){
addFrameScript(0, frame1, 23, frame24, 47, frame48);
}
function frame1(){
AudioManager.playSoundFromLibrary("MuddyDropSound");
}
function frame24(){
AudioManager.playSoundFromLibrary("MuddyDropSound");
}
function frame48(){
AudioManager.playSoundFromLibrary("MuddyDropSound");
}
}
}//package reemus3_fla
Section 222
//liampickflower_105 (reemus3_fla.liampickflower_105)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liampickflower_105 extends MovieClip {
public function liampickflower_105(){
addFrameScript(16, frame17);
}
function frame17(){
AudioManager.playSoundFromLibrary("CartoonBoinkSound");
}
}
}//package reemus3_fla
Section 223
//liamputsnut_116 (reemus3_fla.liamputsnut_116)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class liamputsnut_116 extends MovieClip {
public function liamputsnut_116(){
addFrameScript(9, frame10);
}
function frame10(){
AudioManager.playSoundFromLibrary("SwingSound");
}
}
}//package reemus3_fla
Section 224
//liamsittinginshroom_36 (reemus3_fla.liamsittinginshroom_36)
package reemus3_fla {
import flash.display.*;
public dynamic class liamsittinginshroom_36 extends MovieClip {
public function liamsittinginshroom_36(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package reemus3_fla
Section 225
//liamtreepull_221 (reemus3_fla.liamtreepull_221)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class liamtreepull_221 extends MovieClip {
public function liamtreepull_221(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
MovieClip(parent).dispatchEvent(new Event("returnLiam"));
}
}
}//package reemus3_fla
Section 226
//liamuntiebug_41 (reemus3_fla.liamuntiebug_41)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class liamuntiebug_41 extends MovieClip {
public function liamuntiebug_41(){
addFrameScript(96, frame97);
}
function frame97(){
stop();
dispatchEvent(new Event("roachSendoff"));
}
}
}//package reemus3_fla
Section 227
//lifestone_245 (reemus3_fla.lifestone_245)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class lifestone_245 extends MovieClip {
public var peg1:MovieClip;
public var peg2:MovieClip;
public function lifestone_245(){
addFrameScript(1, frame2);
}
function frame2(){
AudioManager.playSoundFromLibrary("LightThudSound");
}
}
}//package reemus3_fla
Section 228
//loadED_5 (reemus3_fla.loadED_5)
package reemus3_fla {
import flash.display.*;
public dynamic class loadED_5 extends MovieClip {
public function loadED_5(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package reemus3_fla
Section 229
//lockedpopup_525 (reemus3_fla.lockedpopup_525)
package reemus3_fla {
import flash.display.*;
public dynamic class lockedpopup_525 extends MovieClip {
public function lockedpopup_525(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package reemus3_fla
Section 230
//mapunfold_502 (reemus3_fla.mapunfold_502)
package reemus3_fla {
import flash.display.*;
import asfiles.*;
import asfiles.setting.*;
public dynamic class mapunfold_502 extends MovieClip {
public var credits:Credits;
public function mapunfold_502(){
addFrameScript(1, frame2, 28, frame29);
}
function frame29(){
stop();
}
function frame2(){
Setting.playMusic("WrapMusic");
}
}
}//package reemus3_fla
Section 231
//monsterbattle_291 (reemus3_fla.monsterbattle_291)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class monsterbattle_291 extends MovieClip {
public function monsterbattle_291(){
addFrameScript(8, frame9, 23, frame24);
}
function frame24(){
if (root){
AudioManager.playSoundFromLibrary("SmackSound");
};
}
function frame9(){
if (root){
AudioManager.playSoundFromLibrary("SmackSound");
};
}
}
}//package reemus3_fla
Section 232
//monstermouth_415 (reemus3_fla.monstermouth_415)
package reemus3_fla {
import flash.display.*;
public dynamic class monstermouth_415 extends MovieClip {
public function monstermouth_415(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 233
//monstermouth2_414 (reemus3_fla.monstermouth2_414)
package reemus3_fla {
import flash.display.*;
public dynamic class monstermouth2_414 extends MovieClip {
public function monstermouth2_414(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 234
//monstermouth3_412 (reemus3_fla.monstermouth3_412)
package reemus3_fla {
import flash.display.*;
public dynamic class monstermouth3_412 extends MovieClip {
public function monstermouth3_412(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 235
//monstermouth4_411 (reemus3_fla.monstermouth4_411)
package reemus3_fla {
import flash.display.*;
public dynamic class monstermouth4_411 extends MovieClip {
public function monstermouth4_411(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 236
//mouthhand_495 (reemus3_fla.mouthhand_495)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class mouthhand_495 extends MovieClip {
public function mouthhand_495(){
addFrameScript(6, frame7);
}
function frame7(){
AudioManager.playSoundFromLibrary("SnarlSound");
}
}
}//package reemus3_fla
Section 237
//mushroom_44 (reemus3_fla.mushroom_44)
package reemus3_fla {
import flash.display.*;
public dynamic class mushroom_44 extends MovieClip {
public var cap:MovieClip;
}
}//package reemus3_fla
Section 238
//NewgroundsAPI_Ad_Unit_12 (reemus3_fla.NewgroundsAPI_Ad_Unit_12)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import com.newgrounds.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.errors.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class NewgroundsAPI_Ad_Unit_12 extends MovieClip {
public var background:MovieClip;
public function NewgroundsAPI_Ad_Unit_12(){
addFrameScript(0, frame1);
}
public function attachAd(_arg1:Object, _arg2:Object):void{
NewgroundsAPI.attachFlashAd(this);
}
function frame1(){
NewgroundsAPI.addEventListener(NewgroundsAPI.events.ADS_APPROVED, attachAd);
background.visible = false;
}
}
}//package reemus3_fla
Section 239
//NewgroundsAPI_Connector_14 (reemus3_fla.NewgroundsAPI_Connector_14)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import com.newgrounds.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.errors.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class NewgroundsAPI_Connector_14 extends MovieClip {
public var closeButton:SimpleButton;
public function NewgroundsAPI_Connector_14(){
addFrameScript(0, frame1);
}
public function checkConnection(_arg1:Object, _arg2:Object):void{
if (!_arg1.success){
visible = true;
gotoAndStop(3);
};
}
public function closeHandler(_arg1:MouseEvent):void{
visible = false;
}
function frame1(){
visible = false;
stop();
}
public function initialize(_arg1:Object):void{
NewgroundsAPI.setMovieVersion(_arg1.movie_version);
NewgroundsAPI.connectMovie(root, _arg1.movie_id.toString(), _arg1.enc_key, _arg1.debug_mode);
closeButton.addEventListener(MouseEvent.CLICK, closeHandler);
if (((NewgroundsAPI.isNewgrounds()) || (_arg1.debug_mode))){
NewgroundsAPI.addEventListener(NewgroundsAPI.events.MOVIE_CONNECTED, checkConnection);
if (((!(NewgroundsAPI.hasUserSession())) && (!(_arg1.debug_mode)))){
visible = true;
gotoAndStop(2);
};
};
NewgroundsAPI.loadMedals();
}
}
}//package reemus3_fla
Section 240
//NewgroundsAPI_Medal_Popup_16 (reemus3_fla.NewgroundsAPI_Medal_Popup_16)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import com.newgrounds.*;
import flash.net.*;
import flash.media.*;
import flash.system.*;
import com.adobe.utils.*;
import flash.text.*;
import flash.errors.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class NewgroundsAPI_Medal_Popup_16 extends MovieClip {
public var medalClassName:String;
public var medalValueText:TextField;
public var pop_delay:Timer;
public var badChars:String;
public var medal_value:String;
public var myBitmapData:BitmapData;
public var i:uint;
public var medalNameText:TextField;
public var bitmapClass:Class;
public var medal_icon:MovieClip;
public var medal_name:String;
public function NewgroundsAPI_Medal_Popup_16(){
addFrameScript(0, frame1, 9, frame10);
}
public function unlockMedal(_arg1:String):void{
var _local2:Array;
var _local3:*;
var _local4:String;
pop_delay.stop();
_local2 = NewgroundsAPI.getMedals();
_local3 = null;
for (_local4 in _local2) {
if (_local2[_local4].medal_name == _arg1){
_local3 = _local2[_local4];
medal_name = _local3.medal_name;
medal_value = (_local3.medal_value + "pts");
NewgroundsAPI.unlockMedal(medal_name);
pop_delay.start();
visible = true;
gotoAndPlay(2);
break;
};
};
}
function frame10(){
medalClassName = medal_name;
badChars = "~`!@#$%^&*()-+=[{]}|;:'\"\\,<.>/? ";
i = 0;
while (i < badChars.length) {
medalClassName = StringUtil.remove(medalClassName, badChars.charAt(i));
i++;
};
try {
bitmapClass = Class(getDefinitionByName(medalClassName));
} catch(e:Error) {
trace((("Couldn't find medal image with class name " + medalClassName) + "!"));
};
if (bitmapClass){
myBitmapData = new bitmapClass(0, 0);
medal_icon.addChild(new Bitmap(myBitmapData));
};
medalNameText.text = medal_name;
medalValueText.text = medal_value;
stop();
}
function frame1(){
pop_delay = new Timer(3000, 1);
pop_delay.addEventListener(TimerEvent.TIMER, endDelay);
medal_name = "?????";
medal_value = "???";
visible = false;
stop();
}
public function endDelay(_arg1:TimerEvent):void{
if (medal_icon.getChildAt(0)){
medal_icon.removeChildAt(0);
};
gotoAndPlay(10);
pop_delay.stop();
}
}
}//package reemus3_fla
Section 241
//NG_AD_OBJECT_WITH_PRELOADER_1 (reemus3_fla.NG_AD_OBJECT_WITH_PRELOADER_1)
package reemus3_fla {
import flash.display.*;
public dynamic class NG_AD_OBJECT_WITH_PRELOADER_1 extends MovieClip {
public var NG_Button:SimpleButton;
}
}//package reemus3_fla
Section 242
//nut_78 (reemus3_fla.nut_78)
package reemus3_fla {
import flash.display.*;
public dynamic class nut_78 extends MovieClip {
public function nut_78(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 243
//orangefill_79 (reemus3_fla.orangefill_79)
package reemus3_fla {
import flash.display.*;
public dynamic class orangefill_79 extends MovieClip {
public function orangefill_79(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 244
//orangeliquid_89 (reemus3_fla.orangeliquid_89)
package reemus3_fla {
import flash.display.*;
public dynamic class orangeliquid_89 extends MovieClip {
public function orangeliquid_89(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package reemus3_fla
Section 245
//paintappear_307 (reemus3_fla.paintappear_307)
package reemus3_fla {
import flash.display.*;
public dynamic class paintappear_307 extends MovieClip {
public function paintappear_307(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package reemus3_fla
Section 246
//paintsplat_306 (reemus3_fla.paintsplat_306)
package reemus3_fla {
import flash.display.*;
public dynamic class paintsplat_306 extends MovieClip {
public function paintsplat_306(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package reemus3_fla
Section 247
//papericonz_174 (reemus3_fla.papericonz_174)
package reemus3_fla {
import flash.display.*;
public dynamic class papericonz_174 extends MovieClip {
public function papericonz_174(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 248
//parachute_181 (reemus3_fla.parachute_181)
package reemus3_fla {
import flash.display.*;
public dynamic class parachute_181 extends MovieClip {
public var reemusmouth:MovieClip;
public function parachute_181(){
addFrameScript(166, frame167);
}
function frame167(){
stop();
}
}
}//package reemus3_fla
Section 249
//parachutyreemusandliam_182 (reemus3_fla.parachutyreemusandliam_182)
package reemus3_fla {
import flash.display.*;
public dynamic class parachutyreemusandliam_182 extends MovieClip {
public var reemusmouth:MovieClip;
}
}//package reemus3_fla
Section 250
//pathpopuup2_523 (reemus3_fla.pathpopuup2_523)
package reemus3_fla {
import flash.display.*;
public dynamic class pathpopuup2_523 extends MovieClip {
public function pathpopuup2_523(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package reemus3_fla
Section 251
//peg_246 (reemus3_fla.peg_246)
package reemus3_fla {
import flash.display.*;
public dynamic class peg_246 extends MovieClip {
public var circle:MovieClip;
}
}//package reemus3_fla
Section 252
//perribeatsreemus_290 (reemus3_fla.perribeatsreemus_290)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class perribeatsreemus_290 extends MovieClip {
public function perribeatsreemus_290(){
addFrameScript(1, frame2, 9, frame10, 17, frame18, 25, frame26, 31, frame32);
}
function frame10(){
if (root){
AudioManager.playSoundFromLibrary("CartoonBonkSound");
};
}
function frame18(){
if (root){
AudioManager.playSoundFromLibrary("CartoonBonkSound");
};
}
function frame26(){
if (root){
AudioManager.playSoundFromLibrary("CartoonBonkSound");
};
}
function frame2(){
if (root){
AudioManager.playSoundFromLibrary("SwingSound");
};
}
function frame32(){
if (root){
AudioManager.playSoundFromLibrary("SwingSound");
};
}
}
}//package reemus3_fla
Section 253
//pickuprock2_191 (reemus3_fla.pickuprock2_191)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class pickuprock2_191 extends MovieClip {
public var reemusmouth:MovieClip;
public function pickuprock2_191(){
addFrameScript(16, frame17);
}
function frame17(){
AudioManager.playSoundFromLibrary("LightThudSound");
}
}
}//package reemus3_fla
Section 254
//pickuprockreemus_183 (reemus3_fla.pickuprockreemus_183)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class pickuprockreemus_183 extends MovieClip {
public var reemusmouth:MovieClip;
public function pickuprockreemus_183(){
addFrameScript(16, frame17);
}
function frame17(){
AudioManager.playSoundFromLibrary("LightThudSound");
}
}
}//package reemus3_fla
Section 255
//playpopup_526 (reemus3_fla.playpopup_526)
package reemus3_fla {
import flash.display.*;
public dynamic class playpopup_526 extends MovieClip {
public function playpopup_526(){
addFrameScript(28, frame29);
}
function frame29(){
stop();
}
}
}//package reemus3_fla
Section 256
//playpopup2_527 (reemus3_fla.playpopup2_527)
package reemus3_fla {
import flash.display.*;
public dynamic class playpopup2_527 extends MovieClip {
public function playpopup2_527(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package reemus3_fla
Section 257
//pour_347 (reemus3_fla.pour_347)
package reemus3_fla {
import flash.display.*;
public dynamic class pour_347 extends MovieClip {
public var inner:MovieClip;
}
}//package reemus3_fla
Section 258
//pourbackin_134 (reemus3_fla.pourbackin_134)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class pourbackin_134 extends MovieClip {
public var mouth:MovieClip;
public function pourbackin_134(){
addFrameScript(5, frame6);
}
function frame6(){
AudioManager.playSoundFromLibrary("FillSound");
}
}
}//package reemus3_fla
Section 259
//pourblue_351 (reemus3_fla.pourblue_351)
package reemus3_fla {
import flash.display.*;
public dynamic class pourblue_351 extends MovieClip {
public function pourblue_351(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package reemus3_fla
Section 260
//pourgreen_353 (reemus3_fla.pourgreen_353)
package reemus3_fla {
import flash.display.*;
public dynamic class pourgreen_353 extends MovieClip {
public function pourgreen_353(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package reemus3_fla
Section 261
//pourliquid_130 (reemus3_fla.pourliquid_130)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class pourliquid_130 extends MovieClip {
public var mouth:MovieClip;
public function pourliquid_130(){
addFrameScript(7, frame8);
}
function frame8(){
AudioManager.playSoundFromLibrary("FillSound");
}
}
}//package reemus3_fla
Section 262
//pourorange_349 (reemus3_fla.pourorange_349)
package reemus3_fla {
import flash.display.*;
public dynamic class pourorange_349 extends MovieClip {
public function pourorange_349(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package reemus3_fla
Section 263
//pourpurple_352 (reemus3_fla.pourpurple_352)
package reemus3_fla {
import flash.display.*;
public dynamic class pourpurple_352 extends MovieClip {
public function pourpurple_352(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package reemus3_fla
Section 264
//pourred_350 (reemus3_fla.pourred_350)
package reemus3_fla {
import flash.display.*;
public dynamic class pourred_350 extends MovieClip {
public function pourred_350(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package reemus3_fla
Section 265
//pouryellow_348 (reemus3_fla.pouryellow_348)
package reemus3_fla {
import flash.display.*;
public dynamic class pouryellow_348 extends MovieClip {
public function pouryellow_348(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package reemus3_fla
Section 266
//pressbuttonliam_128 (reemus3_fla.pressbuttonliam_128)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class pressbuttonliam_128 extends MovieClip {
public function pressbuttonliam_128(){
addFrameScript(10, frame11, 30, frame31);
}
function frame31(){
stop();
}
function frame11(){
AudioManager.playSoundFromLibrary("ClickSound");
}
}
}//package reemus3_fla
Section 267
//pullcordreemus_170 (reemus3_fla.pullcordreemus_170)
package reemus3_fla {
import flash.display.*;
public dynamic class pullcordreemus_170 extends MovieClip {
public var reemusmouth:MovieClip;
}
}//package reemus3_fla
Section 268
//purplefill_86 (reemus3_fla.purplefill_86)
package reemus3_fla {
import flash.display.*;
public dynamic class purplefill_86 extends MovieClip {
public function purplefill_86(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 269
//purpleliquid_92 (reemus3_fla.purpleliquid_92)
package reemus3_fla {
import flash.display.*;
public dynamic class purpleliquid_92 extends MovieClip {
public function purpleliquid_92(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package reemus3_fla
Section 270
//puzzleholes_536 (reemus3_fla.puzzleholes_536)
package reemus3_fla {
import flash.display.*;
public dynamic class puzzleholes_536 extends MovieClip {
public var circle:MovieClip;
}
}//package reemus3_fla
Section 271
//RANKINGS_522 (reemus3_fla.RANKINGS_522)
package reemus3_fla {
import flash.display.*;
public dynamic class RANKINGS_522 extends MovieClip {
public function RANKINGS_522(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package reemus3_fla
Section 272
//redfill_84 (reemus3_fla.redfill_84)
package reemus3_fla {
import flash.display.*;
public dynamic class redfill_84 extends MovieClip {
public function redfill_84(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 273
//redliquid_90 (reemus3_fla.redliquid_90)
package reemus3_fla {
import flash.display.*;
public dynamic class redliquid_90 extends MovieClip {
public function redliquid_90(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package reemus3_fla
Section 274
//reemusaxe_164 (reemus3_fla.reemusaxe_164)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemusaxe_164 extends MovieClip {
public var reemustalk:MovieClip;
public var reemusmouth:MovieClip;
public function reemusaxe_164(){
addFrameScript(2, frame3, 37, frame38);
}
function frame3(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame38(){
stop();
}
}
}//package reemus3_fla
Section 275
//reemusdroprock_179 (reemus3_fla.reemusdroprock_179)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemusdroprock_179 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusdroprock_179(){
addFrameScript(12, frame13);
}
function frame13(){
AudioManager.playSoundFromLibrary("HeavyThudSound");
}
}
}//package reemus3_fla
Section 276
//reemusgetglue_162 (reemus3_fla.reemusgetglue_162)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemusgetglue_162 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusgetglue_162(){
addFrameScript(19, frame20);
}
function frame20(){
AudioManager.playSoundFromLibrary("Squirt2Sound");
}
}
}//package reemus3_fla
Section 277
//reemusgrabkey_190 (reemus3_fla.reemusgrabkey_190)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusgrabkey_190 extends MovieClip {
public var reemusmouth:MovieClip;
}
}//package reemus3_fla
Section 278
//reemusgrabshrrom_184 (reemus3_fla.reemusgrabshrrom_184)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemusgrabshrrom_184 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusgrabshrrom_184(){
addFrameScript(29, frame30);
}
function frame30(){
AudioManager.playSoundFromLibrary("PopSound");
}
}
}//package reemus3_fla
Section 279
//reemusholdstuffbounce_160 (reemus3_fla.reemusholdstuffbounce_160)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusholdstuffbounce_160 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusholdstuffbounce_160(){
addFrameScript(11, frame12);
}
function frame12(){
if (currentFrame == 12){
MovieClip(parent).gotoAndStop("waiting");
};
}
}
}//package reemus3_fla
Section 280
//reemusholdwalk_152 (reemus3_fla.reemusholdwalk_152)
package reemus3_fla {
import flash.display.*;
import asfiles.char.*;
public dynamic class reemusholdwalk_152 extends MovieClip {
public var reemustalk:MovieClip;
public var held:HeldItemReemus;
}
}//package reemus3_fla
Section 281
//reemusholdwalkback_154 (reemus3_fla.reemusholdwalkback_154)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusholdwalkback_154 extends MovieClip {
public var held:HeldBackReemus;
}
}//package reemus3_fla
Section 282
//reemusholdwalkfront_156 (reemus3_fla.reemusholdwalkfront_156)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusholdwalkfront_156 extends MovieClip {
public var held:reemusfrontholdhand;
}
}//package reemus3_fla
Section 283
//reemusicon_542 (reemus3_fla.reemusicon_542)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusicon_542 extends MovieClip {
public var reemustalk:MovieClip;
}
}//package reemus3_fla
Section 284
//Reemusjumpslands_188 (reemus3_fla.Reemusjumpslands_188)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class Reemusjumpslands_188 extends MovieClip {
public var reemusmouth:MovieClip;
public function Reemusjumpslands_188(){
addFrameScript(3, frame4, 11, frame12);
}
function frame12(){
stop();
}
function frame4(){
AudioManager.playSoundFromLibrary("ThudLandSound");
}
}
}//package reemus3_fla
Section 285
//reemuspullstick_161 (reemus3_fla.reemuspullstick_161)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemuspullstick_161 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemuspullstick_161(){
addFrameScript(40, frame41);
}
function frame41(){
AudioManager.playSoundFromLibrary("CrunchyBreakSound");
}
}
}//package reemus3_fla
Section 286
//reemuspulltree1_220 (reemus3_fla.reemuspulltree1_220)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemuspulltree1_220 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemuspulltree1_220(){
addFrameScript(3, frame4, 18, frame19, 31, frame32, 42, frame43, 57, frame58, 70, frame71);
}
function frame71(){
stop();
MovieClip(parent).dispatchEvent(new Event("returnReemus"));
}
function frame19(){
stop();
}
function frame4(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame43(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame32(){
stop();
MovieClip(parent).dispatchEvent(new Event("returnReemus"));
}
function frame58(){
stop();
}
}
}//package reemus3_fla
Section 287
//reemuspunchbug_166 (reemus3_fla.reemuspunchbug_166)
package reemus3_fla {
import flash.display.*;
public dynamic class reemuspunchbug_166 extends MovieClip {
public var reemusmouth:MovieClip;
}
}//package reemus3_fla
Section 288
//reemusrockpaper_171 (reemus3_fla.reemusrockpaper_171)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusrockpaper_171 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusrockpaper_171(){
addFrameScript(1, frame2, 59, frame60, 73, frame74, 90, frame91);
}
function frame74(){
stop();
}
function frame91(){
stop();
}
function frame2(){
stop();
}
function frame60(){
stop();
}
}
}//package reemus3_fla
Section 289
//reemusslamit_167 (reemus3_fla.reemusslamit_167)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemusslamit_167 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusslamit_167(){
addFrameScript(5, frame6, 9, frame10);
}
function frame10(){
AudioManager.playSoundFromLibrary("SplatSound");
}
function frame6(){
AudioManager.playSoundFromLibrary("SwingSound");
}
}
}//package reemus3_fla
Section 290
//reemusslamitaxe_169 (reemus3_fla.reemusslamitaxe_169)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemusslamitaxe_169 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusslamitaxe_169(){
addFrameScript(5, frame6, 9, frame10);
}
function frame10(){
AudioManager.playSoundFromLibrary("SplatSound");
}
function frame6(){
AudioManager.playSoundFromLibrary("SwingSound");
}
}
}//package reemus3_fla
Section 291
//reemusstopbounce_159 (reemus3_fla.reemusstopbounce_159)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusstopbounce_159 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusstopbounce_159(){
addFrameScript(11, frame12);
}
function frame12(){
if (currentFrame == 12){
MovieClip(parent).gotoAndStop("waiting");
};
}
}
}//package reemus3_fla
Section 292
//reemusstrut1_139 (reemus3_fla.reemusstrut1_139)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusstrut1_139 extends MovieClip {
public var reemustalk:MovieClip;
}
}//package reemus3_fla
Section 293
//reemusstrut2_141 (reemus3_fla.reemusstrut2_141)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusstrut2_141 extends MovieClip {
public var reemustalk:MovieClip;
}
}//package reemus3_fla
Section 294
//reemusstrut3_142 (reemus3_fla.reemusstrut3_142)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusstrut3_142 extends MovieClip {
public var reemustalk:MovieClip;
}
}//package reemus3_fla
Section 295
//reemusstrut4_143 (reemus3_fla.reemusstrut4_143)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusstrut4_143 extends MovieClip {
public var reemustalk:MovieClip;
}
}//package reemus3_fla
Section 296
//reemusstrut5_144 (reemus3_fla.reemusstrut5_144)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusstrut5_144 extends MovieClip {
public var reemustalk:MovieClip;
}
}//package reemus3_fla
Section 297
//reemusstrut6_145 (reemus3_fla.reemusstrut6_145)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusstrut6_145 extends MovieClip {
public var reemustalk:MovieClip;
}
}//package reemus3_fla
Section 298
//reemusstrut7_146 (reemus3_fla.reemusstrut7_146)
package reemus3_fla {
import flash.display.*;
public dynamic class reemusstrut7_146 extends MovieClip {
public var reemustalk:MovieClip;
}
}//package reemus3_fla
Section 299
//reemusSwingStick_165 (reemus3_fla.reemusSwingStick_165)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemusSwingStick_165 extends MovieClip {
public var reemustalk:MovieClip;
public var reemusmouth:MovieClip;
public function reemusSwingStick_165(){
addFrameScript(2, frame3, 37, frame38);
}
function frame3(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame38(){
stop();
}
}
}//package reemus3_fla
Section 300
//reemustakerockout_192 (reemus3_fla.reemustakerockout_192)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemustakerockout_192 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemustakerockout_192(){
addFrameScript(15, frame16);
}
function frame16(){
AudioManager.playSoundFromLibrary("LightThudSound");
}
}
}//package reemus3_fla
Section 301
//Reemustalk_140 (reemus3_fla.Reemustalk_140)
package reemus3_fla {
import flash.display.*;
public dynamic class Reemustalk_140 extends MovieClip {
public function Reemustalk_140(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 302
//reemusunlockchest_176 (reemus3_fla.reemusunlockchest_176)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class reemusunlockchest_176 extends MovieClip {
public var reemusmouth:MovieClip;
public function reemusunlockchest_176(){
addFrameScript(14, frame15);
}
function frame15(){
AudioManager.playSoundFromLibrary("JingleSound");
}
}
}//package reemus3_fla
Section 303
//roachoutro_270 (reemus3_fla.roachoutro_270)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class roachoutro_270 extends MovieClip {
public function roachoutro_270(){
addFrameScript(20, frame21, 61, frame62);
}
function frame21(){
dispatchEvent(new Event("roachStop"));
stop();
}
function frame62(){
stop();
}
}
}//package reemus3_fla
Section 304
//rock_180 (reemus3_fla.rock_180)
package reemus3_fla {
import flash.display.*;
public dynamic class rock_180 extends MovieClip {
public function rock_180(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package reemus3_fla
Section 305
//ROCKPAPERSELECT_172 (reemus3_fla.ROCKPAPERSELECT_172)
package reemus3_fla {
import flash.display.*;
public dynamic class ROCKPAPERSELECT_172 extends MovieClip {
public var paperClip:MovieClip;
public var scissorsClip:MovieClip;
public var rockClip:MovieClip;
public function ROCKPAPERSELECT_172(){
addFrameScript(0, frame1);
}
function frame1(){
if (currentFrame == 1){
stop();
};
}
}
}//package reemus3_fla
Section 306
//rocksfall_121 (reemus3_fla.rocksfall_121)
package reemus3_fla {
import flash.display.*;
public dynamic class rocksfall_121 extends MovieClip {
public function rocksfall_121(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 307
//scissorsiconsz_173 (reemus3_fla.scissorsiconsz_173)
package reemus3_fla {
import flash.display.*;
public dynamic class scissorsiconsz_173 extends MovieClip {
public function scissorsiconsz_173(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 308
//secondbox_209 (reemus3_fla.secondbox_209)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class secondbox_209 extends MovieClip {
public function secondbox_209(){
addFrameScript(5, frame6, 12, frame13, 14, frame15, 31, frame32);
}
function frame6(){
AudioManager.playSoundFromLibrary("JingleSound");
}
function frame13(){
stop();
}
function frame15(){
AudioManager.playSoundFromLibrary("JingleSound");
}
function frame32(){
stop();
}
}
}//package reemus3_fla
Section 309
//secretdoor_320 (reemus3_fla.secretdoor_320)
package reemus3_fla {
import flash.display.*;
public dynamic class secretdoor_320 extends MovieClip {
public function secretdoor_320(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package reemus3_fla
Section 310
//shakerodmmonster_419 (reemus3_fla.shakerodmmonster_419)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class shakerodmmonster_419 extends MovieClip {
public var monstermouth3:MovieClip;
public function shakerodmmonster_419(){
addFrameScript(1, frame2, 54, frame55, 72, frame73, 92, frame93, 111, frame112);
}
function frame73(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame93(){
AudioManager.playSoundFromLibrary("SplatSound");
}
function frame2(){
AudioManager.playSoundFromLibrary("Splash1Sound");
}
function frame112(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
function frame55(){
AudioManager.playSoundFromLibrary("HissSound");
}
}
}//package reemus3_fla
Section 311
//snakebitefruit_402 (reemus3_fla.snakebitefruit_402)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class snakebitefruit_402 extends MovieClip {
public function snakebitefruit_402(){
addFrameScript(2, frame3, 25, frame26);
}
function frame3(){
AudioManager.playSoundFromLibrary("BiteSound");
}
function frame26(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 312
//snakebitethefrog_430 (reemus3_fla.snakebitethefrog_430)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class snakebitethefrog_430 extends MovieClip {
public function snakebitethefrog_430(){
addFrameScript(20, frame21, 47, frame48, 57, frame58);
}
function frame21(){
AudioManager.playSoundFromLibrary("EatingSound");
}
function frame48(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame58(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 313
//snakeemerge_398 (reemus3_fla.snakeemerge_398)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class snakeemerge_398 extends MovieClip {
public function snakeemerge_398(){
addFrameScript(1, frame2, 13, frame14, 29, frame30);
}
function frame14(){
AudioManager.playSoundFromLibrary("Splash2Sound");
}
function frame2(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame30(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 314
//snakeemergefromwater_399 (reemus3_fla.snakeemergefromwater_399)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class snakeemergefromwater_399 extends MovieClip {
public function snakeemergefromwater_399(){
addFrameScript(28, frame29);
}
function frame29(){
parent.dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 315
//spiderweb_372 (reemus3_fla.spiderweb_372)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class spiderweb_372 extends MovieClip {
public function spiderweb_372(){
addFrameScript(59, frame60, 99, frame100, 118, frame119);
}
function frame100(){
AudioManager.playSoundFromLibrary("Squirt2Sound");
}
function frame119(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
function frame60(){
AudioManager.playSoundFromLibrary("CartoonBoinkSound");
}
}
}//package reemus3_fla
Section 316
//splattersappear_309 (reemus3_fla.splattersappear_309)
package reemus3_fla {
import flash.display.*;
public dynamic class splattersappear_309 extends MovieClip {
public function splattersappear_309(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package reemus3_fla
Section 317
//squirrel2_228 (reemus3_fla.squirrel2_228)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class squirrel2_228 extends MovieClip {
public function squirrel2_228(){
addFrameScript(14, frame15, 30, frame31, 44, frame45, 51, frame52, 63, frame64, 75, frame76, 84, frame85, 96, frame97);
}
function frame64(){
stop();
dispatchEvent(new Event("escape"));
}
function frame76(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame85(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame97(){
stop();
dispatchEvent(new Event("escape"));
}
function frame15(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame31(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame45(){
dispatchEvent(new Event("catchFrame"));
}
function frame52(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
}
}//package reemus3_fla
Section 318
//squirreljumpoff_222 (reemus3_fla.squirreljumpoff_222)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class squirreljumpoff_222 extends MovieClip {
public function squirreljumpoff_222(){
addFrameScript(2, frame3, 9, frame10, 16, frame17, 19, frame20, 102, frame103);
}
function frame10(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame3(){
AudioManager.playSoundFromLibrary("SquirrelSound");
}
function frame17(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame103(){
stop();
dispatchEvent(new Event("escape"));
}
function frame20(){
AudioManager.playSoundFromLibrary("WhooshSound");
}
}
}//package reemus3_fla
Section 319
//squirrelrun1_237 (reemus3_fla.squirrelrun1_237)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class squirrelrun1_237 extends MovieClip {
public function squirrelrun1_237(){
addFrameScript(41, frame42, 62, frame63, 102, frame103, 113, frame114, 131, frame132, 162, frame163, 166, frame167);
}
function frame167(){
stop();
dispatchEvent(new Event("escape"));
}
function frame163(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame103(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame114(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame42(){
AudioManager.playSoundFromLibrary("Spring1Sound");
}
function frame132(){
stop();
dispatchEvent(new Event("escape"));
}
function frame63(){
stop();
dispatchEvent(new Event("escape"));
}
}
}//package reemus3_fla
Section 320
//squshyholeflattens_53 (reemus3_fla.squshyholeflattens_53)
package reemus3_fla {
import flash.display.*;
public dynamic class squshyholeflattens_53 extends MovieClip {
public function squshyholeflattens_53(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package reemus3_fla
Section 321
//staticholdreemus_158 (reemus3_fla.staticholdreemus_158)
package reemus3_fla {
import flash.display.*;
import asfiles.char.*;
public dynamic class staticholdreemus_158 extends MovieClip {
public var held:HeldItemReemus;
public var mouth:MovieClip;
}
}//package reemus3_fla
Section 322
//staticliam_72 (reemus3_fla.staticliam_72)
package reemus3_fla {
import flash.display.*;
public dynamic class staticliam_72 extends MovieClip {
public var mouth:MovieClip;
}
}//package reemus3_fla
Section 323
//staticreemus_150 (reemus3_fla.staticreemus_150)
package reemus3_fla {
import flash.display.*;
public dynamic class staticreemus_150 extends MovieClip {
public var mouth:MovieClip;
}
}//package reemus3_fla
Section 324
//steamblastforbees_64 (reemus3_fla.steamblastforbees_64)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class steamblastforbees_64 extends MovieClip {
public function steamblastforbees_64(){
addFrameScript(1, frame2, 11, frame12);
}
function frame12(){
stop();
}
function frame2(){
AudioManager.playSoundFromLibrary("WhooshSound");
}
}
}//package reemus3_fla
Section 325
//steprock_341 (reemus3_fla.steprock_341)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class steprock_341 extends MovieClip {
public function steprock_341(){
addFrameScript(0, frame1, 1, frame2, 12, frame13, 13, frame14);
}
function frame14(){
AudioManager.playSoundFromLibrary("Tomb3Sound");
}
function frame1(){
stop();
}
function frame13(){
stop();
}
function frame2(){
AudioManager.playSoundFromLibrary("Tomb3Sound");
}
}
}//package reemus3_fla
Section 326
//stick_47 (reemus3_fla.stick_47)
package reemus3_fla {
import flash.display.*;
public dynamic class stick_47 extends MovieClip {
public function stick_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package reemus3_fla
Section 327
//stickshrroomtop_100 (reemus3_fla.stickshrroomtop_100)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class stickshrroomtop_100 extends MovieClip {
public function stickshrroomtop_100(){
addFrameScript(6, frame7);
}
function frame7(){
AudioManager.playSoundFromLibrary("SquirtSound");
}
}
}//package reemus3_fla
Section 328
//stonestepdoor_345 (reemus3_fla.stonestepdoor_345)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class stonestepdoor_345 extends MovieClip {
public function stonestepdoor_345(){
addFrameScript(1, frame2, 40, frame41);
}
function frame2(){
AudioManager.playSoundFromLibrary("TombOpenSound");
}
function frame41(){
stop();
}
}
}//package reemus3_fla
Section 329
//swapcharactermovieclip_544 (reemus3_fla.swapcharactermovieclip_544)
package reemus3_fla {
import flash.display.*;
public dynamic class swapcharactermovieclip_544 extends MovieClip {
public function swapcharactermovieclip_544(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
}
}
}//package reemus3_fla
Section 330
//throwMushroom_187 (reemus3_fla.throwMushroom_187)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class throwMushroom_187 extends MovieClip {
public var reemusmouth:MovieClip;
public function throwMushroom_187(){
addFrameScript(5, frame6);
}
function frame6(){
AudioManager.playSoundFromLibrary("SwingSound");
}
}
}//package reemus3_fla
Section 331
//tinkertok_285 (reemus3_fla.tinkertok_285)
package reemus3_fla {
import flash.display.*;
public dynamic class tinkertok_285 extends MovieClip {
public var spriteIn:MovieClip;
}
}//package reemus3_fla
Section 332
//tinkertokwalkaway_301 (reemus3_fla.tinkertokwalkaway_301)
package reemus3_fla {
import flash.display.*;
public dynamic class tinkertokwalkaway_301 extends MovieClip {
public function tinkertokwalkaway_301(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package reemus3_fla
Section 333
//tossflagliam_106 (reemus3_fla.tossflagliam_106)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class tossflagliam_106 extends MovieClip {
public function tossflagliam_106(){
addFrameScript(4, frame5);
}
function frame5(){
AudioManager.playSoundFromLibrary("FlutterSound");
}
}
}//package reemus3_fla
Section 334
//tossgelationliam_126 (reemus3_fla.tossgelationliam_126)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class tossgelationliam_126 extends MovieClip {
public var mouth:MovieClip;
public function tossgelationliam_126(){
addFrameScript(7, frame8, 16, frame17);
}
function frame8(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame17(){
AudioManager.playSoundFromLibrary("Splash1Sound");
}
}
}//package reemus3_fla
Section 335
//tree_27 (reemus3_fla.tree_27)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class tree_27 extends MovieClip {
public var chips1:MovieClip;
public var chips2:MovieClip;
public var chips3:MovieClip;
public function tree_27(){
addFrameScript(1, frame2, 2, frame3, 3, frame4, 4, frame5, 23, frame24, 24, frame25, 39, frame40);
}
function frame3(){
AudioManager.playSoundFromLibrary("ChopSound");
}
function frame25(){
dispatchEvent(new Event("faPrimary"));
}
function frame4(){
AudioManager.playSoundFromLibrary("ChopSound");
}
function frame5(){
AudioManager.playSoundFromLibrary("TreeFallSound");
}
function frame2(){
AudioManager.playSoundFromLibrary("ChopSound");
}
function frame24(){
AudioManager.playSoundFromLibrary("CrashSound");
}
function frame40(){
stop();
}
}
}//package reemus3_fla
Section 336
//trees2_21 (reemus3_fla.trees2_21)
package reemus3_fla {
import flash.display.*;
public dynamic class trees2_21 extends MovieClip {
public var bug:MovieClip;
}
}//package reemus3_fla
Section 337
//tumblelingnut_239 (reemus3_fla.tumblelingnut_239)
package reemus3_fla {
import flash.display.*;
public dynamic class tumblelingnut_239 extends MovieClip {
public var nut:MovieClip;
public function tumblelingnut_239(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package reemus3_fla
Section 338
//unlockchest_114 (reemus3_fla.unlockchest_114)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class unlockchest_114 extends MovieClip {
public function unlockchest_114(){
addFrameScript(3, frame4);
}
function frame4(){
AudioManager.playSoundFromLibrary("JingleSound");
}
}
}//package reemus3_fla
Section 339
//wardrobe_204 (reemus3_fla.wardrobe_204)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class wardrobe_204 extends MovieClip {
public function wardrobe_204(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
AudioManager.playSoundFromLibrary("ChestOpenSound");
}
}
}//package reemus3_fla
Section 340
//waterturnstojello_258 (reemus3_fla.waterturnstojello_258)
package reemus3_fla {
import flash.display.*;
import com.relish.managers.*;
public dynamic class waterturnstojello_258 extends MovieClip {
public function waterturnstojello_258(){
addFrameScript(9, frame10, 23, frame24);
}
function frame10(){
AudioManager.playSoundFromLibrary("StretchSound");
}
function frame24(){
stop();
}
}
}//package reemus3_fla
Section 341
//waxtree_200 (reemus3_fla.waxtree_200)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
import com.relish.managers.*;
public dynamic class waxtree_200 extends MovieClip {
public function waxtree_200(){
addFrameScript(53, frame54);
}
function frame54(){
if (root){
AudioManager.playSoundFromLibrary("DropletSound");
};
dispatchEvent(new Event("waxFall"));
}
}
}//package reemus3_fla
Section 342
//vines_269 (reemus3_fla.vines_269)
package reemus3_fla {
import flash.display.*;
public dynamic class vines_269 extends MovieClip {
public function vines_269(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package reemus3_fla
Section 343
//VisitorRight_425 (reemus3_fla.VisitorRight_425)
package reemus3_fla {
import flash.display.*;
public dynamic class VisitorRight_425 extends MovieClip {
public var frog:MovieClip;
}
}//package reemus3_fla
Section 344
//woodchipsfly_29 (reemus3_fla.woodchipsfly_29)
package reemus3_fla {
import flash.display.*;
public dynamic class woodchipsfly_29 extends MovieClip {
public function woodchipsfly_29(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package reemus3_fla
Section 345
//wormemerge_366 (reemus3_fla.wormemerge_366)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class wormemerge_366 extends MovieClip {
public function wormemerge_366(){
addFrameScript(366, frame367);
}
function frame367(){
MovieClip(parent).dispatchEvent(new Event("endOfClip"));
stop();
}
}
}//package reemus3_fla
Section 346
//X_LOAD_2 (reemus3_fla.X_LOAD_2)
package reemus3_fla {
import flash.events.*;
import flash.display.*;
public dynamic class X_LOAD_2 extends MovieClip {
public var NGButton:SimpleButton;
public function X_LOAD_2(){
addFrameScript(100, frame101, 150, frame151, 164, frame165);
}
function frame151(){
NGButton.addEventListener(MouseEvent.CLICK, PlayMovie);
}
function frame165(){
stop();
}
public function PlayMovie(_arg1:Event){
gotoAndStop("end");
MovieClip(root).play();
}
function frame101(){
play();
}
}
}//package reemus3_fla
Section 347
//yellowfill_83 (reemus3_fla.yellowfill_83)
package reemus3_fla {
import flash.display.*;
public dynamic class yellowfill_83 extends MovieClip {
public function yellowfill_83(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package reemus3_fla
Section 348
//yellowliquid_88 (reemus3_fla.yellowliquid_88)
package reemus3_fla {
import flash.display.*;
public dynamic class yellowliquid_88 extends MovieClip {
public function yellowliquid_88(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package reemus3_fla
Section 349
//ActionBlocker (ActionBlocker)
package {
import flash.display.*;
public dynamic class ActionBlocker extends MovieClip {
}
}//package
Section 350
//BeachMusic (BeachMusic)
package {
import flash.media.*;
public dynamic class BeachMusic extends Sound {
}
}//package
Section 351
//BeeSound (BeeSound)
package {
import flash.media.*;
public dynamic class BeeSound extends Sound {
}
}//package
Section 352
//BiteSound (BiteSound)
package {
import flash.media.*;
public dynamic class BiteSound extends Sound {
}
}//package
Section 353
//BoingSound (BoingSound)
package {
import flash.media.*;
public dynamic class BoingSound extends Sound {
}
}//package
Section 354
//BubblingSound (BubblingSound)
package {
import flash.media.*;
public dynamic class BubblingSound extends Sound {
}
}//package
Section 355
//BurpSound (BurpSound)
package {
import flash.media.*;
public dynamic class BurpSound extends Sound {
}
}//package
Section 356
//CampfireSound (CampfireSound)
package {
import flash.media.*;
public dynamic class CampfireSound extends Sound {
}
}//package
Section 357
//CartoonBoinkSound (CartoonBoinkSound)
package {
import flash.media.*;
public dynamic class CartoonBoinkSound extends Sound {
}
}//package
Section 358
//CartoonBonkSound (CartoonBonkSound)
package {
import flash.media.*;
public dynamic class CartoonBonkSound extends Sound {
}
}//package
Section 359
//CartoonZipSound (CartoonZipSound)
package {
import flash.media.*;
public dynamic class CartoonZipSound extends Sound {
}
}//package
Section 360
//CaveDoorMusic (CaveDoorMusic)
package {
import flash.media.*;
public dynamic class CaveDoorMusic extends Sound {
}
}//package
Section 361
//CaveInteriorMusic (CaveInteriorMusic)
package {
import flash.media.*;
public dynamic class CaveInteriorMusic extends Sound {
}
}//package
Section 362
//ChestOpenSound (ChestOpenSound)
package {
import flash.media.*;
public dynamic class ChestOpenSound extends Sound {
}
}//package
Section 363
//ChopSound (ChopSound)
package {
import flash.media.*;
public dynamic class ChopSound extends Sound {
}
}//package
Section 364
//ClickSound (ClickSound)
package {
import flash.media.*;
public dynamic class ClickSound extends Sound {
}
}//package
Section 365
//CrashSound (CrashSound)
package {
import flash.media.*;
public dynamic class CrashSound extends Sound {
}
}//package
Section 366
//CroakSound (CroakSound)
package {
import flash.media.*;
public dynamic class CroakSound extends Sound {
}
}//package
Section 367
//CrumblingSound (CrumblingSound)
package {
import flash.media.*;
public dynamic class CrumblingSound extends Sound {
}
}//package
Section 368
//CrunchyBreakSound (CrunchyBreakSound)
package {
import flash.media.*;
public dynamic class CrunchyBreakSound extends Sound {
}
}//package
Section 369
//CutSceneMusic (CutSceneMusic)
package {
import flash.media.*;
public dynamic class CutSceneMusic extends Sound {
}
}//package
Section 370
//DoomSound (DoomSound)
package {
import flash.media.*;
public dynamic class DoomSound extends Sound {
}
}//package
Section 371
//DoorOpenSound (DoorOpenSound)
package {
import flash.media.*;
public dynamic class DoorOpenSound extends Sound {
}
}//package
Section 372
//DropletSound (DropletSound)
package {
import flash.media.*;
public dynamic class DropletSound extends Sound {
}
}//package
Section 373
//EatingSound (EatingSound)
package {
import flash.media.*;
public dynamic class EatingSound extends Sound {
}
}//package
Section 374
//ending1movie (ending1movie)
package {
import flash.display.*;
import asfiles.*;
import asfiles.setting.*;
import com.relish.managers.*;
public dynamic class ending1movie extends Cutscene {
public function ending1movie(){
addFrameScript(1, frame2, 51, frame52, 120, frame121, 121, frame122, 122, frame123, 123, frame124, 124, frame125, 213, frame214, 214, frame215, 225, frame226, 241, frame242, 300, frame301, 338, frame339, 376, frame377);
}
function frame215(){
stop();
}
function frame214(){
stop();
}
function frame226(){
AudioManager.playSoundFromLibrary("TigerSound");
}
function frame2(){
Setting.playMusic("LiamEndingMusic");
}
function frame124(){
stop();
}
function frame339(){
stop();
}
function frame121(){
stop();
}
function frame123(){
stop();
}
function frame242(){
AudioManager.playSoundFromLibrary("CartoonBoinkSound");
}
function frame125(){
stop();
}
function frame377(){
LevelSelect.currentPath = 2;
MovieClip(parent).gotoAndStop(12);
}
function frame52(){
stop();
}
function frame122(){
stop();
}
function frame301(){
stop();
}
}
}//package
Section 375
//ending2movie (ending2movie)
package {
import flash.display.*;
import asfiles.*;
import asfiles.setting.*;
import com.relish.managers.*;
public dynamic class ending2movie extends Cutscene {
public function ending2movie(){
addFrameScript(1, frame2, 129, frame130, 206, frame207, 321, frame322, 352, frame353, 356, frame357, 408, frame409, 435, frame436, 471, frame472, 472, frame473, 518, frame519, 545, frame546);
}
function frame322(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame207(){
AudioManager.playSoundFromLibrary("SnarlSound");
}
function frame436(){
AudioManager.playSoundFromLibrary("TigerSound");
}
function frame473(){
stop();
}
function frame2(){
Setting.playMusic("ReemusEndingMusic");
}
function frame519(){
stop();
}
function frame357(){
AudioManager.playSoundFromLibrary("EatingSound");
}
function frame472(){
stop();
}
function frame409(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame353(){
AudioManager.playSoundFromLibrary("SquirrelDistressSound");
}
function frame130(){
stop();
}
function frame546(){
LevelSelect.currentPath = 1;
MovieClip(parent).gotoAndStop(12);
}
}
}//package
Section 376
//FillSound (FillSound)
package {
import flash.media.*;
public dynamic class FillSound extends Sound {
}
}//package
Section 377
//FlappingSound (FlappingSound)
package {
import flash.media.*;
public dynamic class FlappingSound extends Sound {
}
}//package
Section 378
//FlutterSound (FlutterSound)
package {
import flash.media.*;
public dynamic class FlutterSound extends Sound {
}
}//package
Section 379
//FlySound (FlySound)
package {
import flash.media.*;
public dynamic class FlySound extends Sound {
}
}//package
Section 380
//ForestMusic (ForestMusic)
package {
import flash.media.*;
public dynamic class ForestMusic extends Sound {
}
}//package
Section 381
//GrowlSound (GrowlSound)
package {
import flash.media.*;
public dynamic class GrowlSound extends Sound {
}
}//package
Section 382
//GulpSound (GulpSound)
package {
import flash.media.*;
public dynamic class GulpSound extends Sound {
}
}//package
Section 383
//HeavyThudSound (HeavyThudSound)
package {
import flash.media.*;
public dynamic class HeavyThudSound extends Sound {
}
}//package
Section 384
//HeldBackReemus (HeldBackReemus)
package {
import asfiles.char.*;
public dynamic class HeldBackReemus extends HeldItemReemus {
}
}//package
Section 385
//HissSound (HissSound)
package {
import flash.media.*;
public dynamic class HissSound extends Sound {
}
}//package
Section 386
//intro2 (intro2)
package {
import flash.display.*;
import asfiles.*;
import com.relish.managers.*;
public dynamic class intro2 extends Cutscene {
public function intro2(){
addFrameScript(1, frame2, 65, frame66, 97, frame98);
}
function frame2(){
AudioManager.playSoundFromLibrary("GrowlSound");
}
function frame98(){
MovieClip(parent).nextFrame();
}
function frame66(){
stop();
}
}
}//package
Section 387
//intro3 (intro3)
package {
import flash.display.*;
import asfiles.*;
import asfiles.setting.*;
public dynamic class intro3 extends Cutscene {
public function intro3(){
addFrameScript(1, frame2, 96, frame97, 98, frame99);
}
function frame97(){
stop();
}
function frame2(){
Setting.playMusic("CutSceneMusic");
}
function frame99(){
MovieClip(parent).nextFrame();
}
}
}//package
Section 388
//intro4 (intro4)
package {
import flash.display.*;
import asfiles.*;
import com.relish.managers.*;
public dynamic class intro4 extends Cutscene {
public function intro4(){
addFrameScript(1, frame2, 75, frame76, 96, frame97, 97, frame98, 98, frame99);
}
function frame76(){
stop();
}
function frame97(){
stop();
}
function frame2(){
AudioManager.playSoundFromLibrary("WhooshSound");
}
function frame99(){
MovieClip(parent).nextFrame();
}
function frame98(){
stop();
}
}
}//package
Section 389
//introshot1 (introshot1)
package {
import flash.display.*;
import asfiles.*;
import com.relish.managers.*;
public dynamic class introshot1 extends Cutscene {
public function introshot1(){
addFrameScript(1, frame2, 53, frame54, 130, frame131, 169, frame170, 272, frame273, 276, frame277, 280, frame281, 469, frame470);
}
function frame273(){
AudioManager.playSoundFromLibrary("SwingSound");
}
function frame277(){
AudioManager.playSoundFromLibrary("HeavyThudSound");
}
function frame281(){
AudioManager.playSoundFromLibrary("SizzleSound");
}
function frame170(){
AudioManager.playSoundFromLibrary("DoomSound");
}
function frame2(){
AudioManager.playSoundFromLibrary("ThunderSound");
}
function frame470(){
MovieClip(parent).gotoAndStop(8);
}
function frame131(){
AudioManager.playSoundFromLibrary("PlaneSound");
}
function frame54(){
AudioManager.playSoundFromLibrary("LightningSound");
}
}
}//package
Section 390
//JingleSound (JingleSound)
package {
import flash.media.*;
public dynamic class JingleSound extends Sound {
}
}//package
Section 391
//Liam (Liam)
package {
import asfiles.char.*;
public dynamic class Liam extends Character {
}
}//package
Section 392
//LiamEndingMusic (LiamEndingMusic)
package {
import flash.media.*;
public dynamic class LiamEndingMusic extends Sound {
}
}//package
Section 393
//liamholdhandback (liamholdhandback)
package {
import asfiles.char.*;
public dynamic class liamholdhandback extends HeldItemLiam {
}
}//package
Section 394
//liamholdhandfront (liamholdhandfront)
package {
import asfiles.char.*;
public dynamic class liamholdhandfront extends HeldItemLiam {
}
}//package
Section 395
//LightningSound (LightningSound)
package {
import flash.media.*;
public dynamic class LightningSound extends Sound {
}
}//package
Section 396
//LightThudSound (LightThudSound)
package {
import flash.media.*;
public dynamic class LightThudSound extends Sound {
}
}//package
Section 397
//MuddyDropSound (MuddyDropSound)
package {
import flash.media.*;
public dynamic class MuddyDropSound extends Sound {
}
}//package
Section 398
//NightSound (NightSound)
package {
import flash.media.*;
public dynamic class NightSound extends Sound {
}
}//package
Section 399
//PATHOFAGGRESSION (PATHOFAGGRESSION)
package {
import flash.display.*;
public dynamic class PATHOFAGGRESSION extends BitmapData {
public function PATHOFAGGRESSION(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 400
//PATHOFLEASTRESISTANCE (PATHOFLEASTRESISTANCE)
package {
import flash.display.*;
public dynamic class PATHOFLEASTRESISTANCE extends BitmapData {
public function PATHOFLEASTRESISTANCE(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 401
//PlaneSound (PlaneSound)
package {
import flash.media.*;
public dynamic class PlaneSound extends Sound {
}
}//package
Section 402
//PopSound (PopSound)
package {
import flash.media.*;
public dynamic class PopSound extends Sound {
}
}//package
Section 403
//PourSound (PourSound)
package {
import flash.media.*;
public dynamic class PourSound extends Sound {
}
}//package
Section 404
//PourSound2 (PourSound2)
package {
import flash.media.*;
public dynamic class PourSound2 extends Sound {
}
}//package
Section 405
//Reemus (Reemus)
package {
import asfiles.char.*;
public dynamic class Reemus extends Character {
}
}//package
Section 406
//ReemusEndingMusic (ReemusEndingMusic)
package {
import flash.media.*;
public dynamic class ReemusEndingMusic extends Sound {
}
}//package
Section 407
//reemusfrontholdhand (reemusfrontholdhand)
package {
import asfiles.char.*;
public dynamic class reemusfrontholdhand extends HeldItemReemus {
}
}//package
Section 408
//ReemusHeld (ReemusHeld)
package {
import asfiles.char.*;
public dynamic class ReemusHeld extends HeldItemReemus {
}
}//package
Section 409
//RingBellSound (RingBellSound)
package {
import flash.media.*;
public dynamic class RingBellSound extends Sound {
}
}//package
Section 410
//RipSound (RipSound)
package {
import flash.media.*;
public dynamic class RipSound extends Sound {
}
}//package
Section 411
//SizzleSound (SizzleSound)
package {
import flash.media.*;
public dynamic class SizzleSound extends Sound {
}
}//package
Section 412
//SkipButton (SkipButton)
package {
import flash.display.*;
public dynamic class SkipButton extends MovieClip {
}
}//package
Section 413
//SkipDialogueOverlay (SkipDialogueOverlay)
package {
import flash.display.*;
public dynamic class SkipDialogueOverlay extends MovieClip {
}
}//package
Section 414
//SlowLaughSound (SlowLaughSound)
package {
import flash.media.*;
public dynamic class SlowLaughSound extends Sound {
}
}//package
Section 415
//SmackSound (SmackSound)
package {
import flash.media.*;
public dynamic class SmackSound extends Sound {
}
}//package
Section 416
//SnakeAttackSound (SnakeAttackSound)
package {
import flash.media.*;
public dynamic class SnakeAttackSound extends Sound {
}
}//package
Section 417
//SnarlSound (SnarlSound)
package {
import flash.media.*;
public dynamic class SnarlSound extends Sound {
}
}//package
Section 418
//SpireMusic (SpireMusic)
package {
import flash.media.*;
public dynamic class SpireMusic extends Sound {
}
}//package
Section 419
//SpitSound (SpitSound)
package {
import flash.media.*;
public dynamic class SpitSound extends Sound {
}
}//package
Section 420
//Splash1Sound (Splash1Sound)
package {
import flash.media.*;
public dynamic class Splash1Sound extends Sound {
}
}//package
Section 421
//Splash2Sound (Splash2Sound)
package {
import flash.media.*;
public dynamic class Splash2Sound extends Sound {
}
}//package
Section 422
//SplatSound (SplatSound)
package {
import flash.media.*;
public dynamic class SplatSound extends Sound {
}
}//package
Section 423
//Spring1Sound (Spring1Sound)
package {
import flash.media.*;
public dynamic class Spring1Sound extends Sound {
}
}//package
Section 424
//Spring2Sound (Spring2Sound)
package {
import flash.media.*;
public dynamic class Spring2Sound extends Sound {
}
}//package
Section 425
//Spring3Sound (Spring3Sound)
package {
import flash.media.*;
public dynamic class Spring3Sound extends Sound {
}
}//package
Section 426
//SquirrelDistressSound (SquirrelDistressSound)
package {
import flash.media.*;
public dynamic class SquirrelDistressSound extends Sound {
}
}//package
Section 427
//SquirrelMusic (SquirrelMusic)
package {
import flash.media.*;
public dynamic class SquirrelMusic extends Sound {
}
}//package
Section 428
//SquirrelSound (SquirrelSound)
package {
import flash.media.*;
public dynamic class SquirrelSound extends Sound {
}
}//package
Section 429
//Squirt2Sound (Squirt2Sound)
package {
import flash.media.*;
public dynamic class Squirt2Sound extends Sound {
}
}//package
Section 430
//SquirtSound (SquirtSound)
package {
import flash.media.*;
public dynamic class SquirtSound extends Sound {
}
}//package
Section 431
//SquishSound (SquishSound)
package {
import flash.media.*;
public dynamic class SquishSound extends Sound {
}
}//package
Section 432
//StalacClicks (StalacClicks)
package {
import flash.display.*;
public dynamic class StalacClicks extends MovieClip {
}
}//package
Section 433
//StretchSound (StretchSound)
package {
import flash.media.*;
public dynamic class StretchSound extends Sound {
}
}//package
Section 434
//SwingSound (SwingSound)
package {
import flash.media.*;
public dynamic class SwingSound extends Sound {
}
}//package
Section 435
//TempleMusic (TempleMusic)
package {
import flash.media.*;
public dynamic class TempleMusic extends Sound {
}
}//package
Section 436
//THEPASSIONOFTHEEXTERMINATOR (THEPASSIONOFTHEEXTERMINATOR)
package {
import flash.display.*;
public dynamic class THEPASSIONOFTHEEXTERMINATOR extends BitmapData {
public function THEPASSIONOFTHEEXTERMINATOR(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 437
//ThudLandSound (ThudLandSound)
package {
import flash.media.*;
public dynamic class ThudLandSound extends Sound {
}
}//package
Section 438
//ThunderSound (ThunderSound)
package {
import flash.media.*;
public dynamic class ThunderSound extends Sound {
}
}//package
Section 439
//TigerSound (TigerSound)
package {
import flash.media.*;
public dynamic class TigerSound extends Sound {
}
}//package
Section 440
//Tomb2Sound (Tomb2Sound)
package {
import flash.media.*;
public dynamic class Tomb2Sound extends Sound {
}
}//package
Section 441
//Tomb3Sound (Tomb3Sound)
package {
import flash.media.*;
public dynamic class Tomb3Sound extends Sound {
}
}//package
Section 442
//TombOpenSound (TombOpenSound)
package {
import flash.media.*;
public dynamic class TombOpenSound extends Sound {
}
}//package
Section 443
//TreeFallSound (TreeFallSound)
package {
import flash.media.*;
public dynamic class TreeFallSound extends Sound {
}
}//package
Section 444
//WarMusic (WarMusic)
package {
import flash.media.*;
public dynamic class WarMusic extends Sound {
}
}//package
Section 445
//WaterfallSound (WaterfallSound)
package {
import flash.media.*;
public dynamic class WaterfallSound extends Sound {
}
}//package
Section 446
//WhipSound (WhipSound)
package {
import flash.media.*;
public dynamic class WhipSound extends Sound {
}
}//package
Section 447
//WhooshSound (WhooshSound)
package {
import flash.media.*;
public dynamic class WhooshSound extends Sound {
}
}//package
Section 448
//VisitorLeftMusic (VisitorLeftMusic)
package {
import flash.media.*;
public dynamic class VisitorLeftMusic extends Sound {
}
}//package
Section 449
//VisitorRightMusic (VisitorRightMusic)
package {
import flash.media.*;
public dynamic class VisitorRightMusic extends Sound {
}
}//package
Section 450
//WoodFallSound (WoodFallSound)
package {
import flash.media.*;
public dynamic class WoodFallSound extends Sound {
}
}//package
Section 451
//WoodStepSound (WoodStepSound)
package {
import flash.media.*;
public dynamic class WoodStepSound extends Sound {
}
}//package
Section 452
//WrapMusic (WrapMusic)
package {
import flash.media.*;
public dynamic class WrapMusic extends Sound {
}
}//package